]> git.ipfire.org Git - pakfire.git/commitdiff
QA: Add check for illegal libraries in /usr/lib on x86_64.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Dec 2011 21:34:40 +0000 (22:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Dec 2011 21:34:40 +0000 (22:34 +0100)
tools/quality-agent.d/050-libs-x86_64 [new file with mode: 0755]

diff --git a/tools/quality-agent.d/050-libs-x86_64 b/tools/quality-agent.d/050-libs-x86_64
new file mode 100755 (executable)
index 0000000..292f4dc
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+. $(dirname ${0})/qa-include
+
+DESC="Shared libs in /lib or /usr/lib are not allowed."
+
+check() {
+       local failed=0
+
+       # Do nothing on other platforms.
+       [ "$(uname -m)" = "x86_64" ] || return ${failed}
+
+       local file
+       for file in $(find ${BUILDROOT}/lib ${BUILDROOT}/usr/lib -name "*.so*" 2>/dev/null); do
+               log_error "  Unallowed location for library: ${file}"
+               failed=1
+       done
+
+       return ${failed}
+}
+
+run