index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/build-packages | 14 |
diff --git a/bin/build-packages b/bin/build-packages index 3689fa7..ea9098e 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -493,6 +493,7 @@ while [ "${count}" -ne 0 ] && \ -o -name '*.pkg.tar.xz.sig' \ -o -name '*.pkg.tar.zst' \ -o -name '*.pkg.tar.zst.sig' \ + -o -name '*.pkg.tar' \ \) \ -exec rm {} \; @@ -629,7 +630,7 @@ while [ "${count}" -ne 0 ] && \ # by piping the log, we don't see anything in the terminal, # but all ways to duplicate the logs seem pretty elaborate # shellcheck disable=SC2024,SC2086 - if ! "${build_command}" ${outerParameters} -- ${middleParameters} -- ${innerParameters} > \ + if ! PKGEXT='.pkg.tar' "${build_command}" ${outerParameters} -- ${middleParameters} -- ${innerParameters} > \ "${log_file}" 2>&1; then success=false build_dir="/var/lib/archbuild/${build_command%-build}/$(whoami)" @@ -660,13 +661,22 @@ while [ "${count}" -ne 0 ] && \ if ${success}; then # build successful + echo 'compressing' > "${tmp_dir}/.ping-build-master" + >&2 printf ' ok, compressing package(s) ...' + # We requested to build uncompressed packages - those will be + # compressed now (which can be offloaded to a different + # machine, if need arises in the future). Note, that it is no + # error, if the above build command already produced a + # compressed package. + find . -maxdepth 1 -type f -name '*.pkg.tar' \ + -execdir zstd -T0 --ultra -20 '{}' -o '{}.zst' \; + echo 'post-build' > "${tmp_dir}/.ping-build-master" >&2 printf ' ok.\n' if [ "${build_command}" = 'makepkg' ]; then find . -maxdepth 1 -type f -name '*.pkg.tar.zst' \ -exec sh -c 'namcap "$1" > "$1-namcap.log"' '_' '{}' \; fi tar_content_dir=$(mktemp -d "${tmp_dir}/tar-content.XXXXXX") - echo 'post-build' > "${tmp_dir}/.ping-build-master" # remove unexpected packages if [ -n "${expected_packages}" ]; then { |