summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING10
-rw-r--r--news/inn/Makefile4
-rw-r--r--news/inn/pkg-install11
-rw-r--r--news/inn/pkg-plist25
4 files changed, 42 insertions, 8 deletions
diff --git a/UPDATING b/UPDATING
index 943a2c0d707f..b2d6380b4f7d 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,16 @@ You should get into the habit of checking this file for changes each
time you update your ports collection, before attempting any port
upgrades.
+20060528:
+ AFFECTS: users of news/inn
+ AUTHOR: shaun@inerd.com
+
+ The 2.4.3 port of inn has an unfortunate bug which causes inn's database files
+ to be erased during an uninstall or upgrade. Earlier versions are also
+ affected. The latest port revision fixes this, but before upgrading, users are
+ advised to move their ${PREFIX}/news/db directory out of the way, in order to
+ save the history, active and newsgroups databases from destruction.
+
20060526:
AFFECTS: users of security/amavisd-new
AUTHOR: gkovesdan@t-hosting.hu
diff --git a/news/inn/Makefile b/news/inn/Makefile
index 9c56789c903e..4579dd6cd97f 100644
--- a/news/inn/Makefile
+++ b/news/inn/Makefile
@@ -7,6 +7,7 @@
PORTNAME= inn
PORTVERSION= 2.4.3
+PORTREVISION= 1
CATEGORIES= news ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -147,6 +148,9 @@ post-patch:
@${REINPLACE_CMD} -e 's!-ltcl!-ltcl83!' ${WRKSRC}/configure
.endif
+pre-install:
+ @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
post-install:
.if !defined(WITHOUT_STRIP)
.for FILE in ${TO_BE_STRIPPED}
diff --git a/news/inn/pkg-install b/news/inn/pkg-install
index f3345e3dccac..d0de05fe1623 100644
--- a/news/inn/pkg-install
+++ b/news/inn/pkg-install
@@ -6,6 +6,10 @@ PKG_PREFIX=${PKG_PREFIX:-/usr/local}
case $2 in
PRE-INSTALL)
+ echo "===> Checking for old database files"
+ if [ ! -d ${PKG_PREFIX}/news/db ]; then
+ mkdir -p ${PKG_PREFIX}/news/db.dist
+ fi
;;
CHECK-CONF)
ETC_DIR=${3}
@@ -37,6 +41,13 @@ case $2 in
${NEWSBASE}/spool/outgoing \
${NEWSBASE}/spool/overview \
${NEWSBASE}/spool/tmp
+
+ if [ -d ${NEWSBASE}/db.dist -a ! -f ${NEWSBASE}/db.dist/* ]; then
+ for f in ${NEWSBASE}/db/*; do
+ cp -pR ${f} ${NEWSBASE}/db.dist
+ done
+ fi
+
;;
*)
echo "Unexpected Argument $2!!!"
diff --git a/news/inn/pkg-plist b/news/inn/pkg-plist
index f48e59f56d1e..e33028e1958a 100644
--- a/news/inn/pkg-plist
+++ b/news/inn/pkg-plist
@@ -100,14 +100,22 @@ news/bin/startinnfeed
news/bin/tally.control
news/bin/tdx-util
news/bin/writelog
-news/db/active
-news/db/active.times
-news/db/history
-news/db/history.dir
-%%SUB_WITHOUT_TAGGED_HASH%%news/db/history.hash
-%%SUB_WITHOUT_TAGGED_HASH%%news/db/history.index
-%%SUB_WITH_TAGGED_HASH%%news/db/history.pag
-news/db/newsgroups
+@unexec f=active; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+@unexec f=active.times; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+@unexec f=history; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+@unexec f=history.dir; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+@unexec f=newsgroups; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+@unexec rm -f %D/news/db.dist/active 2> /dev/null || true
+@unexec rm -f %D/news/db.dist/active.times 2> /dev/null || true
+@unexec rm -f %D/news/db.dist/history 2> /dev/null || true
+@unexec rm -f %D/news/db.dist/history.dir 2> /dev/null || true
+@unexec rm -f %D/news/db.dist/newsgroups 2> /dev/null || true
+%%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.hash; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+%%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.index; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+%%SUB_WITHOUT_TAGGED_HASH%%@unexec rm -f %D/news/db.dist/history.hash 2> /dev/null || true
+%%SUB_WITHOUT_TAGGED_HASH%%@unexec rm -f %D/news/db.dist/history.index 2> /dev/null || true
+%%SUB_WITH_TAGGED_HASH%%@unexec f=history.pag; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi
+%%SUB_WITH_TAGGED_HASH%%@unexec rm -f %D/news/db.dist/history.pag 2> /dev/null || true
news/doc/CONTRIBUTORS
news/doc/GPL
news/doc/HACKING
@@ -265,6 +273,7 @@ news/lib/libstorage.a
@dirrmtry %%ETCDIR%%
@dirrm news/doc
@dirrmtry news/db
+@dirrmtry news/db.dist
@dirrm news/bin/rnews.libexec
@dirrm news/bin/filter
@dirrm news/bin/control