From 2529b8d337f350d951af2177279d92b3b722a3c2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 30 May 2026 18:54:02 +0200 Subject: [PATCH] new(librsync.github.io): rsync remote-delta algorithm + rdiff CLI LGPL-2.1+ library implementing the rsync rolling-checksum delta algorithm (signature/delta/patch), plus the `rdiff` reference CLI used for librsync interop. CMake build, depends on rpm.org/popt at runtime. --- projects/librsync.github.io/package.yml | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 projects/librsync.github.io/package.yml diff --git a/projects/librsync.github.io/package.yml b/projects/librsync.github.io/package.yml new file mode 100644 index 0000000000..b9ce268cd3 --- /dev/null +++ b/projects/librsync.github.io/package.yml @@ -0,0 +1,47 @@ +distributable: + url: https://github.com/librsync/librsync/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +# Library that implements the rsync remote-delta algorithm (signature / delta / +# patch). Ships the `rdiff` CLI used as the reference for librsync interop. + +versions: + github: librsync/librsync/tags + strip: + - /^v/ + +dependencies: + rpm.org/popt: ^1 + +build: + dependencies: + cmake.org: ^3 + ninja-build.org: ^1 + script: + - cmake -S . -B build $ARGS + - cmake --build build --parallel {{ hw.concurrency }} + - cmake --install build + env: + ARGS: + - -GNinja + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DBUILD_RDIFF=ON + - -DENABLE_TESTS=OFF + +provides: + - bin/rdiff + +test: + env: + RDIFF: "{{prefix}}/bin/rdiff" + script: + - $RDIFF -V | grep -F {{version}} + # round-trip: signature -> delta -> patch + - head -c 65536 /dev/urandom > basis.bin + - cp basis.bin new.bin + - printf 'edit' >> new.bin + - $RDIFF signature basis.bin basis.sig + - $RDIFF delta basis.sig new.bin new.delta + - $RDIFF patch basis.bin new.delta out.bin + - cmp new.bin out.bin