Skip to content

feat(cups-client): add CUPS lp/lpstat/lpoptions stack - #18

Merged
jing2uo merged 1 commit into
mainfrom
feat/cups-client
Nov 5, 2026
Merged

jing2uo merged 1 commit into
mainfrom
feat/cups-client

Conversation

@jing2uo

@jing2uo jing2uo commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Why

The runtimes ship libcups and lpr, not lp/lpstat/lpoptions. Apps whose print dialog shells out to them list no printers. First consumer: WordCraft (flatpark/flatpark#969), which currently compiles CUPS into its own ref — against the rule that a dependency is never built in an app's manifest. Moving it here lets PhotoCraft and the other ArtCraft apps reuse it.

What

  • cups-client.yml, on org.freedesktop.Sdk//26.08, x86_64 aarch64. Same configure/make as upstream's cups-client module (packaging: Flatpak finds and prints to CUPS printers storytold/wordcraft#4909); CUPS 2.4.20 from OpenPrinting, sha256 re-verified.
  • bin/{lp,lpstat,lpoptions} is upstream's socket wrapper, changed only to find libexec/cups/ from its own resolved path, so it works under /app/extra/cups-client/.
  • Consumed as extra-data; consumer symlinks bin/* onto PATH and grants --socket=cups (+ Avahi, ~/.cups:ro as needed). Header comment has the details.

Tested

Local flatpak-builder build (x86_64). In an org.freedesktop.Platform//26.08 sandbox with --socket=cups, the archive laid out as a consumer unpacks it:

  • lpstat -r / lpstat -p -d reach the host scheduler and list its printer
  • ldd: everything resolves from the runtime (avahi-client, gnutls, zlib, …)
  • client.conf with ServerName = mounted socket works; two disagreeing ServerName lines fail with the wrapper's message

Not tested: aarch64 (release workflow builds it), an actual print job.

Next

Run the release workflow on this branch with tag cups-client-v1, then re-pin WordCraft in #969.

The runtimes ship libcups and lpr but not the System V clients, so apps
whose print dialog runs lpstat/lp (craft-print in the ArtCraft apps) list
no printers. Same build as upstream WordCraft's cups-client module, plus
the socket wrapper, packaged as an extra-data stack instead of being
compiled into one app's ref (flatpark/flatpark#969).
@jing2uo
jing2uo merged commit 1a87e65 into main Nov 5, 2026
@jing2uo
jing2uo deleted the feat/cups-client branch November 5, 2026 01:25
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.

1 participant