Rework "debian/rules: Do not try to move EFI binaries on armhf"
authorElliott Mitchell <ehem+debian@m5p.com>
Fri, 17 Jul 2020 05:39:45 +0000 (22:39 -0700)
committerHans van Kranenburg <hans@knorrie.org>
Sun, 28 Feb 2021 18:53:12 +0000 (19:53 +0100)
What is actually needed is a move command which fails if the move
fails (i386/amd64, the EFI files were created, but the move failed), but
succeeds if no files are moved (armhf, no EFI files are created).  A
combination of find/xargs matches this.

This reworks commit 8ff478af61fa8a87806a89bbd618cd9da2354302.

Signed-off-by: Elliott Mitchell <ehem+debian@m5p.com>
Acked-by: Hans van Kranenburg <hans@knorrie.org>
debian/rules

index 78aad5eedae1beace8722b793660bd75ffd25131..222e012cf8af72f2c31c795eb3c56cd9e33e0949 100755 (executable)
@@ -247,10 +247,7 @@ override_dh_auto_install: $(TEMPLATED_FILES)
                -C tools/firmware install-shim
        :
        @# Inexplicably, upstream puts the efi binares in usr/lib64
-       case $(flavour) in \
-               armhf) ;; \
-               *) mv $t/usr/lib64/efi/* $t/boot/. ;; \
-       esac
+       find "$t"/usr/lib*/efi -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 mv -t "$t/boot"
        :
        @# This file contains an arch-specific path and we put it
        @# in xen-utils-common, an arch-all package.  But the