]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- __spec_install_post_check_so macro that finds unresolved symbols in shared object...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 5 Nov 2008 09:54:27 +0000 (09:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.486

rpm.macros

index 232925dd76fb8e4cff2c8f7a01675c3216fe1b72..27aceb73105a7c4e61cee47576d0d407ae8b550f 100644 (file)
@@ -487,6 +487,21 @@ if [ -d "$RPM_BUILD_ROOT" ]; then \
        fi; \
 fi; }; __spec_install_post_chrpath } } }
 
+#-----------------------------------------------------------------
+# Find all shared object files with unresolved symbols. Warn
+# and terminate if any found (termination can be turned off by define).
+#%no_install_post_check_so 1
+%__spec_install_post_check_so { \
+ __spec_install_post_check_so() { \
+    fail=0; \
+    printf "Searching for shared objects with unresolved symbols..."; \
+    for f in $(find $RPM_BUILD_ROOT -type f -name '*.so*' -print); do \
+        LC_ALL=C objdump -T $f 2> /dev/null | LC_ALL=C awk -v "file=$f" 'BEGIN { found=0; symbols = "" } /^[0-9a-z]+ +D +\*UND\*/ { found = 1; symbols = symbols "\n\t" $NF } END { if (found) { print "Unresolved symbols found in: " file symbols; exit(1); } } ' || fail=1 ; \
+    done ; \
+    echo " DONE"; \
+    %{!?no_install_post_check_so:[ $fail -eq 1 ] && exit 1;} \
+}; __spec_install_post_check_so }}
+
 #-----------------------------------------------------------------
 # Find and gzip all kernel modules
 #
This page took 0.054627 seconds and 4 git commands to generate.