From nobody Wed Jan 8 06:47:23 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YSdkz4lhWz5jm2F; Wed, 08 Jan 2025 06:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSdkz43fSz43Jy; Wed, 8 Jan 2025 06:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736318843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u10a9cKN372/bXpDSAHG8QdhFKNAOn3kZv+Lur3ikKA=; b=YD3sCIVL0h2h2kWpnOo75rlaGynMh2XXJxs4ZxVSAny40/en7XFqhcaqkcBWg2nHo6r13p h4NXQmKz2Lx65/wofB6WU/iaXTA4+zqWNt+MptMyA8/rOKOrCay9heTBGi53t5i2f5tR8q zZWDx0/OTqitvNn0XuID/AXGLuB+ZD9qXHu9YTqNNr52qYqiEhoJATH+Isn6LUBTTm7uNl EQELdxN9kuWgoC14rpCvWj8xvsO6xLmNRFeVBO/fTuMb1drlHZoaYX4HOQqPKJtfh3/BtH tbPuwxwgJmk23hMzvq6KHJFoRRN+WpM87ATTHhxdNeNi5DwaUWqy0mgAwhOrzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736318843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u10a9cKN372/bXpDSAHG8QdhFKNAOn3kZv+Lur3ikKA=; b=Ntmico0exl94LEDahV5c2CVp00Vnj6MdfXFMeuXGmz/vuS6iFca0wbxuDYUIM7UbPBFq03 b6r5Rw18n57/gh4Y6TRonmBqT5yDhvhPVJta0LC5O2kqapShm3hrVKWXpn4E8FZtavNhXt QR6QIMZsmxe6HLeTzJhiHtrXXsaUNcKgl3ABPSYW7aGtVNE+vY0RdYRB/Kx1bPF+ppP89k OzC14VgaP6EOJHPEpuucWvdyfpQ2c1jvTLuiCD14jhjvBwcx9EnMxmMRhILE9nrTMHlHcW tSfU0ro403h9AH4xUg7a9pXp8U1jSMEjkviyAyO+YqfTH4Zv0Tg/m/nQSPwHlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736318843; a=rsa-sha256; cv=none; b=vrb+H3jD8rL9CstA7Mv+TOsyGbyvUKYut6BErzWooWrnr+MVg3ls+dH0EBjlBzZt0vCK0O LjLzzhbduDHbuuybAPT+zmd5HUMZWX54H/kkG62bu+cgPpkrQIUvgXK8Ftti9NxyeCS0Xt xZQZxKnTTysyZRleq3sIHpvnM2koHF31ttps6/HV2HGIehg94DJyLBjkVMUMV5YoGKITSV GL2ql4btvxIiGuSdBOSYtAy2GmqtIYMz+VBO/SfZCHCeqtLwO6h7ikuSojoT9lTRHNsqSi +5OeZgfExFfxQ7Cs8siBhyQ0QJmGANmj3ew/DVutXsq4vqhPt8Eg4UZ7KRAYUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YSdkz37kFzlgP; Wed, 08 Jan 2025 06:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5086lNhL031874; Wed, 8 Jan 2025 06:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5086lN2K031871; Wed, 8 Jan 2025 06:47:23 GMT (envelope-from git) Date: Wed, 8 Jan 2025 06:47:23 GMT Message-Id: <202501080647.5086lN2K031871@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Zsolt Udvari Subject: git: 5640fc41d48f - main - sysutils/rsyncrypto: improving Makefile List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: uzsolt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5640fc41d48f8ae4dfe1aeabc09de6f2bdbbefde Auto-Submitted: auto-generated The branch main has been updated by uzsolt: URL: https://cgit.FreeBSD.org/ports/commit/?id=5640fc41d48f8ae4dfe1aeabc09de6f2bdbbefde commit 5640fc41d48f8ae4dfe1aeabc09de6f2bdbbefde Author: Älven AuthorDate: 2025-01-08 06:42:43 +0000 Commit: Zsolt Udvari 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 | 16 ----------- sysutils/rsyncrypto/files/patch-rsyncrypto.h | 20 +++++++++++++ sysutils/rsyncrypto/files/patch-rsyncrypto.man | 17 +++++++++++ sysutils/rsyncrypto/pkg-plist | 4 +++ 5 files changed, 66 insertions(+), 30 deletions(-) diff --git a/sysutils/rsyncrypto/Makefile b/sysutils/rsyncrypto/Makefile index ad8639383eca..c34f6245c83e 100644 --- a/sysutils/rsyncrypto/Makefile +++ b/sysutils/rsyncrypto/Makefile @@ -1,36 +1,47 @@ PORTNAME= rsyncrypto -PORTVERSION= 1.14 -PORTREVISION= 2 +DISTVERSION= 1.14 +PORTREVISION= 3 CATEGORIES= sysutils net MASTER_SITES= SF -MAINTAINER= ports@FreeBSD.org +MAINTAINER= alster@vinterdalen.se COMMENT= Rsync Friendly File Encryption -WWW= https://rsyncrypto.lingnu.com/ +WWW= https://rsyncrypto.lingnu.com/ \ + https://sourceforge.net/projects/rsyncrypto/ LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING +BUILD_DEPENDS= ${GZIP_DEPENDS} LIB_DEPENDS= libargtable2.so:devel/argtable -RUN_DEPENDS= rsync:net/rsync +RUN_DEPENDS= ${GZIP_DEPENDS} \ + rsync:net/rsync +TEST_DEPENDS= ${GZIP_DEPENDS} \ + bash:shells/bash + +USES= compiler:c++11-lang gmake localbase shebangfix ssl tar:bzip2 + +SHEBANG_FILES= tests/regtest -USES= compiler:c++11-lang gmake localbase ssl tar:bzip2 GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX=${PREFIX}/share -PLIST_FILES= bin/rsyncrypto \ - bin/rsyncrypto_recover \ - share/man/man1/rsyncrypto.1.gz \ - share/man/man1/rsyncrypto_recover.1.gz +TEST_TARGET= test + +# Just to make configure phase runtime checks happy +BINARY_ALIAS= gzip=${LOCALBASE}/bin/gzip + PORTDOCS= AUTHORS ChangeLog NEWS README OPTIONS_DEFINE= DOCS +GZIP_DEPENDS= ${LOCALBASE}/bin/gzip:archivers/gzip + +# Use gzip from localbase, as gzip from base lacks support of needed --rsyncable option post-patch: -# Inhibit the check for RSA_get0_factors() to support older OpenSSL versions - @${REINPLACE_CMD} -e '/RSA_get0_factors/,+49d' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/rsyncrypto.h post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} .include diff --git a/sysutils/rsyncrypto/files/patch-crypto.cpp b/sysutils/rsyncrypto/files/patch-crypto.cpp deleted file mode 100644 index 1a6d439b2298..000000000000 --- a/sysutils/rsyncrypto/files/patch-crypto.cpp +++ /dev/null @@ -1,16 +0,0 @@ ---- crypto.cpp.orig 2016-11-11 20:23:00 UTC -+++ crypto.cpp -@@ -155,9 +155,13 @@ std::unique_ptr decrypt_header( file_t fromfd, RS - unsigned char *buff=filemap.get_uc()+sizeof(HEADER_ENCRYPTION_VERSION); - auto_array decrypted(new unsigned char[headsize]); - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ if( (prv->p==nullptr || prv->q==nullptr) ) { -+#else - const BIGNUM *p, *q; - RSA_get0_factors(prv, &p, &q); - if( (p==nullptr || q==nullptr) ) { -+#endif - // This is not a private key! - throw rscerror("Neither AES session key nor RSA private key present - cannot decrypt using only public key"); - } diff --git a/sysutils/rsyncrypto/files/patch-rsyncrypto.h b/sysutils/rsyncrypto/files/patch-rsyncrypto.h new file mode 100644 index 000000000000..99cff3e056e2 --- /dev/null +++ b/sysutils/rsyncrypto/files/patch-rsyncrypto.h @@ -0,0 +1,20 @@ +--- rsyncrypto.h.orig 2016-11-27 18:44:10 UTC ++++ rsyncrypto.h +@@ -58,7 +58,7 @@ struct startup_options { + "Force a new key size, even if previous encryption used a different setting."); + argtable[i++]=noarch=arg_lit0( NULL, "no-archive-mode", "Do not try to preserve timestamps"); + argtable[i++]=gzip=arg_file0( NULL, "gzip", "", +- "Path to gzip-like program to use. Must accept a --rsyncable command option"); ++ "Path to gzip-like program to use. Must accept a --rsyncable command option. Default is %%LOCALBASE%%/bin/gzip"); + argtable[i++]=rem1=arg_rem( "Advanced options:", "" ); + argtable[i++]=rollwin=arg_int0( NULL, "roll-win", "", "Rollover window size. Default is 8192 byte"); + argtable[i++]=rollmin=arg_int0( NULL, "roll-min", "", +@@ -76,7 +76,7 @@ struct startup_options { + trim->ival[0]=1; + rollwin->ival[0]=8192; + rollmin->ival[0]=8192; +- gzip->filename[0]="gzip"; ++ gzip->filename[0]="%%LOCALBASE%%/bin/gzip"; + nenest->ival[0]=0; + } + } diff --git a/sysutils/rsyncrypto/files/patch-rsyncrypto.man b/sysutils/rsyncrypto/files/patch-rsyncrypto.man new file mode 100644 index 000000000000..1f52ca601120 --- /dev/null +++ b/sysutils/rsyncrypto/files/patch-rsyncrypto.man @@ -0,0 +1,17 @@ +--- rsyncrypto.man.orig 2008-10-22 11:34:49 UTC ++++ rsyncrypto.man +@@ -236,10 +236,10 @@ it. In order not to become rsync unfriendly due to the + it. In order not to become rsync unfriendly due to the compression, + \fBrsyncrypto\fP will search the path for an instance of + .BR gzip (1) +-that supports the \fB\-\-rsyncable\fP option. If the system's default gzip does +-not support this option (all Debian and derivatives, as well as some others, support it), use +-this option to tell \fBrsyncrypto\fP to use a different instance of gzip. The +-tests directory of rsyncrypto's source has a file called "gzip", that does NULL ++that supports the \fB\-\-rsyncable\fP option. FreeBSD base system's default gzip doesn't ++support this option, so this port builds with archivers/gzip from ports tree, which does. ++You still can use this option to tell \fBrsyncrypto\fP to use a different instance of gzip. ++The tests directory of rsyncrypto's source has a file called "gzip", that does NULL + compression by redirecting the input and output to + .BR cat (1). + .TP diff --git a/sysutils/rsyncrypto/pkg-plist b/sysutils/rsyncrypto/pkg-plist new file mode 100644 index 000000000000..8941bb3c7ecb --- /dev/null +++ b/sysutils/rsyncrypto/pkg-plist @@ -0,0 +1,4 @@ +bin/rsyncrypto +bin/rsyncrypto_recover +share/man/man1/rsyncrypto.1.gz +share/man/man1/rsyncrypto_recover.1.gz