From c9fa2ae9d33cbc1111985bfb81b59db30740de26 Mon Sep 17 00:00:00 2001 From: Douglas Teles Date: Wed, 8 Jul 2026 21:37:13 -0300 Subject: [PATCH] archr: package scripts and alpm hooks so they ship through pacman The archr scripts (archr-update, archr-flash-sync, archr-depmod, wifictl, governors, ...) and the alpm hooks were installed in post_install, which writes into the assembled image only, so they never entered the pacman package: every one of them was flash-only. That is why the dual update path could deliver package contents but not its own plumbing, and the depmod fix would not have reached existing installs. Move the copy into makeinstall_target so the package carries them and pacman -Syu updates them like anything else. --- projects/ArchR/packages/archr/package.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/projects/ArchR/packages/archr/package.mk b/projects/ArchR/packages/archr/package.mk index 48dc6d763b..5251eae868 100644 --- a/projects/ArchR/packages/archr/package.mk +++ b/projects/ArchR/packages/archr/package.mk @@ -121,6 +121,17 @@ EOF # final dir so it materializes on first launch. mkdir -p ${INSTALL}/opt ln -sf /storage/jdk ${INSTALL}/opt/jdk + + # Scripts and alpm hooks belong in makeinstall_target, NOT post_install: + # post_install writes straight into the assembled image, so anything + # done there never lands in the pacman package and stays flash-only. + # These (archr-update, flash-sync, the depmod hook, wifictl, ...) must + # reach users through `pacman -Syu` too, so they go here. + mkdir -p ${INSTALL}/usr/bin + cp ${PKG_DIR}/sources/scripts/* ${INSTALL}/usr/bin + chmod 0755 ${INSTALL}/usr/bin/* 2>/dev/null ||: + mkdir -p ${INSTALL}/etc/pacman.d/hooks + cp ${PKG_DIR}/sources/pacman-hooks/*.hook ${INSTALL}/etc/pacman.d/hooks } post_install() { @@ -143,15 +154,6 @@ EOF cp ${PKG_DIR}/sources/motd ${INSTALL}/etc cat ${INSTALL}/etc/issue >> ${INSTALL}/etc/motd - cp ${PKG_DIR}/sources/scripts/* ${INSTALL}/usr/bin - chmod 0755 ${INSTALL}/usr/bin/* 2>/dev/null ||: - - # alpm hooks (pacman.conf points HookDir at /etc/pacman.d/hooks): the - # flash-sync hook keeps the FAT boot partition in step with kernel or - # DTB updates delivered through pacman. - mkdir -p ${INSTALL}/etc/pacman.d/hooks - cp ${PKG_DIR}/sources/pacman-hooks/*.hook ${INSTALL}/etc/pacman.d/hooks - ### Install man pages if [ -d "${PKG_DIR}/sources/man" ]; then for page in ${PKG_DIR}/sources/man/*.[1-9]; do