From 214e4b995efc108bb6a99e84ba9e7dcfe2480272 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 18 Aug 2026 15:34:02 +0200 Subject: [PATCH 1/3] defs.mk: Don't use plain /usr/bin/install In a development tree, $(INSTALL) falls back to plain install(1), which refuses dead symlinks, so unprivileged "make install" fails outright. Packaging is unaffected, because the spec exports INSTALL_LOG, which already routes $(INSTALL) through "pkg.sh log-install" Route the remaining $(INSTALL) defaults through $(LOG_INSTALL_SH) as well to address the failures: $(SUDO) jw.pkg log-install -p for DEVELOPMENT=false, plain jw.pkg log-install otherwise. Move -f $(PKG_FORMAT) out of $(LOG_INSTALL_SH) and into the two logging call sites, so the no-log paths don't carry a package format they never use. Signed-off-by: Jan Lindemann --- make/defs.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/make/defs.mk b/make/defs.mk index e323de68..12adf33d 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -184,7 +184,7 @@ PKG_VENDOR ?= janware GmbH # ----- Packaging variables PKG_SH_EXE := /bin/bash $(JWB_SCRIPT_DIR)/pkg.sh -LOG_INSTALL_SH := $(PKG_SH_EXE) log-install -f $(PKG_FORMAT) +LOG_INSTALL_SH := $(PKG_SH_EXE) log-install UPDATE_REPO_SH := /opt/packager-server/bin/packager-server schedule-rebuild ifdef INSTALL_LINK @@ -195,14 +195,14 @@ else ifdef INSTALL_SYMLINK LINK_LIB = $(SUDO) $(LOG_INSTALL_SH) -LA $(LOG_INSTALL_EXTRA_OPTS) else ifdef INSTALL_LOG - INSTALL = $(LOG_INSTALL_SH) -p -l $(INSTALL_LOG) $(LOG_INSTALL_EXTRA_OPTS) - LINK_LIB = $(LOG_INSTALL_SH) -L -l $(INSTALL_LOG) $(LOG_INSTALL_EXTRA_OPTS) + INSTALL = $(LOG_INSTALL_SH) -p -l $(INSTALL_LOG) -f $(PKG_FORMAT) $(LOG_INSTALL_EXTRA_OPTS) + LINK_LIB = $(LOG_INSTALL_SH) -L -l $(INSTALL_LOG) -f $(PKG_FORMAT) $(LOG_INSTALL_EXTRA_OPTS) else ifndef INSTALL ifeq ($(DEVELOPMENT),false) - INSTALL = $(SUDO) install + INSTALL = $(SUDO) $(LOG_INSTALL_SH) -p $(LOG_INSTALL_EXTRA_OPTS) else - INSTALL = install + INSTALL = $(LOG_INSTALL_SH) endif endif ifndef LINK_LIB -- 2.55.0 From db14ef54ff5013b6753e7b997c2f8e78466ac435 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 18 Aug 2026 17:04:44 +0200 Subject: [PATCH 2/3] pkg.sh: log-install: Don't log by default cmd_log_install() defaults $c_logfile to "install.log", so every invocation without -l appends to an install.log in the current directory. That's semantical nonsense. Default $c_logfile to empty instead. The existing empty-$c_logfile early exit already skips logging, so no -l now means no log, and callers that want a log pass -l explicitly, as the packaging flow does through INSTALL_LOG. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M (pi) Signed-off-by: Jan Lindemann --- scripts/pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pkg.sh b/scripts/pkg.sh index 30174219..9e24c9ae 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -734,7 +734,7 @@ cmd_log_install() local args="$*" local c_format=rpm - local c_logfile=install.log + local c_logfile="" local c_mode_dir=false local c_create_leading_dirs=false local c_group=`id -gn` -- 2.55.0 From 6da6ac2505672dce7399f9951d0c08ccf556bd08 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 18 Aug 2026 15:39:48 +0200 Subject: [PATCH 3/3] conf / scripts: Fix unprivileged "make install" Unprivileged "make install" currently returns an error. That looks bad. It actually is not a real problem, because unprivileged "make install" installs files into locations that are good for nothing, in the sense that they don't constitute a meaningful or usable hierarchy of installed files. Debugging / inspecting the install machinery itself is a valid use case, though, and it's easier to explain to the unsuspecting user that unprivileged installation is something akin to shooting range training than why "make install" outright errors out, so fix the error messages. Signed-off-by: Jan Lindemann --- conf/bash-completion.d/Makefile | 8 ++++---- scripts/usr-bin/Makefile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/bash-completion.d/Makefile b/conf/bash-completion.d/Makefile index a4772e58..8b18976d 100644 --- a/conf/bash-completion.d/Makefile +++ b/conf/bash-completion.d/Makefile @@ -1,8 +1,8 @@ -TOPDIR = ../.. +TOPDIR = ../.. -INSTALL_CFGDIR = $(ENV_PREFIX)/usr/share/bash-completion/completions -LOCAL_CFG = $(filter-out Makefile,$(wildcard *)) -PACKAGE_INSTALL_DIR = false +INSTALL_CFGDIR = $(ROOT_PREFIX)/usr/share/bash-completion/completions +LOCAL_CFG = $(filter-out Makefile,$(wildcard *)) +PACKAGE_INSTALL_DIR = false include $(TOPDIR)/make/proj.mk include $(JWBDIR)/make/conf.mk diff --git a/scripts/usr-bin/Makefile b/scripts/usr-bin/Makefile index 69c37ad1..8c937984 100644 --- a/scripts/usr-bin/Makefile +++ b/scripts/usr-bin/Makefile @@ -1,6 +1,6 @@ TOPDIR = ../.. -TARGET_DIR = $(ENV_PREFIX)/usr/bin +TARGET_DIR = $(ROOT_PREFIX)/usr/bin include $(TOPDIR)/make/proj.mk include $(JWBDIR)/make/defs.mk -- 2.55.0