Bug 283817 - sysutils/rsyncrypto: adopt port, improve Makefile
Summary: sysutils/rsyncrypto: adopt port, improve Makefile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Zsolt Udvari
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-03 13:44 UTC by Älven
Modified: 2025-01-08 09:55 UTC (History)
1 user (show)

See Also:
alster: maintainer-feedback+


Attachments
[PATCH] sysutils/rsyncrypto: adopt port, slightly improve Makefile (1.19 KB, patch)
2025-01-03 13:44 UTC, Älven
alster: maintainer-approval+
Details | Diff
add TEST_TARGET (1.01 KB, patch)
2025-01-03 19:46 UTC, Zsolt Udvari
no flags Details | Diff
[DRAFT][PATCH] sysutils/rsyncrypto: adopt port, improve Makefile (1.87 KB, patch)
2025-01-03 22:51 UTC, Älven
no flags Details | Diff
[PATCH] sysutils/rsyncrypto: adopt port, improve Makefile (6.81 KB, patch)
2025-01-07 23:10 UTC, Älven
alster: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Älven 2025-01-03 13:44:48 UTC
Created attachment 256373 [details]
[PATCH] sysutils/rsyncrypto: adopt port, slightly improve Makefile
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-03 19:46:57 UTC
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?
Comment 2 Älven 2025-01-03 22:31:13 UTC
(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
Comment 3 Älven 2025-01-03 22:51:55 UTC
Created attachment 256398 [details]
[DRAFT][PATCH] sysutils/rsyncrypto: adopt port, improve Makefile

A draft. It builds, but need review.
Comment 4 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-06 14:54:17 UTC
(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.
Comment 5 Älven 2025-01-07 23:10:21 UTC
Created attachment 256522 [details]
[PATCH] sysutils/rsyncrypto: adopt port, improve Makefile
Comment 6 Zsolt Udvari freebsd_committer freebsd_triage 2025-01-08 06:47:22 UTC
Great work! Committed, thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-01-08 06:47:33 UTC
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(-)
Comment 8 Älven 2025-01-08 09:55:29 UTC
(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!