summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages59
1 files changed, 32 insertions, 27 deletions
diff --git a/bin/build-packages b/bin/build-packages
index d938d67..776dfe5 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -488,8 +488,13 @@ while [ "${count}" -ne 0 ] && \
build_command='staging-'"${arch}"'-build'
fi
- find . -maxdepth 1 -type f \( -name '*.pkg.tar.xz' -o -name '*.pkg.tar.xz.sig' \) -exec \
- rm {} \;
+ find . -maxdepth 1 -type f \( \
+ -name '*.pkg.tar.xz' \
+ -o -name '*.pkg.tar.xz.sig' \
+ -o -name '*.pkg.tar.zst' \
+ -o -name '*.pkg.tar.zst.sig' \
+ \) \
+ -exec rm {} \;
echo 'checking-source' > "${tmp_dir}/.ping-build-master"
success=false
@@ -577,7 +582,7 @@ while [ "${count}" -ne 0 ] && \
)
if wget -q --timeout=15 -nc -nd "https://sources.archlinux.org/sources/${git_repo}/${source_name}"; then
# shellcheck disable=SC2046
- tar -xz --overwrite \
+ tar -zst --overwrite \
-f "${source_name}" \
--exclude PKGBUILD \
$(
@@ -657,7 +662,7 @@ while [ "${count}" -ne 0 ] && \
# build successful
>&2 printf ' ok.\n'
if [ "${build_command}" = 'makepkg' ]; then
- find . -maxdepth 1 -type f -name '*.pkg.tar.xz' \
+ 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")
@@ -665,7 +670,7 @@ while [ "${count}" -ne 0 ] && \
# remove unexpected packages
if [ -n "${expected_packages}" ]; then
{
- find . -maxdepth 1 -type f -name '*.pkg.tar.xz' -printf '%f\n'
+ find . -maxdepth 1 -type f -name '*.pkg.tar.zst' -printf '%f\n'
printf '%s\n' "${expected_packages}" | \
sed 'p'
} | \
@@ -676,7 +681,7 @@ while [ "${count}" -ne 0 ] && \
done
fi
>&2 printf 'signing package(s)\n'
- find . -maxdepth 1 -type f -name '*.pkg.tar.xz' \
+ find . -maxdepth 1 -type f -name '*.pkg.tar.zst' \
-execdir gpg --local-user="${package_key}" --detach-sign '{}' \; \
-execdir mv '{}' '{}.sig' '{}-namcap.log' "${tar_content_dir}/" \; \
-printf '%f\n' | \
@@ -685,7 +690,7 @@ while [ "${count}" -ne 0 ] && \
{
pacman -Spdd --print-format '%l' --noconfirm "${pkg_file%-*-*-*}" 2>/dev/null | \
sed '
- s|/[^/]\+\.pkg\.tar\.xz$||
+ s|/[^/]\+\.pkg\.tar\.zst$||
'
# shellcheck disable=SC2016
curl -Ss 'https://www.archlinux.org/mirrorlist/?country=all&protocol=https&tier=1&use_mirror_status=on' | \
@@ -701,7 +706,7 @@ while [ "${count}" -ne 0 ] && \
sed '
s|$|/'"${pkg_file}"'|
s/\.[0-9]\+\(-[^-]\+\)$/\1/
- s/-'"${arch}"'\+\(\.pkg\.tar\.xz\)$/-x86_64\1/
+ s/-'"${arch}"'\+\(\.pkg\.tar\.zst\)$/-x86_64\1/
' | \
while read -r url; do
>&2 printf 'downloading "%s" ...' "${url}"
@@ -714,7 +719,7 @@ while [ "${count}" -ne 0 ] && \
done
>&2 printf 'searching for provided libraries\n'
find "${tar_content_dir}" -maxdepth 1 \
- -name '*.pkg.tar.xz' \
+ -name '*.pkg.tar.zst' \
-printf '%p\n' | \
while read -r pkgfile; do
pacman -Qqlp "${pkgfile}" | \
@@ -733,10 +738,10 @@ while [ "${count}" -ne 0 ] && \
>&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' | \
+ -name '*.pkg.tar.zst' | \
while read -r pkgfile; do
if printf '%s\n' "${pkgfile}" | \
- grep -vq -- '-any\.pkg\.tar\.xz$'; then
+ grep -vq -- '-any\.pkg\.tar\.zst$'; then
# we do not check "any" packages for linked libraries
# (why do they have them in the first place?)
mkdir "${package_content_dir}/${pkgfile##*/}"
@@ -879,21 +884,21 @@ while [ "${count}" -ne 0 ] && \
x86_64_build_command='extra-x86_64-build'
fi
# this is a little hack: makepkg receives '--version', but namcap is run nevertheless
- # (and it only works with devtools32, because they are running namcap on *.pkg.tar.xz in the base directory, too)
+ # (and it only works with devtools32, because they are running namcap on *.pkg.tar.zst in the base directory, too)
sudo "${x86_64_build_command}" -- -- --version > /dev/null 2>&1 || \
sudo "${x86_64_build_command}" -c -- -- --version > /dev/null 2>&1 || \
true
>&2 printf ' ok.\n'
>&2 printf 'smoothen namcap log ...'
# now we generate diffs from the namcap.logs
- find . "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.xz-namcap.log' -printf '%p\n' | \
+ find . "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.zst-namcap.log' -printf '%p\n' | \
while read -r log; do
smoothen_namcap_log "${log}"
done
- find "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.xz-namcap.log' -printf '%f\n' | \
+ find "${tar_content_dir}/" -maxdepth 1 -type f -name '*.pkg.tar.zst-namcap.log' -printf '%f\n' | \
sed '
- s|\(^.*\)-'"${arch}"'\(\.pkg\.tar\.xz-namcap\.log\)$|\0 \1-x86_64\2|
- s|^.*-any\.pkg\.tar\.xz-namcap\.log$|\0 \0|
+ s|\(^.*\)-'"${arch}"'\(\.pkg\.tar\.zst-namcap\.log\)$|\0 \1-x86_64\2|
+ s|^.*-any\.pkg\.tar\.zst-namcap\.log$|\0 \0|
' | \
while read -r log x86_64_log; do
if [ -f "${x86_64_log}" ]; then
@@ -912,25 +917,25 @@ while [ "${count}" -ne 0 ] && \
if ${upload_to_build_master}; then
find "${tar_content_dir}/" -maxdepth 1 \
\( \
- -name '*.pkg.tar.xz-namcap.log' -o \
- -name '*.pkg.tar.xz.so.needs' -o \
- -name '*.pkg.tar.xz.so.provides' \
+ -name '*.pkg.tar.zst-namcap.log' -o \
+ -name '*.pkg.tar.zst.so.needs' -o \
+ -name '*.pkg.tar.zst.so.provides' \
\) \
-execdir gzip '{}' \;
else
find "${tar_content_dir}/" -maxdepth 1 \
- -name '*.pkg.tar.xz-namcap.log' \
+ -name '*.pkg.tar.zst-namcap.log' \
-execdir grep -HF '' '{}' \;
fi
# shellcheck disable=SC2046
tar -cf 'package.tar' -C "${tar_content_dir}" -- $(
find "${tar_content_dir}/" -maxdepth 1 \
\( \
- -name '*.pkg.tar.xz' -o \
- -name '*.pkg.tar.xz.sig' -o \
- -name '*.pkg.tar.xz-namcap.log.gz' -o \
- -name '*.pkg.tar.xz.so.needs.gz' -o \
- -name '*.pkg.tar.xz.so.provides.gz' \
+ -name '*.pkg.tar.zst' -o \
+ -name '*.pkg.tar.zst.sig' -o \
+ -name '*.pkg.tar.zst-namcap.log.gz' -o \
+ -name '*.pkg.tar.zst.so.needs.gz' -o \
+ -name '*.pkg.tar.zst.so.provides.gz' \
\) \
-printf '%f\n'
) || \
@@ -940,8 +945,8 @@ while [ "${count}" -ne 0 ] && \
rsync $(
find "${tar_content_dir}/" -maxdepth 1 \
\( \
- -name '*.pkg.tar.xz' -o \
- -name '*.pkg.tar.xz.sig' \
+ -name '*.pkg.tar.zst' -o \
+ -name '*.pkg.tar.zst.sig' \
\) \
-printf '%p\n'
) "rsync://mirror.archlinux32.org/transfer32/" || true