Restore the execute bit for staged binaries

The blanket chmod 0644 stripped +x from /usr/bin/archipelago-console-login, so
agetty could not run the onboarding wrapper and first boot fell straight to a
login prompt.
This commit is contained in:
Archipelago 2026-11-13 15:23:49 +03:00
parent d791599389
commit aff2f1165d

View file

@ -13,9 +13,21 @@ source=('archipelago' 'runtime.tar')
sha256sums=('@BINARY_SHA256@' '@RUNTIME_SHA256@')
package() {
# Config shipped from the package belongs in vendor paths under /usr; a
# runtime/etc tree was silently dropped by earlier recipes.
if [ -d "$srcdir/runtime/etc" ]; then
printf 'runtime/etc is not packaged: put vendor defaults under runtime/usr (e.g. /usr/lib/systemd)\n' >&2
exit 1
fi
cp -a "$srcdir/runtime/usr" "$pkgdir/"
find "$pkgdir" -type d -exec chmod 0755 '{}' +
find "$pkgdir" -type f -exec chmod 0644 '{}' +
# The blanket 0644 above must not strip staged executables. The console
# onboarding wrapper is executed by agetty through --login-program; without
# the execute bit first boot silently falls through to a plain login prompt.
( cd "$srcdir/runtime" && find usr/bin -type f -perm -u+x -print ) | while IFS= read -r path; do
chmod 0755 "$pkgdir/$path"
done
install -Dm0755 "$srcdir/archipelago" "$pkgdir/usr/bin/archipelago"
ln -s archipelago "$pkgdir/usr/bin/archipelagod"
chown -R 0:0 "$pkgdir"