fix(rockcraft-pack): pro builds require root
Metadata
Current evaluation
Merged PR #43 (commit 8a45c52) fixed rockcraft-pack Pro builds by omitting sudo --user, preserving root access to the Ubuntu Advantage token.
Resolution: closed resolved
Reason: PR #43 was merged as commit 8a45c52. It keeps Pro builds running as root so they can read /var/lib/ubuntu-advantage/private/machine-token.json.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This PR removes the `--user` from the rockcraft pack command when pro is set. This is because the pro builds require sudo in order to read `/var/lib/ubuntu-advantage/private/machine-token.json`.
Github runners will set the `user` to `runner`, meaning that `rockcraft pack` will run with `sudo --user runner`, which does not elevate the permissions of the `runner` user, ending up in failure.
Workflow run demonstrating the issue: https://github.com/alesancor1/template-test/actions/runs/17951434665/job/51051532751#step:5:322
ping @canonical/starcraft-reviewers
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #43 (commit 8a45c52) fixed rockcraft-pack Pro builds by omitting sudo --user, preserving root access to the Ubuntu Advantage token. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #43 (commit 8a45c52): pro rockcraft-pack builds no longer use --user, preserving root access to the Ubuntu Advantage machine token and fixing runner permission failures. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix removing the --user flag from rockcraft pack for pro builds. This enables sudo access to the Ubuntu Advantage machine token, resolving permission failures on GitHub runners. Approved by reviewers and passed all CI checks. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.