plasma-workspace/desktop: install with DESTDIR, not --prefix
plasma-workspace COMPILED AND LINKED COMPLETELY and then failed at install: file INSTALL cannot copy ".../libnotificationmanager/plasmanotifyrc" to "/etc/xdg/plasmanotifyrc": Permission denied `cmake --install --prefix` re-roots only RELATIVE destinations. KDE's KDE_INSTALL_FULL_* paths are absolute, so cmake tried to write into the BUILD HOST's /etc -- only the host's permissions stopped it from polluting the host filesystem. DESTDIR re-roots absolute destinations too. Same fix already applied to kf6-ktexteditor, kde-cli-tools and sddm. plasma-desktop gets the same fix pre-emptively: it ships /etc/xdg config and has never been built, so this would otherwise have cost another full cycle. 54 other KDE recipes use the --prefix form but install nothing to an absolute path, which is why they build clean; left alone rather than churned.
This commit is contained in:
@@ -94,7 +94,13 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-Wno-dev
|
||||
cmake --build . -j"${COOKBOOK_MAKE_JOBS}"
|
||||
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
||||
# DESTDIR, not --prefix: `--prefix` re-roots only RELATIVE destinations, and
|
||||
# KDE's KDE_INSTALL_FULL_* paths are absolute, so cmake writes into the BUILD
|
||||
# HOST's filesystem instead. plasma-workspace hit exactly this:
|
||||
# file INSTALL cannot copy ... to "/etc/xdg/plasmanotifyrc": Permission denied
|
||||
# Fixed here pre-emptively -- plasma-desktop ships /etc/xdg config too and has
|
||||
# never been built, so this would have cost a full build cycle to discover.
|
||||
DESTDIR="${COOKBOOK_STAGE}" cmake --install . --prefix /usr
|
||||
|
||||
find "${COOKBOOK_STAGE}" -name '*.so*' -exec patchelf --remove-rpath {} \\; 2>/dev/null || true
|
||||
"""
|
||||
|
||||
@@ -244,7 +244,15 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DWITH_X11_SESSION=OFF \
|
||||
-Wno-dev
|
||||
cmake --build . -j"${COOKBOOK_MAKE_JOBS}"
|
||||
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
||||
# DESTDIR, not --prefix. `--prefix` only re-roots RELATIVE install
|
||||
# destinations. KDE's KDE_INSTALL_FULL_* paths are ABSOLUTE, so cmake tried to
|
||||
# write into the BUILD HOST's filesystem:
|
||||
# file INSTALL cannot copy file ".../libnotificationmanager/plasmanotifyrc"
|
||||
# to "/etc/xdg/plasmanotifyrc": Permission denied.
|
||||
# Only the host's permissions stopped that from polluting the host /etc.
|
||||
# DESTDIR re-roots absolute destinations too. Same fix already applied to
|
||||
# kf6-ktexteditor, kde-cli-tools and sddm.
|
||||
DESTDIR="${COOKBOOK_STAGE}" cmake --install . --prefix /usr
|
||||
|
||||
# KSMServerDBusInterface, installed OUTSIDE the X11 gate.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user