Skip to content

feat: bring back video and audio file previews by bundling their Rust libraries - #995

Merged
Danathar merged 2 commits into
mainfrom
fix/527-vendor-gst-thumbnailers
Nov 14, 2026
Merged

Danathar merged 2 commits into
mainfrom
fix/527-vendor-gst-thumbnailers

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary: This brings back the package that draws preview pictures for video and audio files in the file manager. It was set aside because it is written in Rust, and the base system we build on has none of the Rust libraries it needs. Following the maintainers' decision, the package now carries its own copy of those libraries. That copy is checked against fixed fingerprints, so the build cannot pick up anything unexpected. The earlier attempt stalled because the build container lacked the Rust packaging tool. This version doesn't need that tool, so nothing has to change in any container.


Why this approach

The ruling on #527 was to bundle the Rust dependencies with each package that needs them (cargo vendor --versioned-dirs, SHA-512-locked, %bcond bundled_rust_deps 1), not to package the gtk-rs/clap crate stack. papers, glycin and librsvg2 use Fedora's lookaside vendor tarball, but Fedora publishes none for gst-thumbnailers. The earlier attempt (mendezr:fix/527-vendor-thumbnailer-deps) tried to run cargo vendor in the pinned Packit image and failed because that image has no cargo.

This repository already has a cargo-free equivalent: tools/generated_sources.py reproduces the cargo vendor --versioned-dirs layout from a release's own Cargo.lock in pure Python. Each .crate is checked against its lock SHA-256 and .cargo-checksum.json is regenerated. prefixdevname has used it since #819. This PR reuses it instead of adding a toolchain to an image.

One difference from the ruling's wording: the vendor tree lives inside a generated Source0 (gst-thumbnailers-1.1.0-vendored.tar.xz), not a separate Source1. Here a second sources line can only come from a dist-git lookaside (see docs/skills/supply-chain-provenance.md), and Fedora has nothing for this package there. So the factory-generated archive has to be the primary source, as it is for prefixdevname. It is still SHA-512-locked in both packages/gst-thumbnailers/sources and config/upstream-sources.json, and the recipe still uses %bcond bundled_rust_deps 1 and %cargo_prep -v vendor.

What changed

  • tools/generated_sources.py: the prefixdevname transform and generate steps become _cargo_vendored_transform / _cargo_vendored_generate. The release is opened with r:*, so both .tar.gz and .tar.xz work. A gst-thumbnailers generator is added, with the GNOME 1.1.0 release pinned by SHA-512.
  • packages/gst-thumbnailers/: the recipe deferred in b11e4d3 is restored from Fedora Rawhide 82da00d0, plus the bundled_rust_deps bcond, %cargo_vendor_manifest and cargo-vendor.txt.
  • Fedora patch 0003 is dropped. It moved libglycin-rebind to 0.2.0-beta to match Rawhide's crate RPMs, which would need a new Cargo.lock, and only cargo can resolve one. The released lock pins libglycin-rebind 0.1.0, whose -sys crate requires glycin-2 >= 2, and the factory ships glycin 2.2.2. A # Utah: comment records this. Patch 0002 (drop criterion) is kept: removing a dependency only prunes the lock, which cargo does offline.
  • Lock entry, .packit.yaml block (render_packit_config.py --write), and the backlog catalog moved from long-tail to [resolved].
  • Skills: lane-validation.md now states the ruling instead of "needs a decision". supply-chain-provenance.md covers cargo-free vendoring, when a Fedora version-bump patch has to be dropped, and how to move the version.

Evidence

  • Generated twice locally from the pinned inputs, byte-identical both times: sha512 8645e766…891114, 11,829,200 bytes, 130 crates, all from crates.io with lock checksums.
  • prefixdevname, regenerated through the shared code, still reproduces its pinned digest 223679b0…0c13f1, so its output did not change.
  • New tests in tests/test_generated_sources_generate.py (GstThumbnailersGenerateTests) cover: metadata, an unpinned version failing before any download, a re-rolled release failing before any crate download, the vendored layout from a .tar.xz, byte reproducibility, and a swapped crate failing closed.
  • Not verified locally: the RPM build itself, and whether the buildroot's Rust meets the crate's rust-version = "1.93". The hermetic lane is the verdict for both.

Closes #527

🤖 Generated with Claude Code

— hive: agent=scanner backend=claude model=claude-opus-5-5


🐝 Hive Agent: contributor | SHA: 7ca92b1e

Danathar and others added 2 commits November 14, 2026 03:04
… bundled

Hummingbird ships no Rust crate RPMs, so gst-thumbnailers could not
resolve crate(gio), crate(glib) or crate(clap) and was deferred. Per the
maintainer ruling on #527, vendor per recipe instead of packaging the
gtk-rs/clap crate stack.

Fedora publishes no vendor tarball for gst-thumbnailers, and the buildroot
image has no cargo. The pure-Python vendoring prefixdevname already uses
needs neither: it reproduces the `cargo vendor --versioned-dirs` layout from
the release's own Cargo.lock, checking every crate against its lock
checksum. Share that code, open the release with `r:*` so a GNOME .tar.xz
works, and generate gst-thumbnailers-1.1.0-vendored.tar.xz as Source0
(SHA-512 locked; two runs byte-identical). prefixdevname's output is
unchanged: it still reproduces its pinned digest.

Fedora's patch 0003 is dropped: it moved libglycin-rebind to 0.2.0-beta to
match Rawhide's crate RPMs, which would need a new Cargo.lock. The released
lock pins 0.1.0, which accepts any glycin-2 >= 2, and the factory ships
glycin 2.2.2.

Assisted-by: Claude Opus 5.5 via Claude Code
Hive-Run: #527
Hive-Plan: per-recipe-rust-vendoring
Hive-Spec: issue-527#approved-direction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Assisted-by: Claude Opus 5.5 via Claude Code
Hive-Run: #527
Hive-Plan: per-recipe-rust-vendoring
Hive-Spec: issue-527#approved-direction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: contributor | SHA: 0325337e

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 14, 2026
@Danathar
Danathar merged commit 4387c4a into main Nov 14, 2026
175 checks passed
hanthor pushed a commit that referenced this pull request Nov 16, 2026
…aries (#1015)

Since gst-thumbnailers moved to bundled Rust crates (#995), the build no
longer runs %cargo_generate_buildrequires, so nothing installs the
rust-*-sys-devel crate RPMs that pulled in gstreamer1-plugins-base-devel
on Fedora. The vendored gstreamer-video-sys crate then failed in %build
looking for gstreamer-video-1.0 (run 43630433541). Require the two
plugins-base modules the vendored -sys crates link: gstreamer-video-1.0
and gstreamer-app-1.0. The other -sys crates in Cargo.lock are covered by
the existing glycin-2 and gstreamer-1.0 requirements or are target-only.

Record the failure class in the build-failure-triage skill.

Refs: #1000

Assisted-by: Claude Opus 5.5 via Claude Code
Hive-Run: #1000
Hive-Plan: factory-packages-failing-on-main
Hive-Spec: build-failure-triage#classifying-the-failure

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: mergeraptor[bot] <267480593+mergeraptor[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity(codecs): Rust gtk-rs crate stack blocks gst-thumbnailers (needs gio/glib/clap providers)

1 participant