Skip to content

fix(publish): import libexif and ghostscript for libgphoto2 and libppd - #269

Merged
hanthor merged 1 commit into
mainfrom
import/libgphoto2-libppd-runtime
Sep 26, 2026
Merged

hanthor merged 1 commit into
mainfrom
import/libgphoto2-libppd-runtime

Conversation

@hanthor

@hanthor hanthor commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Why

Utah's image build installs from the published factory repository plus Hummingbird. Fedora is not visible there. Two factory recipes had been getting runtime dependencies from Fedora 44 in the build root:

  • libgphoto2 links libexif.so.12 and liblockdev.so.1.
  • libppd Requires ghostscript >= 10.0.0. libcupsfilters also links libexif.so.12 and BuildRequires ghostscript.

Imported from Fedora Rawhide (2 recipes)

Each recipe was imported with tools/import_rawhide.py. Each Source0 is the upstream release, and its bytes match the SHA-512 in the imported sources file. The Fedora lookaside appears only in fallback_urls. tools/source_pipeline.py accepts both.

Recipe Stage Why at that stage Source0
libexif 0.6.26 0 no factory BuildRequires https://github.com/libexif/libexif/releases/download/v0.6.26/libexif-0.6.26.tar.bz2
ghostscript 10.08.0 1 git, lcms2, openjpeg (0) https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10080/ghostscript-10.08.0.tar.xz

lockdev: not imported, disabled in libgphoto2 instead

No upstream serves lockdev's source:

  • Fedora builds a 2011 alioth nightly snapshot, lockdev-1.0.4.20111007git.tar.gz, and pins it by MD5 only.
  • alioth is gone, and the Wayback Machine has no copy.
  • Debian stopped at 1.0.3 and dropped the package after jessie.

#249 made the same call for ffmpeg's libqrencode and openal. libgphoto2 therefore drops lockdev-devel and configures with --disable-lockdev --disable-ttylock. These flags stop configure from finding Fedora 44's lockdev-devel if something else pulls it into the root. lockdev only locks legacy RS-232 camera ports. USB and PTP/IP cameras never use it, and Fedora's flatpak build leaves it out the same way.

Other options, if serial-port locking is wanted:

  • use the lookaside tarball as the primary url, which breaks the source rule;
  • write a tools/generated_sources.py entry, but there is no pinned upstream input to generate it from.

ghostscript trims

Fedora's spec has no switches for these, so I added bconds. Each one is off, and a comment in the spec says why. The runtime Requires of Fedora 44's ghostscript, libgs and subpackages were checked against Hummingbird (dnf repoquery --repo public-hummingbird-x86_64-rpms) and packages/.

bcond (off) Pulled in at runtime Choice
system_resources urw-base35-fonts, adobe-mappings-cmap (and -deprecated), adobe-mappings-pdf, google-droid-sans-fonts: none is in Hummingbird or the factory Use the Resource/ fonts, CMaps and DroidSansFallback that ship in the tarball, instead of symlinking to and Requiring the four data packages. License gains Apache-2.0, BSD-3-Clause and MIT for the bundled files.
system_jbig2dec_ijs libjbig2dec.so.0, libijs-0.35.so: in neither Build the bundled jbig2dec and ijs. JBIG2 decoding and the ijs device keep working, and the version check between libgs and jbig2dec always matches.
libpaper libpaper.so.2: in neither --without-libpaper. It only reads the default paper size from /etc/papersize, and CUPS passes the page size explicitly.
gtk, x11 gtk3/cairo/libXt: the factory has them --disable-gtk --without-x. Drops the ghostscript-gtk (gsx) viewer and the X11 devices. Nothing in the Utah contract uses them, and they would put ghostscript, libppd and cups-filters behind gtk3 and libXt in the build order. RHEL builds --without-x too.
dvipdf texlive-dvips: in neither Drops ghostscript-tools-dvipdf.

The rest stays: ghostscript (gs, gsnd, ps2pdf and so on), libgs with the cups raster device, libgs-devel, -tools-fontutils, -tools-printing, -doc and pdf2dsc.

After the trims, libgs links glibc, cups-libs, fontconfig, freetype, libjpeg-turbo, libpng, libtiff and zlib-ng, all from Hummingbird, plus lcms2 and openjpeg from the factory. Fedora 44's libgs links neither libidn2 nor dbus, and Hummingbird has both anyway.

The runtime closures of libexif and lockdev in Fedora 44 are satisfied by Hummingbird: libexif needs only glibc; lockdev needs glibc, systemd and group(lock) from setup.

Stage bumps

Recipe Before After Why
libgphoto2 none (0) 1 BuildRequires libexif (0); gvfs stays at 3
libcupsfilters 0 2 BuildRequires ghostscript (1) and libexif (0)
libppd 1 3 libcupsfilters (2), ghostscript (1)
cups-filters, cups-browsed 2 4 libppd (3)

The other factory consumers of libexif are gstreamer1-plugins-bad-free and localsearch, both already at stage 4. The waves are solved from BuildRequires anyway, so these numbers only keep the lock consistent.

Validation

  • In quay.io/fedora/fedora:44 with config/hummingbird.repo, every BuildRequires of ghostscript, libexif, libgphoto2 and libppd resolves. None needs a compat package or Rust crates, and ghostscript already builds with -std=gnu17.
  • rpmspec -q / -P with the new bconds gives the expected subpackages and configure line.
  • just check passes up to pytest, which is not installed on the host. uvx pytest tests -q: 616 passed.
  • tools/source_pipeline.py accepts both sources.
  • The count moves from 397 to 399 in the tests and docs/architecture.md (89 of 399 recipes now carry a hand-assigned stage).
  • docs/skills/repeated-mistakes.md §17 now includes ghostscript and libexif in the printing closure.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv

Utah's image build installs from the published factory repository plus
Hummingbird, and Fedora is not visible there. Two factory recipes had been
resolving runtime dependencies from Fedora 44 in the build root:

- libgphoto2 links libexif.so.12 and liblockdev.so.1
- libppd Requires ghostscript >= 10.0.0 (libcupsfilters also links
  libexif.so.12 and BuildRequires ghostscript)

Import the Fedora Rawhide recipes for libexif (0.6.26) and ghostscript
(10.08.0). Each Source0 is the upstream GitHub release, whose bytes match the
SHA-512 in the imported `sources` file; the Fedora lookaside is a fallback
only.

lockdev is not imported. Fedora builds a 2011 alioth nightly snapshot pinned
by MD5 only; alioth is gone, Debian dropped lockdev after jessie at 1.0.3, and
no upstream serves those bytes. As ffmpeg did for libqrencode and openal
(#249), libgphoto2 drops lockdev-devel and configures with --disable-lockdev
--disable-ttylock. lockdev only locks legacy RS-232 camera ports.

Trim ghostscript so libgs's runtime closure is Hummingbird plus the factory
(lcms2, openjpeg). New bconds, each explained in the spec:

- system_resources 0: ship the Resource/ fonts, CMaps and DroidSansFallback
  from the tarball instead of symlinking to (and Requiring)
  urw-base35-fonts, adobe-mappings-cmap/-pdf and google-droid-sans-fonts,
  none of which is in Hummingbird. License gains Apache-2.0, BSD-3-Clause
  and MIT for the bundled files.
- system_jbig2dec_ijs 0: build the bundled jbig2dec and ijs; libjbig2dec and
  libijs are in neither repository. JBIG2 and the ijs device still work.
- libpaper 0 (--without-libpaper): libpaper.so.2 is in neither repository,
  and CUPS passes the page size explicitly.
- gtk 0 / x11 0 (--disable-gtk --without-x): the gsx viewer and X11
  devices are unused, and they would put ghostscript, libppd and
  cups-filters behind gtk3 and libXt in the build order.
- dvipdf 0: ghostscript-tools-dvipdf Requires texlive-dvips.

The cups raster device, gs, libgs, fontutils, printing tools and docs stay.

Stages: libexif 0; ghostscript 1 (git, lcms2, openjpeg). libgphoto2 now
BuildRequires a factory libexif, so it gets stage 1 (gvfs stays at 3).
libcupsfilters BuildRequires ghostscript and libexif, so it moves 0 -> 2,
libppd 1 -> 3, and cups-filters and cups-browsed 2 -> 4.

The recipe set grows from 397 to 399, so update the count assertions and
docs/architecture.md, and record the printing closure in
docs/skills/repeated-mistakes.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv
@hanthor
hanthor merged commit 31f2f22 into main Sep 26, 2026
63 checks passed
hanthor added a commit that referenced this pull request Sep 26, 2026
#278)

Utah's image build against d5455dc1 (utah #282) found two runtime gaps:

- libcupsfilters links libpdfio.so.1 and nothing in the factory or
  Hummingbird provides it. Import Fedora Rawhide pdfio 1.6.5; Source0 is the
  upstream GitHub release (michaelrsweet/pdfio), whose bytes match the
  SHA-512 in the imported sources file, the lookaside a fallback, and the
  detached .sig comes from the lookaside and is checked by the spec's
  gpgverify. No stage: waves are solved from BuildRequires, which put it
  before libcupsfilters. Only libcupsfilters needs it: its devel Requires
  pkgconfig(pdfio); libppd and cups-filters reach pdfio only through it.
- libgphoto2-2.5.33-4 still required liblockdev.so.1. #269 dropped lockdev
  at the same Release, the run that would have built it was cancelled, and
  the first state label then recorded the new recipe as published. Release
  5 so it rebuilds.

Recipe count 399 -> 400 in tests and docs.


Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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