Bug#401258: possible patch

2006-12-09 Thread Andreas Barth
tags 401258 + patch
thanks

Hi,

this patch seems to solve it for me. Comments?


Cheers,
Andi

diff -Nur ../heimdal-0.7.2.dfsg.1~/debian/changelog 
../heimdal-0.7.2.dfsg.1/debian/changelog
--- ../heimdal-0.7.2.dfsg.1~/debian/changelog   2006-12-09 09:04:02.0 
+
+++ ../heimdal-0.7.2.dfsg.1/debian/changelog2006-12-09 11:48:55.0 
+
@@ -1,3 +1,11 @@
+heimdal (0.7.2.dfsg.1-6.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Don't change services on upgrades, only on fresh installation and purge.
+Closes: #401258
+
+ -- Andreas Barth <[EMAIL PROTECTED]>  Sat,  9 Dec 2006 11:48:05 +
+
 heimdal (0.7.2.dfsg.1-6) unstable; urgency=low
 
   * Update maintainer E-Mail address.
diff -Nur ../heimdal-0.7.2.dfsg.1~/debian/heimdal-kdc.postinst 
../heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.postinst
--- ../heimdal-0.7.2.dfsg.1~/debian/heimdal-kdc.postinst2006-12-09 
09:04:02.0 +
+++ ../heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.postinst 2006-12-09 
11:45:40.0 +
@@ -82,13 +82,9 @@
 
 case "$1" in
 abort-upgrade | abort-deconfigure | abort-remove)
-   enable_servers
;;
 configure)
-   if [ -n "$2" ] && dpkg --compare-versions "$2" ge 0.2l-4; then
-   enable_servers
-   else
-   remove_servers
+   if [ -z "$2" ]; then
add_servers
fi
;;
diff -Nur ../heimdal-0.7.2.dfsg.1~/debian/heimdal-kdc.prerm 
../heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.prerm
--- ../heimdal-0.7.2.dfsg.1~/debian/heimdal-kdc.prerm   2006-12-09 
09:04:02.0 +
+++ ../heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.prerm1970-01-01 
00:00:00.0 +
@@ -1,12 +0,0 @@
-#!/bin/sh -e
-
-disable_servers() {
-   update-inetd --pattern '[ \t]/usr/lib/heimdal-servers/kadmind' 
--disable kerberos-adm
-   update-inetd --pattern '[ \t]/usr/sbin/hpropd' --disable krb_prop
-}
-
-if command -v update-inetd >/dev/null 2>&1; then
-   disable_servers
-fi
-
-#DEBHELPER#
-- 
  http://home.arcor.de/andreas-barth/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#401258: possible patch

2006-12-11 Thread Peter Palfrader
Andreas Barth schrieb am Samstag, dem 09. Dezember 2006:

> this patch seems to solve it for me. Comments?

It solves the issue at hand but has a few problems:
 - purge now no longer removes kprop from inetd.conf:
[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf

#:OTHER: Other services

[EMAIL PROTECTED]:/tmp/buildd# dpkg -i 
heimdal-kdc_0.7.2.dfsg.1-6.1_i386.deb

[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf
kerberos-admstream  tcp nowait  root/usr/sbin/tcpd 
/usr/lib/heimdal-servers/kadmind
#krb_prop   stream  tcp nowait  root/usr/sbin/tcpd 
/usr/sbin/hpropd

[EMAIL PROTECTED]:/tmp/buildd# dpkg --purge heimdal-kdc
(Reading database ... 18024 files and directories currently installed.)
Removing heimdal-kdc ...
Purging configuration files for heimdal-kdc ...

[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf
#:OTHER: Other services
#krb_prop   stream  tcp nowait  root/usr/sbin/tcpd 
/usr/sbin/hpropd

 - on upgrades it also leaves kerberos-adm disabled:
[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf

#:OTHER: Other services

[EMAIL PROTECTED]:/tmp/buildd# dpkg -i 
/var/cache/apt/archives/heimdal-kdc_0.7.2.dfsg.1-6_i386.deb

[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf
kerberos-admstream  tcp nowait  root/usr/sbin/tcpd 
/usr/lib/heimdal-servers/kadmind
#krb_prop   stream  tcp nowait  root/usr/sbin/tcpd 
/usr/sbin/hpropd

[EMAIL PROTECTED]:/tmp/buildd# dpkg -i 
heimdal-kdc_0.7.2.dfsg.1-6.1_i386.deb
Preparing to replace heimdal-kdc 0.7.2.dfsg.1-6 (using 
heimdal-kdc_0.7.2.dfsg.1-6.1_i386.deb) ...

[EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf
## kerberos-admstream  tcp nowait  root/usr/sbin/tcpd 
/usr/lib/heimdal-servers/kadmind
#krb_prop   stream  tcp nowait  root/usr/sbin/tcpd 
/usr/sbin/hpropd

Peter
-- 
   |  .''`.  ** Debian GNU/Linux **
  Peter Palfrader  | : :' :  The  universal
 http://www.palfrader.org/ | `. `'  Operating System
   |   `-http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#401258: possible patch

2006-12-11 Thread Peter Palfrader
On Mon, 11 Dec 2006, Peter Palfrader wrote:

> It solves the issue at hand but has a few problems:
>  - purge now no longer removes kprop from inetd.conf:
>   #krb_prop   stream  tcp nowait  root/usr/sbin/tcpd 
> /usr/sbin/hpropd

Apparently it didn't do that before either, and it appears to be pretty
common to leave commented lines lying around in inetd.conf.  So this
could be ignored.

>  - on upgrades it also leaves kerberos-adm disabled:
>   [EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf

It would still be nice to have that fixed tho.
-- 
   |  .''`.  ** Debian GNU/Linux **
  Peter Palfrader  | : :' :  The  universal
 http://www.palfrader.org/ | `. `'  Operating System
   |   `-http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#401258: possible patch

2006-12-11 Thread Brian May
> "Peter" == Peter Palfrader <[EMAIL PROTECTED]> writes:

Peter> On Mon, 11 Dec 2006, Peter Palfrader wrote:
>> It solves the issue at hand but has a few problems: - purge now
>> no longer removes kprop from inetd.conf: #krb_prop stream tcp
>> nowait root /usr/sbin/tcpd /usr/sbin/hpropd

Peter> Apparently it didn't do that before either, and it appears
Peter> to be pretty common to leave commented lines lying around
Peter> in inetd.conf.  So this could be ignored.

>> - on upgrades it also leaves kerberos-adm disabled:
>> [EMAIL PROTECTED]:/tmp/buildd# tail -n2 /etc/inetd.conf

I am just uploading version -7 to Debian now, it should solve the later problem.

I deleted the prerm script, and changed the postinst script to:

=== cut ===
case "$1" in
abort-upgrade | abort-deconfigure | abort-remove)
;;
configure)
if [ -n "$2" ]
then
add_servers
elif dpkg --compare-versions "$2" le "0.7.2.dfsg.1-6"
then
enable_servers
fi
;;
*)
printf "$0: incorrect arguments: $*\n" >&2
exit 1
;;
esac
=== cut 

I think this should do the right thing for all cases.

Purge still doesn't delete the hprop entry, not sure what is going on
here.

The actual code uses regexps, and as far as I can tell it shouldn't
matter if it is enabled or disabled:

=== cut ===
remove_servers() {
update-inetd --remove 'kerberos-adm[ \t].*[ 
\t]/usr/lib/heimdal-servers/kadmind'
update-inetd --remove 'krb_prop[ \t].*[ \t]/usr/sbin/hpropd'
}
=== cut ===
-- 
Brian May <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]