D24677: Add `sudo` to the lines in install-sessions.sh that need it so you don't need to sudo the whole thing

Nathaniel Graham noreply at phabricator.kde.org
Tue Oct 15 18:48:27 BST 2019


ngraham created this revision.
ngraham added reviewers: apol, Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
ngraham requested review of this revision.

REVISION SUMMARY
  Because this script copies things to /, it needs to be run with `sudo`. But two of the
  copy operations also copy things to your home directory, and if you `sudo` the whole
  script, this results in those files being copied with root ownership, which can cause
  problems later.
  
  This patch prepends `sudo` to just the copy operations that need it so that the ones
  that don't aren't run with inappropriately elevated permissions.

TEST PLAN
  - Run `~/kde/build/plasma-workspace/login-sessions/install-sessions.sh`
  - Get prompted for the root password
  - Enter it
  - See that `plasma-dev-prefix.sh` and `startplasma-dev.sh` in `~/kde/usr/lib64/libexec/` have user ownership, not root ownership

REPOSITORY
  R120 Plasma Workspace

BRANCH
  moar-sudo (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D24677

AFFECTED FILES
  login-sessions/install-sessions.sh.cmake

To: ngraham, apol, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191015/0e29af1a/attachment.html>


More information about the Plasma-devel mailing list