Skip to content

new(zsync.moria.org.uk): zsync — rsync-style transfer over plain HTTP#13115

Open
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/zsync.moria.org.uk
Open

new(zsync.moria.org.uk): zsync — rsync-style transfer over plain HTTP#13115
tannevaled wants to merge 2 commits into
pkgxdev:mainfrom
tannevaled:new/zsync.moria.org.uk

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

Adds zsync, the original C reference implementation (Colin Phipps, Artistic-2.0). zsync is a one-sided rsync-style protocol: the client does the rolling-checksum matching locally and pulls only the differing blocks from any plain HTTP server — no special server-side tooling required.

Ships:

  • `zsyncmake` — build a `.zsync` metadata file alongside a release
  • `zsync` — delta-download a remote file using its `.zsync` index

The recipe targets the upstream tarball at zsync.moria.org.uk (currently 0.6.4, released 2026-05-14); the same source line Debian/Ubuntu's `apt-get install zsync` ships. Two CFLAGS workarounds are needed under recent clang in default-strict mode:

  • `-std=gnu89` so the bundled zlib's K&R-style function definitions parse
  • `-D_DARWIN_C_SOURCE -D_GNU_SOURCE` so `timegm()` is declared on macOS / Linux

Both are inline-documented in the recipe. Built and tested locally (darwin/aarch64); the test verifies version banner + `zsyncmake` generates a valid `.zsync` metadata file.

Refs: zsync.moria.org.uk, homebrew/zsync (which packages a Go fork — this recipe sticks with the canonical C reference).

Original C reference implementation of zsync (Colin Phipps, Artistic-2.0)
— a one-sided rsync-style protocol that does the rolling-checksum
matching on the client and pulls only the differing blocks from any
plain HTTP server. Ships zsyncmake (build .zsync metadata) and zsync
(delta-download a target file).

Builds the bundled tarball at zsync.moria.org.uk; pinned to -std=gnu89
plus _DARWIN_C_SOURCE/_GNU_SOURCE so the K&R-style bundled zlib and the
timegm() call compile under recent clang in default-strict mode.
The upstream tarball bundles config.guess/config.sub timestamped 2009-06-10,
which predates the aarch64 triplet, so configure bails out on linux/aarch64
with 'cannot guess build type; you must specify one'. Drop in current FSF
copies (same fix Debian's dh-autoreconf applies).
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