-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow brew-install to escalate when needed, fixes permission iss…
…ue. (#952)
- Loading branch information
Showing
7 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Unit] | ||
Description=Workaround brew-install not having the correct caps | ||
ConditionFileIsExecutable=/usr/libexec/brew-install | ||
After=local-fs.target | ||
|
||
[Service] | ||
Type=oneshot | ||
# Copy if it doesn't exist | ||
ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/libexec/.brew-install ] || /usr/bin/cp /usr/libexec/brew-install /usr/local/libexec/.brew-install" | ||
# This is faster than using .mount unit. Also allows for the previous line/cleanup | ||
ExecStartPre=/usr/bin/mount --bind /usr/local/libexec/.brew-install /usr/libexec/brew-install | ||
# Fix caps | ||
ExecStart=/usr/sbin/setcap 'cap_sys_admin+p' /usr/libexec/brew-install | ||
# Clean-up after ourselves | ||
ExecStop=/usr/bin/umount /usr/libexec/brew-install | ||
ExecStop=/usr/bin/rm /usr/local/libexec/.brew-install | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
4 changes: 2 additions & 2 deletions
4
...stem/ublue-system-flatpak-manager.service → ...stem/ublue-system-networked-tasks.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...d/user/ublue-user-flatpak-manager.service → ...d/user/ublue-user-networked-tasks.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters