View | Details | Raw Unified | Return to bug 256727
Collapse All | Expand All

(-)b/MOVED (-1 lines)
Lines 13191-13197 multimedia/subtitleeditor||2019-10-16|Has expired: Unfetchable, unmaintained Link Here
13191
multimedia/umr||2019-10-16|Has expired: Unfetchable, unmaintained
13191
multimedia/umr||2019-10-16|Has expired: Unfetchable, unmaintained
13192
net/bluemix-cli||2019-10-16|Has expired: Unfetchable, unmaintained
13192
net/bluemix-cli||2019-10-16|Has expired: Unfetchable, unmaintained
13193
net/boclient||2019-10-16|Has expired: Unfetchable, unmaintained
13193
net/boclient||2019-10-16|Has expired: Unfetchable, unmaintained
13194
net/csync2||2019-10-16|Has expired: Unfetchable, unmaintained
13195
net/dictd-database||2019-10-16|Has expired: Unfetchable, unmaintained
13194
net/dictd-database||2019-10-16|Has expired: Unfetchable, unmaintained
13196
net/gtic||2019-10-16|Has expired: Unfetchable, unmaintained
13195
net/gtic||2019-10-16|Has expired: Unfetchable, unmaintained
13197
net/hidentd||2019-10-16|Has expired: Unfetchable, unmaintained
13196
net/hidentd||2019-10-16|Has expired: Unfetchable, unmaintained
(-)b/net/csync2/Makefile (+47 lines)
Added Link Here
1
PORTNAME=	csync2
2
PORTVERSION=	2.0
3
PORTREVISION=	3
4
CATEGORIES=	net
5
6
MAINTAINER=	olevole@olevole.ru
7
COMMENT=	Cluster synchronization tool
8
9
LICENSE=	GPLv2
10
LICENSE_FILE=	${WRKSRC}/COPYING
11
12
LIB_DEPENDS=	librsync.so:net/librsync \
13
		libgnutls.so:security/gnutls \
14
		libsqlite3.so:databases/sqlite3
15
16
USES=		autoreconf pkgconfig shebangfix
17
SHEBANG_FILES=	csync2-compare
18
19
OPTIONS_DEFINE=	CSYNC2_COMPARE DOCS
20
OPTIONS_SUB=	yes
21
CSYNC2_COMPARE_DESC=		Install csync2-compare script
22
CSYNC2_COMPARE_RUN_DEPENDS=	bash:shells/bash
23
24
USE_GITHUB=	yes
25
GH_ACCOUNT=	LINBIT
26
GH_PROJECT=	csync2
27
GH_TAGNAME=	a8d38eb
28
29
GNU_CONFIGURE=	yes
30
CONFIGURE_ARGS=	ac_cv_prog_PDFLATEX=
31
CPPFLAGS+=	-I${LOCALBASE}/include
32
LIBS+=		-L${LOCALBASE}/lib
33
34
USE_RC_SUBR=	csync2
35
36
SUB_FILES=	pkg-install
37
38
post-patch:
39
	@${REINPLACE_CMD} -e 's|(localstatedir)/lib|(localstatedir)/db|' \
40
		-e 's/-ldl//' ${WRKSRC}/Makefile.am
41
42
post-install:
43
	${MV} ${STAGEDIR}${PREFIX}/etc/csync2.cfg \
44
		${STAGEDIR}${PREFIX}/etc/csync2.cfg.sample
45
	${MKDIR} ${STAGEDIR}/var/backups/csync2
46
47
.include <bsd.port.mk>
(-)b/net/csync2/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1624175490
2
SHA256 (LINBIT-csync2-2.0-a8d38eb_GH0.tar.gz) = d2dd33259aa86e1cc8e1866e5cfb9d5af07c59170a179d06e25b92a0a0d1a178
3
SIZE (LINBIT-csync2-2.0-a8d38eb_GH0.tar.gz) = 108311
(-)b/net/csync2/files/csync2.in (+68 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# PROVIDE: csync2
4
# REQUIRE: LOGIN
5
# KEYWORD: shutdown
6
7
# Add the following line to /etc/rc.conf to enable csync2:
8
# csync2_enable="YES"
9
#
10
# Optional configuration of csync2:
11
# csync2_cfg (str):		Path to csync2 main configuration.
12
#				Default is %%PREFIX%%/etc/csync2.cfg.
13
# csync2_flags (str):		Extra flags passed to csync2 program.
14
#				Default to "-ii -v".
15
# csync2_logfile (str):		Path to logfile where daemon' output logged to.
16
#				Default to "/var/log/csync2.log".
17
18
. /etc/rc.subr
19
20
name="csync2"
21
rcvar=csync2_enable
22
23
pidfile=/var/run/${name}.pid
24
command=%%PREFIX%%/sbin/csync2
25
26
start_cmd="csync2_start"
27
28
load_rc_config $name
29
: ${csync2_enable="NO"}
30
: ${csync2_flags="-ii -v"}
31
: ${csync2_cfg="%%PREFIX%%/etc/csync2.cfg"}
32
: ${csync2_logfile="/var/log/csync2.log"}
33
34
required_files="${csync2_cfg}"
35
36
csync2_check_keys()
37
{
38
	[ -f "${csync2_cfg}" ] || return 1
39
40
	_key=`grep '^[[:blank:]]*key[[:space:]]\+.\+;\?$' ${csync2_cfg} |\
41
		awk '{print($2)}'`
42
	[ -n "${_key}" ] || return 1
43
	
44
	for _file in ${_key}; do
45
		_file=${_file%;}
46
		[ ! -f "${_file}" ] && \
47
		warn "PSK specified but not found, use csync2 -k ${_file} to create it."
48
	done
49
50
	return 0
51
}
52
53
csync2_start() {
54
55
	if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
56
		echo 1>&2 "${name} already running? (pid=$rc_pid)."
57
		return 1
58
	fi
59
60
	csync2_check_keys
61
62
	check_startmsgs && echo "Starting ${name}."
63
64
	/usr/sbin/daemon -p ${pidfile} \
65
		${command} ${csync2_flags} >> ${csync2_logfile} 2>&1
66
}
67
68
run_rc_command "$1"
(-)b/net/csync2/files/patch-csync2.c (+21 lines)
Added Link Here
1
--- csync2.c.orig	2013-05-02 12:58:04 UTC
2
+++ csync2.c
3
@@ -256,7 +256,7 @@ static int csync_server_bind(void)
4
 	struct addrinfo hints;
5
 	struct addrinfo *result, *rp;
6
 	int save_errno;
7
-	int sfd = -1, s, on = 1;
8
+	int sfd = -1, s, off = 0, on = 1;
9
 	memset(&hints, 0, sizeof(struct addrinfo));
10
 	hints.ai_family = AF_UNSPEC;	/* Allow IPv4 or IPv6 */
11
 	hints.ai_socktype = SOCK_STREAM;
12
@@ -284,6 +284,9 @@ static int csync_server_bind(void)
13
 			goto error;
14
 		if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, (socklen_t) sizeof(on)) < 0)
15
 			goto error;
16
+		if (rp->ai_family == AF_INET6)
17
+			if (setsockopt(sfd, IPPROTO_IPV6, IPV6_V6ONLY, &off, (socklen_t) sizeof(off)) < 0)
18
+				goto error;
19
 
20
 		if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0)
21
 			break;	/* Success */
(-)b/net/csync2/files/patch-csync2.h (+11 lines)
Added Link Here
1
--- csync2.h.orig	2013-05-02 12:58:14 UTC
2
+++ csync2.h
3
@@ -80,7 +80,7 @@ extern int csync_perm(const char *filena
4
 
5
 extern void csync_printtime();
6
 extern void csync_printtotaltime();
7
-extern void csync_fatal(const char *fmt, ...);
8
+extern void csync_fatal(const char *fmt, ...) __dead2;
9
 extern void csync_debug(int lv, const char *fmt, ...);
10
 
11
 #define csync_debug_ping(N) \
(-)b/net/csync2/files/patch-rsync.c (+30 lines)
Added Link Here
1
--- rsync.c.orig	2015-03-09 14:08:51 UTC
2
+++ rsync.c
3
@@ -41,6 +41,7 @@
4
 
5
 /* This has been taken from rsync:lib/compat.c */
6
 
7
+#if 0
8
 /**
9
  * Like strncpy but does not 0 fill the buffer and always null
10
  * terminates.
11
@@ -61,6 +62,7 @@ static size_t strlcpy(char *d, const cha
12
         }
13
         return ret;
14
 }
15
+#endif
16
 
17
 /* splits filepath at the last '/', if any, like so:
18
  *	dirname		basename	filepath
19
@@ -117,7 +119,10 @@ int mkpath(const char *path, mode_t mode
20
 		return -1;
21
 	}
22
 
23
-	strlcpy(temp,path,strlen(path));
24
+	if(strlcpy(temp,path,sizeof(temp))>=sizeof(temp)) {
25
+		csync_debug(1,"path too long: %s",path);
26
+		return -1;
27
+	}
28
 	csync_debug(1,"mkpath full path: %s",temp);
29
 	for( remaining=strchr(temp+1, '/'); remaining!=NULL; remaining=strchr(remaining+1, '/') ){
30
 		*remaining='\0';
(-)b/net/csync2/files/pkg-install.in (+60 lines)
Added Link Here
1
#!/bin/sh
2
3
create_cert() {
4
5
	_errlog=`mktemp /tmp/.${0##*/}.XXXXX`
6
	code=0
7
8
	exec 3>&2 2>${_errlog}
9
10
	openssl genrsa -out ${PKG_PREFIX}/etc/csync2_ssl_key.pem 1024 || code=1
11
	yes '' | openssl req -new -key ${PKG_PREFIX}/etc/csync2_ssl_key.pem \
12
		-out /tmp/csync2_ssl_cert.csr || code=1
13
	openssl x509 -req -days 600 -in /tmp/csync2_ssl_cert.csr \
14
		-signkey ${PKG_PREFIX}/etc/csync2_ssl_key.pem \
15
		-out ${PKG_PREFIX}/etc/csync2_ssl_cert.pem || code=1
16
17
	rm -f /tmp/csync2_ssl_cert.csr
18
19
	if [ ${code} -ne 0 ]; then
20
		echo "csync2: OpenSSL error occurred:"
21
		echo
22
		cat ${_errlog}
23
		echo
24
		rm -f ${_errlog}
25
		return 1
26
	fi
27
28
	exec 2>&3
29
30
	rm -f ${_errlog}
31
32
	chmod 600 ${PKG_PREFIX}/etc/csync2_ssl_key.pem \
33
		${PKG_PREFIX}/etc/csync2_ssl_cert.pem
34
35
	echo "csync2: RSA certificate-key pair installed."
36
37
	return 0
38
}
39
40
pre_install() {
41
	return 0
42
}
43
44
post_install() {
45
46
	[ -n "${PACKAGE_BUILDING}" ] && return 0
47
48
	if [ ! -f ${PKG_PREFIX}/etc/csync2_ssl_cert.pem ]; then
49
		create_cert || return $?
50
	fi
51
52
	return 0
53
}
54
55
[ $# -eq 2 ] || exit 0
56
57
case $2 in
58
	"PRE-INSTALL") pre_install ;;
59
	"POST-INSTALL") post_install ;;
60
esac
(-)b/net/csync2/pkg-descr (+11 lines)
Added Link Here
1
Csync2 is a cluster synchronization tool. It can be used to keep files on
2
multiple hosts in a cluster in sync. Csync2 can handle complex setups with
3
much more than just 2 hosts, handle file deletions and can detect
4
conflicts.
5
6
It is expedient for HA-clusters, HPC-clusters, COWs and server farms. If
7
you are looking for a tool to sync your laptop with your workstation, you
8
better have a look at Unison (http://www.cis.upenn.edu/~bcpierce/unison/)
9
too.
10
11
WWW: https://github.com/LINBIT/csync2/
(-)b/net/csync2/pkg-plist (+9 lines)
Added Link Here
1
@sample etc/csync2.cfg.sample
2
man/man1/csync2.1.gz
3
sbin/csync2
4
%%CSYNC2_COMPARE%%sbin/csync2-compare
5
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
6
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
7
%%PORTDOCS%%%%DOCSDIR%%/README
8
@dir(,,700) /var/db/csync2
9
@dir(,,700) /var/backups/csync2

Return to bug 256727