Compare commits

..

1 Commits

Author SHA1 Message Date
Aaron Liu
3f0ebbc6d2 fix(license): add .gitignore to REUSE defaults
36 packages use this while 26 use *.pam and 21 use *.logrotate. Seems
anecdotally common enough to add this here.
2025-08-08 14:13:32 +02:00
2 changed files with 27 additions and 24 deletions

View File

@@ -188,6 +188,7 @@ path = [
"README.md", "README.md",
"keys/**", "keys/**",
".SRCINFO", ".SRCINFO",
".gitignore",
".nvchecker.toml", ".nvchecker.toml",
"*.install", "*.install",
"*.sysusers", "*.sysusers",

View File

@@ -94,12 +94,12 @@ makepkg_source_package || die "unable to make source package"
rmdir --ignore-fail-on-non-empty src 2>/dev/null || true rmdir --ignore-fail-on-non-empty src 2>/dev/null || true
# Create a temporary directory on the server # Create a temporary directory on the server
cmd=' remote_temp=$(
temp="${XDG_CACHE_HOME:-$HOME/.cache}/offload-build" && ssh "${SSH_OPTS[@]}" -- "$server" '
mkdir -p "$temp" && temp="${XDG_CACHE_HOME:-$HOME/.cache}/offload-build" &&
mktemp --directory --tmpdir="$temp" mkdir -p "$temp" &&
' mktemp --directory --tmpdir="$temp"
remote_temp=$(ssh "${SSH_OPTS[@]}" -- "$server" "bash -l -c '$cmd'") ')
# Transfer the srcpkg to the server # Transfer the srcpkg to the server
msg "Transferring source package to the server..." msg "Transferring source package to the server..."
@@ -109,34 +109,36 @@ rsync "${RSYNC_OPTS[@]}" -- "$srcpkg" "$server":"$remote_temp" || die
# Prepare the srcpkg on the server # Prepare the srcpkg on the server
msg "Extracting srcpkg" msg "Extracting srcpkg"
ssh "${SSH_OPTS[@]}" -- "$server" "bash -c -l 'cd ${remote_temp@Q} && bsdtar --strip-components 1 -xvf $(basename "$srcpkg")'" || die ssh "${SSH_OPTS[@]}" -- "$server" "cd ${remote_temp@Q} && bsdtar --strip-components 1 -xvf $(basename "$srcpkg")" || die
# Run the build command on the server # Run the build command on the server
msg "Running archbuild" msg "Running archbuild"
# shellcheck disable=SC2145 # shellcheck disable=SC2145
if ssh "${SSH_OPTS[@]}" -t -- "$server" "bash -c -l 'cd ${remote_temp@Q} && export LOGDEST="" && ${archbuild_cmd[@]@Q}'"; then if ssh "${SSH_OPTS[@]}" -t -- "$server" "cd ${remote_temp@Q} && export LOGDEST="" && ${archbuild_cmd[@]@Q}"; then
msg "Build complete" msg "Build complete"
# Get an array of files that should be downloaded from the server # Get an array of files that should be downloaded from the server
cmd=' mapfile -t files < <(
cd '"${remote_temp@Q}"' && ssh "${SSH_OPTS[@]}" -- "$server" "
makepkg_user_config="${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" && cd ${remote_temp@Q}"' &&
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${arch}"'.conf" && makepkg_user_config="${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" &&
if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${arch}"'.conf" &&
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf" if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then
fi && makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf"
while read -r file; do fi &&
[[ -f "${file}" ]] && printf "%s\n" "${file}" ||: while read -r file; do
done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) && [[ -f "${file}" ]] && printf "%s\n" "${file}" ||:
printf "%s\n" '"${remote_temp@Q}/PKGBUILD"' done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) &&
printf "%s\n" '"${remote_temp@Q}/PKGBUILD"'
find '"${remote_temp@Q}"' -name "*.log" find '"${remote_temp@Q}"' -name "*.log"
' ')
mapfile -t files < <(ssh "${SSH_OPTS[@]}" -- "$server" "bash -c -l '$cmd'")
else else
# Build failed, only the logs should be downloaded from the server # Build failed, only the logs should be downloaded from the server
cmd='find '"${remote_temp@Q}"' -name "*.log"' mapfile -t files < <(
mapfile -t files < <(ssh "${SSH_OPTS[@]}" -- "$server" "bash -c -l '$cmd'") ssh "${SSH_OPTS[@]}" -- "$server" '
find '"${remote_temp@Q}"' -name "*.log"
')
fi fi