Systemd transition prevents updating older release branches??

Michal Hlavinka mhlavink at redhat.com
Tue Jul 26 10:17:35 UTC 2011


On 07/25/2011 09:07 PM, Tom Lane wrote:
> In
> https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
> I read that conversion of a package using a SysV initscript to systemd
> units requires a trigger with a "<  NEVR" condition, and that
>
> # Note: the NEVR in trigger scripts should all be the version in
> # which the package switched to systemd unit files and the comparision
> # should be less than.  Using<= the last version with the sysV script won't
> # work for several reasons:
> # 1) disttag is different between Fedora releases
> # 2) An update in an old Fedora release may create a newer NEVR
> #    Note that this means an update in an older Fedora release must be NEVR
> #    lower than this.  Freezing the version and release of the old package and
> #    using a number after the disttag is one way to do this.  Example:
> #        httpd-1.0-1%{?dist} =>  httpd-1.0-1%{?dist}.1
>
> IOW, once I push a mysql update with native systemd support into
> rawhide, I'll be forbidden from ever rebasing mysql in F15 up to
> a newer upstream patch release.  Considering that upstream issues
> bug-fix releases about once a month, this is hardly acceptable.
>
> I'll have the same problem with postgresql, too.
>
> What's seeming like a better option is to bump the package's Epoch
> for the systemd-native release.

I don't like epoch changes too much. So, I've used different approach. 
In %post section I have script that checks for old init script presence. 
Something like:

if [ -f %{_initddir}/<script ]; then
    do migration here
ff

Apparently, this won't work if you add <package>-sysv package with old 
init script too.

Just my two cents

Michal


More information about the devel mailing list