make: Fix CONFIG_SUBDIR
Some checks failed
CI / Packaging - Kali Linux (pull_request) Successful in 4m20s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Failing after 2m12s
CI / Packaging test (pull_request) Failing after 0s

The existence of CONFIG_SUBDIR hijacks INSTALL_CFGDIR to a subdirectory (by
default /etc/opt/<package>/$(CONFIG_SUBDIR)). Then std_install_rules apply,
and (the bent) INSTALL_CFGDIR is installed, but its parent directory, the
original $(INSTALL_CFGDIR), is not a prerequisite of install anylonger, and
has no rule anymore, hence log-install is never run for it. Instead it's
implicitly created by log-install -D $(INSTALL_CFGDIR).

This commit gives /etc/opt/<package> std-install rule and variables back as
CFGTOPDIR variants, and inserts it early into the install target's
prerequisite list.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-09-07 05:33:33 +02:00
commit fe2ae06367
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
4 changed files with 22 additions and 4 deletions

View file

@ -72,6 +72,9 @@ CFGMODE ?= 664
CFGDIROWNER ?= $(EXEDIROWNER)
CFGDIRGROUP ?= $(EXEDIRGROUP)
CFGDIRMODE ?= $(EXEDIRMODE)
CFGTOPDIROWNER ?= $(CFGDIROWNER)
CFGTOPDIRGROUP ?= $(CFGDIRGROUP)
CFGTOPDIRMODE ?= $(CFGDIRMODE)
SYSCFGOWNER ?= $(CFGOWNER)
SYSCFGGROUP ?= $(CFGGROUP)
SYSCFGMODE ?= $(CFGMODE)