From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 26 22:20:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CDD9106564A for ; Thu, 26 Feb 2009 22:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE3778FC0C for ; Thu, 26 Feb 2009 22:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1QMK20T053425 for ; Thu, 26 Feb 2009 22:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1QMK2of053424; Thu, 26 Feb 2009 22:20:02 GMT (envelope-from gnats) Date: Thu, 26 Feb 2009 22:20:02 GMT Message-Id: <200902262220.n1QMK2of053424@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "V.Chukharev" Cc: Subject: Re: conf/129697: [patch] fix misbehavior of periodic/daily/100.clean-disks vs. port lang/sbcl X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "V.Chukharev" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 22:20:03 -0000 The following reply was made to PR conf/129697; it has been noted by GNATS. From: "V.Chukharev" To: bug-followup@freebsd.org Cc: bf2006a@yahoo.com, stas@freebsd.org Subject: Re: conf/129697: [patch] fix misbehavior of periodic/daily/100.clean-disks vs. port lang/sbcl Date: Thu, 26 Feb 2009 22:15:44 +0200 ------------xXxCcXc7yyywJqmosxGFwo Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit I have made a new patch. Now it uses full path to the preserved files. Among other files, sbcl installs two a.out files, and preserving all files with this name like the original patch did is too much I think. I've used the patch with the following lines in /etc/periodic.conf for few days now. daily_clean_disks_enable="YES" # Delete files daily #daily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*" daily_clean_disks_days=2 # If older than this daily_clean_disks_ignore="$daily_clean_disks_ignore /usr/local/lib/sbcl/sbcl.core" # lang/sbcl daily_clean_disks_ignore="$daily_clean_disks_ignore /usr/local/lib/sbcl/sb-bsd-sockets/a.out" # lang/sbcl daily_clean_disks_ignore="$daily_clean_disks_ignore /usr/local/lib/sbcl/sb-posix/a.out" # lang/sbcl daily_clean_disks_ignore="$daily_clean_disks_ignore /usr/local/lib/maxima/5.*/binary-sbcl/maxima.core" # math/maxima Of course, all these changes to periodic is actially only a temporary amendment. The real solution is to enforce the ports policy of renaming all files corresponding to the special cases. I have filed another PR ports/131790 with a feature request to portlint that it warns about the name collisions like these. I CC to port maintainers of math/maxima and lang/sbcl so that they know about the issue and might try to rename the offending files. -- V. Chukharev ------------xXxCcXc7yyywJqmosxGFwo Content-Disposition: attachment; filename=100.clean-disks.patch2.txt Content-Type: text/plain; name=100.clean-disks.patch2.txt Content-Transfer-Encoding: 7bit --- /etc/periodic/daily/100.clean-disks.orig 2007-12-24 12:11:21.000000000 +0200 +++ /etc/periodic/daily/100.clean-disks 2009-02-25 15:12:53.000000000 +0200 @@ -29,10 +29,18 @@ echo "" echo "Cleaning disks:" set -f noglob - args="$args -name "`echo "$daily_clean_disks_files" | + args="$args ( -name "`echo "$daily_clean_disks_files" | sed -e 's/^[ ]*//' \ -e 's/[ ]*$//' \ - -e 's/[ ][ ]*/ -o -name /g'` + -e 's/[ ][ ]*/ -o -name /g'`" )" + + if ! [ -z "$daily_clean_disks_ignore" ] + then + args="$args -a ! ( -path "`echo "$daily_clean_disks_ignore" | + sed -e 's/^[ ]*//' \ + -e 's/[ ]*$//' \ + -e 's/[ ][ ]*/ -o -path /g'`" )" + fi case "$daily_clean_disks_verbose" in [Yy][Ee][Ss]) @@ -41,9 +49,9 @@ print=;; esac - rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ - \( $args \) -atime +$daily_clean_disks_days -delete $print | - tee /dev/stderr | wc -l) + command="find / ( ! -fstype local -o -fstype rdonly ) -a -prune -o ( \ + ( $args ) -atime +$daily_clean_disks_days -delete $print )" + rc=$($command | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 [ $rc -gt 1 ] && rc=1 set -f glob ------------xXxCcXc7yyywJqmosxGFwo--