summaryrefslogtreecommitdiffstats
path: root/debian/signing_templates
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:37 +0000
commit85f603d4fd6d85c425502723a17daa94574977de (patch)
tree188a21432c3b8e8ddb8a08e9a09397164a88181c /debian/signing_templates
parentMerging upstream version 6.9.7. (diff)
downloadlinux-85f603d4fd6d85c425502723a17daa94574977de.tar.xz
linux-85f603d4fd6d85c425502723a17daa94574977de.zip
Adding debian version 6.9.7-1.debian/6.9.7-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/signing_templates')
-rwxr-xr-xdebian/signing_templates/rules2
-rw-r--r--debian/signing_templates/rules.defs2
-rw-r--r--debian/signing_templates/rules.real54
3 files changed, 39 insertions, 19 deletions
diff --git a/debian/signing_templates/rules b/debian/signing_templates/rules
index 18d3d7d247..c79af132db 100755
--- a/debian/signing_templates/rules
+++ b/debian/signing_templates/rules
@@ -4,6 +4,7 @@ include /usr/share/dpkg/architecture.mk
SHELL := sh -e
+include debian/rules.defs
build: build-arch build-indep
build-arch:
@@ -11,6 +12,7 @@ build-indep:
clean:
dh_testdir
+ rm -rf $(BUILD_DIR) $(STAMPS_DIR)
dh_clean
binary: binary-arch binary-indep
diff --git a/debian/signing_templates/rules.defs b/debian/signing_templates/rules.defs
new file mode 100644
index 0000000000..e720ef3a1a
--- /dev/null
+++ b/debian/signing_templates/rules.defs
@@ -0,0 +1,2 @@
+BUILD_DIR = debian/build
+STAMPS_DIR = debian/stamps
diff --git a/debian/signing_templates/rules.real b/debian/signing_templates/rules.real
index 1b6ed6f084..c4d47c9903 100644
--- a/debian/signing_templates/rules.real
+++ b/debian/signing_templates/rules.real
@@ -2,6 +2,8 @@ include /usr/share/dpkg/default.mk
SHELL := bash -e
+include debian/rules.defs
+
export DH_OPTIONS
export DEB_RULES_REQUIRES_ROOT ?= no
@@ -9,6 +11,8 @@ export DEB_RULES_REQUIRES_ROOT ?= no
GENCONTROL_ARGS := -v@signedtemplate_binaryversion@
BUILDDEB_ARGS := -Zxz $(if $(filter pkg.linux.quick,$(DEB_BUILD_PROFILES)),-z0)
+stamp = [ -d $(dir $@) ] || mkdir $(dir $@); touch $@
+
define dh_binary_pre
dh_testroot
dh_prep
@@ -43,6 +47,7 @@ define dh_binary_post
dh_makeshlibs -Xvmlinux -Xvmlinuz
dh_shlibdeps $(DH_SHLIBDEPS_ARGS)
dh_installdeb
+ if command -v dh_movetousr >/dev/null; then dh_movetousr; fi
dh_gencontrol -- $(GENCONTROL_ARGS)
dh_md5sums
dh_builddeb -- $(BUILDDEB_ARGS)
@@ -50,30 +55,41 @@ endef
build-indep:
+$(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR): REAL_VERSION = $(ABINAME)$(LOCALVERSION)
+$(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR): IMAGE_PACKAGE_NAME = linux-image-$(REAL_VERSION)-unsigned
+$(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR): SIGNATURE_DIR = debian/signatures/$(IMAGE_PACKAGE_NAME)
+$(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR): INSTALL_DIR=$(BUILD_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
+$(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR):
+ mkdir -p $(INSTALL_DIR)/boot
+ rsync -a $(patsubst %,/boot/%-$(REAL_VERSION),config System.map $(IMAGE_INSTALL_STEM)) \
+ $(INSTALL_DIR)/boot/
+ sbattach --attach $(SIGNATURE_DIR)/boot/vmlinuz-$(REAL_VERSION).sig \
+ $(INSTALL_DIR)/boot/vmlinuz-$(REAL_VERSION)
+ mkdir -p $(INSTALL_DIR)/lib/modules/$(REAL_VERSION)
+ rsync -a $(addprefix /lib/modules/$(REAL_VERSION)/,kernel modules.builtin modules.builtin.modinfo modules.order) \
+ $(INSTALL_DIR)/lib/modules/$(REAL_VERSION)/
+# Copy any device tree files
+ if [ -d /usr/lib/linux-image-$(REAL_VERSION) ]; then \
+ mkdir -p $(INSTALL_DIR)/usr/lib/linux-image-$(REAL_VERSION); \
+ rsync -a /usr/lib/linux-image-$(REAL_VERSION)/ \
+ $(INSTALL_DIR)/usr/lib/linux-image-$(REAL_VERSION)/; \
+ fi
+ $(stamp)
+
build_image:
binary_image: DH_OPTIONS = -p$(PACKAGE_NAME)
binary_image: DH_STRIP_ARGS = --no-automatic-dbgsym
-binary_image: KERNEL_VERSION = $(ABINAME)$(LOCALVERSION)
-binary_image: IMAGE_PACKAGE_NAME = linux-image-$(KERNEL_VERSION)-unsigned
+binary_image: REAL_VERSION = $(ABINAME)$(LOCALVERSION)
+binary_image: IMAGE_PACKAGE_NAME = linux-image-$(REAL_VERSION)-unsigned
+binary_image: DIR2 = $(BUILD_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
binary_image: PACKAGE_DIR = debian/$(PACKAGE_NAME)
-binary_image: SIGNATURE_DIR = debian/signatures/$(IMAGE_PACKAGE_NAME)
+binary_image: $(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
binary_image:
$(dh_binary_pre)
- mkdir -p $(PACKAGE_DIR)/boot
- rsync -a $(patsubst %,/boot/%-$(KERNEL_VERSION),config System.map $(IMAGE_INSTALL_STEM)) \
- $(PACKAGE_DIR)/boot/
- sbattach --attach $(SIGNATURE_DIR)/boot/vmlinuz-$(KERNEL_VERSION).sig \
- $(PACKAGE_DIR)/boot/vmlinuz-$(KERNEL_VERSION)
- mkdir -p $(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)
- rsync -a $(addprefix /lib/modules/$(KERNEL_VERSION)/,kernel modules.builtin modules.builtin.modinfo modules.order) \
- $(PACKAGE_DIR)/lib/modules/$(KERNEL_VERSION)/
-# Copy any device tree files
- if [ -d /usr/lib/linux-image-$(KERNEL_VERSION) ]; then \
- mkdir -p $(PACKAGE_DIR)/usr/lib/linux-image-$(KERNEL_VERSION); \
- rsync -a /usr/lib/linux-image-$(KERNEL_VERSION)/ \
- $(PACKAGE_DIR)/usr/lib/linux-image-$(KERNEL_VERSION)/; \
- fi
+ dh_install --sourcedir=$(DIR2) boot
+ dh_install --sourcedir=$(DIR2) lib
+ if [ -d $(DIR2)/usr ]; then dh_install --sourcedir=$(DIR2) usr; fi
# Copy bug scripts but change the info file to refer to the right package
mkdir -p $(PACKAGE_DIR)/usr/share/bug/$(PACKAGE_NAME)
rsync -a /usr/share/bug/$(IMAGE_PACKAGE_NAME)/ \
@@ -94,9 +110,9 @@ build_installer:
binary_installer: REAL_VERSION = $(ABINAME)$(LOCALVERSION)
binary_installer: export KW_DEFCONFIG_DIR=debian/installer
binary_installer: export KW_CONFIG_DIR=debian/installer
-# XXX No make dependency exists for this directory
-binary_installer: export SOURCEDIR = debian/linux-image-$(REAL_VERSION)
+binary_installer: export SOURCEDIR = $(BUILD_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
binary_installer: DH_OPTIONS_IMAGE = -p$(IMAGE_PACKAGE_NAME) --sourcedir=$(SOURCEDIR)
+binary_installer: $(STAMPS_DIR)/install_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
binary_installer:
$(dh_binary_pre)
DH_OPTIONS="$(DH_OPTIONS_IMAGE)" dh_install boot/$(IMAGE_INSTALL_STEM)-$(REAL_VERSION)