Home Home > GIT Browse > packaging
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-23 17:48:41 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-23 18:10:48 +0200
commitcdf58063c608e87410ea05f5b6161330aee528d2 (patch)
tree9185eaef9470336782787a77458effd86a9e03af
parentc32f8e7cf74362478dea82c747bdc6d83f5853ae (diff)
Add kernel module compression support (bsc#1135854)
For enabling the kernel module compress, add the item COMPRESS_MODULES="xz" in config.sh, then mkspec will pass it to the spec file.
-rw-r--r--rpm/kernel-binary.spec.in4
-rwxr-xr-xrpm/mkspec5
2 files changed, 9 insertions, 0 deletions
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index 4727d7eed9..fa91813212 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -21,6 +21,7 @@
%define patchversion @PATCHVERSION@
%define variant @VARIANT@%{nil}
%define vanilla_only @VANILLA_ONLY@
+%define compress_modules @COMPRESS_MODULES@
%include %_sourcedir/kernel-spec-macros
@@ -568,6 +569,9 @@ BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
BRP_PESIGN_FILES=""
%endif
export BRP_PESIGN_FILES
+%if %{compress_modules} != "none"
+export BRP_PESIGN_COMPRESS_MODULE=%{compress_modules}
+%endif
if test -x /usr/lib/rpm/pesign/gen-hmac; then
$_ -r %buildroot /boot/$image-%kernelrelease-%build_flavor
diff --git a/rpm/mkspec b/rpm/mkspec
index 4467462c44..23b5051628 100755
--- a/rpm/mkspec
+++ b/rpm/mkspec
@@ -37,6 +37,10 @@ my @kmps = read_kmps();
my %vars = parse_config_sh();
my ($srcversion, $variant, $vanilla_only) =
($vars{'SRCVERSION'}, $vars{'VARIANT'}, $vars{'VANILLA_ONLY'});
+my $compress_modules = 'none';
+if (defined($vars{'COMPRESS_MODULES'})) {
+ $compress_modules = $vars{'COMPRESS_MODULES'};
+}
$vanilla_only ||= "0";
if (!defined ($rpmrelease)) {
$rpmrelease = $vars{'RELEASE'} || 0;
@@ -100,6 +104,7 @@ my %macros = (
UNPACK_PATCHES => $unpack_patches,
SCRIPTS => $scripts,
YEAR => (localtime time)[5] + 1900,
+ COMPRESS_MODULES => $compress_modules,
);
# binary spec files