Debian Bug report logs - #282147
cvs: installation is breaken in noninteractive

version graph

Package: update-inetd; Maintainer for update-inetd is Serafeim Zanikolas <sez@debian.org>; Source for update-inetd is src:update-inetd.

Reported by: Yaroslav Halchenko <debian@onerussian.com>

Date: Sat, 20 Nov 2004 00:18:04 UTC

Severity: critical

Tags: help, patch

Merged with 298425, 394086

Found in version 4.27

Fixed in version update-inetd/4.27-0.1

Done: Roland Stigge <stigge@antcom.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Yaroslav Halchenko <debian@onerussian.com>, Steve McIntyre <93sam@debian.org>:
Bug#282147; Package cvs. Full text and rfc822 format available.

Acknowledgement sent to Yaroslav Halchenko <debian@onerussian.com>:
New Bug report received and forwarded. Copy sent to Yaroslav Halchenko <debian@onerussian.com>, Steve McIntyre <93sam@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Yaroslav Halchenko <debian@onerussian.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cvs: installation is breaken in noninteractive
Date: Fri, 19 Nov 2004 19:04:12 -0500
Package: cvs
Version: 1:1.12.9-6
Severity: important

I was trying to upgrade the systems across 25 nodes but it broke due
to the use of Frontend: noninteractive for debconf

>ssh root@node2 apt-get install --reinstall cvs
Reading Package Lists...
Building Dependency Tree...
The following packages will be upgraded:
  cvs
1 upgraded, 0 newly installed, 0 to remove and 525 not upgraded.
Need to get 0B/1439kB of archives.
After unpacking 4096B of additional disk space will be used.
(Reading database ... 158346 files and directories currently installed.)
Preparing to replace cvs 1:1.12.9-4 (using .../c/cvs/cvs_1.12.9-6_i386.deb) ...
Unpacking replacement cvs ...
Setting up cvs (1.12.9-6) ...
Couldn't reopen stdin at /usr/sbin/update-inetd line 29.
dpkg: error processing cvs (--configure):
 subprocess post-installation script returned error exit status 6
Errors were encountered while processing:
 cvs
E: Sub-process /usr/bin/dpkg returned an error code (1)


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R

Versions of packages cvs depends on:
ii  debconf                     1.4.36       Debian configuration management sy
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
ii  libpam-runtime              0.76-22      Runtime support for the PAM librar
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  zlib1g                      1:1.2.1.2-1  compression library - runtime

-- debconf information:
  cvs/rotatekeep: 7
* cvs/badrepositories: create
  cvs/pserver_warning:
  cvs/rotatekeep_nondefault: no
  cvs/rotate_individual: true
  cvs/pserver_repos_individual: true
  cvs/pserver_setspawnlimit: false
  cvs/rotatekeep_individual: 7
  cvs/pserver_repos: all
* cvs/pserver: false
  cvs/cvs_conf_is_dead:
* cvs/repositories: /var/lib/cvs
  cvs/pserver_spawnlimit: 400
  cvs/rotatehistory: no


--Yarik



Information forwarded to debian-bugs-dist@lists.debian.org, Steve McIntyre <93sam@debian.org>:
Bug#282147; Package cvs. Full text and rfc822 format available.

Acknowledgement sent to Steve McIntyre <steve@einval.com>:
Extra info received and forwarded to list. Copy sent to Steve McIntyre <93sam@debian.org>. Full text and rfc822 format available.

Message #10 received at 282147@bugs.debian.org (full text, mbox):

From: Steve McIntyre <steve@einval.com>
To: Yaroslav Halchenko <debian@onerussian.com>, 282147@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#282147: cvs: installation is breaken in noninteractive
Date: Wed, 24 Nov 2004 14:34:18 +0000
[Message part 1 (text/plain, inline)]
reassign 282147 netbase
thanks

On Fri, Nov 19, 2004 at 07:04:12PM -0500, Yaroslav Halchenko wrote:
>Package: cvs
>Version: 1:1.12.9-6
>Severity: important
>
>I was trying to upgrade the systems across 25 nodes but it broke due
>to the use of Frontend: noninteractive for debconf
>
>>ssh root@node2 apt-get install --reinstall cvs
>Reading Package Lists...
>Building Dependency Tree...
>The following packages will be upgraded:
>  cvs
>1 upgraded, 0 newly installed, 0 to remove and 525 not upgraded.
>Need to get 0B/1439kB of archives.
>After unpacking 4096B of additional disk space will be used.
>(Reading database ... 158346 files and directories currently installed.)
>Preparing to replace cvs 1:1.12.9-4 (using .../c/cvs/cvs_1.12.9-6_i386.deb) ...
>Unpacking replacement cvs ...
>Setting up cvs (1.12.9-6) ...
>Couldn't reopen stdin at /usr/sbin/update-inetd line 29.
>dpkg: error processing cvs (--configure):
> subprocess post-installation script returned error exit status 6
>Errors were encountered while processing:
> cvs
>E: Sub-process /usr/bin/dpkg returned an error code (1)

It's a known bug in the update-inetd script in the netbase package
(see bugs #236917, #275790). I'm reassigning it there in the hope the
netbase maintainer will fix this...

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
Is there anybody out there?
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package `cvs' to `netbase'. Request was from Steve McIntyre <steve@einval.com> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package netbase. Full text and rfc822 format available.

Acknowledgement sent to Gerhard Gaussling <ggrubbish@web.de>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #17 received at 282147@bugs.debian.org (full text, mbox):

From: Gerhard Gaussling <ggrubbish@web.de>
To: Debian Bug Tracking System <282147@bugs.debian.org>
Subject: cvs: postinst failed on dist-upgrade in interactive mode
Date: Mon, 20 Dec 2004 22:57:54 +0100
Package: netbase
Version: 4.19
Followup-For: Bug #282147


Hello,

I got on cvs and also on proftpd and cupsys-bsd the same error. 
I'm wondering why this bug isn't already resolved because Steve McIntyre
mentioned that it is a known bug reported in #236917, #275790.

There is a thread in german on this topic:
http://thread.gmane.org/gmane.linux.debian.user.german/112075

I found as a workaround that the affected packages could be configured
by typing in a shell the following lines to invoke the noninteractive
mode for debconf:

DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
dpkg --configure -a

I suggest to set the priority to grave .

"BTW, I had problems with this (horrible) hack because I ran a package
maanger without a tty." sylvain.joyeux@m4x.org #236917

The console I used is either /dev/vc/n (due to udev) or /dev/pts/n . 
Could this be the reason which made update-inetd fail? 

kind regards 

Gerhard Gau├čling

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (666, 'unstable'), (333, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-rc3.20041218n
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages netbase depends on:
ii  debconf                       1.4.41     Debian configuration management sy
ii  ifupdown                      0.6.4-4.10 High level tools to configure netw
ii  netkit-inetd                  0.10-10    The Internet Superserver
ii  netkit-ping [ping]            0.10-10    The ping utility from netkit
ii  tcpd                          7.6.dbs-6  Wietse Venema's TCP wrapper utilit

-- debconf information:
  netbase/spoofprot/pre-2.2-ip: 127.0.0.1/8
  netbase/upgrade-note/etc-network-interfaces-pre-3.17-1:
  netbase/upgrade-note/init.d-split-pre-3.16-1:
  netbase/upgrade-note/radius-ports-pre-3.05:
  netbase/ipv6-hosts: true
  netbase/upgrade-note/portmap-restart-pre-3.11-2:
* netbase/spoofprot:
  netbase/spoofprot/pre-2.2-interfaces: eth0 eth1 ppp0



Merged 282147 298425. Request was from Steve McIntyre <steve@einval.com> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `netbase' to `update-inetd'. Request was from md@Linux.IT (Marco d'Itri) to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Ronny Aasen <ronny@skolelinux.no>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #26 received at 282147@bugs.debian.org (full text, mbox):

From: Ronny Aasen <ronny@skolelinux.no>
To: 282147@bugs.debian.org
Subject: this bug breaks the debian installer
Date: Tue, 17 Oct 2006 13:42:46 +0200
This bug also affect the daily built installation cd if you install in 
gui mode.

How to reproduce:
1. Boot the installer by writing "installgui" at the boot prompt
2. do the installation
3. select a task that include a package that use update-initd.
   i choose fileserver, since that includes samba
4. the step "select and install software" fails


here is the relevant syslog part

Oct 17 13:30:02 in-target: Setting up perl-modules (5.8.8-6.1) ...
Oct 17 13:30:02 in-target: Setting up perl (5.8.8-6.1) ...
Oct 17 13:30:02 in-target:
Oct 17 13:30:02 in-target: Setting up netatalk (2.0.3-4) ...
Oct 17 13:30:02 in-target:
Oct 17 13:30:02 in-target: Errors were encountered while processing:
Oct 17 13:30:02 in-target:  samba
Oct 17 13:30:02 in-target:  swat
Oct 17 13:30:02 in-target: E: Sub-process /usr/bin/dpkg returned an 
error code (1)
Oct 17 13:30:02 in-target: A package failed to install.  Trying to recover:
Oct 17 13:30:02 in-target: Setting up samba (3.0.23c-1) ...
Oct 17 13:30:02 debconf: Obsolete command TITLE Configuring samba called
Oct 17 13:30:02 debconf: Obsolete command TITLE Samba Server called
Oct 17 13:30:02 in-target: Couldn't reopen stdin(/dev/tty): No such 
device or address at /usr/sbin/update-inetd line 29.
Oct 17 13:30:03 in-target: dpkg: error processing samba (--configure):
Oct 17 13:30:03 in-target:  subprocess post-installation script returned 
error exit status 6
Oct 17 13:30:03 in-target: dpkg: dependency problems prevent 
configuration of swat:
Oct 17 13:30:03 in-target:  swat depends on samba (= 3.0.23c-1); however:
Oct 17 13:30:03 in-target:   Package samba is not configured yet.
Oct 17 13:30:03 in-target: dpkg: error processing swat (--configure):
Oct 17 13:30:03 in-target:  dependency problems - leaving unconfigured
Oct 17 13:30:03 in-target: Errors were encountered while processing:
Oct 17 13:30:03 in-target:  samba
Oct 17 13:30:03 in-target:  swat
Oct 17 13:30:03 in-target: tasksel: aptitude failed (255)
Oct 17 13:30:03 in-target: Setting up samba (3.0.23c-1) ...
Oct 17 13:30:03 debconf: Obsolete command TITLE Configuring samba called
Oct 17 13:30:03 debconf: Obsolete command TITLE Samba Server called
Oct 17 13:30:03 in-target: Couldn't reopen stdin(/dev/tty): No such 
device or address at /usr/sbin/update-inetd line 29.
Oct 17 13:30:03 in-target: dpkg: error processing samba (--configure):
Oct 17 13:30:03 in-target:  subprocess post-installation script returned 
error exit status 6
Oct 17 13:30:03 in-target: dpkg: dependency problems prevent 
configuration of swat:
Oct 17 13:30:03 in-target:  swat depends on samba (= 3.0.23c-1); however:
Oct 17 13:30:03 in-target:   Package samba is not configured yet.
Oct 17 13:30:03 in-target: dpkg: error processing swat (--configure):
Oct 17 13:30:03 in-target:  dependency problems - leaving unconfigured
Oct 17 13:30:03 in-target: Errors were encountered while processing:
Oct 17 13:30:03 in-target:  samba
Oct 17 13:30:03 in-target:  swat
Oct 17 13:30:03 main-menu[1989]: WARNING **: Configuring 'pkgsel' failed 
with error code 1
Oct 17 13:30:03 main-menu[1989]: WARNING **: Menu item 'pkgsel' failed.


with regards
Ronny Aasen




Severity set to `critical' from `important' Request was from Ronny Aasen <ronny@skolelinux.no> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: help Request was from Marco d'Itri <md@linux.it> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #35 received at 282147@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 282147@bugs.debian.org
Subject: Re: cvs: installation is breaken in noninteractive
Date: Thu, 19 Oct 2006 16:27:18 +0200
This problem is the result of update-inetd having code to prompt for
input when it find strange configuration.  This code reads input from
stdin.  One solution might be to rewrite update-inetd to use debconf
for prompting instead.

This fragment in /usr/sbin/update-inetd is a hack to avoid triggering
a problem with noninteractive installs as used by debootstrap,
pbuilder etc:

  # hack to make update-inetd work in a script which calls debconf
  if($ENV{DEBIAN_HAS_FRONTEND}) {
    my $file = ($ENV{DEBIAN_FRONTEND} eq 'noninteractive') ?
        '/dev/null' : '/dev/tty'; # see 4.13 changelog entry
    open(STDIN,  "<$file") or die "Couldn't reopen stdin($file): $!";
    open(STDOUT, ">$file") or die "Couldn't reopen stdout($file): $!";
    open(STDERR, ">$file") or die "Couldn't reopen stderr($file): $!";
  }

The code to prompt for input can be found in
/usr/share/perl5/DebianNet.pm, and one example look like this:

       do {
            print @_,
"\nDo you want to ignore this potential problem and continue, or would
you rather not do so now ?  Continue?  (n/y) ";
            $!=0; defined($response=<STDIN>) || die "netconfig: EOF/error on stdi
n: $!\n";
        } while ($response !~ m/^\s*[yn]?\s*$/i);

A quick-fix would be to extend the hack to test for 'kde' and 'gnome'
frontend as well as the 'noninteractive' frontend in
/usr/sbin/update-inetd, but this might not behave as it should when
using adept or synaptic (or any graphical apt frontend).  When
problems are detected, the question would not be presented to the user
but only silently be answered with the default answer.

Friendly,
-- 
Petter Reinholdtsen



Forcibly Merged 282147 298425 394086. Request was from Steve Langasek <vorlon@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #42 received at 282147@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: 282147@bugs.debian.org
Cc: Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Bug#282147 cvs: installation is breaken in noninteractive
Date: Mon, 30 Oct 2006 03:40:01 +0100
[Message part 1 (text/plain, inline)]
> This bug also affect the daily built installation cd if you install in
> gui mode.
>
> How to reproduce:
> 1. Boot the installer by writing "installgui" at the boot prompt
> 2. do the installation
> 3. select a task that include a package that use update-initd.
>     i choose fileserver, since that includes samba
> 4. the step "select and install software" fails

Note that I cannot reproduce this in a default Debian install of Etch, 
even if I select all "server" tasks together.

I suspect that this is particular to debian-edu because you have some 
other package that changes configuration info, which causes the "strange 
configuration" (quoting Petter) that update-inetd wants to ask about.

You could try if delaying those configuration steps to later helps you 
work around this issue.

Cheers,
FJP
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #47 received at 282147@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: Frans Pop <elendil@planet.nl>
Cc: 282147@bugs.debian.org, Ronny Aasen <ronny@skolelinux.no>
Subject: Re: Bug#282147 cvs: installation is breaken in noninteractive
Date: Mon, 30 Oct 2006 08:17:54 +0100
[Frans Pop]
> I suspect that this is particular to debian-edu because you have some 
> other package that changes configuration info, which causes the "strange 
> configuration" (quoting Petter) that update-inetd wants to ask about.
> 
> You could try if delaying those configuration steps to later helps you 
> work around this issue.

The configuration steps in debian-edu are done in finish-install, so
it should not affect this.  Are you trying to install samba or atftpd,
the two packages we have seen triggering this problem?



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Ronny Aasen <ronny@skolelinux.no>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #52 received at 282147@bugs.debian.org (full text, mbox):

From: Ronny Aasen <ronny@skolelinux.no>
To: 282147@bugs.debian.org
Subject: confirm bug
Date: Mon, 30 Oct 2006 10:55:14 +0100
I just now tested the latest etch daily built cd.
from the location : 
http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso
md5sum : 46d899872d7fc309276b1432aefd136f

And it have the same issues as i described earlier. Ill try adding more 
details on
How to reproduce:

1. Boot the installer by writing "installgui" at the boot prompt
2. i choose language: english, country: norway , key leyout: norwegian
3. i used guided partitioning everything in 1 / parttition
4. i added root password and a new user.
5. in the taskselector. i unselected everything, and then selected 
"fileserver" as the only selection.
6. the install stops with a "Installation step failed" Failing step is : 
Select and install software
7. The log is identical to my previous example whith the critical line 
beeing
   Couldn't reopen stdin(/dev/tty): No such device or address at 
/usr/sbin/update-inetd line 29.

hope this helps

i also tested debian-edu etch-test in gui mode and the error is 
identical there.

regards
Ronny Aasen





Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #57 received at 282147@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: Petter Reinholdtsen <pere@hungry.com>
Cc: 282147@bugs.debian.org, Ronny Aasen <ronny@skolelinux.no>
Subject: Re: Bug#282147 cvs: installation is breaken in noninteractive
Date: Mon, 30 Oct 2006 14:00:33 +0100
[Message part 1 (text/plain, inline)]
On Monday 30 October 2006 08:17, Petter Reinholdtsen wrote:
> The configuration steps in debian-edu are done in finish-install, so
> it should not affect this.  Are you trying to install samba or atftpd,
> the two packages we have seen triggering this problem?

Hmm. This is very weird. Yesterday I could not reproduce the bug (and I'm 
sure I did the tests correctly), today I can.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@debian.org>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #62 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@debian.org>
To: 282147@bugs.debian.org, 282147-submitter@bugs.debian.org, 298425-submitter@bugs.debian.org, 394086-submitter@bugs.debian.org
Subject: update-inetd interaction
Date: Wed, 01 Nov 2006 15:19:41 +0100
[Message part 1 (text/plain, inline)]
tag 282147 patch
thanks

Hi,

attached you will find a patch that modifies update-inetd to use debconf
for interaction (and therefore non-interaction if non-interactive, with
reasonable defaults).

Submitters of the respective bugs, and maintainers, please review. I can
upload the fix if necessary.

bye,
  Roland
[update-inetd.patch (text/x-patch, inline)]
diff -ruN update-inetd-4.27.orig/debian/control update-inetd-4.27/debian/control
--- update-inetd-4.27.orig/debian/control	2006-09-10 21:53:05.000000000 +0200
+++ update-inetd-4.27/debian/control	2006-11-01 13:45:31.000000000 +0100
@@ -10,6 +10,7 @@
 Package: update-inetd
 Architecture: all
 Conflicts: netbase (<< 4.27)
+Depends: debconf
 Description: inetd.conf updater
  This package provides a program used by other packages to automatically
  update /etc/inetd.conf.
diff -ruN update-inetd-4.27.orig/debian/postinst update-inetd-4.27/debian/postinst
--- update-inetd-4.27.orig/debian/postinst	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27/debian/postinst	2006-11-01 13:46:35.000000000 +0100
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+# Abort if any command returns an error value
+set -e
+
+if [ "$1" == "configure" -o "$1" == "reconfigure" ] ; then
+	. /usr/share/debconf/confmodule
+	db_capb
+fi
diff -ruN update-inetd-4.27.orig/debian/rules update-inetd-4.27/debian/rules
--- update-inetd-4.27.orig/debian/rules	2006-09-10 21:53:01.000000000 +0200
+++ update-inetd-4.27/debian/rules	2006-11-01 13:45:31.000000000 +0100
@@ -22,6 +22,7 @@
 
 	dh_installchangelogs
 	dh_installdocs
+	dh_installdebconf
 	dh_installman DebianNet.3pm update-inetd.8
 	dh_compress
 	dh_fixperms
diff -ruN update-inetd-4.27.orig/debian/templates update-inetd-4.27/debian/templates
--- update-inetd-4.27.orig/debian/templates	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27/debian/templates	2006-11-01 14:21:06.000000000 +0100
@@ -0,0 +1,37 @@
+Template: update-inetd/ask-several-entries
+Type: select
+Choices: yes, no
+Default: yes
+Description: Ignore multiple entries and continue without changes?
+ There are several entries for ${sservice} in ${inetdcf}.
+
+Template: update-inetd/ask-entry-present
+Type: select
+Choices: yes, no
+Default: yes
+Description: Leave existing entry and continue without changes?
+ Trying to add the following entry:
+ .
+ ${newentry}
+ .
+ There is already an entry for ${sservice} in ${inetdcf},
+ but I don't recognise it.  Here is what it looks like:
+ .
+ ${lookslike}
+
+Template: update-inetd/ask-remove-entries
+Type: select
+Choices: yes, no
+Default: no
+Description: Remove inetd entries?
+ ${inetdcf} contains multiple entries for
+ the `${service}' service. You're about to remove these entries.
+
+Template: update-inetd/ask-disable-entries
+Type: select
+Choices: yes, no
+Default: no
+Description: Disable inetd entries?
+ ${inetdcf} contains multiple entries for
+ the `${service}' service. You're about to disable these entries.
+
diff -ruN update-inetd-4.27.orig/DebianNet.pm update-inetd-4.27/DebianNet.pm
--- update-inetd-4.27.orig/DebianNet.pm	2005-03-21 19:54:31.000000000 +0100
+++ update-inetd-4.27/DebianNet.pm	2006-11-01 14:24:27.000000000 +0100
@@ -14,6 +14,8 @@
 
 require 5.000;
 
+use Debconf::Client::ConfModule ':all';
+
 $inetdcf="/etc/inetd.conf";
 $sep = "#<off># ";
 $version = "1.11";
@@ -46,12 +48,31 @@
         } else {
             if (grep(m/^$sservice\s+/,@inetd)) {
                 if (grep(m/^$sservice\s+/,@inetd) > 1) {
-                    &inetde("There are several entries for $sservice in $inetdcf\n");
+		    set("update-inetd/ask-several-entries", "yes");
+		    fset("update-inetd/ask-several-entries", "seen", "false");
+		    subst("update-inetd/ask-several-entries", "sservice", "$sservice");
+		    subst("update-inetd/ask-several-entries", "inetdcf", "$inetdcf");
+		    input("high", "update-inetd/ask-several-entries");
+		    @ret = go();
+		    if ($ret[0] == 0) {
+		        @ret = get("update-inetd/ask-several-entries");
+			exit(1) if ($ret[1] !~ m/y/i);
+		    }
                 } elsif (!grep(m:^#?.*$searchentry.*:, @inetd)) {
-                    print"\nTrying to add the following entry:\n\n $newentry\n\n";
-                    &inetde("There is already an entry for $sservice in $inetdcf,
-but I don't recognise it.  Here is what it looks like:\n
- ".join(' ',grep(m/^$sservice\s+/,@inetd)));
+		    set("update-inetd/ask-entry-present", "yes");
+		    fset("update-inetd/ask-entry-present", "seen", "false");
+		    subst("update-inetd/ask-entry-present", "newentry", "$newentry");
+		    subst("update-inetd/ask-entry-present", "sservice", "$sservice");
+		    subst("update-inetd/ask-entry-present", "inetdcf", "$inetdcf");
+		    my $lookslike = (grep(m/^$sservice\s+/,@inetd))[0];
+		    $lookslike =~ s/\n//g;
+		    subst("update-inetd/ask-entry-present", "lookslike", "$lookslike");
+		    input("high", "update-inetd/ask-entry-present");
+		    @ret = go();
+		    if ($ret[0] == 0) {
+		        @ret = get("update-inetd/ask-entry-present");
+			exit(1) if ($ret[1] !~ m/y/i);
+		    }
                 }
             } elsif (grep(m/^#\s*$sservice\s+/, @inetd) >= 1 or
               (($service =~ s/^#//) and grep(m/^$service\s+/, @inetd)>=1)) {
@@ -90,17 +111,6 @@
         }
     }
 
-    sub inetde {
-        my($response);
-        do {
-            print @_,
-"\nDo you want to ignore this potential problem and continue, or would
-you rather not do so now ?  Continue?  (n/y) ";
-            $!=0; defined($response=<STDIN>) || die "netconfig: EOF/error on stdin: $!\n";
-        } while ($response !~ m/^\s*[yn]?\s*$/i);
-        return(1) if($response =~ m/y/i);
-        exit(1);
-    }
     return(1);
 }
 
@@ -109,21 +119,20 @@
     unless(defined($service)) { return(-1) };
     chomp($service);
     if($service eq "") {
-         print "DebianNet::remove_service called with empty argument\n";
+         print STDERR "DebianNet::remove_service called with empty argument\n";
          return(-1);
     }
 
     if ((&scan_entries("$service") > 1) and (not defined($multi))) {
-        print "\nWARNING!!!!!! $inetdcf contains multiple entries for \n";
-        print "the \`$service' service. You're about to remove these entries.\n";
-        print "Do you want to continue? [n] ";
-        if (<STDIN> =~ /^[^y]/i) {
-            print "\nOk, I'll stop ...\n";
-            return(1);
-        } else {
-            if ($want_continue == 0) {
-                print "\nOk, I'll continue ...\n";
-            }
+	set("update-inetd/ask-remove-entries", "no");
+	fset("update-inetd/ask-remove-entries", "seen", "false");
+        subst("update-inetd/ask-remove-entries", "service", "$service");
+	subst("update-inetd/ask-remove-entries", "inetdcf", "$inetdcf");
+	input("high", "update-inetd/ask-remove-entries");
+	@ret = go();
+	if ($ret[0] == 0) {
+	    @ret = get("update-inetd/ask-remove-entries");
+	    return(1) if ($ret[1] =~ /^[^y]/i);
         }
     }
 
@@ -154,16 +163,15 @@
     chomp($service);
 
     if ((&scan_entries("$service", $pattern) > 1) and (not defined($multi))) {
-        print "\nWARNING!!!!!! $inetdcf contains multiple entries for \n";
-        print "the \`$service' service. You're about to disable these entries.\n";
-        print "Do you want to continue? [n] ";
-        if (<STDIN> =~ /^[^y]/i) {
-            print "\nOk, I'll stop ...\n";
-            return(1);
-        } else {
-            if ($want_continue == 0) {
-                print "\nOk, I'll continue ...\n";
-            }
+	set("update-inetd/ask-disable-entries", "no");
+	fset("update-inetd/ask-disable-entries", "seen", "false");
+        subst("update-inetd/ask-disable-entries", "service", "$service");
+	subst("update-inetd/ask-disable-entries", "inetdcf", "$inetdcf");
+	input("high", "update-inetd/ask-disable-entries");
+	@ret = go();
+	if ($ret[0] == 0) {
+	    @ret = get("update-inetd/ask-disable-entries");
+	    return(1) if ($ret[1] =~ /^[^y]/i);
         }
     }
 
@@ -240,7 +248,7 @@
 }
 
 sub printv {
-    print @_ if (defined($verbose));
+    print STDERR @_ if (defined($verbose));
 }
 
 1;
diff -ruN update-inetd-4.27.orig/update-inetd update-inetd-4.27/update-inetd
--- update-inetd-4.27.orig/update-inetd	2005-03-21 19:21:53.000000000 +0100
+++ update-inetd-4.27/update-inetd	2006-11-01 14:05:30.000000000 +0100
@@ -22,15 +22,6 @@
 require 5.000;
 require DebianNet;
 
-# hack to make update-inetd work in a script which calls debconf
-if($ENV{DEBIAN_HAS_FRONTEND}) {
-    my $file = ($ENV{DEBIAN_FRONTEND} eq 'noninteractive') ?
-	'/dev/null' : '/dev/tty'; # see 4.13 changelog entry
-    open(STDIN,  "<$file") or die "Couldn't reopen stdin($file): $!";
-    open(STDOUT, ">$file") or die "Couldn't reopen stdout($file): $!";
-    open(STDERR, ">$file") or die "Couldn't reopen stderr($file): $!";
-}
-
 $| = 1;
 
 $version = "1.12";
@@ -73,8 +64,8 @@
         $pattern = shift(@ARGV);
         die "$0: Option \`--pattern' requires an argument\n" unless ($pattern and not ($pattern =~ m/^--/));
     } else {
-        print "$0: Unknown option: $_\n";
-        print "Try \`$0 --help' for more information.\n";
+        print STDERR "$0: Unknown option: $_\n";
+        print STDERR "Try \`$0 --help' for more information.\n";
         exit(1);
     }
 }
@@ -86,29 +77,29 @@
 # die "You must be root to run this script.\n" if ($> != 0);
 
 if ($#ARGV > 0) {
-    print "Too many arguments!\n";
+    print STDERR "Too many arguments!\n";
 } elsif ($#ARGV == -1) {
-    print "Too few arguments!\n";
+    print STDERR "Too few arguments!\n";
 } else {
     $modearg = $ARGV[0];
     die "The service name may not include a whitespace character!\n" if (($mode eq "enable" or $mode eq "disable") and ($modearg =~ /\s+|\\t/));
     die "The entry definition does not contain any whitespace characters!\n" if ($mode eq "add" and not ($modearg =~ /\s+|\\t/));
 }
 
-print "Processing $DebianNet::inetdcf\n" if (defined($DebianNet::verbose));
-print "Using mode \"$mode\", group \"$group\", pattern \"$pattern\" and seperator \"$DebianNet::sep\"\n" if (defined($debug));
-print "Multiple remove/disable: $DebianNet::multi\n" if (defined($debug) and defined($DebianNet::multi));
-print "ARGUMENT: $modearg\n" if (defined($debug));
+print STDERR "Processing $DebianNet::inetdcf\n" if (defined($DebianNet::verbose));
+print STDERR "Using mode \"$mode\", group \"$group\", pattern \"$pattern\" and seperator \"$DebianNet::sep\"\n" if (defined($debug));
+print STDERR "Multiple remove/disable: $DebianNet::multi\n" if (defined($debug) and defined($DebianNet::multi));
+print STDERR "ARGUMENT: $modearg\n" if (defined($debug));
 
 if ($mode eq "add") {
     if (( -f "/etc/xinetd.conf" ) && ( -x "/usr/sbin/xinetd" )) {
-        print "--------- IMPORTANT INFORMATION FOR XINETD USERS ----------\n";
-        print "The following line will be added to your /etc/inetd.conf file:\n\n";
-        print "$modearg\n\n";
-        print "If you are indeed using xinetd, you will have to convert the\n";
-        print "above into /etc/xinetd.conf format, and add it manually. See\n";
-        print "/usr/share/doc/xinetd/README.Debian for more information.\n";
-        print "-----------------------------------------------------------\n\n";
+        print STDERR "--------- IMPORTANT INFORMATION FOR XINETD USERS ----------\n";
+        print STDERR "The following line will be added to your /etc/inetd.conf file:\n\n";
+        print STDERR "$modearg\n\n";
+        print STDERR "If you are indeed using xinetd, you will have to convert the\n";
+        print STDERR "above into /etc/xinetd.conf format, and add it manually. See\n";
+        print STDERR "/usr/share/doc/xinetd/README.Debian for more information.\n";
+        print STDERR "-----------------------------------------------------------\n\n";
     }
 
     DebianNet::add_service($modearg, $group);
@@ -131,13 +122,13 @@
 }
 
 sub version {
-    print "$0 $version\n";
-    print "DebianNet module $DebianNet::version\n";
+    print STDERR "$0 $version\n";
+    print STDERR "DebianNet module $DebianNet::version\n";
     exit(0);
 }
 
 sub usage {
-    print <<EOF;
+    print STDERR <<EOF;
 Usage: $0 [OPTION] MODE ARGUMENT
 
 Options:

Message sent on to Yaroslav Halchenko <debian@onerussian.com>:
Bug#282147. Full text and rfc822 format available.

Tags added: patch Request was from Roland Stigge <stigge@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to md@Linux.IT (md):
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #72 received at 282147@bugs.debian.org (full text, mbox):

From: md@Linux.IT (md)
To: Roland Stigge <stigge@debian.org>, 298425-quiet@bugs.debian.org
Cc: 282147@bugs.debian.org, 282147-submitter@bugs.debian.org, 298425-submitter@bugs.debian.org, 394086-submitter@bugs.debian.org
Subject: Re: Bug#298425: update-inetd interaction
Date: Wed, 1 Nov 2006 16:08:09 +0100
[Message part 1 (text/plain, inline)]
On Nov 01, Roland Stigge <stigge@debian.org> wrote:

> attached you will find a patch that modifies update-inetd to use debconf
> for interaction (and therefore non-interaction if non-interactive, with
> reasonable defaults).
This patch changes the semantic of the program, which currently asks the
user every time there is a conflict.
I agree that it's considered a stupid design nowadays, but I am opposed
to changing it without better understanding the consequences for other
packages.
(IOW, if you want to apply this patch then please adopt the package.)

-- 
ciao,
Marco
[signature.asc (application/pgp-signature, inline)]

Message sent on to Yaroslav Halchenko <debian@onerussian.com>:
Bug#282147. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@debian.org>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #80 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@debian.org>
To: md <md@Linux.IT>
Cc: 298425-quiet@bugs.debian.org, 282147@bugs.debian.org, 282147-submitter@bugs.debian.org, 298425-submitter@bugs.debian.org, 394086-submitter@bugs.debian.org
Subject: Re: Bug#298425: update-inetd interaction
Date: Wed, 01 Nov 2006 17:12:27 +0100
Hi,

md wrote:
>> attached you will find a patch that modifies update-inetd to use debconf
>> for interaction (and therefore non-interaction if non-interactive, with
>> reasonable defaults).
> This patch changes the semantic of the program, which currently asks the
> user every time there is a conflict.

The purpose of the patch is to provide a (debconf) question at exactly
the same place where it was done before (interactively, and using the
same default values if non-interactively): As with some other packages
(e.g. ucf), the configuration is not done globally as with the general
debconf concept (once on update-inetd install/configure -> not at all),
but when update-inetd is actually called, and it makes sure to display
the default choice _everytime_ (when interactive).

Please point me to the respective change that does something different.

Thanks,

bye,
  Roland



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to md@Linux.IT (md):
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #85 received at 282147@bugs.debian.org (full text, mbox):

From: md@Linux.IT (md)
To: Roland Stigge <stigge@debian.org>, 282147@bugs.debian.org
Subject: Re: Bug#282147: update-inetd interaction
Date: Wed, 1 Nov 2006 17:40:12 +0100
[Message part 1 (text/plain, inline)]
OK then, if you have tested it feel free to NMU.

-- 
ciao,
Marco
[signature.asc (application/pgp-signature, inline)]

Message sent on to Yaroslav Halchenko <debian@onerussian.com>:
Bug#282147. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #93 received at 282147@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: 282147@bugs.debian.org
Cc: Gerhard Gaussling <ggrubbish@web.de>, Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Re: #282147: update-inetd broken by user interaction
Date: Thu, 02 Nov 2006 03:01:36 +0100
[Message part 1 (text/plain, inline)]
On Wednesday 01 November 2006 19:04, Roland Stigge wrote:
> Before uploading I would like to get some feedback. Please test if
> update-inetd behaves well with the package you were interested in. The
> patched update-inetd*.deb (and source) is also available from
> http://people.debian.org/~stigge/packages/ .

Hmmm. That directory only contains version 4.27 of update-inetd, which is 
the same version as in the archives. Is that intentional?

I have just tested if the "new" version solves the problems during a new 
installation when using the graphical installer. I'm afraid it does not.

I still get:
   Couldn't reopen stdin(/dev/tty): \
   No such device or address at /usr/share/bin/update-inetd line 29.

The procedure I followed for the test was:
- take daily netinst d-i image
- boot with 'installgui priority=medium'
- proceed until "Select and install software"
- switch to VT2 (ctrl-alt-F2)
- chroot /target
- 'wget' new version of update-inetd & 'dpkg -i' that
  this tells me: 4.27 is being replaced with 4.27...
- switch back to VT5
- start "Select and install software"
- select as tasks "standard" and "file server"

Cheers,
FJP
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #98 received at 282147@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: 282147@bugs.debian.org
Cc: Gerhard Gaussling <ggrubbish@web.de>, Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Re: #282147: update-inetd broken by user interaction
Date: Thu, 02 Nov 2006 03:42:28 +0100
[Message part 1 (text/plain, inline)]
On Thursday 02 November 2006 03:01, Frans Pop wrote:
> I still get:
>    Couldn't reopen stdin(/dev/tty): \
>    No such device or address at /usr/share/bin/update-inetd line 29.
                                  ^^^^^^^^^^^^^^^
Eh, that should have been /usr/sbin/. Sorry.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@antcom.de>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #103 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@antcom.de>
To: Frans Pop <elendil@planet.nl>
Cc: 282147@bugs.debian.org, Gerhard Gaussling <ggrubbish@web.de>, Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Re: #282147: update-inetd broken by user interaction
Date: Thu, 02 Nov 2006 12:00:44 +0100
Hi Frans,

thanks for testing. You wrote:
> I still get:
>    Couldn't reopen stdin(/dev/tty): \
>    No such device or address at /usr/share/bin/update-inetd line 29.

I wonder how this could happen because the new line 29 doesn't contain
the open call anymore but a perl =~ s... Could you please check if the
actually used /usr/sbin/update-inetd is the new one? I guess it was
downgraded inbetween by the install process.

I have updated the package at http://people.debian.org/~stigge/packages/
to be 4.27rs1, but that shouldn't make a big difference.

Please recheck. Maybe d-i install process needs to be tweaked to prevent
it from dpkg-i'ing the original update-inetd.

Thanks in advance.

bye,
  Roland



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #108 received at 282147@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: 282147@bugs.debian.org
Cc: Gerhard Gaussling <ggrubbish@web.de>, Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Re: #282147: update-inetd broken by user interaction
Date: Fri, 03 Nov 2006 16:19:10 +0100
[Message part 1 (text/plain, inline)]
On Thursday 02 November 2006 12:00, Roland Stigge wrote:
> I have updated the package at
> http://people.debian.org/~stigge/packages/ to be 4.27rs1, but that
> shouldn't make a big difference.

Well, it does. After installing this version it works correctly. Thanks.

> Please recheck. Maybe d-i install process needs to be tweaked to
> prevent it from dpkg-i'ing the original update-inetd.

No, d-i does not install individual packages like this by name, and the 
packaging tools should not normally reinstall a package that is already 
installed.

Not sure why your previous version did not work, but I doubt it makes very 
much sense to investigate that.
Hmm. I seem to remember that I _have_ seen something like this before (not 
completely sure though): I had a privately built package installed before 
a new version from the buildds hit the mirrors and that new official 
version was also installed even though the version numbers were the same; 
I remember being surprised at that. Maybe aptitude (or apt/dpkg?) has 
something like: "if versions are the same, but md5sum is different from 
already installed package, install new package"?

Anyway, in general I think it is good practice to always update the 
version when making a new version of a package available for testing.
I think I'd probably have chosen 2.28~rs1 because AIUI the ~ facility was 
invented specifically for such situations.

Cheers,
FJP
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@antcom.de>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #113 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@antcom.de>
To: Frans Pop <elendil@planet.nl>, 282147@bugs.debian.org
Cc: Gerhard Gaussling <ggrubbish@web.de>, Ronny Aasen <ronny@skolelinux.no>, Petter Reinholdtsen <pere@hungry.com>
Subject: Re: Bug#282147: #282147: update-inetd broken by user interaction
Date: Fri, 03 Nov 2006 17:26:41 +0100
Frans Pop wrote:
> Not sure why your previous version did not work, but I doubt it makes very 
> much sense to investigate that.
> Hmm. I seem to remember that I _have_ seen something like this before (not 
> completely sure though): I had a privately built package installed before 
> a new version from the buildds hit the mirrors and that new official 
> version was also installed even though the version numbers were the same; 
> I remember being surprised at that.

Exactly the same for me, and I was suspecting something like this for
your original case.

> Anyway, in general I think it is good practice to always update the 
> version when making a new version of a package available for testing.

Yes, of course.

Will NMU if no other ideas come along during the next days.

bye,
  Roland



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #118 received at 282147@bugs.debian.org (full text, mbox):

From: Steve Langasek <vorlon@debian.org>
To: 282147@bugs.debian.org, Roland Stigge <stigge@antcom.de>
Subject: Re: update-inetd broken by user interaction
Date: Sat, 11 Nov 2006 03:10:22 -0800
Hi Roland,

> Will NMU if no other ideas come along during the next days.

It's been a few days.  Still planning to NMU? :)

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@antcom.de>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #123 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@antcom.de>
To: Steve Langasek <vorlon@debian.org>, 282147@bugs.debian.org
Subject: Re: Bug#282147: update-inetd broken by user interaction
Date: Sat, 11 Nov 2006 13:22:05 +0100
Steve Langasek wrote:
>> Will NMU if no other ideas come along during the next days.
> 
> It's been a few days.  Still planning to NMU? :)

OK, will do it this weekend.

Frans tested successfully and no other remarks came in. At least before
the NMU. ;)

bye,
  Roland



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#282147; Package update-inetd. Full text and rfc822 format available.

Acknowledgement sent to Roland Stigge <stigge@antcom.de>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #128 received at 282147@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@antcom.de>
To: 282147@bugs.debian.org
Subject: NMU patch
Date: Sun, 12 Nov 2006 13:59:01 +0100
[Message part 1 (text/plain, inline)]
Hi,

the patch as in the NMU is in the attachment. (Proposed changes +
changelog entry.)

bye,
  Roland
[update-inetd.nmu.patch (text/x-patch, inline)]
diff -ruN update-inetd-4.27.orig/debian/changelog update-inetd-4.27/debian/changelog
--- update-inetd-4.27.orig/debian/changelog	2006-09-10 12:24:46.000000000 +0200
+++ update-inetd-4.27/debian/changelog	2006-11-12 13:55:03.000000000 +0100
@@ -1,3 +1,11 @@
+update-inetd (4.27-0.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Changes interactive configuration acknowledgements to debconf questions
+    (Closes: #282147)
+
+ -- Roland Stigge <stigge@antcom.de>  Sun, 12 Nov 2006 13:30:32 +0100
+
 update-inetd (4.27) unstable; urgency=low
 
   * First upload.
diff -ruN update-inetd-4.27.orig/debian/control update-inetd-4.27/debian/control
--- update-inetd-4.27.orig/debian/control	2006-09-10 21:53:05.000000000 +0200
+++ update-inetd-4.27/debian/control	2006-11-12 13:54:45.000000000 +0100
@@ -10,6 +10,7 @@
 Package: update-inetd
 Architecture: all
 Conflicts: netbase (<< 4.27)
+Depends: debconf
 Description: inetd.conf updater
  This package provides a program used by other packages to automatically
  update /etc/inetd.conf.
diff -ruN update-inetd-4.27.orig/debian/postinst update-inetd-4.27/debian/postinst
--- update-inetd-4.27.orig/debian/postinst	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27/debian/postinst	2006-11-12 13:54:45.000000000 +0100
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+# Abort if any command returns an error value
+set -e
+
+if [ "$1" == "configure" -o "$1" == "reconfigure" ] ; then
+	. /usr/share/debconf/confmodule
+	db_capb
+fi
diff -ruN update-inetd-4.27.orig/debian/rules update-inetd-4.27/debian/rules
--- update-inetd-4.27.orig/debian/rules	2006-09-10 21:53:01.000000000 +0200
+++ update-inetd-4.27/debian/rules	2006-11-12 13:54:45.000000000 +0100
@@ -22,6 +22,7 @@
 
 	dh_installchangelogs
 	dh_installdocs
+	dh_installdebconf
 	dh_installman DebianNet.3pm update-inetd.8
 	dh_compress
 	dh_fixperms
diff -ruN update-inetd-4.27.orig/debian/templates update-inetd-4.27/debian/templates
--- update-inetd-4.27.orig/debian/templates	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27/debian/templates	2006-11-12 13:54:45.000000000 +0100
@@ -0,0 +1,37 @@
+Template: update-inetd/ask-several-entries
+Type: select
+Choices: yes, no
+Default: yes
+Description: Ignore multiple entries and continue without changes?
+ There are several entries for ${sservice} in ${inetdcf}.
+
+Template: update-inetd/ask-entry-present
+Type: select
+Choices: yes, no
+Default: yes
+Description: Leave existing entry and continue without changes?
+ Trying to add the following entry:
+ .
+ ${newentry}
+ .
+ There is already an entry for ${sservice} in ${inetdcf},
+ but I don't recognise it.  Here is what it looks like:
+ .
+ ${lookslike}
+
+Template: update-inetd/ask-remove-entries
+Type: select
+Choices: yes, no
+Default: no
+Description: Remove inetd entries?
+ ${inetdcf} contains multiple entries for
+ the `${service}' service. You're about to remove these entries.
+
+Template: update-inetd/ask-disable-entries
+Type: select
+Choices: yes, no
+Default: no
+Description: Disable inetd entries?
+ ${inetdcf} contains multiple entries for
+ the `${service}' service. You're about to disable these entries.
+
diff -ruN update-inetd-4.27.orig/DebianNet.pm update-inetd-4.27/DebianNet.pm
--- update-inetd-4.27.orig/DebianNet.pm	2005-03-21 19:54:31.000000000 +0100
+++ update-inetd-4.27/DebianNet.pm	2006-11-12 13:54:45.000000000 +0100
@@ -14,6 +14,8 @@
 
 require 5.000;
 
+use Debconf::Client::ConfModule ':all';
+
 $inetdcf="/etc/inetd.conf";
 $sep = "#<off># ";
 $version = "1.11";
@@ -46,12 +48,31 @@
         } else {
             if (grep(m/^$sservice\s+/,@inetd)) {
                 if (grep(m/^$sservice\s+/,@inetd) > 1) {
-                    &inetde("There are several entries for $sservice in $inetdcf\n");
+		    set("update-inetd/ask-several-entries", "yes");
+		    fset("update-inetd/ask-several-entries", "seen", "false");
+		    subst("update-inetd/ask-several-entries", "sservice", "$sservice");
+		    subst("update-inetd/ask-several-entries", "inetdcf", "$inetdcf");
+		    input("high", "update-inetd/ask-several-entries");
+		    @ret = go();
+		    if ($ret[0] == 0) {
+		        @ret = get("update-inetd/ask-several-entries");
+			exit(1) if ($ret[1] !~ m/y/i);
+		    }
                 } elsif (!grep(m:^#?.*$searchentry.*:, @inetd)) {
-                    print"\nTrying to add the following entry:\n\n $newentry\n\n";
-                    &inetde("There is already an entry for $sservice in $inetdcf,
-but I don't recognise it.  Here is what it looks like:\n
- ".join(' ',grep(m/^$sservice\s+/,@inetd)));
+		    set("update-inetd/ask-entry-present", "yes");
+		    fset("update-inetd/ask-entry-present", "seen", "false");
+		    subst("update-inetd/ask-entry-present", "newentry", "$newentry");
+		    subst("update-inetd/ask-entry-present", "sservice", "$sservice");
+		    subst("update-inetd/ask-entry-present", "inetdcf", "$inetdcf");
+		    my $lookslike = (grep(m/^$sservice\s+/,@inetd))[0];
+		    $lookslike =~ s/\n//g;
+		    subst("update-inetd/ask-entry-present", "lookslike", "$lookslike");
+		    input("high", "update-inetd/ask-entry-present");
+		    @ret = go();
+		    if ($ret[0] == 0) {
+		        @ret = get("update-inetd/ask-entry-present");
+			exit(1) if ($ret[1] !~ m/y/i);
+		    }
                 }
             } elsif (grep(m/^#\s*$sservice\s+/, @inetd) >= 1 or
               (($service =~ s/^#//) and grep(m/^$service\s+/, @inetd)>=1)) {
@@ -90,17 +111,6 @@
         }
     }
 
-    sub inetde {
-        my($response);
-        do {
-            print @_,
-"\nDo you want to ignore this potential problem and continue, or would
-you rather not do so now ?  Continue?  (n/y) ";
-            $!=0; defined($response=<STDIN>) || die "netconfig: EOF/error on stdin: $!\n";
-        } while ($response !~ m/^\s*[yn]?\s*$/i);
-        return(1) if($response =~ m/y/i);
-        exit(1);
-    }
     return(1);
 }
 
@@ -109,21 +119,20 @@
     unless(defined($service)) { return(-1) };
     chomp($service);
     if($service eq "") {
-         print "DebianNet::remove_service called with empty argument\n";
+         print STDERR "DebianNet::remove_service called with empty argument\n";
          return(-1);
     }
 
     if ((&scan_entries("$service") > 1) and (not defined($multi))) {
-        print "\nWARNING!!!!!! $inetdcf contains multiple entries for \n";
-        print "the \`$service' service. You're about to remove these entries.\n";
-        print "Do you want to continue? [n] ";
-        if (<STDIN> =~ /^[^y]/i) {
-            print "\nOk, I'll stop ...\n";
-            return(1);
-        } else {
-            if ($want_continue == 0) {
-                print "\nOk, I'll continue ...\n";
-            }
+	set("update-inetd/ask-remove-entries", "no");
+	fset("update-inetd/ask-remove-entries", "seen", "false");
+        subst("update-inetd/ask-remove-entries", "service", "$service");
+	subst("update-inetd/ask-remove-entries", "inetdcf", "$inetdcf");
+	input("high", "update-inetd/ask-remove-entries");
+	@ret = go();
+	if ($ret[0] == 0) {
+	    @ret = get("update-inetd/ask-remove-entries");
+	    return(1) if ($ret[1] =~ /^[^y]/i);
         }
     }
 
@@ -154,16 +163,15 @@
     chomp($service);
 
     if ((&scan_entries("$service", $pattern) > 1) and (not defined($multi))) {
-        print "\nWARNING!!!!!! $inetdcf contains multiple entries for \n";
-        print "the \`$service' service. You're about to disable these entries.\n";
-        print "Do you want to continue? [n] ";
-        if (<STDIN> =~ /^[^y]/i) {
-            print "\nOk, I'll stop ...\n";
-            return(1);
-        } else {
-            if ($want_continue == 0) {
-                print "\nOk, I'll continue ...\n";
-            }
+	set("update-inetd/ask-disable-entries", "no");
+	fset("update-inetd/ask-disable-entries", "seen", "false");
+        subst("update-inetd/ask-disable-entries", "service", "$service");
+	subst("update-inetd/ask-disable-entries", "inetdcf", "$inetdcf");
+	input("high", "update-inetd/ask-disable-entries");
+	@ret = go();
+	if ($ret[0] == 0) {
+	    @ret = get("update-inetd/ask-disable-entries");
+	    return(1) if ($ret[1] =~ /^[^y]/i);
         }
     }
 
@@ -240,7 +248,7 @@
 }
 
 sub printv {
-    print @_ if (defined($verbose));
+    print STDERR @_ if (defined($verbose));
 }
 
 1;
diff -ruN update-inetd-4.27.orig/update-inetd update-inetd-4.27/update-inetd
--- update-inetd-4.27.orig/update-inetd	2005-03-21 19:21:53.000000000 +0100
+++ update-inetd-4.27/update-inetd	2006-11-12 13:54:45.000000000 +0100
@@ -22,15 +22,6 @@
 require 5.000;
 require DebianNet;
 
-# hack to make update-inetd work in a script which calls debconf
-if($ENV{DEBIAN_HAS_FRONTEND}) {
-    my $file = ($ENV{DEBIAN_FRONTEND} eq 'noninteractive') ?
-	'/dev/null' : '/dev/tty'; # see 4.13 changelog entry
-    open(STDIN,  "<$file") or die "Couldn't reopen stdin($file): $!";
-    open(STDOUT, ">$file") or die "Couldn't reopen stdout($file): $!";
-    open(STDERR, ">$file") or die "Couldn't reopen stderr($file): $!";
-}
-
 $| = 1;
 
 $version = "1.12";
@@ -73,8 +64,8 @@
         $pattern = shift(@ARGV);
         die "$0: Option \`--pattern' requires an argument\n" unless ($pattern and not ($pattern =~ m/^--/));
     } else {
-        print "$0: Unknown option: $_\n";
-        print "Try \`$0 --help' for more information.\n";
+        print STDERR "$0: Unknown option: $_\n";
+        print STDERR "Try \`$0 --help' for more information.\n";
         exit(1);
     }
 }
@@ -86,29 +77,29 @@
 # die "You must be root to run this script.\n" if ($> != 0);
 
 if ($#ARGV > 0) {
-    print "Too many arguments!\n";
+    print STDERR "Too many arguments!\n";
 } elsif ($#ARGV == -1) {
-    print "Too few arguments!\n";
+    print STDERR "Too few arguments!\n";
 } else {
     $modearg = $ARGV[0];
     die "The service name may not include a whitespace character!\n" if (($mode eq "enable" or $mode eq "disable") and ($modearg =~ /\s+|\\t/));
     die "The entry definition does not contain any whitespace characters!\n" if ($mode eq "add" and not ($modearg =~ /\s+|\\t/));
 }
 
-print "Processing $DebianNet::inetdcf\n" if (defined($DebianNet::verbose));
-print "Using mode \"$mode\", group \"$group\", pattern \"$pattern\" and seperator \"$DebianNet::sep\"\n" if (defined($debug));
-print "Multiple remove/disable: $DebianNet::multi\n" if (defined($debug) and defined($DebianNet::multi));
-print "ARGUMENT: $modearg\n" if (defined($debug));
+print STDERR "Processing $DebianNet::inetdcf\n" if (defined($DebianNet::verbose));
+print STDERR "Using mode \"$mode\", group \"$group\", pattern \"$pattern\" and seperator \"$DebianNet::sep\"\n" if (defined($debug));
+print STDERR "Multiple remove/disable: $DebianNet::multi\n" if (defined($debug) and defined($DebianNet::multi));
+print STDERR "ARGUMENT: $modearg\n" if (defined($debug));
 
 if ($mode eq "add") {
     if (( -f "/etc/xinetd.conf" ) && ( -x "/usr/sbin/xinetd" )) {
-        print "--------- IMPORTANT INFORMATION FOR XINETD USERS ----------\n";
-        print "The following line will be added to your /etc/inetd.conf file:\n\n";
-        print "$modearg\n\n";
-        print "If you are indeed using xinetd, you will have to convert the\n";
-        print "above into /etc/xinetd.conf format, and add it manually. See\n";
-        print "/usr/share/doc/xinetd/README.Debian for more information.\n";
-        print "-----------------------------------------------------------\n\n";
+        print STDERR "--------- IMPORTANT INFORMATION FOR XINETD USERS ----------\n";
+        print STDERR "The following line will be added to your /etc/inetd.conf file:\n\n";
+        print STDERR "$modearg\n\n";
+        print STDERR "If you are indeed using xinetd, you will have to convert the\n";
+        print STDERR "above into /etc/xinetd.conf format, and add it manually. See\n";
+        print STDERR "/usr/share/doc/xinetd/README.Debian for more information.\n";
+        print STDERR "-----------------------------------------------------------\n\n";
     }
 
     DebianNet::add_service($modearg, $group);
@@ -131,13 +122,13 @@
 }
 
 sub version {
-    print "$0 $version\n";
-    print "DebianNet module $DebianNet::version\n";
+    print STDERR "$0 $version\n";
+    print STDERR "DebianNet module $DebianNet::version\n";
     exit(0);
 }
 
 sub usage {
-    print <<EOF;
+    print STDERR <<EOF;
 Usage: $0 [OPTION] MODE ARGUMENT
 
 Options:

Reply sent to Roland Stigge <stigge@antcom.de>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Yaroslav Halchenko <debian@onerussian.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #133 received at 282147-close@bugs.debian.org (full text, mbox):

From: Roland Stigge <stigge@antcom.de>
To: 282147-close@bugs.debian.org
Subject: Bug#282147: fixed in update-inetd 4.27-0.1
Date: Sun, 12 Nov 2006 05:02:28 -0800
Source: update-inetd
Source-Version: 4.27-0.1

We believe that the bug you reported is fixed in the latest version of
update-inetd, which is due to be installed in the Debian FTP archive:

update-inetd_4.27-0.1.dsc
  to pool/main/u/update-inetd/update-inetd_4.27-0.1.dsc
update-inetd_4.27-0.1.tar.gz
  to pool/main/u/update-inetd/update-inetd_4.27-0.1.tar.gz
update-inetd_4.27-0.1_all.deb
  to pool/main/u/update-inetd/update-inetd_4.27-0.1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 282147@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roland Stigge <stigge@antcom.de> (supplier of updated update-inetd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 12 Nov 2006 13:30:32 +0100
Source: update-inetd
Binary: update-inetd
Architecture: source all
Version: 4.27-0.1
Distribution: unstable
Urgency: low
Maintainer: Anthony Towns <ajt@debian.org>
Changed-By: Roland Stigge <stigge@antcom.de>
Description: 
 update-inetd - inetd.conf updater
Closes: 282147
Changes: 
 update-inetd (4.27-0.1) unstable; urgency=low
 .
   * Non-maintainer upload
   * Changes interactive configuration acknowledgements to debconf questions
     (Closes: #282147)
Files: 
 cee1f0cf186b7920b4ac3998a1de2efd 623 admin standard update-inetd_4.27-0.1.dsc
 63d6c2761750de8d1c75757340ecb0eb 7835 admin standard update-inetd_4.27-0.1.tar.gz
 61bfdc7f86286e6c4aa476c2206d7fdc 10142 admin standard update-inetd_4.27-0.1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFVxV6caH/YBv43g8RAhosAJ91WH6NzybYmEt3GXfKd2Sf16mdxQCg49Qs
DQbgKqCIuNkfbmwsNp3Wc8s=
=bDga
-----END PGP SIGNATURE-----




Reply sent to Roland Stigge <stigge@antcom.de>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jonathan Quick <jon@hartrao.ac.za>:
Bug acknowledged by developer. Full text and rfc822 format available.

Reply sent to Roland Stigge <stigge@antcom.de>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Steffen Grunewald <steffen.grunewald@aei.mpg.de>:
Bug acknowledged by developer. Full text and rfc822 format available.

Bug marked as found in version 4.27. Request was from Steinar H. Gunderson <sesse@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 23:01:34 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 00:20:49 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.