Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Provide native systemd unit file|
|Product:||[Fedora] Fedora||Reporter:||Jóhann B. Guðmundsson <johannbg>|
|Component:||postfix||Assignee:||Jaroslav Škarvada <jskarvad>|
|Status:||CLOSED RAWHIDE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||h.reindl, jskarvad, mlichvar|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2011-11-08 11:27:17 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Jóhann B. Guðmundsson 2011-07-04 12:12:23 EDT
Description of problem: https://fedoraproject.org/wiki/Features/SysVtoSystemd Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Comment 1 Jóhann B. Guðmundsson 2011-07-06 15:17:02 EDT
Created attachment 511560 [details] Native systemd service file postfix Note that you will need to put the "make_aliasesdb" section in to seperated helper script which you call from the native systemd service file and it's probably best to look at create a seperated postfix-chroot.service ( see http://0pointer.de/blog/projects/changing-roots.html )
Comment 2 Jaroslav Škarvada 2011-07-11 07:59:13 EDT
*** Bug 714429 has been marked as a duplicate of this bug. ***
Comment 3 Jóhann B. Guðmundsson 2011-07-14 06:02:15 EDT
Created attachment 512846 [details] aliasesdb script Probably it should look something like this then we call that script from what ever is the final install path for the script in the ExecStartPre=/usr/libexec/aliasesdb allthou I'm not so sure if libexec is the right path to place the script snippets used in unit files
Comment 4 Jóhann B. Guðmundsson 2011-07-14 06:07:29 EDT
Created attachment 512847 [details] postfix chroot unit
Comment 5 Jóhann B. Guðmundsson 2011-07-14 06:31:00 EDT
Created attachment 512852 [details] Updated postfix unit. Added the path to point to aliasedb scrip ExecStartPre=/usr/libexec/aliasesdb Added Conflicts=sendmail.service to the unit which will stop sendmail.service before starting postfix.service. An counterpart should be added to the sendmail.service unit as in Conflicts=postfix.service to take down postfix if started if it was not added already
Comment 6 Jóhann B. Guðmundsson 2011-07-14 06:31:58 EDT
Created attachment 512853 [details] Updated postfix-chroot unit Added Conflicts with sendmail.service
Comment 7 Jóhann B. Guðmundsson 2011-07-14 07:21:25 EDT
Created attachment 512866 [details] Adding postfix-chroot and exim.service to conflicts
Comment 8 Jóhann B. Guðmundsson 2011-07-14 07:22:36 EDT
Created attachment 512867 [details] Adding postfix.service and exim.service to conflicts
Comment 9 Jóhann B. Guðmundsson 2011-07-14 13:32:20 EDT
Created attachment 513228 [details] Spec file patch I think I have it right..
Comment 10 Jaroslav Škarvada 2011-07-19 08:49:01 EDT
Jóhann thanks for your help. I will give it some testing.
Comment 11 Jaroslav Škarvada 2011-07-26 10:12:32 EDT
Created attachment 515287 [details] postfix.service Removed 'postfix check', because it is run as part of start command (from the postfix man). Chroot is handled conditionally in postfix.service, IMHO we do not need the chroot service.
Comment 12 Jaroslav Škarvada 2011-07-26 10:17:12 EDT
Created attachment 515290 [details] Spec file patch Added disable action to preun. Fixed triggerun to be run for postfix < 2.8.4-2. alternatives --initscript only commented-out, not removed. Added aliasesdb to spec file.
Comment 13 Jóhann B. Guðmundsson 2011-07-26 10:24:34 EDT
With my admin hat on I would personally prefer chroot service be separated services as in if I would start chroot-$foo.service or $foo-chroot.service which would be configured for chroot run service from the get go anyway did you test if chrooting works as advertised? btw I should mentioned that the alternative should be fixed "* Tue Jul 19 2011 Bill Nottingham <firstname.lastname@example.org> 1.3.54-1 - alternatives: fix --initscript systemd support (#714830) - revert forwarding of 'chkconfig --del' to 'systemctl disable'"