Compare commits

..

1 Commits

Author SHA1 Message Date
Sven-Hendrik Haase
287d2b4064 feat(commitpkg): Change warning to hard error when licensing information is absent
We originally had this as a warning to allow packagers some time for transitioning.
However, now the gloves come off and we will require all packages to have proper licensing
information.
2025-08-01 08:07:16 +02:00
6 changed files with 10 additions and 17 deletions

View File

@@ -90,11 +90,7 @@ if [[ ${arch[0]} == 'any' ]]; then
fi fi
STARTDIR=$(pwd) STARTDIR=$(pwd)
if (( RMDIR )); then (( RMDIR )) && trap 'rm -rf $TEMPDIR' EXIT INT TERM QUIT
# lib/common.sh sets up traps for cleanup, the following will override them
trap 'rm -rf "$TEMPDIR"; trap_abort' INT QUIT TERM HUP
trap 'rm -rf "$TEMPDIR"; trap_exit' EXIT
fi
TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX) TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX)
for _pkgname in "${pkgname[@]}"; do for _pkgname in "${pkgname[@]}"; do

View File

@@ -123,10 +123,9 @@ fi
needsversioning=() needsversioning=()
if [[ ! -e REUSE.toml || ! -e LICENSE || ! -d LICENSES ]]; then if [[ ! -e REUSE.toml || ! -e LICENSE || ! -d LICENSES ]]; then
# TODO: Make this a hard failure in the future after packagers have had error "package doesn't have proper licensing information, set it up using:"
# some time to add licenses to all packages.
warning "package doesn't have proper licensing information, set it up using:"
msg2 'pkgctl license setup' msg2 'pkgctl license setup'
exit 1
else else
pkgctl license check pkgctl license check
needsversioning+=(REUSE.toml LICENSE LICENSES/*) needsversioning+=(REUSE.toml LICENSE LICENSES/*)
@@ -155,7 +154,7 @@ if (( ${#needsversioning[*]} )); then
if [[ ! -f "${file}" ]]; then if [[ ! -f "${file}" ]]; then
continue continue
fi fi
if ! git ls-files --error-unmatch "$file" >/dev/null; then if ! git ls-files --error-unmatch "$file"; then
die "%s is not under version control" "$file" die "%s is not under version control" "$file"
fi fi
done done

View File

@@ -182,8 +182,8 @@ elif [[ -r "$HOME/.makepkg.conf" ]]; then
fi fi
STARTDIR=$(pwd) STARTDIR=$(pwd)
[[ -z ${WORKDIR:-} ]] && setup_workdir trap 'rm -rf $TMPDIR' EXIT INT TERM QUIT
TMPDIR=$(mktemp -d --tmpdir="$WORKDIR" diffpkg-script.XXXXXXXX) TMPDIR=$(mktemp -d --tmpdir diffpkg-script.XXXXXXXX)
export TMPDIR export TMPDIR
tar_list() { tar_list() {

View File

@@ -50,8 +50,8 @@ if (( ${#validpgpkeys[@]} == 0 )); then
exit 0 exit 0
fi fi
[[ -z ${WORKDIR:-} ]] && setup_workdir trap 'rm -rf $TEMPDIR' EXIT INT TERM QUIT
TEMPDIR=$(mktemp -d --tmpdir="$WORKDIR" export-pkgbuild-keys.XXXXXXXXXX) TEMPDIR=$(mktemp -d --tmpdir export-pkgbuild-keys.XXXXXXXXXX)
mkdir -p keys/pgp mkdir -p keys/pgp
error=0 error=0

View File

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

View File

@@ -242,8 +242,8 @@ for fname in "${installed[@]}"; do
fi fi
done done
[[ -z ${WORKDIR:-} ]] && setup_workdir trap 'rm -rf $TEMPDIR' EXIT INT TERM QUIT
TEMPDIR=$(mktemp -d --tmpdir="$WORKDIR" makerepropkg.XXXXXXXXXX) TEMPDIR=$(mktemp -d --tmpdir makerepropkg.XXXXXXXXXX)
makepkg_conf="${TEMPDIR}/makepkg.conf" makepkg_conf="${TEMPDIR}/makepkg.conf"
# anything before buildtool support is pinned to the last none buildtool aware release # anything before buildtool support is pinned to the last none buildtool aware release