Bug 718793 - Provide native systemd unit file
Summary: Provide native systemd unit file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: postfix
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 714429 (view as bug list)
Depends On:
Blocks: SysVtoSystemd
TreeView+ depends on / blocked
 
Reported: 2011-07-04 16:12 UTC by Jóhann B. Guðmundsson
Modified: 2011-11-08 16:27 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-11-08 16:27:17 UTC
Type: ---
Embargoed:


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

Description Jóhann B. Guðmundsson 2011-07-04 16:12:23 UTC
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 19:17:02 UTC
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 11:59:13 UTC
*** Bug 714429 has been marked as a duplicate of this bug. ***

Comment 3 Jóhann B. Guðmundsson 2011-07-14 10:02:15 UTC
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 10:07:29 UTC
Created attachment 512847 [details]
postfix chroot unit

Comment 5 Jóhann B. Guðmundsson 2011-07-14 10:31:00 UTC
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 10:31:58 UTC
Created attachment 512853 [details]
Updated postfix-chroot unit

Added Conflicts with sendmail.service

Comment 7 Jóhann B. Guðmundsson 2011-07-14 11:21:25 UTC
Created attachment 512866 [details]
Adding postfix-chroot and exim.service to conflicts

Comment 8 Jóhann B. Guðmundsson 2011-07-14 11:22:36 UTC
Created attachment 512867 [details]
Adding postfix.service and exim.service to conflicts

Comment 9 Jóhann B. Guðmundsson 2011-07-14 17:32:20 UTC
Created attachment 513228 [details]
Spec file patch

I think I have it right..

Comment 10 Jaroslav Škarvada 2011-07-19 12:49:01 UTC
Jóhann thanks for your help. I will give it some testing.

Comment 11 Jaroslav Škarvada 2011-07-26 14:12:32 UTC
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 14:17:12 UTC
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 14:24:34 UTC
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> 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.