File compress.patch of Package pesign-obs-integration
From f34d48cd43445b9eb743dabf0fa8c53210eecd51 Mon Sep 17 00:00:00 2001
From: Callum Farmer <gmbr3@opensuse.org>
Date: Mon, 21 Apr 2025 15:42:07 +0100
Subject: [PATCH] Accept none for compression
* Useful for kernel builds
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
---
README.md | 2 +-
pesign-gen-repackage-spec | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b91205b..589520d 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Consult the dh_signobs manpage for more information.
### Kernel Module Compression
When BRP_PESIGN_COMPRESS_MODULE is passed, the script tries to compress the
-kernel modules at the repackaging phase. Currently xz, gzip and zstd format is supported.
+kernel modules at the repackaging phase. Currently none, xz, gzip and zstd format is supported.
For enable the compression feature, put the following along with
BRP_PESIGN_FILES setup:
diff --git a/pesign-gen-repackage-spec b/pesign-gen-repackage-spec
index 672ba6a..be1b68c 100755
--- a/pesign-gen-repackage-spec
+++ b/pesign-gen-repackage-spec
@@ -491,6 +491,8 @@ sub print_files {
my $compress_ext = "";
my $compress_cmd = "";
+ $compress = "" if $compress eq "none";
+
if ($compress eq "xz") {
$compress_ext = ".xz";
$compress_cmd = "xz --lzma2=dict=2MiB -f";
From 0c467d58c7d69b571ddf5cd037b51718b00d7b83 Mon Sep 17 00:00:00 2001
From: Callum Farmer <gmbr3@opensuse.org>
Date: Mon, 29 Sep 2025 13:46:31 +0100
Subject: [PATCH 1/2] Reject unknown values of compression
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
---
brp-99-pesign | 3 +++
1 file changed, 3 insertions(+)
diff --git a/brp-99-pesign b/brp-99-pesign
index d6490c2..81c5989 100644
--- a/brp-99-pesign
+++ b/brp-99-pesign
@@ -85,6 +85,9 @@ elif test "${BRP_PESIGN_COMPRESS_MODULE}" = "gzip"; then
pesign_repackage_compress="--compress gzip"
elif test "${BRP_PESIGN_COMPRESS_MODULE}" = "zstd"; then
pesign_repackage_compress="--compress zstd"
+elif test "${BRP_PESIGN_COMPRESS_MODULE}"; then
+ echo "$0: warning: unknown value of BRP_PESIGN_COMPRESS_MODULE" >&2
+ exit 1
else
pesign_repackage_compress=""
fi
From ae05d3465e40393cee406f48cc8d8e84a18522ac Mon Sep 17 00:00:00 2001
From: Callum Farmer <gmbr3@opensuse.org>
Date: Mon, 29 Sep 2025 13:49:12 +0100
Subject: [PATCH 2/2] Pass none compression value to script
Useful for distinguishing between unset and explicit none
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
---
brp-99-pesign | 2 ++
1 file changed, 2 insertions(+)
diff --git a/brp-99-pesign b/brp-99-pesign
index 81c5989..cf4fbbf 100644
--- a/brp-99-pesign
+++ b/brp-99-pesign
@@ -85,6 +85,8 @@ elif test "${BRP_PESIGN_COMPRESS_MODULE}" = "gzip"; then
pesign_repackage_compress="--compress gzip"
elif test "${BRP_PESIGN_COMPRESS_MODULE}" = "zstd"; then
pesign_repackage_compress="--compress zstd"
+elif test "${BRP_PESIGN_COMPRESS_MODULE}" = "none"; then
+ pesign_repackage_compress="--compress none"
elif test "${BRP_PESIGN_COMPRESS_MODULE}"; then
echo "$0: warning: unknown value of BRP_PESIGN_COMPRESS_MODULE" >&2
exit 1