Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-16 09:53:51 +0100
committerErich Eckner <git@eckner.net>2018-11-16 09:53:51 +0100
commit26caf3b571f023cfd9d56314abccab845e94b07b (patch)
tree1afcbaca44514dfd876db52dcb74d27e24d726aa /bin
parentb5a548b0cbc6f6832eb60c04fb29cb1991ba8b07 (diff)
bin/build-packages: add library names to provided symbols - it appears, symbol names are only unique within one library
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages37
1 files changed, 25 insertions, 12 deletions
diff --git a/bin/build-packages b/bin/build-packages
index dd733eb..ae3d01a 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -554,25 +554,19 @@ while [ "${count}" -ne 0 ] && \
done
>&2 printf 'searching for required and more provided libraries\n'
package_content_dir=$(mktemp -d "${tmp_dir}/package-content.XXXXXX")
- # TODO: qt version should be added here, too
find "${tar_content_dir}" -maxdepth 1 \
-name '*.pkg.tar.xz' | \
while read -r pkgfile; do
- tar -OxJf "${pkgfile}" '.BUILDINFO' 2>/dev/null | \
- sed -n '
- s/^installed = \(glibc\)-\([0-9.]\+\)\(-[^-]\+\)\{2\}$/\1>=\2/
- T
- p
- ' > \
- "${pkgfile}.so.needs"
if printf '%s\n' "${pkgfile}" | \
grep -vq -- '-any\.pkg\.tar\.xz$'; then
# we do not check "any" packages for linked libraries
# (why do they have them in the first place?)
mkdir "${package_content_dir}/${pkgfile##*/}"
tar -C "${package_content_dir}/${pkgfile##*/}" -xJf "${pkgfile}" 2>/dev/null
+ # we rely on "${checksum}" not appearing in any objdump output
find "${package_content_dir}/${pkgfile##*/}" \
-name 'opt' -prune , \
+ -type f \
-exec objdump -x '{}' \; 2>/dev/null | \
sed '
/^architecture:.* i386:x86-64, /,/^architecture:.* i386:x86-32, / d
@@ -583,10 +577,19 @@ while [ "${count}" -ne 0 ] && \
t
}
/^Version References:$/,/^$/ {
- /^\s*required from/ d
- s/^\s*\(0x[0-9a-fA-F]\+\)\s\+0x[0-9a-fA-F]\+\s\+[0-9]\+\s\+\(\S\+\)$/\2=\1/
+ /^\s*required from / {
+ s/^\s*required from \(\S\+\):\s*$/'"${checksum}"'\1/
+ T end
+ h
+ d
+ }
+ s/^\s*\(0x[0-9a-fA-F]\+\)\s\+0x[0-9a-fA-F]\+\s\+[0-9]\+\s\+\(\S\+\)$/\2-\1/
+ T end
+ G
+ s/^\(\S\+\)\n'"${checksum}"'\(\S\+\)$/\2-\1/
t
}
+ :end
d
' | \
sort -u > \
@@ -603,17 +606,27 @@ while [ "${count}" -ne 0 ] && \
' "${pkgfile}.so.needs"
find "${package_content_dir}/${pkgfile##*/}" \
-name 'opt' -prune , \
- -exec objdump -x '{}' \; 2>/dev/null | \
+ -type f \
+ -exec objdump -x '{}' \; \
+ -printf "${checksum}"'%f\n' 2>/dev/null | \
sed '
/^architecture:.* i386:x86-64, /,/^architecture:.* i386:x86-32, / d
+ /^'"${checksum}"'/ {
+ h
+ d
+ }
/SONAME/ {
s/^\s*\S\+\s\+\(\S\+\)\s.*$/\1/
t
}
/^Version definitions:$/,/^$/ {
- s/^[0-9]\+\s\+0x[0-9a-fA-F]\+\s\+\(0x[0-9a-fA-F]\+\)\s\+\(\S\+\)$/\2=\1/
+ s/^[0-9]\+\s\+0x[0-9a-fA-F]\+\s\+\(0x[0-9a-fA-F]\+\)\s\+\(\S\+\)$/\2-\1/
+ T end
+ G
+ s/^\(\S\+\)\n'"${checksum}"'\(\S\+\)$/\2-\1/
t
}
+ :end
d
' | \
sort -u >> \