Fixed keys param. Version bump

This commit is contained in:
Matthias Fulz 2021-07-18 22:48:42 +02:00
parent 29f32e4a3a
commit 4c6d141e12
3 changed files with 4 additions and 20 deletions

View File

@ -8,7 +8,7 @@ ARCHBUILDER_LIB_DIR ?= $(LIBDIR)/$(PROGNM)
ARCHBUILDER_CONF_DIR ?= $(CNFDIR)/$(PROGNM)
ARCHBUILDER_VERSION ?= $(shell git describe --tags || true)
ifeq ($(ARCHBUILDER_VERSION),)
ARCHBUILDER_VERSION := 0.9.4
ARCHBUILDER_VERSION := 0.9.5
endif
.PHONY: install build archbuilder

View File

@ -20,7 +20,6 @@ unset _FLAG_KEEP
unset _FLAG_SILENT
_OPT_MODE="build"
_OPT_DEPS=()
_OPT_KEYS=()
_OPT_CON_BUILD_USER="archbuilder"
@ -49,7 +48,6 @@ function usage() {
echo -e " \t\tcreate will setup the base image"
echo -e " \t\tupdate will update the base image"
echo -e " \t\tbuild will build the PKGBUILD"
echo -e " -d, --dep <string>\t\t\t\tPath to pacman package file that is needed as dependency for the build. (Can be added multiple times)"
echo -e " -e, --key <string>\t\t\t\tPublic signing keys that should be trusted by for the build. (Can be added multiple times)"
echo -e " -r, --repo <string>\t\t\t\tHost path to use as repository inside the container. This can be used to avoid"
echo -e " \t\t\t\thanding over dependencies via command line arguments as they will be added to this repo"
@ -63,12 +61,11 @@ function usage() {
}
options=$(getopt \
-o hkn:m:p:d:r:e:sl: \
-o hkn:m:p:r:e:sl: \
-l "help" \
-l keep \
-l name: \
-l mode: \
-l dep: \
-l repo: \
-l silent: \
-l level: \
@ -89,10 +86,6 @@ while true; do
shift
_OPT_MODE="${1}"
;;
-d|--dep)
shift
_OPT_DEPS[${#_OPT_DEPS[*]}]="${1}"
;;
-e|--key)
shift
_OPT_KEYS[${#_OPT_KEYS[*]}]="${1}"

View File

@ -4,7 +4,6 @@ _BUILDAH_CONT=""
_BUILDAH_BASE_IMAGE="archlinux"
_BUILDAH_BASE_PATH="/home/archbuilder"
_BUILDAH_DEP_PATH="${_BUILDAH_BASE_PATH}/deps"
_BUILDAH_MKPKG_PATH="${_BUILDAH_BASE_PATH}/mkpgs"
_BUILDAH_PKGDEST_PATH="${_BUILDAH_BASE_PATH}/pkgdest"
_BUILDAH_CACHE_REPO_NAME="archbuilder_cache_repo"
@ -143,17 +142,9 @@ function buildah_prepare_build() {
log_info "Updating container system"
exec_cmd buildah run --user ${_OPT_CON_BUILD_USER} ${_BUILDAH_PARAMS} "${_BUILDAH_CONT}" sudo pacman --noconfirm -Syu
return 0
for d in "${DEPS[@]}"
for k in "${_OPT_KEYS[@]}"
do
buildah copy --chown "${_BUILD_USER}" "${CONT}" "${d}" "${_DEP_PATH}/"
f=$(basename "${d}")
buildah run "${CONT}" pacman --noconfirm -U "${_DEP_PATH}/${f}"
done
for k in "${KEYS[@]}"
do
buildah run --user "${_BUILD_USER}" "${CONT}" gpg --receive-keys "${k}"
exec_cmd buildah run --user ${_OPT_CON_BUILD_USER} ${_BUILDAH_PARAMS} "${_BUILDAH_CONT}" gpg --receive-keys "${k}"
done
}