Compare commits

...

5 Commits

Author SHA1 Message Date
Toolybird
a11b12baf8 Merge branch 'nspawn_args_feature' into 'master'
feat(archroot): add support for systemd-nspawn args

See merge request archlinux/devtools!201
2025-08-06 19:01:19 +10:00
Jakub Klinkovský
fc56ebedf3 fix(completion): fix bash completion for the license subcommand
Signed-off-by: Jakub Klinkovský <lahwaacz@archlinux.org>
2025-08-05 17:48:12 +02:00
Christian Heusel
01757e6904 fix(commitpkg): Quiet git ls-files output
So far all files in `needsversioning=(...)` have been printed to the
command line if they were found, which is not useful, especially now
that we have more files present there.

It makes sense however to keep the standard error output, as this gives
a actionable suggestion what one should to to fix the issue:

    > error: pathspec 'PKGBUILD' did not match any file(s) known to git
    > Did you forget to 'git add'?

Fixes #281

Signed-off-by: Christian Heusel <christian@heusel.eu>
2025-08-01 11:26:57 +02:00
Daniel M. Capella
c5fe8ff3e6 feat(license): Extend matches for sysusers/tmpfiles configs
Eg. to match:
- sysusers.conf
- $pkgname.sysusers
- $pkgname.sysusers.conf
2025-07-28 23:38:32 -04:00
Toolybird
6a2e26b80c feat(archroot): add support for systemd-nspawn args
Allow passing additional command line args to systemd-nspawn for
makechrootpkg builds. The use case is to allow various test suites to
benefit from greater coverage by selectively allowing syscalls and/or
capabilities that would otherwise be blocked by the standard
systemd-nspawn container.

Example usage:

makechrootpkg -s --machine=foo,--keep-unit,--system-call-filter="munlockall @keyring"

Signed-off-by: Toolybird <toolybird@tuta.io>
2024-12-09 15:46:31 +11:00
5 changed files with 13 additions and 2 deletions

View File

@@ -150,6 +150,7 @@ _pkgctl_cmds=(
db
diff
issue
license
release
repo
search

View File

@@ -79,6 +79,9 @@ Options
*-x* <when>::
Inspect chroot after build, possible modes are 'never' (default), 'always' or 'failure'
*-s* <args>::
Additional systemd-nspawn args (comma-separated) for the arch-nspawn build phase
See Also
--------

View File

@@ -155,7 +155,7 @@ if (( ${#needsversioning[*]} )); then
if [[ ! -f "${file}" ]]; then
continue
fi
if ! git ls-files --error-unmatch "$file"; then
if ! git ls-files --error-unmatch "$file" >/dev/null; then
die "%s is not under version control" "$file"
fi
done

View File

@@ -191,7 +191,9 @@ path = [
".nvchecker.toml",
"*.install",
"*.sysusers",
"*sysusers.conf",
"*.tmpfiles",
"*tmpfiles.conf",
"*.logrotate",
"*.pam",
"*.service",

View File

@@ -39,6 +39,7 @@ inspect=never
bindmounts_ro=()
bindmounts_rw=()
bindmounts_tmpfs=()
nspawn_add_args=()
copy=$USER
[[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
@@ -84,6 +85,8 @@ usage() {
echo '-T Build in a temporary directory'
echo '-U Run makepkg as a specified user'
echo '-x <when> Inspect chroot after build (never, always, failure)'
echo '-s <args> Additional systemd-nspawn args (comma-separated) for'
echo ' the arch-nspawn build phase'
exit 1
}
@@ -293,7 +296,7 @@ move_products() {
}
# }}}
while getopts 'hcur:I:l:nCTD:d:U:x:t:' arg; do
while getopts 'hcur:I:l:nCTD:d:U:x:t:s:' arg; do
case "$arg" in
c) clean_first=1 ;;
D) bindmounts_ro+=("--bind-ro=$OPTARG") ;;
@@ -308,6 +311,7 @@ while getopts 'hcur:I:l:nCTD:d:U:x:t:' arg; do
T) temp_chroot=1; copy+="-$$" ;;
U) makepkg_user="$OPTARG" ;;
x) inspect="$OPTARG" ;;
s) IFS=, read -ra nspawn_add_args <<< "$OPTARG" ;;
h|*) usage ;;
esac
done
@@ -394,6 +398,7 @@ nspawn_build_args=(
"${bindmounts_ro[@]}"
"${bindmounts_rw[@]}"
"${bindmounts_tmpfs[@]}"
"${nspawn_add_args[@]}"
)
if arch-nspawn "$copydir" \