Classic confinement request for perses

name: perses

description: Perses is a language-agnostic, syntax-directed program reducer used by compiler developers and testing researchers to shrink bug-triggering programs. Given a program and a user-supplied test script, it repeatedly produces smaller candidate programs and runs the test script to check whether each candidate still exhibits the bug. The snap ships one command-line app, perses, which runs the Perses jar with a bundled OpenJDK 17. There are no daemons, services, or setuid binaries. The snap name perses is registered to publisher chengniansun-ubuntu. License: GPL-3.0-or-later.

snapcraft: perses/snap/snapcraft.yaml at master · uw-pluverse/perses · GitHub

upstream: GitHub - uw-pluverse/perses: language-agnostic program reducer. · GitHub

upstream-relation: I am the original author and maintainer of Perses and the lead of the upstream project (uw-pluverse); the snap is the upstream project’s official package.

supported-category: debug tools (Perses is a test-case reduction tool used to debug compilers and other language tools; it drives the user’s compilers and interpreters)

reasoning: Perses’s core operation is to execute the user’s own test script, repeatedly, on each candidate program. In essentially every real use that script invokes toolchains that are not part of the snap: compilers and interpreters such as gcc, clang, javac, rustc and python3, and project-specific build tools on the user’s PATH, often at specific versions the user built themselves to reproduce a compiler bug. The script also reads and writes files at arbitrary paths the user chooses (source trees, temporary build directories, the output folder). Under strict confinement the snap cannot execute host binaries at all, and filesystem access is limited to what home/removable-media expose, so the test script cannot run its toolchain or reach the files being reduced. No fixed set of interfaces covers “run any compiler the user has installed against any file the user points at”, and bundling the toolchains is not possible because the whole point is to reduce against the user’s own (frequently locally built, bug-exhibiting) compiler. This is the same requirement as the classic developer tools that run arbitrary user-provided commands and toolchains.

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 request has been added to the queue for review by the @reviewers team.

Hello @chengniansun,

The technical reasoning here feels sound, and I believe this falls cleanly under the supported category of ‘debug tools’. We noticed you do not currently have any revisions of perses pending in the snap store, would you be able to push a first revision to help support the review? Thank you.

Thank you, @elisehdy. Revision 2 of perses (version 2.7, amd64) is now uploaded and waiting in manual review; the only flag on it is classic confinement. Please disregard revision 1: the automated review rejected it for an external cacerts symlink in the bundled JDK, which is fixed in revision 2. The snap packages the perses_deploy.jar attached to the upstream v2.7 GitHub release, so its contents match the published release.

Great, thank you!

One important aspect of publishing and a maintaining a classic snap is insuring it fulfills the promise of working on any distro where snapd runs. Can you describe for me how you approach this testing and validation for the perses project?