Skip to content

feat(open-pdf-studio): add Open PDF Studio, a PDF editor for drawings (org.openaec.OpenPdfStudio) - #1079

Merged
jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:add/org.openaec.OpenPdfStudio
Nov 8, 2026
Merged

jing2uo merged 2 commits into
flatpark:mainfrom
3ddruck12:add/org.openaec.OpenPdfStudio

Conversation

@3ddruck12

@3ddruck12 3ddruck12 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds Open PDF Studio 2026.45.0 (org.openaec.OpenPdfStudio), a PDF editor for drawings.
  • The release has no plain Linux tarball. The payload is the official Open.PDF.Studio_2026.45.0_amd64.deb, unpacked with bsdtar --no-same-owner. The usr/bin and usr/lib/Open PDF Studio layout is kept so Tauri finds PDFium and the OCR data. It runs on org.gnome.Platform//51. The Linux build is not rebuilt.
  • The resolver takes the highest version that ships Open.PDF.Studio_<version>_amd64.deb.
  • upstream.manifest points at flatpak/org.openaec.OpenPdfStudio.yml. Against tag v2026.45.0 the drift check reports no difference.

Sandbox

  • Shared: IPC, Wayland with X11 fallback, GPU, network for optional sign-in and the symbol library, and the CUPS socket so the printer list can fill.
  • The binary does not register its updater when /.flatpak-info is present, so updates come through FlatPark. Managed mode is not set.
  • Files are opened and saved through the file chooser. There is no filesystem grant.
  • A second launch owns org.openaec.openpdfstudio.SingleInstance and hands its file to the running window.

Tested

  • Descriptor audit, appstreamcli validate --no-net, the resolver (2026.45.0, that deb), and check-upstream-manifests.mjs against the v2026.45.0 manifest (no drift). check-apply-extra unpacked the archive as root with no capabilities.
  • publish.sh --verify built this revision and installed it from the local signed repo.
  • The installed app has no OPENAEC_BEHEERD. The startup log said managed=false. The optional MCP listener stayed on 127.0.0.1.
  • The window opened a bundled title-block PDF. WM_CLASS is Open-pdf-studio.
  • No print job was sent.

Flathub

Not published on Flathub. org.openaec.OpenPdfStudio returns 404 from the Flathub appstream API.

Closes #727

@jing2uo

jing2uo commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Review: org.openaec.OpenPdfStudio (head f998b25b)

Recommendation: PASS once two changes land. Nothing hits a hard-fail rule. The payload is the official deb, unmodified. The bundled PDFium and OCR data are byte-identical to their upstream sources. Before merge:

  1. Drop --env=OPENAEC_BEHEERD=1. The upstream binary already turns its updater off inside a Flatpak, so this flag adds nothing, and it changes two other things. Details below.
  2. Add an upstream: block. Upstream keeps its own Flatpak manifest at flatpak/org.openaec.OpenPdfStudio.yml. With the env removed, its finish-args match this package exactly, so the drift check has nothing to report today and will catch later changes (permissions.md).

The PR body also needs Closes #727. I added it.

Requested change 1: OPENAEC_BEHEERD=1 is redundant and has side effects

From upstream source at tag v2026.45.0:

  • open-pdf-studio/src-tauri/src/lib.rs:3205-3207 registers tauri_plugin_updater only if !beheerd && !linux_runtime::running_in_flatpak(). running_in_flatpak() checks /.flatpak-info (linux_runtime.rs:57-60). Without the env, the updater is still off. Help > Check for updates then shows a Flatpak-specific message (js/ui/chrome/updater.js:150, updates_managed_externally() at lib.rs:288).
  • The default-PDF-app bar already handles Flatpak: standaard_app.rs:51-52, where linux_status(Some("flatpak"), …) gives canSet:false.
  • What managed mode does in addition:
    • It hides the "What's new" dialog after an update (js/core/beheerd.js ONDERDRUKT_IN_BEHEERDE_MODUS, used in js/help/whats-new-trigger.js:35). FlatPark users then never see release notes.
    • It changes the default MCP bind address from 127.0.0.1 to 0.0.0.0 (openaec_omgeving.rs:59-63, 251). The MCP server only starts when a user sets OPENAEC_MCP_POORT and OPENAEC_MCP_GEHEIM, so this is off by default. But with --share=network, a user who turns it on would expose it on every interface without knowing. That mode is meant for upstream's per-user SuperCloud containers, not a desktop.

Upstream's own Flatpak manifest does not set this env. Please remove the --env line and update the comment above it (org.openaec.OpenPdfStudio.yml:25-26). The metainfo line "The in-app updater is turned off" stays true. The PR body's "Sandbox" bullet about managed mode should go.

Requested change 2: upstream: drift block

Add to flatpark.yml:

upstream:
  manifest: flatpak/org.openaec.OpenPdfStudio.yml

I ran node scripts/check-upstream-manifests.mjs --app org.openaec.OpenPdfStudio --upstream-file <upstream v2026.45.0 manifest> on this branch with that block added. The only drift was extra-permission --env=OPENAEC_BEHEERD=1. Module names match (open-pdf-studio), and source comparison is skipped for extra-data. With change 1 applied, it reports no drift.

Nits (not blocking)

  • .desktop StartupWMClass=Open-pdf-studio. Upstream's deb and its Flatpak desktop file both use open-pdf-studio. The PR measured Open-pdf-studio as the X11 WM_CLASS, so that may be correct under X11. Please confirm that the dock groups the window under the right icon on a Wayland session too, since that is the default socket.
  • The wrapper forces WEBKIT_DISABLE_DMABUF_RENDERER=1 even with a GPU. Upstream sets it only when /dev/dri/renderD* is missing (openaec_omgeving.rs header). That is fine: it matches the repo's usual pattern, and users can override it.
  • desktop-file-validate hint: Office;Viewer;Graphics; has more than one main category, so the app can appear twice in some menus. This copies upstream and is harmless.
  • runtime-version: "51" while upstream's manifest uses 50. That is fine, since 51 still ships WebKitGTK 4.1 (ldd was clean per the PR).

Check table

# Phase Check Tier Verdict Evidence
0 Safety Static-only; nothing executed; artifacts in an isolated dir ★ ✅ deb, upstream source and the pdfium tgz downloaded as bytes into a scratch dir. Listed before extracting, then extracted --no-same-owner --no-same-permissions. No binary, apply_extra or resolver was run. The resolver's jq query was re-implemented with my own gh api … | jq
1.1 Scope Classified ★ ✅ New app: 8 files, all under registry/org.openaec.OpenPdfStudio/
1.2 Scope High-scrutiny surface? ★ ✅ No .github/, scripts/ or config/ changes. resolve-update.sh is in a brand-new app dir, which is routine
2.1 Provenance Submitter ★ ✅ 3ddruck12: account from 2021-05, 34 public repos, 12 merged FlatPark PRs (#582, #629, #634, #793, #815, #852, #907, #930, #934, #969, #970, …)
2.2 Provenance Source repo ★ ✅ OpenAEC-Foundation/open-pdf-studio: org-owned, created 2026-01-22, 1021★, 102 forks, LGPL-3.0. Release assets uploaded by github-actions[bot]
2.3 Provenance Commit identity ★ ✅ 3ddruck <[email protected]> + Co-authored-by: Cursor. Same identity as the merged #934 and #970
2.4 Provenance Timeline ★ ✅ Repo is 10 months old, with releases most days. The submitter's account long predates it
2.5 Provenance Trust tier ★ ✅ Established
2.6 Provenance Artifact tier ★ ✅ Tier 1, open source (LGPL-3.0-or-later)
3.1 Manifest Source types ★ ✅ One extra-data source with sha256 and size: 55840290 (.yml:38-44). The other sources are 5 local file sources. No archive or git
3.1b Manifest Nothing remote in /app ★ ✅ The only module is buildsystem: simple, which installs in-repo files (.yml:31-35)
3.2 Manifest finish-args ★ ✅ ipc, wayland, fallback-x11, dri, network, cups, --own-name=org.openaec.openpdfstudio.SingleInstance, env. No filesystem grant and no escape perms. The set equals upstream's Flatpak manifest except the env (see change 1)
3.3 Manifest policy: honest ★ ✅ proprietary: false is correct (LGPL). dangerous_permissions: [] is correct
3.4 Manifest build-commands install-only; payload unmodified ★ ✅ apply_extra.sh:18: bsdtar extracts data.tar* from the deb. Lines 22-25 move usr/, delete the deb and chmod +x two binaries. No patch or sed. The wrapper only sets the WebKit env and execs
3.4b Manifest packaging: declarations ★ ✅ No injected code, no host commands, sandbox not disabled, so nothing to declare. audit-descriptor.mjs exit 0
3.5 Manifest Source URLs genuine ★ ✅ github.com/OpenAEC-Foundation/open-pdf-studio/releases/download/v2026.45.0/…
3.6 Manifest app-id matches vendor ★ ✅ org.openaec.OpenPdfStudio is the same id upstream uses in flatpak/ and its metainfo. Homepage open-aec.com
3.7 Manifest update.command simple ★ ✅ ./resolve-update.sh
3.8 Manifest Download host official ★ ✅ Upstream org's GitHub releases
3.9 Manifest Optional caps not pre-granted ★ ✅ Network (sign-in, symbol library, release notes) and cups (printer list via IPP, print_unix.rs) serve core features, are justified in the PR and in comments, and match upstream's own choices
3.10 Manifest Test record ★ ✅ Audit, appstream validate, resolver, check-apply-extra as root without caps, publish.sh --verify install, ldd, launch, bundled PDF opened. Says plainly that no print job was sent
4.1 Runtime No fetch-and-exec ★ ✅ Updater plugin not registered in Flatpak (lib.rs:3205-3207). No curl/npm/pip in the shipped scripts
4.2 Runtime Resolver read as code ★ ✅ resolve-update.sh: curl of the GitHub releases API with an optional token, then jq. Filters out draft and prerelease, regex-matches Open.PDF.Studio_<ver>_amd64.deb, takes the numeric max_by, prints JSON. No eval and no writes. My own query today returns 2026.45.0 (28 matching releases)
4.3 Runtime Network × filesystem ★ ✅ Network with no filesystem grant. Files come through the portal (GtkFileChooserNative). One latent concern: the MCP bind address under managed mode (change 1)
5.1 Artifact sha256 == pin ★ ✅ Re-fetched 98d362192e497f9a7b6bce97ec987b5eb217b7bb5e31bed8898301d65e931335, 55840290 bytes. Matches the manifest and the GitHub asset digest
5.2 Artifact Inspected per type ★ ✅ deb = debian-binary, control.tar.gz (control + md5sums, no maintainer scripts), data.tar.gz. 51 entries: 24 dirs, 25 regular files, 2 executables. No symlinks, hardlinks, absolute or .. paths, and no setuid/setgid
5.3 Artifact Tier 1: nothing injected 1 ✅ No preload, shim or file replacement. The wrapper only sets env
5.4 Artifact Shipped == official ★ ✅ apply_extra only moves files. The bytes are the official deb
5.5 Artifact Bundled third-party verified ★ ✅ libpdfium.so sha256 fd4de9f9…441e and Build ID df8713e0be95611f are identical to lib/libpdfium.so in bblanchon/pdfium-binaries chromium/8076 pdfium-linux-x64.tgz (tgz d9d67bc4…eca3, the pin upstream's CI and Flatpak manifest use). eng.traineddata 7d4322bd…70b2 and chi_tra.traineddata 529c5b57…330b equal upstream's pinned tessdata_fast commits
5.6 Artifact IOC scan ★ ✅ Strings of open-pdf-studio: no /dev/tcp, xmrig, stratum+ or nc -e. The only IP literal is 127.0.0.1. "autostart" appears only in export_policy.rs, which refuses exports into autostart dirs. No RPATH/RUNPATH in any ELF. The second \x7fELF hit in each binary (@59521707, @3038235) is an immediate in compare code (75 dc jne follows), not a header. NEEDED libs are all GNOME 51 runtime libs
6.1 Compliance Purpose legal ★ ✅ PDF editor
6.2 Compliance Non-FOSS not a reason ★ ➖ FOSS
7.1 Verdict Overall ★ ✅ PASS once changes 1 and 2 land
7.2 Verdict Hard-fail triggers ★ ✅ None
7.3 Verdict Recommend only ★ ✅ A human merges. Note: the pr-checks run for this head is action_required (fork workflow approval) and has not run yet

Files read

  • org.openaec.OpenPdfStudio.yml: every line. Finish-args comments match upstream's reasoning.
  • flatpark.yml: descriptor. No upstream: block (change 2).
  • apply_extra.sh: offline, set -eu, bsdtar with --no-same-owner, sanity checks for the binary and libpdfium.so.
  • open-pdf-studio-wrapper: one env default, then exec of /app/extra/openpdf/usr/bin/open-pdf-studio.
  • .desktop: Exec, MimeType (application/pdf, x-scheme-handler/openpdfstudio, as in upstream's deb). See the nit about StartupWMClass.
  • .metainfo.xml: LGPL-3.0-or-later, developer org.openaec, unaffiliated disclaimer, sandbox paragraph. Screenshots pinned to the v2026.45.0 tag.
  • .png: 512×512 RGBA.
  • resolve-update.sh: read as code (row 4.2).

Reproduce

curl -fsSLo app.deb https://github.com/OpenAEC-Foundation/open-pdf-studio/releases/download/v2026.45.0/Open.PDF.Studio_2026.45.0_amd64.deb
sha256sum app.deb; bsdtar -tvf app.deb
bsdtar -xOf app.deb data.tar.gz | tar -tvzf -
mkdir x && bsdtar -xOf app.deb data.tar.gz | tar -xzf - -C x --no-same-owner --no-same-permissions
readelf -d x/usr/bin/open-pdf-studio | grep -E 'NEEDED|RPATH|RUNPATH'
curl -fsSLo p.tgz 'https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F8076/pdfium-linux-x64.tgz'
tar -xzf p.tgz lib/libpdfium.so && sha256sum lib/libpdfium.so 'x/usr/lib/Open PDF Studio/libpdfium.so'
git clone --depth 1 -b v2026.45.0 https://github.com/OpenAEC-Foundation/open-pdf-studio src
node scripts/check-upstream-manifests.mjs --app org.openaec.OpenPdfStudio --upstream-file src/flatpak/org.openaec.OpenPdfStudio.yml

Not covered

  • The app was not run. The reviewer never executes it, so the launch and printing claims come from the PR's test record.
  • The Rust and JS source was not audited beyond the paths cited above: managed mode, updater, MCP bind, default-app, autostart.
  • The open-pdf-studio and pdfium-worker binaries were not matched against a reproducible upstream build. They are upstream CI output, uploaded by github-actions[bot].
  • Context: upstream closed its Flathub request ([Feature]: Flatpak release (Flathub) for 1-click App Store installations OpenAEC-Foundation/open-pdf-studio#389) as completed on 2026-11-06 and keeps a source-build Flathub manifest in-tree. Nothing is on Flathub yet (the appstream API returns 404, and there is no flathub/flathub PR). Per policy, a later Flathub listing does not remove this package unless the developer asks.

OPENAEC_BEHEERD=1 is redundant: the app skips its updater when
/.flatpak-info exists. Managed mode also hides What's new and binds an
env-enabled MCP server to 0.0.0.0. Without it, finish-args equal
upstream's flatpak/org.openaec.OpenPdfStudio.yml, so name it in upstream:
for the drift check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[app discover] Open PDF Studio

2 participants