2017-12-05 11:46:24 +01:00
|
|
|
--- ./scripts/Makefile.am.orig 2017-12-01 14:48:23.171746842 +0000
|
|
|
|
+++ ./scripts/Makefile.am 2017-12-01 14:49:09.395612962 +0000
|
|
|
|
@@ -18,6 +18,7 @@ EXTRA_DIST = \
|
2017-01-19 16:41:55 +01:00
|
|
|
tgpg vpkg-provides.sh \
|
2014-09-16 14:03:10 +02:00
|
|
|
find-requires find-provides \
|
|
|
|
find-requires.php find-provides.php \
|
|
|
|
+ find-requires.ksyms find-provides.ksyms \
|
|
|
|
mono-find-requires mono-find-provides \
|
|
|
|
ocaml-find-requires.sh ocaml-find-provides.sh \
|
2017-12-05 11:46:24 +01:00
|
|
|
pkgconfigdeps.sh libtooldeps.sh metainfo.prov \
|
|
|
|
@@ -34,6 +35,7 @@ rpmconfig_SCRIPTS = \
|
|
|
|
debuginfo.prov \
|
2014-09-16 14:03:10 +02:00
|
|
|
find-lang.sh find-requires find-provides \
|
2017-12-05 11:46:24 +01:00
|
|
|
perl.prov perl.req pythondeps.sh pythondistdeps.py \
|
2014-09-16 14:03:10 +02:00
|
|
|
+ find-requires.ksyms find-provides.ksyms \
|
2017-12-05 11:46:24 +01:00
|
|
|
metainfo.prov \
|
2014-09-16 14:03:10 +02:00
|
|
|
mono-find-requires mono-find-provides \
|
|
|
|
pkgconfigdeps.sh libtooldeps.sh \
|
2017-12-05 11:46:24 +01:00
|
|
|
--- ./scripts/find-provides.ksyms.orig 2017-12-01 14:48:28.374731785 +0000
|
|
|
|
+++ ./scripts/find-provides.ksyms 2017-12-01 14:48:28.374731785 +0000
|
2017-09-20 17:29:49 +02:00
|
|
|
@@ -0,0 +1,60 @@
|
2013-07-12 16:11:14 +02:00
|
|
|
+#! /bin/bash
|
2006-12-19 00:17:44 +01:00
|
|
|
+
|
|
|
|
+IFS=$'\n'
|
|
|
|
+
|
2017-09-20 17:29:49 +02:00
|
|
|
+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
|
|
|
|
+
|
|
|
|
+
|
2009-06-12 16:15:38 +02:00
|
|
|
+while read f; do
|
|
|
|
+ test -e "$f" || continue
|
|
|
|
+ case "$f" in
|
|
|
|
+ *.debug)
|
2017-09-20 17:29:49 +02:00
|
|
|
+ continue
|
2009-06-12 16:15:38 +02:00
|
|
|
+ ;;
|
2013-07-12 16:11:14 +02:00
|
|
|
+ */boot/vmlinu[xz]-*)
|
2017-09-20 17:29:49 +02:00
|
|
|
+ flavor=${f##*/vmlinu[xz]-}
|
|
|
|
+ flavor=${flavor%.gz}
|
|
|
|
+ echo "kernel-uname-r = $flavor"
|
|
|
|
+ flavor=${flavor##*-}
|
|
|
|
+ ;;
|
|
|
|
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
|
2009-06-12 16:15:38 +02:00
|
|
|
+ ;;
|
2017-09-20 17:29:49 +02:00
|
|
|
+ *)
|
|
|
|
+ continue
|
2009-06-12 16:15:38 +02:00
|
|
|
+ esac
|
2017-09-20 17:29:49 +02:00
|
|
|
+ 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"
|
2006-12-19 00:17:44 +01:00
|
|
|
+done \
|
|
|
|
+| sort -u
|
2017-12-05 11:46:24 +01:00
|
|
|
--- ./scripts/find-requires.ksyms.orig 2017-12-01 14:48:28.375731781 +0000
|
|
|
|
+++ ./scripts/find-requires.ksyms 2017-12-01 14:48:28.375731781 +0000
|
2017-09-20 17:29:49 +02:00
|
|
|
@@ -0,0 +1,29 @@
|
2006-12-19 00:17:44 +01:00
|
|
|
+#! /bin/bash
|
|
|
|
+
|
|
|
|
+IFS=$'\n'
|
|
|
|
+
|
2017-09-20 17:29:49 +02:00
|
|
|
+is_opensuse=false
|
|
|
|
+
|
|
|
|
+if test "$1" = "--opensuse"; then
|
|
|
|
+ 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=${flavor%%/*}
|
|
|
|
+ if $is_opensuse; then
|
|
|
|
+ echo "kernel-uname-r = $flavor"
|
|
|
|
+ continue
|
|
|
|
+ fi
|
|
|
|
+ flavor=${flavor##*-}
|
|
|
|
+ /sbin/modprobe --dump-modversions "$f" \
|
|
|
|
+ | sed -r -ne "s/^0x0*([0-9a-f]+)[[:blank:]]+(.+)/ksym($flavor:\\2) = \\1/p"
|
|
|
|
+done | sort -u
|