Your message dated Fri, 10 Jun 2005 11:34:19 +1000
with message-id <[EMAIL PROTECTED]>
and subject line portmap: Loses conffile in update from sarge -> sid
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 7 Jun 2005 19:44:41 +0000
>From [EMAIL PROTECTED] Tue Jun 07 12:44:40 2005
Return-path: <[EMAIL PROTECTED]>
Received: from tornado.dat.etsit.upm.es (dat.etsit.upm.es) [138.100.17.73]
by spohr.debian.org with smtp (Exim 3.35 1 (Debian))
id 1Dfk07-0001X9-00; Tue, 07 Jun 2005 12:44:39 -0700
Received: (qmail 24863 invoked by uid 1013); 7 Jun 2005 19:44:36 -0000
Date: Tue, 7 Jun 2005 21:44:36 +0200
From: Javier =?iso-8859-1?Q?Fern=E1ndez-Sanguino_Pe=F1a?= <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: portmap: Loses conffile in update from sarge -> sid
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="rV8arf8D5Dod9UkK"
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
--rV8arf8D5Dod9UkK
Content-Type: multipart/mixed; boundary="rMWmSaSbD7nr+du9"
Content-Disposition: inline
--rMWmSaSbD7nr+du9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Package: portmap
Version: 5-12
Priority: serious
Tags: pending patch sid
The configuration file change introduced in 5-11 (/etc/portmap.conf)=20
instead of reusing the conffile in 5-9 (/etc/default/portmap) does not=20
respect whatever changes the sysadmin might have introduced in the previous=
=20
configuration file which is ruthlessly removed on an upgrade. This is in=20
portmap's 5-12 preinst script:
if [ "$1" =3D "upgrade" ]; then
# get rid of /etc/default/portmap
[ -e /etc/default/portmap ] && rm -f /etc/default/portmap
fi
Now, this is a serious bug since configuration file changes should be=20
preserved. I have provide a 5-13 package to the maintainer (thus the=20
pending tag) that fixes this issue. The patch attached reflects the changes=
=20
=66rom 5-12 in order to handle the configuration file properly (reverting=
=20
back to /etc/default/portmap but keeping whatever the sysadmin had in=20
/etc/portmap.conf in case somebody modified it on sid).
The new version will probably fix some other bugs in both 5-12 and this=20
version (#309987) and might introduce some new bugs so we want to test it=
=20
properly first. The serious priority is not only justified, it will prevent=
=20
this package from moving into etch when the freeze is lifted.
Regards
Javier
--rMWmSaSbD7nr+du9
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="portmap.5-12-to-13.diff"
Content-Transfer-Encoding: quoted-printable
diff -Nru portmap-5-12/debian/changelog portmap-5/debian/changelog
--- portmap-5-12/debian/changelog 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/changelog 2005-06-07 21:21:35.000000000 +0200
@@ -1,3 +1,35 @@
+portmap (5-13) unstable; urgency=3Dhigh
+
+ * Reverted the configuration file change introduced in -11, the
+ configuration file is now /etc/default/portmap, it is handled=20
+ properly through maintainer scripts. I.e. the maintainer scripts=20
+ will not touch it if the user modifies it.
+ This prevents upgrades from sarge to etch from breaking, and fixes
+ the broken configuration file handling of previous releases thus the=
=20
+ high priority.
+ Note: Not implemented MD5 sum checks since there were at least
+ 3 different valid MD5sums, made more sense to parse the file
+ and read in the $OPTIONS value.
+ * Handle configuration file properly (both old and new):
+ * If upgrading from any version from 5-10 to 5-12 (included) then
+ move the configuration to the proper location.
+ * If upgrading from any version prior to 5-6 or installing first time
+ then generate the configuration file.
+ * Remove both configuration files (old and new) if present when
+ purging in postrm.
+ [ debian/potinst ]
+ * Warn the user that probably he has to restart other RPC services if=20
+ they are running and he has changed the OPTIONS
+ of the portmapper.
+ * Start and stop debconf invocation in postinst outside of if/then
+ condition or otherwise the 'init.d start' messages of portmap will not=
=20
+ be shown to standard output (the user might think it was stopped but=
=20
+ not started when --reconfiguring it)
+ * Added a debian/TODO file
+
+ -- Javier Fernandez-Sanguino Pen~a <[EMAIL PROTECTED]> Tue, 7 Jun 2005 1=
3:05:15 +0200
+
+
portmap (5-12) unstable; urgency=3Dhigh
=20
* Changed default of debconf question to correspond to the value
diff -Nru portmap-5-12/debian/config portmap-5/debian/config
--- portmap-5-12/debian/config 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/config 2005-06-07 21:17:40.000000000 +0200
@@ -3,14 +3,24 @@
=20
action=3D$1
version=3D$2
+CONFFILE=3D/etc/default/portmap
=20
-CONFFILE=3D/etc/portmap.conf
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
+check_md5() {
+# Checks MD5sum of a file and returns 0 if it matches,=20
+# 1 otherwise and 2 if any other error occurs
+ file=3D$1
+ md5sum=3D$2
+ retcode=3D1
+ [ ! -e "$file" ] && return 2
+ [ -z "$md5sum" ] && return 2
+ if md5sum $file $md5sum 2>/dev/null |grep -q $md5sum ; then
+ retcode=3D0
+ fi
+ return $retcode
+}
=20
-if [ ! -e $CONFFILE ] ; then
- cat <<EOF > $CONFFILE
+create_config() {
+ cat <<EOF > $CONFFILE
# Portmap configuration file
#
# Note: if you manually edit this configuration file,
@@ -23,21 +33,47 @@
# through debconf).
#OPTIONS=3D"-i 127.0.0.1"
EOF
- chmod 0644 $CONFFILE
+ chmod 0644 $CONFFILE
+}
+
+# On install only, create the config file if it does not exist
+#=20
+if [ ! -e $CONFFILE ] && [ "$action" =3D "configure" ] ; then
+ if [ -z "$version" ] ; then
+ create_config
+ elif [ -n "$version" ] && \
+ dpkg --compare-versions "$version" lt 5-6; then
+# or if upgrading from version older than 5-6 (which provided the file)
+ create_config
+ fi
fi
=20
-if [ -e $CONFFILE ]; then
+# Only make debconf questions if=20
+# a) the CONFFILE exists=20
+
+if [ -e $CONFFILE ] ; then
+ # Source debconf library.
. $CONFFILE || true
=20
+ . /usr/share/debconf/confmodule
+
+ # and b) has the expected content
+ expected=3D1
+
if [ "$OPTIONS" =3D "-i 127.0.0.1" ]; then
db_set portmap/loopback true
- else
+ expected=3D0
+ elif [ -z "$OPTIONS" ] ; then
+ expected=3D0
db_set portmap/loopback false
fi
+
+ if [ "$expected" -eq 0 ] ; then
+ db_input medium portmap/loopback || true
+ fi
+ db_go || true
fi
=20
-db_input medium portmap/loopback || true
-db_go || true
=20
#DEBHELPER#
=20
diff -Nru portmap-5-12/debian/init.d portmap-5/debian/init.d
--- portmap-5-12/debian/init.d 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/init.d 2005-06-07 20:03:11.000000000 +0200
@@ -5,7 +5,9 @@
test -f /sbin/portmap || exit 0
=20
OPTIONS=3D""
-if [ -f /etc/portmap.conf ]; then
+if [ -f /etc/default/portmap ]; then
+ . /etc/default/portmap
+elif [ -f /etc/portmap.conf ]; then
. /etc/portmap.conf
fi
=20
diff -Nru portmap-5-12/debian/po/cs.po portmap-5/debian/po/cs.po
--- portmap-5-12/debian/po/cs.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/cs.po 2005-06-07 20:03:11.000000000 +0200
@@ -15,7 +15,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-29 21:06+0200\n"
"Last-Translator: Miroslav Kure <[EMAIL PROTECTED]>\n"
"Language-Team: Czech <[EMAIL PROTECTED]>\n"
@@ -54,10 +54,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"Toto nastaven=ED m=F9=BEete zm=ECnit tak=E9 =FApravou =F8=E1dky OPTIONS v=
souboru /etc/"
"portmap.conf. Pokud nezad=E1te parametr -i, portmap se nav=E1=BEe na v=B9=
echna "
diff -Nru portmap-5-12/debian/po/da.po portmap-5/debian/po/da.po
--- portmap-5-12/debian/po/da.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/da.po 2005-06-07 20:03:11.000000000 +0200
@@ -14,7 +14,7 @@
msgstr ""
"Project-Id-Version: portmap debconf\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-29 10:41+0200\n"
"Last-Translator: Claus Hindsgaul <[EMAIL PROTECTED]>\n"
"Language-Team: Danish <[EMAIL PROTECTED]>\n"
@@ -55,10 +55,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"Du kan ogs=E5 =E6ndre denne indstilling ved at redigere OPTIONS-linjen i =
filen /"
"etc/portmap.conf. Hvis du slet ikke angiver tilvalget -i, vil den binde s=
ig "
diff -Nru portmap-5-12/debian/po/es.po portmap-5/debian/po/es.po
--- portmap-5-12/debian/po/es.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/es.po 2005-06-07 20:03:11.000000000 +0200
@@ -33,7 +33,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-23 22:30+0100\n"
"Last-Translator: Javier Fernandez-Sanguino Pea <[EMAIL PROTECTED]>\n"
"Language-Team: Debian Spanish <[email protected]>\n"
@@ -75,10 +75,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"Puede cambiar esta configuraci=C3=B3n editando la l=C3=ADnea OPTIONS en =
=C2=AB/etc/portmap."
"conf=C2=BB. Si no se especifica la opci=C3=B3n -i, el programa se enlazar=
=C3=A1 a todas las "
diff -Nru portmap-5-12/debian/po/fr.po portmap-5/debian/po/fr.po
--- portmap-5-12/debian/po/fr.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/fr.po 2005-06-07 20:03:11.000000000 +0200
@@ -14,7 +14,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-29 21:06+0200\n"
"Last-Translator: Stephane Fombonne <[EMAIL PROTECTED]>\n"
"Language-Team: French <[email protected]>\n"
@@ -54,10 +54,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"Vous pouvez =E9galement modifier cette configuration en =E9ditant la lign=
e "
"OPTIONS dans le fichier /etc/portmap.conf. Si vous n'y utilisez pas l'opt=
ion "
diff -Nru portmap-5-12/debian/po/it.po portmap-5/debian/po/it.po
--- portmap-5-12/debian/po/it.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/it.po 2005-06-07 20:03:11.000000000 +0200
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-04-04 21:23+0200\n"
"Last-Translator: Luca Monducci <[EMAIL PROTECTED]>\n"
"Language-Team: Italian <[email protected]>\n"
@@ -47,10 +47,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"=C3=88 anche possibile cambiare la configurazione modificando la riga OPT=
IONS nel "
"file /etc/portmap.conf. Se non si specifica l'opzione -i la modifica ha "
diff -Nru portmap-5-12/debian/po/ja.po portmap-5/debian/po/ja.po
--- portmap-5-12/debian/po/ja.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/ja.po 2005-06-07 20:03:11.000000000 +0200
@@ -15,7 +15,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-27 08:16+0900\n"
"Last-Translator: Kenshi Muto <[EMAIL PROTECTED]>\n"
"Language-Team: Japanese <[email protected]>\n"
@@ -54,10 +54,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"=A4=B3=A4=CE=C0=DF=C4=EA=A4=CF=A1=A2/etc/portmap.conf =A5=D5=A5=A1=A5=A4=
=A5=EB=A4=CE OPTIONS =B9=D4=A4=F2=CA=D4=BD=B8=A4=B9=A4=EB=A4=B3=A4=C8=A4=C7=
=A4=E2=CA=D1=B9=B9=A4=C7=A4=AD"
"=A4=DE=A4=B9=A1=A3=C3=B1=A4=CB -i =A5=AA=A5=D7=A5=B7=A5=E7=A5=F3=A4=F2=BB=
=D8=C4=EA=A4=B7=A4=CA=A4=A4=A4=E8=A4=A6=A4=CB=A4=B9=A4=EB=A4=C8=A1=A2=A4=B9=
=A4=D9=A4=C6=A4=CE=A5=A4=A5=F3=A5=BF=A1=BC=A5=D5=A5=A7=A5=A4=A5=B9=A4=F2"
diff -Nru portmap-5-12/debian/po/pt_BR.po portmap-5/debian/po/pt_BR.po
--- portmap-5-12/debian/po/pt_BR.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/pt_BR.po 2005-06-07 20:03:11.000000000 +0200
@@ -15,7 +15,7 @@
msgstr ""
"Project-Id-Version: portmap\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-26 21:24-0300\n"
"Last-Translator: Andr=E9 Lu=EDs Lopes <[EMAIL PROTECTED]>\n"
"Language-Team: Debian-BR Project <[EMAIL PROTECTED]
>\n"
@@ -56,10 +56,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"Voc=EA pode mudar essa configura=E7=E3o editando a linha OPTIONS no arqui=
vo /etc/"
"portmap.conf. Caso voc=EA apenas n=E3o especifique a op=E7=E3o -i o portm=
ap ir=E1 "
diff -Nru portmap-5-12/debian/po/templates.pot portmap-5/debian/po/template=
s.pot
--- portmap-5-12/debian/po/templates.pot 2005-06-07 20:03:12.000000000
+0200
+++ portmap-5/debian/po/templates.pot 2005-06-07 20:03:11.000000000 +0200
@@ -16,7 +16,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n"
"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n"
@@ -52,6 +52,6 @@
#: ../templates:4
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
diff -Nru portmap-5-12/debian/po/uk.po portmap-5/debian/po/uk.po
--- portmap-5-12/debian/po/uk.po 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/po/uk.po 2005-06-07 20:03:11.000000000 +0200
@@ -15,7 +15,7 @@
msgstr ""
"Project-Id-Version: portmap-uk_uk\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-15 18:02+1000\n"
+"POT-Creation-Date: 2005-06-07 17:08+0200\n"
"PO-Revision-Date: 2005-03-30 19:25+0300\n"
"Last-Translator: Eugeniy Meshcheryakov <[EMAIL PROTECTED]>\n"
"Language-Team: Ukrainian\n"
@@ -58,10 +58,11 @@
#. Type: boolean
#. Description
#: ../templates:4
+#, fuzzy
msgid ""
"You can change this configuration also by editing the OPTIONS line in the=
/"
-"etc/portmap.conf file. If you just don't specify the -i option it will bi=
nd "
-"to all interfaces."
+"etc/default/portmap file. If you just don't specify the -i option it will=
"
+"bind to all interfaces."
msgstr ""
"=D0=92=D0=B8 =D1=82=D0=B0=D0=BA=D0=BE=D0=B6 =D0=BC=D0=BE=D0=B6=D0=B5=D1=
=82=D0=B5 =D0=B7=D0=BC=D1=96=D0=BD=D0=B8=D1=82=D0=B8 =D1=86=D1=96 =D0=BD=D0=
=B0=D0=BB=D0=B0=D1=88=D1=82=D1=83=D0=B2=D0=B0=D0=BD=D0=BD=D1=8F =D1=80=D0=
=B5=D0=B4=D0=B0=D0=B3=D1=83=D1=8E=D1=87=D0=B8 =D1=80=D1=8F=D0=B4=D0=BE=D0=
=BA OPTIONS =D1=84=D0=B0=D0=B9=D0=BB=D0=B0 /etc/"
"portmap.conf. =D0=AF=D0=BA=D1=89=D0=BE =D0=B2=D0=B8 =D0=BD=D0=B5 =D0=B2=
=D0=BA=D0=B0=D0=B6=D0=B5=D1=82=D0=B5 =D0=BE=D0=BF=D1=86=D1=96=D1=8E -i, =D1=
=82=D0=BE portmap =D0=B1=D1=83=D0=B4=D0=B5 =D0=BF=D1=80=D0=BE=D1=81=D0=BB=
=D1=83=D1=85=D0=BE=D0=B2=D1=83=D0=B2=D0=B0=D1=82=D0=B8 "
diff -Nru portmap-5-12/debian/postinst portmap-5/debian/postinst
--- portmap-5-12/debian/postinst 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/postinst 2005-06-07 20:14:06.000000000 +0200
@@ -1,7 +1,21 @@
#!/bin/sh
set -e
=20
-CONFFILE=3D/etc/portmap.conf
+CONFFILE=3D/etc/default/portmap
+
+check_md5() {
+# Checks MD5sum of a file and returns 0 if it matches,=20
+# 1 otherwise and 2 if any other error occurs
+ file=3D$1
+ md5sum=3D$2
+ retcode=3D1
+ [ ! -e "$file" ] && return 2
+ [ -z "$md5sum" ] && return 2
+ if md5sum $file $md5sum 2>/dev/null |grep -q $md5sum ; then
+ retcode=3D0
+ fi
+ return $retcode
+}
=20
if [ "$1" =3D "configure" ] && [ -n "$2" ] &&
dpkg --compare-versions "$2" lt 5-3; then
@@ -11,13 +25,24 @@
}
fi
=20
+# Keep track of changes to the portmapper
+portmap_changed=3D0
+
# Start configuration
-#if [ "$1" =3D configure ] || [ "$1" =3D reconfigure ] ; then
- . /usr/share/debconf/confmodule
+. /usr/share/debconf/confmodule
+
+if [ -e "$CONFFILE" ] && [ "$1" =3D "configure" ] || [ "$1" =3D "reconfigu=
re" ] ; then
+
+ # Read in the options
+ . $CONFFILE || true
+
+ if [ "$OPTIONS" =3D "-i 127.0.0.1" ] || [ -z "$OPTIONS" ] ; then
+ # The configuration matches the changes we introduce, go ahead
+ # and make the changes
+
=20
db_get portmap/loopback
=20
- portmap_changed=3D0
=20
if [ "$RET" =3D true ]; then
if ! grep ^OPTIONS $CONFFILE >/dev/null 2>&1 ; then
@@ -29,13 +54,9 @@
portmap_changed=3D$?
set -e
mv $CONFFILE.new $CONFFILE
-# else
-# if ! grep "^OPTIONS=3D\"-i 127.0.0.1\"" $CONFFILE >/dev/null
2>&1 ; then
-# echo "Portmap options have already been configured in $CONFFILE"
-# echo "This script will not modify it, please edit this file
manually."
-# fi
fi
fi
+
if [ "$RET" =3D false ]; then
# Just reverse the change above in case a user wants to go from 'true'
# to 'false' at some point.
@@ -51,15 +72,46 @@
fi
fi
=20
-#if [ "$portmap_changed" -eq 1 ] ; then
-# Do something is settings changed? We might want to
-# check which RPC services are out there and restart them too...
-#fi
=20
- db_stop
-#fi=20
+ else=20
+ echo "Portmap options have already been configured in $CONFFILE"
+ echo "This script will not modify it, please edit this file manually."
+ fi
+fi=20
+if [ ! -e "$CONFFILE" ] && [ "$1" =3D "reconfigure" ] ; then
+ echo "Cannot reconfigure portmap since $CONFFILE has been manually
remove=
d by the admin"
+fi
+
+db_stop
+
# End of configuration
=20
#DEBHELPER#
=20
+# Warn if there are services linked with the portmapper
+# but its configuration has changed. We will not automatically
+# restart them, however.
+if [ "$portmap_changed" -eq 1 ] ; then
+ # RPCinfo might fail if the portmapper is not running
+ # (i.e. broken options...)
+ set +e
+ rpccount=3D`rpcinfo -p 2>/dev/null |grep "tcp\|udp" | grep -v
portmapper =
| wc -l`
+ set -e
+ if [ "0$rpccount" -gt 0 ] ; then
+ # TODO: Turn this into a debconf note?
+ # TODO: associate common RPC services with init.d lines?
+ # i.e. :=20
+ # sgi_fam -> /etc/init.d/fam
+ # status -> /etc/init.d/nfs-common
+ echo "There are RPC services which registered with the
portmapper"
+ echo "before the configuration was changed."
+ echo "You need to manually restart them in order for the
changes to take=
effect."
+ echo "Current registered services:"
+ echo "------------------------------------------------"
+ rpcinfo -p | grep "tcp\|udp" | grep -v portmapper=20
+ echo "------------------------------------------------"
+ fi
+fi
+
+
exit 0=20
diff -Nru portmap-5-12/debian/postrm portmap-5/debian/postrm
--- portmap-5-12/debian/postrm 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/postrm 2005-06-07 20:03:11.000000000 +0200
@@ -4,7 +4,9 @@
=20
if [ "$1" =3D "purge" ]
then
- # Remove all non-conffiles that portmap might create
- rm -f /etc/portmap.conf
+ # Remove all non-conffiles that portmap might have created
+ [ -f /etc/portmap.conf ] && rm -f /etc/portmap.conf
+ [ -f /etc/default/portmap ] && rm -f /etc/default/portmap
fi
=20
+exit 0
diff -Nru portmap-5-12/debian/preinst portmap-5/debian/preinst
--- portmap-5-12/debian/preinst 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/preinst 2005-06-07 20:03:11.000000000 +0200
@@ -1,9 +1,32 @@
#! /bin/sh
set -e
=20
-if [ "$1" =3D "upgrade" ]; then
- # get rid of /etc/default/portmap
- [ -e /etc/default/portmap ] && rm -f /etc/default/portmap
+action=3D$1
+version=3D$2
+
+check_md5() {
+# Checks MD5sum of a file and returns 0 if it matches,
+# 1 otherwise and 2 if any other error occurs
+ file=3D$1
+ md5sum=3D$2
+ retcode=3D1
+ [ ! -e "$file" ] && return 2
+ [ -z "$md5sum" ] && return 2
+ if md5sum $file $md5sum 2>/dev/null |grep -q $md5sum ; then
+ retcode=3D0
+ fi
+ return $retcode
+}
+
+# TBD: should be based on a given version
+if [ "$action" =3D "upgrade" ] && [ -e /etc/portmap.conf ] \
+ && dpkg --compare-versions "$version" gt 5-10 \
+ && dpkg --compare-versions "$version" lt 5-13 ; then
+ # get rid of /etc/portmap.conf if it did not change from the default?
+ # Move to the "new" conffile location, let the user handle
+ # the change (if needed)
+ [ -e /etc/default/portmap ] && mv /etc/default/portmap
/etc/default/port=
map.dpkg-old
+ mv /etc/portmap.conf /etc/default/portmap
fi
=20
#DEBHELPER#
diff -Nru portmap-5-12/debian/templates portmap-5/debian/templates
--- portmap-5-12/debian/templates 2005-06-07 20:03:12.000000000 +0200
+++ portmap-5/debian/templates 2005-06-07 20:03:11.000000000 +0200
@@ -10,5 +10,5 @@
preventing remote systems from accessing your RPC services.
.
You can change this configuration also by editing the OPTIONS
- line in the /etc/portmap.conf file. If you just don't specify
+ line in the /etc/default/portmap file. If you just don't specify
the -i option it will bind to all interfaces.
diff -Nru portmap-5-12/debian/TODO portmap-5/debian/TODO
--- portmap-5-12/debian/TODO 1970-01-01 01:00:00.000000000 +0100
+++ portmap-5/debian/TODO 2005-06-07 20:03:11.000000000 +0200
@@ -0,0 +1,21 @@
+
+- Init.d script:
+ If the RPC services are stopped after the portmapper is stopped it
+ will not be aware of this (will keep the registration file)
+
+- If the following sequence occurs:
+ - FAM stopped
+ - Portmapper stopped
+ - FAM started
+ - Portmapper started
+ Then the services will not be registered with the portmapper properly
+
+ The only plausible fix for this is doing init.d dependencies: if
+ portmap is stopped stop all RPC services?
+
+- Postinst could restart RPC services if the configuration has changed
+ just like libc6's does for some upgrades.
+
+- Handle the file as a conffile? (done in 5-10) there are presumably
+ not many changes to it in the future since portmap is a rather fixed
+ program.
--rMWmSaSbD7nr+du9--
--rV8arf8D5Dod9UkK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCpfkji4sehJTrj0oRAretAJwIhoY0t/DtdVRBpmTu0QmKvBPcYwCg0DGo
UV9+VJVrdS3UKZGqcv26b30=
=LuBT
-----END PGP SIGNATURE-----
--rV8arf8D5Dod9UkK--
---------------------------------------
Received: (at 312378-done) by bugs.debian.org; 10 Jun 2005 01:34:30 +0000
>From [EMAIL PROTECTED] Thu Jun 09 18:34:28 2005
Return-path: <[EMAIL PROTECTED]>
Received: from cpe-138-217-160-143.vic.bigpond.net.au (nukak.apana.org.au)
[138.217.160.143]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1DgYPh-0005jr-00; Thu, 09 Jun 2005 18:34:25 -0700
Received: by nukak.apana.org.au (Postfix, from userid 1000)
id CEA0E684987; Fri, 10 Jun 2005 11:34:19 +1000 (EST)
Date: Fri, 10 Jun 2005 11:34:19 +1000
From: Anibal Monsalve Salazar <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: portmap: Loses conffile in update from sarge -> sid
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="SPxynAWqj71erN1R"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level:
--SPxynAWqj71erN1R
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 09 Jun 2005 09:05:52 +1000
Source: portmap
Binary: portmap
Architecture: source i386
Version: 5-13
Distribution: unstable
Urgency: high
Maintainer: Anibal Monsalve Salazar <[EMAIL PROTECTED]>
Changed-By: Anibal Monsalve Salazar <[EMAIL PROTECTED]>
Description:=20
portmap - The RPC portmapper
Closes: 309310
Changes:=20
portmap (5-13) unstable; urgency=3Dhigh
.
* Patch by Javier Fern=C3=A1ndez-Sanguino Pe=C3=B1a <[EMAIL PROTECTED]>,
closes: #309310. All the 5-13 change entries are addressed
by the patch for #309310.
* Reverted the configuration file change introduced in -11, the
configuration file is now /etc/default/portmap, it is handled
properly through maintainer scripts. I.e. the maintainer scripts
will not touch it if the user modifies it.
This prevents upgrades from sarge to etch from breaking, and fixes
the broken configuration file handling of previous releases thus the
high priority.
Note: Not implemented MD5 sum checks since there were at least
3 different valid MD5sums, made more sense to parse the file
and read in the $OPTIONS value.
* Handle configuration file properly (both old and new):
* If upgrading from any version from 5-10 to 5-12 (included) then
move the configuration to the proper location.
* If upgrading from any version prior to 5-6 or installing first time
then generate the configuration file.
* Remove both configuration files (old and new) if present when
purging in postrm.
[ debian/potinst ]
* Warn the user that probably he has to restart other RPC services if
they are running and he has changed the OPTIONS
of the portmapper.
* Start and stop debconf invocation in postinst outside of if/then
condition or otherwise the 'init.d start' messages of portmap will not
be shown to standard output (the user might think it was stopped but
not started when --reconfiguring it)
* Added a debian/TODO file
Files:=20
3e06ae9f13551e53a1267db09f83b9b7 637 net standard portmap_5-13.dsc
ec544cb51c2d758e65f687d16f777645 19554 net standard portmap_5-13.diff.gz
d42f9e1bfdcd3d0dc00ea9a61dc60abd 27160 net standard portmap_5-13_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCp3tcgY5NIXPNpFURAvrcAJ9Dj1rMjXEzLYt6UscefQsEM54+YACdHuC/
Hh5ww64MB5MSTOumOEXnS0k=3D
=3DelLd
-----END PGP SIGNATURE-----
Accepted:
portmap_5-13.diff.gz
to pool/main/p/portmap/portmap_5-13.diff.gz
portmap_5-13.dsc
to pool/main/p/portmap/portmap_5-13.dsc
portmap_5-13_i386.deb
to pool/main/p/portmap/portmap_5-13_i386.deb
Anibal Monsalve Salazar
--
.''`. Debian GNU/Linux
: :' : Free Operating System
`. `' http://debian.org/
`- http://v7w.com/anibal
--SPxynAWqj71erN1R
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCqO4bgY5NIXPNpFURAobOAJ9KmkrKoxv5G/kRPx3rhM/3eT+QvQCeKk5o
soPsbaoVyagLdmHHC+2MuVs=
=1PZN
-----END PGP SIGNATURE-----
--SPxynAWqj71erN1R--
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]