Bug#829488: openrc: upgrade jessie -> stretch fails: util-linux.postinst: update-rc.d: not found

2016-07-13 Thread Andreas Henriksson
Control: reassign -1 openrc
Control: retitle -1 dist-upgrading while switching from openrc to file-rc is 
broken

Hello Adam Borowski.

Please remember to (B)CC the receiving package when reassigning
bug reports to notify the receiver.

On Sun, Jul 03, 2016 at 11:19:40PM +0200, Adam Borowski wrote:
> On Sun, Jul 03, 2016 at 08:28:45PM +0200, Andreas Beckmann wrote:
> > Package: openrc
> > Version: 0.21-1
> > Severity: serious
> > 
> > during a test with piuparts I noticed your package fails to upgrade from
> > 'jessie'.
> > It installed fine in 'jessie', then the upgrade to 'stretch' fails.
> 
> > This seems to be related to openrc, since I haven't seen a similar failure
> > without openrc installed.
> 
> The problem here is that init-system-helpers can't be relied upon to provide
> update-rc.d without a versioned dependency as it's not yet present in
> jessie's version.
> 
> 
> Here's your log trimmed to interesting parts:
> 
>   The following packages will be REMOVED:
> openrc systemd-sysv
>   The following NEW packages will be installed:
> file-rc gcc-6-base init-system-helpers sysvinit-core [...]
> [...]
>   dpkg: openrc: dependency problems, but removing anyway as you requested:
>initscripts depends on sysv-rc | file-rc; however:
> Package sysv-rc is not installed.
> Package openrc which provides sysv-rc is to be removed.
> Package file-rc is not installed.
>systemd depends on sysv-rc; however:
> Package sysv-rc is not installed.
> Package openrc which provides sysv-rc is to be removed.
>   
> (Reading database ... 7525 files and directories currently installed.)
>   Removing openrc (0.13.1-4) ...
> [...]
>   Setting up util-linux (2.28-5) ...
>   Installing new version of config file /etc/init.d/hwclock.sh ...
>   /var/lib/dpkg/info/util-linux.postinst: 35: 
> /var/lib/dpkg/info/util-linux.postinst: update-rc.d: not fo
> und
> 
> 
> At that moment, openrc is already removed and init-system-helpers not yet
> upgraded, thus update-rc.d is not present.  Handing over essential
> functionality to another package requires a versioned dependency and is
> notoriously hard to do right.  Not sure what's the proper package that
> should express this dependency -- it's certainly not openrc though as at
> this point apt cares only about jessie's version of it.

The package handling this "handover" is called sysv-rc. The problem with
openrc is that it Conflicts and Provides sysv-rc. (But while sysv-rc
Pre-depends on init-system-helpers >= 1.29, openrc only recommends it which
is quite a bit weaker relation.)
You're pushing out sysv-rc and thus you can't rely on sysv-rc to
properly handle the upgrade path for you Please notice this interesting
part of the log as well:

  dpkg: openrc: dependency problems, but removing anyway as you requested:^M
   initscripts depends on sysv-rc | file-rc; however:^M
Package sysv-rc is not installed.^M
Package openrc which provides sysv-rc is to be removed.^M
Package file-rc is not installed.^M
   systemd depends on sysv-rc; however:^M
Package sysv-rc is not installed.^M
Package openrc which provides sysv-rc is to be removed.^M
  ^M

Someone who knows apt better than me might be able to explain whats
happening here and how you avoid it.

We should not be working around this problem in thousands of packages
using update-rc.d (eg. any that uses dh_installinit, which util-linux
just happens to be one of) but rather fix the upgrade path to always
make sure the policy tools are available at all time without glitches.

I'm not sure this problem is at all related to init-system-helpers since
you're apparently running into a situation where you have neither
openrc (jessie), sysv-rc (jessie) or init-system-helpers (stretch) installed.
You should not be able to uninstall all of those at any time during the
upgrade process which is apparently possible when throwing openrc into
the mix. 

I also noticed that the log said:

 The following packages will be REMOVED:
openrc systemd-sysv
  The following NEW packages will be installed:
file-rc [...]

This is thus apparently an issue while upgrading and switching from openrc
to file-rc in the mix. AFAIK file-rc still has it's own policy tools
(and diverts the ones from init-system-helpers), but file-rc is not
being installed ASAP after openrc is removed. Thus noone provides the
tools inbetween where other packages gets a time to be configured.
I wonder who'd be crazy enough to dist-upgrade and switch from openrc
to file-rc at the same time instead of doing it in two separate steps.
Anyway, I'm not sure file-rc is targeted to be released with stretch
at all, so maybe just getting it removed would be the easiest way to
avoid piuparts triggering/testing this upgrade path at all

I hope the above comments have provided some hints on what to investigate.

Regards,
Andreas Henriksson



Processed: Re: Bug#829488: openrc: upgrade jessie -> stretch fails: util-linux.postinst: update-rc.d: not found

2016-07-13 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 openrc
Bug #829488 [util-linux] util-linux should depend on init-system-helpers
Bug reassigned from package 'util-linux' to 'openrc'.
Ignoring request to alter found versions of bug #829488 to the same values 
previously set
Ignoring request to alter fixed versions of bug #829488 to the same values 
previously set
> retitle -1 dist-upgrading while switching from openrc to file-rc is broken
Bug #829488 [openrc] util-linux should depend on init-system-helpers
Changed Bug title to 'dist-upgrading while switching from openrc to file-rc is 
broken' from 'util-linux should depend on init-system-helpers'.

-- 
829488: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829488
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#829488: openrc: upgrade jessie -> stretch fails: util-linux.postinst: update-rc.d: not found

2016-07-03 Thread Adam Borowski
On Sun, Jul 03, 2016 at 08:28:45PM +0200, Andreas Beckmann wrote:
> Package: openrc
> Version: 0.21-1
> Severity: serious
> 
> during a test with piuparts I noticed your package fails to upgrade from
> 'jessie'.
> It installed fine in 'jessie', then the upgrade to 'stretch' fails.

> This seems to be related to openrc, since I haven't seen a similar failure
> without openrc installed.

The problem here is that init-system-helpers can't be relied upon to provide
update-rc.d without a versioned dependency as it's not yet present in
jessie's version.


Here's your log trimmed to interesting parts:

  The following packages will be REMOVED:
openrc systemd-sysv
  The following NEW packages will be installed:
file-rc gcc-6-base init-system-helpers sysvinit-core [...]
[...]
  dpkg: openrc: dependency problems, but removing anyway as you requested:
   initscripts depends on sysv-rc | file-rc; however:
Package sysv-rc is not installed.
Package openrc which provides sysv-rc is to be removed.
Package file-rc is not installed.
   systemd depends on sysv-rc; however:
Package sysv-rc is not installed.
Package openrc which provides sysv-rc is to be removed.
  
(Reading database ... 7525 files and directories currently installed.)
  Removing openrc (0.13.1-4) ...
[...]
  Setting up util-linux (2.28-5) ...
  Installing new version of config file /etc/init.d/hwclock.sh ...
  /var/lib/dpkg/info/util-linux.postinst: 35: 
/var/lib/dpkg/info/util-linux.postinst: update-rc.d: not fo
und


At that moment, openrc is already removed and init-system-helpers not yet
upgraded, thus update-rc.d is not present.  Handing over essential
functionality to another package requires a versioned dependency and is
notoriously hard to do right.  Not sure what's the proper package that
should express this dependency -- it's certainly not openrc though as at
this point apt cares only about jessie's version of it.


Meow!
-- 
An imaginary friend squared is a real enemy.



Bug#829488: openrc: upgrade jessie -> stretch fails: util-linux.postinst: update-rc.d: not found

2016-07-03 Thread Andreas Beckmann
Package: openrc
Version: 0.21-1
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package fails to upgrade from
'jessie'.
It installed fine in 'jessie', then the upgrade to 'stretch' fails.

>From the attached log (scroll to the bottom...):

[...]
  Preparing to unpack .../util-linux_2.28-5_i386.deb ...
  Unpacking util-linux (2.28-5) over (2.25.2-6) ...
  Replacing files in old package initscripts (2.88dsf-59) ...
  Processing triggers for systemd (215-17+deb8u4) ...
  Setting up util-linux (2.28-5) ...
  Installing new version of config file /etc/init.d/hwclock.sh ...
  /var/lib/dpkg/info/util-linux.postinst: 35: 
/var/lib/dpkg/info/util-linux.postinst: update-rc.d: not found
  dpkg: error processing package util-linux (--configure):
   subprocess installed post-installation script returned error exit status 127
  Processing triggers for systemd (215-17+deb8u4) ...
  Errors were encountered while processing:
   util-linux

This seems to be related to openrc, since I haven't seen a similar failure
without openrc installed.


cheers,

Andreas


openrc_0.21-1.log.gz
Description: application/gzip