From claudius@ambtec.de  Sun Mar 16 22:23:19 2014
Return-Path: <claudius@ambtec.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id DD413F76
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Mar 2014 22:23:19 +0000 (UTC)
Received: from server.ambtec.de (server.ambtec.de [IPv6:2a01:4f8:151:7182::2])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 87033BA9
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 16 Mar 2014 22:23:19 +0000 (UTC)
Received: from server.ambtec.de (localhost [IPv6:::1])
	by server.ambtec.de (Postfix) with ESMTP id E1EE64C8B;
	Sun, 16 Mar 2014 23:23:09 +0100 (CET)
Received: from server.ambtec.de ([IPv6:::1])
	by server.ambtec.de (server.ambtec.de [IPv6:::1]) (amavisd-new, port 10024)
	with LMTP id xnFZbiS6ZExF; Sun, 16 Mar 2014 23:23:03 +0100 (CET)
Received: by server.ambtec.de (Postfix, from userid 1001)
	id 93E484C85; Sun, 16 Mar 2014 23:23:03 +0100 (CET)
Message-Id: <20140316222303.93E484C85@server.ambtec.de>
Date: Sun, 16 Mar 2014 23:23:03 +0100 (CET)
From: Claudius Herder <claudius.herder@ambtec.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: michael@ranner.eu
Subject: [PATCH] sysutils/duply: add periodic script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         187643
>Category:       ports
>Synopsis:       [PATCH] sysutils/duply: add periodic script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 16 22:30:00 UTC 2014
>Closed-Date:    Mon Mar 24 20:30:40 UTC 2014
>Last-Modified:  Mon Mar 24 20:40:00 UTC 2014
>Originator:     Claudius Herder <claudius.herder@ambtec.de>
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD server.ambtec.de 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r263203: Sat Mar 15 10:48:26 CET
>Description:
 add script to run duply from periodic(8)

Port maintainer (michael@ranner.eu) is cc'd.

Generated with FreeBSD Port Tools 1.00.2014.03.11 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:

--- duply-1.6.0.patch begins here ---
diff -ruN ../duply.orig/Makefile ./Makefile
--- ../duply.orig/Makefile	2014-03-16 22:34:11.645356601 +0100
+++ ./Makefile	2014-03-16 22:52:01.597750480 +0100
@@ -16,18 +16,24 @@
 LICENSE_FILE=	${WRKSRC}/gpl-2.0.txt
 
 RUN_DEPENDS=	duplicity:${PORTSDIR}/sysutils/duplicity \
-				bash:${PORTSDIR}/shells/bash
+		bash:${PORTSDIR}/shells/bash
 
 NO_BUILD=	yes
 
 PORTDOCS=	INSTALL.txt gpl-2.0.txt
-PLIST_FILES=	bin/duply
+PLIST_FILES=	bin/duply ${PERIODICDIR}/${PERIODICFILE}
+PLIST_DIRS=	etc/periodic ${PERIODICDIR}
+PERIODICFILE?=	300.duply
+PERIODICDIR?=	${PREFIX}/etc/periodic/backup
+SUB_FILES=	pkg-message periodic_duply
 
 post-patch:
 	${REINPLACE_CMD} -e "s,/etc/duply,${ETCDIR},g" ${WRKSRC}/duply
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/duply ${STAGEDIR}${PREFIX}/bin/duply
+	@${MKDIR} ${STAGEDIR}${PERIODICDIR}
+	${INSTALL_SCRIPT} ${WRKDIR}/periodic_duply ${STAGEDIR}${PERIODICDIR}/${PERIODICFILE}
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .	for i in ${PORTDOCS}
 	  ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
diff -ruN ../duply.orig/files/periodic_duply.in ./files/periodic_duply.in
--- ../duply.orig/files/periodic_duply.in	1970-01-01 01:00:00.000000000 +0100
+++ ./files/periodic_duply.in	2014-03-16 22:52:08.752803008 +0100
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# periodic(8) script that runs duply on a nightly basis
+#
+# Define these variables in either /etc/periodic.conf or
+# /etc/periodic.conf.local to override the defaults.
+#
+# Configuration Settings (with default values):
+#
+# backup_duply_enable="NO"
+#	enable duply backup
+#
+# backup_duply_profile=""
+#	default duply profile to use
+#	see duply usage
+#
+# backup_duply_command="bkp_status"
+#	default duply commands
+#
+# backup_duply_opt=""
+#	options passed to duply
+#
+# backup_duply_random="0"
+#	randomize backup time
+#
+
+if [ -r /etc/defaults/periodic.conf ]
+then
+    . /etc/defaults/periodic.conf
+    source_periodic_confs
+fi
+
+: ${backup_duply_enable}="NO"
+: ${backup_duply_command}="bkp_status"
+: ${backup_duply_profile}=""
+: ${backup_duply_opt}=""
+: ${backup_duply_random}="0"
+
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
+export PATH
+
+case "$backup_duply_enable" in
+    [Yy][Ee][Ss])
+	eval sleep $(jot -r 1 0 ${backup_duply_random})
+	echo
+        echo "Duply Backup:"
+        eval duply ${backup_duply_profile} ${backup_duply_command} ${backup_duply_opt}
+        if [ $? -gt 0 ]
+        then
+            echo "Errors were reported during backup."
+            rc=3
+        fi
+        ;;
+esac
+
+exit $rc
+
diff -ruN ../duply.orig/files/pkg-message.in ./files/pkg-message.in
--- ../duply.orig/files/pkg-message.in	1970-01-01 01:00:00.000000000 +0100
+++ ./files/pkg-message.in	2014-03-16 22:52:08.752803008 +0100
@@ -0,0 +1,25 @@
+
+	To run duply periodically you can add these options to your
+	/etc/periodic.conf or /etc/periodic.conf.local
+
+         Configuration Settings (with default values):
+        
+         backup_duply_enable="NO"
+        	enable duply backup
+        
+         backup_duply_profile=""
+        	default duply profile to use
+        	see duply usage
+        
+         backup_duply_command="bkp_status"
+        	default duply commands
+        
+         backup_duply_opt=""
+        	options passed to duply
+        
+         backup_duply_random="0"
+        	randomize backup time
+        
+
+	Add these lines to your /etc/crontab
+	10	3	*	*	*	root	periodic backup
diff -ruN ../duply.orig/pkg-descr ./pkg-descr
--- ../duply.orig/pkg-descr	2014-03-16 22:34:11.645356601 +0100
+++ ./pkg-descr	2014-03-16 17:29:18.688540000 +0100
@@ -3,4 +3,4 @@
 job profiles, batch commands and more. Who says secure
 backups on non-trusted spaces are no child's play. 
 
-WWW:	http://duply.net
+WWW: http://duply.net
--- duply-1.6.0.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Mar 16 22:30:06 UTC 2014 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: michael@ranner.eu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/187643: [PATCH] sysutils/duply: add periodic script
Date: Sun, 16 Mar 2014 22:30:05 UT

 Maintainer of sysutils/duply,
 
 Please note that PR ports/187643 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/187643
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Michael Ranner <michael@ranner.eu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187643: [PATCH] sysutils/duply: add periodic script
Date: Mon, 17 Mar 2014 10:19:36 +0100

 This is a multi-part message in MIME format.
 --------------010102090604020905010704
 Content-Type: text/plain; charset=ISO-8859-15; format=flowed
 Content-Transfer-Encoding: 8bit
 
 Approved!
 
 -- 
 Mit freundlichen Gren
 
 Ing. Michael Ranner
 
 GSM:  +43 676 4155044
 Mail: michael@ranner.eu
 WWW:  http://www.azedo.at/
 
 --------------010102090604020905010704--
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Mon Mar 17 16:20:28 UTC 2014 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187643 
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Mon Mar 24 20:10:16 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187643 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Mon Mar 24 20:30:39 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187643: commit references a PR
Date: Mon, 24 Mar 2014 20:30:25 +0000 (UTC)

 Author: pawel
 Date: Mon Mar 24 20:30:21 2014
 New Revision: 349065
 URL: http://svnweb.freebsd.org/changeset/ports/349065
 QAT: https://qat.redports.org/buildarchive/r349065/
 
 Log:
   Add periodic script
   
   PR:		ports/187643
   Submitted by:	Claudius Herder <claudius.herder@ambtec.de>
   Approved by:	maintainer
 
 Added:
   head/sysutils/duply/files/
   head/sysutils/duply/files/periodic_duply.in   (contents, props changed)
   head/sysutils/duply/files/pkg-message.in   (contents, props changed)
 Modified:
   head/sysutils/duply/Makefile
   head/sysutils/duply/pkg-descr
 
 Modified: head/sysutils/duply/Makefile
 ==============================================================================
 --- head/sysutils/duply/Makefile	Mon Mar 24 20:30:00 2014	(r349064)
 +++ head/sysutils/duply/Makefile	Mon Mar 24 20:30:21 2014	(r349065)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	duply
  PORTVERSION=	1.6.0
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	sysutils
  MASTER_SITES=	SF/ftplicity/${PORTNAME}%20%28simple%20duplicity%29/1.6.x/
  DISTNAME=	${PORTNAME}_${PORTVERSION}
 @@ -16,18 +16,24 @@ LICENSE=	GPLv2
  LICENSE_FILE=	${WRKSRC}/gpl-2.0.txt
  
  RUN_DEPENDS=	duplicity:${PORTSDIR}/sysutils/duplicity \
 -				bash:${PORTSDIR}/shells/bash
 +		bash:${PORTSDIR}/shells/bash
  
  NO_BUILD=	yes
  
  PORTDOCS=	INSTALL.txt gpl-2.0.txt
 -PLIST_FILES=	bin/duply
 +PLIST_FILES=	bin/duply ${PERIODICDIR}/${PERIODICFILE}
 +PLIST_DIRSTRY=	etc/periodic ${PERIODICDIR}
 +PERIODICFILE?=	300.duply
 +PERIODICDIR?=	${PREFIX}/etc/periodic/backup
 +SUB_FILES=	pkg-message periodic_duply
  
  post-patch:
  	${REINPLACE_CMD} -e "s,/etc/duply,${ETCDIR},g" ${WRKSRC}/duply
  
  do-install:
  	${INSTALL_SCRIPT} ${WRKSRC}/duply ${STAGEDIR}${PREFIX}/bin/duply
 +	@${MKDIR} ${STAGEDIR}${PERIODICDIR}
 +	${INSTALL_SCRIPT} ${WRKDIR}/periodic_duply ${STAGEDIR}${PERIODICDIR}/${PERIODICFILE}
  	@${MKDIR} ${STAGEDIR}${DOCSDIR}
  .	for i in ${PORTDOCS}
  	  ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
 
 Added: head/sysutils/duply/files/periodic_duply.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/sysutils/duply/files/periodic_duply.in	Mon Mar 24 20:30:21 2014	(r349065)
 @@ -0,0 +1,57 @@
 +#!/bin/sh
 +#
 +# periodic(8) script that runs duply on a nightly basis
 +#
 +# Define these variables in either /etc/periodic.conf or
 +# /etc/periodic.conf.local to override the defaults.
 +#
 +# Configuration Settings (with default values):
 +#
 +# backup_duply_enable="NO"
 +#	enable duply backup
 +#
 +# backup_duply_profile=""
 +#	default duply profile to use
 +#	see duply usage
 +#
 +# backup_duply_command="bkp_status"
 +#	default duply commands
 +#
 +# backup_duply_opt=""
 +#	options passed to duply
 +#
 +# backup_duply_random="0"
 +#	randomize backup time
 +#
 +
 +if [ -r /etc/defaults/periodic.conf ]
 +then
 +    . /etc/defaults/periodic.conf
 +    source_periodic_confs
 +fi
 +
 +: ${backup_duply_enable}="NO"
 +: ${backup_duply_command}="bkp_status"
 +: ${backup_duply_profile}=""
 +: ${backup_duply_opt}=""
 +: ${backup_duply_random}="0"
 +
 +PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
 +export PATH
 +
 +case "$backup_duply_enable" in
 +    [Yy][Ee][Ss])
 +	eval sleep $(jot -r 1 0 ${backup_duply_random})
 +	echo
 +        echo "Duply Backup:"
 +        eval duply ${backup_duply_profile} ${backup_duply_command} ${backup_duply_opt}
 +        if [ $? -gt 0 ]
 +        then
 +            echo "Errors were reported during backup."
 +            rc=3
 +        fi
 +        ;;
 +esac
 +
 +exit $rc
 +
 
 Added: head/sysutils/duply/files/pkg-message.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/sysutils/duply/files/pkg-message.in	Mon Mar 24 20:30:21 2014	(r349065)
 @@ -0,0 +1,25 @@
 +
 +	To run duply periodically you can add these options to your
 +	/etc/periodic.conf or /etc/periodic.conf.local
 +
 +         Configuration Settings (with default values):
 +        
 +         backup_duply_enable="NO"
 +        	enable duply backup
 +        
 +         backup_duply_profile=""
 +        	default duply profile to use
 +        	see duply usage
 +        
 +         backup_duply_command="bkp_status"
 +        	default duply commands
 +        
 +         backup_duply_opt=""
 +        	options passed to duply
 +        
 +         backup_duply_random="0"
 +        	randomize backup time
 +        
 +
 +	Add these lines to your /etc/crontab
 +	10	3	*	*	*	root	periodic backup
 
 Modified: head/sysutils/duply/pkg-descr
 ==============================================================================
 --- head/sysutils/duply/pkg-descr	Mon Mar 24 20:30:00 2014	(r349064)
 +++ head/sysutils/duply/pkg-descr	Mon Mar 24 20:30:21 2014	(r349065)
 @@ -3,4 +3,4 @@ It greatly simplifies its usage by imple
  job profiles, batch commands and more. Who says secure
  backups on non-trusted spaces are no child's play. 
  
 -WWW:	http://duply.net
 +WWW: http://duply.net
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
