FreeBSD Bugzilla – Attachment 256522 Details for
Bug 283817
sysutils/rsyncrypto: adopt port, improve Makefile
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] sysutils/rsyncrypto: adopt port, improve Makefile
0001-sysutils-rsyncrypto-adopt-port-improve-Makefile.patch (text/plain), 6.81 KB, created by
Älven
on 2025-01-07 23:10:21 UTC
(
hide
)
Description:
[PATCH] sysutils/rsyncrypto: adopt port, improve Makefile
Filename:
MIME Type:
Creator:
Älven
Created:
2025-01-07 23:10:21 UTC
Size:
6.81 KB
patch
obsolete
>From 0c9251500388791536be4afe5dc8d0f3cf6b349c Mon Sep 17 00:00:00 2001 >From: Ãlven <alster@vinterdalen.se> >Date: Fri, 3 Jan 2025 17:38:00 +0400 >Subject: [PATCH] sysutils/rsyncrypto: adopt port, improve Makefile > >+ Add TEST_TARGET and TEST_DEPENDS >- Remove support for building with against pre-1.1.0 versions of >OpenSSL, which were used in FreeBSD 11.x and supported until September >30, 2021. See PR 248168. >* Use archivers/gzip from ports tree for --rsyncable option >--- > sysutils/rsyncrypto/Makefile | 39 ++++++++++++------- > sysutils/rsyncrypto/files/patch-crypto.cpp | 16 -------- > sysutils/rsyncrypto/files/patch-rsyncrypto.h | 20 ++++++++++ > .../rsyncrypto/files/patch-rsyncrypto.man | 17 ++++++++ > sysutils/rsyncrypto/pkg-plist | 4 ++ > 5 files changed, 66 insertions(+), 30 deletions(-) > delete mode 100644 sysutils/rsyncrypto/files/patch-crypto.cpp > create mode 100644 sysutils/rsyncrypto/files/patch-rsyncrypto.h > create mode 100644 sysutils/rsyncrypto/files/patch-rsyncrypto.man > create mode 100644 sysutils/rsyncrypto/pkg-plist > >diff --git a/sysutils/rsyncrypto/Makefile b/sysutils/rsyncrypto/Makefile >index ad8639383eca..a1054730e206 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 <bsd.port.mk> >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<key> decrypt_header( file_t fromfd, RS >- unsigned char *buff=filemap.get_uc()+sizeof(HEADER_ENCRYPTION_VERSION); >- auto_array<unsigned char> 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", "<file>", >+- "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", "<n>", "Rollover window size. Default is 8192 byte"); >+ argtable[i++]=rollmin=arg_int0( NULL, "roll-min", "<n>", >+@@ -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 >-- >2.47.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
alster
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 283817
:
256373
|
256391
|
256398
| 256522