From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 28 20:30:12 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57AB116A41C for ; Sat, 28 May 2005 20:30:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E64CD43D4C for ; Sat, 28 May 2005 20:30:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4SKUBRa078045 for ; Sat, 28 May 2005 20:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4SKU9TN078038; Sat, 28 May 2005 20:30:11 GMT (envelope-from gnats) Resent-Date: Sat, 28 May 2005 20:30:11 GMT Resent-Message-Id: <200505282030.j4SKU9TN078038@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KIMURA Yasuhiro Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7B2416A41C for ; Sat, 28 May 2005 20:24:53 +0000 (GMT) (envelope-from yasu@home.utahime.org) Received: from utahime.as.wakwak.ne.jp (utahime.as.wakwak.ne.jp [61.205.238.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8BB143D48 for ; Sat, 28 May 2005 20:24:52 +0000 (GMT) (envelope-from yasu@home.utahime.org) Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1]) by utahime.as.wakwak.ne.jp (Postfix) with ESMTP id 5C451B86E for ; Sun, 29 May 2005 05:24:49 +0900 (JST) Received: from localhost.home.utahime.org (localhost.home.utahime.org [127.0.0.1]) by localhost-backdoor.home.utahime.org (Postfix) with ESMTP id 28A7054BC; Sun, 29 May 2005 05:24:49 +0900 (JST) Received: from eastasia.home.utahime.org (localhost.home.utahime.org [127.0.0.1]) by localhost.home.utahime.org (AvMailGate-2.0.2-14) id 38186-3F40D559; Sun, 29 May 2005 05:24:48 +0900 Received: by eastasia.home.utahime.org (Postfix, from userid 1000) id E40DA54B4; Sun, 29 May 2005 05:24:48 +0900 (JST) Message-Id: <20050528202448.E40DA54B4@eastasia.home.utahime.org> Date: Sun, 29 May 2005 05:24:48 +0900 (JST) From: KIMURA Yasuhiro To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/81598: [PATCH] net/cvsup-mirror: add some install time options for update.sh X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2005 20:30:12 -0000 >Number: 81598 >Category: ports >Synopsis: [PATCH] net/cvsup-mirror: add some install time options for update.sh >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 28 20:30:08 GMT 2005 >Closed-Date: >Last-Modified: >Originator: KIMURA Yasuhiro >Release: FreeBSD 4.11-RELEASE-p9 i386 >Organization: >Environment: System: FreeBSD xxxx 4.11-RELEASE-p9 FreeBSD 4.11-RELEASE-p9 #0: Sat May 14 11:16:09 JST 2005 xxxx i386 >Description: Add following install time options for update.sh - Whether or not /var/log/cvsup.log is rotated when update.sh is invoked. - Maximum number of log files. - Wheter or not old log file is gzipped after rotated. >How-To-Repeat: >Fix: --- patch-cvsup-mirror begins here --- Index: Makefile =================================================================== RCS file: /net/freebsd/cvsroot/ports/net/cvsup-mirror/Makefile,v retrieving revision 1.21 diff -u -r1.21 Makefile --- Makefile 5 Aug 2004 23:37:47 -0000 1.21 +++ Makefile 28 May 2005 19:19:54 -0000 @@ -7,7 +7,7 @@ PORTNAME= cvsup-mirror PORTVERSION= 1.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net DISTFILES= Index: files/update.sh =================================================================== RCS file: /net/freebsd/cvsroot/ports/net/cvsup-mirror/files/update.sh,v retrieving revision 1.17 diff -u -r1.17 update.sh --- files/update.sh 5 Aug 2004 23:37:47 -0000 1.17 +++ files/update.sh 28 May 2005 19:35:55 -0000 @@ -11,26 +11,27 @@ lock=/var/spool/lock/cvsup.lock log=/var/log/cvsup.log +base=${PREFIX}/etc/cvsup -num_logs=8 -use_gzip=0 +. ${base}/config.sh || exit -if [ ${use_gzip} != 0 ] -then - gz_ext=.gz -fi +umask 22 -# Rotate the log files +if [ ${rotatelog} != 0 ]; then -umask 22 + if [ ${gziplog} != 0 ]; then + gz_ext=.gz + fi -for i in $(/usr/bin/jot ${num_logs} $((${num_logs}-1)) 0) -do + # Rotate the log files + for i in $(/usr/bin/jot ${numlogs} $((${numlogs}-1)) 0) + do test -f ${log}.$i${gz_ext} && mv -f ${log}.$i${gz_ext} ${log}.$(($i+1))${gz_ext} -done + done + test -f ${log} && mv -f ${log} ${log}.0 && [ ${gziplog} != 0 ] && gzip -9 ${log}.0 +fi -test -f ${log} && mv -f ${log} ${log}.0 && [ ${use_gzip} != 0 ] && /usr/bin/gzip -9 ${log}.0 -exec >${log} 2>&1 +exec >>${log} 2>&1 # Do the update Index: scripts/configure =================================================================== RCS file: /net/freebsd/cvsroot/ports/net/cvsup-mirror/scripts/configure,v retrieving revision 1.8 diff -u -r1.8 configure --- scripts/configure 9 Jul 2000 17:57:33 -0000 1.8 +++ scripts/configure 28 May 2005 19:18:22 -0000 @@ -2,7 +2,7 @@ base=${PREFIX}/etc/cvsup variables="user group cuser cgroup host interval \ - maxclients facility distribs" + maxclients facility distribs rotatelog numlogs gziplog" ask() { local question default answer @@ -174,6 +174,50 @@ echo "Please answer with a number" done +cat </dev/null 2>&1; then + break + fi + echo "Please answer with a positive integer" + done + + cat <Release-Note: >Audit-Trail: >Unformatted: