@@ -9,6 +9,8 @@ ver = $(shell dpkg-parsechangelog -S Version)
abi = $(shell echo "$(ver)" | sed -ne 's/\([0-9]*\.[0-9]*\.[0-9]*\-[0-9]*\)\..*/\1/p')
series = $(shell dpkg-parsechangelog -SDistribution | sed -e 's/-\(security\|updates\|proposed\)$$//')
+generate_src = $(shell echo $(src) | sed -e 's/-signed/-generate/')
+
# Work out the source package name and version of the unsigned package
# By convention, it is the name of this package with -signed stripped.
# The version is identical to this package less any rebuild suffix (+signedN).
@@ -23,7 +25,7 @@ src_headers_arch = linux-headers-$(abi)-generic
# we have no binary files and we will not run the appropriate targets.
pre-clean:
rm -f debian/control
- ./debian/scripts/generate-control $(series) $(src) $(ver) $(unsigned_src) $(unsigned_ver) $(abi)
+ ./debian/scripts/generate-control $(series) $(src) $(generate_src) $(ver) $(unsigned_src) $(unsigned_ver) $(abi)
./debian/scripts/parameterise-ancillaries $(abi) $(generate_src)
rm -rf ./$(unsigned_ver) UNSIGNED SIGNED
rm -f debian/linux-image-*.install \
@@ -41,11 +43,12 @@ clean:: pre-clean
dh $@
override_dh_auto_build:
- ./download-signed "$(src_headers_arch)" "$(unsigned_ver)" "$(unsigned_src)"
+ ./download-signed "$(generate_src)" "$(ver)" "$(generate_src)"
#./download-unsigned "$(DEB_HOST_ARCH)" "$(unsigned_ver)"
mkdir SIGNED
( \
- cd "$(unsigned_ver)" || exit 1; \
+ signed="$(CURDIR)/SIGNED"; \
+ cd "$(ver)/boot" || exit 1; \
for s in *.efi.signed; do \
[ ! -f "$$s" ] && continue; \
base=$$(echo "$$s" | sed -e 's/.efi.signed//'); \
@@ -58,25 +61,25 @@ override_dh_auto_build:
fi; \
); \
chmod 600 "$$s"; \
- ln "$$s" "../SIGNED/$$base"; \
+ ln "$$s" "$$signed/$$base"; \
done; \
for s in *.opal.sig; do \
[ ! -f "$$s" ] && continue; \
base=$$(echo "$$s" | sed -e 's/.opal.sig//'); \
- cat "$$base.opal" "$$s" >"../SIGNED/$$base"; \
- chmod 600 "../SIGNED/$$base"; \
+ cat "$$base.opal" "$$s" >"$$signed/$$base"; \
+ chmod 600 "$$signed/$$base"; \
done; \
for s in *.sipl.sig; do \
[ ! -f "$$s" ] && continue; \
base=$$(echo "$$s" | sed -e 's/.sipl.sig//'); \
- cat "$$base.sipl" "$$s" >"../SIGNED/$$base"; \
- chmod 600 "../SIGNED/$$base"; \
+ cat "$$base.sipl" "$$s" >"$$signed/$$base"; \
+ chmod 600 "$$signed/$$base"; \
done; \
for s in *.fit.signed; do \
[ ! -f "$$s" ] && continue; \
chmod 600 "$$s"; \
base=$$(echo "$$s" | sed -e 's/.fit.signed//'); \
- ln "$$s" "../SIGNED/$$base"; \
+ ln "$$s" "$$signed/$$base"; \
done; \
)
Signed-off-by: Andy Whitcroft <apw@canonical.com> --- debian/rules | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)