summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-15 09:43:33 +0200
committerErich Eckner <git@eckner.net>2018-05-15 09:43:33 +0200
commit8f2b7e42637e3cabdd4c970e2a65720df27b303e (patch)
tree647c16c1a975beedb6649d7e2c32b12684a818e6 /bin
parent283fc7692b55761479efe7e9f1fd48f244e5bd9b (diff)
downloadbuilder-8f2b7e42637e3cabdd4c970e2a65720df27b303e.tar.xz
bin/build-packages: sonames of libraries are also "provided libraries"
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages21
1 files changed, 16 insertions, 5 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 1079f40..a930005 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -459,11 +459,12 @@ while [ "${count}" -ne 0 ]; do
' > \
"${pkgfile}.so.provides"
done
- >&2 printf 'searching for required libraries\n'
+ >&2 printf 'searching for required and more provided libraries\n'
package_content_dir=$(mktemp -d "${tmp_dir}/package-content.XXXXXX")
find "${tar_content_dir}" -maxdepth 1 \
-name '*.pkg.tar.xz' | \
while read -r pkgfile; do
+ touch "${pkgfile}.so.needs"
if printf '%s\n' "${pkgfile}" | \
grep -vq -- '-any\.pkg\.tar\.xz$'; then
# we do not check "any" packages for linked libraries
@@ -481,12 +482,22 @@ while [ "${count}" -ne 0 ]; do
sed '
/\.c32$/d
s,^.*/,,
- '
+ ' | \
+ sort -u > \
+ "${pkgfile}.so.needs"
+ find "${package_content_dir}/${pkgfile##*/}" \
+ -name 'opt' -prune , \
+ -exec objdump -x '{}' \; 2>/dev/null | \
+ sed '
+ /^architecture:.* i386:x86-64, /,/^architecture:.* i386:x86-32, / d
+ ' | \
+ grep -w 'SONAME' | \
+ awk '{print $2}' | \
+ sort -u >> \
+ "${pkgfile}.so.provides"
find "${package_content_dir:?}/${pkgfile##*/}" -xdev -exec chmod 777 '{}' \;
rm -rf --one-file-system "${package_content_dir:?}/${pkgfile##*/}"
- fi | \
- sort -u > \
- "${pkgfile}.so.needs"
+ fi
done
>&2 printf 'running namcap ...'
if [ "${repository}" = 'multilib' ]; then