mini-httpd sysv init script now requires bash

Bug #403286 reported by David Sugar
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mini-httpd (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by David Sugar

Bug Description

Binary package hint: mini-httpd

The sysv style init script packaged with mini-httpd was changed between Jaunty (1.19.8) and Karmic (1.19.9) to use "function". Hence, it no longer will run when /bin/sh = dash. This I believe is a regression. This may actually be a result of work done closing #500708 and #491083 in Debian upstream, as noted in https://launchpad.net/ubuntu/karmic/+source/mini-httpd/1.19-9 and the associated changelog.

There are two possible solutions. We could look at using an upstart description to start this service, and it is a good candidate for this, or we could rollback/modify the init script so it works again with dash. Given that "mini-httpd" is supposed to be a very lightweight http server, for example for use on embedded targets, clearly it's init script should not depend on bash. Since this was a result of changes in debian upstream and we sync this package, probably that is the logical place to discuss this issue. Right now, installing the package fails because the init script fails for configure since /bin/sh is dash in Karmic...

Tags: packaging

Related branches

tags: added: packaging
removed: karmic
Pavel Mlčoch (pavkamlc)
Changed in mini-httpd (Ubuntu):
status: New → Confirmed
Revision history for this message
David Sugar (dyfet-deactivatedaccount) wrote :

A temporary fix for the init script issue for karmic, and a patch for a compile issue with latest gcc/glibc, attached for sponsorship.

Changed in mini-httpd (Ubuntu):
assignee: nobody → David Sugar (dyfet)
Revision history for this message
StefanPotyra (sistpoty) wrote :

well, upstart descriptions would be a nice thing to have imo, but first we should get the package building/working again, which doesn't need an FFe being of bugfix nature.

Looking at the patch I've got the following comments:
1) the "function" keyword is a bashism, however functions are POSIX (and work with dash), so simplest way would be to just remove the function keyword
2) bash is Essential: Yes, so it won't add any "weight" to mini-httpd (despite that it loads slower and hence adds to boot time). This also means that it doesn't need to be in Depends. (however fixing 1 means to not need bash at all).
3) why do you rename putline as well? I might be wrong, but I don't recall that having been added to POSIX and a quick grep over /usr/include doesn't result in any matches.
4) Personally I'm in favor of trying to keep the patches down to a minimum (we'll otherwise have to redo them for the next merge), so I'd personally avoid bumping standards-version, debhelper version or adding the README about patched package (heh, finally I guess the last point is something every Ubuntu Developer knows by heart anyways *g*).

As 1) is fixed with 1.19-9.1, can you put the fix for getline on top of 1.19-9.1? Then I'd be happy to sponsor the upload.
Thanks,
    Stefan.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Attached is a debdiff that syncs with the upstream debian version 1.19-9.1 and pares down the htpasswd.c change to just cope with getline(), although personally, if I were the upstream, I'd prefer David's original change for consistency in naming of the functions.

The debian version only contains the following bugfixes and no new features, so a FFE is not warranted:

  * Fix bashism (Closes: #525366)
  * Fix lintian-detected hyphen-used-as-minus-sign errors.
  * Add watch file.

Thanks.

Revision history for this message
Michael Terry (mterry) wrote :

I pushed this to the queue. Thanks, Steve/David!

Changed in mini-httpd (Ubuntu):
assignee: David Sugar (dyfet) → nobody
status: Confirmed → Fix Committed
Revision history for this message
Michael Terry (mterry) wrote :

David, can you send your getline patch upstream (http://acme.com/software/mini_httpd/) and/or Debian?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mini-httpd - 1.19-9.1ubuntu1

---------------
mini-httpd (1.19-9.1ubuntu1) karmic; urgency=low

  [David Sugar]
  * htpasswd.c: fix conflict with glibc getline() and stricter gcc 4.4

  [ Steve Beattie ]
  * sync with debian version 1.9-9.1 (LP: #403286)

 -- Steve Beattie <email address hidden> Thu, 15 Oct 2009 22:18:15 -0700

Changed in mini-httpd (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Romoda Károly (romi66) wrote :

Long time I have repeatedly this bug. I sent you report about that bug and I'll sign for you, the problem exist continually...

Changed in mini-httpd (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

The problem described in this bug report was fixed prior to the Ubuntu 9.10 release. Please open a new bug report and describe clearly in your own words what problem you're having with this package.

Changed in mini-httpd (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Romoda Károly (romi66) wrote : Re: [Bug 403286] Re: mini-httpd sysv init script now requires bash

Hi!
I have this problem continually with mini-httpd update after I install
my Ubuntu 9.10...
Allso I have the problem after installing Ubuntu 9.10: my system can not
detect my CD/DVD ROM!

My CD/DVD ROM work continually properly with Win XP,

but Ubuntu 9.10 can not detect it absolutely.

When we try find the problem with CD ROM (with commands from console),
we have got error message on "mini-httpd" file, so I mean, both of the
problem are in causally relation...

After that, I detect problem with change character colors in OO Writer
file. I can't change colors, and character color are continually
"Automatic" - that mean black!
I don't know, is this third problem in causally relation with first and
second problem, but maybe You can decode something about my describe.

In past with Ubuntu 9.04 I don't had problems like this...

2010. 01. 10, vasárnap keltezéssel 23.28-kor Steve Langasek ezt írta:

> The problem described in this bug report was fixed prior to the Ubuntu
> 9.10 release. Please open a new bug report and describe clearly in your
> own words what problem you're having with this package.
>
> ** Changed in: mini-httpd (Ubuntu)
> Status: Incomplete => Fix Released
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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