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

Authored by ngraham on Oct 15 2019, 5:48 PM.

Details

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

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Oct 15 2019, 5:48 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 15 2019, 5:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Oct 15 2019, 5:48 PM
apol accepted this revision.Oct 16 2019, 1:17 AM
This revision is now accepted and ready to land.Oct 16 2019, 1:17 AM
This revision was automatically updated to reflect the committed changes.