From owner-svn-ports-all@freebsd.org Fri Apr 7 07:11:42 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19499D32E33; Fri, 7 Apr 2017 07:11:42 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DF1FE7F2; Fri, 7 Apr 2017 07:11:41 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v377Bfv0007345; Fri, 7 Apr 2017 07:11:41 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v377BeqT007343; Fri, 7 Apr 2017 07:11:40 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201704070711.v377BeqT007343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Fri, 7 Apr 2017 07:11:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437913 - in head/mail/sa-utils: . 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.23 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: Fri, 07 Apr 2017 07:11:42 -0000 Author: matthew Date: Fri Apr 7 07:11:40 2017 New Revision: 437913 URL: https://svnweb.freebsd.org/changeset/ports/437913 Log: New version: 0.03 Add a random delay using the standard 'anticongestion' function (where available) before attempting to download updates. This to avoid the 'thundering herd' of many simultaneous downloads. PR: 218444 Reported by: asomers Modified: head/mail/sa-utils/Makefile head/mail/sa-utils/files/sa-utils.in Modified: head/mail/sa-utils/Makefile ============================================================================== --- head/mail/sa-utils/Makefile Fri Apr 7 05:34:13 2017 (r437912) +++ head/mail/sa-utils/Makefile Fri Apr 7 07:11:40 2017 (r437913) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= sa-utils -PORTVERSION= 0.02 -PORTREVISION= 2 +PORTVERSION= 0.03 CATEGORIES= mail MASTER_SITES= # none DISTFILES= # none Modified: head/mail/sa-utils/files/sa-utils.in ============================================================================== --- head/mail/sa-utils/files/sa-utils.in Fri Apr 7 05:34:13 2017 (r437912) +++ head/mail/sa-utils/files/sa-utils.in Fri Apr 7 07:11:40 2017 (r437913) @@ -142,6 +142,16 @@ case "$daily_sa_enable" in ;; esac + if [ "$1" != -nodelay ]; then + # In FreeBSD 12.0 the anticongestion function should be used + # instead of a hard-coded sleep + if [ -n "$anticongestion_sleeptime" ]; then + anticongestion + else + ${SLEEP} $(random) + fi + fi + update_rules || rc=$? case ${rc} in 0)