From patchwork Tue Aug 2 10:26:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12934492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07BE9C00140 for ; Tue, 2 Aug 2022 10:26:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.379235.612527 (Exim 4.92) (envelope-from ) id 1oIp6S-0003Xm-Do; Tue, 02 Aug 2022 10:26:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 379235.612527; Tue, 02 Aug 2022 10:26:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oIp6S-0003Xf-Ah; Tue, 02 Aug 2022 10:26:20 +0000 Received: by outflank-mailman (input) for mailman id 379235; Tue, 02 Aug 2022 10:26:18 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oIp6Q-0003I8-Dd for xen-devel@lists.xenproject.org; Tue, 02 Aug 2022 10:26:18 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8aeb72fb-124d-11ed-bd2d-47488cf2e6aa; Tue, 02 Aug 2022 12:26:17 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8aeb72fb-124d-11ed-bd2d-47488cf2e6aa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1659435977; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VglZLcyUFY4jo3jNwX1yvw5xUZlZ47FlvX09rpWoHdM=; b=NHyh6l9W0jR61CjmKsjXT29TGnZkNnlwLFMsO6+UjH9sops6GcuDWuN4 tmLgN439YlQyKzeWbgw3TcM2/tuBzjWGQcL+x9NgrplmH1oA8UWidz/C2 3P6XzR6u263ISmPqmHwZSpUKGNHic0wtc1Yce1FYmqjSRZIG+fHmxShoH o=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 79720159 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:SB1/uq/xEv2oWdzinsLsDrUD5H6TJUtcMsCJ2f8bNWPcYEJGY0x3m moXXWiBOPqJZzHzL910OYW3ph8A65SHz99rTVds+yw8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9z8kvU2xbuKUIPbePSxsThNTRi4kiBZy88Y0mYctitWia++3k YqaT/b3ZRn0gFaYDkpOs/jZ8EM35qyr0N8llgdWic5j7Qe2e0Y9VPrzFYnpR1PkT49dGPKNR uqr5NlVKUuAon/Bovv8+lrKWhViroz6ZGBiuVIPM0SWuTBQpzRa70oOHKF0hXG7Kdm+t4sZJ N1l7fRcQOqyV0HGsLx1vxJwS0mSMUDakVNuzLfWXcG7liX7n3XQL/pGAF02E7JI88hLHUZD6 dM+MysPSUDdrrfjqF67YrEEasULKcDqOMUUu216zCGfBvEjKXzBa/yUv5kChm52350QW6aFD yYaQWMHgBDoahtTOlARGdQmkf2hnHXXeDxEslOF46Ew5gA/ySQugee3aIOIK7RmQ+1lnH+Wu U3t4FjSQSgcEtWN9zTC03Cj07qncSTTB9tJSezQGuRRqFyMxEQDBRsOT1y5rPKlzEmkVLp3O 0ESvyYjs6U23EiqVcXmGQ21pmaeuRwRUMYWFPc1gDxh0YKNvVzfXDJdCGccNpp276faWADGy HeFg9PHOmxmnoGJbn+B2ZGPtjGVaXY8eDpqiTA/cecV3zXyiNht00OTFos6TfTdYs7dQm+pn W3TxMQqr/BK1JNQif3mlbzSq2j0zqUlWDLZ8ek+soiNygpiLLCoaIWzgbQwxaYRdd3JJrVtU ZVtpiR/0AztJcvU/MB1aL9RdIxFHt7cWNEmvXZhHoM66xOm8GO5cIZb7VlWfRk0Y51bKGewO x6C4Gu9AaO/21PzNMdKj3+ZUZx2ncAM6/y/PhwrUja+SscoL1LWlM2fTUWRw3rsgCARrE3LA r/CKJ7EJStLVsxaIM+eHbh1PUkDmn9jngs+hPnTk3ya7FZpTCXNF+dbYAvXP7pRAWHtiFy9z uuz/vCik313ONASqAGNmWLPBTjm9UQGOK0= IronPort-HdrOrdr: A9a23:vqqqLK3NeYdxhSJezPE3SgqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.93,210,1654574400"; d="scan'208";a="79720159" From: Anthony PERARD To: CC: Roger Pau Monne , Ian Jackson , Anthony PERARD Subject: [OSSTEST PATCH 1/2] TestSupport: Add support for installing from backport repo Date: Tue, 2 Aug 2022 11:26:01 +0100 Message-ID: <20220802102602.131992-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220802102602.131992-1-anthony.perard@citrix.com> References: <20220802102602.131992-1-anthony.perard@citrix.com> MIME-Version: 1.0 We are going to need to install package from the debian backport repository in order to do a build. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- Osstest/TestSupport.pm | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 156cac799d58..91b0a7ab23a1 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -73,6 +73,7 @@ BEGIN { target_run_pkgmanager_install target_install_packages target_install_packages_norec target_install_packages_nonfree_nonconcurrent + target_install_packages_backport target_jobdir target_extract_jobdistpath_subdir target_extract_jobdistpath target_extract_distpart target_tftp_prefix @@ -650,8 +651,8 @@ sub target_putfile_root ($$$$;$) { tputfileex('root', @_); } -sub target_run_pkgmanager_install ($$;$$) { - my ($ho, $packagelist, $norec, $force) = @_; +sub target_run_pkgmanager_install ($$;$$$) { + my ($ho, $packagelist, $norec, $force, $backport) = @_; my @cmd; if ($ho->{OS} eq "freebsd") { push @cmd, qw(lockf /var/run/osstest-pkg-lock pkg-static install); @@ -660,6 +661,7 @@ sub target_run_pkgmanager_install ($$;$$) { with-lock-ex -w /var/lock/osstest-apt apt-get); push @cmd, qw(-f) if $force; push @cmd, qw(--no-install-recommends) if $norec; + push @cmd, "-t", "$ho->{Suite}-backports" if $backport; push @cmd, qw(-y install); } push @cmd, @$packagelist; @@ -688,6 +690,27 @@ END apt-get update END } +sub target_install_packages_backport ($@) { + my ($ho, @packages) = @_; + my $had_backport_repo = 0; + target_editfile_root($ho, '/etc/apt/sources.list', sub { + my $suite = $ho->{Suite}; + my $bp_url = Osstest::Debian::debian_mirror_url($ho); + while (<::EI>) { + if (m/^# $suite backports/) { + $had_backport_repo = 1; + } + print ::EO; + } + print ::EO < X-Patchwork-Id: 12934494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAD7EC25B06 for ; Tue, 2 Aug 2022 10:26:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.379236.612534 (Exim 4.92) (envelope-from ) id 1oIp6S-0003Zf-Of; Tue, 02 Aug 2022 10:26:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 379236.612534; Tue, 02 Aug 2022 10:26:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oIp6S-0003ZS-I1; Tue, 02 Aug 2022 10:26:20 +0000 Received: by outflank-mailman (input) for mailman id 379236; Tue, 02 Aug 2022 10:26:19 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oIp6Q-0003I9-W2 for xen-devel@lists.xenproject.org; Tue, 02 Aug 2022 10:26:19 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 890a169d-124d-11ed-924f-1f966e50362f; Tue, 02 Aug 2022 12:26:16 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 890a169d-124d-11ed-924f-1f966e50362f DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1659435975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RqOnTnRfNefeCWQNoTAkEW+3/TCxNE8vkYa6ugEuZYo=; b=O8PiqLNE7abhnTMNbRR3szqjJE9Q+HWHYcbgWoaaNRUu8xfB3SuDRkJA 1XMF953XVIlxOb6iDBDeKtkoUwCVlTl539gVilixX6Qes0xgb9rSY7Lgr e2oPqioDXxC2LJVyQl29u1S+zSkpccQzkeCRk+n8PybM89VSb9QpUDFd9 g=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 76424230 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:N4oXtaKTpytA+5mlFE+RtZUlxSXFcZb7ZxGr2PjKsXjdYENS3mMEy jNJXWvSPf7eMzGjL9t+b47gp0JS68SBztAxQFZlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vraP65xZVF/fngbqLmD+LZMTxGSwZhSSMw4TpugOd8iYNz6TSDK1rlV eja/ouOYzdJ5xYuajhOs/Lb8ks21BjPkGhwUmIWNKgjUGD2zxH5PLpHTYmtIn3xRJVjH+LSb 44vG5ngows1Vz90Yj+Uuu6Tnn8iG9Y+DiDX4pZiYICwgwAqm8AH+v1T2Mzwy6tgo27hc9hZk L2hvHErIOsjFvWkdO81C3G0H8ziVEHvFXCuzXWX6KSuI0P6n3TExtx2EWA4P90hqvt0JzENr vNGEh0zYUXW7w626OrTpuhEg80iKI/gPZ8Fu2EmxjbcZRokacmdGeOQv4YehWpuwJAVdRrdT 5NxhT5HZRLcYxpJKxEPBYg3huuAjXjjaTxI7lmSoMLb5kCMklArjOK2aLI5fPSbTp16mVq8j 1if1F/rBz4WCIPHkz6apyfEaujnwnqgBdN6+KeD3v91gnWDy2oLEhoUWFCn5/6jhSaWS99Zb kAZ5Ccqhawz71CwCMnwWQWip3yJtQJaXMBfe9DW8ynUlPCSuVzAQDFZEHgRM7TKqfPaWxQv/ 0eUvt3rVQU/rb6zGTHG+emugA29bH19wXA5WcMUcecUy4C9/dBv1k+WE4wL/L2d1YOsR2ypq 9yehG1n3uhI05ZWv0mu1Qqf6w9AsKQlWeLcCu//emu+pj10a4e+D2BDwQiKtK0QRGp1o7Tog ZTlpyR9xLpXZX11vHbRKNjh5Znwjxp/DBXSgER0A74q/Cm39niocOh4uW8jdRw2Y55dIm64O Sc/XD+9A7cKZROXgVJfOdrtW6zGM4C6fTgaahwkRoUXOcUgHON21CpveVSRzwjQraTYqolmY M/zWZv9Uh4n5VFPlmXeqxE1jeB2nUjTBAr7GfjG8vhQ+eHGOi7LGedcYQHmgyJQxPrsnTg5O u13b6OioyizmsWkCsUL2eb/9Ww3EEU= IronPort-HdrOrdr: A9a23:0ZkUh6CgYJd0UW7lHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.93,210,1654574400"; d="scan'208";a="76424230" From: Anthony PERARD To: CC: Roger Pau Monne , Ian Jackson , Anthony PERARD Subject: [OSSTEST PATCH 2/2] ts-libvirt-build: Rework to build with meson Date: Tue, 2 Aug 2022 11:26:02 +0100 Message-ID: <20220802102602.131992-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220802102602.131992-1-anthony.perard@citrix.com> References: <20220802102602.131992-1-anthony.perard@citrix.com> MIME-Version: 1.0 libvirt have switch build system to Meson + Ninja, there is no more autogen.sh script. Add missing dependency "libtirpc-dev" and "meson". libvirt needs at least meson 0.54, the version avaiable in Debian Buster is too old, but we can install it from backports. In order to find out if Meson is used or not, we'll check if the "autogen.sh" script is missing. And in the build dir, we will look for a "Makefile". Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- ts-libvirt-build | 70 +++++++++++++++++++++++++++++++++-------------- ts-xen-build-prep | 8 +++++- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/ts-libvirt-build b/ts-libvirt-build index e799f00375f7..16b45cfd02bf 100755 --- a/ts-libvirt-build +++ b/ts-libvirt-build @@ -50,32 +50,56 @@ sub config() { } die "no xen prefix" unless $xenprefix; - # Uses --no-git because otherwise autogen.sh will undo - # submodulefixup's attempts to honour - # revision_libvirt_gnulib. This in turn requires that we specify - # --gnulib-srcdir, but ./autogen.sh doesn't propagate - # --gnulib-srcdir to ./bootstap so we use GNULIB_SRCDIR directly. - my $gnulib = submodule_find($submodules, "gnulib"); - target_cmd_build($ho, 3600, $builddir, <{Path} \\ - ../autogen.sh --no-git \\ - --with-libxl --without-xen --without-xenapi --without-selinux \\ - --without-lxc --without-vbox --without-uml \\ - --without-qemu --without-openvz --without-vmware \\ - --sysconfdir=/etc --localstatedir=/var #/ + my $cflags = "-g -I$xenprefix/include/"; + my $ldflags = "-g -L$xenprefix/lib/ -Wl,-rpath-link=$xenprefix/lib/"; + my $pkg_config_path = "$xenprefix/lib/pkgconfig/"; + + if (target_file_exists($ho, "$builddir/libvirt/autogen.sh")) { + # Uses --no-git because otherwise autogen.sh will undo + # submodulefixup's attempts to honour + # revision_libvirt_gnulib. This in turn requires that we specify + # --gnulib-srcdir, but ./autogen.sh doesn't propagate + # --gnulib-srcdir to ./bootstap so we use GNULIB_SRCDIR directly. + my $gnulib = submodule_find($submodules, "gnulib"); + target_cmd_build($ho, 3600, $builddir, <{Path} \\ + ../autogen.sh --no-git \\ + --with-libxl --without-xen --without-xenapi --without-selinux \\ + --without-lxc --without-vbox --without-uml \\ + --without-qemu --without-openvz --without-vmware \\ + --sysconfdir=/etc --localstatedir=/var #/ +END + } else { + target_cmd_build($ho, 3600, $builddir, <&1 && touch ../../build-ok-stamp) |tee ../log + if [ -e Makefile ]; then + (make $makeflags 2>&1 && touch ../../build-ok-stamp) |tee ../log + else + (ninja 2>&1 && touch ../../build-ok-stamp) |tee ../log + fi test -f ../../build-ok-stamp #/ echo ok. END @@ -85,7 +109,11 @@ sub install() { target_cmd_build($ho, 300, $builddir, <{Suite} =~ m/squeeze|wheezy|jessie/) { @@ -251,6 +252,11 @@ END target_install_packages($ho, 'libc6-dev-i386'); } + if ($ho->{Suite} =~ m/buster/) { + # libvirt needs a newer version of "meson" + target_install_packages_backport($ho, 'meson'); + } + some_extradebs($ho, [ 'DebianExtraPackages', 'build', $ho->{Suite} ]); }