Home Home > GIT Browse > linux-next
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-08-10 12:03:13 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-08-10 12:03:13 +0200
commit4f9069044cde1130c0078aaf982217218b7b571c (patch)
tree4a6e0a0cd8a9f2cd0a0eb3678ed2c4a743285df5
parentff27f24fd8095358b55a5f39a4b6a47082f60d75 (diff)
parent7c057c840fe6de4e7a6445c48c92b0cf60e8a42b (diff)
Merge branch 'packaging' into linux-next
-rwxr-xr-xrpm/check-module-license2
-rw-r--r--rpm/kernel-module-subpackage2
-rwxr-xr-xrpm/mergedep2
-rwxr-xr-xrpm/mkspec7
-rwxr-xr-xrpm/modflist2
-rw-r--r--rpm/preun.sh2
-rwxr-xr-xrpm/split-modules6
7 files changed, 15 insertions, 8 deletions
diff --git a/rpm/check-module-license b/rpm/check-module-license
index 9910deec18..b5f67fce99 100755
--- a/rpm/check-module-license
+++ b/rpm/check-module-license
@@ -1,7 +1,7 @@
#!/bin/sh
rc=0
-for file in $(find "$@" -name '*.ko'); do
+for file in $(find "$@" -name '*.ko' -o -name '*.ko.xz'); do
l=$(/sbin/modinfo -F license "$file")
if [ -z "$l" ]; then
echo "ERROR: No license is included for module ${file##*/lib/modules/}"
diff --git a/rpm/kernel-module-subpackage b/rpm/kernel-module-subpackage
index cc5b552ad1..325f352821 100644
--- a/rpm/kernel-module-subpackage
+++ b/rpm/kernel-module-subpackage
@@ -79,7 +79,7 @@ fi
%{?regenerate_initrd_posttrans}
%preun -n %{-n*}-kmp-%1
nvr=%{-n*}-kmp-%1-%_this_kmp_version-%{-r*}
-rpm -ql $nvr | sed -n '/\.ko$/p' > /var/run/rpm-$nvr-modules
+rpm -ql $nvr | sed -n '/\.ko\(\.xz\)\?$/p' > /var/run/rpm-$nvr-modules
%postun -n %{-n*}-kmp-%1
nvr=%{-n*}-kmp-%1-%_this_kmp_version-%{-r*}
modules=( $(cat /var/run/rpm-$nvr-modules) )
diff --git a/rpm/mergedep b/rpm/mergedep
index f1e7994d0a..c0ca85a829 100755
--- a/rpm/mergedep
+++ b/rpm/mergedep
@@ -7,10 +7,12 @@ cat /lib/modules/$KREL/modules.softdep | grep : | sed -e 's/^softdep //' -e 's/
| \
while read l ; do
MOD=$(echo "$l" | sed -e 's/:.*//')
+ MOD=$(basename $MOD .xz)
MOD=$(basename $MOD .ko)
DEPS="$(echo "$l" | sed -e 's/.*://')"
moddeps=""
for dep in $DEPS ; do
+ dep=$(basename $dep .xz)
dep=$(basename $dep .ko)
moddeps="$moddeps $dep"
done
diff --git a/rpm/mkspec b/rpm/mkspec
index 23b5051628..6bb7cce070 100755
--- a/rpm/mkspec
+++ b/rpm/mkspec
@@ -38,9 +38,14 @@ my %vars = parse_config_sh();
my ($srcversion, $variant, $vanilla_only) =
($vars{'SRCVERSION'}, $vars{'VARIANT'}, $vars{'VANILLA_ONLY'});
my $compress_modules = 'none';
+my $build_dtbs = ();
if (defined($vars{'COMPRESS_MODULES'})) {
$compress_modules = $vars{'COMPRESS_MODULES'};
}
+if (defined($vars{'BUILD_DTBS'})) {
+ $build_dtbs = $vars{'BUILD_DTBS'};
+ $build_dtbs = () if $build_dtbs =~ /^(0+|no|false)$/i;
+}
$vanilla_only ||= "0";
if (!defined ($rpmrelease)) {
$rpmrelease = $vars{'RELEASE'} || 0;
@@ -209,7 +214,7 @@ if (!$variant) {
}
# dtb-*.spec
-if (!$variant) {
+if (!$variant && $build_dtbs) {
do_spec('dtb', "dtb.spec.in", %macros);
print "./mkspec-dtb $all_archs\n";
system("./mkspec-dtb $all_archs\n");
diff --git a/rpm/modflist b/rpm/modflist
index 476b541c67..62d8f3a08f 100755
--- a/rpm/modflist
+++ b/rpm/modflist
@@ -6,5 +6,5 @@ mod_builtin=$4
while read MOD ; do
[ -n "$MOD" ] || continue
- cat $flist | grep /$MOD[.]ko\$ >> $output || { grep -q /$MOD[.]ko\$ $mod_builtin && echo Module $MOD built-in ;} || echo Module $MOD missing
+ cat $flist | grep -E "/$MOD[.]ko([.]xz)?\$" >> $output || { grep -q /$MOD[.]ko\$ $mod_builtin && echo Module $MOD built-in ;} || echo Module $MOD missing
done < $modules
diff --git a/rpm/preun.sh b/rpm/preun.sh
index 7d1a2708c5..005cb95b74 100644
--- a/rpm/preun.sh
+++ b/rpm/preun.sh
@@ -1,4 +1,4 @@
if [ @BASE_PACKAGE@ = 0 ]; then
nvr=@SUBPACKAGE@-@RPM_VERSION_RELEASE@
- rpm -ql $nvr | grep '\.ko$' > /var/run/rpm-$nvr-modules
+ rpm -ql $nvr | grep '\.ko\(\.xz\)\?$' > /var/run/rpm-$nvr-modules
fi
diff --git a/rpm/split-modules b/rpm/split-modules
index ecb967e921..329b110342 100755
--- a/rpm/split-modules
+++ b/rpm/split-modules
@@ -59,8 +59,8 @@ trap 'rm -rf "$tmp"' EXIT
tmp=$(mktemp -d)
mkdir "$tmp/empty"
-find "$opt_dir" -type f -name '*.ko' -printf '/%P\n' | \
- awk -F/ '{ n=$NF; gsub(/-/, "_", n); sub(/\.ko$/, "", n); print n " " $0; }' | \
+find "$opt_dir" -type f \( -name '*.ko' -o -name '*.ko.xz' \) -printf '/%P\n' | \
+ awk -F/ '{ n=$NF; gsub(/-/, "_", n); sub(/\.ko(\.xz)?$/, "", n); print n " " $0; }' | \
sort >"$tmp/all"
err=false
@@ -101,7 +101,7 @@ ifdef EXPLAIN
@for dep in $^; do echo "$$dep needed by $@"; done >> $(EXPLAIN)
endif
'
- sed -r 's:[^ ]*/([^/]*)\.ko\>:\1:g; y/-/_/' "$modules_dep"
+ sed -r 's:[^ ]*/([^/]*)\.ko(.xz)?\>:\1:g; y/-/_/' "$modules_dep"
) >"$tmp/dep"
add_dependent_modules()