This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 718793 - Provide native systemd unit file
Provide native systemd unit file
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: postfix (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
:
: 714429 (view as bug list)
Depends On:
Blocks: SysVtoSystemd
  Show dependency treegraph
 
Reported: 2011-07-04 12:12 EDT by Jóhann B. Guðmundsson
Modified: 2011-11-08 11:27 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-08 11:27:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Native systemd service file postfix (412 bytes, text/plain)
2011-07-06 15:17 EDT, Jóhann B. Guðmundsson
no flags Details
aliasesdb script (707 bytes, text/plain)
2011-07-14 06:02 EDT, Jóhann B. Guðmundsson
no flags Details
postfix chroot unit (481 bytes, text/plain)
2011-07-14 06:07 EDT, Jóhann B. Guðmundsson
no flags Details
Updated postfix unit. (430 bytes, text/plain)
2011-07-14 06:31 EDT, Jóhann B. Guðmundsson
no flags Details
Updated postfix-chroot unit (508 bytes, text/plain)
2011-07-14 06:31 EDT, Jóhann B. Guðmundsson
no flags Details
Adding postfix-chroot and exim.service to conflicts (467 bytes, text/plain)
2011-07-14 07:21 EDT, Jóhann B. Guðmundsson
no flags Details
Adding postfix.service and exim.service to conflicts (537 bytes, text/plain)
2011-07-14 07:22 EDT, Jóhann B. Guðmundsson
no flags Details
Spec file patch (2.35 KB, patch)
2011-07-14 13:32 EDT, Jóhann B. Guðmundsson
no flags Details | Diff
postfix.service (446 bytes, text/plain)
2011-07-26 10:12 EDT, Jaroslav Škarvada
no flags Details
Spec file patch (3.87 KB, text/plain)
2011-07-26 10:17 EDT, Jaroslav Škarvada
no flags Details

  None (edit)
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 <notting@redhat.com> 1.3.54-1 - alternatives: fix --initscript systemd support (#714830) - revert forwarding of 'chkconfig --del' to 'systemctl disable'"

Note You need to log in before you can comment on or make changes to this bug.