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