qsign: use flock instead

saves on some s6 deps
This commit is contained in:
psykose 2023-04-26 00:09:30 +00:00
parent 3438fa843c
commit 6bdc931929
2 changed files with 5 additions and 5 deletions

View file

@ -1,13 +1,13 @@
# Contributor: psykose <alice@ayaya.dev> # Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev> # Maintainer: psykose <alice@ayaya.dev>
pkgname=qsign pkgname=qsign
pkgver=9 pkgver=10
pkgrel=0 pkgrel=0
pkgdesc="quicksign local apk repos" pkgdesc="quicksign local apk repos"
url="https://git.ddd.rip/ptrcnull/ptrcports" url="https://git.ddd.rip/ptrcnull/ptrcports"
arch="noarch" arch="noarch"
license="ISC" license="ISC"
depends="abuild apk-tools s6" depends="abuild apk-tools"
source="qsign qsign.conf" source="qsign qsign.conf"
options="!check" # ??????????????????????????????????????????? options="!check" # ???????????????????????????????????????????
@ -17,6 +17,6 @@ package() {
} }
sha512sums=" sha512sums="
4382fa690d1368f42514f4a519e94187bc91b4988817ed071d13e9723d73b629cee98e70637c469a58adc674f0b1cce0f0c09c7c04383ea333993e5b22990bd7 qsign 50bc6b9768c237109f7fae04e5c86c64c8ed414adb37c6ee5467827b9dbc95a8ead6a9db40607c4434dd9317df300becae166ee51a66a727a03d249141cd856a qsign
c6791d0a4d74acfa81b74f4129b31e008fd409be0e2dad4fb2c04187385666a47d475d4795fe20dbc5afcc5b4e2a35462bd43fb5fac006e03bafad93de4f65bc qsign.conf c6791d0a4d74acfa81b74f4129b31e008fd409be0e2dad4fb2c04187385666a47d475d4795fe20dbc5afcc5b4e2a35462bd43fb5fac006e03bafad93de4f65bc qsign.conf
" "

View file

@ -9,11 +9,11 @@ arch="$(apk --print-arch)"
for repo in $repos; do for repo in $repos; do
cd "$REPODEST/$repo/$arch" || continue cd "$REPODEST/$repo/$arch" || continue
s6-setlock /dev/shm/qsign-lock-$repo sh -c " flock /dev/shm/qsign-lock-$repo sh -c "
apk index --no-warnings --rewrite-arch=$arch ./*.apk -o APKINDEX.tar.gz -x APKINDEX.tar.gz || { apk index --no-warnings --rewrite-arch=$arch ./*.apk -o APKINDEX.tar.gz -x APKINDEX.tar.gz || {
echo 'index reuse failed; probably broken' echo 'index reuse failed; probably broken'
apk index --no-warnings --rewrite-arch=$arch ./*.apk -o APKINDEX.tar.gz apk index --no-warnings --rewrite-arch=$arch ./*.apk -o APKINDEX.tar.gz
} }
abuild-sign APKINDEX.tar.gz abuild-sign APKINDEX.tar.gz
" " || echo failed.
done done