summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-12-05 20:56:46 +0100
committerErich Eckner <git@eckner.net>2018-12-05 20:56:46 +0100
commit68898d11cde5d0b78962bb47e2762afa7a9830c0 (patch)
tree3493ccb266163393f2fc50c4b587f3f50254fc7c
parent95eba91567209824dd6beac290e06097fb328143 (diff)
downloaddevops-68898d11cde5d0b78962bb47e2762afa7a9830c0.tar.xz
update-archlinux32-package: update_path "checksum" new
-rwxr-xr-xupdate-archlinux32-package46
1 files changed, 46 insertions, 0 deletions
diff --git a/update-archlinux32-package b/update-archlinux32-package
index c9481f0..e8a1d98 100755
--- a/update-archlinux32-package
+++ b/update-archlinux32-package
@@ -86,6 +86,10 @@ case "${pkgname}" in
# upstream, though)
update_path='archlinuxewe'
;;
+ 'flashplugin')
+ # an upstream package which is updated by solely updating its checksum
+ update_path='checksum'
+ ;;
'linux'|'linux-lts'|'linux-zen')
# a kernel which exists upstream -> different config and checksums
update_path='kernel with upstream'
@@ -174,6 +178,48 @@ case ${update_path} in
fi
git -C "${git_repo_path}" commit "${repo}/${pkgname}/PKGBUILD" -m "${repo}/${pkgname}: ${old_pkgver} -> ${new_pkgver}"
;;
+ 'checksum')
+ repo_arch=$(
+ git -C "${upstream_git_path}/${pkgname}/repos" archive HEAD -- | \
+ tar -t | \
+ sed 's/^'"${repo}-"'//;t;d' | \
+ head -n1
+ )
+ scp -r "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}" \
+ "arch32-test:${pkgname}"
+ sums=$(
+ ssh arch32-test '
+ cd "'"${pkgname}"'"
+ cat >> PKGBUILD
+ echo "arch+=(i686)" >> PKGBUILD
+ makepkg -g
+ ' < "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
+ | sed '
+ $! s/$/\\n/
+ ' | \
+ tr -d '\n'
+ )
+ echo "'$sums'"
+ sed -i '
+ /^\S\+sums=(/{
+ :a
+ $b
+ N
+ s/^\S\+sums=(.*)/'"${sums}"'/
+ }
+ ' "${git_repo_path}/${repo}/${pkgname}/PKGBUILD"
+ if ! cat "${upstream_git_path}/${pkgname}/repos/${repo}-${repo_arch}/PKGBUILD" "${git_repo_path}/${repo}/${pkgname}/PKGBUILD" \
+ | ssh arch32-test '
+ cd "'"${pkgname}"'"
+ cat > PKGBUILD
+ echo "arch+=(i686)" >> PKGBUILD
+ makepkg --verifysource
+ '; then
+ >&2 echo 'something went wrong'
+ exit 1
+ fi
+ git -C "${git_repo_path}" commit "${repo}/${pkgname}/PKGBUILD" -m "${repo}/${pkgname}: new version => new checksum"
+ ;;
'kernel without upstream')
infos=$(
"${base_dir}/watch-versions" "${pkgname}"