apparmor: Allow version-specific bits in abstractions too

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

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Andrea Bolognani 2023-06-29 11:45:35 +02:00
parent 19eb8abc9a
commit 63a312fa2d
3 changed files with 15 additions and 4 deletions

View File

@ -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' ],