]> git.ipfire.org Git - people/stevee/pakfire.git/blob - src/quality-agent/050-libs-soname
Use autotools.
[people/stevee/pakfire.git] / src / quality-agent / 050-libs-soname
1 #!/bin/bash
2
3 . $(dirname ${0})/qa-include
4
5 DESC="Every shared object has to provide the SONAME entry."
6
7 check() {
8 local failed=0
9
10 local file
11 local soname
12 for file in $(find_elf_files --prefix=${BUILDROOT} ${LIBARY_PATHS}); do
13 if ! grep -q "\.so" <<<${file}; then
14 continue
15 fi
16
17 if ! file_is_shared_object ${file}; then
18 continue
19 fi
20
21 if ! file_has_interpreter ${file}; then
22 continue
23 fi
24
25 soname=$(file_get_soname ${file})
26 if [ -z "${soname}" ]; then
27 log_error " File lacks soname attribute: ${file}"
28 failed=1
29 fi
30 done
31
32 return ${failed}
33 }
34
35 run