[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#691204: unblock: trn/3.6-23



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package trn

I've just uploaded trn 3.6-23, which fixes the release-critical bug 
#681332. It does this by using debconf (specifically, the shared 
template that e.g. trn4 uses) to prompt about /etc/news/server if 
necessary during the configuration stage, rather than in postinst.

unblock trn/3.6-23

Diff:

diff -ruN trn-3.6-22/debian/changelog trn-3.6-23/debian/changelog
--- trn-3.6-22/debian/changelog	2012-03-13 15:11:28.000000000 +0000
+++ trn-3.6-23/debian/changelog	2012-10-22 21:45:25.000000000 +0100
@@ -1,3 +1,10 @@
+trn (3.6-23) unstable; urgency=high
+
+  * use the shared/news/server debconf template rather than prompting in
+    postinst (closes: #688563)
+
+ -- Matthew Vernon <matthew@debian.org>  Mon, 22 Oct 2012 21:45:25 +0100
+
 trn (3.6-22) unstable; urgency=low
 
   * Mark package as autobuildable, per
diff -ruN trn-3.6-22/debian/config trn-3.6-23/debian/config
--- trn-3.6-22/debian/config	2001-04-09 17:11:29.000000000 +0100
+++ trn-3.6-23/debian/config	2012-10-22 21:49:59.000000000 +0100
@@ -95,6 +95,8 @@
         cp -f NEW debian/tmp/usr/share/doc/trn/trn-changes
         gzip -9vf debian/tmp/usr/share/doc/trn/trn-changes
         cp -f README debian/tmp/usr/share/doc/trn/trn-readme
+	install -m 755 debian/config.debconf debian/tmp/DEBIAN/config
+	cp -f debian/templates debian/tmp/DEBIAN/
 endef
 
 # After being installed in debian/tmp, everything is chowned to root.root,
diff -ruN trn-3.6-22/debian/config.debconf trn-3.6-23/debian/config.debconf
--- trn-3.6-22/debian/config.debconf	1970-01-01 01:00:00.000000000 +0100
+++ trn-3.6-23/debian/config.debconf	2012-10-22 21:36:36.000000000 +0100
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+
+# Debconf script for trn3; gets installed as DEBIAN/config
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# Useful system information.
+hostname=`hostname --fqdn 2>/dev/null || true`
+domainname=`dnsdomainname 2>/dev/null || true`
+
+# Default news server.
+if [ ! -s /etc/news/server ]; then
+    db_get shared/news/server
+    nntpserver="$RET"
+    if [ -z "$nntpserver" ]; then
+        # Try to guess a good value for the NNTP server.
+        if [ "$domainname" ]; then
+            nntpserver="news.$domainname"
+        else
+            nntpserver="$hostname"
+        fi
+    fi
+    db_set shared/news/server "$nntpserver"
+    db_input medium shared/news/server || true
+    db_go || true
+fi
diff -ruN trn-3.6-22/debian/control trn-3.6-23/debian/control
--- trn-3.6-22/debian/control	2012-03-13 15:11:53.000000000 +0000
+++ trn-3.6-23/debian/control	2012-10-22 21:42:01.000000000 +0100
@@ -8,7 +8,7 @@
 
 Package: trn
 Architecture: any
-Depends: ${shlibs:Depends}, inews|inewsinn
+Depends: ${shlibs:Depends}, inews|inewsinn, debconf (>= 0.5)
 Recommends: mail-transport-agent
 Provides: news-reader
 Suggests: ispell
diff -ruN trn-3.6-22/debian/postinst trn-3.6-23/debian/postinst
--- trn-3.6-22/debian/postinst	2001-04-09 16:52:55.000000000 +0100
+++ trn-3.6-23/debian/postinst	2012-10-22 21:39:41.000000000 +0100
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+. /usr/share/debconf/confmodule
+
 case "$1" in
 	configure)
 		;;
@@ -43,13 +45,5 @@
 	chmod 755 news
 fi
 
-echo -n \
-'Trn is configured to read news via a NNTP connection. If
-you have a local news spool, you should consider installing
-nntpd; enter \"localhost\" below in that case.
-What news server (NNTP server) should I use for reading
- - enter its full name: '
-
-read server
-
-echo "$server" >news/server
+db_get shared/news/server
+echo "$RET" > news/server
diff -ruN trn-3.6-22/debian/templates trn-3.6-23/debian/templates
--- trn-3.6-22/debian/templates	1970-01-01 01:00:00.000000000 +0100
+++ trn-3.6-23/debian/templates	2012-10-22 21:37:01.000000000 +0100
@@ -0,0 +1,7 @@
+Template: shared/news/server
+Type: string
+Description: What news server should be used for reading and posting news?
+ trn is configured to read news via an NNTP connection, and needs to know
+ the fully-qualified host name of the server (such as news.example.com). If
+ you have a local news spool, you should consider installing some NNTP
+ server like inn2; in that case, enter "localhost" as your news server.


-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


Reply to: