Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2014 17:20:18 +0000 (UTC)
From:      Emanuel Haupt <ehaupt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r351269 - in head/net/rsync: . files
Message-ID:  <201404141720.s3EHKIm6042411@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ehaupt
Date: Mon Apr 14 17:20:17 2014
New Revision: 351269
URL: http://svnweb.freebsd.org/changeset/ports/351269
QAT: https://qat.redports.org/buildarchive/r351269/

Log:
  - Turn file system flags support patch option on by default. FreeBSD has had
    flags since the very beginning, and they are actively used in the base
    system. A standard install includes 27 files and one directory with the schg
    flag set. Thus, rsync, out of the box, is incapable of making or restoring
    an accurate backup of a FreeBSD system.
  
  - Move configuration directory from %%PREFIX%%/etc to %%ETCDIR%% and provide
    a start_precmd() rc.d function to migrate %%PREFIX%%/etc/rsyncd.conf to
    %%ETCDIR%%/rsyncd.conf if found and create a symlink. The reason behind this
    change is that rsyncd in a typical setup will end up with more than one
    configuration file (eg. rsyncd.secrets).
  
  - Use new @sample pkg-plist macro
  
  - Bump PORTREVISION
  
  Discussed with: des

Modified:
  head/net/rsync/Makefile
  head/net/rsync/files/rsyncd.conf.sample
  head/net/rsync/files/rsyncd.in
  head/net/rsync/pkg-plist

Modified: head/net/rsync/Makefile
==============================================================================
--- head/net/rsync/Makefile	Mon Apr 14 17:16:49 2014	(r351268)
+++ head/net/rsync/Makefile	Mon Apr 14 17:20:17 2014	(r351269)
@@ -3,7 +3,7 @@
 
 PORTNAME=	rsync
 PORTVERSION=	3.1.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net ipv6
 MASTER_SITES=	http://rsync.samba.org/ftp/%SUBDIR%/ \
 		ftp://ftp.samba.org/pub/%SUBDIR%/ \
@@ -24,7 +24,7 @@ USE_RC_SUBR=	rsyncd
 SUB_LIST=	NAME=rsyncd
 
 CONFIGURE_ARGS=	--disable-debug --enable-ipv6 \
-		--with-rsyncd-conf=${PREFIX}/etc/rsyncd.conf
+		--with-rsyncd-conf=${ETCDIR}/rsyncd.conf
 
 PORTDOCS=	NEWS README csprotocol.txt tech_report.tex
 
@@ -51,7 +51,7 @@ ACL_DESC=	Add backward-compatibility for
 RENFL_DESC=	Renamed and flags options combined
 
 # define default options
-OPTIONS_DEFAULT=SSH ZLIB_BASE
+OPTIONS_DEFAULT=SSH ZLIB_BASE FLAGS
 
 .include <bsd.port.options.mk>
 
@@ -69,7 +69,7 @@ PATCH_STRIP=	-p1
 EXTRA_PATCHES+=	${WRKSRC}/patches/atimes.diff
 .endif
 
-.if ${PORT_OPTIONS:MICONV} || ${PORT_OPTIONS:MFLAGS} || ${PORT_OPTIONS:MACL} || make(makesum) || ${PORT_OPTIONS:MTIMELIMIT} || ${PORT_OPTIONS:MATIMES} || ${PORT_OPTIONS:MRENAMED} || ${PORT_OPTIONS:MRENFL} 
+.if ${PORT_OPTIONS:MICONV} || ${PORT_OPTIONS:MFLAGS} || ${PORT_OPTIONS:MACL} || make(makesum) || ${PORT_OPTIONS:MTIMELIMIT} || ${PORT_OPTIONS:MATIMES} || ${PORT_OPTIONS:MRENAMED} || ${PORT_OPTIONS:MRENFL}
 DISTFILES+=	${PORTNAME}-patches-${PORTVERSION}${EXTRACT_SUFX}
 .endif
 
@@ -128,12 +128,13 @@ CONFIGURE_ARGS+=ac_cv_search_libiconv_op
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|perl.*|${DO_NADA}|' ${WRKSRC}/Makefile.in
-	@${REINPLACE_CMD} -e 's:/etc/:${PREFIX}/etc/:g'  \
+	@${REINPLACE_CMD} -e 's:/etc/:${ETCDIR}/:g'  \
 		${WRKSRC}/rsync.h ${WRKSRC}/rsync.1 ${WRKSRC}/rsyncd.conf.5
 
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rsync
-	${INSTALL_DATA} ${FILESDIR}/rsyncd.conf.sample ${STAGEDIR}${PREFIX}/etc/
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${FILESDIR}/rsyncd.conf.sample ${STAGEDIR}${ETCDIR}/
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
 

Modified: head/net/rsync/files/rsyncd.conf.sample
==============================================================================
--- head/net/rsync/files/rsyncd.conf.sample	Mon Apr 14 17:16:49 2014	(r351268)
+++ head/net/rsync/files/rsyncd.conf.sample	Mon Apr 14 17:20:17 2014	(r351269)
@@ -32,4 +32,4 @@ pid file = /var/run/rsyncd.pid
 #	path = /data/cvs
 #	comment = CVS repository (requires authentication)
 #	auth users = tridge, susan
-#	secrets file = /usr/local/etc/rsyncd.secrets
+#	secrets file = /usr/local/etc/rsync/rsyncd.secrets

Modified: head/net/rsync/files/rsyncd.in
==============================================================================
--- head/net/rsync/files/rsyncd.in	Mon Apr 14 17:16:49 2014	(r351268)
+++ head/net/rsync/files/rsyncd.in	Mon Apr 14 17:20:17 2014	(r351269)
@@ -23,11 +23,21 @@ rcvar=%%NAME%%_enable
 
 command="%%PREFIX%%/bin/rsync"
 command_args="--daemon"
+start_precmd="%%NAME%%_precmd"
 pidfile="/var/run/$name.pid"
-required_files="%%PREFIX%%/etc/$name.conf"
+required_files="%%ETCDIR%%/$name.conf"
 
 # read configuration and set defaults
 load_rc_config "$name"
 : ${%%NAME%%_enable="NO"}
 
+%%NAME%%_precmd()
+{
+	if [ -f "%%PREFIX%%/etc/$name.conf" ] && [ ! -L "%%PREFIX%%/etc/$name.conf" ]; then
+		echo "Found %%PREFIX%%/etc/$name.conf in old location. Migrating to %%ETCDIR%%/$name.conf."
+		mv %%PREFIX%%/etc/$name.conf %%ETCDIR%%/$name.conf
+		ln -s %%ETCDIR%%/$name.conf %%PREFIX%%/etc/$name.conf
+	fi
+}
+
 run_rc_command "$1"

Modified: head/net/rsync/pkg-plist
==============================================================================
--- head/net/rsync/pkg-plist	Mon Apr 14 17:16:49 2014	(r351268)
+++ head/net/rsync/pkg-plist	Mon Apr 14 17:20:17 2014	(r351269)
@@ -1,6 +1,5 @@
 bin/rsync
 man/man1/rsync.1.gz
 man/man5/rsyncd.conf.5.gz
-@unexec if cmp -s %D/etc/rsyncd.conf.sample %D/etc/rsyncd.conf; then rm -f %D/etc/rsyncd.conf; fi
-etc/rsyncd.conf.sample
-@exec [ -f %B/rsyncd.conf ] || cp %B/%f %B/rsyncd.conf
+@sample %%ETCDIR%%/rsyncd.conf.sample
+@dirrmtry %%ETCDIR%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404141720.s3EHKIm6042411>