rpm/findksyms.diff
Andreas Jaeger 0a1fcefb6d Accepting request 147491 from devel:Factory:ARM
- Update to 4.10.2

- Update to 4.10.2

- update to 4.10.2 (bnc#796375):
  * Fix missing error code on unparseable signature in packages,
  regression introduced in rpm 4.10.0. This could result in packages
  with malformed signature falling through signature checking.
  * Fix missing error code on --import on bogus key file (RhBug:869667)
  * Fix installation of packages containing skipped hardlinks (RhBug:864622)
  * Fix --setperms regression introduced in rpm 4.10.0 (RhBug:881835)
  * Fix locale dependent behavior in rpm2cpio.sh (RhBug:878363)
  * Add --undefine cli switch for undefining macros (related to RhBug:876308)
  * Fix warnings when building with gcc >= 4.7
  * Permit key imports on transactions where signature checking is 
  disabled, regression of sorts introduced in 4.10.0 (RhBug:856225)
  * Fix RPMPROB_FILTER_FORCERELOCATE aka --badreloc, regression introduced in
  4.9.0 (RhBug:828784)
  * Verify files from non-installed packages again, regression introduced 
  in 4.9.0 (RhBug:826589)
  * Fix large (> 4GB) package support, regression introduced in 
  4.9.0 (RhBug:844936)
  * Only create the first instance of a file shared between multiple 
  packages on install (speedup + improved verification timestamp behavior)
  * Report config and missinok flags too in deptype format extension
  * Fix relative path handling in --whatprovides query
  * Add --noclean and --nocheck options to rpmbuild (RhBug:756531)
  * Permit non-existent %ghost directories to be packaged (RhBug:839656)
  * Dont silence patch by default (RhBug:678000, RhBug:773503)
  * Accept "owner" as an alias to "user" %verify attribute (RhBug:838657)

OBS-URL: https://build.opensuse.org/request/show/147491
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=245
2013-01-09 09:46:46 +00:00

125 lines
3.3 KiB
Diff

SUSE specific kernel provides/requires scripts
--- scripts/find-provides.ksyms
+++ scripts/find-provides.ksyms
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+IFS=$'\n'
+
+case "$1" in
+kernel-module-*) ;; # Fedora kernel module package names start with
+ # kernel-module.
+kernel*) kernel_flavor=${1#kernel-} ;;
+esac
+
+trap 'rm -f "$tmp"' EXIT
+tmp=$(mktemp)
+while read f; do
+ test -e "$f" || continue
+ case "$f" in
+ *.debug)
+ continue
+ ;;
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
+ ;;
+ *)
+ continue
+ esac
+ unzip=false
+ case "$f" in
+ *.gz | */boot/vmlinuz*)
+ unzip=true
+ esac
+ if $unzip && gzip -cd "$f" >"$tmp"; then
+ f=$tmp
+ fi
+ flavor=$(/sbin/modinfo -F vermagic "$f")
+ flavor=${flavor%% *}
+ flavor=${flavor##*-}
+ if test -z "$flavor"; then
+ flavor=$kernel_flavor
+ fi
+ nm "$f" \
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+done \
+| sort -u
--- scripts/find-requires.ksyms
+++ scripts/find-requires.ksyms
@@ -0,0 +1,57 @@
+#! /bin/bash
+
+IFS=$'\n'
+
+case "$1" in
+kernel-module-*) ;; # Fedora kernel module package names start with
+ # kernel-module.
+kernel*) is_kernel_package=1 ;;
+esac
+
+all_provides() {
+ for module in "$@"; do
+ nm "$module"
+ done \
+ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \
+ | sort -t $'\t' -k2 -u
+}
+
+all_requires() {
+ for module in "$@"; do
+ set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q)
+ /sbin/modprobe --dump-modversions "$module" \
+ | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':'
+ done \
+ | sort -t $'\t' -k2 -u
+}
+
+if ! [ -z "$is_kernel_package" -a -e /sbin/modinfo -a -e /sbin/modprobe ]; then
+ cat > /dev/null
+ exit 0
+fi
+
+modules=($(grep -E '/lib/modules/.+\.ko$'))
+if [ ${#modules[@]} -gt 0 ]; then
+ symset_table=$(mktemp -t ${0##*/}.XXXXX)
+ /usr/lib/rpm/symset-table | sort -t $'\t' -k 1,1 > $symset_table
+
+ join -t $'\t' -j 1 -a 2 $symset_table <(
+ # Filter out requirements that we fulfill ourself.
+ join -t $'\t' -j 2 -v 1 \
+ <(all_requires "${modules[@]}") \
+ <(all_provides "${modules[@]}") \
+ | awk '
+ BEGIN { FS = "\t" ; OFS = "\t" }
+ { print $3 "/" $2 "/" $1 }
+ ' \
+ | sort -t $'\t' -k 1,1 -u) \
+ | sort -u \
+ | awk '
+ { FS = "\t" ; OFS = "\t" }
+ { split($1, arr, "/")
+ flavor = gensub(/.*-/, "", "", arr[1]) }
+ NF == 3 { print "kernel(" flavor ":" $2 ") = " $3
+ next }
+ { print "ksym(" flavor ":" arr[3] ") = " arr[2] }
+ '
+fi
--- scripts/Makefile.am
+++ scripts/Makefile.am
@@ -15,6 +15,7 @@
rpmdb_loadcvt rpm.daily rpm.log rpm.supp rpm2cpio.sh \
tcl.req tgpg vpkg-provides.sh \
find-requires.php find-provides.php \
+ find-requires.ksyms find-provides.ksyms \
find-php-provides find-php-requires \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
@@ -30,6 +31,7 @@
check-buildroot check-rpaths check-rpaths-worker \
find-lang.sh \
perl.prov perl.req perldeps.pl pythondeps.sh osgideps.pl \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \