ports/82441: [MAINTAINER] mail/bogofilter: fix bf_resize bashisms
Matthias Andree
matthias.andree at gmx.de
Mon Jun 20 12:10:23 UTC 2005
>Number: 82441
>Category: ports
>Synopsis: [MAINTAINER] mail/bogofilter: fix bf_resize bashisms
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 20 12:10:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Matthias Andree
>Release: FreeBSD 4.11-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 4.11-RELEASE-p10 FreeBSD 4.11-RELEASE-p10 #0: Fri Jun 10 15:59:46 CEST 2005
>Description:
fix bf_resize bashisms.
Reported by: Andrey Chernov (Bcc'd to protect his address)
Added file(s):
- files/patch-src_bf__resize.in
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- bogofilter-0.94.14_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/Makefile /usr/home/emma/ports/mail/bogofilter/Makefile
--- /usr/ports/mail/bogofilter/Makefile Wed Jun 15 18:44:37 2005
+++ /usr/home/emma/ports/mail/bogofilter/Makefile Mon Jun 20 13:55:51 2005
@@ -7,7 +7,7 @@
PORTNAME= bogofilter
PORTVERSION= 0.94.14
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff -ruN --exclude=CVS /usr/ports/mail/bogofilter/files/patch-src_bf__resize.in /usr/home/emma/ports/mail/bogofilter/files/patch-src_bf__resize.in
--- /usr/ports/mail/bogofilter/files/patch-src_bf__resize.in Thu Jan 1 01:00:00 1970
+++ /usr/home/emma/ports/mail/bogofilter/files/patch-src_bf__resize.in Mon Jun 20 13:55:23 2005
@@ -0,0 +1,29 @@
+--- a/src/bf_resize.in Mon Jun 13 21:56:45 2005
++++ b/src/bf_resize.in Mon Jun 20 13:50:17 2005
+@@ -35,19 +35,19 @@
+ # count pages in database files
+ for DB in $DATABASES ; do
+ COUNT=`bogoutil --db-print-leafpage-count="$DB"`
+- let PAGES="$PAGES + $COUNT"
++ PAGES=$(( $PAGES + $COUNT ))
+ done
+
+ # be generous, double count
+-let PAGES="$PAGES + $PAGES"
++PAGES=$(( $PAGES + $PAGES ))
+
+ # and update or create DB_CONFIG
+ : >> "$BOGOHOME"/DB_CONFIG
+-(
+- set +e
+- egrep -v '^set_lk_max_(locks|objects)' "$BOGOHOME"/DB_CONFIG >"$BOGOHOME"/DB_CONFIG.new
+-)
+-if [ $? -ge 2 ] ; then exit 1 ; fi
++set +e
++egrep -v '^set_lk_max_(locks|objects)' "$BOGOHOME"/DB_CONFIG >"$BOGOHOME"/DB_CONFIG.new
++s=$?
++set -e
++if [ $s -ge 2 ] ; then exit 1 ; fi
+ echo >>"$BOGOHOME"/DB_CONFIG.new set_lk_max_locks $PAGES
+ echo >>"$BOGOHOME"/DB_CONFIG.new set_lk_max_objects $PAGES
+ mv "$BOGOHOME"/DB_CONFIG.new "$BOGOHOME"/DB_CONFIG
--- bogofilter-0.94.14_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list