Classic Confinement Request for sponge-controller

I would like to request access to classic confinement for the private snap sponge-controller. This snap is used for internal processes and needs access to serial ports that are not included in any of the snap interfaces.


  • name: sponge-controller
  • description: Used for internal processes that require serial access
  • snapcraft: PRIVATE
  • upstream: PRIVATE
  • upstream-relation: Publisher
  • supported-category: Other
  • reasoning: Serial access for machines not running ubuntu-core is poorly supported. The raw-usb interface allows access to /dev/ttyUSB*/, but not every serial connection is usb based.

I understand that strict confinement is generally preferred over classic.

I’ve tried the existing interfaces to make the snap to work under strict confinement.

Note that snappy-debug can be used to identify possible required interfaces. See https://snapcraft.io/docs/debug-snaps for more information.

Hey @spongebas

Please note that the snap must fit into one of the supported categories to be considered for classic confinement.

Have you also tried the serial-port interface?

The serial-port slot side can only be provided by a gadget snap, not by snapd so this slot type is usually not available on classic installs with the generic (or no ) gadget …

snapd’s experimental hotplug support helps here but is only available for USB->serial adapters …

Sadly we do not have a classic category that could solve this issue either though …

(perhaps a solution could be that we simply add a few serial-port slot entries for well known serial devices to the generic classic gadget … i.e. ttyS0, S1, S2 etc)

Thanks for the replies.

If I need to choose a category, “debug tools” would be best applicable.

@ogra 's explanation describes my situation well. I’m not familiar with the generic classic gadget snap, but that does sound like a good solution to me. In this situation we need access to /dev/ttyAMA*. The only possible downside of this approach may be the timeline involved to get this feature landed.

Hi @jslarraz , @ogra. Is there an update on your decision to allow the classic confinement?

@pedronis any recommendation about this request?

is the set of serial ports well defined or open-ended? custom-device can be used for a snap to define both slot and plug if needed to get access to snap specific devices if the devices in question are clear enough

2 Likes

Hi, @pedronis

The custom-device documentation says it’s intended for ubuntu-core, but I will try to see if it works on classic ubuntu.

I’ve uploaded a version with the custom-devices added and its waiting for human approval now. Will this approval be necessary for every future version as well?

In general human approval involves adding an exception for your snap to the review tools, so subsequent uploads will just pass once the use of the interface was granted

You should test locally before requesting though

Thanks @ogra, @pedronis

I tested the custom-devices locally and it does indeed work. Could one of you approve the latest revision in the snapstore?

1 Like

I’m not a reviewer, sorry… You should also edit the title of the thread to point to the new request…