mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
gaps: ampla varredura de bugs herdados + pré-pacman repo-stable
A varredura via SSH no R36S rodando a 20260624 expôs várias
divergências entre rootfs estagiado e tmpfs/runtime. Cada arquivo
deste commit resolve um gap encontrado na investigação.
archr/tmpfiles.d/z_02_archr-fhs-bridges.conf (NEW):
/var é tmpfs (busybox/system.d/var.mount), então todos os bridges
FHS instalados como symlinks no rootfs eram apagados pelo mount.
Republicar a estrutura via systemd-tmpfiles após var.mount. Resolve
/var/lib/pacman, /var/cache/archr/*, /var/lib/archr/{config,data,
games,backup}, /var/lib/{samba/private,tailscale,bluetooth},
/var/spool/cron, /var/cache/pacman/pkg. Inclui também os targets em
/storage (cron, locpath, tailscale, samba, .local/share, fstrim.run,
journald.conf.d, request-key.d) que estavam ausentes.
ui/emulationstation/package.mk:
ln -sf usava \${INSTALL}/usr/config/... como alvo, vazando o caminho
absoluto do builder para o symlink /etc/emulationstation/es_systems.cfg
no SO final. Trocar pelo path do target.
archr/system.d/timers.target.wants/{rocknix→archr}-report-stats.timer:
Symlink apontava para um arquivo inexistente (rocknix-report-stats);
o timer real chama-se archr-report-stats. Renome.
misc/modules/sources/images/install-{rocknix→archr}.svg:
gamelist.xml já referenciava install-archr.svg; o arquivo se chamava
install-rocknix.svg, quebrando o asset.
emulators/.../gamepads/ROCKNIX→ArchR Gamepad.cfg:
Conteúdo já estava com input_device="ArchR Gamepad"; rename casa o
nome de arquivo com a string de matching.
archr/package.mk + profile.d/005-locale:
LANG="" no SO rodando, todas LC_*=POSIX. glibc gera en_US.UTF-8.
Criar /etc/locale.conf e profile.d que source-a para shells de login
e SSH (que não herdam LANG via systemd env).
sysutils/systemd/scripts/userconfig-setup + freej2me-lr/freej2me.sh:
/storage/jdk caiu como arquivo vazio em algumas builds antigas e
transforma o symlink /opt/jdk em "Not a directory". Saneamento
duplo: a cada boot e antes do download do JDK.
devel/crossguid/package.mk + standalone/hypseus-singe/package.mk:
cmake_install.cmake / crossguid-config.cmake embutiam o BUILD path
do host. Remover dos pacotes target (não rodam em runtime).
tools/pyFDT/package.mk + network/samba/package.mk:
setuptools e waf escrevem o python3 do TOOLCHAIN no shebang dos
entry-points (pydtc, samba-gpupdate). Reescrever pra /usr/bin/python3.
sysutils/systemd/package.mk:
systemd-sysroot-fstab-check é um symlink para
systemd-fstab-generator, que removemos para fora dos generators.
Apagar o link junto. Strip também a regra do legacy.conf que cria
/var/log/README apontando para /usr/share/doc (não embarcamos docs).
sysutils/udevil/package.mk:
/etc/udevil/udevil-user-root.conf é symlink para
/storage/.config/udevil.conf que nunca era populado. Copiar a conf
também para /usr/config/udevil.conf, daí o rsync do userconfig-setup
o semeia no primeiro boot.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -13,3 +13,10 @@ PKG_LONGDESC="minimal, cross platform, C++ GUID library"
|
||||
|
||||
PKG_CMAKE_OPTS_TARGET="-DCROSSGUID_TESTS=OFF \
|
||||
-Wno-dev"
|
||||
|
||||
post_makeinstall_target() {
|
||||
# crossguid is a build-time-only dependency; its CMake config files
|
||||
# embed the host's build-dir path and serve no runtime purpose. Drop
|
||||
# the entire share tree to keep the rootfs free of host-paths.
|
||||
rm -rf ${INSTALL}/usr/share/crossguid
|
||||
}
|
||||
|
||||
@@ -174,6 +174,12 @@ post_makeinstall_target() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# systemd-sysroot-fstab-check is a symlink into systemd-fstab-generator
|
||||
# (deleted above), so it always dangles on the target. Remove the
|
||||
# dangling link from both /usr/lib and /usr/lib32 to keep the rootfs
|
||||
# symlink-clean.
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/systemd-sysroot-fstab-check
|
||||
safe_remove ${INSTALL}/usr/lib32/systemd/systemd-sysroot-fstab-check
|
||||
|
||||
# remove catalog
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/catalog
|
||||
@@ -277,6 +283,14 @@ post_makeinstall_target() {
|
||||
|
||||
# journald
|
||||
ln -sf /storage/.cache/journald.conf.d ${INSTALL}/usr/lib/systemd/journald.conf.d
|
||||
|
||||
# legacy.conf seeds /var/log/README as a symlink to
|
||||
# /usr/share/doc/systemd/README.logs, but ArchR doesn't ship the
|
||||
# /usr/share/doc tree, so the README ends up dangling on every boot.
|
||||
# Strip the line, keep the rest of the legacy rules.
|
||||
if [ -f ${INSTALL}/usr/lib/tmpfiles.d/legacy.conf ]; then
|
||||
sed -i '/\/var\/log\/README/d' ${INSTALL}/usr/lib/tmpfiles.d/legacy.conf
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
||||
@@ -26,6 +26,11 @@ post_makeinstall_target() {
|
||||
cp ${PKG_DIR}/config/udevil.conf ${INSTALL}/etc/udevil
|
||||
ln -sf /storage/.config/udevil.conf ${INSTALL}/etc/udevil/udevil-user-root.conf
|
||||
|
||||
# Seed /storage/.config/udevil.conf via the userconfig rsync. Without
|
||||
# this copy the user-root symlink above dangles until first manual edit.
|
||||
mkdir -p ${INSTALL}/usr/config
|
||||
cp ${PKG_DIR}/config/udevil.conf ${INSTALL}/usr/config/
|
||||
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -PR src/udevil ${INSTALL}/usr/bin
|
||||
|
||||
|
||||
@@ -153,6 +153,11 @@ EOF
|
||||
### Take a backup of the system configuration on shutdown
|
||||
enable_service save-sysconfig.service
|
||||
|
||||
### System locale. glibc/package.mk only generates en_US.UTF-8; without
|
||||
### this file LANG stays empty and every shell falls back to POSIX,
|
||||
### which breaks UTF-8 input, pacman messages and emulator menus.
|
||||
echo "LANG=en_US.UTF-8" > ${INSTALL}/etc/locale.conf
|
||||
|
||||
sed -i "s#@DEVICENAME@#${DEVICE}#g" ${INSTALL}/usr/config/system/configs/system.cfg
|
||||
|
||||
### Defaults for non-main builds.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2026-present ArchR
|
||||
|
||||
# systemd already publishes LANG into its session environment, but ssh
|
||||
# logins and busybox shells do not inherit that, so they end up under
|
||||
# POSIX with empty LANG. Source the canonical /etc/locale.conf at shell
|
||||
# startup so every interactive session sees the same locale.
|
||||
|
||||
if [ -r /etc/locale.conf ]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/locale.conf
|
||||
export LANG
|
||||
[ -n "${LANGUAGE}" ] && export LANGUAGE
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
+1
@@ -0,0 +1 @@
|
||||
../archr-report-stats.timer
|
||||
@@ -1 +0,0 @@
|
||||
../rocknix-report-stats.timer
|
||||
@@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2026-present ArchR
|
||||
|
||||
# /var is a tmpfs (see busybox/system.d/var.mount), so symlinks staged
|
||||
# at install time into the read-only rootfs are hidden by the mount and
|
||||
# never reach userspace. This file republishes the FHS bridge surface
|
||||
# into the tmpfs after var.mount has run. Substrate paths stay on the
|
||||
# rw /storage overlay.
|
||||
|
||||
d /var/cache/archr 0755 root root - -
|
||||
d /var/cache/pacman 0755 root root - -
|
||||
d /var/lib/archr 0755 root root - -
|
||||
d /var/lib/samba 0755 root root - -
|
||||
d /var/spool 0755 root root - -
|
||||
|
||||
L+ /var/cache/mesa - - - - /storage/.cache/mesa_shader_cache
|
||||
L+ /var/cache/archr/kernel-overlays - - - - /storage/.cache/kernel-overlays
|
||||
L+ /var/cache/archr/locpath - - - - /storage/.cache/locpath
|
||||
L+ /var/cache/archr/fstrim.run - - - - /storage/.cache/fstrim.run
|
||||
L+ /var/cache/archr/update - - - - /storage/.update
|
||||
L+ /var/cache/pacman/pkg - - - - /storage/.pacman/cache
|
||||
|
||||
L+ /var/lib/archr/services - - - - /storage/.cache/services
|
||||
L+ /var/lib/archr/config - - - - /storage/.config
|
||||
L+ /var/lib/archr/data - - - - /storage/.local/share
|
||||
L+ /var/lib/archr/games - - - - /storage/roms
|
||||
L+ /var/lib/archr/backup - - - - /storage/backup
|
||||
L+ /var/lib/samba/private - - - - /storage/.cache/samba
|
||||
L+ /var/lib/tailscale - - - - /storage/.cache/tailscale
|
||||
L+ /var/lib/pacman - - - - /storage/.pacman/db
|
||||
L+ /var/lib/bluetooth - - - - /storage/.cache/bluetooth
|
||||
|
||||
L+ /var/spool/cron - - - - /storage/.cache/cron
|
||||
|
||||
# Storage-backed targets for symlinks staged at install time. Without
|
||||
# these dirs the symlinks dangle and the consumer code treats the path
|
||||
# as missing. f for the lone-file bridges (fstrim.run is a stamp), d
|
||||
# for the directory bridges.
|
||||
d /storage/.config/request-key.d 0755 root root - -
|
||||
d /storage/.cache/journald.conf.d 0755 root root - -
|
||||
d /storage/.cache/cron 0755 root root - -
|
||||
d /storage/.cache/locpath 0755 root root - -
|
||||
d /storage/.cache/tailscale 0755 root root - -
|
||||
d /storage/.cache/samba 0700 root root - -
|
||||
d /storage/.local 0755 root root - -
|
||||
d /storage/.local/share 0755 root root - -
|
||||
f /storage/.cache/fstrim.run 0644 root root - -
|
||||
@@ -15,6 +15,15 @@ fi
|
||||
JDKDEST="/opt/jdk"
|
||||
JDKNAME="zulu11.48.21-ca-jdk11.0.11"
|
||||
|
||||
# /opt/jdk -> /storage/jdk; if anything left a non-directory there the
|
||||
# mkdir/tar steps below would fail with "Not a directory".
|
||||
if [ -L /opt/jdk ]; then
|
||||
jdk_target=$(readlink /opt/jdk)
|
||||
if [ -e "${jdk_target}" ] && [ ! -d "${jdk_target}" ]; then
|
||||
rm -f "${jdk_target}"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p ${JDKDEST}
|
||||
|
||||
# Check if the jdk does not already exists
|
||||
|
||||
@@ -26,4 +26,10 @@ post_makeinstall_target() {
|
||||
cp -rf ${PKG_BUILD}/doc/hypinput.ini ${INSTALL}/usr/config/game/configs/hypseus/
|
||||
ln -fs /storage/.config/game/configs/hypseus/hypinput.ini ${INSTALL}/usr/share/daphne/hypinput.ini
|
||||
cp ${PKG_BUILD}/start_hypseus.sh ${INSTALL}/usr/bin
|
||||
# CMake leaves cmake_install.cmake / CMakeCache.txt sprinkled across
|
||||
# the install tree; they embed the host build path and are useless at
|
||||
# runtime, so strip them.
|
||||
find ${INSTALL}/usr/share/daphne -name 'cmake_install.cmake' -delete 2>/dev/null || true
|
||||
find ${INSTALL}/usr/share/daphne -name 'CMakeCache.txt' -delete 2>/dev/null || true
|
||||
find ${INSTALL}/usr/share/daphne -name 'CMakeFiles' -type d -exec rm -rf {} + 2>/dev/null || true
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -187,5 +187,17 @@ post_makeinstall_target() {
|
||||
cp -PR bin/default/source3/utils/smbpasswd ${INSTALL}/usr/bin
|
||||
|
||||
fi
|
||||
|
||||
# waf install writes Python scripts whose shebang points at the build
|
||||
# host's python3 (TOOLCHAIN/bin/python3). Rewrite to /usr/bin/python3
|
||||
# so they actually run on the target. samba-gpupdate is the survivor
|
||||
# of the broad rm -rf above; protect against future ones too.
|
||||
if [ -d ${INSTALL}/usr/sbin ]; then
|
||||
find ${INSTALL}/usr/sbin -maxdepth 1 -type f | while read -r script; do
|
||||
if head -c 200 "$script" 2>/dev/null | head -1 | grep -q '^#!.*python'; then
|
||||
sed -i '1s|^#!.*python.*|#!/usr/bin/python3|' "$script"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -77,3 +77,11 @@ then
|
||||
ln -sf /usr/share/locale /storage/.config/emulationstation/locale
|
||||
fi
|
||||
fi
|
||||
|
||||
### /opt/jdk is a symlink to /storage/jdk that freej2me-lr fills on first
|
||||
### launch. Older builds left a stray /storage/jdk file (0 bytes) that
|
||||
### turns the symlink into a non-directory and breaks every JDK consumer.
|
||||
### Run this saneamento every boot, not just under the .configured guard.
|
||||
if [ -e "/storage/jdk" ] && [ ! -d "/storage/jdk" ]; then
|
||||
rm -f /storage/jdk
|
||||
fi
|
||||
|
||||
@@ -23,3 +23,14 @@ make_target() {
|
||||
makeinstall_target() {
|
||||
python3 setup.py install --root=${INSTALL} --prefix=/usr
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
# setuptools writes the build-host python3 path into entry-point
|
||||
# shebangs, which then point at /media/.../toolchain/bin/python3 on
|
||||
# the target and refuse to run. Rewrite to /usr/bin/python3 (the
|
||||
# target's interpreter).
|
||||
for s in ${INSTALL}/usr/bin/pydtc; do
|
||||
[ -f "$s" ] || continue
|
||||
sed -i '1s|^#!.*python.*|#!/usr/bin/python3|' "$s"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -107,7 +107,10 @@ makeinstall_target() {
|
||||
EOF
|
||||
fi
|
||||
|
||||
ln -sf ${INSTALL}/usr/config/emulationstation/es_systems.cfg ${INSTALL}/etc/emulationstation/es_systems.cfg
|
||||
# Symlink target must be an in-target path (/usr/config/...), not the
|
||||
# host's ${INSTALL} build dir, otherwise the staged symlink points to
|
||||
# the builder's filesystem and breaks on the device.
|
||||
ln -sf /usr/config/emulationstation/es_systems.cfg ${INSTALL}/etc/emulationstation/es_systems.cfg
|
||||
|
||||
ln -sf /storage/.cache/system_timezone ${INSTALL}/etc/timezone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user