![](https://seccdn.libravatar.org/avatar/5f188c5fb664dc110d55f04cd59a6e74.jpg?s=120&d=mm&r=g)
Le vendredi 16 septembre 2011 à 14:18 +0200, Togan Muftuoglu a écrit :
Hi Frederic,
On 09/16/2011 01:39 PM, Frederic Crozat wrote:
There are macros and I haven't yet written the documentation because some are still in flux and systemd preset handling isn't done yet.
Look at acpid package for a good example (but the *migration* macros will disappear soon).
Thanks, I have also had a a look at systemd package and found the systemd macros with explanation.
Now since I am at the latest stage to push the package to factory, what how does one do the migration phase
according to the macros I have found in "systemd" package
# when migrating a package from sysvinit to systemd : %triggerun -- package_name < version_where_switch_occured %service_migrate_to_systemd [ -l run_level ] service_name.service
But in the acpid example it is only the service_migrate_to_systemd
%pre %service_migrate_to_systemd_pre acpid
Also in other parts
%postun %restart_on_update acpid %{insserv_cleanup} %service_migrate_to_systemd_postun acpid %service_del_postun acpid.service
so if I have a code like below as I am maintaining the package for 11.3 11.4 and Factory am I on the right track ?
Yes, you are :) As I said, the migration macros will be merged into the service_add/service_del macros soon. Triggers should not be used for migration (it was in initial proposal, I've changed this), acpid specfile is right. Another thing you want, if you build your package for 11.4 or before : %if 0%{suse_version} <= 1140 %define systemd_requires %{nil} %endif -- Frederic Crozat <fcrozat@suse.com> SUSE -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org