← Back to issue list

Add support for confinement property

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1580819
Type
issue
State
closed
Author
~kyrofa
Labels
verification-done
Created
Updated
Closed

Current evaluation

Confinement property support landed in snapcraft via PR #501 (commit 3c04cd231), released in snapcraft 2.9; review-tools updated in click-reviewers-tools 0.43. Verified and released to xenial -updates.

Resolution: closed resolved

Reason: Maintainer ~kyrofa linked PR ubuntu-core/snapcraft#501 as the resolution; commit 3c04cd231 "Add support for the confinement property. (#501)" landed and shipped in snapcraft 2.9, where janitor closed the bug with "This bug was fixed in the package snapcraft - 2.9". The label verification-done followed SRU verification in xenial -updates.

Evaluated by: mr-cal-bot

No scores available.

Issue body

[Impact]  * Snaps need to be able to specify if they require devmode or if they can be run confined. This will allow for snapd to provide reasonable errors if one tries to install a snap that cannot run successfully under confinement.  * The YAML property should be called "confinement," and it should have two options: "devmode" and "strict." It should be optional, and `snapcraft init` should set it to "devmode."  * The "confinement" YAML property should be copied into the resulting `snap.yaml`. * Example YAML: name: foo version: 1 summary: foo description: foo confinement: devmode parts: foo: plugin: nil [Test Case]  * Run `snapcraft init`. Make sure "confinement" is "devmode."  * Create a valid snapcraft.yaml and run `snapcraft` on it. Make sure the "confinement" value gets copied to the `snap.yaml`.  * Create a valid snapcraft.yaml and remove the "confinement" property. Run `snapcraft`. It should print a hint about defaulting to "strict", and "confinement: strict" should be in the resulting `snap.yaml`. [Regression Potential]  * snapcraft.yaml validation could be incorrect (required properties may not be required correctly, etc.)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Confinement property support landed in snapcraft via PR #501 (commit 3c04cd231), released in snapcraft 2.9; review-tools updated in click-reviewers-tools 0.43. Verified and released to xenial -updates.
stealth/space-bunny-alpha — closed resolved Confinement property support merged in snapcraft PR #501 (commit 3c04cd231), released in snapcraft 2.9; bug closed as verification-done after xenial SRU.
stealth/space-bunny-alpha — closed resolved Implemented optional devmode/strict confinement, propagation to snap.yaml, strict defaulting with a hint, and devmode initialization in merged PR #501 (commit 3c04cd231).
qwen/qwen3.6-35b-a3b — — Implemented the confinement property for snapcraft YAML, supporting devmode and strict modes. Verified and closed, the feature enables snapd to validate confinement requirements and defaults to strict when omitted.
qwen/qwen3.6-35b-a3b — — Implemented and verified the confinement property feature. Snapcraft now supports devmode and strict options, defaults to devmode in new projects, and correctly propagates the value to snap.yaml.
qwen/qwen3.6-35b-a3b — — Implemented support for the confinement property in snapcraft.yaml, allowing devmode or strict options. The feature was verified and closed after integrating the property into snap.yaml generation with correct defaults and validation.
qwen3.6-35b-a3b-mtp-q6 — — Implemented support for the confinement property in snapcraft.yaml, enabling devmode and strict modes. The feature was verified, integrated into the build pipeline, and closed after successful validation.

Update history

Date Change
created

Related work

  • Likely Fixed By: ubuntu-core/snapcraft#501 (confidence 97%)

    Referenced by the reporter as the resolving PR; merged as commit 3c04cd231.

  • Related To: click-reviewers-tools#1580819 (confidence 60%)

    Companion LP bug; fixed in click-reviewers-tools 0.43~14.04.1 with sr_lint.py confinement checks.

Related issues

Issue Project State Summary Similarity
#1647422 Support classic confinement snapcraft (launchpad) closed Classic confinement support was implemented and merged in snapcore/snapcraft#946 via commit 97af16ffe, resolving launchpad/snapcraft#1647422.
76%
#1662351 Support ci builds when classic confinement is set snapcraft (launchpad) closed Classic-confinement CI support was implemented by provisioning the base core in snapcore/snapcraft PR #1112, commit 49b39ef9a.
70%
#946 meta: support classic confinment snapcraft merged Merged snapcraft#946 via commit 97af16ffe added classic confinement metadata support, allowing meta snaps to declare confinement as classic (LP #1647422).
70%