Systemd conversion versus updates in back Fedora branches

Honza Horak hhorak at
Mon Oct 24 14:34:57 UTC 2011

On 10/24/2011 05:52 AM, Tom Lane wrote:
> The current packaging guidelines require packages that update from sysv
> init scripts to systemd scripts to provide conversion triggers that are
> fired on the basis of an NVR comparison:
> That is, we assume that we know that all releases with NVR<  some-cutoff
> use initscripts and all releases with NVR>= same-cutoff use systemd.
> The comments in the above-linked page acknowledge that this means it's
> impossible to upgrade the package to a newer upstream release in
> pre-systemd Fedora branches.  (You can't just move the cutoff value
> forward, because then an upgrade in F16 or later will mistakenly re-fire
> the update trigger.)
> I'm really getting to the point where that's a completely unacceptable
> restriction.  I've already blown off one mysql bug-fix release in F15
> because of this restriction, and I see they just released another one
> that I'll be unable to ship in F15 because the systemd guys failed to do
> their homework, and there are likely to be several more before F15 dies.
> The idea I have at the moment is to ignore the advice to check package
> version, and instead have the triggerun script check to see whether the
> mysql sysv initscript file is present.  I wonder whether anyone else has
> dealt with this and has working scriptlets?
> 			regards, tom lane

It has been already discussed (see [1]) that it is possible to bump the 
NVR in %triggerun macro to be able to update packages even in older 
branches. However, I haven't seen any working solutions to prevent the 
trigger code to be executed again when upgrading from already 
systemd-enabled package (see [2]).

IOW, if we found a way to prevent the trigger to run in already 
systemd-enabled package, it would be possible to update packages even in 
older branches. We just need to remember to bump the NVR in %triggerun, 
which can be annoying but maybe less pain-full than other solutions.

We can prevent the repeated trigger run by using "systemd-sysv-convert 
--show" in the trigger, since systemd-sysv-convert only appends to 

%triggerun -- httpd < 1.0-2
if not /usr/bin/systemd-sysv-convert --show httpd >/dev/null 2>&1 ; then
   /usr/bin/systemd-sysv-convert --save httpd >/dev/null 2>&1 ||:
   /sbin/chkconfig --del httpd >/dev/null 2>&1 || :
   /bin/systemctl try-restart apache-httpd.service >/dev/null 2>&1 || :

I've tried it and seems to do the thing. Please, correct me if I missed 



More information about the devel mailing list