← Back to issue list

build providers: re-exec as root

View original Github issue

Metadata

Project
snapcraft
Number
#2281
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2281 (commit d6ec1d24e) by sergiusens makes Snapcraft re-exec itself as root when running in managed-host build-provider environments, fixing LP #1791977 (+13 lines, 1 file, 1 approval).

Resolution: closed resolved

Reason: The PR itself was the resolution: it was approved and merged to master as commit d6ec1d24e "build providers: re-exec as root (#2281)", addressing LP bug #1791977 where Snapcraft invoked from a managed-host environment needed root privileges.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When snapcraft is called from managed-host environment, it needs to re-exec itself as root. LP: #1791977 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2281 (commit d6ec1d24e) by sergiusens makes Snapcraft re-exec itself as root when running in managed-host build-provider environments, fixing LP #1791977 (+13 lines, 1 file, 1 approval).
stealth/space-bunny-alpha — closed resolved Merged PR #2281 (commit d6ec1d24e) to re-exec Snapcraft as root in managed-host build-provider environments, resolving LP #1791977.
qwen/qwen3.6-35b-a3b — — Merged changes to re-execute snapcraft as root when invoked from a managed-host environment, resolving Launchpad bug #1791977. Approved by a reviewer, passed CI checks, and modified one file with 13 additions.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Forces snapcraft to re-execute as root when invoked from a managed-host environment, resolving Launchpad bug #1791977.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2385 (confidence 72%)

    Later follow-up commit 404255671 "cli: consolidate re-execution (#2385)" refactored the re-exec logic introduced here.

Related issues

Issue Project State Summary Similarity
#1791977 rerun snapcraft as root if on managed-host snapcraft (launchpad) closed Fixed managed-host builds by re-executing Snapcraft as root; PR snapcore/snapcraft#2281 merged as d6ec1d24e.
78%
#2507 build providers: improve handling in snap logic snapcraft merged Merged snapcraft#2507 as commit 841b41fa3, improving build-provider snap logic, removing unnecessary sudo calls, and silencing refresh-hold noise.
73%
#1795680 Consolidate root execution with legacy re-execution snapcraft (launchpad) closed Fixed by canonical/snapcraft#2385 (commit 404255671), consolidating root and legacy re-execution through one CLI entry point and provider root handling.
73%