Created attachment 256373 [details] [PATCH] sysutils/rsyncrypto: adopt port, slightly improve Makefile
Created attachment 256391 [details] add TEST_TARGET Added TEST_TARGET and some fixes to use it but 'make test' fails: Testing encryption using existing key: /wrkdirs/usr/ports/sysutils/rsyncrypto/work/rsyncrypto-1.14/rsyncrypto /wrkdirs/usr/ports/sysutils/rsyncrypto/work/rsyncrypto-1.14/tests/reg1 reg1.enc2 /wrkdirs/usr/ports/sysutils/rsyncrypto/work/rsyncrypto-1.14/tests/reg1.key /wrkdirs/usr/ports/sysutils/rsyncrypto/work/rsyncrypto-1.14/tests/cert.key gzip: unrecognized option `--rsyncable' FreeBSD gzip 20190107 usage: gzip [-123456789acdfhklLNnqrtVv] [-S .suffix] [<file> [<file> ...]] -1 --fast fastest (worst) compression -2 .. -8 set compression level -9 --best best (slowest) compression -c --stdout write to stdout, keep original files --to-stdout -d --decompress uncompress files --uncompress -f --force force overwriting & compress links -h --help display this help -k --keep don't delete input files during operation -l --list list compressed file contents -N --name save or restore original file name and time stamp -n --no-name don't save original file name or time stamp -q --quiet output no warnings -r --recursive recursively compress files in directories -S .suf use suffix .suf instead of .gz --suffix .suf -t --test test compressed file -V --version display program version -v --verbose print extra statistics encryption using existing key passed Could you please check and fix it?
(In reply to Zsolt Udvari from comment #1) Thank you for your kind words and real effort to help me. Sure I would like to follow your advice, as you kindly asked me about. Actually, it was me, who was to add TEST_TARGET, I just still can't remember the default TEST_TARGET is empty, not "test", like with INSTALL_TARGET=install. I've studied the situation with --rsyncable flag of gzip, going from the good explanation of the idea [0] to FreeBSD patch [1] later implemented in upstream from version 1.7 [2]. From [3] it became clear: «Gzip from ports works expected. … For the record. Since FreeBSD 10.0. * Gzip from the ports compiles by default with --rsyncable (/usr/local/bin/gzip) * Gzip included in the system doesn't. (/usr/bin/gzip)» So, I could add archivers/gzip as RUN_DEPENDS, but how to make sure it is actually called instead of gzip from base? [0] https://rsyncrypto-devel.narkive.com/QLOHx0XX/gzip-unrecognized-option-rsyncable [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=151721 [2] https://lists.gnu.org/archive/html/info-gnu/2016-03/msg00014.html [3] https://narkive.com/QLOHx0XX.4
Created attachment 256398 [details] [DRAFT][PATCH] sysutils/rsyncrypto: adopt port, improve Makefile A draft. It builds, but need review.
(In reply to Älven from comment #3) Okay, the test passed. But the BINARY_ALIAS doesn't exist after installing the port/package so should patch the source. IMHO can find in the source where call the 'gzip' executable and sed it to ${LOCALBASE}/bin/gzip.
Created attachment 256522 [details] [PATCH] sysutils/rsyncrypto: adopt port, improve Makefile
Great work! Committed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5640fc41d48f8ae4dfe1aeabc09de6f2bdbbefde commit 5640fc41d48f8ae4dfe1aeabc09de6f2bdbbefde Author: Älven <alster@vinterdalen.se> AuthorDate: 2025-01-08 06:42:43 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2025-01-08 06:46:52 +0000 sysutils/rsyncrypto: improving Makefile Requires archivers/gzip. The gzip in FreeBSD doesn't support --rsyncable flag. It requires a patch to use ${LOCALBASE}/bin/gzip. Add TEST_TARGET. Add LICENSE_FILE. Switch to DISTVERSION. Submitter takes maintainership. PR: 283817 sysutils/rsyncrypto/Makefile | 39 ++++++++++++++-------- sysutils/rsyncrypto/files/patch-crypto.cpp (gone) | 16 --------- sysutils/rsyncrypto/files/patch-rsyncrypto.h (new) | 20 +++++++++++ .../rsyncrypto/files/patch-rsyncrypto.man (new) | 17 ++++++++++ sysutils/rsyncrypto/pkg-plist (new) | 4 +++ 5 files changed, 66 insertions(+), 30 deletions(-)
(In reply to Zsolt Udvari from comment #6) Thank you for your kind words! :) I'm always glad to know my that my help is greatly appreciated!