install_initd fails

Bug #798192 reported by Stew Benedict
This bug affects 14 people
Affects Status Importance Assigned to Milestone
lsb (Ubuntu)
Fix Released

Bug Description

Binary package hint: lsb

This just started yesterday. I do continual LSB testing of Ubuntu-latest, usually once a week or so. The lsb-apache package (part of the application battery, part of the distro certification tests) runs the following scripts at install/uninstall:

/usr/lib/lsb/install_initd /etc/init.d/lsb-apache
/usr/lib/lsb/remove_initd /etc/init.d/lsb-apache

Running the latter on the current system, when alien/dpkg installs the package yields:

 root@ubuntu-latest-32:~# /usr/lib/lsb/install_initd /etc/init.d/lsb-apache
Traceback (most recent call last):
  File "/usr/lib/lsb/install_initd", line 3, in <module>
    import sys, re, os, initdutils
  File "/usr/lib/lsb/", line 18
    raise ValueError, 'need a file or string'
SyntaxError: invalid syntax

I'm also seeing failures in the core-test "init" tests, which could be related to this same issue, as they also install/remove a couple of dummy init scripts and look at the starup/shutdown dependency stack.

Bugs at our end, for reference: (lsb-apache) (init tests)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: lsb-core 4.0-0ubuntu13
ProcVersionSignature: Ubuntu 3.0-0.1-generic 3.0.0-rc2
Uname: Linux 3.0-0-generic i686
Architecture: i386
Date: Thu Jun 16 08:09:14 2011
SourcePackage: lsb
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stew Benedict (stewb) wrote :
Revision history for this message
Aaron Sowry (fq-airin-x0) wrote :

I'm seeing this on 12.04 Alpha too. Seems to be due to the fact that the hashbang in install_initrd specifies python3, but its dependency 'initdutils' does not comply to python3 syntax.

Changed in lsb (Ubuntu):
status: New → Confirmed
Revision history for this message
Aaron Sowry (fq-airin-x0) wrote :

Seems like this was previously fixed in lsb revision 50, but is broken again in 12.04 Alpha. It is not possible to install services without this bug fixed, so should probably be given some priority.

tags: added: precise
removed: oneiric
Revision history for this message
Didier Raboud (odyx) wrote :

This is simply a problem of python version: it is working in the lsb-core versions that run with python2 (as released in Precise) and is broken by the lsb-code versions that run with python3.

(A test suite is in the process of being written on the Debian side to make this transition smoother.)

Revision history for this message
Aaron Sowry (fq-airin-x0) wrote :

Amazing - this is broken *again* in 12.10 Alpha 2. Are you guys not committing your fixes to trunk, or what's happening?

tags: added: quantal
Revision history for this message
Aaron Sowry (fq-airin-x0) wrote :

The final 12.10 release was yesterday, and this is still broken. I'm not even sure where to report this any more; Launchpad is evidently the wrong place to do it, since nothing seems to happen when you do. Guys - the fix is simple, it's been fixed before and apparently re-broken again at least two times - can we please do something about this permanently? Being LSB-compliant (or at least trying to) is impossible so long as this bug exists.

Revision history for this message
john umphenour (johnumph) wrote :

i fixed this by opening /usr/lib/lsb/
then changing
rise ValueError, 'need a file or string'
rise ValueError('need a file or string)


except ValueError, x:
except ValueError(x:)

it also helped boot to login faster.

Revision history for this message
Aaron Sowry (fq-airin-x0) wrote :

Thanks John.

We're providing the following fix for our customers, until Canonical decides to fix things themselves:

$ sudo sed -i "s/python3/python/" /usr/lib/lsb/install_initd

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

This bug was fixed in the package lsb - 4.1+Debian9ubuntu2

lsb (4.1+Debian9ubuntu2) saucy; urgency=low

  * Fix build failure when only building architecture-dependent packages.
 -- Steve Langasek <email address hidden> Wed, 15 May 2013 04:22:58 -0500

Changed in lsb (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jon Schewe (jpschewe) wrote :

This is still broken in lsb 4.0 shipped with Ubuntu 13.04.

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.