[Bug 1116023] New: Please convert SysV init scripts by mhvtl into native systemd services
http://bugzilla.suse.com/show_bug.cgi?id=1116023 Bug ID: 1116023 Summary: Please convert SysV init scripts by mhvtl into native systemd services Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: fbui@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- It would be great if the SysV init scrips shipped by this package could be converted into systemd native services. Indeed most packages shipped by openSUSE Factory switched to native systemd unit files years ago and we plan to drop the obsolete/limited SysV compat support in the future. If this appears to be a big task, one quick way to solve it is to copy and ship (as is) the .service unit wrappers generated automatically by systemd-sysv-generator at boot. Indeed such wrappers are generated by systemd in order to support SysV init scripts similarly to native units. You can see the content of a wrapper unit with: $ systemctl cat <sysvinit-script>.service As you could see the wrapper unit simply calls the SysV script, which should be moved out of /etc/init.d, probably in a directory owned by your package. In all cases we would be glad to provide any help if needed in this task. Thanks in advance. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c1
Lee Duncan
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c2
Lee Duncan
http://bugzilla.suse.com/show_bug.cgi?id=1116023
Lee Duncan
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c3
--- Comment #3 from Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c4
--- Comment #4 from Lee Duncan
If you need help in this task you're welcomed to ask. I will be pleased to help.
I would appreciate that! I am making these changes in the upstream project, first, of course, and that is in progress. I have not submitted this as a pull request yet, but I have pushed my branch on github. See
Branch: "use-systemd". If you would like to pull that code and comment, I'd love your input. You can compare it with the "master" branch to see my changes, which were (I believe) in just two commits, one of which was very large. It uses a generator, two regular service files, and two templates! And it seems to work! Once that upstream code is accepted (possibly after changes), I plan on upgrading our Factory package. There _should_ be no function changes (not counting a few small bug fixes). Our SPEC file is a bit different from the package-vanilla version, so it'll take me a couple of days to package and test it, once I get there. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c5
--- Comment #5 from Franck Bui
I added few comments, which I hope are relevant (since I've no idea of what mhvtl is :P ). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c6
Lee Duncan
(In reply to Lee Duncan from comment #4)
I added few comments, which I hope are relevant (since I've no idea of what mhvtl is :P ).
Thank you for your comments. I made two changes, but I have a question. Should the overall "thing" you turn on or off for mhvtl be called "mhvtl.service" or "mhvtl.target". I'm good either way. I started with ".target", but then running "systemctl enable mhvtl" does not find "mhvtl.target". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c7
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c8
--- Comment #8 from Franck Bui
I started with ".target", but then running "systemctl enable mhvtl" does not find "mhvtl.target".
I think that if you omit the unit type suffix then systemctl assumes a unit of type "service". So you should try "systemctl enable mhvtl.target". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c9
--- Comment #9 from Lee Duncan
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c10
--- Comment #10 from Franck Bui
Let me know if you want to test (again) what I currently have.
I can have a look if you want. Just let me know where I can see the files. Thanks ! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c11
--- Comment #11 from Lee Duncan
(In reply to Lee Duncan from comment #9)
Let me know if you want to test (again) what I currently have.
I can have a look if you want. Just let me know where I can see the files.
Thanks !
Hi Franck. Thank you for the offer. You can find the Build Service packages at:
home:lee_duncan:branches:Base:System/mhvtl
This has the SUSE SPEC file. Or, if you prefer, now that Mark has merged my latest changes, you can find them in one of two placeds on github, i.e. Mark's upstream repo, or mine (which is cloned from his but now in sync):
or:
In the master branch of each. As soon as Mark tags a new 1.5-5 version I will update the factory project to use that code base. My current project is instead using an older upstream version with a patch to bring it up to speed -- it produces the same source code, but it's "out of band" (just for testing). In other words, you can use by Build Service project if you prefer already-built RPMs, and they should match my final submission. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c12
--- Comment #12 from Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c13
--- Comment #13 from Lee Duncan
Hi Lee,
I gave a quick look at Mark's repo and this looks pretty good.
I have one question though.
Both vtllibrary@.service.in [1] and vtltape@.service.in services have:
[Unit] ... Before=multi-user.target
[Service] ...
[Install] WantedBy=mhvtl.target
I'm not sure to understand why it uses "Before=multi-user.target". I would have expected to see "Before=mhvtl.target" instead and only mhvtl.target would have been oredered before "multi-user.target"...
Thanks.
[1] https://github.com/markh794/mhvtl/blob/master/etc/vtllibrary%40.service.in
Franch: I knew this was incorrect in the template files but figured it didn't matter because of the run-time dependencies created by the generator. But, never the less, it should be correct so I submitted a pull request to Mark upstream to fix this. As soon as he tags the latest upstream code I'm going to submit it to Factory. Thanks for your review! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1116023
http://bugzilla.suse.com/show_bug.cgi?id=1116023#c14
Lee Duncan
participants (1)
-
bugzilla_noreply@novell.com