Accepting request 523080 from home:michal-m:branches:Base:System
- Generate ksym() dependencies for SLE if %is_opensuse is unset (bsc#981083). - Drop %supplements_kernel_module, as it is broken, undocumented and is not used by anybody (bsc#981083). dropped: modalias-kernel_module.diff refreshed: modalias-encode.diff - Split fileattrs for kernel and kmps, do not pass around %name and simplify the helpers refreshed: fileattrs.diff, modalias.diff dropped: symset-table, helperenv.diff, modalias-no-kgraft.diff OBS-URL: https://build.opensuse.org/request/show/523080 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=403
This commit is contained in:
parent
9c2c23baec
commit
4b044876a1
@ -1,20 +1,34 @@
|
|||||||
--- ./fileattrs/Makefile.am.orig 2014-02-20 12:54:01.473814793 +0000
|
---
|
||||||
+++ ./fileattrs/Makefile.am 2014-02-20 12:55:37.318814624 +0000
|
fileattrs/Makefile.am | 3 ++-
|
||||||
@@ -7,6 +7,6 @@ fattrsdir = $(rpmconfigdir)/fileattrs
|
fileattrs/debuginfo.attr | 2 ++
|
||||||
|
fileattrs/elf.attr | 3 ++-
|
||||||
|
fileattrs/elflib.attr | 4 ++++
|
||||||
|
fileattrs/firmware.attr | 2 ++
|
||||||
|
fileattrs/kernel.attr | 2 ++
|
||||||
|
fileattrs/kmp.attr | 4 ++++
|
||||||
|
fileattrs/perl.attr | 3 ++-
|
||||||
|
fileattrs/perllib.attr | 3 ++-
|
||||||
|
fileattrs/sysvinit.attr | 2 ++
|
||||||
|
10 files changed, 24 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- fileattrs/Makefile.am.orig
|
||||||
|
+++ fileattrs/Makefile.am
|
||||||
|
@@ -7,6 +7,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs
|
||||||
fattrs_DATA = \
|
fattrs_DATA = \
|
||||||
appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
|
appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
|
||||||
perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
|
perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
|
||||||
- mono.attr
|
- mono.attr
|
||||||
+ mono.attr debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
|
+ mono.attr debuginfo.attr elflib.attr firmware.attr kernel.attr \
|
||||||
|
+ kmp.attr sysvinit.attr
|
||||||
|
|
||||||
EXTRA_DIST = $(fattrs_DATA)
|
EXTRA_DIST = $(fattrs_DATA)
|
||||||
--- ./fileattrs/debuginfo.attr.orig 2014-02-20 12:54:01.473814793 +0000
|
--- /dev/null
|
||||||
+++ ./fileattrs/debuginfo.attr 2014-02-20 12:54:01.473814793 +0000
|
+++ fileattrs/debuginfo.attr
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov
|
+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov
|
||||||
+%__debuginfo_path ^/usr/lib/debug/
|
+%__debuginfo_path ^/usr/lib/debug/
|
||||||
--- ./fileattrs/elf.attr.orig 2012-11-07 12:55:24.000000000 +0000
|
--- fileattrs/elf.attr.orig
|
||||||
+++ ./fileattrs/elf.attr 2014-02-20 12:54:01.474814793 +0000
|
+++ fileattrs/elf.attr
|
||||||
@@ -1,4 +1,5 @@
|
@@ -1,4 +1,5 @@
|
||||||
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||||
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||||
@ -22,35 +36,40 @@
|
|||||||
+%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable
|
+%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable
|
||||||
%__elf_flags exeonly
|
%__elf_flags exeonly
|
||||||
+%__elf_exclude_path ^/usr/lib/debug/
|
+%__elf_exclude_path ^/usr/lib/debug/
|
||||||
--- ./fileattrs/elflib.attr.orig 2014-02-20 12:54:01.474814793 +0000
|
--- /dev/null
|
||||||
+++ ./fileattrs/elflib.attr 2014-02-20 12:54:01.474814793 +0000
|
+++ fileattrs/elflib.attr
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||||
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
|
||||||
+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object
|
+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object
|
||||||
+%__elflib_exclude_path ^/usr/lib/debug/
|
+%__elflib_exclude_path ^/usr/lib/debug/
|
||||||
--- ./fileattrs/firmware.attr.orig 2014-02-20 12:54:01.474814793 +0000
|
--- /dev/null
|
||||||
+++ ./fileattrs/firmware.attr 2014-02-20 12:54:01.474814793 +0000
|
+++ fileattrs/firmware.attr
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+%__firmware_provides %{_rpmconfigdir}/firmware.prov
|
+%__firmware_provides %{_rpmconfigdir}/firmware.prov
|
||||||
+%__firmware_path /lib/firmware/
|
+%__firmware_path /lib/firmware/
|
||||||
--- ./fileattrs/ksyms.attr.orig 2014-02-20 12:54:01.474814793 +0000
|
--- /dev/null
|
||||||
+++ ./fileattrs/ksyms.attr 2014-02-20 12:54:01.474814793 +0000
|
+++ fileattrs/kernel.attr
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+%__kernel_provides %{_rpmconfigdir}/find-provides.ksyms --opensuse 0%{?is_opensuse}
|
||||||
|
+%__kernel_path ^(/lib/modules/[^/]*/kernel/.*\.ko(\.gz)?|/boot/vmlinu[xz].*)$
|
||||||
|
--- /dev/null
|
||||||
|
+++ fileattrs/kmp.attr
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name
|
+%__kmp_provides %{_rpmconfigdir}/find-provides.ksyms --opensuse 0%{?is_opensuse}
|
||||||
+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name
|
+%__kmp_requires %{_rpmconfigdir}/find-requires.ksyms --opensuse 0%{?is_opensuse}
|
||||||
+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name
|
+%__kmp_supplements %{_rpmconfigdir}/find-supplements.ksyms
|
||||||
+%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$
|
+%__kmp_path ^/lib/modules/[^/]*/(updates|extra)/.*\.ko(\.gz)?
|
||||||
--- ./fileattrs/perl.attr.orig 2012-11-07 12:55:24.000000000 +0000
|
--- fileattrs/perl.attr.orig
|
||||||
+++ ./fileattrs/perl.attr 2014-02-20 12:54:01.474814793 +0000
|
+++ fileattrs/perl.attr
|
||||||
@@ -1,3 +1,4 @@
|
@@ -1,3 +1,4 @@
|
||||||
-%__perl_requires %{_rpmconfigdir}/perl.req
|
-%__perl_requires %{_rpmconfigdir}/perl.req
|
||||||
+# disabled for now
|
+# disabled for now
|
||||||
+#%__perl_requires %{_rpmconfigdir}/perl.req
|
+#%__perl_requires %{_rpmconfigdir}/perl.req
|
||||||
%__perl_magic ^.*[Pp]erl .*$
|
%__perl_magic ^.*[Pp]erl .*$
|
||||||
%__perl_flags exeonly
|
%__perl_flags exeonly
|
||||||
--- ./fileattrs/perllib.attr.orig 2014-02-05 13:04:01.000000000 +0000
|
--- fileattrs/perllib.attr.orig
|
||||||
+++ ./fileattrs/perllib.attr 2014-02-20 12:54:01.475814793 +0000
|
+++ fileattrs/perllib.attr
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
%__perllib_provides %{_rpmconfigdir}/perl.prov
|
%__perllib_provides %{_rpmconfigdir}/perl.prov
|
||||||
-%__perllib_requires %{_rpmconfigdir}/perl.req
|
-%__perllib_requires %{_rpmconfigdir}/perl.req
|
||||||
@ -59,8 +78,8 @@
|
|||||||
%__perllib_magic ^Perl[[:digit:]] module source.*
|
%__perllib_magic ^Perl[[:digit:]] module source.*
|
||||||
%__perllib_path \\.pm$
|
%__perllib_path \\.pm$
|
||||||
%__perllib_flags magic_and_path
|
%__perllib_flags magic_and_path
|
||||||
--- ./fileattrs/sysvinit.attr.orig 2014-02-20 12:54:01.475814793 +0000
|
--- /dev/null
|
||||||
+++ ./fileattrs/sysvinit.attr 2014-02-20 12:54:01.475814793 +0000
|
+++ fileattrs/sysvinit.attr
|
||||||
@@ -0,0 +1,2 @@
|
@@ -0,0 +1,2 @@
|
||||||
+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides
|
+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides
|
||||||
+%__sysvinit_path ^/etc/init\.d/
|
+%__sysvinit_path ^/etc/init\.d/
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
--- ./scripts/Makefile.am.orig 2017-01-19 12:33:33.358599138 +0000
|
---
|
||||||
+++ ./scripts/Makefile.am 2017-01-19 12:35:00.045359629 +0000
|
scripts/Makefile.am | 2 +
|
||||||
|
scripts/find-provides.ksyms | 60 ++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
scripts/find-requires.ksyms | 29 +++++++++++++++++++++
|
||||||
|
3 files changed, 91 insertions(+)
|
||||||
|
|
||||||
|
--- scripts/Makefile.am.orig
|
||||||
|
+++ scripts/Makefile.am
|
||||||
@@ -16,6 +16,7 @@ EXTRA_DIST = \
|
@@ -16,6 +16,7 @@ EXTRA_DIST = \
|
||||||
tgpg vpkg-provides.sh \
|
tgpg vpkg-provides.sh \
|
||||||
find-requires find-provides \
|
find-requires find-provides \
|
||||||
@ -16,41 +22,98 @@
|
|||||||
mono-find-requires mono-find-provides \
|
mono-find-requires mono-find-provides \
|
||||||
pkgconfigdeps.sh libtooldeps.sh \
|
pkgconfigdeps.sh libtooldeps.sh \
|
||||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||||
--- ./scripts/find-provides.ksyms.orig 2017-01-19 12:33:33.359599136 +0000
|
--- /dev/null
|
||||||
+++ ./scripts/find-provides.ksyms 2017-01-19 12:33:33.359599136 +0000
|
+++ scripts/find-provides.ksyms
|
||||||
@@ -0,0 +1,17 @@
|
@@ -0,0 +1,60 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
+IFS=$'\n'
|
+IFS=$'\n'
|
||||||
+
|
+
|
||||||
|
+is_opensuse=false
|
||||||
|
+
|
||||||
|
+if test "$1" = "--opensuse"; then
|
||||||
|
+ if test "$2" -gt 0; then
|
||||||
|
+ is_opensuse=true
|
||||||
|
+ fi
|
||||||
|
+ shift 2
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if ! $is_opensuse; then
|
||||||
|
+ trap 'rm -f "$tmp"' EXIT
|
||||||
|
+ tmp=$(mktemp)
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
+while read f; do
|
+while read f; do
|
||||||
+ test -e "$f" || continue
|
+ test -e "$f" || continue
|
||||||
+ case "$f" in
|
+ case "$f" in
|
||||||
+ *.debug)
|
+ *.debug)
|
||||||
|
+ continue
|
||||||
+ ;;
|
+ ;;
|
||||||
+ */boot/vmlinu[xz]-*)
|
+ */boot/vmlinu[xz]-*)
|
||||||
+ flavor=${f##*/vmlinu[xz]-}
|
+ flavor=${f##*/vmlinu[xz]-}
|
||||||
+ flavor=${flavor%.gz}
|
+ flavor=${flavor%.gz}
|
||||||
+ echo "kernel-uname-r = $flavor"
|
+ echo "kernel-uname-r = $flavor"
|
||||||
|
+ flavor=${flavor##*-}
|
||||||
+ ;;
|
+ ;;
|
||||||
|
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ continue
|
||||||
+ esac
|
+ esac
|
||||||
|
+ if $is_opensuse; then
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+ unzip=false
|
||||||
|
+ case "$f" in
|
||||||
|
+ *.gz | */boot/vmlinuz*)
|
||||||
|
+ unzip=true
|
||||||
|
+ esac
|
||||||
|
+ if $unzip && gzip -cd "$f" >"$tmp"; then
|
||||||
|
+ f=$tmp
|
||||||
|
+ fi
|
||||||
|
+ if test -z "$flavor"; then
|
||||||
|
+ flavor=$(/sbin/modinfo -F vermagic "$f")
|
||||||
|
+ flavor=${flavor%% *}
|
||||||
|
+ flavor=${flavor##*-}
|
||||||
|
+ fi
|
||||||
|
+ if test -z "$flavor"; then
|
||||||
|
+ echo "warning: cannot determine kernel flavor from $(/sbin/modinfo -F vermagic "$f" 2>&1)" >&2
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+ nm "$f" \
|
||||||
|
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
|
||||||
+done \
|
+done \
|
||||||
+| sort -u
|
+| sort -u
|
||||||
--- ./scripts/find-requires.ksyms.orig 2017-01-19 12:33:33.359599136 +0000
|
--- /dev/null
|
||||||
+++ ./scripts/find-requires.ksyms 2017-01-19 12:33:33.359599136 +0000
|
+++ scripts/find-requires.ksyms
|
||||||
@@ -0,0 +1,15 @@
|
@@ -0,0 +1,29 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
+IFS=$'\n'
|
+IFS=$'\n'
|
||||||
+
|
+
|
||||||
+while read f; do
|
+is_opensuse=false
|
||||||
+ test -e "$f" || continue
|
+
|
||||||
+ case "$f" in
|
+if test "$1" = "--opensuse"; then
|
||||||
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz)
|
+ if test "$2" -gt 0; then
|
||||||
|
+ is_opensuse=true
|
||||||
|
+ fi
|
||||||
|
+ shift 2
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+if ! $is_opensuse && ! test -e /sbin/modprobe; then
|
||||||
|
+ cat > /dev/null
|
||||||
|
+ exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+for f in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
|
||||||
+ flavor=${f#*/lib/modules/}
|
+ flavor=${f#*/lib/modules/}
|
||||||
+ flavor=${flavor%%/*}
|
+ flavor=${flavor%%/*}
|
||||||
|
+ if $is_opensuse; then
|
||||||
+ echo "kernel-uname-r = $flavor"
|
+ echo "kernel-uname-r = $flavor"
|
||||||
+ ;;
|
+ continue
|
||||||
+ esac
|
+ fi
|
||||||
+done \
|
+ flavor=${flavor##*-}
|
||||||
+| sort -u
|
+ /sbin/modprobe --dump-modversions "$f" \
|
||||||
|
+ | sed -r -ne "s/^0x0*([0-9a-f]+)[[:blank:]]+(.+)/ksym($flavor:\\2) = \\1/p"
|
||||||
|
+done | sort -u
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- ./macros.in.orig 2014-08-04 13:04:51.646383733 +0000
|
|
||||||
+++ ./macros.in 2014-08-04 13:04:54.687369977 +0000
|
|
||||||
@@ -490,7 +490,7 @@ posix.setenv("RPMBUILD_SOURCEDIR",rpm.ex
|
|
||||||
# %__myattr_exclude_magic exclude by magic regex
|
|
||||||
# %__myattr_exclude_path exclude by path regex
|
|
||||||
#
|
|
||||||
-%_fileattrsdir %{_rpmconfigdir}/fileattrs
|
|
||||||
+%_fileattrsdir %{__set_helper_env}%{_rpmconfigdir}/fileattrs
|
|
||||||
|
|
||||||
# This macro defines how much space (in bytes) in package should be
|
|
||||||
# reserved for gpg signatures during building of a package. If this space is
|
|
@ -4,11 +4,9 @@ that rpm does not allow in dependencies, such as commas. Encode those as
|
|||||||
|
|
||||||
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
||||||
|
|
||||||
Index: rpm-4.4.2.3/scripts/find-supplements.ksyms
|
--- scripts/find-supplements.ksyms.orig
|
||||||
===================================================================
|
|
||||||
--- scripts/find-supplements.ksyms
|
|
||||||
+++ scripts/find-supplements.ksyms
|
+++ scripts/find-supplements.ksyms
|
||||||
@@ -48,6 +48,21 @@ combine_modaliases() {
|
@@ -35,10 +35,26 @@ combine_modaliases() {
|
||||||
print_modaliases "$class" "$variants" "$pos"
|
print_modaliases "$class" "$variants" "$pos"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,14 +25,11 @@ Index: rpm-4.4.2.3/scripts/find-supplements.ksyms
|
|||||||
+ done
|
+ done
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
aliases_of_filelist() {
|
for module in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
|
||||||
modlist=$(mktemp)
|
vermagic=$(/sbin/modinfo -F vermagic "$module")
|
||||||
have_module=1
|
krel=${vermagic%% *}
|
||||||
@@ -60,6 +75,7 @@ aliases_of_filelist() {
|
|
||||||
fi
|
|
||||||
have_module=0
|
|
||||||
/sbin/modinfo -F alias "$module" \
|
/sbin/modinfo -F alias "$module" \
|
||||||
+ | hexenc \
|
+ | hexenc \
|
||||||
| sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist
|
| sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
|
||||||
done
|
done \
|
||||||
if ! test -s "$modlist" && test $have_module = 0; then
|
| sort -u \
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
Index: scripts/find-supplements.ksyms
|
|
||||||
===================================================================
|
|
||||||
--- scripts/find-supplements.ksyms.orig
|
|
||||||
+++ scripts/find-supplements.ksyms
|
|
||||||
@@ -1,6 +1,8 @@
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
+SPECFILE=${RPMBUILD_SPECFILE:-/usr/src/packages/SOURCES/$1.spec}
|
|
||||||
IFS=$'\n'
|
|
||||||
+PACKAGE=$1
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
kernel-module-*) ;; # Fedora kernel module package names start with
|
|
||||||
@@ -46,11 +48,54 @@ combine_modaliases() {
|
|
||||||
print_modaliases "$class" "$variants" "$pos"
|
|
||||||
}
|
|
||||||
|
|
||||||
-for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
|
||||||
- vermagic=$(/sbin/modinfo -F vermagic "$module")
|
|
||||||
- krel=${vermagic%% *}
|
|
||||||
- /sbin/modinfo -F alias "$module" \
|
|
||||||
- | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
|
|
||||||
-done \
|
|
||||||
+aliases_of_filelist() {
|
|
||||||
+ modlist=$(mktemp)
|
|
||||||
+ have_module=1
|
|
||||||
+ for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
|
||||||
+ vermagic=$(/sbin/modinfo -F vermagic "$module")
|
|
||||||
+ krel=${vermagic%% *}
|
|
||||||
+ if ! test -x /sbin/modinfo; then
|
|
||||||
+ echo "ERROR: add module-init-tools to BuildRequires" >&2
|
|
||||||
+ exit 1
|
|
||||||
+ fi
|
|
||||||
+ have_module=0
|
|
||||||
+ /sbin/modinfo -F alias "$module" \
|
|
||||||
+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" | tee -a $modlist
|
|
||||||
+ done
|
|
||||||
+ if ! test -s "$modlist" && test $have_module = 0; then
|
|
||||||
+ echo "packageand(kernel-${krel##*-}:$PACKAGE)"
|
|
||||||
+ fi
|
|
||||||
+ rm -f $modlist
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+aliases_of_specfile_macro() {
|
|
||||||
+ declare regex
|
|
||||||
+
|
|
||||||
+ regex=$(
|
|
||||||
+ set -o noglob
|
|
||||||
+ set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \
|
|
||||||
+ $SPECFILE)
|
|
||||||
+ while [ $# -ge 1 ]; do
|
|
||||||
+ regex=$(echo "$1" \
|
|
||||||
+ | sed -e 's:[.]:\\.:g' \
|
|
||||||
+ -e 's:?:.:g' \
|
|
||||||
+ -e 's:\*:.*:g' \
|
|
||||||
+ -e 's:\\:\\\\:g')
|
|
||||||
+ echo -n "^$regex\$"
|
|
||||||
+ [ $# -ge 2 ] && echo -n "|"
|
|
||||||
+ shift
|
|
||||||
+ done
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ if [ -n "$regex" ]; then
|
|
||||||
+ awk '
|
|
||||||
+ $1 == "alias" && $3 ~ regex { print $2 }
|
|
||||||
+ ' regex="$regex" /lib/modules/*/modules.alias
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+( aliases_of_filelist
|
|
||||||
+ aliases_of_specfile_macro "$1"
|
|
||||||
+) \
|
|
||||||
| sort -u \
|
|
||||||
| combine_modaliases
|
|
@ -1,24 +0,0 @@
|
|||||||
From: Michal Marek <mmarek@suse.cz>
|
|
||||||
Subject: Do not generate supplements for kgraft patches
|
|
||||||
References: bnc#904848
|
|
||||||
|
|
||||||
kgraft-patches are to be automatically installed if a matching kernel is
|
|
||||||
installed. Generating the KMP supplements thus makes no sense.
|
|
||||||
|
|
||||||
Signed-off-by: Michal Marek <mmarek@suse.cz>
|
|
||||||
|
|
||||||
---
|
|
||||||
scripts/find-supplements.ksyms | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- scripts/find-supplements.ksyms.orig
|
|
||||||
+++ scripts/find-supplements.ksyms
|
|
||||||
@@ -7,7 +7,7 @@ PACKAGE=$1
|
|
||||||
case "$1" in
|
|
||||||
kernel-module-*) ;; # Fedora kernel module package names start with
|
|
||||||
# kernel-module.
|
|
||||||
-kernel*) is_kernel_package=1 ;;
|
|
||||||
+kernel* | kgraft-patch*) is_kernel_package=1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if ! [ -z "$is_kernel_package" ]; then
|
|
@ -1,45 +1,38 @@
|
|||||||
--- ./macros.in.orig 2011-05-11 14:57:08.000000000 +0000
|
--- macros.in.orig
|
||||||
+++ ./macros.in 2011-05-11 15:01:39.000000000 +0000
|
+++ macros.in
|
||||||
@@ -470,14 +470,18 @@ print (t)\
|
@@ -487,7 +487,7 @@ package or when debugging this package.\
|
||||||
#
|
%__find_requires %{_rpmconfigdir}/find-requires %name
|
||||||
# Path to scripts to autogenerate package dependencies,
|
|
||||||
#
|
|
||||||
+%__set_helper_env %{lua:
|
|
||||||
+posix.setenv("RPMBUILD_SPECFILE",rpm.expand("%?_specfile"));
|
|
||||||
+posix.setenv("RPMBUILD_SOURCEDIR",rpm.expand("%?_sourcedir"));
|
|
||||||
+}
|
|
||||||
# Note: Used iff _use_internal_dependency_generator is zero.
|
|
||||||
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
|
|
||||||
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
|
|
||||||
-%__find_provides %{_rpmconfigdir}/find-provides %name
|
|
||||||
-%__find_requires %{_rpmconfigdir}/find-requires %name
|
|
||||||
+%__find_provides %{__set_helper_env}%{_rpmconfigdir}/find-provides %name
|
|
||||||
+%__find_requires %{__set_helper_env}%{_rpmconfigdir}/find-requires %name
|
|
||||||
#%__find_conflicts ???
|
#%__find_conflicts ???
|
||||||
#%__find_obsoletes ???
|
#%__find_obsoletes ???
|
||||||
-#%__find_supplements ???
|
-#%__find_supplements ???
|
||||||
+%__find_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements %name
|
+%__find_supplements %{_rpmconfigdir}/find-supplements %name
|
||||||
#%__find_enhances ???
|
#%__find_enhances ???
|
||||||
|
|
||||||
#
|
#
|
||||||
--- ./scripts/find-supplements.ksyms.orig 2011-05-11 15:01:39.000000000 +0000
|
--- /dev/null
|
||||||
+++ ./scripts/find-supplements.ksyms 2011-05-11 15:01:39.000000000 +0000
|
+++ scripts/find-supplements
|
||||||
@@ -0,0 +1,56 @@
|
@@ -0,0 +1,14 @@
|
||||||
|
+#!/bin/bash
|
||||||
|
+
|
||||||
|
+# This script reads filenames from STDIN and outputs any relevant provides
|
||||||
|
+# information that needs to be included in the package.
|
||||||
|
+IFS=$'\n'
|
||||||
|
+filelist=($(cat))
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# --- Kernel module hardware identifiers
|
||||||
|
+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*)
|
||||||
|
+[ -x /usr/lib/rpm/find-supplements.ksyms ] &&
|
||||||
|
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@"
|
||||||
|
+
|
||||||
|
+exit 0
|
||||||
|
--- /dev/null
|
||||||
|
+++ scripts/find-supplements.ksyms
|
||||||
|
@@ -0,0 +1,45 @@
|
||||||
+#!/bin/bash
|
+#!/bin/bash
|
||||||
+
|
+
|
||||||
+IFS=$'\n'
|
+IFS=$'\n'
|
||||||
+
|
+
|
||||||
+case "$1" in
|
|
||||||
+kernel-module-*) ;; # Fedora kernel module package names start with
|
|
||||||
+ # kernel-module.
|
|
||||||
+kernel*) is_kernel_package=1 ;;
|
|
||||||
+esac
|
|
||||||
+
|
|
||||||
+if ! [ -z "$is_kernel_package" ]; then
|
|
||||||
+ cat > /dev/null
|
|
||||||
+ exit 0
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+print_modaliases() {
|
+print_modaliases() {
|
||||||
+ declare class=$1 variants=$2 pos=$3
|
+ declare class=$1 variants=$2 pos=$3
|
||||||
+ if [ -n "$variants" ]; then
|
+ if [ -n "$variants" ]; then
|
||||||
@ -73,7 +66,7 @@
|
|||||||
+ print_modaliases "$class" "$variants" "$pos"
|
+ print_modaliases "$class" "$variants" "$pos"
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
+for module in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
|
||||||
+ vermagic=$(/sbin/modinfo -F vermagic "$module")
|
+ vermagic=$(/sbin/modinfo -F vermagic "$module")
|
||||||
+ krel=${vermagic%% *}
|
+ krel=${vermagic%% *}
|
||||||
+ /sbin/modinfo -F alias "$module" \
|
+ /sbin/modinfo -F alias "$module" \
|
||||||
@ -81,20 +74,3 @@
|
|||||||
+done \
|
+done \
|
||||||
+| sort -u \
|
+| sort -u \
|
||||||
+| combine_modaliases
|
+| combine_modaliases
|
||||||
--- ./scripts/find-supplements.orig 2011-05-11 15:01:39.000000000 +0000
|
|
||||||
+++ ./scripts/find-supplements 2011-05-11 15:01:39.000000000 +0000
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+
|
|
||||||
+# This script reads filenames from STDIN and outputs any relevant provides
|
|
||||||
+# information that needs to be included in the package.
|
|
||||||
+IFS=$'\n'
|
|
||||||
+filelist=($(cat))
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# --- Kernel module hardware identifiers
|
|
||||||
+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*)
|
|
||||||
+[ -x /usr/lib/rpm/find-supplements.ksyms ] &&
|
|
||||||
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@"
|
|
||||||
+
|
|
||||||
+exit 0
|
|
||||||
|
18
rpm.changes
18
rpm.changes
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 8 15:37:36 UTC 2017 - mmarek@suse.com
|
||||||
|
|
||||||
|
- Generate ksym() dependencies for SLE if %is_opensuse is unset
|
||||||
|
(bsc#981083).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 29 14:21:31 UTC 2017 - mmarek@suse.com
|
||||||
|
|
||||||
|
- Drop %supplements_kernel_module, as it is broken, undocumented
|
||||||
|
and is not used by anybody (bsc#981083).
|
||||||
|
dropped: modalias-kernel_module.diff
|
||||||
|
refreshed: modalias-encode.diff
|
||||||
|
- Split fileattrs for kernel and kmps, do not pass around %name and
|
||||||
|
simplify the helpers
|
||||||
|
refreshed: fileattrs.diff, modalias.diff
|
||||||
|
dropped: symset-table, helperenv.diff, modalias-no-kgraft.diff
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 22 11:05:53 UTC 2017 - fvogt@suse.com
|
Tue Aug 22 11:05:53 UTC 2017 - fvogt@suse.com
|
||||||
|
|
||||||
|
11
rpm.spec
11
rpm.spec
@ -53,7 +53,6 @@ Source: http://ftp.rpm.org/releases/rpm-4.13.x/rpm-%{version}.tar.bz2
|
|||||||
Source1: RPM-HOWTO.tar.bz2
|
Source1: RPM-HOWTO.tar.bz2
|
||||||
Source4: rpm-suse_macros
|
Source4: rpm-suse_macros
|
||||||
Source5: rpmsort
|
Source5: rpmsort
|
||||||
Source6: symset-table
|
|
||||||
Source8: rpmconfigcheck
|
Source8: rpmconfigcheck
|
||||||
Source9: sysconfig.services-rpm
|
Source9: sysconfig.services-rpm
|
||||||
Source10: beecrypt-4.1.2.tar.bz2
|
Source10: beecrypt-4.1.2.tar.bz2
|
||||||
@ -91,7 +90,6 @@ Patch35: taggedfileindex.diff
|
|||||||
Patch36: rpmqpack.diff
|
Patch36: rpmqpack.diff
|
||||||
Patch37: convertdb1static.diff
|
Patch37: convertdb1static.diff
|
||||||
Patch38: build.diff
|
Patch38: build.diff
|
||||||
Patch39: modalias-kernel_module.diff
|
|
||||||
Patch41: debugedit-comp-dir.diff
|
Patch41: debugedit-comp-dir.diff
|
||||||
Patch42: perlprov.diff
|
Patch42: perlprov.diff
|
||||||
Patch43: rpm-shorten-changelog.diff
|
Patch43: rpm-shorten-changelog.diff
|
||||||
@ -125,7 +123,6 @@ Patch75: rpm-deptracking.patch
|
|||||||
Patch76: python3-abi-kind.diff
|
Patch76: python3-abi-kind.diff
|
||||||
Patch77: langnoc.diff
|
Patch77: langnoc.diff
|
||||||
Patch78: headerchk2.diff
|
Patch78: headerchk2.diff
|
||||||
Patch79: helperenv.diff
|
|
||||||
# PATCH-FEATURE-UPSTREAM 4.14 0e87aed1785d0531c40b23889f8338744f6abb3a
|
# PATCH-FEATURE-UPSTREAM 4.14 0e87aed1785d0531c40b23889f8338744f6abb3a
|
||||||
Patch80: 0001-set-SOURCE_DATE_EPOCH-from-changelog.patch
|
Patch80: 0001-set-SOURCE_DATE_EPOCH-from-changelog.patch
|
||||||
# PATCH-FEATURE-UPSTREAM 4.14 57f94a582602f0353cdb17a02dc12c4461d4f32d
|
# PATCH-FEATURE-UPSTREAM 4.14 57f94a582602f0353cdb17a02dc12c4461d4f32d
|
||||||
@ -138,7 +135,6 @@ Patch85: brp-compress-no-img.patch
|
|||||||
Patch92: find-lang-python.patch
|
Patch92: find-lang-python.patch
|
||||||
Patch93: weakdepscompat.diff
|
Patch93: weakdepscompat.diff
|
||||||
Patch94: checksepwarn.diff
|
Patch94: checksepwarn.diff
|
||||||
Patch96: modalias-no-kgraft.diff
|
|
||||||
Patch98: normalize_blocksize.diff
|
Patch98: normalize_blocksize.diff
|
||||||
Patch99: enable-postin-scripts-error.diff
|
Patch99: enable-postin-scripts-error.diff
|
||||||
Patch100: rpm-findlang-inject-metainfo.patch
|
Patch100: rpm-findlang-inject-metainfo.patch
|
||||||
@ -234,13 +230,13 @@ rm -f rpmdb/db.h
|
|||||||
%patch -P 4
|
%patch -P 4
|
||||||
%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
|
%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
|
||||||
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
|
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
|
||||||
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
|
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38
|
||||||
%patch -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
%patch -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
||||||
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58
|
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58
|
||||||
%patch -P 60 -P 61 -P 65 -P 66 -P 67 -P 68 -P 69
|
%patch -P 60 -P 61 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||||
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78
|
||||||
%patch -P 80 -P 81 -P 82 -P 83 -P 85
|
%patch -P 80 -P 81 -P 82 -P 83 -P 85
|
||||||
%patch -P 92 -P 93 -P 94 -P 96 -P 98 -P 99
|
%patch -P 92 -P 93 -P 94 -P 98 -P 99
|
||||||
%patch -P 100 -P 101 -P 102 -P 103 -P 104 -P 105
|
%patch -P 100 -P 101 -P 102 -P 103 -P 104 -P 105
|
||||||
|
|
||||||
%ifarch aarch64 ppc64le
|
%ifarch aarch64 ppc64le
|
||||||
@ -345,7 +341,6 @@ mkdir -p %{buildroot}/var/adm/fillup-templates
|
|||||||
install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/
|
install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/
|
||||||
rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
|
rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
|
||||||
install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm
|
install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm
|
||||||
install -m 755 %{SOURCE6} %{buildroot}/usr/lib/rpm
|
|
||||||
install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
|
install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
|
||||||
install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
|
install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
|
||||||
install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
|
install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
|
||||||
|
36
symset-table
36
symset-table
@ -1,36 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# Create a table of all symbol sets defined in all /boot/symsets*.tar.gz
|
|
||||||
# files.
|
|
||||||
#
|
|
||||||
# Format:
|
|
||||||
# kernelrelease/modver/symbol <tab> symset <tab> symset_hash
|
|
||||||
#
|
|
||||||
# This table is needed for computing the appropriate Requires: tags for
|
|
||||||
# kernel module packages.
|
|
||||||
|
|
||||||
tmpdir=$(mktemp -t -d ${0##*/}.XXXXXX)
|
|
||||||
trap "cd / ; rm -rf $tmpdir" EXIT
|
|
||||||
cd $tmpdir
|
|
||||||
|
|
||||||
ls /boot/symsets-*.tar.gz 2>/dev/null |
|
|
||||||
while read symsets; do
|
|
||||||
zcat $symsets \
|
|
||||||
| tar xf -
|
|
||||||
done
|
|
||||||
|
|
||||||
ls * 2>/dev/null |
|
|
||||||
while read symsets; do
|
|
||||||
krel=${symsets#symsets-}
|
|
||||||
for symset in $symsets/*; do
|
|
||||||
class=${symset##*/} ; class=${class%.*}
|
|
||||||
hash=${symset##*.}
|
|
||||||
awk '
|
|
||||||
BEGIN { FS = "\t" ; OFS = "\t" }
|
|
||||||
{ sub(/0x0*/, "", $1)
|
|
||||||
print krel "/" $1 "/" $2, class, hash }
|
|
||||||
' krel="$krel" class="$class" hash="$hash" $symset
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
# vim:shiftwidth=4 softtabstop=4
|
|
Loading…
Reference in New Issue
Block a user