Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2023-04-01 00:12:56 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-20 00:08:12 +0200
commitf3518e248cc8be165009f2200ff3b6500bfc0476 (patch)
tree294492e6b9886e60da8eda24c6fb2487499b59dc
parent6c2498750e158f49a0e4ebdf93b5991abf45c7d1 (diff)
build: support nocheck for initial bootstrap builds
Output a warning when this option is used to remind packagers to rebuild the packages with checks once the bootstrap cycle has been completed.
-rw-r--r--contrib/completion/zsh/_devtools.in1
-rw-r--r--doc/man/pkgctl-build.1.asciidoc3
-rw-r--r--src/lib/build/build.sh11
3 files changed, 13 insertions, 2 deletions
diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in
index 39e9ac0..e782fba 100644
--- a/contrib/completion/zsh/_devtools.in
+++ b/contrib/completion/zsh/_devtools.in
@@ -42,6 +42,7 @@ _pkgctl_build_args=(
'(-o --offload)'{-o,--offload}'[Build on a remote server and transfer artifacts afterwards]'
'(-c --clean)'{-c,--clean}'[Recreate the chroot before building]'
'(-I --install)'{-I,--install}'[Install a package into the working copy of the chroot]:target:_files -g "*.pkg.tar.*(.)"'
+ '--nocheck[Do not run the check() function in the PKGBUILD]'
'--pkgver=[Set pkgver, reset pkgrel and update checksums]:pkgver:'
'--pkgrel=[Set pkgrel to a given value]:pkgrel:'
'--rebuild[Increment the pkgrel variable]'
diff --git a/doc/man/pkgctl-build.1.asciidoc b/doc/man/pkgctl-build.1.asciidoc
index 132c0a4..6ae3872 100644
--- a/doc/man/pkgctl-build.1.asciidoc
+++ b/doc/man/pkgctl-build.1.asciidoc
@@ -38,6 +38,9 @@ Build Options
*-I, --install* 'FILE'::
Install a package into the working copy of the chroot
+*--nocheck*::
+ Do not run the check() function in the PKGBUILD
+
PKGBUILD Options
----------------
diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh
index 72ee4fb..fff8125 100644
--- a/src/lib/build/build.sh
+++ b/src/lib/build/build.sh
@@ -47,6 +47,7 @@ pkgctl_build_usage() {
-o, --offload Build on a remote server and transfer artifacts afterwards
-c, --clean Recreate the chroot before building
-I, --install FILE Install a package into the working copy of the chroot
+ --nocheck Do not run the check() function in the PKGBUILD
PKGBUILD OPTIONS
--pkgver=PKGVER Set pkgver, reset pkgrel and update checksums
@@ -120,6 +121,7 @@ pkgctl_build() {
local BUILD_OPTIONS=()
local MAKECHROOT_OPTIONS=()
local RELEASE_OPTIONS=()
+ local MAKEPKG_OPTIONS=()
local PTS
PTS="$(tty | sed 's|/dev/pts/||')"
@@ -201,6 +203,11 @@ pkgctl_build() {
warning 'installing packages into the chroot may break reproducible builds, use with caution!'
shift 2
;;
+ --nocheck)
+ MAKEPKG_OPTIONS+=("--nocheck")
+ warning 'not running checks is disallowed for official packages, except for bootstrapping. Please rebuild after bootstrapping is completed!'
+ shift
+ ;;
-r|--release)
# shellcheck source=src/lib/release.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
@@ -366,9 +373,9 @@ pkgctl_build() {
fi
if (( OFFLOAD )); then
- offload-build --repo "${pkgrepo}" -- "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}"
+ offload-build --repo "${pkgrepo}" -- "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
else
- "${BUILDTOOL}" "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}"
+ "${BUILDTOOL}" "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
fi
done