[libvirt PATCH 3/8] apparmor: Allow version-specific bits in abstractions too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Compared to profiles, we only need a single preprocessing step
here, as there is no variable substitution happening.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 .../apparmor/{libvirt-lxc => libvirt-lxc.in}  |  0
 .../{libvirt-qemu => libvirt-qemu.in}         |  0
 src/security/apparmor/meson.build             | 19 +++++++++++++++----
 3 files changed, 15 insertions(+), 4 deletions(-)
 rename src/security/apparmor/{libvirt-lxc => libvirt-lxc.in} (100%)
 rename src/security/apparmor/{libvirt-qemu => libvirt-qemu.in} (100%)

diff --git a/src/security/apparmor/libvirt-lxc b/src/security/apparmor/libvirt-lxc.in
similarity index 100%
rename from src/security/apparmor/libvirt-lxc
rename to src/security/apparmor/libvirt-lxc.in
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu.in
similarity index 100%
rename from src/security/apparmor/libvirt-qemu
rename to src/security/apparmor/libvirt-qemu.in
diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meson.build
index c4745acdb9..8bc2405f88 100644
--- a/src/security/apparmor/meson.build
+++ b/src/security/apparmor/meson.build
@@ -5,6 +5,11 @@ apparmor_gen_profiles = [
   'usr.sbin.virtxend',
 ]
 
+apparmor_gen_abstractions = [
+  'libvirt-qemu',
+  'libvirt-lxc',
+]
+
 apparmor_gen_profiles_conf = configuration_data({
   'sysconfdir': sysconfdir,
   'sbindir': sbindir,
@@ -56,10 +61,16 @@ foreach name : apparmor_gen_profiles
   )
 endforeach
 
-install_data(
-  [ 'libvirt-qemu', 'libvirt-lxc' ],
-  install_dir: apparmor_dir / 'abstractions',
-)
+foreach name : apparmor_gen_abstractions
+  configure_file(
+    input: '@0@.in'.format(name),
+    output: name,
+    command: apparmor_gen_cmd,
+    capture: true,
+    install: true,
+    install_dir: apparmor_dir / 'abstractions',
+  )
+endforeach
 
 install_data(
   [ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ],
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux