[libvirt-dockerfiles PATCH] Drop libosinfo images
by Andrea Bolognani
As of
https://gitlab.com/libosinfo/osinfo-db-tools/-/commit/c185dd44ea6d8bfb9cb...
https://gitlab.com/libosinfo/osinfo-db/-/commit/84be97d141a5989589dfb5c4f...
https://gitlab.com/libosinfo/libosinfo/-/commit/ff1812e0c538f15bc19240378...
all projects under the libosinfo umbrella use the GitLab container
registry for their CI, so we no longer need to build these on Quay.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the Dockerfile refresh rule.
buildenv-libosinfo-centos-7.zip | Bin 1795 -> 0 bytes
buildenv-libosinfo-centos-8.zip | Bin 726 -> 0 bytes
buildenv-libosinfo-debian-10.zip | Bin 792 -> 0 bytes
buildenv-libosinfo-debian-9.zip | Bin 814 -> 0 bytes
buildenv-libosinfo-debian-sid.zip | Bin 792 -> 0 bytes
buildenv-libosinfo-fedora-31.zip | Bin 680 -> 0 bytes
buildenv-libosinfo-fedora-32.zip | Bin 680 -> 0 bytes
...nv-libosinfo-fedora-rawhide-cross-mingw32.zip | Bin 783 -> 0 bytes
...nv-libosinfo-fedora-rawhide-cross-mingw64.zip | Bin 789 -> 0 bytes
buildenv-libosinfo-fedora-rawhide.zip | Bin 699 -> 0 bytes
buildenv-libosinfo-opensuse-151.zip | Bin 704 -> 0 bytes
buildenv-libosinfo-ubuntu-1804.zip | Bin 818 -> 0 bytes
buildenv-libosinfo-ubuntu-2004.zip | Bin 795 -> 0 bytes
13 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 buildenv-libosinfo-centos-7.zip
delete mode 100644 buildenv-libosinfo-centos-8.zip
delete mode 100644 buildenv-libosinfo-debian-10.zip
delete mode 100644 buildenv-libosinfo-debian-9.zip
delete mode 100644 buildenv-libosinfo-debian-sid.zip
delete mode 100644 buildenv-libosinfo-fedora-31.zip
delete mode 100644 buildenv-libosinfo-fedora-32.zip
delete mode 100644 buildenv-libosinfo-fedora-rawhide-cross-mingw32.zip
delete mode 100644 buildenv-libosinfo-fedora-rawhide-cross-mingw64.zip
delete mode 100644 buildenv-libosinfo-fedora-rawhide.zip
delete mode 100644 buildenv-libosinfo-opensuse-151.zip
delete mode 100644 buildenv-libosinfo-ubuntu-1804.zip
delete mode 100644 buildenv-libosinfo-ubuntu-2004.zip
--
2.25.4
4 years, 5 months
[PATCH v2 0/8] Expose QEMU's -fw_cfg
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-June/msg00139.html
diff to v1:
- Changed domain XML, pre Dan's suggestion
- Documented the feature in news
Michal Prívozník (8):
domain_conf: Format NS always last
virSysinfoParseXML: Mangle ctxt inside virSysinfoParseXML()
conf: Add firmware blob configuration
qemu: Validate firmware blob configuration
qemu: Introduce fw_cfg capability
secdrivers: Relabel firmware config files
qemu: Generate command line for -fw_cfg
news: Document -fw_cfg
docs/formatdomain.html.in | 32 +++
docs/news.xml | 12 ++
docs/schemas/domaincommon.rng | 143 +++++++------
src/conf/domain_conf.c | 195 +++++++++++++-----
src/conf/domain_conf.h | 4 +-
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 54 ++++-
src/qemu/qemu_validate.c | 40 ++++
src/security/security_dac.c | 50 +++++
src/security/security_selinux.c | 50 +++++
src/security/virt-aa-helper.c | 12 ++
src/util/virsysinfo.c | 54 ++++-
src/util/virsysinfo.h | 16 +-
.../caps_2.10.0.aarch64.xml | 1 +
.../caps_2.10.0.ppc64.xml | 1 +
.../caps_2.10.0.s390x.xml | 1 +
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../caps_2.4.0.x86_64.xml | 1 +
.../caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 +
.../caps_2.6.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
.../caps_2.7.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
.../caps_2.8.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
.../caps_2.9.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../caps_3.0.0.riscv32.xml | 1 +
.../caps_3.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
tests/qemuxml2argvdata/smbios-type-fwcfg.args | 38 ++++
tests/qemuxml2argvdata/smbios-type-fwcfg.xml | 63 ++++++
tests/qemuxml2argvtest.c | 1 +
.../qemuxml2xmloutdata/smbios-type-fwcfg.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
64 files changed, 700 insertions(+), 118 deletions(-)
create mode 100644 tests/qemuxml2argvdata/smbios-type-fwcfg.args
create mode 100644 tests/qemuxml2argvdata/smbios-type-fwcfg.xml
create mode 120000 tests/qemuxml2xmloutdata/smbios-type-fwcfg.xml
--
2.26.2
4 years, 5 months
[libvirt-tck PATCH] gitlab: add CONTRIBUTING.rst file to indicate use of merge requests
by Erik Skultety
With the introduction of automated CI pipelines, we are now ready to
switch to using merge requests for the project. With this switch we no
longer wish to have patches sent to the mailing list, and thus the
git-publish config is removed.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
I was notified by jtomko, that we still haven't officially made the switch in
TCK, but I was already submitting merge requests.
.gitpublish | 4 ----
CONTRIBUTING.rst | 28 ++++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 4 deletions(-)
delete mode 100644 .gitpublish
create mode 100644 CONTRIBUTING.rst
diff --git a/.gitpublish b/.gitpublish
deleted file mode 100644
index 1cebab1..0000000
--- a/.gitpublish
+++ /dev/null
@@ -1,4 +0,0 @@
-[gitpublishprofile "default"]
-base = master
-to = libvir-list(a)redhat.com
-prefix = libvirt-tck PATCH
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..ed8ee44
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,28 @@
+===========================
+Contributing to libvirt-tck
+===========================
+
+The libvirt TCK project accepts code contributions via merge requests
+on the GitLab project:
+
+https://gitlab.com/libvirt/libvirt-tck/-/merge_requests
+
+It is required that automated CI pipelines succeed before a merge request
+will be accepted. The global pipeline status for the ``master`` branch is
+visible at:
+
+https://gitlab.com/libvirt/libvirt-tck/pipelines
+
+CI pipeline results for merge requests will be visible via the contributors'
+own private repository fork:
+
+https://gitlab.com/yourusername/libvirt-tck/pipelines
+
+Contributions submitted to the project must be in compliance with the
+Developer Certificate of Origin Version 1.1. This is documented at:
+
+https://developercertificate.org/
+
+To indicate compliance, each commit in a series must have a "Signed-off-by"
+tag with the submitter's name and email address. This can be added by passing
+the ``-s`` flag to ``git commit`` when creating the patches.
--
2.26.2
4 years, 5 months
[libvirt-tck PATCH] gitlab: add CI jobs for validating build across platforms
by Daniel P. Berrangé
This introduces CI jobs that replace the current jobs used on Jenkins
for every platform except FreeBSD.
A merge request workflow requires the user to fork the primary git
repo into their personal namespace. In general the changes need to
be tested against the current libvirt git master. If the user has a
fork of the main libvirt repo, we don't want to use that by default
as it may be out of date.
The general goal is that the CI jobs are self-contained and don't
depend on the build artifacts from the libvirt repo. We also want
to avoid having an explicit dependency on the libvirt-ci repo, or
on the Quay.io service. Contributors to the PHP module need to be
able to make code changes which imply CI environment changes and
be able to test them in isolation.
Thus, the dockerfile recipes for each distro are added in the ci/
sub-directory. The first stage of the CI jobs is to use these
recipes to build and publish a container image. These images are
then used in the second stage to perform the actual build.
The container image build is cached, inheriting from both the
primary libvirt project namespace, and the user's private project
namespace. Thus the performance hit of building container images
will only be felt the first time the project is forked, or when
the parent Docker images are rebuilt.
The dockerfiles were originally generated using lcitool, but if
the user makes a change that introduces new build dependencies,
the corresponding packages can be added to the dockerfile recipes
directly in the same commit. The change can be propagated back
into the libvirt-ci.git repo asynchronously.
The build job will do a minimal(-ish) build of libvirt git master
and then build the rest of the code against that. Ideally the main
libvirt configure script would have a way to request a minimal
build of just the API and test driver, but for now we settle for
just --without-libvirtd which culls a large number of the drivers
fairly easily.
Neither CentOS nor Ubuntu have the required perl deps to run the
TCK so those platforms are currently skipped.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
See example pipeline run:
https://gitlab.com/berrange/libvirt-tck/-/pipelines/153948849
.gitlab-ci.yml | 115 +++++++++++++++++++++++++++
ci/libvirt-debian-10.Dockerfile | 82 +++++++++++++++++++
ci/libvirt-debian-9.Dockerfile | 86 ++++++++++++++++++++
ci/libvirt-debian-sid.Dockerfile | 82 +++++++++++++++++++
ci/libvirt-fedora-31.Dockerfile | 81 +++++++++++++++++++
ci/libvirt-fedora-32.Dockerfile | 81 +++++++++++++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 82 +++++++++++++++++++
ci/refresh | 22 +++++
8 files changed, 631 insertions(+)
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-32.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100755 ci/refresh
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 50dae92..3d4d7db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,60 @@
stages:
- prebuild
+ - containers
+ - builds
+
+.container_job_template: &container_job_definition
+ image: docker:stable
+ stage: containers
+ services:
+ - docker:dind
+ before_script:
+ - export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
+ - export COMMON_TAG="$CI_REGISTRY/libvirt/libvirt-perl/ci-$NAME:latest"
+ - docker info
+ - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
+ script:
+ - docker pull "$TAG" || docker pull "$COMMON_TAG" || true
+ - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/libvirt-$NAME.Dockerfile" ci
+ - docker push "$TAG"
+ after_script:
+ - docker logout
+
+.git_build_job_template: &git_build_job_definition
+ image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
+ stage: builds
+ before_script:
+ - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
+ - export SCRATCH_DIR="/tmp/scratch"
+ - export VROOT="$SCRATCH_DIR/vroot"
+ - export LD_LIBRARY_PATH="$VROOT/lib"
+ - export PATH="$VROOT/bin:$PATH"
+ - export PKG_CONFIG_PATH="$VROOT/lib/pkgconfig"
+ - export TEST_MAINTAINER=1
+ - eval `perl -V:archname`
+ - export PERL5LIB="$VROOT/lib/perl5/$archname"
+ script:
+ - pushd "$PWD"
+ - mkdir -p "$SCRATCH_DIR"
+ - cd "$SCRATCH_DIR"
+ - git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
+ - git clone --depth 1 https://gitlab.com/libvirt/libvirt-perl.git
+ - mkdir libvirt/build
+ - cd libvirt/build
+ - ../autogen.sh --prefix="$VROOT" --without-libvirtd
+ - $MAKE install
+ - cd ../../libvirt-perl
+ - perl Build.PL install_base=$VROOT
+ - perl Build
+ - perl Build install
+ - popd
+ - perl Build.PL
+ - perl Build
+ - perl Build test
+ - perl Build install
+ - perl Build dist
+ - if test -x /usr/bin/rpmbuild ; then rpmbuild --nodeps -ta Sys-Virt-TCK*.tar.gz ; fi
# Check that all commits are signed-off for the DCO.
# Skip on "libvirt" namespace, since we only need to run
@@ -14,3 +68,64 @@ check-dco:
except:
variables:
- $CI_PROJECT_NAMESPACE == 'libvirt'
+
+debian-9-container:
+ <<: *container_job_definition
+ variables:
+ NAME: debian-9
+
+debian-10-container:
+ <<: *container_job_definition
+ variables:
+ NAME: debian-10
+
+debian-sid-container:
+ <<: *container_job_definition
+ variables:
+ NAME: debian-sid
+
+fedora-31-container:
+ <<: *container_job_definition
+ variables:
+ NAME: fedora-31
+
+fedora-32-container:
+ <<: *container_job_definition
+ variables:
+ NAME: fedora-32
+
+fedora-rawhide-container:
+ <<: *container_job_definition
+ variables:
+ NAME: fedora-rawhide
+
+
+debian-9-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: debian-9
+
+debian-10-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: debian-10
+
+debian-sid-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: debian-sid
+
+fedora-31-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: fedora-31
+
+fedora-32-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: fedora-32
+
+fedora-rawhide-git-build:
+ <<: *git_build_job_definition
+ variables:
+ NAME: fedora-rawhide
diff --git a/ci/libvirt-debian-10.Dockerfile b/ci/libvirt-debian-10.Dockerfile
new file mode 100644
index 0000000..f881069
--- /dev/null
+++ b/ci/libvirt-debian-10.Dockerfile
@@ -0,0 +1,82 @@
+FROM debian:10
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
+ apt-get dist-upgrade -y && \
+ apt-get install --no-install-recommends -y \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ gcc \
+ gdb \
+ gettext \
+ git \
+ libaccessors-perl \
+ libc-dev-bin \
+ libc6-dev \
+ libconfig-record-perl \
+ libcpan-changes-perl \
+ libdigest-perl-md5-perl \
+ libfile-slurp-perl \
+ libglib2.0-dev \
+ libgnutls28-dev \
+ libio-compress-perl \
+ libio-string-perl \
+ libmodule-build-perl \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libsub-uplevel-perl \
+ libtap-formatter-html-perl \
+ libtap-formatter-junit-perl \
+ libtap-harness-archive-perl \
+ libtest-exception-perl \
+ libtest-lwp-useragent-perl \
+ libtest-pod-coverage-perl \
+ libtest-pod-perl \
+ libtime-hr-perl \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libxml-twig-perl \
+ libxml-writer-perl \
+ libxml-xpath-perl \
+ libxml2-dev \
+ libxml2-utils \
+ locales \
+ lsof \
+ make \
+ meson \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ pkgconf \
+ python3 \
+ python3-docutils \
+ python3-setuptools \
+ python3-wheel \
+ screen \
+ strace \
+ sudo \
+ vim \
+ xsltproc && \
+ apt-get autoremove -y && \
+ apt-get autoclean -y && \
+ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+ dpkg-reconfigure locales && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/libvirt-debian-9.Dockerfile b/ci/libvirt-debian-9.Dockerfile
new file mode 100644
index 0000000..3a161fe
--- /dev/null
+++ b/ci/libvirt-debian-9.Dockerfile
@@ -0,0 +1,86 @@
+FROM debian:9
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
+ apt-get dist-upgrade -y && \
+ apt-get install --no-install-recommends -y \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ gcc \
+ gdb \
+ gettext \
+ git \
+ libaccessors-perl \
+ libc-dev-bin \
+ libc6-dev \
+ libconfig-record-perl \
+ libcpan-changes-perl \
+ libdigest-perl \
+ libdigest-perl-md5-perl \
+ libfile-slurp-perl \
+ libglib2.0-dev \
+ libgnutls28-dev \
+ libio-compress-perl \
+ libio-string-perl \
+ libmodule-build-perl \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libsub-uplevel-perl \
+ libtap-formatter-html-perl \
+ libtap-formatter-junit-perl \
+ libtap-harness-archive-perl \
+ libtest-exception-perl \
+ libtest-lwp-useragent-perl \
+ libtest-pod-coverage-perl \
+ libtest-pod-perl \
+ libtime-hr-perl \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libxml-twig-perl \
+ libxml-writer-perl \
+ libxml-xpath-perl \
+ libxml2-dev \
+ libxml2-utils \
+ locales \
+ lsof \
+ make \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ pkgconf \
+ python3 \
+ python3-docutils \
+ python3-pip \
+ python3-setuptools \
+ python3-wheel \
+ screen \
+ strace \
+ sudo \
+ vim \
+ xsltproc && \
+ apt-get autoremove -y && \
+ apt-get autoclean -y && \
+ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+ dpkg-reconfigure locales && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+RUN pip3 install \
+ meson==0.49.0
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/libvirt-debian-sid.Dockerfile b/ci/libvirt-debian-sid.Dockerfile
new file mode 100644
index 0000000..bed01a0
--- /dev/null
+++ b/ci/libvirt-debian-sid.Dockerfile
@@ -0,0 +1,82 @@
+FROM debian:sid
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
+ apt-get dist-upgrade -y && \
+ apt-get install --no-install-recommends -y \
+ autoconf \
+ automake \
+ autopoint \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ gcc \
+ gdb \
+ gettext \
+ git \
+ libaccessors-perl \
+ libc-dev-bin \
+ libc6-dev \
+ libconfig-record-perl \
+ libcpan-changes-perl \
+ libdigest-perl-md5-perl \
+ libfile-slurp-perl \
+ libglib2.0-dev \
+ libgnutls28-dev \
+ libio-compress-perl \
+ libio-string-perl \
+ libmodule-build-perl \
+ libnl-3-dev \
+ libnl-route-3-dev \
+ libsub-uplevel-perl \
+ libtap-formatter-html-perl \
+ libtap-formatter-junit-perl \
+ libtap-harness-archive-perl \
+ libtest-exception-perl \
+ libtest-lwp-useragent-perl \
+ libtest-pod-coverage-perl \
+ libtest-pod-perl \
+ libtime-hr-perl \
+ libtirpc-dev \
+ libtool \
+ libtool-bin \
+ libxml-twig-perl \
+ libxml-writer-perl \
+ libxml-xpath-perl \
+ libxml2-dev \
+ libxml2-utils \
+ locales \
+ lsof \
+ make \
+ meson \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ pkgconf \
+ python3 \
+ python3-docutils \
+ python3-setuptools \
+ python3-wheel \
+ screen \
+ strace \
+ sudo \
+ vim \
+ xsltproc && \
+ apt-get autoremove -y && \
+ apt-get autoclean -y && \
+ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+ dpkg-reconfigure locales && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/libvirt-fedora-31.Dockerfile b/ci/libvirt-fedora-31.Dockerfile
new file mode 100644
index 0000000..e72682c
--- /dev/null
+++ b/ci/libvirt-fedora-31.Dockerfile
@@ -0,0 +1,81 @@
+FROM fedora:31
+
+RUN dnf update -y && \
+ dnf install -y \
+ autoconf \
+ automake \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ cppi \
+ gcc \
+ gdb \
+ gettext \
+ gettext-devel \
+ git \
+ glib2-devel \
+ glibc-devel \
+ glibc-langpack-en \
+ gnutls-devel \
+ libnl3-devel \
+ libtirpc-devel \
+ libtool \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lsof \
+ make \
+ meson \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ perl-Archive-Tar \
+ perl-CPAN-Changes \
+ perl-Config-Record \
+ perl-Digest \
+ perl-Digest-MD5 \
+ perl-File-Slurp \
+ perl-IO-Compress-Bzip2 \
+ perl-IO-String \
+ perl-Module-Build \
+ perl-Sub-Uplevel \
+ perl-TAP-Formatter-HTML \
+ perl-TAP-Formatter-JUnit \
+ perl-TAP-Harness-Archive \
+ perl-Test-Exception \
+ perl-Test-LWP-UserAgent \
+ perl-Test-Pod \
+ perl-Test-Pod-Coverage \
+ perl-Time-HiRes \
+ perl-XML-Twig \
+ perl-XML-Writer \
+ perl-XML-XPath \
+ perl-accessors \
+ perl-generators \
+ pkgconfig \
+ python3 \
+ python3-docutils \
+ python3-setuptools \
+ python3-wheel \
+ rpcgen \
+ rpm-build \
+ screen \
+ strace \
+ sudo \
+ vim && \
+ dnf autoremove -y && \
+ dnf clean all -y && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/libvirt-fedora-32.Dockerfile b/ci/libvirt-fedora-32.Dockerfile
new file mode 100644
index 0000000..9770d53
--- /dev/null
+++ b/ci/libvirt-fedora-32.Dockerfile
@@ -0,0 +1,81 @@
+FROM fedora:32
+
+RUN dnf update -y && \
+ dnf install -y \
+ autoconf \
+ automake \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ cppi \
+ gcc \
+ gdb \
+ gettext \
+ gettext-devel \
+ git \
+ glib2-devel \
+ glibc-devel \
+ glibc-langpack-en \
+ gnutls-devel \
+ libnl3-devel \
+ libtirpc-devel \
+ libtool \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lsof \
+ make \
+ meson \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ perl-Archive-Tar \
+ perl-CPAN-Changes \
+ perl-Config-Record \
+ perl-Digest \
+ perl-Digest-MD5 \
+ perl-File-Slurp \
+ perl-IO-Compress-Bzip2 \
+ perl-IO-String \
+ perl-Module-Build \
+ perl-Sub-Uplevel \
+ perl-TAP-Formatter-HTML \
+ perl-TAP-Formatter-JUnit \
+ perl-TAP-Harness-Archive \
+ perl-Test-Exception \
+ perl-Test-LWP-UserAgent \
+ perl-Test-Pod \
+ perl-Test-Pod-Coverage \
+ perl-Time-HiRes \
+ perl-XML-Twig \
+ perl-XML-Writer \
+ perl-XML-XPath \
+ perl-accessors \
+ perl-generators \
+ pkgconfig \
+ python3 \
+ python3-docutils \
+ python3-setuptools \
+ python3-wheel \
+ rpcgen \
+ rpm-build \
+ screen \
+ strace \
+ sudo \
+ vim && \
+ dnf autoremove -y && \
+ dnf clean all -y && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/libvirt-fedora-rawhide.Dockerfile b/ci/libvirt-fedora-rawhide.Dockerfile
new file mode 100644
index 0000000..4fd8b1e
--- /dev/null
+++ b/ci/libvirt-fedora-rawhide.Dockerfile
@@ -0,0 +1,82 @@
+FROM fedora:rawhide
+
+RUN dnf update -y --nogpgcheck fedora-gpg-keys && \
+ dnf update -y && \
+ dnf install -y \
+ autoconf \
+ automake \
+ bash \
+ bash-completion \
+ ca-certificates \
+ ccache \
+ chrony \
+ cppi \
+ gcc \
+ gdb \
+ gettext \
+ gettext-devel \
+ git \
+ glib2-devel \
+ glibc-devel \
+ glibc-langpack-en \
+ gnutls-devel \
+ libnl3-devel \
+ libtirpc-devel \
+ libtool \
+ libxml2 \
+ libxml2-devel \
+ libxslt \
+ lsof \
+ make \
+ meson \
+ net-tools \
+ ninja-build \
+ patch \
+ perl \
+ perl-Archive-Tar \
+ perl-CPAN-Changes \
+ perl-Config-Record \
+ perl-Digest \
+ perl-Digest-MD5 \
+ perl-File-Slurp \
+ perl-IO-Compress-Bzip2 \
+ perl-IO-String \
+ perl-Module-Build \
+ perl-Sub-Uplevel \
+ perl-TAP-Formatter-HTML \
+ perl-TAP-Formatter-JUnit \
+ perl-TAP-Harness-Archive \
+ perl-Test-Exception \
+ perl-Test-LWP-UserAgent \
+ perl-Test-Pod \
+ perl-Test-Pod-Coverage \
+ perl-Time-HiRes \
+ perl-XML-Twig \
+ perl-XML-Writer \
+ perl-XML-XPath \
+ perl-accessors \
+ perl-generators \
+ pkgconfig \
+ python3 \
+ python3-docutils \
+ python3-setuptools \
+ python3-wheel \
+ rpcgen \
+ rpm-build \
+ screen \
+ strace \
+ sudo \
+ vim && \
+ dnf autoremove -y && \
+ dnf clean all -y && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/$(basename /usr/bin/gcc)
+
+ENV LANG "en_US.UTF-8"
+
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/ci/refresh b/ci/refresh
new file mode 100755
index 0000000..657f4d0
--- /dev/null
+++ b/ci/refresh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if test -z "$1"
+then
+ echo "syntax: $0 PATH-TO-LCITOOL"
+ exit 1
+fi
+
+LCITOOL=$1
+
+if ! test -x "$LCITOOL"
+then
+ echo "$LCITOOL is not executable"
+ exit 1
+fi
+
+HOSTS=$($LCITOOL hosts | grep -v -E '(freebsd|ubuntu|suse|centos)')
+
+for host in $HOSTS
+do
+ $LCITOOL dockerfile $host libvirt+minimal,libvirt-perl,libvirt-tck > $host.Dockerfile
+done
--
2.26.2
4 years, 5 months
[libvirt PATCH 0/2] ci: Enable Cirrus CI integration
by Andrea Bolognani
This is an alternative approach to the one proposed by Erik[1].
Advantages of this approach:
* we don't have to build and maintain our own FreeBSD runners;
* we make it possible, after some straightforward one-time setup,
for any contributor to have their branches build on FreeBSD and
macOS, again without having to build and maintain their own
runners;
* we reduce the number of services external of GitLab that we
depend on by having FreeBSD and macOS build happen on the same
platform instead of separate ones.
Drawbacks of this approach:
* requires signing up for yet another online service.
To see this in action, check out the
https://gitlab.com/abologna/libvirt/-/pipelines/153963978
pipeline, and in particular the
https://gitlab.com/abologna/libvirt/-/jobs/585678408
https://gitlab.com/abologna/libvirt/-/jobs/585678413
jobs.
libvirt-ci merge request:
https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/16
[1] https://www.redhat.com/archives/libvir-list/2020-June/msg00188.html
Andrea Bolognani (2):
ci: Enable Cirrus CI integration
ci: Remove Travis CI
.gitlab-ci.yml | 36 ++++++++++++++++++
.travis.yml | 58 -----------------------------
ci/README.rst | 59 ++++++++++++++++++++++++++++++
ci/cirrus/freebsd-11.yml.j2 | 73 +++++++++++++++++++++++++++++++++++++
ci/cirrus/freebsd-12.yml.j2 | 73 +++++++++++++++++++++++++++++++++++++
ci/cirrus/macos-1015.yml.j2 | 38 +++++++++++++++++++
6 files changed, 279 insertions(+), 58 deletions(-)
delete mode 100644 .travis.yml
create mode 100644 ci/README.rst
create mode 100644 ci/cirrus/freebsd-11.yml.j2
create mode 100644 ci/cirrus/freebsd-12.yml.j2
create mode 100644 ci/cirrus/macos-1015.yml.j2
--
2.25.4
4 years, 5 months
bugifx: fix some wrong usage of ATTRIBUTE_NONNULL
by Bihong Yu
There are some wrong usage of ATTRIBUTE_NONNULL, which may cause the compilation fail. The
ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which declares that the
input pointer parameter of funciton should not be NULL. If we declare some input pointer
parameter of the function is ATTRIBUTE_NONNULL, the function should not redundancy check of
the pointer parameter. And the ATTRIBUTE_NONNULL can only be using to pointer.
>From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00 2001
From: yubihong <yubihong(a)huawei.com>
Date: Fri, 24 Apr 2020 17:44:43 +0800
Subject: [PATCH] qemu: fix code format problem
Signed-off-by:Yu Bihong <yubihong(a)huawei.com>
---
src/libvirt-domain.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a12809c..d659f1b 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -8194,11 +8194,11 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml)
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainAttachDevice) {
- int ret;
- ret = conn->driver->domainAttachDevice(domain, xml);
- if (ret < 0)
- goto error;
- return ret;
+ int ret;
+ ret = conn->driver->domainAttachDevice(domain, xml);
+ if (ret < 0)
+ goto error;
+ return ret;
}
virReportUnsupportedError();
@@ -8299,9 +8299,9 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml)
if (conn->driver->domainDetachDevice) {
int ret;
ret = conn->driver->domainDetachDevice(domain, xml);
- if (ret < 0)
- goto error;
- return ret;
+ if (ret < 0)
+ goto error;
+ return ret;
}
virReportUnsupportedError();
--
1.8.3.1
4 years, 5 months
[PATCH 1/1] formatdomain.html.in: link to firewall page
by Daniel Henrique Barboza
Put a link to the firewall page in the "Virtual network" section,
mentioning that the forward types 'nat', 'route' and 'isolated'
will change firewall settings in the host.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
docs/formatdomain.html.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 33cec1e6dd..e2db031276 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5635,6 +5635,13 @@
mode='bridge|private|vepa|passthrough'/></code> <span class="since">Since
0.9.4</span>)
</p>
+ <p>
+ Forward modes <code>nat</code>, <code>route</code> and isolated
+ (no <code>forward</code> element) will change host firewall
+ configurations. More info in
+ <a href="firewall.html#fw-virtual-network-driver">firewall and filtering
+ for virtual networks</a>.
+ </p>
<p>
For networks with a forward mode of bridge, private, vepa, and
passthrough, it is assumed that the host has any necessary DNS
--
2.26.2
4 years, 5 months
[libvirt PATCH] network: add private chains only if there are networks adding iptables rules
by Laine Stump
Juan Quintela noticed that when he restarted libvirt he was getting
extra iptables rules added by libvirt even though he didn't have any
libvirt networks that used iptables rules. It turns out this also
happens if the firewalld service is restarted. The extra rules are
just the private chains, and they're sometimes being added
unnecessarily because they are added separately in a global
networkPreReloadFirewallRules() that does the init if there are any
active networks, regardless of whether or not any of those networks
will actually add rules to the host firewall.
The fix is to change the check for "any active networks" to instead
check for "any active networks that add firewall rules".
(NB: although the timing seems suspicious, this isn't a new regression
caused by the recently pushed f5418b427 (which forces recreation of
private chains when firewalld is restarted); it was an existing bug
since iptables rules were first put into private chains, even after
commit c6cbe18771 delayed creation of the private chains. The
implication is that any downstream based on v5.1.0 or later that cares
about these extraneous (but harmless) private chains would want to
backport this patch (along with the other two if they aren't already
there))
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/network/bridge_driver_linux.c | 49 ++++++++++++++++++++++++-------
1 file changed, 38 insertions(+), 11 deletions(-)
diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_linux.c
index b0bd207250..4145411b4b 100644
--- a/src/network/bridge_driver_linux.c
+++ b/src/network/bridge_driver_linux.c
@@ -91,28 +91,55 @@ static void networkSetupPrivateChains(void)
static int
-networkHasRunningNetworksHelper(virNetworkObjPtr obj,
+networkHasRunningNetworksWithFWHelper(virNetworkObjPtr obj,
void *opaque)
{
- bool *running = opaque;
+ bool *activeWithFW = opaque;
virObjectLock(obj);
- if (virNetworkObjIsActive(obj))
- *running = true;
+ if (virNetworkObjIsActive(obj)) {
+ virNetworkDefPtr def = virNetworkObjGetDef(obj);
+
+ switch ((virNetworkForwardType) def->forward.type) {
+ case VIR_NETWORK_FORWARD_NONE:
+ case VIR_NETWORK_FORWARD_NAT:
+ case VIR_NETWORK_FORWARD_ROUTE:
+ *activeWithFW = true;
+ break;
+
+ case VIR_NETWORK_FORWARD_OPEN:
+ case VIR_NETWORK_FORWARD_BRIDGE:
+ case VIR_NETWORK_FORWARD_PRIVATE:
+ case VIR_NETWORK_FORWARD_VEPA:
+ case VIR_NETWORK_FORWARD_PASSTHROUGH:
+ case VIR_NETWORK_FORWARD_HOSTDEV:
+ case VIR_NETWORK_FORWARD_LAST:
+ break;
+ }
+ }
+
virObjectUnlock(obj);
+ /*
+ * terminate ForEach early once we find an active network that
+ * adds Firewall rules (return status is ignored)
+ */
+ if (*activeWithFW)
+ return -1;
+
return 0;
}
static bool
-networkHasRunningNetworks(virNetworkDriverStatePtr driver)
+networkHasRunningNetworksWithFW(virNetworkDriverStatePtr driver)
{
- bool running = false;
+ bool activeWithFW = false;
+
virNetworkObjListForEach(driver->networks,
- networkHasRunningNetworksHelper,
- &running);
- return running;
+ networkHasRunningNetworksWithFWHelper,
+ &activeWithFW);
+ return activeWithFW;
}
@@ -150,8 +177,8 @@ networkPreReloadFirewallRules(virNetworkDriverStatePtr driver,
networkSetupPrivateChains();
} else {
- if (!networkHasRunningNetworks(driver)) {
- VIR_DEBUG("Delayed global rule setup as no networks are running");
+ if (!networkHasRunningNetworksWithFW(driver)) {
+ VIR_DEBUG("Delayed global rule setup as no networks with firewall rules are running");
return;
}
--
2.25.4
4 years, 5 months
[libvirt PATCH] rpm: adapt docs filelist to NEWS -> NEWS.rst rename
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a CI fix
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 6abf97df85..262e66f3cc 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1505,7 +1505,7 @@ exit 0
%files
%files docs
-%doc AUTHORS ChangeLog NEWS README README.rst
+%doc AUTHORS ChangeLog NEWS.rst README README.rst
%doc %{_vpath_builddir}/libvirt-docs/*
%files daemon
--
2.26.2
4 years, 5 months
[PATCH 0/5] NUMA CPUs 'auto-fill' for incomplete topologies
by Daniel Henrique Barboza
Hi,
This series implements a convenience feature for the case where
the user defines an incomplete NUMA topology in the domain,
when the sum of all cpus in each NUMA cell is less than the
maximum vcpus count of the domain.
This is an implementation based on Peter Krempa's suggestion in [1].
The documentation patch (04), aside from documentating this new
behavior, while also letting the user know that using incomplete
NUMA topologies are not advised.
This feature does not break migration ABI. I tested it in a migration
using an incomplete NUMA topology domain to migrate to another host
with a patched Libvirt. A guest with this NUMA topology, declaring
9 vcpus and short of 7 vcpus to complete the total of 16:
<vcpu placement='auto'>16</vcpu>
[...]
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>POWER9</model>
<numa>
<cell id='0' cpus='0-1,6' memory='3906250' unit='KiB'/>
<cell id='1' cpus='2-4' memory='3906250' unit='KiB'/>
<cell id='2' cpus='10,12' memory='3906250' unit='KiB'/>
<cell id='3' cpus='14' memory='3906250' unit='KiB'/>
</numa>
</cpu>
Successfully migrates to a patched Libvirt, ending up with
this topology where the missing VCPUs were added to node 0:
<vcpu placement='auto'>16</vcpu>
[...]
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>POWER9</model>
<numa>
<cell id='0' cpus='0-1,5-9,11,13,15' memory='3932160' unit='KiB'/>
<cell id='1' cpus='2-4' memory='3932160' unit='KiB'/>
<cell id='2' cpus='10,12' memory='3932160' unit='KiB'/>
<cell id='3' cpus='14' memory='3932160' unit='KiB'/>
</numa>
</cpu>
[1] https://www.redhat.com/archives/libvir-list/2019-June/msg00263.html
Daniel Henrique Barboza (5):
numa_conf.c: add helper functions for cpumap operations
qemu_domain.c: NUMA CPUs auto-fill for incomplete topologies
qemuxml2xmltest.c: add NUMA vcpus auto fill tests
formatdomain.html.in: document the NUMA cpus auto fill feature
qemu_validate.c: revert NUMA CPU range user warning
docs/formatdomain.html.in | 11 ++++-
src/conf/numa_conf.c | 46 ++++++++++++++++++
src/conf/numa_conf.h | 3 ++
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain.c | 47 +++++++++++++++++++
src/qemu/qemu_domain.h | 4 ++
src/qemu/qemu_driver.c | 9 ++++
src/qemu/qemu_validate.c | 19 ++------
.../numavcpus-topology-mismatch.xml | 37 +++++++++++++++
...avcpus-topology-mismatch.x86_64-latest.xml | 38 +++++++++++++++
tests/qemuxml2xmltest.c | 1 +
11 files changed, 201 insertions(+), 15 deletions(-)
create mode 100644 tests/qemuxml2argvdata/numavcpus-topology-mismatch.xml
create mode 100644 tests/qemuxml2xmloutdata/numavcpus-topology-mismatch.x86_64-latest.xml
--
2.26.2
4 years, 5 months