mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
systemd.eclass: make all fallback paths use /usr/lib
Back in 2018, the eclass was changed to ensure that the canonical path used for results was in /lib, since that works for split-usr systems running systemd while also supporting merged-usr systems due to portage following symlinks at install time. It even works for binpkgs. But here and now in 2025, systemd doesn't support split-usr at all. There is no point in having unit files install conservatively in /lib/systemd. Update the path to accommodate the new reality. This mostly has no effect. On openrc profiles, or for packages that use systemd_dounit without pulling in pkgconfig, binpkgs will be created with a different, but still working path, which then triggers iwdevtools warnings when you reinstall a former binpkg from source, as it thinks the file has "moved". e.g. ``` * CMP: =net-misc/radvd-2.19-r7 with net-misc/radvd-2.20/image * FILES:-lib/systemd/system/radvd.service * FILES:+usr/lib/systemd/system/radvd.service * ------> FILES(+1,-1) ``` Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
04e7124c39
commit
31153db1f4
@ -1,4 +1,4 @@
|
||||
# Copyright 2011-2024 Gentoo Authors
|
||||
# Copyright 2011-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: systemd.eclass
|
||||
@ -77,7 +77,7 @@ _systemd_unprefix() {
|
||||
systemd_get_systemunitdir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
_systemd_get_dir systemdsystemunitdir /lib/systemd/system
|
||||
_systemd_get_dir systemdsystemunitdir /usr/lib/systemd/system
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_get_userunitdir
|
||||
@ -99,7 +99,7 @@ systemd_get_userunitdir() {
|
||||
systemd_get_utildir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
_systemd_get_dir systemdutildir /lib/systemd
|
||||
_systemd_get_dir systemdutildir /usr/lib/systemd
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_get_systemgeneratordir
|
||||
@ -109,7 +109,7 @@ systemd_get_utildir() {
|
||||
systemd_get_systemgeneratordir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
_systemd_get_dir systemdsystemgeneratordir /lib/systemd/system-generators
|
||||
_systemd_get_dir systemdsystemgeneratordir /usr/lib/systemd/system-generators
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_get_systempresetdir
|
||||
@ -119,7 +119,7 @@ systemd_get_systemgeneratordir() {
|
||||
systemd_get_systempresetdir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
_systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset
|
||||
_systemd_get_dir systemdsystempresetdir /usr/lib/systemd/system-preset
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_get_sleepdir
|
||||
@ -127,7 +127,7 @@ systemd_get_systempresetdir() {
|
||||
# Output the path for the system sleep directory.
|
||||
systemd_get_sleepdir() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
_systemd_get_dir systemdsleepdir /lib/systemd/system-sleep
|
||||
_systemd_get_dir systemdsleepdir /usr/lib/systemd/system-sleep
|
||||
}
|
||||
|
||||
# @FUNCTION: systemd_dounit
|
||||
|
||||
@ -35,11 +35,11 @@ test_systemd_unprefix() {
|
||||
tend $?
|
||||
}
|
||||
|
||||
test_system_dir /lib/systemd/system systemd_get_systemunitdir
|
||||
test_system_dir /lib/systemd systemd_get_utildir
|
||||
test_system_dir /lib/systemd/system-generators systemd_get_systemgeneratordir
|
||||
test_system_dir /lib/systemd/system-preset systemd_get_systempresetdir
|
||||
test_system_dir /lib/systemd/system-sleep systemd_get_sleepdir
|
||||
test_system_dir /usr/lib/systemd/system systemd_get_systemunitdir
|
||||
test_system_dir /usr/lib/systemd systemd_get_utildir
|
||||
test_system_dir /usr/lib/systemd/system-generators systemd_get_systemgeneratordir
|
||||
test_system_dir /usr/lib/systemd/system-preset systemd_get_systempresetdir
|
||||
test_system_dir /usr/lib/systemd/system-sleep systemd_get_sleepdir
|
||||
|
||||
test_user_dir /usr/lib/systemd/user systemd_get_userunitdir
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user