Skip to content

new(github.com/zchunk/zchunk): reference C zchunk tooling#13113

Open
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/github.com/zchunk-and-deps
Open

new(github.com/zchunk/zchunk): reference C zchunk tooling#13113
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/github.com/zchunk-and-deps

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

Adds the reference C implementation of the zchunk container format — the format Fedora's DNF/librepo uses to ship repository metadata via delta-downloaded chunks over HTTP range requests.

The PR bundles two related recipes:

  • github.com/zchunk/zchunk — ships zck, unzck, zck_delta_size, zck_gen_zdict, zck_read_header, zckdl. meson build; runtime deps openssl, zstd, libcurl.
  • github.com/argp-standalone/argp-standalone — tiny static GNU argp port, required at build time on systems whose libc lacks argp.h (macOS, *BSD). On glibc Linux the dep is unused (zchunk's meson check picks libc's argp), but declaring it unconditionally is harmless since pkgx pantry doesn't support conditional dependencies in the dependency graph.

Both recipes built and tested locally (darwin/aarch64); the zchunk test round-trips a small file through zckunzck.

Refs: zchunk/zchunk, argp-standalone/argp-standalone, homebrew/zchunk@1.5.3, homebrew/argp-standalone.

Adds the reference C implementation of the zchunk container format
(used by Fedora's DNF/librepo for delta-downloaded repo metadata), with
its build-time dependency argp-standalone for non-glibc systems.

zchunk ships zck/unzck/zck_delta_size/zck_gen_zdict/zck_read_header/zckdl;
runtime deps are openssl, zstd and libcurl. argp-standalone is a tiny
meson/static-lib port of GNU argp for systems whose libc lacks argp.h
(macOS, *BSD); on glibc Linux zchunk falls back to libc's argp and the
extra dep is unused.

Refs zchunk/zchunk and argp-standalone/argp-standalone.
Darwin CI was failing because zchunk's build-time dep
github.com/argp-standalone/argp-standalone is brand new in this PR
and not yet published to dist.pkgx.dev — the resolver 404s when
hydrating darwin deps. Linux passes because the dep is darwin-scoped
and glibc supplies argp.h directly.

Drop the explicit pantry dep and lean on zchunk's own
subprojects/argp-standalone.wrap. The upstream wrap is wrap-git
(needs git + network at meson-setup); rewrite it to wrap-file so
meson fetches a sha256-verified tarball and builds argp-standalone
as a subproject — fully from source, no vendoring, no prebuilts.

Linux glibc never touches this path (zchunk's cc.links argp probe
succeeds, the dep is never requested), so --force-fallback-for is
a no-op on linux.
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