Compare commits

...

4 Commits

Author SHA1 Message Date
Tobias Powalowski
708557c68a Merge branch 'run0' into 'master'
replace sudo with run0

See merge request archlinux/devtools!266
2025-08-05 10:31:58 +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
Tobias Powalowski
0712c4fe2e replace sudo with run0 2024-06-09 12:39:13 +02:00
3 changed files with 5 additions and 3 deletions

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

@@ -15,8 +15,8 @@ check_root() {
local orig_argv=("$@")
(( EUID == 0 )) && return
if type -P sudo >/dev/null; then
exec sudo --preserve-env="${keepenv}" -- "${orig_argv[@]}"
if type -P run0 && type -P pkexec >/dev/null; then
exec run0 -- "${orig_argv[@]}"
else
exec su root -c "$(printf ' %q' "${orig_argv[@]}")"
fi

View File

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