summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2024-05-07 15:07:47 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2024-05-07 15:09:02 +0900
commit1188a3e7eb996c4fa8b945ede08194a4a752de0f (patch)
tree73b0e2daa61d837eeefd38bd279bf93effa9fdea
parent5c5444fc73c5e46e512f601be78af9e222c66115 (diff)
downloadrpm-1188a3e7eb996c4fa8b945ede08194a4a752de0f.tar.gz
rpm-1188a3e7eb996c4fa8b945ede08194a4a752de0f.tar.bz2
rpm-1188a3e7eb996c4fa8b945ede08194a4a752de0f.zip
Revert "tizen: Use upstream version of find-provides.ksyms"
This reverts commit be0ba8d1741898ea3388c9f9008edbcbc620fe66. Change-Id: Ic271cd93e3d78c97451da3d84808a457c748bca5 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rwxr-xr-xpackaging/find-provides.ksyms41
-rw-r--r--packaging/rpm.spec3
2 files changed, 44 insertions, 0 deletions
diff --git a/packaging/find-provides.ksyms b/packaging/find-provides.ksyms
new file mode 100755
index 000000000..c8f2ccda6
--- /dev/null
+++ b/packaging/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=$(/usr/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
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index a24c15196..02246134b 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -49,6 +49,7 @@ Source8: rpmconfigcheck
Source13: find-docs.sh
Source14: find-isufiles.sh
Source22: device-sec-policy
+Source23: find-provides.ksyms
Source24: debug.manifest
Source1001: rpm.manifest
Source0: rpm-%{version}.tar.bz2
@@ -192,6 +193,7 @@ mkdir -p %{buildroot}%{rpmhome}/tizen
cp -a tizen_macros %{buildroot}%{rpmhome}
install -m 755 %{SOURCE13} %{buildroot}%{rpmhome}/tizen
install -m 755 %{SOURCE14} %{buildroot}%{rpmhome}/tizen
+install -m 755 %{SOURCE23} %{buildroot}%{rpmhome}
install -m 644 %{SOURCE9} %{buildroot}%{rpmhome}/fileattrs/libsymlink.attr
install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/device-sec-policy
install -m 644 %{SOURCE22} %{buildroot}%{__plugindir}/msm-device-sec-policy
@@ -327,6 +329,7 @@ rm -f %{_dbpath}/Filemd5s \
%{rpmhome}/python-macro-helper
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/find-lang.sh
+%{rpmhome}/find-provides.ksyms
%{rpmhome}/*provides*
%{rpmhome}/*requires*
%{rpmhome}/*deps*