Hello community, here is the log from the commit of package fonehome for openSUSE:Factory checked in at 2018-11-15 12:41:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fonehome (Old) and /work/SRC/openSUSE:Factory/.fonehome.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fonehome" Thu Nov 15 12:41:42 2018 rev:8 rq:649078 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/fonehome/fonehome.changes 2017-03-15 02:00:25.915171826 +0100 +++ /work/SRC/openSUSE:Factory/.fonehome.new/fonehome.changes 2018-11-15 12:41:45.206160970 +0100 @@ -1,0 +2,5 @@ +Wed Nov 14 18:32:59 UTC 2018 - [email protected] + +- Convert fonehome client from SysV to systemd service (bsc#1116015) + +------------------------------------------------------------------- New: ---- fonehome.service.in ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fonehome.spec ++++++ --- /var/tmp/diff_new_pack.y9oJ8R/_old 2018-11-15 12:41:48.866156806 +0100 +++ /var/tmp/diff_new_pack.y9oJ8R/_new 2018-11-15 12:41:48.866156806 +0100 @@ -1,7 +1,7 @@ # # spec file for package fonehome # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012 Archie L. Cobbs <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -20,7 +20,8 @@ # client side %define clientdir %{_datadir}/%{name} %define scriptfile %{_bindir}/%{name} -%define initfile %{_sysconfdir}/init.d/%{name} +%define systemdsvc %{_usr}/lib/systemd/system +%define servicefile %{name}.service %define confdir %{_sysconfdir}/%{name} %define conffile %{confdir}/%{name}.conf %define keyfile %{confdir}/%{name}.key @@ -49,12 +50,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Source: %{name}-%{version}.tar.gz +Source1: %{servicefile}.in Url: https://github.com/archiecobbs/%{name}/ Requires: bc Requires: findutils Requires: openssh Requires: sed -Requires(pre): insserv-compat +%systemd_requires %description fonehome allows remote access to machines behind firewalls using SSH @@ -89,6 +91,7 @@ -e 's|@fonehomescript@|%{scriptfile}|g' \ -e 's|@fonehomelogfac@|%{syslogfac}|g' } +subst < %{_sourcedir}/%{servicefile}.in > %{servicefile} subst < src/conf/fonehome.conf.sample > fonehome.conf.sample subst < src/conf/fonehome-ports.conf.sample > fonehome-ports.conf.sample subst < src/scripts/fonehome-init.sh > fonehome-init @@ -102,11 +105,9 @@ %install -# init script -install -d %{buildroot}%{_sysconfdir}/init.d -install fonehome-init %{buildroot}%{initfile} -install -d %{buildroot}%{_sbindir} -ln -s %{initfile} %{buildroot}%{_sbindir}/rcfonehome +# systemd service script +install -d %{buildroot}%{systemdsvc} +install %{servicefile} %{buildroot}%{systemdsvc}/ # man pages install -d %{buildroot}%{_mandir}/man1 @@ -141,11 +142,17 @@ install /dev/null %{buildroot}%{authkeys} %preun -%{stop_on_removal %{name}} +%service_del_preun %{name}.service %postun -# No restart_on_update - don't kill the connection we are using to update this RPM with! -%{insserv_cleanup} +# No restart_on_update - don't kill the connection we might be using to update this RPM with! +%service_del_postun -n %{name}.service + +%pre +%service_add_pre %{name}.service + +%post +%service_add_post %{name}.service %files %defattr(644,root,root,755) @@ -153,9 +160,8 @@ %config(noreplace) %{conffile} %ghost %attr(644,root,root) %{hostsfile} %ghost %attr(600,root,root) %{keyfile} -%attr(755,root,root) %{initfile} +%{systemdsvc}/%{servicefile} %attr(755,root,root) %{scriptfile} -%attr(755,root,root) %{_sbindir}/rcfonehome %doc %{_datadir}/doc/packages/%{name} %{_mandir}/man1/fonehome.1* %{clientdir} ++++++ fonehome.service.in ++++++ [Unit] Description=Fonehome client After=network-online.target Wants=network-online.target Documentation=man:fonehome(1) Documentation=https://github.com/archiecobbs/fonehome [Service] Restart=always ExecStart=@fonehomescript@ [Install] WantedBy=multi-user.target
