From owner-svn-ports-all@FreeBSD.ORG Mon Apr 14 17:20:19 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D1C6DA5; Mon, 14 Apr 2014 17:20:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB3312B6; Mon, 14 Apr 2014 17:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3EHKIbC042415; Mon, 14 Apr 2014 17:20:18 GMT (envelope-from ehaupt@svn.freebsd.org) Received: (from ehaupt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3EHKIm6042411; Mon, 14 Apr 2014 17:20:18 GMT (envelope-from ehaupt@svn.freebsd.org) Message-Id: <201404141720.s3EHKIm6042411@svn.freebsd.org> From: Emanuel Haupt Date: Mon, 14 Apr 2014 17:20:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351269 - in head/net/rsync: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 17:20:19 -0000 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 @@ -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%%