mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
d06e18a2ad
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>
88 lines
3.1 KiB
Bash
Executable File
88 lines
3.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
. /etc/profile.d/001-functions
|
|
|
|
if [ ! -e "/storage/.configured" ]
|
|
then
|
|
tocon "Initializing configuration..."
|
|
# Copy config files
|
|
rsync -a --ignore-existing --exclude={es_features.cfg,es_systems.cfg} /usr/config/* /storage/.config/ >/var/log/configure.log 2>&1
|
|
|
|
if [ -d "/usr/lib/autostart/quirks/platforms/${HW_DEVICE}/config" ]
|
|
then
|
|
rsync -a /usr/lib/autostart/quirks/platforms/"${HW_DEVICE}"/config/* /storage/.config/ >>/var/log/configure.log 2>&1
|
|
fi
|
|
|
|
if [ -d "/usr/lib/autostart/quirks/devices/${QUIRK_DEVICE}/config" ]
|
|
then
|
|
rsync -a /usr/lib/autostart/quirks/devices/"${QUIRK_DEVICE}"/config/* /storage/.config/ >>/var/log/configure.log 2>&1
|
|
fi
|
|
|
|
### Apply developer ssh keys if they exist
|
|
if [ -e /usr/config/ssh/authorized_keys ]
|
|
then
|
|
tocon "Update developer keys..."
|
|
cp /usr/config/ssh/authorized_keys /storage/.ssh
|
|
fi
|
|
|
|
### Apply developer wifi config if they exist
|
|
if [ -d /usr/config/iwd ]
|
|
then
|
|
tocon "Update developer wifi config..."
|
|
cp /usr/config/iwd/* /var/lib/iwd/
|
|
fi
|
|
|
|
if [ -e "/usr/bin/emulationstation" ]
|
|
then
|
|
tocon "Installing themes..."
|
|
mkdir -p /storage/.config/emulationstation/themes >/dev/null
|
|
ln -s /usr/share/themes/es-theme-art-book-next /storage/.config/emulationstation/themes/system-theme >/dev/null 2>&1
|
|
|
|
### Link the game controller database so it is managed with OS updates.
|
|
tocon "Configuring controller database..."
|
|
rm -f /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt >/dev/null 2>&1
|
|
ln -s /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt >/dev/null 2>&1
|
|
|
|
### Remove and link es configs so they are managed with OS updates.
|
|
for es_cfg in es_features.cfg es_systems.cfg
|
|
do
|
|
ln -s /usr/config/emulationstation/${es_cfg} /storage/.config/emulationstation/${es_cfg} >/dev/null 2>&1
|
|
done
|
|
fi
|
|
|
|
mkdir -p /storage/.config/modprobe.d >/dev/null 2>&1
|
|
touch /storage/.configured >/dev/null 2>&1
|
|
sync
|
|
fi
|
|
|
|
if [ ! -e "/storage/.cache/ld.so.cache" ]
|
|
then
|
|
tocon "Initializing library cache..."
|
|
### Create library cache
|
|
ldconfig -X >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ ! -d "/storage/.config/locale" ]
|
|
then
|
|
tocon "Initializing language support..."
|
|
rsync -a --delete /usr/config/locale/* /storage/.config/locale/ >/dev/null 2>&1
|
|
if [ ! -L "/storage/.config/emulationstation/locale" ] &&
|
|
[ -e "/usr/bin/emulationstation" ]
|
|
then
|
|
rm -rf /storage/.config/emulationstation/locale >/dev/null 2>&1 ||:
|
|
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
|