[libvirt] [PATCH] build: Fix uninstall when WITH_APPARMOR_PROFILES is defined

When libvirt configuration includes '--with-apparmor-profiles', the make uninstall target fails make[1]: Entering directory '/home/jim/upstream/libvirt/examples' ( cd '/etc/apparmor.d//abstractions' && rm -f libvirt-qemu libvirt-lxc ) ( cd '/etc/apparmor.d/' && rm -f usr.lib.libvirt.virt-aa-helper usr.sbin.libvirtd ) make[1]: *** No rule to make target 'uninstall-apparmor-local', needed by 'uninstall-local'. Stop. Add missing 'uninstall-apparmor-local' target to the examples Makefile.am. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- examples/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/Makefile.am b/examples/Makefile.am index 7069d74e74..27f8b0ef09 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -96,6 +96,10 @@ install-apparmor-local: 'usr.lib.libvirt.virt-aa-helper'" \ >$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper +uninstall-apparmor-local: + rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" + rmdir $(APPARMOR_LOCAL_DIR) || : + INSTALL_DATA_LOCAL += install-apparmor-local UNINSTALL_LOCAL += uninstall-apparmor-local endif WITH_APPARMOR_PROFILES -- 2.18.0

On Wed, 2018-11-07 at 17:44 -0700, Jim Fehlig wrote: [...]
@@ -96,6 +96,10 @@ install-apparmor-local: 'usr.lib.libvirt.virt-aa-helper'" \ >$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper
Pre-existing lack of quoting... I've fixed it with a trivial patch already.
+uninstall-apparmor-local: + rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" + rmdir $(APPARMOR_LOCAL_DIR) || :
Missing quotes here as well. Once you fix that, Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

On 11/13/18 10:14 AM, Andrea Bolognani wrote:
On Wed, 2018-11-07 at 17:44 -0700, Jim Fehlig wrote: [...]
@@ -96,6 +96,10 @@ install-apparmor-local: 'usr.lib.libvirt.virt-aa-helper'" \ >$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper
Pre-existing lack of quoting... I've fixed it with a trivial patch already.
Thanks!
+uninstall-apparmor-local: + rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" + rmdir $(APPARMOR_LOCAL_DIR) || :
Missing quotes here as well. Once you fix that,
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
I've fixed it and pushed. While doing so I noticed a lot of pre-existing lack of quoting throughout the various Makefile.am :-). I'm not sure these are worth fixing given the lack problem reports... Regards, Jim

On Tue, 2018-11-13 at 12:04 -0700, Jim Fehlig wrote:
On 11/13/18 10:14 AM, Andrea Bolognani wrote:
+uninstall-apparmor-local: + rm -f "$(APPARMOR_LOCAL_DIR)/usr.lib.libvirt.virt-aa-helper" + rmdir $(APPARMOR_LOCAL_DIR) || :
Missing quotes here as well. Once you fix that,
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
I've fixed it and pushed. While doing so I noticed a lot of pre-existing lack of quoting throughout the various Makefile.am :-). I'm not sure these are worth fixing given the lack problem reports...
I'd say fixing them is worthwhile, so if you feel like putting time into doing so I'll very happily review the resulting patches. -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Jim Fehlig