Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2018 14:24:49 +0000 (UTC)
From:      "Danilo G. Baio" <dbaio@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r476919 - in head/sysutils/duply: . files
Message-ID:  <201808111424.w7BEOnYc055541@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dbaio
Date: Sat Aug 11 14:24:49 2018
New Revision: 476919
URL: https://svnweb.freebsd.org/changeset/ports/476919

Log:
  sysutils/duply: Update to 2.1
  
  - Enable random by default in periodic script and anticongestion function [1]
    Periodic scripts that hit external servers can cause a "thundering herd"
    problem, whereby many systems' periodic scripts run at the same time, and
    overload the server.  To prevent this, such scripts should sleep for a
    random amount of time before hitting the external server.
  
  Changes:	http://duply.net/wiki/index.php/Duply-Changelog
  
  PR:		218443 [1]
  PR:		230308
  Submitted by:	Nathan <ndowens@yahoo.com>
  Reported by:	asomers [1]
  Approved by:	michael@ranner.eu (maintainer)

Modified:
  head/sysutils/duply/Makefile
  head/sysutils/duply/distinfo
  head/sysutils/duply/files/periodic_duply.in

Modified: head/sysutils/duply/Makefile
==============================================================================
--- head/sysutils/duply/Makefile	Sat Aug 11 14:24:24 2018	(r476918)
+++ head/sysutils/duply/Makefile	Sat Aug 11 14:24:49 2018	(r476919)
@@ -2,11 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	duply
-PORTVERSION=	1.10.1
+PORTVERSION=	2.1
 CATEGORIES=	sysutils
-MASTER_SITES=	SF/ftplicity/${PORTNAME}%20%28simple%20duplicity%29/${PORTVERSION:R}.x/
+MASTER_SITES=	https://duply.net/projects/ftplicity/files/latest/download/
 DISTNAME=	${PORTNAME}_${PORTVERSION}
-EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	michael@ranner.eu
 COMMENT=	Shell front end for the duplicity backup tool
@@ -17,11 +16,11 @@ LICENSE_FILE=	${WRKSRC}/gpl-2.0.txt
 RUN_DEPENDS=	duplicity:sysutils/duplicity \
 		bash:shells/bash
 
-USES=		python
+USES=		python tar:tgz
 
+NO_ARCH=	yes
 NO_BUILD=	yes
 
-PORTDOCS=	INSTALL.txt
 PLIST_FILES=	bin/duply ${PERIODICDIR}/${PERIODICFILE}
 PERIODICFILE?=	300.duply
 PERIODICDIR?=	${PREFIX}/etc/periodic/backup
@@ -35,9 +34,5 @@ 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}
-.	endfor
 
 .include <bsd.port.mk>

Modified: head/sysutils/duply/distinfo
==============================================================================
--- head/sysutils/duply/distinfo	Sat Aug 11 14:24:24 2018	(r476918)
+++ head/sysutils/duply/distinfo	Sat Aug 11 14:24:49 2018	(r476919)
@@ -1,2 +1,3 @@
-SHA256 (duply_1.10.1.tgz) = 78f3714b0dc39657e2b3030e206370d38205305ca484e212704dcf77f9e70d35
-SIZE (duply_1.10.1.tgz) = 36079
+TIMESTAMP = 1533248620
+SHA256 (duply_2.1.tgz) = a8d2bfa907aacbef1c66bf1079fa24e541ad63f5d0694029e4596b030f3cb244
+SIZE (duply_2.1.tgz) = 47010

Modified: head/sysutils/duply/files/periodic_duply.in
==============================================================================
--- head/sysutils/duply/files/periodic_duply.in	Sat Aug 11 14:24:24 2018	(r476918)
+++ head/sysutils/duply/files/periodic_duply.in	Sat Aug 11 14:24:49 2018	(r476919)
@@ -20,8 +20,10 @@
 # backup_duply_opt=""
 #	options passed to duply
 #
-# backup_duply_random="0"
+# backup_duply_random="3600"
 #	randomize backup time
+#	In FreeBSD 12.0 is used the anticongestion function (3600) and this
+#	variable is ignored
 #
 
 if [ -r /etc/defaults/periodic.conf ]
@@ -34,14 +36,20 @@ fi
 : ${backup_duply_command}="bkp_status"
 : ${backup_duply_profile}=""
 : ${backup_duply_opt}=""
-: ${backup_duply_random}="0"
+: ${backup_duply_random}="3600"
 
 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})
+	# In FreeBSD 12.0 the anticongestion function should be used
+	# instead of a hard-coded sleep
+	if [ -n "$anticongestion_sleeptime" ]; then
+		anticongestion
+	else
+		eval sleep $(jot -r 1 0 ${backup_duply_random})
+	fi
 	echo
         echo "Duply Backup:"
         for duply_profile in ${backup_duply_profile}



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