Bug in /usr/bin/ucf when upgrading Hardy

Bug #268364 reported by Flemming Bjerke
2
Affects Status Importance Assigned to Milestone
ucf (Debian)
Fix Released
Unknown
ucf (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I upgraded my hardy, but did not succeed. I got the following error (sorry, it is in danish):

______________________________________________________

Sætter samba-common (3.0.28a-1ubuntu4.5) op...
/usr/bin/ucf: line 181: cannot create temp file for here document: No space left on device
dpkg: fejl under behandling af samba-common (--configure):
 underproces post-installation script returnerede afslutningsstatus 1
dpkg: afhængighedsproblemer forhindrer konfiguration af smbclient:
 smbclient afhænger af samba-common (= 3.0.28a-1ubuntu4.5), men:
  Pakken samba-common er ikke sat op endnu.
dpkg: fejl under behandling af smbclient (--configure):
 afhængighedsproblemer - efterlader den ukonfigureret

_________________________________________________

After some messing around I cheked /usr/bin/ucf. There I found the following shit, which I had to comment out to finish my upgrade.

____________________________________________________________________________

if [ "$DEBCONF_ALREADY_RUNNING" ] && [ "$DEBCONF_OK" = NO ]; then
 # Commented out for now, uncomment after a while to begin nagging
 # maintainers to fix their scripts.
 #cat \
<<END
*** WARNING: ucf was run from a maintainer script that uses debconf, but
             the script did not pass --debconf-ok to ucf. The maintainer
             script should be fixed to not stop debconf before calling ucf,
             and pass it this parameter. For now, ucf will revert to using
             old-style, non-debconf prompting. Ugh!

             Please inform the package maintainer about this problem.
END
fi

------------------------------------------------------------------

I become really, really annoyed when someone makes a bug (without writing who he or she is, of course) in order to give me others troubles in order to make me and others terrorise the maintainer. I simply detest being inciting to trouble other people!!!!

Incidentally, it's a really good way to scare those who don't anything about IT from using ubuntu. Yes, make 10 more of these, and we have only the nerds left!

Thus bug should be removed from ucf immediately!!!

Revision history for this message
Benjamin Drung (bdrung) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in samba-common.
For future reference you might be interested to know that a lot of applications have bug reporting functionality built in to them. This can be accessed via the Report a Problem option in the Help menu for the application with which you are having an issue. You can learn more about this feature at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Flemming Bjerke (flem) wrote : Re: [Bug 268364] Re: Bug in /usr/bin/ucf when upgrading Hardy

Wednesday 10 September 2008 skrev Benjamin Drung:

> ............ . I have classified this bug
> as a bug in samba-common. ......
>
> ** Changed in: samba (Ubuntu)
> Sourcepackagename: None => samba

I don't think this a good idea because the bug is not a specific samba
problem - unless /usr/bin/ucf is invoked by samba, only. From /usr/bin/ucf:

# This script attempts to provide conffile like handling for files not
# shipped in a Debian package, but handled by the postinst. Using this
# script, one may ship a bunch of default cofiguration files somewhere
# in /usr (/usr/share/<pkg> is a good location), and maintain files in
# /etc.
#
# The motivation for this script was to provide conffile like handling
# for start files for emacs lisp packages (for example,
# /etc/emacs21/site-stard.d/50psgml-init.el) ...
#
# This script is meant to be invoked by the packages install script

 I don't know where ucf comes from, but I don't think those responsible for
the samba packages should do anything about it. It does not stem from their
packet.

Moreover, I experienced it as a kubuntu-desktop problem, too, because samba is
included in the kubuntu-desktop. That is, to get rid of the problem, you must
remove kubuntu-desktop ... or change ucf.

BUT, I wonder why all other kubuntu users apparently don't this problem.
Perhaps they don't have this version of ucf on their box. Could this have
something to do with that my system is upgraded from Dapper? Please, checkout
if the bug is in your ucf! It is easily done..

You see this is not a samba problem.

--
Flemming Bjerke
Hyldebjerg 67
DK-4330 Hvalsø
Phone: +45 46928846
Mobile: +45 22120366

Revision history for this message
Chuck Short (zulcss) wrote :

There is also no need to use that language either, booting to the right package

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :

Also it looks like you ran out of diskspace.

chuck

Revision history for this message
Flemming Bjerke (flem) wrote :

Friday 12 September 2008 skrev Chuck Short:
> Also it looks like you ran out of diskspace.

Yes, I noticed it in error messages. I checked with df, and there was enough
diskspace. I was a bit confused about this. But, after having changed ucf
the error disappeared.

--
Flemming Bjerke
Hyldebjerg 67
DK-4330 Hvalsø
Phone: +45 46928846
Mobile: +45 22120366

Revision history for this message
Flemming Bjerke (flem) wrote :

Friday 12 September 2008 skrev Chuck Short:
> There is also no need to use that language either

Sorry, you are right. But, I found it very offensive that someone
(anonymously) deliberately made a bug in order to trouble me, having the
explicit purpose of getting me to mob a developer.

--
Flemming Bjerke
Hyldebjerg 67
DK-4330 Hvalsø
Phone: +45 46928846
Mobile: +45 22120366

Revision history for this message
Steve Langasek (vorlon) wrote :

On Mon, Sep 15, 2008 at 06:51:15AM -0000, Flemming Bjerke wrote:
> Sorry, you are right. But, I found it very offensive that someone
> (anonymously) deliberately made a bug in order to trouble me, having the
> explicit purpose of getting me to mob a developer.

Well, this is false. No one deliberately added a bug, and the bug here is
not the one you've described. The bug is that HERE docs don't fail
gracefully in the event of disk space problems, as you must have had when
upgrading, and this wasn't taken into account when commenting out the 'cat'
command (probably because it was completely unforeseen by the author of ucf
- this was a surprising error message that I had never seen before, either).

There's also a second bug here, which is that this line should never even be
reached because samba-common is *not* calling ucf incorrectly; it is passing
the --debconf-ok argument, but ucf does this check before it reaches the
argument parsing block.

Fixing the latter bug would resolve the former in almost all cases anyway;
and if the user's disk is full, this is likely the least severe bug one
could possibly run into during an upgrade as a result.

Revision history for this message
Flemming Bjerke (flem) wrote :
  • ucf Edit (32.0 KiB, application/x-shellscript; name="ucf")
Download full text (4.3 KiB)

Monday 15 September 2008 skrev Steve Langasek:
> On Mon, Sep 15, 2008 at 06:51:15AM -0000, Flemming Bjerke wrote:
> > Sorry, you are right. But, I found it very offensive that someone
> > (anonymously) deliberately made a bug in order to trouble me, having the
> > explicit purpose of getting me to mob a developer.
>
> Well, this is false.
Now, I see you are right.

> No one deliberately added a bug, and the bug here is
> not the one you've described.

Indeed, it is the one I have described:

I noticed two things from ucf:

1. # uncomment after a while to begin nagging
        # maintainers to fix their scripts.
(according dictionary,com does "nag" mean:
- to annoy by persistent faultfinding, complaints, or demands.
- to keep in a state of troubled awareness or anxiety, as a recurrent pain or
problem)
In my view, "nagging" is not a nice thing to do.

2. If the following condition is fulfilled:
if [ "$DEBCONF_ALREADY_RUNNING" ] && [ "$DEBCONF_OK" = NO ]; then
Then, ucf returns an error because the following gives an error:
==============
<<END
*** WARNING: ucf was run from a maintainer script that uses debconf, but
             the script did not pass --debconf-ok to ucf. The maintainer
             script should be fixed to not stop debconf before calling ucf,
             and pass it this parameter. For now, ucf will revert to using
             old-style, non-debconf prompting. Ugh!

             Please inform the package maintainer about this problem.
END
===============

From 1. and 2. I inferred that now the quoted lines had been uncommented in
order to nag the developer - which probably is true. Moreover, it IS a bug,
because the script returns an error under one of the conditions foreseen in
script.

However, now I see what must have happened. On my PC, I have two systems: An
old ubuntustudio and a kubuntu-hardy. On the kubuntu hardy all the relevant
text is commented. On the ubuntu-studio the END-text quoted above is not
commented (see attachment), BUT the cat command is still commented. Thus, the
person who removed the #'s, forgot to remove it from the line
# cat \
and thus made a bug. That is, to nag the developer, he made a bug. But, it was
not deliberate that it became a bug that may obstruct upgrade. It should just
have been a comment written in the prompt during installation.

> The bug is that HERE docs don't fail
> gracefully in the event of disk space problems, as you must have had when
> upgrading,

As I wrote, I DID check if there was enough diskspace, and there was app. 1GB
on sdb1 and 3 GB on sdb3! (That should suffice for upgrade samba +
kubuntu-desktop: app. 20 MB.) I was quite confused over this. I haven't got
into details with that I tried to remove samba as it couldn't be installed.
This involved uninstalling kubuntu-desktop, which I did, too. Then, I
re-installed kubuntu-desktop and (unfortunately) samba, too. Again samba made
an error, that persisted till I commented the quoted END-text. Then, the
errors disappeared, and samba was installed. In short, it looks like the
disk-full-message came BECAUSE of the bug. Yes, I know it sounds strange,
but ... .

> and this wasn't taken into accou...

Read more...

Revision history for this message
Steve Langasek (vorlon) wrote :

This bug is fixed in ucf 3.0013 and above:

ucf (3.0013) unstable; urgency=low

  * [99736cc]: Move the debconf stuff _after_ command line parsing
    If it is done earlier, the DEBCONF_OK flag is not set yet. This is
    majorly bad. Closes: Bug#512905
    Bug fix: "ucf was run from a maintainer script that uses debconf
    [...]", thanks to Michael Prokop (Closes: #512832).

So this should not recur with Ubuntu 9.04 and later.

Changed in ucf (Ubuntu):
status: New → Fix Released
Changed in ucf (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.