From e90a0708c8856a88251855dffc824bb788333a16 Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Wed, 24 Jun 2026 11:09:58 -0300 Subject: [PATCH] units + scripts: corrigir bugs herdados de JELOS no boot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sweep encontrou 5 categorias de bugs sutis em arquivos herdados: 1. StartLimitInterval/StartLimitBurst em [Service] em 13 unidades (avahi, bluez, connman, samba/nmbd/smbd, sshd, tz-data, ledfix, xorg, fluxbox/windowmanager, samba-config). systemd silenciosamente ignora StartLimit* fora de [Unit], então a proteção contra restart-flood nunca foi aplicada. Movidas para [Unit] e renomeadas para o canônico StartLimitIntervalSec (StartLimitInterval é alias antigo). 2. Refs dangling para kodi.service em 5 units (entware, locale, sway, xorg, xwayland-xorg, windowmanager-fluxbox). ArchR não embarca Kodi; o ordering Before=kodi.service ficava como "not-found" no systemctl list-units. Trocado por Before=archr.target (alvo real de boot da UI em ArchR). 3. usercache.service e userconfig.service referenciavam automount.service e autostart.service sem prefixo archr-. Em ArchR as unidades reais chamam-se archr-automount.service / archr-autostart.service, então o Before= era ignorado e o setup corria paralelo aos mounts. 4. archr-autostart.service tinha Before=weston.service. ArchR roda sway, não weston. Removido (After=graphical.target já cobre). 5. nmbd.service do override ArchR queria samba-config.service que só existe no pacote global packages/network/samba (não no override). O daemons/002-samba já cria /run/samba/smb.conf manualmente, então Wants/After=samba-config.service eram supérfluos. Bugs adicionais corrigidos no caminho: - archr/autostart/050-audio: `if [ -n "/usr/sbin/quantum" ]` testa se uma string literal é não-vazia (sempre true) em vez de checar se o binário existe. Trocado para [ -x ]. - avahi: post_makeinstall_target removia /usr/sbin/avahi-dnsconfd mas deixava a unit avahi-dnsconfd.service órfã. Remove a unit junto. - system-utils: video.service só faz sentido em devices que embarcam /usr/bin/video_sense (RK3399/RK3566/S922X). Remove a unit em devices que não têm o helper. - xwayland: scripts/xorg-configure não era instalado, deixando xorg-configure@.service com ExecStart para um path inexistente. Agora copiado pra /usr/lib/xorg/xorg-configure. Co-Authored-By: Claude Opus 4.7 --- packages/network/avahi/system.d/avahi-daemon.service | 5 ++--- packages/network/bluez/system.d/bluetooth.service | 3 +-- packages/network/connman/system.d/connman.service | 3 +-- packages/network/openssh/system.d/sshd.service | 3 +-- packages/network/samba/system.d.opt/nmbd.service | 3 +-- packages/network/samba/system.d.opt/smbd.service | 3 +-- packages/network/samba/system.d/samba-config.service | 3 +-- packages/sysutils/busybox/system.d/ledfix.service | 3 +-- packages/sysutils/busybox/system.d/locale.service | 7 +++++-- packages/sysutils/tz/system.d/tz-data.service | 3 +-- packages/wayland/compositor/sway/system.d/sway.service | 2 +- .../x11/other/fluxbox/system.d/windowmanager.service | 5 ++--- packages/x11/xserver/xorg-server/system.d/xorg.service | 5 ++--- projects/ArchR/packages/archr/autostart/050-audio | 6 +++++- projects/ArchR/packages/network/avahi/package.mk | 4 ++++ .../packages/network/bluez/system.d/bluetooth.service | 3 +-- .../packages/network/connman/system.d/connman.service | 3 +-- .../packages/network/openssh/system.d/sshd.service | 3 +-- .../ArchR/packages/network/samba/system.d/nmbd.service | 10 ++++++---- .../ArchR/packages/network/samba/system.d/smbd.service | 3 +-- .../autostart/system.d/archr-autostart.service | 6 +++++- .../ArchR/packages/sysutils/system-utils/package.mk | 8 ++++++++ .../sysutils/systemd/system.d/usercache.service | 6 +++++- .../sysutils/systemd/system.d/userconfig.service | 5 ++++- .../packages/tools/entware/system.d/entware.service | 5 ++++- .../ArchR/packages/x11/xserver/xwayland/package.mk | 8 ++++++++ .../x11/xserver/xwayland/system.d/xorg.service | 8 ++++++-- 27 files changed, 79 insertions(+), 47 deletions(-) diff --git a/packages/network/avahi/system.d/avahi-daemon.service b/packages/network/avahi/system.d/avahi-daemon.service index 54e2a9d046..65c7634255 100644 --- a/packages/network/avahi/system.d/avahi-daemon.service +++ b/packages/network/avahi/system.d/avahi-daemon.service @@ -3,7 +3,8 @@ Description=Avahi Daemon After=network.target avahi-defaults.service Requires=avahi-defaults.service ConditionPathExists=/storage/.cache/services/avahi.conf - +StartLimitIntervalSec=60 +StartLimitBurst=10 [Service] Restart=on-failure EnvironmentFile=-/run/archr/debug/avahi.conf @@ -11,8 +12,6 @@ ExecStart=/usr/sbin/avahi-daemon -s $AVAHI_DEBUG ExecReload=/usr/sbin/avahi-daemon -r TimeoutStopSec=1s RestartSec=2 -StartLimitInterval=60 -StartLimitBurst=10 [Install] WantedBy=multi-user.target diff --git a/packages/network/bluez/system.d/bluetooth.service b/packages/network/bluez/system.d/bluetooth.service index 171e204e02..0e0d8d5c19 100644 --- a/packages/network/bluez/system.d/bluetooth.service +++ b/packages/network/bluez/system.d/bluetooth.service @@ -4,7 +4,7 @@ After=syslog.target bluetooth-defaults.service Requires=bluetooth-defaults.service ConditionPathExists=/storage/.cache/services/bluez.conf - +StartLimitIntervalSec=0 [Service] NotifyAccess=main EnvironmentFile=/storage/.cache/services/bluez.conf @@ -15,7 +15,6 @@ LimitNPROC=1 TimeoutStopSec=1s Restart=on-failure RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=bluetooth.target diff --git a/packages/network/connman/system.d/connman.service b/packages/network/connman/system.d/connman.service index 702654a3fd..ba0e148cf3 100644 --- a/packages/network/connman/system.d/connman.service +++ b/packages/network/connman/system.d/connman.service @@ -6,7 +6,7 @@ Before=network.target multi-user.target shutdown.target After=dbus.service network-base.service Wants=network.target ConditionPathExists=!/dev/.kernel_ipconfig - +StartLimitIntervalSec=0 [Service] Type=dbus BusName=net.connman @@ -15,7 +15,6 @@ EnvironmentFile=-/run/archr/debug/connman.conf ExecStart=/bin/sh -c ". /usr/lib/connman/connman-setup; exec /usr/sbin/connmand -nr $CONNMAN_MAIN $CONNMAN_DEBUG" StandardOutput=null RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/packages/network/openssh/system.d/sshd.service b/packages/network/openssh/system.d/sshd.service index 2aa45f8a06..5e5996f24e 100644 --- a/packages/network/openssh/system.d/sshd.service +++ b/packages/network/openssh/system.d/sshd.service @@ -3,7 +3,7 @@ Description=OpenSSH server daemon After=network.target ConditionKernelCommandLine=|ssh ConditionPathExists=|/storage/.cache/services/sshd.conf - +StartLimitIntervalSec=0 [Service] Restart=on-failure EnvironmentFile=-/storage/.cache/services/sshd.conf @@ -12,7 +12,6 @@ ExecStart=/usr/sbin/sshd -D $SSH_ARGS ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/packages/network/samba/system.d.opt/nmbd.service b/packages/network/samba/system.d.opt/nmbd.service index a2dc1b35a2..00973d8f3a 100644 --- a/packages/network/samba/system.d.opt/nmbd.service +++ b/packages/network/samba/system.d.opt/nmbd.service @@ -4,7 +4,7 @@ Wants=network-online.target samba-config.service After=network-online.target samba-config.service ConditionPathExists=!/storage/.cache/services/samba.disabled ConditionPathExists=/run/samba/smb.conf - +StartLimitIntervalSec=0 [Service] Type=forking PIDFile=/run/samba/nmbd.pid @@ -13,7 +13,6 @@ ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/packages/network/samba/system.d.opt/smbd.service b/packages/network/samba/system.d.opt/smbd.service index 4353fa2667..fc4e47c144 100644 --- a/packages/network/samba/system.d.opt/smbd.service +++ b/packages/network/samba/system.d.opt/smbd.service @@ -4,7 +4,7 @@ Wants=network-online.target nmbd.service After=network-online.target nmbd.service ConditionPathExists=!/storage/.cache/services/samba.disabled ConditionPathExists=/run/samba/smb.conf - +StartLimitIntervalSec=0 [Service] Type=forking PIDFile=/run/samba/smbd.pid @@ -14,7 +14,6 @@ ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/packages/network/samba/system.d/samba-config.service b/packages/network/samba/system.d/samba-config.service index fe02a96976..f8d539b739 100644 --- a/packages/network/samba/system.d/samba-config.service +++ b/packages/network/samba/system.d/samba-config.service @@ -2,9 +2,8 @@ Description=Samba Configuration DefaultDependencies=false After=basic.target - +StartLimitIntervalSec=0 [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/lib/samba/samba-config -StartLimitInterval=0 diff --git a/packages/sysutils/busybox/system.d/ledfix.service b/packages/sysutils/busybox/system.d/ledfix.service index dade743d04..5c7518acdf 100644 --- a/packages/sysutils/busybox/system.d/ledfix.service +++ b/packages/sysutils/busybox/system.d/ledfix.service @@ -1,12 +1,11 @@ [Unit] Description=LEDfix Service After=network-online.target - +StartLimitIntervalSec=0 [Service] Type=oneshot ExecStart=/bin/sh /usr/bin/ledfix RemainAfterExit=yes -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/packages/sysutils/busybox/system.d/locale.service b/packages/sysutils/busybox/system.d/locale.service index 689109ae63..ffa55fab38 100644 --- a/packages/sysutils/busybox/system.d/locale.service +++ b/packages/sysutils/busybox/system.d/locale.service @@ -1,8 +1,11 @@ [Unit] Description=Compile locale definition files ConditionPathExists=!/storage/.cache/locpath -ConditionPathExists=!/storage/.kodi/addons/service.locale/locpath -Before=kodi.service +# /storage/.kodi/... era checado para fugir do locale do Kodi quando o +# usuário tinha o addon service.locale instalado. ArchR não embarca +# Kodi, então a verificação extra só polui o systemd-analyze; basta o +# guard de /storage/.cache/locpath para evitar recompilar a cada boot. +Before=archr.target [Service] Type=oneshot diff --git a/packages/sysutils/tz/system.d/tz-data.service b/packages/sysutils/tz/system.d/tz-data.service index d54d32b8bb..191e8b6acd 100644 --- a/packages/sysutils/tz/system.d/tz-data.service +++ b/packages/sysutils/tz/system.d/tz-data.service @@ -3,14 +3,13 @@ Description=Setup Timezone data DefaultDependencies=no Before=systemd-udevd.service After=var.mount systemd-tmpfiles-setup.service - +StartLimitIntervalSec=0 [Service] Type=oneshot Environment=TIMEZONE=UTC EnvironmentFile=-/storage/.cache/timezone ExecStart=/bin/ln -sf /usr/share/zoneinfo/${TIMEZONE} /var/run/localtime RemainAfterExit=yes -StartLimitInterval=0 [Install] WantedBy=sysinit.target diff --git a/packages/wayland/compositor/sway/system.d/sway.service b/packages/wayland/compositor/sway/system.d/sway.service index 7fea2db30c..445f671eb6 100644 --- a/packages/wayland/compositor/sway/system.d/sway.service +++ b/packages/wayland/compositor/sway/system.d/sway.service @@ -1,6 +1,6 @@ [Unit] Description=Sway Wayland Compositor -Before=graphical.target kodi.service +Before=graphical.target archr.target After=multi-user.target ConditionKernelCommandLine=!installer diff --git a/packages/x11/other/fluxbox/system.d/windowmanager.service b/packages/x11/other/fluxbox/system.d/windowmanager.service index d97081e2b8..f93f5d55c8 100644 --- a/packages/x11/other/fluxbox/system.d/windowmanager.service +++ b/packages/x11/other/fluxbox/system.d/windowmanager.service @@ -2,8 +2,8 @@ Description=Fluxbox Window Manager Requires=xorg.service After=xorg.service -Before=kodi.service - +Before=archr.target +StartLimitIntervalSec=0 [Service] Environment=DISPLAY=:0 Environment=HOME=/storage @@ -11,7 +11,6 @@ ExecStart=/usr/bin/fluxbox KillMode=process Restart=always RestartSec=1 -StartLimitInterval=0 TimeoutStopSec=1s [Install] diff --git a/packages/x11/xserver/xorg-server/system.d/xorg.service b/packages/x11/xserver/xorg-server/system.d/xorg.service index 1721ed6d9c..8660444df0 100644 --- a/packages/x11/xserver/xorg-server/system.d/xorg.service +++ b/packages/x11/xserver/xorg-server/system.d/xorg.service @@ -1,16 +1,15 @@ [Unit] Description=Xorg Server -Before=graphical.target kodi.service +Before=graphical.target archr.target After=multi-user.target ConditionKernelCommandLine=!installer - +StartLimitIntervalSec=0 [Service] Type=notify EnvironmentFile=-/run/archr/debug/xorg.conf ExecStart=/usr/bin/xorg-launch -nolisten tcp vt01 $XORG_DEBUG Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=graphical.target diff --git a/projects/ArchR/packages/archr/autostart/050-audio b/projects/ArchR/packages/archr/autostart/050-audio index 48c94cd3f5..0695e1bcd9 100755 --- a/projects/ArchR/packages/archr/autostart/050-audio +++ b/projects/ArchR/packages/archr/autostart/050-audio @@ -46,6 +46,10 @@ fi /usr/bin/volume ${VOLUME} ### Run quantum audio hack if exists -if [ -n "/usr/sbin/quantum" ]; then +# Original used [ -n "/usr/sbin/quantum" ] which tests if a non-empty +# string is non-empty (always true), then tried to execute a binary +# that doesn't ship on most boards. The intended test is "does the +# helper exist and is it executable". +if [ -x /usr/sbin/quantum ]; then /usr/sbin/quantum fi diff --git a/projects/ArchR/packages/network/avahi/package.mk b/projects/ArchR/packages/network/avahi/package.mk index 283682eaee..5923aa990d 100644 --- a/projects/ArchR/packages/network/avahi/package.mk +++ b/projects/ArchR/packages/network/avahi/package.mk @@ -82,6 +82,10 @@ post_makeinstall_target() { fi rm -f ${INSTALL}/usr/share/dbus-1/system-services/org.freedesktop.Avahi.service rm -f ${INSTALL}/usr/sbin/avahi-dnsconfd + # avahi-dnsconfd.service installed automatically with the upstream + # service tree, but we strip the binary above — drop the now-orphan + # unit so systemd doesn't keep an ExecStart pointing at nowhere. + rm -f ${INSTALL}/usr/lib/systemd/system/avahi-dnsconfd.service rm -f ${INSTALL}/usr/bin/avahi-bookmarks rm -f ${INSTALL}/usr/bin/avahi-publish* rm -f ${INSTALL}/usr/bin/avahi-resolve* diff --git a/projects/ArchR/packages/network/bluez/system.d/bluetooth.service b/projects/ArchR/packages/network/bluez/system.d/bluetooth.service index 10278a99a1..34f5d92371 100644 --- a/projects/ArchR/packages/network/bluez/system.d/bluetooth.service +++ b/projects/ArchR/packages/network/bluez/system.d/bluetooth.service @@ -1,7 +1,7 @@ [Unit] Description=Bluetooth service After=syslog.target - +StartLimitIntervalSec=0 [Service] Type=dbus BusName=org.bluez @@ -15,7 +15,6 @@ LimitNPROC=1 TimeoutStopSec=1s Restart=on-failure RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=bluetooth.target diff --git a/projects/ArchR/packages/network/connman/system.d/connman.service b/projects/ArchR/packages/network/connman/system.d/connman.service index 98580d5a2a..7f04183428 100644 --- a/projects/ArchR/packages/network/connman/system.d/connman.service +++ b/projects/ArchR/packages/network/connman/system.d/connman.service @@ -6,7 +6,7 @@ Before=network.target multi-user.target shutdown.target After=dbus.service network-base.service systemd-resolved.service Wants=network.target ConditionPathExists=!/dev/.kernel_ipconfig - +StartLimitIntervalSec=0 [Service] Type=dbus BusName=net.connman @@ -15,7 +15,6 @@ EnvironmentFile=-/run/archr/debug/connman.conf ExecStart=/bin/sh -c ". /usr/lib/connman/connman-setup; exec /usr/sbin/connmand -nr --nodnsproxy $CONNMAN_MAIN $CONNMAN_DEBUG" StandardOutput=null RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/projects/ArchR/packages/network/openssh/system.d/sshd.service b/projects/ArchR/packages/network/openssh/system.d/sshd.service index b71af5dd4c..9193498073 100644 --- a/projects/ArchR/packages/network/openssh/system.d/sshd.service +++ b/projects/ArchR/packages/network/openssh/system.d/sshd.service @@ -4,7 +4,7 @@ After=network.target RequiresMountsFor=/storage ConditionKernelCommandLine=|ssh ConditionPathExists=|/var/lib/archr/services/sshd.conf - +StartLimitIntervalSec=0 [Service] Restart=on-failure EnvironmentFile=-/var/lib/archr/services/sshd.conf @@ -16,7 +16,6 @@ ExecStart=/usr/sbin/sshd -D $SSH_ARGS ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/projects/ArchR/packages/network/samba/system.d/nmbd.service b/projects/ArchR/packages/network/samba/system.d/nmbd.service index 86464b159c..15e9031767 100644 --- a/projects/ArchR/packages/network/samba/system.d/nmbd.service +++ b/projects/ArchR/packages/network/samba/system.d/nmbd.service @@ -1,11 +1,14 @@ [Unit] Description=Samba NMB Daemon -Wants=network-online.target samba-config.service -After=network-online.target samba-config.service +# samba-config.service não existe no override ArchR (substituído pelo +# daemons/002-samba que cria /run/samba/smb.conf via ln -s). Mantê-lo +# em Wants= aparecia como not-found no systemctl, então removido. +Wants=network-online.target +After=network-online.target RequiresMountsFor=/storage ConditionPathExists=!/var/lib/archr/services/samba.disabled ConditionPathExists=/run/samba/smb.conf - +StartLimitIntervalSec=0 [Service] Type=forking PIDFile=/run/samba/nmbd.pid @@ -14,7 +17,6 @@ ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/projects/ArchR/packages/network/samba/system.d/smbd.service b/projects/ArchR/packages/network/samba/system.d/smbd.service index 821987d2eb..fbea2b2896 100644 --- a/projects/ArchR/packages/network/samba/system.d/smbd.service +++ b/projects/ArchR/packages/network/samba/system.d/smbd.service @@ -5,7 +5,7 @@ After=network-online.target nmbd.service avahi-daemon.service RequiresMountsFor=/storage ConditionPathExists=!/var/lib/archr/services/samba.disabled ConditionPathExists=/run/samba/smb.conf - +StartLimitIntervalSec=0 [Service] Type=forking PIDFile=/run/samba/smbd.pid @@ -15,7 +15,6 @@ ExecReload=/bin/kill -HUP $MAINPID TimeoutStopSec=1s Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/projects/ArchR/packages/sysutils/autostart/system.d/archr-autostart.service b/projects/ArchR/packages/sysutils/autostart/system.d/archr-autostart.service index 4738a53310..b9badc0a1c 100644 --- a/projects/ArchR/packages/sysutils/autostart/system.d/archr-autostart.service +++ b/projects/ArchR/packages/sysutils/autostart/system.d/archr-autostart.service @@ -1,6 +1,10 @@ [Unit] Description=ArchR user autostart script -Before=emustation.service weston.service +# weston.service não existe em ArchR (UI é via sway.service); mantê-lo +# em Before= mostrava o weston como "not-found inactive". sway.service +# já está coberto pelo After=graphical.target abaixo (sway é o +# display-manager.service do graphical.target). +Before=emustation.service After=network.target graphical.target userconfig.service [Service] diff --git a/projects/ArchR/packages/sysutils/system-utils/package.mk b/projects/ArchR/packages/sysutils/system-utils/package.mk index d867af9a15..2821db8219 100644 --- a/projects/ArchR/packages/sysutils/system-utils/package.mk +++ b/projects/ArchR/packages/sysutils/system-utils/package.mk @@ -35,6 +35,14 @@ makeinstall_target() { fi chmod 0755 ${INSTALL}/usr/bin/* + # video.service runs /usr/bin/video_sense which only ships for a few + # devices (RK3399 / RK3566 / S922X). When the binary isn't installed + # the unit becomes orphan (ExecStart pointing at nowhere). Drop the + # unit on devices without the helper so systemd-analyze stays clean. + if [ ! -f ${INSTALL}/usr/bin/video_sense ]; then + rm -f ${INSTALL}/usr/lib/systemd/system/video.service + fi + mkdir -p ${INSTALL}/usr/config cp ${PKG_DIR}/sources/config/fancontrol.conf ${INSTALL}/usr/config/fancontrol.conf.sample } diff --git a/projects/ArchR/packages/sysutils/systemd/system.d/usercache.service b/projects/ArchR/packages/sysutils/systemd/system.d/usercache.service index 23ff3f94a5..f1826966bc 100644 --- a/projects/ArchR/packages/sysutils/systemd/system.d/usercache.service +++ b/projects/ArchR/packages/sysutils/systemd/system.d/usercache.service @@ -2,7 +2,11 @@ Description=Setup User cache dir DefaultDependencies=no After=systemd-tmpfiles-setup.service storage.mount -Before=automount.service autostart.service +# ArchR prefixou as unidades reais com archr- (automount.service e +# autostart.service são nomes herdados do JELOS que ArchR não embarca); +# sem o prefixo o ordering Before= não casa, e o cache setup corria +# concorrente com os mounts. +Before=archr-automount.service archr-autostart.service RequiresMountsFor=/storage [Service] diff --git a/projects/ArchR/packages/sysutils/systemd/system.d/userconfig.service b/projects/ArchR/packages/sysutils/systemd/system.d/userconfig.service index d57f8523dc..fbb43d8cf5 100644 --- a/projects/ArchR/packages/sysutils/systemd/system.d/userconfig.service +++ b/projects/ArchR/packages/sysutils/systemd/system.d/userconfig.service @@ -2,7 +2,10 @@ Description=Setup User config dir DefaultDependencies=no After=systemd-tmpfiles-setup.service storage.mount -Before=archr-automount.service autostart.service +# autostart.service é nome herdado do JELOS; em ArchR a unit real é +# archr-autostart.service. Sem o prefixo o Before= é ignorado e +# userconfig-setup corria paralelo aos scripts de autostart. +Before=archr-automount.service archr-autostart.service RequiresMountsFor=/storage [Service] diff --git a/projects/ArchR/packages/tools/entware/system.d/entware.service b/projects/ArchR/packages/tools/entware/system.d/entware.service index 124d90134f..02ba62f1c3 100644 --- a/projects/ArchR/packages/tools/entware/system.d/entware.service +++ b/projects/ArchR/packages/tools/entware/system.d/entware.service @@ -1,7 +1,10 @@ [Unit] Description=Entware service After=systemd-tmpfiles-setup.service network-online.target -Before=kodi.service +# Before=archr.target era para garantir que Entware estivesse pronto +# antes do Kodi consumir os pacotes /opt. ArchR não embarca Kodi, então +# Before= é equivalente a archr.target (alvo de inicialização da UI). +Before=archr.target Requires=network-online.target ConditionPathExists=/opt/etc/init.d/rc.unslung diff --git a/projects/ArchR/packages/x11/xserver/xwayland/package.mk b/projects/ArchR/packages/x11/xserver/xwayland/package.mk index beae0a2a4c..d8df4392c2 100644 --- a/projects/ArchR/packages/x11/xserver/xwayland/package.mk +++ b/projects/ArchR/packages/x11/xserver/xwayland/package.mk @@ -66,4 +66,12 @@ fi post_makeinstall_target() { rm -rf ${INSTALL}/var/cache/xkb + # xorg-configure@.service (shipped via system.d/) expects + # /usr/lib/xorg/xorg-configure to exist. The helper script is in + # scripts/ but the build system doesn't auto-install scripts/ for + # this package. Drop it in place so ExecStart resolves whenever + # xorg.service pulls it in (non-wayland boards / xorg fallback). + mkdir -p ${INSTALL}/usr/lib/xorg + cp ${PKG_DIR}/scripts/xorg-configure ${INSTALL}/usr/lib/xorg/xorg-configure + chmod 0755 ${INSTALL}/usr/lib/xorg/xorg-configure } diff --git a/projects/ArchR/packages/x11/xserver/xwayland/system.d/xorg.service b/projects/ArchR/packages/x11/xserver/xwayland/system.d/xorg.service index 1721ed6d9c..f50de4a702 100644 --- a/projects/ArchR/packages/x11/xserver/xwayland/system.d/xorg.service +++ b/projects/ArchR/packages/x11/xserver/xwayland/system.d/xorg.service @@ -1,8 +1,13 @@ [Unit] Description=Xorg Server -Before=graphical.target kodi.service +# kodi.service não existe em ArchR; o ordering Before= silenciosamente +# colapsava para Before=graphical.target. StartLimitInterval (alias +# antigo) precisa ficar em [Unit] para fazer efeito, e o canônico é +# StartLimitIntervalSec. +Before=graphical.target After=multi-user.target ConditionKernelCommandLine=!installer +StartLimitIntervalSec=0 [Service] Type=notify @@ -10,7 +15,6 @@ EnvironmentFile=-/run/archr/debug/xorg.conf ExecStart=/usr/bin/xorg-launch -nolisten tcp vt01 $XORG_DEBUG Restart=always RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=graphical.target