Repository navigation
fix(dde): drop sudo wrapper around dde system:install - #95
Merged
Merged
Conversation
`setup-dde` was wrapping `dde system:install` in `sudo --preserve-env=HOME,USER,...`, but the upstream README runs the command unprivileged (`dde system:install`). dde escalates internally for the individual steps that actually need root — mkcert CA install and the DNS resolver tweak — using passwordless sudo, which GitHub-hosted runners provide. Wrapping the whole command in `sudo` had two side effects we no longer want: 1. State files written under $HOME/.dde end up root-owned. The next unprivileged `dde project:up` then fails with `Permission denied` when trying to overwrite the generated dnsmasq config — observed in sbaerlocher/savvy#102 once the action-resolution bug fixed in #93 stopped masking it. 2. The --preserve-env workaround for HOME/USER/DDE_CONFIG_DIR/ DDE_DATA_DIR exists only because of the sudo wrap; dropping the wrap drops the workaround. Update the input description so callers know what dde needs from the host (Docker + passwordless sudo for dde's internal calls), and add a short comment explaining why this step is intentionally not under sudo. Signed-off-by: Simon Bärlocher <[email protected]>
sbaerlocher
force-pushed
the
fix/setup-dde-chown-after-system-install
branch
from
April 30, 2026 15:49
533bf34 to
4e21c57
Compare
Owner
Author
|
Doku-Hinweise adressiert (force-push):
|
2 tasks
sbaerlocher
added a commit
that referenced
this pull request
Apr 30, 2026
CHANGELOG.md: add the action-resolution fix shipped in #93 to the 2026-04-30 release. Both fixes (#93 and #95) are merged into a single `### Fixed` block placed after `### Changed (BREAKING)`, matching the Keep-a-Changelog conventional ordering. The 2026-04-30 release block now reads: rename (BREAKING), then the two fixes. README.md / AGENTS.md: bump the "Last updated" markers from 2026-04-28 to 2026-04-30. The AGENTS.md `Version` field is left at 1.3.0 — its meaning (doc-scoped semver vs. release marker) is unresolved and shouldn't be decided in a docs-bump PR; tracked as a follow-up. Signed-off-by: Simon Bärlocher <[email protected]>
sbaerlocher
added a commit
that referenced
this pull request
Apr 30, 2026
CHANGELOG.md: add the action-resolution fix shipped in #93 to the 2026-04-30 release. Both fixes (#93 and #95) are merged into a single `### Fixed` block placed after `### Changed (BREAKING)`, matching the Keep-a-Changelog conventional ordering. The 2026-04-30 release block now reads: rename (BREAKING), then the two fixes. README.md / AGENTS.md: bump the "Last updated" markers from 2026-04-28 to 2026-04-30. The AGENTS.md `Version` field is left at 1.3.0 — its meaning (doc-scoped semver vs. release marker) is unresolved and shouldn't be decided in a docs-bump PR; tracked as a follow-up. Signed-off-by: Simon Bärlocher <[email protected]>
sbaerlocher
added a commit
to sbaerlocher/savvy
that referenced
this pull request
May 15, 2026
`dde system:install` writes a `/etc/systemd/resolved.conf.d/` drop-in but does not escalate for that path on GitHub-hosted runners — mkdir fails with `Permission denied` and the step exits 1 even though dnsmasq and traefik came up fine. Chmod the parent dir to o+w before the install so the unprivileged dde process can create the drop-in directory itself. This is the same shape of fix as the dnsmasq perms workaround in sbaerlocher/.github#95 and should be removed once whatwedo/dde escalates internally for the systemd-resolved config path.
sbaerlocher
added a commit
to sbaerlocher/savvy
that referenced
this pull request
May 15, 2026
`dde system:install` configures systemd-resolved with a drop-in and then restarts the service, but does not escalate for either step on GitHub-hosted runners — the install fails first with `mkdir(): Permission denied` on `/etc/systemd/resolved.conf.d`, and then (once mkdir works) with `Failed to restart systemd-resolved.service: Interactive authentication required.`. In both cases dnsmasq and traefik already came up fine; the resolver failure is what flips the step's exit code to 1. Two minimal workarounds, both targeted at the runner only: * `chmod o+w /etc/systemd` so the unprivileged dde process can create the drop-in directory. * polkit rule for `systemd-resolved.service` so the same process can restart it without an interactive prompt. This parallels the dnsmasq fix in sbaerlocher/.github#95 and should be removed once whatwedo/dde escalates internally for these paths.
sbaerlocher
added a commit
to sbaerlocher/savvy
that referenced
this pull request
Jun 10, 2026
`dde system:install` configures systemd-resolved with a drop-in and then restarts the service, but does not escalate for either step on GitHub-hosted runners — the install fails first with `mkdir(): Permission denied` on `/etc/systemd/resolved.conf.d`, and then (once mkdir works) with `Failed to restart systemd-resolved.service: Interactive authentication required.`. In both cases dnsmasq and traefik already came up fine; the resolver failure is what flips the step's exit code to 1. Two minimal workarounds, both targeted at the runner only: * `chmod o+w /etc/systemd` so the unprivileged dde process can create the drop-in directory. * polkit rule for `systemd-resolved.service` so the same process can restart it without an interactive prompt. This parallels the dnsmasq fix in sbaerlocher/.github#95 and should be removed once whatwedo/dde escalates internally for these paths.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the
sudo --preserve-env=...wrapper arounddde system:installin
setup-dde. The upstream README runs the command unprivileged; ddeescalates internally (passwordless sudo) for the steps that actually
need root (mkcert CA, DNS resolver tweak).
Why
Wrapping the whole command in
sudohad two side effects:State files end up root-owned. The next unprivileged
dde project:upthen fails withPermission deniedwhen trying tooverwrite the generated dnsmasq config:
Observed in sbaerlocher/savvy#102
once the action-resolution bug fixed in fix(dde): reference setup-dde via full repo path in project-up #93 stopped masking it.
The
--preserve-env=HOME,USER,DDE_CONFIG_DIR,DDE_DATA_DIRworkaroundexists only because of the sudo wrap; dropping the wrap drops the
workaround.
Test plan
test-actions-dde.ymlrunssystem-install: 'false', so this code path is not directlycovered — see follow-up below).
2026-04-28tag-move: re-run the failingsavvy E2E job
and confirm
dde project:upproceeds past the dnsmasq config step.Follow-ups
system-install: 'false', so this codepath is not exercised in this repo's CI. Adding a smoke job that
runs
system:installonubuntu-latestwould close the gap.