preinst fails in d-i

Bug #1001460 reported by Robie Basak
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
makedev (Ubuntu)
Fix Released
Critical
Steve Langasek
Quantal
Fix Released
Critical
Steve Langasek

Bug Description

A Quantal netinst failed with "Failure while unpacking required packages. This will be attempted up to five times.". As (I presume) this is priority critical, it breaks my automated installation.

Note: I'm using a custom ARM machine, and I hacked d-i to get this far. But Steve thought this could be a general Ubuntu bug so asked me to report it :)

May 18 20:44:57 debootstrap: Selecting previously unselected package makedev.
May 18 20:44:57 debootstrap: Unpacking makedev (from .../makedev_2.3.1-91ubuntu1_all.deb) ...
May 18 20:44:57 debootstrap: update-rc.d: using dependency based boot sequencing
May 18 20:44:57 debootstrap: Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 402.
May 18 20:44:57 debootstrap: update-rc.d: error: insserv rejected the script header
May 18 20:44:57 debootstrap: dpkg: error processing /var/cache/apt/archives/makedev_2.3.1-91ubuntu1_all.deb (--unpack):
May 18 20:44:57 debootstrap: subprocess new pre-installation script returned error exit status 255

Related branches

Revision history for this message
Robie Basak (racb) wrote :
Changed in sysvinit (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Robie Basak (racb) wrote :

stgraber pointed out that he can reproduce this in plain debootstrap, and I have confirmed that I get this too (armhf for me). I've attached debootstrap output and var/log/bootstrap.log

Revision history for this message
Robie Basak (racb) wrote :
Robie Basak (racb)
Changed in eilt:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sysvinit (Ubuntu):
status: New → Confirmed
Colin Watson (cjwatson)
Changed in sysvinit (Ubuntu):
importance: Undecided → High
Changed in sysvinit (Ubuntu):
status: Confirmed → Triaged
tags: added: iso-testing qa-daily-testing quantal rls-mgr-q-tracking
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Setting to critical, it is blocking automated installations.

Changed in sysvinit (Ubuntu Quantal):
importance: High → Critical
Revision history for this message
Robie Basak (racb) wrote :

It looks like makedev is being unpacked *before* sysv-rc. If sysv-rc is providing /etc/init.d/.legacy-bootordering, it's too late for update-rc.d to see it when run from makedev's preinst. But sysv-rc is not marked Essential, so isn't it invalid for makedev to assume that update-rc.d will work?

I think there a few options here:

1) It looks like makedev's preinst calls update-rc.d to manage an old upgrade path that predates Lucid. So do we need to support it at all? What if we ripped that part out?

1b) Alternatively does the preinst need to run update-rc.d if it is not upgrading from an older version? If $2 is empty, can we skip the upgrade path handling, since if makedev was previously purged then the conffiles it's removing should have been deleted anyway? Or is this a fix for a bug where an old version failed to remove the conffiles on purge? As this would predate Lucid, do we care?

2) update-rc.d could be updated to test for insserv and assume legacy bootordering if it is not available.

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

the issue is that the preinst scripts for the base system are run in lexical order, with makedev coming before sysv-rc - so while /usr/sbin/update-rc.d has been unpacked on the system, the preinst has not been run and therefore makedev's invocation fails with this error.

The update-rc.d invocation was failing before anyway, it's just that now in precise, the makedev preinst script is set -e where before it was not, so the update-rc.d failure is being caught.

So we should fix makedev to not call update-rc.d - certainly not in this case, where it can't possibly be relevant.

affects: sysvinit (Ubuntu Quantal) → makedev (Ubuntu Quantal)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package makedev - 2.3.1-91ubuntu2

---------------
makedev (2.3.1-91ubuntu2) quantal; urgency=low

  * debian/preinst: don't call update-rc.d remove on initial installation of
    the package; this is unnecessary, and causes problems for bootstrap
    because insserv is deliberately unavailable. LP: #1001460.
 -- Steve Langasek <email address hidden> Wed, 23 May 2012 13:59:08 -0700

Changed in makedev (Ubuntu Quantal):
status: Triaged → Fix Released
Steve Langasek (vorlon)
Changed in eilt:
status: Triaged → 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.