[This may be a bug in extra-cmake-modules] SUMMARY The statedir location seems to be incorrectly prefixed with a /usr when it should be /. Causing tmpfiles on immutable /usr to trip over /usr/var/lib/plasmalogin being readonly. STEPS TO REPRODUCE 1. cmake install 2. observe incorrect path in artifacts (e.g. the tmpfiles.d file) 3. mount a readonly /usr that does not contain a /usr/var/ (specific step depends on your system alas) 4. systemd-tmpfiles --create OBSERVED RESULT tmpfiles fails over readonly filesystem EXPECTED RESULT tmpfiles should exit successfully SOFTWARE/OS VERSIONS Operating System: KDE Linux 2025-05-05 KDE Plasma Version: 6.3.80 KDE Frameworks Version: 6.15.0 Qt Version: 6.9.0 Kernel Version: 6.14.4-arch1-2 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor Memory: 64 GiB of RAM (62.7 GiB usable) Graphics Processor: AMD Radeon RX 7800 XT ADDITIONAL INFORMATION I haven't really looked at it but chances are kdeinstalldirs in ECM doesn't special-handle /var correctly. To align with the cmake default behaviors it'd have to "For <dir> other than the SYSCONFDIR, LOCALSTATEDIR and RUNSTATEDIR, the value of CMAKE_INSTALL_<dir> is prefixed with usr/ if it is not user-specified as an absolute path.". Possibly it doesn't implement the latter two exclusions.
Relevant code seems to be https://invent.kde.org/plasma/plasma-login-manager/-/blob/master/services/CMakeLists.txt?ref_type=heads#L21 > DESTINATION "${CMAKE_INSTALL_LIBDIR}/tmpfiles.d" so clearly not an ECM issue
CMAKE_INSTALL_FULL_LOCALSTATEDIR looks questionable though, that's probably ECM
(In reply to Nicolas Fella from comment #1) > Relevant code seems to be > https://invent.kde.org/plasma/plasma-login-manager/-/blob/master/services/ > CMakeLists.txt?ref_type=heads#L21 > > > DESTINATION "${CMAKE_INSTALL_LIBDIR}/tmpfiles.d" > > so clearly not an ECM issue ok, I probably misunderstood what the issues with tmpfiles.d was
Ah sorry, wasn't very clear. The offending line is here https://invent.kde.org/plasma/plasma-login-manager/-/blob/797d3223da4cbd488c670bd35a6faf6bc9022f37/services/plasmalogin-tmpfiles.conf.in#L2
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/532
Git commit b6a9bc541dfccb3052b7686e376bc9a3836450dc by Nicolas Fella. Committed on 05/06/2025 at 12:29. Pushed by nicolasfella into branch 'master'. Fix LOCALSTATEDIR when installing to /usr In that case we want /var, not /usr/var. Apply the same logic as for /etc M +6 -1 kde-modules/KDEInstallDirsCommon.cmake M +1 -0 tests/CMakeLists.txt https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/b6a9bc541dfccb3052b7686e376bc9a3836450dc