View | Details | Raw Unified | Return to bug 283817 | Differences between
and this patch

Collapse All | Expand All

(-)b/sysutils/rsyncrypto/Makefile (-14 / +25 lines)
Lines 1-36 Link Here
1
PORTNAME=	rsyncrypto
1
PORTNAME=	rsyncrypto
2
PORTVERSION=	1.14
2
DISTVERSION=	1.14
3
PORTREVISION=	2
3
PORTREVISION=	3
4
CATEGORIES=	sysutils net
4
CATEGORIES=	sysutils net
5
MASTER_SITES=	SF
5
MASTER_SITES=	SF
6
6
7
MAINTAINER=	ports@FreeBSD.org
7
MAINTAINER=	alster@vinterdalen.se
8
COMMENT=	Rsync Friendly File Encryption
8
COMMENT=	Rsync Friendly File Encryption
9
WWW=		https://rsyncrypto.lingnu.com/
9
WWW=		https://rsyncrypto.lingnu.com/ \
10
		https://sourceforge.net/projects/rsyncrypto/
10
11
11
LICENSE=	GPLv2+
12
LICENSE=	GPLv2+
13
LICENSE_FILE=	${WRKSRC}/COPYING
12
14
15
BUILD_DEPENDS=	${GZIP_DEPENDS}
13
LIB_DEPENDS=	libargtable2.so:devel/argtable
16
LIB_DEPENDS=	libargtable2.so:devel/argtable
14
RUN_DEPENDS=	rsync:net/rsync
17
RUN_DEPENDS=	${GZIP_DEPENDS} \
18
		rsync:net/rsync
19
TEST_DEPENDS=	${GZIP_DEPENDS} \
20
		bash:shells/bash
21
22
USES=		compiler:c++11-lang gmake localbase shebangfix ssl tar:bzip2
23
24
SHEBANG_FILES=	tests/regtest
15
25
16
USES=		compiler:c++11-lang gmake localbase ssl tar:bzip2
17
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
19
27
20
PLIST_FILES=	bin/rsyncrypto \
28
TEST_TARGET=	test
21
		bin/rsyncrypto_recover \
29
22
		share/man/man1/rsyncrypto.1.gz \
30
# Just to make configure phase runtime checks happy
23
		share/man/man1/rsyncrypto_recover.1.gz
31
BINARY_ALIAS=	gzip ${LOCALBASE}/bin/gzip
32
24
PORTDOCS=	AUTHORS ChangeLog NEWS README
33
PORTDOCS=	AUTHORS ChangeLog NEWS README
25
34
26
OPTIONS_DEFINE=	DOCS
35
OPTIONS_DEFINE=	DOCS
27
36
37
GZIP_DEPENDS=	${LOCALBASE}/bin/gzip:archivers/gzip
38
39
# Use gzip from localbase, as gzip from base lacks support of needed --rsyncable option
28
post-patch:
40
post-patch:
29
# Inhibit the check for RSA_get0_factors() to support older OpenSSL versions
41
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/rsyncrypto.h
30
	@${REINPLACE_CMD} -e '/RSA_get0_factors/,+49d' ${WRKSRC}/configure
31
42
32
post-install-DOCS-on:
43
post-install-DOCS-on:
33
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
44
	${MKDIR} ${STAGEDIR}${DOCSDIR}
34
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
45
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
35
46
36
.include <bsd.port.mk>
47
.include <bsd.port.mk>
(-)a/sysutils/rsyncrypto/files/patch-crypto.cpp (-16 lines)
Removed Link Here
1
--- crypto.cpp.orig	2016-11-11 20:23:00 UTC
2
+++ crypto.cpp
3
@@ -155,9 +155,13 @@ std::unique_ptr<key> decrypt_header( file_t fromfd, RS
4
     unsigned char *buff=filemap.get_uc()+sizeof(HEADER_ENCRYPTION_VERSION);
5
     auto_array<unsigned char> decrypted(new unsigned char[headsize]);
6
 
7
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
8
+    if( (prv->p==nullptr || prv->q==nullptr) ) {
9
+#else
10
     const BIGNUM *p, *q;
11
     RSA_get0_factors(prv, &p, &q);
12
     if( (p==nullptr || q==nullptr) ) {
13
+#endif
14
         // This is not a private key!
15
         throw rscerror("Neither AES session key nor RSA private key present - cannot decrypt using only public key");
16
     }
(-)b/sysutils/rsyncrypto/files/patch-rsyncrypto.h (+20 lines)
Added Link Here
1
--- rsyncrypto.h.orig	2016-11-27 18:44:10 UTC
2
+++ rsyncrypto.h
3
@@ -58,7 +58,7 @@ struct startup_options {
4
                 "Force a new key size, even if previous encryption used a different setting.");
5
         argtable[i++]=noarch=arg_lit0( NULL, "no-archive-mode", "Do not try to preserve timestamps");
6
         argtable[i++]=gzip=arg_file0( NULL, "gzip", "<file>",
7
-                "Path to gzip-like program to use. Must accept a --rsyncable command option");
8
+                "Path to gzip-like program to use. Must accept a --rsyncable command option. Default is %%LOCALBASE%%/bin/gzip");
9
         argtable[i++]=rem1=arg_rem( "Advanced options:", "" );
10
         argtable[i++]=rollwin=arg_int0( NULL, "roll-win", "<n>", "Rollover window size. Default is 8192 byte");
11
         argtable[i++]=rollmin=arg_int0( NULL, "roll-min", "<n>",
12
@@ -76,7 +76,7 @@ struct startup_options {
13
             trim->ival[0]=1;
14
             rollwin->ival[0]=8192;
15
             rollmin->ival[0]=8192;
16
-            gzip->filename[0]="gzip";
17
+            gzip->filename[0]="%%LOCALBASE%%/bin/gzip";
18
             nenest->ival[0]=0;
19
         }
20
     }
(-)b/sysutils/rsyncrypto/files/patch-rsyncrypto.man (+17 lines)
Added Link Here
1
--- rsyncrypto.man.orig	2008-10-22 11:34:49 UTC
2
+++ rsyncrypto.man
3
@@ -236,10 +236,10 @@ it. In order not to become rsync unfriendly due to the
4
 it. In order not to become rsync unfriendly due to the compression,
5
 \fBrsyncrypto\fP will search the path for an instance of
6
 .BR gzip (1)
7
-that supports the \fB\-\-rsyncable\fP option. If the system's default gzip does
8
-not support this option (all Debian and derivatives, as well as some others, support it), use
9
-this option to tell \fBrsyncrypto\fP to use a different instance of gzip. The
10
-tests directory of rsyncrypto's source has a file called "gzip", that does NULL
11
+that supports the \fB\-\-rsyncable\fP option. FreeBSD base system's default gzip doesn't
12
+support this option, so this port builds with archivers/gzip from ports tree, which does.
13
+You still can use this option to tell \fBrsyncrypto\fP to use a different instance of gzip.
14
+The tests directory of rsyncrypto's source has a file called "gzip", that does NULL
15
 compression by redirecting the input and output to
16
 .BR cat (1).
17
 .TP
(-)b/sysutils/rsyncrypto/pkg-plist (-1 / +4 lines)
Added Link Here
0
- 
1
bin/rsyncrypto
2
bin/rsyncrypto_recover
3
share/man/man1/rsyncrypto.1.gz
4
share/man/man1/rsyncrypto_recover.1.gz

Return to bug 283817