From nobody Mon Nov 25 17:28:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1596033532; cv=none; d=zohomail.com; s=zohoarc; b=mP6lejk+1Ck1ViaoGkc67eBMrGchLebBVe43Aj9n/AnUr9+LLAwRBamHWSQUJQqdTYqZLng5PfNQuY1sapotR1qQdzmnBtAnDejyxynFEFKNf5nj6E82kTBeZ7Ow8hQkOpXKG2vhaBUjJLAVckXrF4d5Wm6lcyoibRWYJb2zK9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596033532; h=Content-Type:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=cKrJ6xxFMS7oRaumqBTiSJXnH83zaSc+N1avoz87EEU=; b=FuVAqnM+/ES3pMoMJHmOau5s6FV0A9JPgwK/mzen+P8XYOiIgBuKl6SiFhO6A269/FUBXYmkiUFFfr+XWUs8mvng+UGgJzK+TEGzDBGGF/0IM6pITmsCeeylg4njnw1kQ2Hvlid7vdc5ZfB+0QzIsTSE36gr8txO3OYIOzmMzcE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1596033532612663.800070472378; Wed, 29 Jul 2020 07:38:52 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-284-LHS9oob7NtW7SGXwQEMjAA-1; Wed, 29 Jul 2020 10:38:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7043A79EC0; Wed, 29 Jul 2020 14:38:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C35DD5DA72; Wed, 29 Jul 2020 14:38:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7EF591809547; Wed, 29 Jul 2020 14:38:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06TEcRf1025943 for ; Wed, 29 Jul 2020 10:38:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id EC807100EBA4; Wed, 29 Jul 2020 14:38:27 +0000 (UTC) Received: from antique-laptop (unknown [10.40.195.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 994EC10013C4 for ; Wed, 29 Jul 2020 14:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596033531; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=cKrJ6xxFMS7oRaumqBTiSJXnH83zaSc+N1avoz87EEU=; b=NVakBS5BiWK6yPBnC5K//P1G9MLCaphHAobAsM1+GZluEd2MR4OonUt8TBGSpxfyXUYTfK CR696/beTGpZb+3+emJrBOoVftB/P+AnsLo8iHLYf8vjXyH/TvQzjKvF/1a/VkT6xYlmkf THBbkXNpqUPIjBNLqlbIAjKijIoGn88= X-MC-Unique: LHS9oob7NtW7SGXwQEMjAA-1 Date: Wed, 29 Jul 2020 16:38:20 +0200 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2] port libvirt to Meson build system Message-ID: <20200729143820.GD1184283@antique-laptop> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lLbDBsvWahy0xqFJ" Content-Disposition: inline X-Zoho-Virus-Status: 1 X-ZohoMail-DKIM: pass (identity @redhat.com) --lLbDBsvWahy0xqFJ Content-Type: multipart/mixed; boundary="MEatx1zidE5asLAI" Content-Disposition: inline --MEatx1zidE5asLAI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The second time around I will not post the complete series as it doesn't make that much sense. Instead I'll post a diff between the two series to provide the changes between these series together with links to both versions pushed to gitlab repository. Patches for v2 are available from my gitlab repository: git clone -b meson https://gitlab.com/phrdina/libvirt.git and link to gitlab pipeline: https://gitlab.com/phrdina/libvirt/-/pipelines/172042918 Patches for v1 are available from different branch 'meson-v1' in the same repository. You can get the attached diff by running: git diff meson-v1 meson During review we discovered some areas that should be improved once the meson rewrite is merged into libvirt master: - As of June 2020 we can drop library check for yal2 and use pkg-confg only check because openSUSE Leap 42.3 is no longer supported by libvirt and latest SLES 15 was released on 2018-07-16. - It was suggested to drop README file which is just a link to README.rst and with meson no longer required as it was with autotools. - There is a warning while building libvirt: ../tests/qemuxml2xmltest.c: In function =E2=80=98mymain=E2=80=99: ../tests/qemuxml2xmltest.c:132:1: note: variable tracking size limit exceed= ed with =E2=80=98-fvar-tracking-assignments=E2=80=99, retrying without 132 | mymain(void) | ^~~~~~ - Review discovered that with meson we no longer link with libnl-route-3. Meson links only with libraries that are actually required and we never used any symbol from this library so it can be dropped. - During review it was pointed out that we can refactor how meson generates html files by removing meson-html-gen.py and moving the logic directly to meson. - There was a question why we install augeas test files so we should figure out if we need to install them or it can be dropped. Here is the list of main changes done in v2, I will not list all of them as it can be easily checked in the diff: - I've reordered and changed the patches to not break git bisect. Now patch 'meson: remove automake specific directives' doesn't remove BUILD_SOURCES because that would break running 'autogen.sh'. Patch 'meson: m4: drop not relevant m4 files' was renamed to 'meson: drop remaining m4 helper files' and moved at the end of the series as it would again break running 'autogen.sh'. Patch 'meson: tests: remove '.libs' from all relevant paths' was moved in the middle of the series before adding 'src' directory into meson because it would break running 'make check'. To not break git bisect we agreed that meson will fail with error until the whole rewrite is done and we will have a temporary option 'force_incomplete_build' that will skip the error and force to run meson setup. I've added a new patch 'meson: add driver_remote option only into meson_o= ptions.txt' to break circular dependency between driver_remote and libssh, libssh2, sasl and xdr options to make meson build -Dforce_incomplete_build work properly. - We started running tests on FreeBSD which discovered an issue with meson build. Meson defines _FILE_OFFSET_BITS=3D64 all the time so I had to introduce a patch that handles this issue: 'meson: tests: virmockstathelpers: replace check for _FILE_OFFSET_BITS' - All scripts except for meson-python.sh wrapper which sets environment variables were converted from shell to python. - Removed autoconf options debug_logs, default_editor and test_suite as we will not convert them to meson. - Introduced git_werror meson option to copy the behavior of --werror option from autotools. It's not the same as with autotools but it is a close compromise. - Fixed virt-aa-helper-test which had hard-coded path to compiled virt-aa-helper binary and that failed with meson. - Correctly replace all SYSCONFDIR and RUNSTATEDIR in man pages files. - Changed the way how we run syntax-check. Instead of having single target it is now part of meson test with suite label 'syntax-checl'. We will not define sytax-check tests if building from tarball, only if we are building from git. We use git to get list of files. - Fixed all issues discovered during review with linking binaries, missing docs and cpu_map files, typos, etc. - Meson cross compile configuration files were moved to libvirt-ci. Pavel --MEatx1zidE5asLAI Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="meson-v1_meson.diff" Content-Transfer-Encoding: quoted-printable diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 623bbc82ac2..bceb1b82ba0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GIT_DEPTH: 1000 + GIT_DEPTH: 100 =20 stages: - sanity_checks @@ -453,7 +453,8 @@ codestyle: - *script_variables script: - meson build || (cat build/meson-logs/meson-log.txt && exit 1) - - ninja -C build syntax-check + - ninja -C build libvirt-pot-dep + - meson test -C build --suite syntax-check --no-rebuild || (cat build/= meson-logs/testlog.txt && exit 1) =20 =20 # This artifact published by this job is downloaded to push to Weblate @@ -492,3 +493,5 @@ check-dco: except: variables: - $CI_PROJECT_NAMESPACE =3D=3D 'libvirt' + variables: + GIT_DEPTH: 1000 diff --git a/AUTHORS.in b/AUTHORS.in index 443006640ff..f4ab42ea9f5 100644 --- a/AUTHORS.in +++ b/AUTHORS.in @@ -93,7 +93,7 @@ Stefan de Konink Takahashi Tomohiro Tatsuro Enokura =20 -#contributorslist# +@contributorslist@ =20 The libvirt logo was designed by Diana Fong =20 diff --git a/build-aux/meson.build b/build-aux/meson.build index de916793cad..1dd85b889b9 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -15,16 +15,34 @@ configure_file( configuration: syntax_check_conf, ) =20 -make_prog =3D find_program('make') +if host_machine.system() =3D=3D 'freebsd' + make_prog =3D find_program('gmake') +else + make_prog =3D find_program('make') +endif =20 -# There is no way how to pass value to -j using run_target so let's use -# it without any value to run all tests in parallel. -run_target( - 'syntax-check', - command: [ - make_prog, '-C', meson.current_build_dir(), '-j', 'syntax-check', - ], - depends: [ - potfiles_dep, - ], +rc =3D run_command( + 'sed', '-n', + 's/^\\(sc_[a-zA-Z0-9_-]*\\):.*/\\1/p', + meson.current_source_dir() / 'syntax-check.mk', + check: true, ) + +sc_tests =3D rc.stdout().strip().split() + + +# Skip syntax-check if not building from git because we get the list of fi= les +# to check using git commands and it fails if we are not in git repository= . +if git + foreach target : sc_tests + test( + target, + make_prog, + args: [ '-C', meson.current_build_dir(), target ], + depends: [ + potfiles_dep, + ], + suite: 'syntax-check', + ) + endforeach +endif diff --git a/ci/aarch64-linux-gnu.meson b/ci/aarch64-linux-gnu.meson deleted file mode 100644 index 1da8d6025c0..00000000000 --- a/ci/aarch64-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/aarch64-linux-gnu-gcc' -ar =3D '/usr/bin/aarch64-linux-gnu-gcc-ar' -strip =3D '/usr/bin/aarch64-linux-gnu-strip' -pkgconfig =3D '/usr/bin/aarch64-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'aarch64' -cpu =3D 'aarch64' -endian =3D 'little' diff --git a/ci/arm-linux-gnueabi.meson b/ci/arm-linux-gnueabi.meson deleted file mode 100644 index 9e5e06b84dc..00000000000 --- a/ci/arm-linux-gnueabi.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/arm-linux-gnueabi-gcc' -ar =3D '/usr/bin/arm-linux-gnueabi-gcc-ar' -strip =3D '/usr/bin/arm-linux-gnueabi-strip' -pkgconfig =3D '/usr/bin/arm-linux-gnueabi-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'arm' -cpu =3D 'arm' -endian =3D 'little' diff --git a/ci/arm-linux-gnueabihf.meson b/ci/arm-linux-gnueabihf.meson deleted file mode 100644 index c761707d495..00000000000 --- a/ci/arm-linux-gnueabihf.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/arm-linux-gnueabihf-gcc' -ar =3D '/usr/bin/arm-linux-gnueabihf-gcc-ar' -strip =3D '/usr/bin/arm-linux-gnueabihf-strip' -pkgconfig =3D '/usr/bin/arm-linux-gnueabihf-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'arm' -cpu =3D 'armhf' -endian =3D 'little' diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml index 6e9d2d72c48..912284b9062 100644 --- a/ci/cirrus/build.yml +++ b/ci/cirrus/build.yml @@ -15,7 +15,7 @@ build_task: - @INSTALL_COMMAND@ @PKGS@ - @PIP@ install @PYPI_PKGS@ clone_script: - - git clone --depth 1000 "$CI_REPOSITORY_URL" . + - git clone --depth 100 "$CI_REPOSITORY_URL" . - git fetch origin "$CI_COMMIT_REF_NAME" - git reset --hard "$CI_COMMIT_SHA" build_script: diff --git a/ci/containers/libvirt-debian-10-cross-aarch64.Dockerfile b/ci/= containers/libvirt-debian-10-cross-aarch64.Dockerfile index d9437bbd4dd..5e1d8c66293 100644 --- a/ci/containers/libvirt-debian-10-cross-aarch64.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-aarch64.Dockerfile @@ -109,7 +109,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:arm64 \ xfslibs-dev:arm64 && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/aarch64-linux-gnu-gcc'\nar =3D '/usr= /bin/aarch64-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/aarch64-linux-gnu-strip= '\npkgconfig =3D '/usr/bin/aarch64-linux-gnu-pkg-config'\n\n[host_machine]\= nsystem =3D 'linux'\ncpu_family =3D 'aarch64'\ncpu =3D 'aarch64'\nendian = =3D 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -124,4 +126,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "aarch64-linux-gnu" ENV CONFIGURE_OPTS "--host=3Daarch64-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/aarch64-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Daarch64-linux-gnu" diff --git a/ci/containers/libvirt-debian-10-cross-armv6l.Dockerfile b/ci/c= ontainers/libvirt-debian-10-cross-armv6l.Dockerfile index 98c550ded57..1e2d518979f 100644 --- a/ci/containers/libvirt-debian-10-cross-armv6l.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-armv6l.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:armel \ xfslibs-dev:armel && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/arm-linux-gnueabi-gcc'\nar =3D '/usr= /bin/arm-linux-gnueabi-gcc-ar'\nstrip =3D '/usr/bin/arm-linux-gnueabi-strip= '\npkgconfig =3D '/usr/bin/arm-linux-gnueabi-pkg-config'\n\n[host_machine]\= nsystem =3D 'linux'\ncpu_family =3D 'arm'\ncpu =3D 'arm'\nendian =3D 'littl= e'" > /usr/local/share/meson/cross/arm-linux-gnueabi =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "arm-linux-gnueabi" ENV CONFIGURE_OPTS "--host=3Darm-linux-gnueabi" -ENV MESON_OPTS "--cross-file=3Dci/arm-linux-gnueabi.meson" +ENV MESON_OPTS "--cross-file=3Darm-linux-gnueabi" diff --git a/ci/containers/libvirt-debian-10-cross-armv7l.Dockerfile b/ci/c= ontainers/libvirt-debian-10-cross-armv7l.Dockerfile index ff2c48d278c..b7d38aec25c 100644 --- a/ci/containers/libvirt-debian-10-cross-armv7l.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-armv7l.Dockerfile @@ -109,7 +109,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:armhf \ xfslibs-dev:armhf && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/arm-linux-gnueabihf-gcc'\nar =3D '/u= sr/bin/arm-linux-gnueabihf-gcc-ar'\nstrip =3D '/usr/bin/arm-linux-gnueabihf= -strip'\npkgconfig =3D '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\n[host_m= achine]\nsystem =3D 'linux'\ncpu_family =3D 'arm'\ncpu =3D 'armhf'\nendian = =3D 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -124,4 +126,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "arm-linux-gnueabihf" ENV CONFIGURE_OPTS "--host=3Darm-linux-gnueabihf" -ENV MESON_OPTS "--cross-file=3Dci/arm-linux-gnueabihf.meson" +ENV MESON_OPTS "--cross-file=3Darm-linux-gnueabihf" diff --git a/ci/containers/libvirt-debian-10-cross-i686.Dockerfile b/ci/con= tainers/libvirt-debian-10-cross-i686.Dockerfile index 758c81176b8..7da851b1188 100644 --- a/ci/containers/libvirt-debian-10-cross-i686.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-i686.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:i386 \ xfslibs-dev:i386 && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/i686-linux-gnu-gcc'\nar =3D '/usr/bi= n/i686-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/i686-linux-gnu-strip'\npkgcon= fig =3D '/usr/bin/i686-linux-gnu-pkg-config'\n\n[host_machine]\nsystem =3D = 'linux'\ncpu_family =3D 'x86'\ncpu =3D 'i686'\nendian =3D 'little'" > /usr/= local/share/meson/cross/i686-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "i686-linux-gnu" ENV CONFIGURE_OPTS "--host=3Di686-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/i686-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Di686-linux-gnu" diff --git a/ci/containers/libvirt-debian-10-cross-mips.Dockerfile b/ci/con= tainers/libvirt-debian-10-cross-mips.Dockerfile index 8cb3ca64da2..29af178dba8 100644 --- a/ci/containers/libvirt-debian-10-cross-mips.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-mips.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:mips \ xfslibs-dev:mips && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/mips-linux-gnu-gcc'\nar =3D '/usr/bi= n/mips-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/mips-linux-gnu-strip'\npkgcon= fig =3D '/usr/bin/mips-linux-gnu-pkg-config'\n\n[host_machine]\nsystem =3D = 'linux'\ncpu_family =3D 'mips'\ncpu =3D 'mips'\nendian =3D 'little'" > /usr= /local/share/meson/cross/mips-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "mips-linux-gnu" ENV CONFIGURE_OPTS "--host=3Dmips-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/mips-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Dmips-linux-gnu" diff --git a/ci/containers/libvirt-debian-10-cross-mips64el.Dockerfile b/ci= /containers/libvirt-debian-10-cross-mips64el.Dockerfile index 9921f65116c..b291a48f062 100644 --- a/ci/containers/libvirt-debian-10-cross-mips64el.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-mips64el.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:mips64el \ xfslibs-dev:mips64el && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/mips64el-linux-gnuabi64-gcc'\nar =3D= '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\nstrip =3D '/usr/bin/mips64el-li= nux-gnuabi64-strip'\npkgconfig =3D '/usr/bin/mips64el-linux-gnuabi64-pkg-co= nfig'\n\n[host_machine]\nsystem =3D 'linux'\ncpu_family =3D 'mips64'\ncpu = =3D 'mips64el'\nendian =3D 'little'" > /usr/local/share/meson/cross/mips64e= l-linux-gnuabi64 =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "mips64el-linux-gnuabi64" ENV CONFIGURE_OPTS "--host=3Dmips64el-linux-gnuabi64" -ENV MESON_OPTS "--cross-file=3Dci/mips64el-linux-gnuabi64.meson" +ENV MESON_OPTS "--cross-file=3Dmips64el-linux-gnuabi64" diff --git a/ci/containers/libvirt-debian-10-cross-mipsel.Dockerfile b/ci/c= ontainers/libvirt-debian-10-cross-mipsel.Dockerfile index 3f9910f63e9..a63af12213d 100644 --- a/ci/containers/libvirt-debian-10-cross-mipsel.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-mipsel.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:mipsel \ xfslibs-dev:mipsel && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/mipsel-linux-gnu-gcc'\nar =3D '/usr/= bin/mipsel-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/mipsel-linux-gnu-strip'\n= pkgconfig =3D '/usr/bin/mipsel-linux-gnu-pkg-config'\n\n[host_machine]\nsys= tem =3D 'linux'\ncpu_family =3D 'mips'\ncpu =3D 'mipsel'\nendian =3D 'littl= e'" > /usr/local/share/meson/cross/mipsel-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "mipsel-linux-gnu" ENV CONFIGURE_OPTS "--host=3Dmipsel-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/mipsel-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Dmipsel-linux-gnu" diff --git a/ci/containers/libvirt-debian-10-cross-ppc64le.Dockerfile b/ci/= containers/libvirt-debian-10-cross-ppc64le.Dockerfile index 3aef1e711e4..09477cdc0e5 100644 --- a/ci/containers/libvirt-debian-10-cross-ppc64le.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-ppc64le.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:ppc64el \ xfslibs-dev:ppc64el && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/powerpc64le-linux-gnu-gcc'\nar =3D '= /usr/bin/powerpc64le-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/powerpc64le-lin= ux-gnu-strip'\npkgconfig =3D '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\= n[host_machine]\nsystem =3D 'linux'\ncpu_family =3D 'ppc64'\ncpu =3D 'power= pc64le'\nendian =3D 'little'" > /usr/local/share/meson/cross/powerpc64le-li= nux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "powerpc64le-linux-gnu" ENV CONFIGURE_OPTS "--host=3Dpowerpc64le-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/powerpc64le-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Dpowerpc64le-linux-gnu" diff --git a/ci/containers/libvirt-debian-10-cross-s390x.Dockerfile b/ci/co= ntainers/libvirt-debian-10-cross-s390x.Dockerfile index dc2e345767a..4a688374fae 100644 --- a/ci/containers/libvirt-debian-10-cross-s390x.Dockerfile +++ b/ci/containers/libvirt-debian-10-cross-s390x.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:s390x \ xfslibs-dev:s390x && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/s390x-linux-gnu-gcc'\nar =3D '/usr/b= in/s390x-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/s390x-linux-gnu-strip'\npkg= config =3D '/usr/bin/s390x-linux-gnu-pkg-config'\n\n[host_machine]\nsystem = =3D 'linux'\ncpu_family =3D 's390x'\ncpu =3D 's390x'\nendian =3D 'little'" = > /usr/local/share/meson/cross/s390x-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "s390x-linux-gnu" ENV CONFIGURE_OPTS "--host=3Ds390x-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/s390x-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Ds390x-linux-gnu" diff --git a/ci/containers/libvirt-debian-sid-cross-aarch64.Dockerfile b/ci= /containers/libvirt-debian-sid-cross-aarch64.Dockerfile index 77f1e6e44fb..90350750522 100644 --- a/ci/containers/libvirt-debian-sid-cross-aarch64.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-aarch64.Dockerfile @@ -109,7 +109,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:arm64 \ xfslibs-dev:arm64 && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/aarch64-linux-gnu-gcc'\nar =3D '/usr= /bin/aarch64-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/aarch64-linux-gnu-strip= '\npkgconfig =3D '/usr/bin/aarch64-linux-gnu-pkg-config'\n\n[host_machine]\= nsystem =3D 'linux'\ncpu_family =3D 'aarch64'\ncpu =3D 'aarch64'\nendian = =3D 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -124,4 +126,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "aarch64-linux-gnu" ENV CONFIGURE_OPTS "--host=3Daarch64-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/aarch64-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Daarch64-linux-gnu" diff --git a/ci/containers/libvirt-debian-sid-cross-armv6l.Dockerfile b/ci/= containers/libvirt-debian-sid-cross-armv6l.Dockerfile index ee09125fffd..7de3084662f 100644 --- a/ci/containers/libvirt-debian-sid-cross-armv6l.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-armv6l.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:armel \ xfslibs-dev:armel && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/arm-linux-gnueabi-gcc'\nar =3D '/usr= /bin/arm-linux-gnueabi-gcc-ar'\nstrip =3D '/usr/bin/arm-linux-gnueabi-strip= '\npkgconfig =3D '/usr/bin/arm-linux-gnueabi-pkg-config'\n\n[host_machine]\= nsystem =3D 'linux'\ncpu_family =3D 'arm'\ncpu =3D 'arm'\nendian =3D 'littl= e'" > /usr/local/share/meson/cross/arm-linux-gnueabi =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "arm-linux-gnueabi" ENV CONFIGURE_OPTS "--host=3Darm-linux-gnueabi" -ENV MESON_OPTS "--cross-file=3Dci/arm-linux-gnueabi.meson" +ENV MESON_OPTS "--cross-file=3Darm-linux-gnueabi" diff --git a/ci/containers/libvirt-debian-sid-cross-armv7l.Dockerfile b/ci/= containers/libvirt-debian-sid-cross-armv7l.Dockerfile index fbcf73fe7f9..e868b07c51a 100644 --- a/ci/containers/libvirt-debian-sid-cross-armv7l.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-armv7l.Dockerfile @@ -109,7 +109,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:armhf \ xfslibs-dev:armhf && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/arm-linux-gnueabihf-gcc'\nar =3D '/u= sr/bin/arm-linux-gnueabihf-gcc-ar'\nstrip =3D '/usr/bin/arm-linux-gnueabihf= -strip'\npkgconfig =3D '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\n[host_m= achine]\nsystem =3D 'linux'\ncpu_family =3D 'arm'\ncpu =3D 'armhf'\nendian = =3D 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -124,4 +126,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "arm-linux-gnueabihf" ENV CONFIGURE_OPTS "--host=3Darm-linux-gnueabihf" -ENV MESON_OPTS "--cross-file=3Dci/arm-linux-gnueabihf.meson" +ENV MESON_OPTS "--cross-file=3Darm-linux-gnueabihf" diff --git a/ci/containers/libvirt-debian-sid-cross-i686.Dockerfile b/ci/co= ntainers/libvirt-debian-sid-cross-i686.Dockerfile index 5d94848a3af..bdc37608085 100644 --- a/ci/containers/libvirt-debian-sid-cross-i686.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-i686.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:i386 \ xfslibs-dev:i386 && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/i686-linux-gnu-gcc'\nar =3D '/usr/bi= n/i686-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/i686-linux-gnu-strip'\npkgcon= fig =3D '/usr/bin/i686-linux-gnu-pkg-config'\n\n[host_machine]\nsystem =3D = 'linux'\ncpu_family =3D 'x86'\ncpu =3D 'i686'\nendian =3D 'little'" > /usr/= local/share/meson/cross/i686-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "i686-linux-gnu" ENV CONFIGURE_OPTS "--host=3Di686-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/i686-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Di686-linux-gnu" diff --git a/ci/containers/libvirt-debian-sid-cross-mips64el.Dockerfile b/c= i/containers/libvirt-debian-sid-cross-mips64el.Dockerfile index b42c599cb46..0ed85cd5755 100644 --- a/ci/containers/libvirt-debian-sid-cross-mips64el.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-mips64el.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:mips64el \ xfslibs-dev:mips64el && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/mips64el-linux-gnuabi64-gcc'\nar =3D= '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\nstrip =3D '/usr/bin/mips64el-li= nux-gnuabi64-strip'\npkgconfig =3D '/usr/bin/mips64el-linux-gnuabi64-pkg-co= nfig'\n\n[host_machine]\nsystem =3D 'linux'\ncpu_family =3D 'mips64'\ncpu = =3D 'mips64el'\nendian =3D 'little'" > /usr/local/share/meson/cross/mips64e= l-linux-gnuabi64 =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "mips64el-linux-gnuabi64" ENV CONFIGURE_OPTS "--host=3Dmips64el-linux-gnuabi64" -ENV MESON_OPTS "--cross-file=3Dci/mips64el-linux-gnuabi64.meson" +ENV MESON_OPTS "--cross-file=3Dmips64el-linux-gnuabi64" diff --git a/ci/containers/libvirt-debian-sid-cross-mipsel.Dockerfile b/ci/= containers/libvirt-debian-sid-cross-mipsel.Dockerfile index b076c7d2cd2..580d3170e73 100644 --- a/ci/containers/libvirt-debian-sid-cross-mipsel.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-mipsel.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:mipsel \ xfslibs-dev:mipsel && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/mipsel-linux-gnu-gcc'\nar =3D '/usr/= bin/mipsel-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/mipsel-linux-gnu-strip'\n= pkgconfig =3D '/usr/bin/mipsel-linux-gnu-pkg-config'\n\n[host_machine]\nsys= tem =3D 'linux'\ncpu_family =3D 'mips'\ncpu =3D 'mipsel'\nendian =3D 'littl= e'" > /usr/local/share/meson/cross/mipsel-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "mipsel-linux-gnu" ENV CONFIGURE_OPTS "--host=3Dmipsel-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/mipsel-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Dmipsel-linux-gnu" diff --git a/ci/containers/libvirt-debian-sid-cross-ppc64le.Dockerfile b/ci= /containers/libvirt-debian-sid-cross-ppc64le.Dockerfile index aece53541b7..d1d401c8eb4 100644 --- a/ci/containers/libvirt-debian-sid-cross-ppc64le.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-ppc64le.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:ppc64el \ xfslibs-dev:ppc64el && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/powerpc64le-linux-gnu-gcc'\nar =3D '= /usr/bin/powerpc64le-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/powerpc64le-lin= ux-gnu-strip'\npkgconfig =3D '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\= n[host_machine]\nsystem =3D 'linux'\ncpu_family =3D 'ppc64'\ncpu =3D 'power= pc64le'\nendian =3D 'little'" > /usr/local/share/meson/cross/powerpc64le-li= nux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "powerpc64le-linux-gnu" ENV CONFIGURE_OPTS "--host=3Dpowerpc64le-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/powerpc64le-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Dpowerpc64le-linux-gnu" diff --git a/ci/containers/libvirt-debian-sid-cross-s390x.Dockerfile b/ci/c= ontainers/libvirt-debian-sid-cross-s390x.Dockerfile index 9cf7081aaa0..6bd7eb6a4c3 100644 --- a/ci/containers/libvirt-debian-sid-cross-s390x.Dockerfile +++ b/ci/containers/libvirt-debian-sid-cross-s390x.Dockerfile @@ -108,7 +108,9 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libyajl-dev:s390x \ xfslibs-dev:s390x && \ apt-get autoremove -y && \ - apt-get autoclean -y + apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\nc =3D '/usr/bin/s390x-linux-gnu-gcc'\nar =3D '/usr/b= in/s390x-linux-gnu-gcc-ar'\nstrip =3D '/usr/bin/s390x-linux-gnu-strip'\npkg= config =3D '/usr/bin/s390x-linux-gnu-pkg-config'\n\n[host_machine]\nsystem = =3D 'linux'\ncpu_family =3D 's390x'\ncpu =3D 's390x'\nendian =3D 'little'" = > /usr/local/share/meson/cross/s390x-linux-gnu =20 RUN pip3 install \ meson=3D=3D0.54.0 @@ -123,4 +125,4 @@ ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" =20 ENV ABI "s390x-linux-gnu" ENV CONFIGURE_OPTS "--host=3Ds390x-linux-gnu" -ENV MESON_OPTS "--cross-file=3Dci/s390x-linux-gnu.meson" +ENV MESON_OPTS "--cross-file=3Ds390x-linux-gnu" diff --git a/ci/i686-linux-gnu.meson b/ci/i686-linux-gnu.meson deleted file mode 100644 index 638113e1d21..00000000000 --- a/ci/i686-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/i686-linux-gnu-gcc' -ar =3D '/usr/bin/i686-linux-gnu-gcc-ar' -strip =3D '/usr/bin/i686-linux-gnu-strip' -pkgconfig =3D '/usr/bin/i686-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'x86' -cpu =3D 'i686' -endian =3D 'little' diff --git a/ci/mips-linux-gnu.meson b/ci/mips-linux-gnu.meson deleted file mode 100644 index 2c4c21c1e02..00000000000 --- a/ci/mips-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/mips-linux-gnu-gcc' -ar =3D '/usr/bin/mips-linux-gnu-gcc-ar' -strip =3D '/usr/bin/mips-linux-gnu-strip' -pkgconfig =3D '/usr/bin/mips-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'mips' -cpu =3D 'mips' -endian =3D 'little' diff --git a/ci/mips64el-linux-gnuabi64.meson b/ci/mips64el-linux-gnuabi64.= meson deleted file mode 100644 index 459c8154d7b..00000000000 --- a/ci/mips64el-linux-gnuabi64.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/mips64el-linux-gnuabi64-gcc' -ar =3D '/usr/bin/mips64el-linux-gnuabi64-gcc-ar' -strip =3D '/usr/bin/mips64el-linux-gnuabi64-strip' -pkgconfig =3D '/usr/bin/mips64el-linux-gnuabi64-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'mips64' -cpu =3D 'mips64el' -endian =3D 'little' diff --git a/ci/mipsel-linux-gnu.meson b/ci/mipsel-linux-gnu.meson deleted file mode 100644 index 308bda511ee..00000000000 --- a/ci/mipsel-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/mipsel-linux-gnu-gcc' -ar =3D '/usr/bin/mipsel-linux-gnu-gcc-ar' -strip =3D '/usr/bin/mipsel-linux-gnu-strip' -pkgconfig =3D '/usr/bin/mipsel-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'mips' -cpu =3D 'mipsel' -endian =3D 'little' diff --git a/ci/powerpc64le-linux-gnu.meson b/ci/powerpc64le-linux-gnu.meso= n deleted file mode 100644 index 9a151e2c12f..00000000000 --- a/ci/powerpc64le-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/powerpc64le-linux-gnu-gcc' -ar =3D '/usr/bin/powerpc64le-linux-gnu-gcc-ar' -strip =3D '/usr/bin/powerpc64le-linux-gnu-strip' -pkgconfig =3D '/usr/bin/powerpc64le-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 'ppc64' -cpu =3D 'powerpc64le' -endian =3D 'little' diff --git a/ci/s390x-linux-gnu.meson b/ci/s390x-linux-gnu.meson deleted file mode 100644 index 28a292c7203..00000000000 --- a/ci/s390x-linux-gnu.meson +++ /dev/null @@ -1,11 +0,0 @@ -[binaries] -c =3D '/usr/bin/s390x-linux-gnu-gcc' -ar =3D '/usr/bin/s390x-linux-gnu-gcc-ar' -strip =3D '/usr/bin/s390x-linux-gnu-strip' -pkgconfig =3D '/usr/bin/s390x-linux-gnu-pkg-config' - -[host_machine] -system =3D 'linux' -cpu_family =3D 's390x' -cpu =3D 's390x' -endian =3D 'little' diff --git a/docs/advanced-tests.rst b/docs/advanced-tests.rst index c8c02eabe06..bc20bbf4d9e 100644 --- a/docs/advanced-tests.rst +++ b/docs/advanced-tests.rst @@ -7,7 +7,6 @@ The basic requirement before submitting changes to libvirt = is that :: =20 $ ninja test - $ ninja syntax-check =20 succeed after each commit. =20 diff --git a/docs/best-practices.rst b/docs/best-practices.rst index b2572c81100..8283f627cea 100644 --- a/docs/best-practices.rst +++ b/docs/best-practices.rst @@ -25,9 +25,8 @@ with minimal back-and-forth. self-contained if possible, with an explanation of each patch and an explanation of how the sequence of patches fits together. Moreover, please keep in mind that it's required to - be able to compile cleanly (**including** - ``ninja test`` and ``ninja syntax-check``) after each - patch. A feature does not have to work until the end of a + be able to compile cleanly (**including** ``ninja test``) after + each patch. A feature does not have to work until the end of a series, but intermediate patches must compile and not cause test-suite failures (this is to preserve the usefulness of ``git bisect``, among other things). diff --git a/docs/committer-guidelines.rst b/docs/committer-guidelines.rst index 1f879ddf934..d2c530d8952 100644 --- a/docs/committer-guidelines.rst +++ b/docs/committer-guidelines.rst @@ -12,8 +12,8 @@ objection on the list it should be good to go. If the pat= ch touches a part of the code where you're not the main maintainer, or where you do not have a very clear idea of how things work, it's better to wait for a more authoritative feedback though. -Before committing, please also rebuild locally, run 'ninja test -syntax-check', and make sure you don't raise errors. +Before committing, please also rebuild locally, run 'ninja test', +and make sure you don't raise errors. =20 An exception to 'review and approval on the list first' is fixing failures to build: @@ -21,11 +21,10 @@ failures to build: - if a recently committed patch breaks compilation on a platform or for a given driver, then it's fine to commit a minimal fix directly without getting the review feedback first -- if ninja test or ninja syntax-check breaks, if there is an - obvious fix, it's fine to commit immediately. The patch should - still be sent to the list (or tell what the fix was if - trivial), and 'ninja test syntax-check' should pass too, before - committing anything +- if ninja test breaks, if there is an obvious fix, it's fine to + commit immediately. The patch should still be sent to the list + (or tell what the fix was if trivial), and 'ninja test' should + pass too, before committing anything - fixes for documentation and code comments can be managed in the same way, but still make sure they get reviewed if non-trivial. - (ir)regular pulls from other repositories or automated updates, diff --git a/docs/hacking.rst b/docs/hacking.rst index 4a9a1e19565..3fc5888a712 100644 --- a/docs/hacking.rst +++ b/docs/hacking.rst @@ -31,7 +31,6 @@ changes. That is: :: =20 $ ninja test - $ ninja syntax-check =20 These tests help making sure that your changes don't introduce regressions in libvirt, as well as validating that any new code diff --git a/docs/internals/meson.build b/docs/internals/meson.build index e600c84af60..18fd6620d49 100644 --- a/docs/internals/meson.build +++ b/docs/internals/meson.build @@ -15,7 +15,8 @@ foreach name : internals_in_files output: html_file, command: [ meson_python_prog, - meson_html_gen_prog, + python3_prog.path(), + meson_html_gen_prog.path(), xsltproc_prog.path(), xmllint_prog.path(), meson.build_root(), diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index d46289245b2..a964e999f7d 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -1,6 +1,8 @@ docs_kbase_files =3D [ 'backing_chains', 'domainstatecapture', + 'incrementalbackupinternals', + 'kvm-realtime', 'launch_security_sev', 'locking-lockd', 'locking', @@ -8,6 +10,7 @@ docs_kbase_files =3D [ 'migrationinternals', 'qemu-passthrough-security', 'rpm-deployment', + 's390_protected_virt', 'secureusage', 'virtiofs', ] @@ -24,7 +27,8 @@ foreach name : docs_kbase_files output: html_file, command: [ meson_python_prog, - meson_html_gen_prog, + python3_prog.path(), + meson_html_gen_prog.path(), xsltproc_prog.path(), xmllint_prog.path(), meson.build_root(), diff --git a/docs/logging.html.in b/docs/logging.html.in index b4e7d0c3864..3ff0dd3eb67 100644 --- a/docs/logging.html.in +++ b/docs/logging.html.in @@ -209,7 +209,7 @@ $ journalctl MESSAGE_ID=3D8ae2f3fb-2dbe-498e-8fbd-012d4= 0afa361 --output=3Djson "LIBVIRT_QEMU_BINARY" : "/bin/qemu-system-xtensa", "MESSAGE" : "Failed to probe capabilities for /bin/qemu-system-xtensa:" = \ "internal error: Child process (LC_ALL=3DC LD_LIBRARY_PATH= =3D/home/berrange" \ - "/src/virt/libvirt/src PATH=3D/usr/lib64/ccache:/usr/local/s= bin:" \ + "/src/virt/libvirt/src/.libs PATH=3D/usr/lib64/ccache:/usr/l= ocal/sbin:" \ "/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin HOME= =3D/root " \ "USER=3Droot LOGNAME=3Droot /bin/qemu-system-xtensa -help) u= nexpected " \ "exit status 127: /bin/qemu-system-xtensa: error while loadi= ng shared " \ diff --git a/docs/manpages/index.rst.in b/docs/manpages/index.rst similarity index 100% rename from docs/manpages/index.rst.in rename to docs/manpages/index.rst diff --git a/docs/manpages/libvirtd.rst.in b/docs/manpages/libvirtd.rst similarity index 93% rename from docs/manpages/libvirtd.rst.in rename to docs/manpages/libvirtd.rst index 4125604f9ad..c88e2dd7e17 100644 --- a/docs/manpages/libvirtd.rst.in +++ b/docs/manpages/libvirtd.rst @@ -131,29 +131,29 @@ FILES When run as *root* ------------------ =20 -* ``SYSCONFDIR/libvirt/libvirtd.conf`` +* ``@SYSCONFDIR@/libvirt/libvirtd.conf`` =20 The default configuration file used by libvirtd, unless overridden on the command line using the ``-f`` | ``--config`` option. =20 -* ``RUNSTATEDIR/libvirt/libvirt-sock`` -* ``RUNSTATEDIR/libvirt/libvirt-sock-ro`` +* ``@RUNSTATEDIR@/libvirt/libvirt-sock`` +* ``@RUNSTATEDIR@/libvirt/libvirt-sock-ro`` =20 The sockets libvirtd will use. =20 -* ``SYSCONFDIR/pki/CA/cacert.pem`` +* ``@SYSCONFDIR@/pki/CA/cacert.pem`` =20 The TLS **Certificate Authority** certificate libvirtd will use. =20 -* ``SYSCONFDIR/pki/libvirt/servercert.pem`` +* ``@SYSCONFDIR@/pki/libvirt/servercert.pem`` =20 The TLS **Server** certificate libvirtd will use. =20 -* ``SYSCONFDIR/pki/libvirt/private/serverkey.pem`` +* ``@SYSCONFDIR@/pki/libvirt/private/serverkey.pem`` =20 The TLS **Server** private key libvirtd will use. =20 -* ``RUNSTATEDIR/libvirtd.pid`` +* ``@RUNSTATEDIR@/libvirtd.pid`` =20 The PID file to use, unless overridden by the ``-p`` | ``--pid-file`` opti= on. =20 @@ -210,8 +210,8 @@ To start libvirtd, instructing it to daemonize and crea= te a PID file: .. code-block:: =20 # libvirtd -d - # ls -la RUNSTATEDIR/libvirtd.pid - -rw-r--r-- 1 root root 6 Jul 9 02:40 RUNSTATEDIR/libvirtd.pid + # ls -la @RUNSTATEDIR@/libvirtd.pid + -rw-r--r-- 1 root root 6 Jul 9 02:40 @RUNSTATEDIR@/libvirtd.pid =20 =20 BUGS diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index c53109c8d29..d07af810e6e 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -28,7 +28,7 @@ foreach name : keycode_list input: keymap_src_file, output: 'virkeycode-@0@.rst'.format(name), command: [ - meson_python_prog, python3_prog, keymap_gen_prog, 'code-docs', + meson_python_prog, python3_prog.path(), keymap_gen_prog.path(), 'cod= e-docs', '--lang', 'rst', '--title', 'virkeycode-@0@'.format(name), '--subtitle', 'Key code values for @0@'.format(name), @@ -49,7 +49,7 @@ foreach name : keyname_list input: keymap_src_file, output: 'virkeyname-@0@.rst'.format(name), command: [ - meson_python_prog, python3_prog, keymap_gen_prog, 'name-docs', + meson_python_prog, python3_prog.path(), keymap_gen_prog.path(), 'nam= e-docs', '--lang', 'rst', '--title', 'virkeyname-@0@'.format(name), '--subtitle', 'Key name values for @0@'.format(name), @@ -69,7 +69,7 @@ docs_man_conf.set('SYSCONFDIR', sysconfdir) docs_man_conf.set('RUNSTATEDIR', runstatedir) =20 foreach data : docs_man_files - rst_in_file =3D '@0@.rst.in'.format(data['name']) + rst_in_file =3D '@0@.rst'.format(data['name']) html_in_file =3D '@0@.html.in'.format(data['name']) html_file =3D '@0@.html'.format(data['name']) =20 @@ -109,7 +109,8 @@ foreach data : docs_man_files output: html_file, command: [ meson_python_prog, - meson_html_gen_prog, + python3_prog.path(), + meson_html_gen_prog.path(), xsltproc_prog.path(), xmllint_prog.path(), meson.build_root(), diff --git a/docs/manpages/virsh.rst.in b/docs/manpages/virsh.rst similarity index 100% rename from docs/manpages/virsh.rst.in rename to docs/manpages/virsh.rst diff --git a/docs/manpages/virt-admin.rst.in b/docs/manpages/virt-admin.rst similarity index 100% rename from docs/manpages/virt-admin.rst.in rename to docs/manpages/virt-admin.rst diff --git a/docs/manpages/virt-host-validate.rst.in b/docs/manpages/virt-h= ost-validate.rst similarity index 100% rename from docs/manpages/virt-host-validate.rst.in rename to docs/manpages/virt-host-validate.rst diff --git a/docs/manpages/virt-login-shell.rst.in b/docs/manpages/virt-log= in-shell.rst similarity index 100% rename from docs/manpages/virt-login-shell.rst.in rename to docs/manpages/virt-login-shell.rst diff --git a/docs/manpages/virt-pki-validate.rst.in b/docs/manpages/virt-pk= i-validate.rst similarity index 100% rename from docs/manpages/virt-pki-validate.rst.in rename to docs/manpages/virt-pki-validate.rst diff --git a/docs/manpages/virt-qemu-run.rst.in b/docs/manpages/virt-qemu-r= un.rst similarity index 100% rename from docs/manpages/virt-qemu-run.rst.in rename to docs/manpages/virt-qemu-run.rst diff --git a/docs/manpages/virt-sanlock-cleanup.rst.in b/docs/manpages/virt= -sanlock-cleanup.rst similarity index 100% rename from docs/manpages/virt-sanlock-cleanup.rst.in rename to docs/manpages/virt-sanlock-cleanup.rst diff --git a/docs/manpages/virt-xml-validate.rst.in b/docs/manpages/virt-xm= l-validate.rst similarity index 100% rename from docs/manpages/virt-xml-validate.rst.in rename to docs/manpages/virt-xml-validate.rst diff --git a/docs/manpages/virtlockd.rst.in b/docs/manpages/virtlockd.rst similarity index 94% rename from docs/manpages/virtlockd.rst.in rename to docs/manpages/virtlockd.rst index 1dc106d6fca..ea37b25d05d 100644 --- a/docs/manpages/virtlockd.rst.in +++ b/docs/manpages/virtlockd.rst @@ -79,16 +79,16 @@ FILES When run as *root* ------------------ =20 -* ``SYSCONFDIR/libvirt/virtlockd.conf`` +* ``@SYSCONFDIR@/libvirt/virtlockd.conf`` =20 The default configuration file used by ``virtlockd``, unless overridden on= the command line using the ``-f`` | ``--config`` option. =20 -* ``RUNSTATEDIR/libvirt/virtlockd-sock`` +* ``@RUNSTATEDIR@/libvirt/virtlockd-sock`` =20 The sockets ``virtlockd`` will use. =20 -* ``RUNSTATEDIR/virtlockd.pid`` +* ``@RUNSTATEDIR@/virtlockd.pid`` =20 The PID file to use, unless overridden by the ``-p`` | ``--pid-file`` opti= on. =20 @@ -130,8 +130,8 @@ To start ``virtlockd``, instructing it to daemonize and= create a PID file: .. code-block:: =20 # virtlockd -d - # ls -la RUNSTATEDIR/virtlockd.pid - -rw-r--r-- 1 root root 6 Jul 9 02:40 RUNSTATEDIR/virtlockd.pid + # ls -la @RUNSTATEDIR@/virtlockd.pid + -rw-r--r-- 1 root root 6 Jul 9 02:40 @RUNSTATEDIR@/virtlockd.pid =20 BUGS =3D=3D=3D=3D diff --git a/docs/manpages/virtlogd.rst.in b/docs/manpages/virtlogd.rst similarity index 94% rename from docs/manpages/virtlogd.rst.in rename to docs/manpages/virtlogd.rst index c84ab2e6219..edf8288230e 100644 --- a/docs/manpages/virtlogd.rst.in +++ b/docs/manpages/virtlogd.rst @@ -80,16 +80,16 @@ FILES When run as *root* ------------------ =20 -* ``SYSCONFDIR/libvirt/virtlogd.conf`` +* ``@SYSCONFDIR@/libvirt/virtlogd.conf`` =20 The default configuration file used by ``virtlogd``, unless overridden on = the command line using the ``-f`` | ``--config`` option. =20 -* ``RUNSTATEDIR/libvirt/virtlogd-sock`` +* ``@RUNSTATEDIR@/libvirt/virtlogd-sock`` =20 The sockets ``virtlogd`` will use. =20 -* ``RUNSTATEDIR/virtlogd.pid`` +* ``@RUNSTATEDIR@/virtlogd.pid`` =20 The PID file to use, unless overridden by the ``-p`` | ``--pid-file`` opti= on. =20 @@ -131,8 +131,8 @@ To start ``virtlogd``, instructing it to daemonize and = create a PID file: .. code-block:: =20 # virtlogd -d - # ls -la RUNSTATEDIR/virtlogd.pid - -rw-r--r-- 1 root root 6 Jul 9 02:40 RUNSTATEDIR/virtlogd.pid + # ls -la @RUNSTATEDIR@/virtlogd.pid + -rw-r--r-- 1 root root 6 Jul 9 02:40 @RUNSTATEDIR@/virtlogd.pid =20 =20 BUGS diff --git a/docs/meson.build b/docs/meson.build index 773e127ca74..1d24f2a9e2c 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -140,12 +140,14 @@ aclperms_gen =3D custom_target( input: access_perm_h, output: 'aclperms.htmlinc', command: [ - meson_python_prog, genaclperms_prog, '@INPUT@', + meson_python_prog, python3_prog.path(), genaclperms_prog.path(), '@INP= UT@', ], capture: true, ) =20 -docs_timestamp =3D run_command(meson_timestamp_prog).stdout() +docs_timestamp =3D run_command( + python3_prog, meson_timestamp_prog.path(), env: runutf8 +).stdout().strip() =20 site_xsl =3D files('site.xsl') subsite_xsl =3D files('subsite.xsl') @@ -161,8 +163,7 @@ docs_api_generated =3D custom_target( 'libvirt-admin-api.xml', ], command: [ - meson_python_prog, - apibuild_prog, + meson_python_prog, python3_prog.path(), apibuild_prog.path(), meson.current_source_dir(), meson.current_build_dir(), ], @@ -201,7 +202,8 @@ foreach name : docs_html_in_files output: html_file, command: [ meson_python_prog, - meson_html_gen_prog, + python3_prog.path(), + meson_html_gen_prog.path(), xsltproc_prog.path(), xmllint_prog.path(), meson.build_root(), @@ -240,7 +242,8 @@ hvsupport_html_in =3D custom_target( output: 'hvsupport.html.in', command: [ meson_python_prog, - hvsupport_prog, + python3_prog.path(), + hvsupport_prog.path(), meson.source_root(), meson.build_root(), ], @@ -275,7 +278,8 @@ foreach data : docs_html_in_gen output: html_file, command: [ meson_python_prog, - meson_html_gen_prog, + python3_prog.path(), + meson_html_gen_prog.path(), xsltproc_prog.path(), xmllint_prog.path(), meson.build_root(), @@ -314,6 +318,9 @@ endforeach =20 run_target( 'install-web', - command: [ meson_python_prog, meson_install_web_prog.path(), install_web= _files ], + command: [ + meson_python_prog, python3_prog.path(), meson_install_web_prog.path(), + install_web_files, + ], depends: install_web_deps, ) diff --git a/libvirt.spec.in b/libvirt.spec.in index d7450acc399..e64cfdb561e 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -259,6 +259,8 @@ BuildRequires: python36-docutils BuildRequires: python3-docutils %endif BuildRequires: gcc +BuildRequires: meson >=3D 0.54.0 +BuildRequires: ninja-build BuildRequires: make BuildRequires: git %if 0%{?fedora} || 0%{?rhel} > 7 @@ -1279,7 +1281,7 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvir= t_qemu_probes.stp \ %endif =20 %check -VIR_TEST_DEBUG=3D1 %meson_test +VIR_TEST_DEBUG=3D1 %meson_test --no-suite syntax-check =20 %post libs %if 0%{?rhel} =3D=3D 7 diff --git a/meson.build b/meson.build index 4e43a526cc6..772708946b1 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,7 @@ project( =20 git =3D run_command('test', '-d', '.git').returncode() =3D=3D 0 =20 -if git and not get_option('no-git') +if git and not get_option('no_git') run_command('git', 'submodule', 'update', '--init') endif =20 @@ -127,8 +127,6 @@ endif =20 # test options =20 -use_test_suite =3D get_option('test_suite') - if get_option('expensive_tests').auto() use_expensive_tests =3D not git else @@ -144,7 +142,8 @@ if get_option('test_coverage') endif =20 =20 -# Detect when running under the +# Detect when running under the clang static analyzer's scan-build driver +# or Coverity-prevent's cov-build. Define STATIC_ANALYSIS accordingly. =20 rc =3D run_command( 'sh', '-c', @@ -205,8 +204,14 @@ libvirt_lib_version =3D '@0@.@1@.@2@'.format(libvirt_s= o_version, libvirt_age, libv # check compile flags =20 cc =3D meson.get_compiler('c') +cc_flags =3D [] =20 -cc_flags =3D [ +git_werror =3D get_option('git_werror') +if git_werror.enabled() or git_werror.auto() and git + cc_flags +=3D [ '-Werror' ] +endif + +cc_flags +=3D [ '-fno-common', '-W', '-Wabsolute-value', @@ -360,7 +365,7 @@ size_max =3D cc.sizeof('size_t', prefix: '#include ') # in order to convert it to numbers to be able to pick the smaller one. alloc_max =3D run_command( 'python3', '-c', - 'print(min(2**@0@ - 1, 2**@1@ - 1))'.format(ptrdiff_max * 8 - 1, size_ma= x * 8), + 'print(min(2**(@0@ * 8 - 1) - 1, 2**(@1@ * 8) - 1))'.format(ptrdiff_max,= size_max), ) cc_flags +=3D [ '-Walloc-size-larger-than=3D@0@'.format(alloc_max.stdout().strip()), @@ -390,7 +395,8 @@ cc_flags +=3D [ # We don't use -Wc++-compat so we have to enable it explicitly '-Wjump-misses-init', =20 - # TODO comment + # -Wswitch is enabled but that doesn't report missing enums if a default= : + # is present '-Wswitch-enum', =20 # -Wformat=3D2 implies -Wformat-nonliteral so we need to manually exclud= e it @@ -419,13 +425,9 @@ cc_flags +=3D [ '-Wno-suggest-attribute=3Dconst', ] =20 -if git - cc_flags +=3D [ '-Werror' ] -endif - # on aarch64 error: -fstack-protector not supported for this target if host_machine.cpu_family() !=3D 'aarch64' - if host_machine.system() in [ 'linux', 'freebsd' ] + if host_machine.system() in [ 'linux', 'freebsd', 'windows' ] # we prefer -fstack-protector-strong but fallback to -fstack-protector= -all fstack_cflags =3D cc.first_supported_argument([ '-fstack-protector-strong', @@ -623,7 +625,7 @@ libvirt_export_dynamic =3D cc.first_supported_link_argu= ment([ ]) =20 =20 -# check availability of various common functions (non-fatal i missing) +# check availability of various common functions (non-fatal if missing) =20 functions =3D [ '__lxstat', @@ -789,7 +791,7 @@ if host_machine.system() =3D=3D 'linux' endif =20 foreach symbol : symbols - if cc.has_header_symbol(symbol[0], symbol[1]) + if cc.has_header_symbol(symbol[0], symbol[1], args: '-D_GNU_SOURCE') conf.set('HAVE_DECL_@0@'.format(symbol[1].to_upper()), 1) endif endforeach @@ -958,7 +960,7 @@ else acl_dep =3D dependency('', required: false) endif =20 -apparmor_dep =3D cc.find_library('AppArmor', required: get_option('apparmo= r')) +apparmor_dep =3D dependency('libapparmor', required: get_option('apparmor'= )) if apparmor_dep.found() conf.set('WITH_APPARMOR', 1) conf.set_quoted('APPARMOR_DIR', '/etc/apparmor.d') @@ -966,6 +968,9 @@ if apparmor_dep.found() endif =20 attr_dep =3D cc.find_library('attr', required: get_option('attr')) +if attr_dep.found() + conf.set('HAVE_LIBATTR', 1) +endif =20 audit_dep =3D cc.find_library('audit', required: get_option('audit')) if audit_dep.found() @@ -1124,6 +1129,8 @@ if get_option('driver_remote').enabled() if libssh_dep.found() conf.set('WITH_LIBSSH', 1) =20 + # Check if new functions exists, if not redefine them with old depreca= ted ones. + # List of [ new_function, deprecated_function ]. functions =3D [ [ 'ssh_get_server_publickey', 'ssh_get_publickey' ], [ 'ssh_session_is_known_server', 'ssh_is_server_known' ], @@ -2066,12 +2073,6 @@ if chrdev_lock_files !=3D '' conf.set_quoted('VIR_CHRDEV_LOCK_FILE_PATH', chrdev_lock_files) endif =20 -if get_option('debug_logs') - conf.set('ENABLE_DEBUG', 1) -endif - -conf.set_quoted('DEFAULT_EDITOR', get_option('default_editor')) - driver_modules_flags =3D [] if conf.has('WITH_LIBVIRTD') if not conf.has('HAVE_DLFCN_H') or not dlopen_dep.found() @@ -2107,6 +2108,14 @@ else init_script =3D get_option('init_script') endif =20 +loader_nvram =3D get_option('loader_nvram') +if loader_nvram !=3D '' + if (loader_nvram.split(':').length() % 2) !=3D 0 + error('Malformed loader_nvram option') + endif + conf.set_quoted('DEFAULT_LOADER_NVRAM', loader_nvram) +endif + if not get_option('login_shell').disabled() and host_machine.system() =3D= =3D 'linux' conf.set('WITH_LOGIN_SHELL', 1) elif get_option('login_shell').enabled() @@ -2271,7 +2280,7 @@ if git ) endforeach =20 - authors =3D run_command(meson_gen_authors_prog) + authors =3D run_command(python3_prog, meson_gen_authors_prog.path(), env= : runutf8) authors_file =3D 'AUTHORS.in' =20 authors_conf =3D configuration_data() @@ -2290,7 +2299,10 @@ if git ] =20 foreach file : dist_files - meson.add_dist_script(meson_dist_prog.path(), meson.build_root(), file= ) + meson.add_dist_script( + meson_python_prog.path(), python3_prog.path(), meson_dist_prog.path(= ), + meson.build_root(), file + ) endforeach endif =20 @@ -2307,7 +2319,7 @@ configure_file( output: 'run', configuration: run_conf, ) -run_command('scripts/meson-change-perms.sh', 'a+x', 'run') +run_command('chmod', 'a+x', meson.current_build_dir() / 'run') =20 =20 # generate developer tooling files @@ -2435,15 +2447,19 @@ test_summary =3D { } summary(test_summary, section: 'Test suite', bool_yn: true) =20 +if conf.has('DEFAULT_LOADER_NVRAM') + loader_res =3D '@0@ !!! Using this configure option is strongly discoura= ged !!!'.format(conf.get_unquoted('DEFAULT_LOADER_NVRAM')) +else + loader_res =3D '' +endif misc_summary =3D { - 'Debug': conf.has('ENABLE_DEBUG'), 'Use -Werror': cc_flags.contains('-Werror'), 'Warning Flags': supported_cc_flags, 'DTrace': conf.has('WITH_DTRACE_PROBES'), 'numad': conf.has('HAVE_NUMAD'), 'Init script': init_script, 'Char device locks': chrdev_lock_files, - 'Default Editor': conf.get_unquoted('DEFAULT_EDITOR'), + 'Loader/NVRAM': loader_res, 'virt-login-shell': conf.has('WITH_LOGIN_SHELL'), 'virt-host-validate': conf.has('WITH_HOST_VALIDATE'), 'TLS priority': conf.get_unquoted('TLS_PRIORITY'), diff --git a/meson_options.txt b/meson_options.txt index dbbacf7e8ff..a1bb6505b8c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,11 +1,11 @@ -option('no-git', type: 'boolean', value: false, description: 'Disable git = submodule update') +option('no_git', type: 'boolean', value: false, description: 'Disable git = submodule update') option('packager', type: 'string', value: '', description: 'Extra packager= name') option('packager_version', type: 'string', value: '', description: 'Extra = packager version') option('system', type: 'boolean', value: false, description: 'Set install = paths to system ones') option('runstatedir', type: 'string', value: '', description: 'State direc= tory for temporary sockets, pid files, etc') -option('test_suite', type: 'boolean', value: true, description: 'Whether t= o enable and build test suite by default') option('expensive_tests', type: 'feature', value: 'auto', description: 'se= t the default for enabling expensive tests (long timeouts), use VIR_TEST_EX= PENSIVE to override') option('test_coverage', type: 'boolean', value: false, description: 'turn = on code coverage instrumentation') +option('git_werror', type: 'feature', value: 'auto', description: 'use -We= rror if building from GIT') =20 =20 # build dependencies options @@ -47,7 +47,7 @@ option('yajl', type: 'feature', value: 'auto', descriptio= n: 'yajl support') =20 =20 # build driver options -option('driver_bhyve', type: 'feature', value: 'auto', description: 'BHyVe= driver') +option('driver_bhyve', type: 'feature', value: 'auto', description: 'bhyve= driver') option('driver_esx', type: 'feature', value: 'enabled', description: 'esx = driver') option('driver_hyperv', type: 'feature', value: 'auto', description: 'Hype= r-V driver') option('driver_interface', type: 'feature', value: 'auto', description: 'h= ost interface driver') @@ -91,11 +91,10 @@ option('storage_zfs', type: 'feature', value: 'auto', d= escription: 'ZFS backend =20 # build feature options option('chrdev_lock_files', type: 'string', value: '', description: 'locat= ion for UUCP style lock files for character devices (leave empty for defaul= t paths on some platforms)') -option('debug_logs', type: 'boolean', value: true, description: 'enable de= bugging output') -option('default_editor', type: 'string', value: 'vi', description: 'Editor= to use for interactive commands') option('dtrace', type: 'feature', value: 'auto', description: 'use dtrace = for static probing') option('host_validate', type: 'feature', value: 'auto', description: 'buil= d virt-host-validate') option('init_script', type: 'combo', choices: ['systemd', 'openrc', 'check= ', 'none'], value: 'check', description: 'Style of init script to install') +option('loader_nvram', type: 'string', value: '', description: 'Pass list = of pairs of : paths. Both pairs and list items are separated= by a colon.') option('login_shell', type: 'feature', value: 'auto', description: 'build = virt-login-shell') option('nss', type: 'feature', value: 'auto', description: 'enable Name Se= rvice Switch plugin for resolving guest IP addresses') option('numad', type: 'feature', value: 'auto', description: 'use numad to= manage CPU placement dynamically') diff --git a/scripts/check-augeas.sh b/scripts/check-augeas.sh deleted file mode 100644 index 68609d555a7..00000000000 --- a/scripts/check-augeas.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -AUGPARSE=3D$1 -srcdir=3D$2 -builddir=3D$3 -augeastest=3D$4 - -set -vx - -for f in $augeastest; do - ${AUGPARSE} -I "$srcdir" -I "$builddir" $f -done diff --git a/scripts/check-file-access.py b/scripts/check-file-access.py index f0e98f4b652..2636eb4f96d 100755 --- a/scripts/check-file-access.py +++ b/scripts/check-file-access.py @@ -22,16 +22,16 @@ # =20 import os -import random import re -import string import sys +import tempfile =20 abs_builddir =3D os.environ.get('abs_builddir', '') abs_srcdir =3D os.environ.get('abs_srcdir', '') =20 -filename =3D ''.join(random.choice(string.ascii_letters) for _ in range(16= )) -access_file =3D os.path.join(abs_builddir, 'file-access-{0}.txt'.format(fi= lename)) +access_fd, access_file =3D tempfile.mkstemp(dir=3Dabs_builddir, + prefix=3D'file-access-', + suffix=3D'.txt') permitted_file =3D os.path.join(abs_srcdir, 'permitted_file_access.txt') =20 os.environ['VIR_TEST_FILE_ACCESS_OUTPUT'] =3D access_file @@ -40,7 +40,9 @@ test =3D ' '.join(sys.argv[1:]) =20 ret =3D os.system(test) =20 -if ret !=3D 0 or not os.is_file(access_file): +if ret !=3D 0 or os.read(access_fd, 10) =3D=3D b'': + os.close(access_fd) + os.remove(access_file) sys.exit(ret) =20 known_actions =3D ["open", "fopen", "access", "stat", "lstat", "connect"] @@ -48,7 +50,7 @@ known_actions =3D ["open", "fopen", "access", "stat", "ls= tat", "connect"] files =3D [] permitted =3D [] =20 -with open(access_file, "r") as fh: +with os.fdopen(access_fd, "r") as fh: for line in fh: line =3D line.rstrip("\n") =20 diff --git a/scripts/check-remote-protocol.py b/scripts/check-remote-protoc= ol.py index 00b8570f9bb..0a6135376e6 100644 --- a/scripts/check-remote-protocol.py +++ b/scripts/check-remote-protocol.py @@ -32,11 +32,14 @@ import subprocess import sys =20 name =3D sys.argv[1] -libname =3D sys.argv[2] -builddir =3D sys.argv[3] +targetname =3D sys.argv[2] +libpath =3D sys.argv[3] pdwtags =3D sys.argv[4] expected =3D sys.argv[5] =20 +builddir =3D os.path.dirname(libpath) +libname =3D os.path.basename(libpath) + =20 def get_subdir(dirname, subdir): objectdir =3D "" @@ -52,7 +55,18 @@ def get_subdir(dirname, subdir): return os.path.join(dirname, objectdir) =20 =20 -objectdir =3D get_subdir(builddir, r'.*@{0}@.*'.format(libname)) +# Figure out where is the meson target private directory that contains +# generated object files. +# With meson version < 0.55.0 the directory pattern is: +# +# `hash_string@@target_name@bin_type` for example `25a6634@@vir_net_rpc@= sta` +# +# but this was changed in meson 0.55.0 to a new pattern: +# +# `output_file_name.p` for example `libvirt_net_rpc.a.p` +objectdir =3D get_subdir( + builddir, + r'(.*@{0}@.*|{1}\.p)'.format(targetname, re.escape(libname))) =20 proto_o =3D get_subdir(objectdir, r'.*{0}\.c\.o'.format(name)) =20 diff --git a/scripts/esx_vi_generator.py b/scripts/esx_vi_generator.py index 048f5dde9ee..863c8af9640 100755 --- a/scripts/esx_vi_generator.py +++ b/scripts/esx_vi_generator.py @@ -1250,12 +1250,7 @@ def is_known_type(type): type in enums_by_name) =20 =20 -def open_and_print(filename): - if filename.startswith("./"): - print(" GEN " + filename[2:]) - else: - print(" GEN " + filename) - +def open_file(filename): return open(filename, "wt") =20 =20 @@ -1327,17 +1322,17 @@ input_filename =3D os.path.join(sys.argv[1], "esx/e= sx_vi_generator.input") output_dirname =3D os.path.join(sys.argv[2], "esx") =20 =20 -types_typedef =3D open_and_print(os.path.join(output_dirname, "esx_vi_type= s.generated.typedef")) -types_typeenum =3D open_and_print(os.path.join(output_dirname, "esx_vi_typ= es.generated.typeenum")) -types_typetostring =3D open_and_print(os.path.join(output_dirname, "esx_vi= _types.generated.typetostring")) -types_typefromstring =3D open_and_print(os.path.join(output_dirname, "esx_= vi_types.generated.typefromstring")) -types_header =3D open_and_print(os.path.join(output_dirname, "esx_vi_types= .generated.h")) -types_source =3D open_and_print(os.path.join(output_dirname, "esx_vi_types= .generated.c")) -methods_header =3D open_and_print(os.path.join(output_dirname, "esx_vi_met= hods.generated.h")) -methods_source =3D open_and_print(os.path.join(output_dirname, "esx_vi_met= hods.generated.c")) -methods_macro =3D open_and_print(os.path.join(output_dirname, "esx_vi_meth= ods.generated.macro")) -helpers_header =3D open_and_print(os.path.join(output_dirname, "esx_vi.gen= erated.h")) -helpers_source =3D open_and_print(os.path.join(output_dirname, "esx_vi.gen= erated.c")) +types_typedef =3D open_file(os.path.join(output_dirname, "esx_vi_types.gen= erated.typedef")) +types_typeenum =3D open_file(os.path.join(output_dirname, "esx_vi_types.ge= nerated.typeenum")) +types_typetostring =3D open_file(os.path.join(output_dirname, "esx_vi_type= s.generated.typetostring")) +types_typefromstring =3D open_file(os.path.join(output_dirname, "esx_vi_ty= pes.generated.typefromstring")) +types_header =3D open_file(os.path.join(output_dirname, "esx_vi_types.gene= rated.h")) +types_source =3D open_file(os.path.join(output_dirname, "esx_vi_types.gene= rated.c")) +methods_header =3D open_file(os.path.join(output_dirname, "esx_vi_methods.= generated.h")) +methods_source =3D open_file(os.path.join(output_dirname, "esx_vi_methods.= generated.c")) +methods_macro =3D open_file(os.path.join(output_dirname, "esx_vi_methods.g= enerated.macro")) +helpers_header =3D open_file(os.path.join(output_dirname, "esx_vi.generate= d.h")) +helpers_source =3D open_file(os.path.join(output_dirname, "esx_vi.generate= d.c")) =20 =20 number =3D 0 diff --git a/scripts/gen-def-files.sh b/scripts/gen-def-files.sh deleted file mode 100755 index 1ec7b083802..00000000000 --- a/scripts/gen-def-files.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -printf 'EXPORTS\n' -sed -e '/^$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d' \ - -e 's/[ ]*\(.*\)\;/ \1/g' $1 diff --git a/scripts/gen-sym-files.sh b/scripts/gen-sym-files.sh deleted file mode 100755 index 913a684d064..00000000000 --- a/scripts/gen-sym-files.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -version=3D"$1" -shift -public=3D"$1" -shift -private=3D"$@" - -printf "# WARNING: generated from the following files:\n\n" -cat $public -printf "\n\n# Private symbols\n\n" -printf "$version {\n\n" -printf "global:\n\n" -cat $private -printf "\n\nlocal:\n*;\n\n};" diff --git a/scripts/hyperv_wmi_generator.py b/scripts/hyperv_wmi_generator= .py index 736eabd598c..ac03cf526f5 100755 --- a/scripts/hyperv_wmi_generator.py +++ b/scripts/hyperv_wmi_generator.py @@ -372,12 +372,7 @@ class Property: return ' { "%s", "%s", %s },\n' % (self.name, self.type.lower()= , str(self.is_array).lower()) =20 =20 -def open_and_print(filename): - if filename.startswith("./"): - print(" GEN " + filename[2:]) - else: - print(" GEN " + filename) - +def open_file(filename): return open(filename, "wt") =20 =20 @@ -438,9 +433,9 @@ def main(): input_filename =3D os.path.join(sys.argv[1], "hyperv", "hyperv_wmi_gen= erator.input") output_dirname =3D os.path.join(sys.argv[2], "hyperv") =20 - classes_typedef =3D open_and_print(os.path.join(output_dirname, "hyper= v_wmi_classes.generated.typedef")) - classes_header =3D open_and_print(os.path.join(output_dirname, "hyperv= _wmi_classes.generated.h")) - classes_source =3D open_and_print(os.path.join(output_dirname, "hyperv= _wmi_classes.generated.c")) + classes_typedef =3D open_file(os.path.join(output_dirname, "hyperv_wmi= _classes.generated.typedef")) + classes_header =3D open_file(os.path.join(output_dirname, "hyperv_wmi_= classes.generated.h")) + classes_source =3D open_file(os.path.join(output_dirname, "hyperv_wmi_= classes.generated.c")) =20 # parse input file number =3D 0 diff --git a/scripts/install-dirs.sh b/scripts/install-dirs.sh deleted file mode 100644 index 27558d53fe9..00000000000 --- a/scripts/install-dirs.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -for dir in "$@"; do - mkdir -p $DESTDIR/$dir -done diff --git a/scripts/install-symlink.sh b/scripts/install-symlink.sh deleted file mode 100644 index bfd1f5ad37d..00000000000 --- a/scripts/install-symlink.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -mkdir -p $DESTDIR/$1 - -cd $DESTDIR/$1 - -ln -f -s $2 $3 diff --git a/scripts/meson-change-perms.sh b/scripts/meson-change-perms.sh deleted file mode 100644 index b366d80077e..00000000000 --- a/scripts/meson-change-perms.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -perms=3D$1 -file=3D$2 - -chmod $perms $MESON_BUILD_ROOT/$file diff --git a/scripts/meson-dist.py b/scripts/meson-dist.py new file mode 100755 index 00000000000..a1d36c2533d --- /dev/null +++ b/scripts/meson-dist.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +import os +import sys + +meson_build_root =3D sys.argv[1] +file_name =3D sys.argv[2] + +meson_dist_root =3D os.environ['MESON_DIST_ROOT'] + +os.system('cp {0} {1}'.format( + os.path.join(meson_build_root, file_name), + os.path.join(meson_dist_root, file_name) +)) diff --git a/scripts/meson-dist.sh b/scripts/meson-dist.sh deleted file mode 100755 index fdcc0154e02..00000000000 --- a/scripts/meson-dist.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -MESON_BUILD_ROOT=3D$1 -FILE=3D$2 - -cp $MESON_BUILD_ROOT/$FILE $MESON_DIST_ROOT/$FILE diff --git a/scripts/meson-gen-authors.py b/scripts/meson-gen-authors.py new file mode 100755 index 00000000000..f58bf6383bf --- /dev/null +++ b/scripts/meson-gen-authors.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +import os + +meson_source_root =3D os.environ['MESON_SOURCE_ROOT'] + +os.chdir(meson_source_root) +os.system('git log --pretty=3Dformat:"%aN <%aE>" | sort -u') diff --git a/scripts/meson-gen-authors.sh b/scripts/meson-gen-authors.sh deleted file mode 100755 index bf0a3b63886..00000000000 --- a/scripts/meson-gen-authors.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd $MESON_SOURCE_ROOT -git log --pretty=3Dformat:'* %aN <%aE>' | sort -u diff --git a/scripts/meson-gen-def.py b/scripts/meson-gen-def.py new file mode 100755 index 00000000000..06c9bdf66ab --- /dev/null +++ b/scripts/meson-gen-def.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import re +import sys + +if len(sys.argv) !=3D 3: + print('invalid arguments') + print('usage: {0} INPUT OUTPUT'.format(sys.argv[0])) + sys.exit(1) + +infilepath =3D sys.argv[1] +outfilepath =3D sys.argv[2] + +with open(infilepath) as f: + text =3D f.read() + +text =3D re.sub(r'^(|.*[#:}*].*|LIBVIRT_.*)\n?', '', text, flags=3Dre.M) +text =3D re.sub(r'\n$', '', text) +text =3D re.sub(r'^[ ]*(.*);', r' \1', text, flags=3Dre.M) + +with open(outfilepath, 'w') as f: + f.write('EXPORTS\n') + f.write(text) diff --git a/scripts/meson-gen-sym.py b/scripts/meson-gen-sym.py new file mode 100755 index 00000000000..65a13e550a1 --- /dev/null +++ b/scripts/meson-gen-sym.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +import sys + +if len(sys.argv) < 5: + print('invalid arguments') + print('usage: {0} OUTPUT VERSION PUBLIC PRIVATE ...') + sys.exit(1) + +outfilepath =3D sys.argv[1] +version =3D sys.argv[2] +public =3D sys.argv[3] +private =3D sys.argv[4:] + +with open(outfilepath, 'w') as out: + out.write('# WARNING: generated from the following files:\n\n') + + with open(public) as tmp: + out.write(tmp.read()) + + out.write('\n\n# Private symbols\n\n') + out.write('{0} {{\n\n'.format(version)) + out.write('global:\n\n') + + for priv in private: + with open(priv) as tmp: + out.write(tmp.read()) + + out.write('\n\nlocal:\n*;\n\n};') diff --git a/scripts/meson-html-gen.py b/scripts/meson-html-gen.py index 9ac649a9ef7..26de64dc788 100755 --- a/scripts/meson-html-gen.py +++ b/scripts/meson-html-gen.py @@ -21,9 +21,6 @@ rstfile =3D pagesrc.replace('.html.in', '.rst') if os.path.exists(rstfile): pagesrc =3D rstfile =20 -with open(args.infile, 'rb') as infile: - html_in_data =3D infile.read() - html_tmp =3D subprocess.run( [ args.xsltproc, @@ -31,9 +28,8 @@ html_tmp =3D subprocess.run( '--stringparam', 'pagesrc', pagesrc, '--stringparam', 'builddir', args.builddir, '--stringparam', 'timestamp', args.timestamp, - '--nonet', args.style, '-', + '--nonet', args.style, args.infile, ], - input=3Dhtml_in_data, stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.PIPE, ) diff --git a/scripts/meson-install-dirs.py b/scripts/meson-install-dirs.py new file mode 100644 index 00000000000..14ec6b93e85 --- /dev/null +++ b/scripts/meson-install-dirs.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +import os +import sys + +destdir =3D os.environ.get('DESTDIR', os.sep) + +for dirname in sys.argv[1:]: + os.makedirs(os.path.join(destdir, dirname.strip(os.sep)), exist_ok=3DT= rue) diff --git a/scripts/meson-install-symlink.py b/scripts/meson-install-symli= nk.py new file mode 100644 index 00000000000..e38507072d9 --- /dev/null +++ b/scripts/meson-install-symlink.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import os +import sys + +destdir =3D os.environ.get('DESTDIR', os.sep) +dirname =3D sys.argv[1] +target =3D sys.argv[2] +link =3D sys.argv[3] + +workdir =3D os.path.join(destdir, dirname.strip(os.sep)) + +os.makedirs(workdir, exist_ok=3DTrue) +os.chdir(workdir) +os.symlink(target, link) diff --git a/scripts/meson-timestamp.py b/scripts/meson-timestamp.py new file mode 100755 index 00000000000..f109cad66e8 --- /dev/null +++ b/scripts/meson-timestamp.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import os + +from datetime import datetime, timezone + +timestamp =3D os.environ.get('SOURCE_DATE_EPOCH', None) +timeformat =3D '%c %Z' + +if timestamp: + print(datetime.fromtimestamp(int(timestamp), tz=3Dtimezone.utc).strfti= me(timeformat)) +else: + print(datetime.now(tz=3Dtimezone.utc).strftime(timeformat)) diff --git a/scripts/meson-timestamp.sh b/scripts/meson-timestamp.sh deleted file mode 100755 index e68be1926cf..00000000000 --- a/scripts/meson-timestamp.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if test -n "$SOURCE_DATE_EPOCH"; -then - date -u --date=3D"$SOURCE_DATE_EPOCH" -else - date -u -fi diff --git a/scripts/meson.build b/scripts/meson.build index 2f46ece59fb..59b3c9bacda 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -3,7 +3,6 @@ scripts =3D [ 'augeas-gentest.py', 'check-aclperms.py', 'check-aclrules.py', - 'check-augeas.sh', 'check-driverimpls.py', 'check-drivername.py', 'check-file-access.py', @@ -12,8 +11,6 @@ scripts =3D [ 'check-symsorting.py', 'dtrace2systemtap.py', 'esx_vi_generator.py', - 'gen-def-files.sh', - 'gen-sym-files.sh', 'genaclperms.py', 'genpolkit.py', 'gensystemtap.py', @@ -21,14 +18,16 @@ scripts =3D [ 'header-ifdef.py', 'hvsupport.py', 'hyperv_wmi_generator.py', - 'install-dirs.sh', - 'install-symlink.sh', - 'meson-dist.sh', - 'meson-gen-authors.sh', + 'meson-dist.py', + 'meson-gen-authors.py', + 'meson-gen-def.py', + 'meson-gen-sym.py', 'meson-html-gen.py', + 'meson-install-dirs.py', + 'meson-install-symlink.py', 'meson-install-web.py', 'meson-python.sh', - 'meson-timestamp.sh', + 'meson-timestamp.py', 'mock-noinline.py', 'prohibit-duplicate-header.py', 'test-wrap-argv.py', diff --git a/src/access/meson.build b/src/access/meson.build index beb61eddaf5..b23838a7762 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -78,7 +78,7 @@ if conf.has('WITH_POLKIT') 'org.libvirt.api.policy', input: access_perm_h, output: 'org.libvirt.api.policy', - command: [ meson_python_prog, genpolkit_prog, '@INPUT@' ], + command: [ meson_python_prog, python3_prog.path(), genpolkit_prog.pa= th(), '@INPUT@' ], capture: true, install: true, install_dir: datadir / 'polkit-1' / 'actions', diff --git a/src/admin/meson.build b/src/admin/meson.build index 394ac2b04ad..215767f02af 100644 --- a/src/admin/meson.build +++ b/src/admin/meson.build @@ -66,8 +66,10 @@ libvirt_admin_syms =3D custom_target( libvirt_admin_private_syms, ], output: 'libvirt_admin.syms', - command: [ gen_sym_files_prog, 'LIBVIRT_ADMIN_PRIVATE_' + meson.project_= version(), '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_sym_prog.path(), + '@OUTPUT@', 'LIBVIRT_ADMIN_PRIVATE_' + meson.project_version(), '@INPU= T@', + ], ) libvirt_admin_syms_file =3D libvirt_admin_syms if host_machine.system() =3D=3D 'windows' @@ -75,8 +77,10 @@ if host_machine.system() =3D=3D 'windows' 'libvirt_admin.def', input: libvirt_admin_syms, output: 'libvirt_admin.def', - command: [ gen_def_files_prog, '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(), + '@INPUT@', '@OUTPUT@', + ], ) libvirt_admin_syms_file =3D libvirt_admin_def endif @@ -100,13 +104,9 @@ admin_driver_lib =3D static_library( ], ) =20 -libvirt_libs +=3D admin_driver_lib - check_protocols +=3D { 'name': 'admin_protocol', - 'libname': 'virt_admin_driver', - 'builddir': meson.current_build_dir(), - 'depends': admin_driver_lib, + 'lib': admin_driver_lib, } =20 virt_conf_files +=3D files('libvirt-admin.conf') diff --git a/src/bhyve/meson.build b/src/bhyve/meson.build index 6dc8b7d29ff..643e72680ed 100644 --- a/src/bhyve/meson.build +++ b/src/bhyve/meson.build @@ -57,6 +57,5 @@ if conf.has('WITH_BHYVE') =20 virt_daemon_confs +=3D { 'name': 'virtbhyved', - 'name_uc': 'Virtbhyved', } endif diff --git a/src/cpu_map/meson.build b/src/cpu_map/meson.build index d89106dfcbd..19daa7157bb 100644 --- a/src/cpu_map/meson.build +++ b/src/cpu_map/meson.build @@ -21,6 +21,7 @@ cpumap_data =3D [ 'x86_Broadwell-noTSX-IBRS.xml', 'x86_Broadwell-noTSX.xml', 'x86_Broadwell.xml', + 'x86_Cascadelake-Server-noTSX.xml', 'x86_Cascadelake-Server.xml', 'x86_Conroe.xml', 'x86_Cooperlake.xml', @@ -28,6 +29,7 @@ cpumap_data =3D [ 'x86_coreduo.xml', 'x86_cpu64-rhel5.xml', 'x86_cpu64-rhel6.xml', + 'x86_Dhyana.xml', 'x86_EPYC-IBPB.xml', 'x86_EPYC.xml', 'x86_features.xml', diff --git a/src/esx/meson.build b/src/esx/meson.build index 469c2044c63..f2d59462feb 100644 --- a/src/esx/meson.build +++ b/src/esx/meson.build @@ -31,8 +31,7 @@ esx_gen_sources =3D custom_target( 'esx_vi_types.generated.typetostring', ], command: [ - meson_python_prog, - esx_vi_generator_prog, + meson_python_prog, python3_prog.path(), esx_vi_generator_prog.path(), meson.source_root() / 'src', meson.build_root() / 'src', ], diff --git a/src/hyperv/meson.build b/src/hyperv/meson.build index d499889b01b..84fcedce38f 100644 --- a/src/hyperv/meson.build +++ b/src/hyperv/meson.build @@ -16,8 +16,7 @@ hyperv_gen_sources =3D custom_target( 'hyperv_wmi_classes.generated.typedef', ], command: [ - meson_python_prog, - hyperv_wmi_generator_prog, + meson_python_prog, python3_prog.path(), hyperv_wmi_generator_prog.path= (), meson.source_root() / 'src', meson.build_root() / 'src', ], diff --git a/src/interface/meson.build b/src/interface/meson.build index bf9d649282e..1092c5a2673 100644 --- a/src/interface/meson.build +++ b/src/interface/meson.build @@ -40,7 +40,6 @@ if conf.has('WITH_INTERFACE') =20 virt_daemon_confs +=3D { 'name': 'virtinterfaced', - 'name_uc': 'Virtinterfaced', } =20 virt_daemon_units +=3D { diff --git a/src/libxl/meson.build b/src/libxl/meson.build index b2e9ca07d4a..7afde2f81f0 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -58,7 +58,6 @@ if conf.has('WITH_LIBXL') =20 virt_daemon_confs +=3D { 'name': 'virtxend', - 'name_uc': 'Virtxend', } =20 virt_daemon_units +=3D { diff --git a/src/locking/meson.build b/src/locking/meson.build index 4c30acb2eb9..a67a41298b1 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -92,9 +92,7 @@ if conf.has('WITH_LIBVIRTD') =20 check_protocols +=3D { 'name': 'lock_protocol', - 'libname': 'lockd_impl', - 'builddir': meson.current_build_dir(), - 'depends': lockd_lib_impl, + 'lib': lockd_lib_impl, } =20 lockdriver_dir =3D libdir / 'libvirt' / 'lock-driver' diff --git a/src/logging/meson.build b/src/logging/meson.build index 8e913fb352f..1f06a51e935 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -6,7 +6,7 @@ log_protocol =3D 'log_protocol.x' =20 log_protocol_generated =3D [] =20 -log_protocol_generated +=3D custom_target( +log_protocol_header_generated =3D custom_target( 'log_protocol.h', input: log_protocol, output: 'log_protocol.h', @@ -14,6 +14,7 @@ log_protocol_generated +=3D custom_target( genprotocol_prog, rpcgen_prog, '-h', '@INPUT@', '@OUTPUT@' ], ) +log_protocol_generated +=3D log_protocol_header_generated =20 log_protocol_generated +=3D custom_target( 'log_protocol.c', @@ -98,3 +99,10 @@ if conf.has('WITH_LIBVIRTD') 'file': files('virtlogd.sysconf'), } endif + +log_inc_dir =3D include_directories('.') + +log_dep =3D declare_dependency( + include_directories: log_inc_dir, + sources: log_protocol_header_generated, +) diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 093ad809029..11526b637b2 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -101,9 +101,7 @@ if conf.has('WITH_LXC') =20 check_protocols +=3D { 'name': 'lxc_monitor_protocol', - 'libname': 'virt_driver_lxc_impl', - 'builddir': meson.current_build_dir(), - 'depends': lxc_driver_impl_lib, + 'lib': lxc_driver_impl_lib, } =20 virt_modules +=3D { @@ -160,7 +158,6 @@ if conf.has('WITH_LXC') =20 virt_daemon_confs +=3D { 'name': 'virtlxcd', - 'name_uc': 'Virtlxcd', } =20 virt_daemon_units +=3D { diff --git a/src/meson.build b/src/meson.build index 66aa6201550..59370744161 100644 --- a/src/meson.build +++ b/src/meson.build @@ -15,7 +15,13 @@ src_dep =3D declare_dependency( src_inc_dir, top_inc_dir, ], - link_args: libvirt_relro + libvirt_no_indirect + coverage_flags + driver= _modules_flags + win32_link_flags, + link_args: ( + libvirt_relro + + libvirt_no_indirect + + coverage_flags + + driver_modules_flags + + win32_link_flags + ), ) =20 =20 @@ -68,7 +74,10 @@ if conf.has('WITH_DTRACE_PROBES') out_stp, input: infile, output: out_stp, - command: [ meson_python_prog, dtrace2systemtap_prog, bindir, sbindir, = libdir, '@INPUT@' ], + command: [ + meson_python_prog, python3_prog.path(), dtrace2systemtap_prog.path()= , + bindir, sbindir, libdir, '@INPUT@' + ], capture: true, install: true, install_dir: systemtap_dir, @@ -135,7 +144,7 @@ virt_modules =3D [] =20 # virt_daemons: # each entry is a dictionary with following items: -# * name - binary name (rquired) +# * name - binary name (required) # * sources - binary sources (optional, default remote_daemon_sources) # * c_args - compile arguments (optional, default []) # * include =3D include_directories (optional, default []) @@ -170,7 +179,6 @@ virt_test_aug_files =3D [] # generation libvirt daemon conf files # each entry is a dictionary with following items: # * name - daemon name (required) -# * name_uc - daemon name with first letter uppercase (required) # * with_ip - only for libvirtd and virtproxyd (optional, default false) virt_daemon_confs =3D [] =20 @@ -220,9 +228,7 @@ stateful_driver_source_files =3D [] # check_protocols: # check if $name.x is in sync with $name-structs # name - name of the protocol (required) -# libname - name of the meson library (required) -# builddir - build directory for the library (required) -# depends - library that this test depends on (required) +# lib - library that this test depends on (required) check_protocols =3D [] =20 =20 @@ -345,8 +351,10 @@ libvirt_syms =3D custom_target( 'libvirt.syms', input: [ public_sym_file ] + used_sym_files + generated_sym_files, output: 'libvirt.syms', - command: [ gen_sym_files_prog, 'LIBVIRT_PRIVATE_' + meson.project_versio= n(), '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_sym_prog.path(), + '@OUTPUT@', 'LIBVIRT_PRIVATE_' + meson.project_version(), '@INPUT@', + ], ) libvirt_syms_file =3D libvirt_syms if host_machine.system() =3D=3D 'windows' @@ -354,8 +362,10 @@ if host_machine.system() =3D=3D 'windows' 'libvirt.def', input: libvirt_syms, output: 'libvirt.def', - command: [ gen_def_files_prog, '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(), + '@INPUT@', '@OUTPUT@', + ], ) libvirt_syms_file =3D libvirt_def endif @@ -402,8 +412,10 @@ if host_machine.system() =3D=3D 'windows' 'libvirt_qemu.def', input: libvirt_qemu_syms, output: 'libvirt_qemu.def', - command: [ gen_def_files_prog, '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(), + '@INPUT@', '@OUTPUT@', + ], ) libvirt_qemu_syms_file =3D libvirt_qemu_def libvirt_qemu_syms_path =3D libvirt_qemu_def.full_path() @@ -454,8 +466,10 @@ if host_machine.system() =3D=3D 'windows' 'libvirt_lxc.def', input: libvirt_lxc_syms, output: 'libvirt_lxc.def', - command: [ gen_def_files_prog, '@INPUT@' ], - capture: true, + command: [ + meson_python_prog, python3_prog.path(), meson_gen_def_prog.path(), + '@INPUT@', '@OUTPUT@', + ], ) libvirt_lxc_syms_file =3D libvirt_lxc_def libvirt_lxc_syms_path =3D libvirt_lxc_def.full_path() @@ -659,22 +673,31 @@ foreach data : virt_test_aug_files data['name'], input: [ data['conf'], data['aug'] ], output: data['name'], - command: [ meson_python_prog, augeas_gentest_prog, '@INPUT@' ], + command: [ + meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(), + '@INPUT@', + ], capture: true, install: true, install_dir: virt_test_aug_dir, ) endforeach =20 +# augeas_test_data: +# each entry is a dictionary with following items: +# * name: daemon name to run the test for (required) +# * file: test file to use (required) augeas_test_data =3D [] =20 foreach data : virt_daemon_confs + capitalize_args =3D [ '-c', 'print("@0@".capitalize())'.format(data['nam= e']) ] + name_uc =3D run_command(python3_prog, capitalize_args, check: true).stdo= ut().strip() daemon_conf =3D configuration_data() daemon_conf.set('runstatedir', runstatedir) daemon_conf.set('sbindir', sbindir) daemon_conf.set('sysconfdir', sysconfdir) daemon_conf.set('DAEMON_NAME', data['name']) - daemon_conf.set('DAEMON_NAME_UC', data['name_uc']) + daemon_conf.set('DAEMON_NAME_UC', name_uc) # to silence meson warning about missing 'CONFIG' in the configuration_d= ata daemon_conf.set('CONFIG', '@CONFIG@') =20 @@ -720,12 +743,15 @@ foreach data : virt_daemon_confs test_aug_out, input: [ conf_out, test_aug_tmp ], output: test_aug_out, - command: [ meson_python_prog, augeas_gentest_prog, '@INPUT@' ], + command: [ + meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(), + '@INPUT@', + ], capture: true, install: true, install_dir: virt_test_aug_dir, ) - augeas_test_data +=3D augeas_test_file + augeas_test_data +=3D { 'name': data['name'], 'file': augeas_test_file } endforeach =20 =20 @@ -827,7 +853,10 @@ if conf.has('WITH_DTRACE_PROBES') 'libvirt_functions.stp', input: rpc_probe_files, output: 'libvirt_functions.stp', - command: [ meson_python_prog, gensystemtap_prog, '@INPUT@' ], + command: [ + meson_python_prog, python3_prog.path(), gensystemtap_prog.path(), + '@INPUT@', + ], capture: true, install: true, install_dir: systemtap_dir, @@ -844,7 +873,10 @@ virt_install_dirs +=3D [ localstatedir / 'lib' / 'libvirt' / 'boot', ] =20 -meson.add_install_script(install_dirs_prog.path(), virt_install_dirs) +meson.add_install_script( + meson_python_prog.path(), python3_prog.path(), meson_install_dirs_prog.p= ath(), + virt_install_dirs, +) =20 =20 # Check driver files @@ -921,29 +953,35 @@ test( ) =20 if augparse_prog.found() - test( - 'check-augeas', - check_augeas_prog, - args: [ - augparse_prog.path(), - meson.current_source_dir(), - meson.current_build_dir(), - augeas_test_data, - ], - ) + foreach data : augeas_test_data + test( + 'check-augeas-@0@'.format(data['name']), + augparse_prog, + args: [ + '-I', meson.current_source_dir(), + '-I', meson.current_build_dir(), + data['file'].full_path(), + ], + ) + endforeach endif =20 -if pdwtags_prog.found() +if pdwtags_prog.found() and cc.get_id() !=3D 'clang' foreach proto : check_protocols + lib =3D proto['lib'] test( 'check-@0@'.format(proto['name']), python3_prog, args: [ - check_remote_protocol_prog.path(), proto['name'], proto['libname']= , - proto['builddir'], pdwtags_prog.path(), files('@0@-structs'.format= (proto['name'])), + check_remote_protocol_prog.path(), + proto['name'], + lib.name(), + lib.full_path(), + pdwtags_prog.path(), + files('@0@-structs'.format(proto['name'])), ], env: runutf8, - depends: proto['depends'], + depends: [ lib ], ) endforeach endif diff --git a/src/network/meson.build b/src/network/meson.build index a3836bb12be..2e031e811fc 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -51,7 +51,6 @@ if conf.has('WITH_NETWORK') =20 virt_daemon_confs +=3D { 'name': 'virtnetworkd', - 'name_uc': 'Virtnetworkd', } =20 virt_helpers +=3D { @@ -114,7 +113,7 @@ if conf.has('WITH_NETWORK') endif =20 meson.add_install_script( - install_symlink_prog.path(), + meson_python_prog.path(), python3_prog.path(), meson_install_symlink_p= rog.path(), confdir / 'qemu' / 'networks' / 'autostart', '../default.xml', 'default.xml', ) diff --git a/src/node_device/meson.build b/src/node_device/meson.build index d833b329da4..5953c6b8ed6 100644 --- a/src/node_device/meson.build +++ b/src/node_device/meson.build @@ -53,7 +53,6 @@ if conf.has('WITH_NODE_DEVICES') =20 virt_daemon_confs +=3D { 'name': 'virtnodedevd', - 'name_uc': 'Virtnodedevd', } =20 virt_daemon_units +=3D { diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build index 6e9734e6a26..dcdc30f3731 100644 --- a/src/nwfilter/meson.build +++ b/src/nwfilter/meson.build @@ -47,7 +47,6 @@ if conf.has('WITH_NWFILTER') =20 virt_daemon_confs +=3D { 'name': 'virtnwfilterd', - 'name_uc': 'Virtnwfilterd', } =20 virt_daemon_units +=3D { diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 640ef273ca8..644d74479b2 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -67,7 +67,10 @@ if conf.has('WITH_DTRACE_PROBES') out_stp, input: infile, output: out_stp, - command: [ meson_python_prog, dtrace2systemtap_prog, bindir, sbindir, = libdir, '@INPUT@' ], + command: [ + meson_python_prog, python3_prog.path(), dtrace2systemtap_prog.path()= , + bindir, sbindir, libdir, '@INPUT@', + ], capture: true, install: conf.has('WITH_QEMU'), install_dir: systemtap_dir, @@ -90,6 +93,7 @@ if conf.has('WITH_QEMU') capng_dep, gnutls_dep, libnl_dep, + log_dep, selinux_dep, src_dep, xdr_dep, @@ -139,7 +143,6 @@ if conf.has('WITH_QEMU') =20 virt_daemon_confs +=3D { 'name': 'virtqemud', - 'name_uc': 'Virtqemud', } =20 virt_daemon_units +=3D { diff --git a/src/remote/meson.build b/src/remote/meson.build index 130d246fcec..25712c943b7 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -65,30 +65,49 @@ foreach name : [ 'remote', 'qemu', 'lxc' ] ) endforeach =20 +# libvirt_conf_files: +# Generate libvirtd and virtd template files that are used to generate +# daemon configuration files. +# Each entry is a dictionary with following items: +# * input: source config file (required) +# * libvirtd: libvirtd config output template file (required) +# * virtd: virtd config output template file (required) libvirt_conf_files =3D [ - [ 'libvirtd.conf.in', 'libvirtd.conf.tmp', 'virtd.conf.tmp' ], - [ 'libvirtd.aug.in', 'libvirtd.aug.tmp', 'virtd.aug.tmp' ], - [ 'test_libvirtd.aug.in', 'test_libvirtd.aug.tmp', 'test_virtd.aug.tmp' = ], + { + 'input':'libvirtd.conf.in', + 'libvirtd':'libvirtd.conf.tmp', + 'virtd':'virtd.conf.tmp', + }, + { + 'input':'libvirtd.aug.in', + 'libvirtd':'libvirtd.aug.tmp', + 'virtd':'virtd.aug.tmp', + }, + { + 'input':'test_libvirtd.aug.in', + 'libvirtd':'test_libvirtd.aug.tmp', + 'virtd':'test_virtd.aug.tmp', + }, ] =20 foreach name : libvirt_conf_files tmp =3D configure_file( - input: name[0], - output: name[1], + input: name['input'], + output: name['libvirtd'], command: [ 'sed', '-e', '/[@]CUT_ENABLE_IP[@]/d', '-e', '/[@]END[@]/d'= , '@INPUT@' ], capture: true, ) - set_variable(name[1].underscorify(), tmp) + set_variable(name['libvirtd'].underscorify(), tmp) endforeach =20 foreach name : libvirt_conf_files tmp =3D configure_file( - input: name[0], - output: name[2], + input: name['input'], + output: name['virtd'], command: [ 'sed', '-e', '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d', '@INPUT@= ' ], capture: true, ) - set_variable(name[2].underscorify(), tmp) + set_variable(name['virtd'].underscorify(), tmp) endforeach =20 libvirtd_socket_unit_files =3D [ @@ -128,23 +147,17 @@ if conf.has('WITH_REMOTE') =20 check_protocols +=3D { 'name': 'remote_protocol', - 'libname': 'virt_remote_driver', - 'builddir': meson.current_build_dir(), - 'depends': remote_driver_lib, + 'lib': remote_driver_lib, } =20 check_protocols +=3D { 'name': 'qemu_protocol', - 'libname': 'virt_remote_driver', - 'builddir': meson.current_build_dir(), - 'depends': remote_driver_lib, + 'lib': remote_driver_lib, } =20 check_protocols +=3D { 'name': 'lxc_protocol', - 'libname': 'virt_remote_driver', - 'builddir': meson.current_build_dir(), - 'depends': remote_driver_lib, + 'lib': remote_driver_lib, } =20 libvirt_libs +=3D remote_driver_lib @@ -164,7 +177,6 @@ if conf.has('WITH_REMOTE') =20 virt_daemon_confs +=3D { 'name': 'libvirtd', - 'name_uc': 'Libvirtd', 'with_ip': true, } =20 @@ -199,7 +211,6 @@ if conf.has('WITH_REMOTE') =20 virt_daemon_confs +=3D { 'name': 'virtproxyd', - 'name_uc': 'Virtproxyd', 'with_ip': true, } =20 diff --git a/src/rpc/meson.build b/src/rpc/meson.build index 18ea0602602..e249b9d534b 100644 --- a/src/rpc/meson.build +++ b/src/rpc/meson.build @@ -83,16 +83,12 @@ virt_rpc_lib =3D static_library( =20 check_protocols +=3D { 'name': 'virnetprotocol', - 'libname': 'virt_net_rpc', - 'builddir': meson.current_build_dir(), - 'depends': virt_rpc_lib, + 'lib': virt_rpc_lib, } =20 check_protocols +=3D { 'name': 'virkeepaliveprotocol', - 'libname': 'virt_net_rpc', - 'builddir': meson.current_build_dir(), - 'depends': virt_rpc_lib, + 'lib': virt_rpc_lib, } =20 virt_rpc_server_lib =3D static_library( diff --git a/src/secret/meson.build b/src/secret/meson.build index 1605729f49b..d576d3218eb 100644 --- a/src/secret/meson.build +++ b/src/secret/meson.build @@ -29,7 +29,6 @@ if conf.has('WITH_SECRETS') =20 virt_daemon_confs +=3D { 'name': 'virtsecretd', - 'name_uc': 'Virtsecretd', } =20 virt_daemon_units +=3D { diff --git a/src/storage/meson.build b/src/storage/meson.build index 86abfedbdde..18ea0f3fb51 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -127,7 +127,6 @@ if conf.has('WITH_STORAGE') =20 virt_daemon_confs +=3D { 'name': 'virtstoraged', - 'name_uc': 'Virtstoraged', } =20 virt_daemon_units +=3D { diff --git a/src/util/meson.build b/src/util/meson.build index af60283cbc7..a7017f459f6 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -144,7 +144,7 @@ foreach name : keycode_list input: keymap_src_file, output: 'virkeycodetable_@0@.h'.format(name), command: [ - meson_python_prog, python3_prog, keymap_gen_prog, 'code-table', + meson_python_prog, python3_prog.path(), keymap_gen_prog.path(), 'cod= e-table', '--lang', 'stdc', '--varname', 'virKeyCodeTable_@0@'.format(name), '@INPUT@', name, @@ -159,7 +159,7 @@ foreach name : keyname_list input: keymap_src_file, output: 'virkeynametable_@0@.h'.format(name), command: [ - meson_python_prog, python3_prog, keymap_gen_prog, 'name-table', + meson_python_prog, python3_prog.path(), keymap_gen_prog.path(), 'nam= e-table', '--lang', 'stdc', '--varname', 'virKeyNameTable_@0@'.format(name), '@INPUT@', name, diff --git a/src/util/virfile.c b/src/util/virfile.c index 5ec43832461..c6f4a18a7a8 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -1782,32 +1782,17 @@ virFileFindResource(const char *filename, * virFileActivateDirOverrideForProg: * @argv0: argv[0] of the calling program * - * Combine $PWD and @argv0, canonicalize it and check if abs_top_builddir + * Canonicalize current process path from argv0 and check if abs_top_build= dir * matches as prefix in the path. */ void virFileActivateDirOverrideForProg(const char *argv0) { - const char *pwd =3D g_getenv("PWD"); - g_autofree char *fullPath =3D NULL; - g_autofree char *canonPath =3D NULL; - const char *path =3D NULL; + g_autofree char *path =3D virFileCanonicalizePath(argv0); =20 - if (!pwd) + if (!path) { + VIR_DEBUG("Failed to get canonicalized path errno=3D%d", errno); return; - - if (argv0[0] !=3D '/') { - fullPath =3D g_strdup_printf("%s/%s", pwd, argv0); - canonPath =3D virFileCanonicalizePath(fullPath); - - if (!canonPath) { - VIR_DEBUG("Failed to get canonicalized path errno=3D%d", errno= ); - return; - } - - path =3D canonPath; - } else { - path =3D argv0; } =20 if (STRPREFIX(path, abs_top_builddir)) { diff --git a/src/util/virlog.h b/src/util/virlog.h index feb2f859041..716fb9a3783 100644 --- a/src/util/virlog.h +++ b/src/util/virlog.h @@ -78,29 +78,8 @@ struct _virLogSource { .serial =3D 0, \ } =20 -/* - * If configured with --enable-debug=3Dyes then library calls - * are printed to stderr for debugging or to an appropriate channel - * defined at runtime from the libvirt daemon configuration file - */ -#ifdef ENABLE_DEBUG -# define VIR_DEBUG_INT(src, filename, linenr, funcname, ...) \ +#define VIR_DEBUG_INT(src, filename, linenr, funcname, ...) \ virLogMessage(src, VIR_LOG_DEBUG, filename, linenr, funcname, NULL, __= VA_ARGS__) -#else -/** - * virLogEatParams: - * - * Do nothing but eat parameters. - */ -static inline void virLogEatParams(virLogSourcePtr unused, ...) -{ - /* Silence gcc */ - unused =3D unused; -} -# define VIR_DEBUG_INT(src, filename, linenr, funcname, ...) \ - virLogEatParams(src, filename, linenr, funcname, __VA_ARGS__) -#endif /* !ENABLE_DEBUG */ - #define VIR_INFO_INT(src, filename, linenr, funcname, ...) \ virLogMessage(src, VIR_LOG_INFO, filename, linenr, funcname, NULL, __V= A_ARGS__) #define VIR_WARN_INT(src, filename, linenr, funcname, ...) \ diff --git a/src/vbox/meson.build b/src/vbox/meson.build index 8451e3018be..3e608fa1018 100644 --- a/src/vbox/meson.build +++ b/src/vbox/meson.build @@ -54,7 +54,6 @@ if conf.has('WITH_VBOX') =20 virt_daemon_confs +=3D { 'name': 'virtvboxd', - 'name_uc': 'Virtvboxd', } =20 virt_daemon_units +=3D { diff --git a/src/vz/meson.build b/src/vz/meson.build index 0ab83731071..2859dc79793 100644 --- a/src/vz/meson.build +++ b/src/vz/meson.build @@ -44,7 +44,6 @@ if conf.has('WITH_VZ') =20 virt_daemon_confs +=3D { 'name': 'virtvzd', - 'name_uc': 'Virtvzd', } =20 virt_daemon_units +=3D { diff --git a/tests/meson.build b/tests/meson.build index 1510d6ef3f3..b5f6e2267aa 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -240,38 +240,48 @@ executable( # * deps - additional dependencies (optional, default []) # * include - include_directories (optional, default []) # * link_with - compiled libraries to link with (optional, default []) +# * link_whole - compiled libraries to link whole (optional, default []) + tests =3D [] =20 cputest_link_with =3D [] +cputest_link_whole =3D [] if conf.has('WITH_QEMU') - cputest_link_with +=3D [ test_utils_qemu_lib, test_utils_qemu_monitor_li= b, test_qemu_driver_lib ] + cputest_link_with +=3D [ test_utils_qemu_monitor_lib, test_qemu_driver_l= ib ] + cputest_link_whole +=3D [ test_utils_qemu_lib ] endif =20 -domaincapstest_link_with =3D [ test_file_wrapper_lib ] +domaincapstest_link_with =3D [] +domaincapstest_link_whole =3D [ test_file_wrapper_lib ] if conf.has('WITH_BHYVE') domaincapstest_link_with +=3D [ bhyve_driver_impl ] endif if conf.has('WITH_LIBXL') - domaincapstest_link_with +=3D [ test_utils_xen_lib, test_xen_driver_lib = ] + domaincapstest_link_with +=3D [ test_xen_driver_lib ] + domaincapstest_link_whole +=3D [ test_utils_xen_lib ] endif if conf.has('WITH_QEMU') - domaincapstest_link_with +=3D [ test_utils_qemu_lib, test_qemu_driver_li= b ] + domaincapstest_link_with +=3D [ test_qemu_driver_lib ] + domaincapstest_link_whole +=3D [ test_utils_qemu_lib ] endif =20 vircapstest_link_with =3D [] +vircapstest_link_whole =3D [] vircapstest_sources =3D [ 'vircapstest.c' ] if conf.has('WITH_LXC') - vircapstest_link_with +=3D [ test_utils_lxc_lib, lxc_driver_impl_lib ] + vircapstest_link_with +=3D [ lxc_driver_impl_lib ] + vircapstest_link_whole +=3D [ test_utils_lxc_lib ] endif if conf.has('WITH_QEMU') - vircapstest_link_with +=3D [ test_utils_qemu_lib, qemu_driver_impl ] + vircapstest_link_with +=3D [ qemu_driver_impl ] + vircapstest_link_whole +=3D [ test_utils_qemu_lib ] vircapstest_sources +=3D [ qemu_dtrace_gen_objects ] endif =20 tests +=3D [ { 'name': 'commandtest' }, - { 'name': 'cputest', 'link_with': cputest_link_with }, - { 'name': 'domaincapstest', 'link_with': domaincapstest_link_with }, + { 'name': 'cputest', 'link_with': cputest_link_with, 'link_whole': cpute= st_link_whole }, + { 'name': 'domaincapstest', 'link_with': domaincapstest_link_with, 'link= _whole': domaincapstest_link_whole }, { 'name': 'domainconftest' }, { 'name': 'genericxml2xmltest' }, { 'name': 'interfacexml2xmltest' }, @@ -291,7 +301,7 @@ tests +=3D [ { 'name': 'virauthconfigtest' }, { 'name': 'virbitmaptest' }, { 'name': 'virbuftest' }, - { 'name': 'vircapstest', 'sources': vircapstest_sources, 'link_with': vi= rcapstest_link_with }, + { 'name': 'vircapstest', 'sources': vircapstest_sources, 'link_with': vi= rcapstest_link_with, 'link_whole': vircapstest_link_whole }, { 'name': 'vircgrouptest' }, { 'name': 'virconftest' }, { 'name': 'vircryptotest' }, @@ -301,7 +311,7 @@ tests +=3D [ { 'name': 'virfiletest' }, { 'name': 'virfirewalltest', 'deps': [ dbus_dep ] }, { 'name': 'virhashtest' }, - { 'name': 'virhostcputest', 'link_with': [ test_file_wrapper_lib ] }, + { 'name': 'virhostcputest', 'link_whole': [ test_file_wrapper_lib ] }, { 'name': 'virhostdevtest' }, { 'name': 'viriscsitest' }, { 'name': 'virkeycodetest' }, @@ -327,9 +337,9 @@ if host_machine.system() =3D=3D 'linux' tests +=3D [ { 'name': 'fchosttest' }, { 'name': 'scsihosttest' }, - { 'name': 'vircaps2xmltest', 'link_with': [ test_file_wrapper_lib ] }, + { 'name': 'vircaps2xmltest', 'link_whole': [ test_file_wrapper_lib ] }= , { 'name': 'virnetdevbandwidthtest' }, - { 'name': 'virresctrltest', 'link_with': [ test_file_wrapper_lib ] }, + { 'name': 'virresctrltest', 'link_whole': [ test_file_wrapper_lib ] }, { 'name': 'virscsitest' }, { 'name': 'virusbtest' }, ] @@ -358,7 +368,7 @@ endif =20 if conf.has('WITH_ESX') tests +=3D [ - { 'name': 'esxutilstest', 'include': [ esx_inc_dir ], 'deps': [ dbus_d= ep ] }, + { 'name': 'esxutilstest', 'include': [ esx_inc_dir ] }, ] endif =20 @@ -373,16 +383,16 @@ endif =20 if conf.has('WITH_LIBXL') tests +=3D [ - { 'name': 'libxlxml2domconfigtest', 'link_with': [ test_utils_xen_lib,= test_xen_driver_lib ], 'deps': [ libxl_dep ] }, - { 'name': 'xlconfigtest', 'link_with': [ test_utils_xen_lib, test_xen_= driver_lib ] }, - { 'name': 'xmconfigtest', 'link_with': [ test_utils_xen_lib, test_xen_= driver_lib ] }, + { 'name': 'libxlxml2domconfigtest', 'link_with': [ test_xen_driver_lib= ], 'link_whole': [ test_utils_xen_lib ], 'deps': [ libxl_dep ] }, + { 'name': 'xlconfigtest', 'link_with': [ test_xen_driver_lib ], 'link_= whole': [ test_utils_xen_lib ] }, + { 'name': 'xmconfigtest', 'link_with': [ test_xen_driver_lib ], 'link_= whole': [ test_utils_xen_lib ] }, ] endif =20 if conf.has('WITH_LXC') tests +=3D [ - { 'name': 'lxcconf2xmltest', 'link_with': [ test_utils_lxc_lib, lxc_dr= iver_impl_lib ] }, - { 'name': 'lxcxml2xmltest', 'link_with': [ test_utils_lxc_lib, lxc_dri= ver_impl_lib ] }, + { 'name': 'lxcconf2xmltest', 'link_with': [ lxc_driver_impl_lib ], 'li= nk_whole': [ test_utils_lxc_lib ] }, + { 'name': 'lxcxml2xmltest', 'link_with': [ lxc_driver_impl_lib ], 'lin= k_whole': [ test_utils_lxc_lib ] }, ] endif =20 @@ -432,22 +442,22 @@ endif =20 if conf.has('WITH_QEMU') tests +=3D [ - { 'name': 'qemuagenttest', 'link_with': [ test_utils_qemu_lib, test_qe= mu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemublocktest', 'link_with': [ test_utils_qemu_lib, test_qe= mu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemucapabilitiestest', 'link_with': [ test_utils_qemu_lib, = test_qemu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemucaps2xmltest', 'link_with': [ test_utils_qemu_lib, test= _qemu_driver_lib ] }, - { 'name': 'qemucommandutiltest', 'link_with': [ test_utils_qemu_lib, t= est_qemu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemudomaincheckpointxml2xmltest', 'link_with': [ test_utils= _qemu_lib, test_qemu_driver_lib ] }, - { 'name': 'qemudomainsnapshotxml2xmltest', 'link_with': [ test_utils_q= emu_lib, test_qemu_driver_lib ] }, - { 'name': 'qemufirmwaretest', 'link_with': [ test_qemu_driver_lib, tes= t_file_wrapper_lib ] }, - { 'name': 'qemuhotplugtest', 'link_with': [ test_utils_qemu_lib, test_= qemu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemumemlocktest', 'link_with': [ test_utils_qemu_lib, test_= qemu_driver_lib ] }, - { 'name': 'qemumigparamstest', 'link_with': [ test_utils_qemu_lib, tes= t_qemu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemumonitorjsontest', 'link_with': [ test_utils_qemu_lib, t= est_qemu_driver_lib, test_utils_qemu_monitor_lib ] }, - { 'name': 'qemusecuritytest', 'sources': [ 'qemusecuritytest.c', 'qemu= securitymock.c' ], 'link_with': [ test_utils_qemu_lib, test_qemu_driver_lib= ] }, - { 'name': 'qemuvhostusertest', 'link_with': [ test_qemu_driver_lib, te= st_file_wrapper_lib ] }, - { 'name': 'qemuxml2argvtest', 'link_with': [ test_utils_qemu_lib, test= _qemu_driver_lib, test_utils_qemu_monitor_lib, test_file_wrapper_lib ] }, - { 'name': 'qemuxml2xmltest', 'link_with': [ test_utils_qemu_lib, test_= qemu_driver_lib, test_file_wrapper_lib ] }, + { 'name': 'qemuagenttest', 'link_with': [ test_qemu_driver_lib, test_u= tils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemublocktest', 'link_with': [ test_qemu_driver_lib, test_u= tils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemucapabilitiestest', 'link_with': [ test_qemu_driver_lib,= test_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemucaps2xmltest', 'link_with': [ test_qemu_driver_lib ], '= link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemucommandutiltest', 'link_with': [ test_qemu_driver_lib, = test_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemudomaincheckpointxml2xmltest', 'link_with': [ test_qemu_= driver_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemudomainsnapshotxml2xmltest', 'link_with': [ test_qemu_dr= iver_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemufirmwaretest', 'link_with': [ test_qemu_driver_lib ], '= link_whole': [ test_file_wrapper_lib ] }, + { 'name': 'qemuhotplugtest', 'link_with': [ test_qemu_driver_lib, test= _utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemumemlocktest', 'link_with': [ test_qemu_driver_lib ], 'l= ink_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemumigparamstest', 'link_with': [ test_qemu_driver_lib, te= st_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemumonitorjsontest', 'link_with': [ test_qemu_driver_lib, = test_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib ] }, + { 'name': 'qemusecuritytest', 'sources': [ 'qemusecuritytest.c', 'qemu= securitymock.c' ], 'link_with': [ test_qemu_driver_lib ], 'link_whole': [ t= est_utils_qemu_lib ] }, + { 'name': 'qemuvhostusertest', 'link_with': [ test_qemu_driver_lib ], = 'link_whole': [ test_file_wrapper_lib ] }, + { 'name': 'qemuxml2argvtest', 'link_with': [ test_qemu_driver_lib, tes= t_utils_qemu_monitor_lib ], 'link_whole': [ test_utils_qemu_lib, test_file_= wrapper_lib ] }, + { 'name': 'qemuxml2xmltest', 'link_with': [ test_qemu_driver_lib ], 'l= ink_whole': [ test_utils_qemu_lib, test_file_wrapper_lib ] }, ] endif =20 @@ -481,7 +491,7 @@ if conf.has('WITH_SECDRIVER_SELINUX') =20 if conf.has('WITH_QEMU') tests +=3D [ - { 'name': 'securityselinuxlabeltest', 'link_with': [ test_utils_qe= mu_lib ] }, + { 'name': 'securityselinuxlabeltest', 'link_whole': [ test_utils_q= emu_lib ] }, ] endif endif @@ -559,9 +569,12 @@ foreach data : tests ], link_with: [ libvirt_lib, - test_utils_lib, data.get('link_with', []), ], + link_whole: [ + test_utils_lib, + data.get('link_whole', []), + ], export_dynamic: true, ) test(data['name'], test_bin, env: tests_env) @@ -670,8 +683,9 @@ add_test_setup( 'access', env: [ 'VIR_TEST_FILE_ACCESS=3D1', + runutf8, ], - exe_wrapper: [ meson_python_prog, check_file_access_prog ], + exe_wrapper: [ python3_prog, check_file_access_prog.path() ], ) =20 add_test_setup( @@ -682,5 +696,6 @@ add_test_setup( '--suppressions=3D@0@'.format(meson.current_source_dir() / '.valgrind.= supp'), '--error-exitcode=3D1', ], + # default timeout in meson is 30s timeout_multiplier: 4, ) diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c index ba26e7bd455..2c3715ae0cc 100644 --- a/tests/virmockstathelpers.c +++ b/tests/virmockstathelpers.c @@ -38,12 +38,13 @@ * * On 32-bit hosts they refer to the 32-bit & 64-bit ABIs respectively. * - * Libvirt uses _FILE_OFFSET_BITS=3D64 on 32-bit hosts, which causes the - * C library to transparently rewrite stat() calls to be stat64() calls. - * Libvirt will never see the 32-bit ABI from the traditional stat() - * call. We cannot assume this rewriting is done using a macro. It might - * be, but on GLibC it is done with a magic __asm__ statement to apply - * the rewrite at link time instead of at preprocessing. + * With meson libvirt will have _FILE_OFFSET_BITS=3D64 always defined. + * On 32-bit hosts it causes the C library to transparently rewrite + * stat() calls to be stat64() calls. Libvirt will never see the 32-bit + * ABI from the traditional stat() call. We cannot assume this rewriting + * is done using a macro. It might be, but on GLibC it is done with a + * magic __asm__ statement to apply the rewrite at link time instead of + * at preprocessing. * * In GLibC there may be two additional functions exposed by the headers, * __xstat() and __xstat64(). When these exist, stat() and stat64() are @@ -57,14 +58,7 @@ * With all this in mind the list of functions we have to mock will depend * on several factors * - * - If _FILE_OFFSET_BITS is set, then we are on a 32-bit host, and we - * only need to mock stat64 and __xstat64. The other stat / __xstat - * functions exist, but we'll never call them so they can be ignored - * for mocking. - * - * - If _FILE_OFFSET_BITS is not set, then we are on a 64-bit host and - * we should mock stat, stat64, __xstat & __xstat64. Either may be - * called by app code. + * - If the stat or __xstat but there is no 64-bit version. * * - If __xstat & __xstat64 exist, then stat & stat64 will not exist * as symbols in the library, so the latter should not be mocked. @@ -74,25 +68,25 @@ =20 =20 =20 -#if defined(HAVE_STAT) && !defined(HAVE___XSTAT) && !defined(_FILE_OFFSET_= BITS) +#if defined(HAVE_STAT) && !defined(HAVE___XSTAT) && !defined(HAVE_STAT64) # define MOCK_STAT #endif #if defined(HAVE_STAT64) && !defined(HAVE___XSTAT64) # define MOCK_STAT64 #endif -#if defined(HAVE___XSTAT) && !defined(_FILE_OFFSET_BITS) +#if defined(HAVE___XSTAT) && !defined(HAVE___XSTAT64) # define MOCK___XSTAT #endif #if defined(HAVE___XSTAT64) # define MOCK___XSTAT64 #endif -#if defined(HAVE_LSTAT) && !defined(HAVE___LXSTAT) && !defined(_FILE_OFFSE= T_BITS) +#if defined(HAVE_LSTAT) && !defined(HAVE___LXSTAT) && !defined(HAVE_LSTAT6= 4) # define MOCK_LSTAT #endif #if defined(HAVE_LSTAT64) && !defined(HAVE___LXSTAT64) # define MOCK_LSTAT64 #endif -#if defined(HAVE___LXSTAT) && !defined(_FILE_OFFSET_BITS) +#if defined(HAVE___LXSTAT) && !defined(HAVE___LXSTAT64) # define MOCK___LXSTAT #endif #if defined(HAVE___LXSTAT64) diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test index 8dbe82a6b98..83f53acef61 100755 --- a/tests/virt-aa-helper-test +++ b/tests/virt-aa-helper-test @@ -15,13 +15,13 @@ fi =20 output=3D"/dev/null" use_valgrind=3D"" -ld_library_path=3D"../src/" +ld_library_path=3D"$abs_top_builddir/src/" if [ ! -z "$1" ] && [ "$1" =3D "-d" ]; then output=3D"/dev/stdout" shift fi =20 -exe=3D"../src/virt-aa-helper" +exe=3D"$abs_top_builddir/src/virt-aa-helper" if [ ! -z "$1" ]; then if [ "$1" =3D "-v" ]; then use_valgrind=3D"yes" diff --git a/tools/bash-completion/meson.build b/tools/bash-completion/meso= n.build index 4cc0892accf..8924c93adf5 100644 --- a/tools/bash-completion/meson.build +++ b/tools/bash-completion/meson.build @@ -1,13 +1,11 @@ install_data('vsh', install_dir: bash_completion_dir) =20 meson.add_install_script( - install_symlink_prog.path(), - bash_completion_dir, - 'vsh', 'virsh', + meson_python_prog.path(), python3_prog.path(), meson_install_symlink_pro= g.path(), + bash_completion_dir, 'vsh', 'virsh', ) =20 meson.add_install_script( - install_symlink_prog.path(), - bash_completion_dir, - 'vsh', 'virt-admin', + meson_python_prog.path(), python3_prog.path(), meson_install_symlink_pro= g.path(), + bash_completion_dir, 'vsh', 'virt-admin', ) diff --git a/tools/meson.build b/tools/meson.build index f2c2af764b7..090179470a5 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -12,7 +12,11 @@ tools_dep =3D declare_dependency( util_inc_dir, top_inc_dir, ], - link_args: libvirt_relro + libvirt_no_indirect + libvirt_no_undefined, + link_args: ( + libvirt_relro + + libvirt_no_indirect + + libvirt_no_undefined + ), ) =20 libvirt_shell_lib =3D static_library( @@ -235,6 +239,7 @@ configure_file( configuration: tools_conf, install: true, install_dir: bindir, + install_mode: 'rwxrwxr-x', ) =20 configure_file( @@ -243,6 +248,7 @@ configure_file( configuration: tools_conf, install: true, install_dir: bindir, + install_mode: 'rwxrwxr-x', ) =20 if conf.has('WITH_SANLOCK') @@ -252,6 +258,7 @@ if conf.has('WITH_SANLOCK') configuration: tools_conf, install: true, install_dir: sbindir, + install_mode: 'rwxrwxr-x', ) endif =20 @@ -261,6 +268,7 @@ configure_file( configuration: tools_conf, install: true, install_dir: libexecdir, + install_mode: 'rwxrwxr-x', ) =20 if init_script =3D=3D 'systemd' diff --git a/tools/virsh.c b/tools/virsh.c index 197a90636d3..06ff5e83365 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -614,9 +614,7 @@ virshShowVersion(vshControl *ctl G_GNUC_UNUSED) #ifdef WITH_SECRETS vshPrint(ctl, " Secrets"); #endif -#ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); -#endif #ifdef WITH_DTRACE_PROBES vshPrint(ctl, " DTrace"); #endif diff --git a/tools/virt-admin.c b/tools/virt-admin.c index fef0332a0d3..8a166e2c7f7 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -1277,9 +1277,7 @@ vshAdmShowVersion(vshControl *ctl G_GNUC_UNUSED) #ifdef WITH_LIBVIRTD vshPrint(ctl, " Daemon"); #endif -#ifdef ENABLE_DEBUG vshPrint(ctl, " Debug"); -#endif #if WITH_READLINE vshPrint(ctl, " Readline"); #endif diff --git a/tools/vsh.c b/tools/vsh.c index b65e99cbd20..9701613924b 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2396,6 +2396,10 @@ vshEditWriteToTempFile(vshControl *ctl, const char *= doc) #define ACCEPTED_CHARS \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-/_.:@" =20 +/* Hard-code default editor used as a fallback if not configured by + * VISUAL or EDITOR environment variables. */ +#define DEFAULT_EDITOR "vi" + int vshEditFile(vshControl *ctl, const char *filename) { --MEatx1zidE5asLAI-- --lLbDBsvWahy0xqFJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEcbzs91ho/coWWY7aUi1kczAH4YwFAl8hidwACgkQUi1kczAH 4YwsEg/7BcPg5b33uxB8VU3e5fFnbeUXXuW+RMdm6F/BcLUmQ3Dvtlwmc0NZwswO kGYuFWdk1y/lMhRKRIR/Y1a/KBK3zCaNHkKXqLIukqa2+Di0DnbaK2JNKc8LlEsO zlegKalUj9p9WKAvlL62j/0aYrhxSfrx0X8+KTKQUv9WmfD8UEvs6V58aqNToWMZ lHavMlI2sJ6cF+pwDH6MElT4LqqR+aKvK54AVR6Sj2g8cXF6sjzk8mepDceoNen0 q9rlXc6q2+JzRYSpQaoNBEu/djZHYgwKQI2NatktRDINIF1JZ5uUhyGYskejEWo2 DuAZ87uLBggPd7AkGTzTMkAytfixBxItH34gF2JvqQ7nGaE/+QFF1uyyfA+EoO2y DKnwLFNXuIqlu+gI0/OkF81k0esDczsclpRYH/7UC2brVfaW3+3MNvYJWkV11YjW TCO/xaQMqv7UavTWmhKEip+g0gBfIEErzjXquA9WKfsSrJh8WrJfCZA6mk0k11f/ FImVCwgafGjEcQQVv7/SZG+3azTROzH5U99elrCe5itMZt2LbmrFDu1yzCW8GbYL BaTOOBnmI0L5AW6h7LnaTrI5/GqsRdI/DgvdFZ1Q22IDbXR2DeteUWopuJIuVOqQ IHoOpl53zU7Jqd609PSDLpcoBsxvxqpeG40hiKD2yPsq7WBa9Zs= =Q/14 -----END PGP SIGNATURE----- --lLbDBsvWahy0xqFJ--