CDE anchors its entire on-disk layout on three hardcoded roots — /usr/dt,
/etc/dt, /var/dt — and repeats those literal paths across configure,
Makefiles, C/C++ sources, build-time-preprocessed .src/.dt/.ptype files,
and help templates. As a result a distribution cannot ship CDE in an FHS-clean
layout (binaries in /usr, config in /etc/cde, state in /var/lib/cde,
arch-independent data in /usr/share/cde). Even passing --prefix=/usr does not
help: CDE_INSTALLATION_TOP ignores --prefix, the data tree lands in
root-level dirs like /usr/app-defaults and /usr/appconfig, and several
components keep probing /usr/dt regardless of configure.
This RFE proposes making the layout fully packager-overridable while keeping the
historical /usr/dt behavior as the default — i.e. no behavior change unless a
packager opts in. It is the result of bringing CDE up on Fedora (ppc64le) under
a strict FHS layout, and is submitted as a 4-patch series.
/usr/app-defaults, /usr/appconfig, /usr/backdrops are not acceptable./etc/dt and /var/dt have no override mechanism at all, so config and/etc/cde / /var/lib/cde.CDE_INSTALLATION_TOP uses ${ac_default_prefix} (always /usr/dt) instead${prefix}, so --prefix is silently ignored.CDE_INSTALLATION_TOP honor --prefix, and add four flags so each root--with-cde-data-dir=DIR (default: PREFIX)
--with-cde-config-dir=DIR (default: /etc/dt)
--with-cde-state-dir=DIR (default: /var/dt)
--with-cde-libexec-dir=DIR (default: BINDIR)
Expose the five roots as preprocessor macros in cde_config.h via
AC_DEFINE_UNQUOTED.
treewide: route hardcoded /usr/dt, /etc/dt, /var/dt paths through
CDE_* macros. Replace the scattered literal paths so every layer honors the
configure overrides: ~78 C/C++ string literals, the build-time-preprocessed
.src files (tradcpp tokens), the ToolTalk .ptype start strings baked into
types.xdr (fixes TT_ERR_PTYPE_START / dtinfo failing to launch), and the
help-family .hf.in bitmap pointers (fixes the "Missing Graphics" cdelogo on
FHS builds).
build: introduce CDE_DATA_TOP and migrate the arch-independent data tree.
Split a data namespace (CDE_DATA_TOP) from CDE_INSTALLATION_TOP
(binaries/libs/man), and wire it through Makefiles, headers and sources so
app-defaults, appconfig, backdrops, palettes, infolib, nls, … land
under e.g. /usr/share/cde instead of polluting /usr. Also finishes the
data-only directories (dtinfo InfoLibSearchPath, backdrops/palettes dirs) and
plugs two missed -DCDE_*_TOP Makefile defines.
build: autoconf-ify contrib templates + add an FHS path validator.
Convert the contrib/ helper templates (desktop entry, init/rc scripts,
xinetd & systemd units) to configure-substituted .in files, and add
util/check-fhs.sh to scan a staged install tree for stray hardcoded
/usr/dt, /etc/dt, /var/dt references so coverage regressions are caught
mechanically.
With no --with-cde-* flags, CDE_INSTALLATION_TOP/CDE_DATA_TOP default to
${prefix} and config/state default to /etc/dt / /var/dt, preserving the
existing /usr/dt/{app-defaults,appconfig,…} layout exactly. Existing builds are
unaffected.
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--with-cde-data-dir=/usr/share/cde \
--with-cde-config-dir=/etc/cde \
--with-cde-state-dir=/var/lib/cde \
--with-cde-libexec-dir=/usr/libexec/cde
→ binaries in /usr/bin, libs in /usr/lib, data in /usr/share/cde, config in
/etc/cde, runtime state in /var/lib/cde — no root-level pollution.
Patches: 4-patch series attached (patches 1–4). Applies cleanly on current
master (patch -p1 at the repo root / git am).
This is a great step, though it will take some time for me to test it and it would be great if others could too.
Also, the Chinese locale was recently added, so these might need to be rebased/tweaked to support those too though that could be done as just an additional patch.
But I will test it as soon as I can.
Diff: