If at all possible, I'd love to see this fix backported to Xenial. Given
that the bug appears to have existed as long as the sysv-generator has,
the biggest risk is to those who may be erroneously depending on the
incorrect behavior (whether explicitly or otherwise).

I've attached a very basic systemd target and sysv init script that can
be used to test and verify.

With the test `bar.target` in /lib/systemd/system and enabled, and the
`foo` init script (which, for the sake of demonstration, only contains
LSB headers) in /etc/init.d and having been enabled by update-rc.d, the
generated systemd wrapper is:


###
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/foo
Description=LSB: Start service foo
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/init.d/foo start
ExecStop=/etc/init.d/foo stop
###

and is missing dependency info for bar.target (expecting to see
After=bar.target)

** Attachment added: "Simple sysv init stub and systemd target for testing"
   
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1651278/+attachment/4794167/+files/systemd-generator-init-target-test.tar.gz

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1651278

Title:
  systemd-sysv-generator does not fully translate facilities to targets

Status in systemd package in Ubuntu:
  New

Bug description:
  See the bug raised here:
  https://github.com/systemd/systemd/issues/4762

  and fixed upstream here:
  
https://github.com/systemd/systemd/commit/e932f5407ef5ad05d25d7dfefa4cda0fe81cc346

  In short, given a sysv-init script with valid LSB headers, one of which 
defines
  Required-Start: $foo
  and given that a foo.target target exists and is enabled, I would expect to 
see After=foo.target in the generated unit.

  In practice (on all versions of systemd prior to the unreleased v233)
  no other facilities beyond the pre-defined facilities ($network,
  $local_fs, etc) will be used in generating the systemd wrapper for the
  old sysv init script.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1651278/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to