From nobody@FreeBSD.org  Sun Sep 16 10:25:33 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C6EAE106567D
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2012 10:25:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id B19C18FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2012 10:25:33 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8GAPXK8068391
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2012 10:25:33 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8GAPX3v068390;
	Sun, 16 Sep 2012 10:25:33 GMT
	(envelope-from nobody)
Message-Id: <201209161025.q8GAPX3v068390@red.freebsd.org>
Date: Sun, 16 Sep 2012 10:25:33 GMT
From: CyberLeo <cyberleo@cyberleo.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Patch ports Makefile to support rsync update
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171681
>Category:       ports
>Synopsis:       Patch ports Makefile to support rsync update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 16 10:30:10 UTC 2012
>Closed-Date:    
>Last-Modified:  Sat Jun  1 05:30:00 UTC 2013
>Originator:     CyberLeo
>Release:        9.1-RC1
>Organization:
CyberLeo.Net
>Environment:
FreeBSD mtumishi.cyberleo.net 9.1-RC1 FreeBSD 9.1-RC1 #0 r239653+91c9b44: Sat Aug 25 22:14:59 EDT 2012     cyberleo@mtumishi.cyberleo.net:/usr/obj/usr/src/sys/MTUMISHI  amd64
>Description:
Since I maintain a ports tree overlay, I find it easier to update ports from a centralized patched copy instead of worrying about patching separately on each machine. None of the available ports tree update methods are useful for this.

The attached patch adds an rsync update mechanism, requiring only RSYNC_UPDATE and PORTS_RSYNC_SOURCE defined in /etc/make.conf.

Tested on 9.1-RC1 and 8.2-RELEASE.
>How-To-Repeat:

>Fix:
Included patch.

Patch attached with submission follows:

--- Makefile.orig	2012-08-05 13:06:49.000000000 -0400
+++ Makefile	2012-09-16 05:56:08.885054241 -0400
@@ -155,6 +155,8 @@
 GIT?= git
 SVN?= svn
 SUP?= csup
+RSYNC?= rsync
+RSYNC_FLAGS?= --recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --verbose
 PORTSNAP?= portsnap
 PORTSNAP_FLAGS?= -p ${.CURDIR}
 .if defined(SUPHOST)
@@ -172,6 +174,11 @@
 	@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
 	@echo "--------------------------------------------------------------"
 	cd ${.CURDIR}; ${CVS} -R -q update -A -P -d -I!
+.elif defined(RSYNC_UPDATE) && defined(PORTS_RSYNC_SOURCE)
+	@echo "--------------------------------------------------------------"
+	@echo ">>> Updating with ${RSYNC} from ${PORTS_RSYNC_SOURCE}"
+	@echo "--------------------------------------------------------------"
+	@${RSYNC} ${RSYNC_FLAGS} ${PORTS_RSYNC_SOURCE}/ ${.CURDIR}/
 .elif exists(${.CURDIR}/.svn)
 	@echo "--------------------------------------------------------------"
 	@echo ">>> Updating ${.CURDIR} using Subversion"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sun Sep 16 10:52:08 UTC 2012 
Responsible-Changed-Why:  
For you. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171681 

From: CyberLeo Kitsana <cyberleo@cyberleo.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/171681: Patch ports Makefile to support rsync update
Date: Sat, 01 Jun 2013 00:20:50 -0500

 This is a multi-part message in MIME format.
 --------------070605030106040406050301
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Patch updated to apply after csup removal.
 
 -- 
 Fuzzy love,
 -CyberLeo
 Technical Administrator
 CyberLeo.Net Webhosting
 http://www.CyberLeo.Net
 <CyberLeo@CyberLeo.Net>
 
 Furry Peace! - http://www.fur.com/peace/
 
 --------------070605030106040406050301
 Content-Type: text/x-patch;
  name="Makefile-rsync-update.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="Makefile-rsync-update.patch"
 
 --- Makefile.orig	2013-06-01 01:11:59.374630772 -0400
 +++ Makefile	2013-06-01 01:13:32.861834918 -0400
 @@ -152,11 +152,18 @@
  
  GIT?= git
  SVN?= svn
 +RSYNC?= rsync
 +RSYNC_FLAGS?= --recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --verbose
  PORTSNAP?= portsnap
  PORTSNAP_FLAGS?= -p ${.CURDIR}
  .if !target(update)
  update:
 -.if exists(${.CURDIR}/.svn)
 +.if defined(RSYNC_UPDATE) && defined(PORTS_RSYNC_SOURCE)
 +	@echo "--------------------------------------------------------------"
 +	@echo ">>> Updating with ${RSYNC} from ${PORTS_RSYNC_SOURCE}"
 +	@echo "--------------------------------------------------------------"
 +	@${RSYNC} ${RSYNC_FLAGS} ${PORTS_RSYNC_SOURCE}/ ${.CURDIR}/
 +.elif exists(${.CURDIR}/.svn)
  	@echo "--------------------------------------------------------------"
  	@echo ">>> Updating ${.CURDIR} using Subversion"
  	@echo "--------------------------------------------------------------"
 
 --------------070605030106040406050301--
>Unformatted:
