mirror of
https://github.com/luzifer-docker/arch-repo-builder.git
synced 2024-12-29 21:41:16 +00:00
Sign database, do not find signatures
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
8b44a87769
commit
910fadd774
1 changed files with 4 additions and 2 deletions
6
run.sh
6
run.sh
|
@ -3,6 +3,7 @@ set -euxo pipefail
|
||||||
|
|
||||||
SRC=${1:-}
|
SRC=${1:-}
|
||||||
MAKEPKG_OPTS=(-cCs --noconfirm --needed)
|
MAKEPKG_OPTS=(-cCs --noconfirm --needed)
|
||||||
|
REPOADD_OPTS=()
|
||||||
|
|
||||||
# Override WORKDIR
|
# Override WORKDIR
|
||||||
cd /src
|
cd /src
|
||||||
|
@ -23,6 +24,7 @@ fi
|
||||||
[ -e /config/signing.asc ] && {
|
[ -e /config/signing.asc ] && {
|
||||||
gosu builder gpg --import </config/signing.asc
|
gosu builder gpg --import </config/signing.asc
|
||||||
MAKEPKG_OPTS+=(--sign)
|
MAKEPKG_OPTS+=(--sign)
|
||||||
|
REPOADD_OPTS+=(--sign)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update pacman index
|
# Update pacman index
|
||||||
|
@ -33,7 +35,7 @@ gosu builder makepkg ${MAKEPKG_OPTS[@]}
|
||||||
|
|
||||||
PACKAGE=$(ls *.pkg.tar.xz) # This should be only one file
|
PACKAGE=$(ls *.pkg.tar.xz) # This should be only one file
|
||||||
|
|
||||||
REPODB=$(find /repo -name '*.db.*' ! -name '*.old')
|
REPODB=$(find /repo -name '*.db.tar.xz')
|
||||||
if [ -z "${REPODB}" ]; then
|
if [ -z "${REPODB}" ]; then
|
||||||
echo "No database found in /repo, not adding package."
|
echo "No database found in /repo, not adding package."
|
||||||
echo "The built package is available in ${PACKAGE}"
|
echo "The built package is available in ${PACKAGE}"
|
||||||
|
@ -43,4 +45,4 @@ fi
|
||||||
gosu builder mv ${PACKAGE}* /repo
|
gosu builder mv ${PACKAGE}* /repo
|
||||||
|
|
||||||
cd /repo
|
cd /repo
|
||||||
gosu builder repo-add ${REPODB} "${PACKAGE}"
|
gosu builder repo-add ${REPOADD_OPTS[@]} ${REPODB} "${PACKAGE}"
|
||||||
|
|
Loading…
Reference in a new issue