aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--sbopkglint.d/75-static_libs.t.sh11
2 files changed, 12 insertions, 0 deletions
diff --git a/TODO b/TODO
index 7cb6b5c..189520d 100644
--- a/TODO
+++ b/TODO
@@ -5,6 +5,7 @@ TODO: if sbopkglint finds a hardcoded $PKG in /var/lib/pkgtools/scripts/*,
Not yet implemented:
TODO: if package contains any static libs, don't suggest noarch.
+TODO: check arch of static libs (like the shared lib checks).
TODO: stop checking shared libs for +x and being stripped if they're not
directly in /lib /lib64 /usr/lib /usr/lib64. too many packages
trigger this, and it just doesn't matter much.
diff --git a/sbopkglint.d/75-static_libs.t.sh b/sbopkglint.d/75-static_libs.t.sh
index fab2a2b..ae6a4f5 100644
--- a/sbopkglint.d/75-static_libs.t.sh
+++ b/sbopkglint.d/75-static_libs.t.sh
@@ -11,6 +11,17 @@
# if the package includes both a static and shared library, a note is
# triggered, suggesting removal of the static lib. this is not an error.
+# TODO: this will give us file's idea of what's inside a .a archive:
+# $ bsdtar -xOf /usr/lib64/libz.a '*.*' | file -b -
+# ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
+# For 32-bit:
+# ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
+# 'not stripped' is *correct*, don't complain about it! actually maybe
+# it should complain if it *is* stripped, since
+# Armed with this knowledge, we can do the same kind of arch checks for
+# static libs as we do for shared (32-bit belongs in lib, 64 in lib64,
+# arch of the static lib should match package's ARCH, etc).
+
for libdir in lib lib64 usr/lib usr/lib64; do
if [ -d $libdir ]; then
find_warnfiles "bad static library ownership (should be root:root):" \