diff --git a/debian/rules b/debian/rules
index 0da34cae0..5cfd8bf4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,6 +145,7 @@ endif
# rebuild grub, need a programmatic way to get the vendor, as it's used by build-efi-images
# to create the monolithic Grub image and thus is needed to create the partitions on the EFI
# media. Add it to the control file user metadata: XB-Efi-Vendor: $vendor
+DPKG_VENDOR ?= $(shell dpkg-vendor --query vendor)
SB_EFI_VENDOR ?= $(shell dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')
But maybe also just drop dynamic lookup entirely because that breaks expectations in some ways, e.g. shim can't find grub anymore if you change grub distributor.
I don't plan to keep a delta, so I'm thinking
diff --git a/debian/ default/ grub b/debian/ default/ grub .5068a6566 100644 default/ grub default/ grub
index 03f98ec7f.
--- a/debian/
+++ b/debian/
@@ -5,7 +5,7 @@
GRUB_DEFAULT=0 @DEFAULT_ TIMEOUT@ OR=`lsb_ release -i -s 2> /dev/null || echo Debian` OR=`. /etc/os-release && echo $NAME || echo @DPKG_VENDOR@` LINUX_DEFAULT= "@DEFAULT_ CMDLINE@ " LINUX=" "
GRUB_TIMEOUT=
-GRUB_DISTRIBUT
+GRUB_DISTRIBUT
GRUB_CMDLINE_
GRUB_CMDLINE_
diff --git a/debian/rules b/debian/rules .5cfd8bf4e 100755
index 0da34cae0.
--- a/debian/rules
+++ b/debian/rules
@@ -145,6 +145,7 @@ endif
# rebuild grub, need a programmatic way to get the vendor, as it's used by build-efi-images
# to create the monolithic Grub image and thus is needed to create the partitions on the EFI
# media. Add it to the control file user metadata: XB-Efi-Vendor: $vendor
+DPKG_VENDOR ?= $(shell dpkg-vendor --query vendor)
SB_EFI_VENDOR ?= $(shell dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')
%:
debian/ platform- subst \
PACKAGE= "$(2)" \ "$(DPKG_ VENDOR) " \
DEFAULT_ CMDLINE= "$(DEFAULT_ CMDLINE) " \
DEFAULT_ TIMEOUT= "$(DEFAULT_ TIMEOUT) " \
DEFAULT_ HIDDEN_ TIMEOUT_ BOOL="$ (DEFAULT_ HIDDEN_ TIMEOUT_ BOOL)" \
@@ -355,6 +356,7 @@ platform_subst = \
if [ -e debian/$(1) ]; then \
+ DPKG_VENDOR=
But maybe also just drop dynamic lookup entirely because that breaks expectations in some ways, e.g. shim can't find grub anymore if you change grub distributor.