index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-11-16 09:53:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-16 09:53:51 +0100 |
commit | 26caf3b571f023cfd9d56314abccab845e94b07b (patch) | |
tree | 1afcbaca44514dfd876db52dcb74d27e24d726aa | |
parent | b5a548b0cbc6f6832eb60c04fb29cb1991ba8b07 (diff) |
-rwxr-xr-x | bin/build-packages | 37 |
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 >> \ |