Classic confinement request for peridot

  • name: peridot (revision 1, uploaded and awaiting review)
  • description: Peridot is a Markdown note editor for Linux, Windows, macOS, Android and iOS, published by Noetisphere Innovations Private Limited. Website: https://peridot.noetisphereai.com. It includes a local code runner: a fenced code block in a note can be compiled and run on the user’s own computer, with a compiler or interpreter the user picks.
  • snapcraft: built with snap pack by our own script, from our .deb unpacked; it uses the host’s WebKitGTK 4.1 and GTK 3 as the .deb does, and a launcher checks they are present and names the apt package if one is missing. The snap.yaml is:
name: peridot
version: "1.1.1"
summary: "Markdown editor with a local folder index"
description: |
  Peridot edits, previews and indexes a folder of Markdown notes on your own machine.
architectures:
  - amd64
base: core22
confinement: classic
grade: stable
apps:
  peridot:
    command: bin/peridot-launch
  • upstream: PRIVATE (the product site is https://peridot.noetisphereai.com)

  • upstream-relation: we are the developer and publisher.

  • supported-category: IDEs

  • reasoning: Peridot has a local code runner. A fenced code block in a note can be compiled and run on the user’s own computer, with a compiler or interpreter the user picks and points the app at: gcc, g++, java, python, node, go, rustc and others. The program is run in a temporary folder that is deleted afterwards. That means running host toolchains chosen by the user, at paths the user picks. Strict confinement does not allow that: the snap would not see the host’s compilers, and the home and removable-media interfaces give file access only, not the ability to run the host’s toolchains with their own libraries.

    We have not shipped a strict build. Under strict confinement the snap runs against the core22 base filesystem, not the host’s, so a compiler the user installed with apt or under their home is not reachable as an executable with its own libraries; no interface exposes the host’s toolchains. That is the need the IDEs category covers.

    The app also opens notes in any folder the user chooses, including folders outside $HOME and on external drives.

    It runs nothing by itself. Every run is started by the user from a dialog that shows the exact program first. Shell scripts are never run from a note. There is no background service, and it changes no system files. Updates come from the Snap Store; the app’s own updater is off inside a snap.

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

This will not work and is not proper classic packaging, your app can not rely on GTK or anything on the host at all.

snaps, and especially classic snaps, need to ship all runtime deps bundled … you will also need to binary-patch each and every library and binary inside your snap to not accidentally use any libs from the host as this will hard-crash your app with libc errors when run on any system where the basic libc does not match the one of the snaps base, please see the info about RPATH and interpreter handling at the bottom of the page below (familiarize yourself with how patchelf works to mangle interpreter and RPATH settings of all binaries you ship):

In general packaging a classic snap is usually significantly harder than strict and will require you to test on way more platforms during your QA process to assure the app can actually run everywhere … not to mention that a classic snap is usually a lot larger than strict ones since you can not use exisiting extensions and need to bundle pretty much everything (regarding your webkit and gtk requirements my guess would be 100-200MB extra stuff you need to ship in the snap).

1 Like

We have withdrawn the classic request: revision 1 (classic) is rejected and will not be released. Revision 2 is the strict build of the same app; it was rejected by mistake while removing revision 1, and we have requested a manual review on it.

1 Like