summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/libvirt/files')
-rw-r--r--app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch32
-rw-r--r--app-emulation/libvirt/files/libvirt-8.7.0-meson-Stop-detecting-Wl-version-script.patch55
-rw-r--r--app-emulation/libvirt/files/libvirt-9.2.0-meson-Stop-detecting-Wl-version-script.patch53
3 files changed, 123 insertions, 17 deletions
diff --git a/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
index 5bab5d69856a..544eb944f9e7 100644
--- a/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
+++ b/app-emulation/libvirt/files/libvirt-8.2.0-fix-paths-for-apparmor.patch
@@ -6,19 +6,11 @@ Subject: [PATCH] libvirt-8.2.0-fix-paths-for-apparmor.patch
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
- src/security/apparmor/libvirt-qemu | 1 +
- src/security/apparmor/meson.build | 6 +++---
- ...t-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} | 2 +-
- ...elper.local => usr.libexec.libvirt.virt-aa-helper.local} | 0
- 4 files changed, 5 insertions(+), 4 deletions(-)
- rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper.in => usr.libexec.libvirt.virt-aa-helper.in} (97%)
- rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper.local => usr.libexec.libvirt.virt-aa-helper.local} (100%)
-
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
-index 250ba4ea58..1599289932 100644
+index 44056b5f14..1f0db2cda2 100644
--- a/src/security/apparmor/libvirt-qemu
+++ b/src/security/apparmor/libvirt-qemu
-@@ -95,6 +95,7 @@
+@@ -96,6 +96,7 @@
/usr/share/sgabios/** r,
/usr/share/slof/** r,
/usr/share/vgabios/** r,
@@ -27,7 +19,7 @@ index 250ba4ea58..1599289932 100644
# pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140)
/etc/pki/CA/ r,
diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meson.build
-index 990f00b4f3..2a2235c89a 100644
+index 58b4024b85..c77b32665d 100644
--- a/src/security/apparmor/meson.build
+++ b/src/security/apparmor/meson.build
@@ -1,5 +1,5 @@
@@ -37,7 +29,7 @@ index 990f00b4f3..2a2235c89a 100644
'usr.sbin.libvirtd',
'usr.sbin.virtqemud',
'usr.sbin.virtxend',
-@@ -34,7 +34,7 @@ install_data(
+@@ -35,7 +35,7 @@ install_data(
)
install_data(
@@ -48,12 +40,21 @@ index 990f00b4f3..2a2235c89a 100644
+ rename: 'usr.libexec.libvirt.virt-aa-helper',
)
diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
-similarity index 97%
+similarity index 94%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
-index ff1d46bebe..4f2679de7b 100644
+index ff1d46bebe..6beedde1b1 100644
--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ b/src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.in
+@@ -41,7 +41,7 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper {
+ deny /dev/mapper/* r,
+
+ @libexecdir@/virt-aa-helper mr,
+- /{usr/,}sbin/apparmor_parser Ux,
++ /{usr/,}{s,}bin/apparmor_parser Ux,
+
+ @sysconfdir@/apparmor.d/libvirt/* r,
+ @sysconfdir@/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
@@ -71,5 +71,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper {
/**.[iI][sS][oO] r,
/**/disk{,.*} r,
@@ -65,6 +66,3 @@ diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local b/src/se
similarity index 100%
rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.local
rename to src/security/apparmor/usr.libexec.libvirt.virt-aa-helper.local
---
-2.34.1
-
diff --git a/app-emulation/libvirt/files/libvirt-8.7.0-meson-Stop-detecting-Wl-version-script.patch b/app-emulation/libvirt/files/libvirt-8.7.0-meson-Stop-detecting-Wl-version-script.patch
new file mode 100644
index 000000000000..749e580b4432
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-8.7.0-meson-Stop-detecting-Wl-version-script.patch
@@ -0,0 +1,55 @@
+From ab5ce6ac561b9ef5d97ee8268df048b3432d7b8b Mon Sep 17 00:00:00 2001
+Message-Id: <ab5ce6ac561b9ef5d97ee8268df048b3432d7b8b.1679397051.git.mprivozn@redhat.com>
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 20 Mar 2023 13:38:27 +0100
+Subject: [PATCH] meson: Stop detecting -Wl,--version-script=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With its version 16.0, the LLVM's linker turned on
+--no-undefined-version by default [1]. This breaks how we detect
+--version-script= detection, because at the compile time there's
+no library built yet that we can use to make --version-script=
+happy. Unfortunately, meson does not provide a way to detect this
+either [2].
+
+But there's not much sense in detecting the argument either. We
+already special case some systems (windows, darwin) and do the
+check for others, which are expected to support versioned
+symbols, because of ELF. Worst case scenario - the error is
+reported during compile time rather than configure time.
+
+1: https://reviews.llvm.org/D135402
+2: https://github.com/mesonbuild/meson/issues/3047
+
+Resolves: https://bugs.gentoo.org/902211
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+(cherry picked from commit 743fdb97c81f38adc6e9b55f402244f7982352f4)
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ meson.build | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 0b3187ad88..53156329a4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -514,12 +514,7 @@ elif host_machine.system() == 'darwin'
+ # macOS libraries don't support symbol versioning
+ version_script_flags = ''
+ else
+- test_file = '@0@/src/libvirt_qemu.syms'.format(meson.source_root())
+- if cc.has_link_argument('-Wl,--version-script=@0@'.format(test_file))
+- version_script_flags = '-Wl,--version-script='
+- else
+- error('No supported version script link argument found.')
+- endif
++ version_script_flags = '-Wl,--version-script='
+ endif
+
+ libvirt_flat_namespace = []
+--
+2.39.2
+
diff --git a/app-emulation/libvirt/files/libvirt-9.2.0-meson-Stop-detecting-Wl-version-script.patch b/app-emulation/libvirt/files/libvirt-9.2.0-meson-Stop-detecting-Wl-version-script.patch
new file mode 100644
index 000000000000..18b36c92a149
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-9.2.0-meson-Stop-detecting-Wl-version-script.patch
@@ -0,0 +1,53 @@
+From 743fdb97c81f38adc6e9b55f402244f7982352f4 Mon Sep 17 00:00:00 2001
+Message-Id: <743fdb97c81f38adc6e9b55f402244f7982352f4.1679396460.git.mprivozn@redhat.com>
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 20 Mar 2023 13:38:27 +0100
+Subject: [PATCH] meson: Stop detecting -Wl,--version-script=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With its version 16.0, the LLVM's linker turned on
+--no-undefined-version by default [1]. This breaks how we detect
+--version-script= detection, because at the compile time there's
+no library built yet that we can use to make --version-script=
+happy. Unfortunately, meson does not provide a way to detect this
+either [2].
+
+But there's not much sense in detecting the argument either. We
+already special case some systems (windows, darwin) and do the
+check for others, which are expected to support versioned
+symbols, because of ELF. Worst case scenario - the error is
+reported during compile time rather than configure time.
+
+1: https://reviews.llvm.org/D135402
+2: https://github.com/mesonbuild/meson/issues/3047
+
+Resolves: https://bugs.gentoo.org/902211
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
+---
+ meson.build | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c35823a79a..a0682e8d0b 100644
+--- a/meson.build
++++ b/meson.build
+@@ -534,12 +534,7 @@ elif host_machine.system() == 'darwin'
+ # macOS libraries don't support symbol versioning
+ version_script_flags = ''
+ else
+- test_file = '@0@/src/libvirt_qemu.syms'.format(meson.project_source_root())
+- if cc.has_link_argument('-Wl,--version-script=@0@'.format(test_file))
+- version_script_flags = '-Wl,--version-script='
+- else
+- error('No supported version script link argument found.')
+- endif
++ version_script_flags = '-Wl,--version-script='
+ endif
+
+ libvirt_flat_namespace = []
+--
+2.39.2
+