← 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

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

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.

Suggested action:

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
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

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#501 Add support for confinement property. snapcraft merged Merged. Introduces an optional confinement property for snaps, defaulting to strict to preserve backward compatibility. Includes documentation updates, schema adjustments, and passing CI checks. Resolves LP #1580819.
83%