[arch-commits] Commit in libvirt/repos (5 files)

Frederik Schwan freswa at gemini.archlinux.org
Thu Sep 1 16:07:41 UTC 2022


    Date: Thursday, September 1, 2022 @ 16:07:41
  Author: freswa
Revision: 1290366

archrelease: copy trunk to community-testing-x86_64

Added:
  libvirt/repos/community-testing-x86_64/
  libvirt/repos/community-testing-x86_64/PKGBUILD
    (from rev 1290365, libvirt/trunk/PKGBUILD)
  libvirt/repos/community-testing-x86_64/glibc-2.36-lxc-fix.patch
    (from rev 1290365, libvirt/trunk/glibc-2.36-lxc-fix.patch)
  libvirt/repos/community-testing-x86_64/glibc-2.36-virfile-fix.patch
    (from rev 1290365, libvirt/trunk/glibc-2.36-virfile-fix.patch)
  libvirt/repos/community-testing-x86_64/keys/

------------------------------+
 PKGBUILD                     |  190 +++++++++++++++++++++++++++++++++++++++++
 glibc-2.36-lxc-fix.patch     |   37 +++++++
 glibc-2.36-virfile-fix.patch |   42 +++++++++
 3 files changed, 269 insertions(+)

Copied: libvirt/repos/community-testing-x86_64/PKGBUILD (from rev 1290365, libvirt/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2022-09-01 16:07:41 UTC (rev 1290366)
@@ -0,0 +1,190 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at archlinux.org>
+# Maintainer: Robin Broda <robin at broda.me>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Jonathan Wiersma <archaur at jonw dot org>
+
+pkgname=(libvirt libvirt-storage-gluster libvirt-storage-iscsi-direct)
+epoch=1
+pkgver=8.7.0
+pkgrel=1
+pkgdesc="API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)"
+arch=('x86_64')
+url="https://libvirt.org/"
+license=('LGPL' 'GPL3') #libvirt_parthelper links to libparted which is GPL3 only
+depends=('libpciaccess' 'yajl' 'fuse3' 'gnutls' 'parted' 'libssh' 'libxml2' 'numactl' 'polkit')
+makedepends=('meson' 'libxslt' 'python-docutils' 'lvm2' 'open-iscsi' 'libiscsi' 'glusterfs'
+             'bash-completion' 'rpcsvc-proto' 'dnsmasq' 'iproute2' 'qemu-base')
+optdepends=('libvirt-storage-gluster: Gluster storage backend'
+            'libvirt-storage-iscsi-direct: iSCSI-direct storage backend'
+            'gettext: required for libvirt-guests.service'
+            'openbsd-netcat: for remote management over ssh'
+            'dmidecode: DMI system info support'
+            'dnsmasq: required for default NAT/DHCP for guests'
+            'radvd: IPv6 RAD support'
+            'iptables-nft: required for default NAT networking'
+            'qemu-desktop: QEMU/KVM support'
+            'qemu-emulators-full: Support of additional QEMU architectures'
+            'lvm2: Logical Volume Manager support'
+            'open-iscsi: iSCSI support via iscsiadm'
+            'swtpm: TPM emulator support')
+
+backup=(
+  'etc/libvirt/libvirt-admin.conf'
+  'etc/libvirt/libvirt.conf'
+  'etc/libvirt/libvirtd.conf'
+  'etc/libvirt/lxc.conf'
+  'etc/libvirt/nwfilter/allow-arp.xml'
+  'etc/libvirt/nwfilter/allow-dhcp-server.xml'
+  'etc/libvirt/nwfilter/allow-dhcpv6-server.xml'
+  'etc/libvirt/nwfilter/allow-dhcp.xml'
+  'etc/libvirt/nwfilter/allow-dhcpv6.xml'
+  'etc/libvirt/nwfilter/allow-incoming-ipv4.xml'
+  'etc/libvirt/nwfilter/allow-incoming-ipv6.xml'
+  'etc/libvirt/nwfilter/allow-ipv6.xml'
+  'etc/libvirt/nwfilter/allow-ipv4.xml'
+  'etc/libvirt/nwfilter/clean-traffic-gateway.xml'
+  'etc/libvirt/nwfilter/clean-traffic.xml'
+  'etc/libvirt/nwfilter/no-arp-ip-spoofing.xml'
+  'etc/libvirt/nwfilter/no-arp-mac-spoofing.xml'
+  'etc/libvirt/nwfilter/no-arp-spoofing.xml'
+  'etc/libvirt/nwfilter/no-ip-multicast.xml'
+  'etc/libvirt/nwfilter/no-ipv6-multicast.xml'
+  'etc/libvirt/nwfilter/no-ip-spoofing.xml'
+  'etc/libvirt/nwfilter/no-ipv6-spoofing.xml'
+  'etc/libvirt/nwfilter/no-mac-spoofing.xml'
+  'etc/libvirt/nwfilter/no-mac-broadcast.xml'
+  'etc/libvirt/nwfilter/no-other-l2-traffic.xml'
+  'etc/libvirt/nwfilter/no-other-rarp-traffic.xml'
+  'etc/libvirt/nwfilter/qemu-announce-self-rarp.xml'
+  'etc/libvirt/nwfilter/qemu-announce-self.xml'
+  'etc/libvirt/qemu.conf'
+  'etc/libvirt/qemu-lockd.conf'
+  'etc/libvirt/qemu/networks/default.xml'
+  'etc/libvirt/virtchd.conf'
+  'etc/libvirt/virtinterfaced.conf'
+  'etc/libvirt/virtlockd.conf'
+  'etc/libvirt/virtlogd.conf'
+  'etc/libvirt/virt-login-shell.conf'
+  'etc/libvirt/virtlxcd.conf'
+  'etc/libvirt/virtnetworkd.conf'
+  'etc/libvirt/virtnodedevd.conf'
+  'etc/libvirt/virtnwfilterd.conf'
+  'etc/libvirt/virtproxyd.conf'
+  'etc/libvirt/virtqemud.conf'
+  'etc/libvirt/virtsecretd.conf'
+  'etc/libvirt/virtstoraged.conf'
+  'etc/libvirt/virtvboxd.conf'
+  'etc/logrotate.d/libvirtd'
+  'etc/logrotate.d/libvirtd.lxc'
+  'etc/logrotate.d/libvirtd.qemu'
+  'etc/sasl2/libvirt.conf'
+)
+options=(debug)
+source=(
+  "https://libvirt.org/sources/$pkgname-$pkgver.tar.xz"{,.asc}
+)
+sha256sums=('72e63a0f27911e339afd8269c6e8b029721893940edec11e09e471944f60e538'
+            'SKIP')
+validpgpkeys=('453B65310595562855471199CA68BE8010084C9C') # Jiří Denemark <jdenemar at redhat.com>
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  sed -i 's|/sysconfig/|/conf.d/|g' \
+    src/remote/libvirtd.service.in \
+    tools/{libvirt-guests.service,libvirt-guests.sh,virt-pki-validate}.in \
+    docs/manpages/libvirt-guests.rst \
+    src/locking/virtlockd.service.in \
+    src/logging/virtlogd.service.in
+  sed -i 's|/usr/libexec/qemu-bridge-helper|/usr/lib/qemu/qemu-bridge-helper|g' \
+    src/qemu/qemu.conf.in \
+    src/qemu/test_libvirtd_qemu.aug.in
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  arch-meson build \
+    --libexecdir=lib/libvirt \
+    -Drunstatedir=/run \
+    -Dqemu_user=libvirt-qemu \
+    -Dqemu_group=libvirt-qemu \
+    -Dnetcf=disabled \
+    -Dopenwsman=disabled \
+    -Dapparmor=disabled \
+    -Dapparmor_profiles=disabled \
+    -Dselinux=disabled \
+    -Dwireshark_dissector=disabled \
+    -Ddriver_bhyve=disabled \
+    -Ddriver_hyperv=disabled \
+    -Ddriver_libxl=disabled \
+    -Ddriver_vz=disabled \
+    -Dsanlock=disabled \
+    -Dsecdriver_apparmor=disabled \
+    -Dsecdriver_selinux=disabled \
+    -Dstorage_sheepdog=disabled \
+    -Dstorage_vstorage=disabled \
+    -Ddtrace=disabled \
+    -Dnumad=disabled \
+    -Dstorage_zfs=enabled\
+    -Dstorage_rbd=disabled
+
+  ninja -C build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+
+  ninja -C build test
+}
+
+package_libvirt() {
+  provides=("libvirt=$pkgver" 'libvirt.so' 'libvirt-admin.so' 'libvirt-lxc.so' 'libvirt-qemu.so')
+  cd "$pkgname-$pkgver"
+  DESTDIR="$pkgdir" ninja -C build install
+
+  mkdir "$pkgdir"/usr/lib/{sysusers,tmpfiles}.d
+  echo 'g libvirt - -' > "$pkgdir/usr/lib/sysusers.d/libvirt.conf"
+  echo 'u libvirt-qemu /var/lib/libvirt "Libvirt QEMU user"' >> "$pkgdir/usr/lib/sysusers.d/libvirt.conf"
+  echo 'm libvirt-qemu kvm' >> "$pkgdir/usr/lib/sysusers.d/libvirt.conf"
+  echo 'z /var/lib/libvirt/qemu 0751' > "$pkgdir/usr/lib/tmpfiles.d/libvirt.conf"
+
+  chown 0:102 "$pkgdir/usr/share/polkit-1/rules.d"
+  chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d"
+  chmod 600 "$pkgdir"/etc/libvirt/nwfilter/*.xml \
+    "$pkgdir/etc/libvirt/qemu/networks/default.xml"
+  chmod 700 "$pkgdir"/etc/libvirt/secrets
+
+  rm -rf \
+    "$pkgdir/run" \
+    "$pkgdir/var/lib/libvirt/qemu" \
+    "$pkgdir/var/cache/libvirt/qemu" \
+    "$pkgdir/etc/logrotate.d/libvirtd.libxl"
+
+  rm -f "$pkgdir/etc/libvirt/qemu/networks/autostart/default.xml"
+
+  # move split modules
+  mv "$pkgdir"/usr/lib/libvirt/storage-backend/libvirt_storage_backend_gluster.so "$pkgdir/../"
+  mv "$pkgdir/usr/lib/libvirt/storage-backend/libvirt_storage_backend_iscsi-direct.so" "$pkgdir/../"
+  mv "$pkgdir/usr/lib/libvirt/storage-file/libvirt_storage_file_gluster.so" "$pkgdir/../"
+}
+
+package_libvirt-storage-gluster() {
+  pkgdesc="Libvirt Gluster storage backend"
+  depends=("libvirt=$pkgver" 'glusterfs')
+  optdepends=()
+  backup=()
+
+  install -Dv -t "$pkgdir/usr/lib/libvirt/storage-backend" "$pkgdir/../libvirt_storage_backend_gluster.so"
+  install -Dv -t "$pkgdir/usr/lib/libvirt/storage-file" "$pkgdir/../libvirt_storage_file_gluster.so"
+}
+
+package_libvirt-storage-iscsi-direct() {
+  pkgdesc="Libvirt iSCSI-direct storage backend"
+  depends=("libvirt=$pkgver" 'libiscsi')
+  optdepends=()
+  backup=()
+
+  install -Dv -t "$pkgdir/usr/lib/libvirt/storage-backend" "$pkgdir/../libvirt_storage_backend_iscsi-direct.so"
+}

Copied: libvirt/repos/community-testing-x86_64/glibc-2.36-lxc-fix.patch (from rev 1290365, libvirt/trunk/glibc-2.36-lxc-fix.patch)
===================================================================
--- community-testing-x86_64/glibc-2.36-lxc-fix.patch	                        (rev 0)
+++ community-testing-x86_64/glibc-2.36-lxc-fix.patch	2022-09-01 16:07:41 UTC (rev 1290366)
@@ -0,0 +1,37 @@
+From 9493c9b79dc541ec9e0fd73c6d87bdf8d30aaa90 Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso at redhat.com>
+Date: Mon, 1 Aug 2022 15:20:38 -0400
+Subject: [PATCH] lxc: containter: fix build with glibc 2.36
+
+With glibc 2.36, sys/mount.h and linux/mount.h conflict:
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+
+lxc_container.c imports sys/mount.h and linux/fs.h, which pulls in
+linux/mount.h.
+
+linux/fs.h isn't required here though. glibc sys/mount.h has had
+MS_MOVE since 2.12 in 2010
+
+Reviewed-by: Erik Skultety <eskultet at redhat.com>
+Signed-off-by: Cole Robinson <crobinso at redhat.com>
+---
+ src/lxc/lxc_container.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
+index b5278831da..a5401c2186 100644
+--- a/src/lxc/lxc_container.c
++++ b/src/lxc/lxc_container.c
+@@ -33,9 +33,6 @@
+ /* Yes, we want linux private one, for _syscall2() macro */
+ #include <linux/unistd.h>
+ 
+-/* For MS_MOVE */
+-#include <linux/fs.h>
+-
+ #if WITH_CAPNG
+ # include <cap-ng.h>
+ #endif
+-- 
+GitLab
+

Copied: libvirt/repos/community-testing-x86_64/glibc-2.36-virfile-fix.patch (from rev 1290365, libvirt/trunk/glibc-2.36-virfile-fix.patch)
===================================================================
--- community-testing-x86_64/glibc-2.36-virfile-fix.patch	                        (rev 0)
+++ community-testing-x86_64/glibc-2.36-virfile-fix.patch	2022-09-01 16:07:41 UTC (rev 1290366)
@@ -0,0 +1,42 @@
+From c0d9adf220dc0d223330a7bac37b174132d330ba Mon Sep 17 00:00:00 2001
+From: Cole Robinson <crobinso at redhat.com>
+Date: Mon, 1 Aug 2022 15:24:01 -0400
+Subject: [PATCH] virfile: Fix build with glibc 2.36
+
+With glibc 2.36, sys/mount.h and linux/mount.h conflict:
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+
+virfile.c imports sys/mount.h and linux/fs.h, which pulls in
+linux/mount.h.
+
+Manually define the constants we need from linux/fs.h, like was
+done in llvm:
+
+https://reviews.llvm.org/rGb379129c4beb3f26223288627a1291739f33af02
+
+Reviewed-by: Erik Skultety <eskultet at redhat.com>
+Signed-off-by: Cole Robinson <crobinso at redhat.com>
+---
+ src/util/virfile.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/util/virfile.c b/src/util/virfile.c
+index 99da058db3..ce541b8946 100644
+--- a/src/util/virfile.c
++++ b/src/util/virfile.c
+@@ -71,7 +71,11 @@
+ # endif
+ # include <sys/ioctl.h>
+ # include <linux/cdrom.h>
+-# include <linux/fs.h>
++/* These come from linux/fs.h, but that header conflicts with
++ * sys/mount.h on glibc 2.36+ */
++# define FS_IOC_GETFLAGS _IOR('f', 1, long)
++# define FS_IOC_SETFLAGS _IOW('f', 2, long)
++# define FS_NOCOW_FL 0x00800000
+ #endif
+ 
+ #if WITH_LIBATTR
+-- 
+GitLab
+



More information about the arch-commits mailing list