← Back to issue list

snapcraft and Snap Store validation rules mismatch for `classic` snaps

View original Github issue

Metadata

Project
snapcraft
Number
#5595
Type
issue
State
open
Author
dmitry-lyfar
Labels
Status: Triaged Type: Bug
Created
2025-07-03 05:08:51+00:00
Updated
2025-07-17 12:14:28+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description It's not possible to publish a `classic` snap that has a daemon with a managed unix socket, something like this: ``` myd: environment: command: commands/run_daemon daemon: notify restart-condition: on-failure sockets: unix: listen-stream: $SNAP_COMMON/myd/myd.socket socket-mode: 0666 plugs: - network-bind ``` due to the difference between snapcraft (aka `snap pack` from snapd in this case) validation rules and the store's validation rules. The former will respond with: ``` Cannot pack snap: error: cannot validate snap "workshop": invalid definition of application "workshopd": "network-bind" interface plug is required when sockets are used Detailed information: Command '['snap', 'pack', '--check-skeleton', PosixPath('/root/prime')]' returned non-zero exit status 1. ``` If the plug is removed then, then the snap will be packed but the Store will complain on upload: ``` - confinement 'classic' not allowed with plugs/slots ``` See also https://github.com/canonical/snapd/blob/846d56dff4ac86e820d20ad5157f522de4df6db6/snap/validate.go#L917 ### To Reproduce See the description. ### Environment - Ubuntu 24.04 LTS ### snapcraft.yaml ```yaml myd: environment: command: commands/run_daemon daemon: notify restart-condition: on-failure sockets: unix: listen-stream: $SNAP_COMMON/myd/myd.socket socket-mode: 0666 plugs: - network-bind ``` ### Relevant log output ```shell See the description. ``` ### Additional context _No response_

Evaluation history

No evaluation history available.