On Tue, Jun 11, 2013 at 06:52:13PM +0400, Andrey Borzenkov wrote:
?? Tue, 11 Jun 2013 09:17:11 +0100 Mel Gorman <mgorman@suse.de> ??????????:
On Mon, Jun 10, 2013 at 04:24:42PM -0400, Cristian Rodr?guez wrote:
El 10/06/13 09:44, Mel Gorman escribió:
I'd like to submit a new package called numad to factory.
<SNIP>
Just a few objections/observations,
- please do not add new init scripts to factory.
Seems fair but I was aiming to create a package that would also be compatible with older versions of openSUSEi (12.2 in particular). Is the following diff the correct way of doing that?
<SNIP>
If you aim at 12.2 you should install both because it can run both with sysvinit and systemd. May be
if 0%{suse_version} < 1230 %{_sbindir}/rcnumad %config /etc/init.d/numad %endif
Good point. How about this then? Index: numad.spec =================================================================== --- numad.spec (revision 3) +++ numad.spec (working copy) @@ -68,22 +68,26 @@ %makeinstall prefix=$RPM_BUILD_ROOT%{_prefix} install gzip $RPM_BUILD_ROOT%{_mandir}/man8/numad.8 %{__install} -D -m 644 numad.conf $RPM_BUILD_ROOT/etc/numad.conf +%if 0%{?has_systemd} +install -D -m 0644 numad.service %{buildroot}%{_unitdir}/numad.service +%endif +%if 0%{suse_version} < 1230 %{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d %{__install} -m 744 numad.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/numad ln -sf ../../etc/init.d/numad $RPM_BUILD_ROOT/usr/sbin/rcnumad -%if 0%{?has_systemd} -install -D -m 0644 numad.service %{buildroot}%{_unitdir}/numad.service %endif %files %defattr(-,root,root) %{_sbindir}/numad -%{_sbindir}/rcnumad %{_mandir}/man8/numad.8.gz %config /etc/numad.conf -%config /etc/init.d/numad %if 0%{?has_systemd} %{_unitdir}/numad.service +%endif +%if 0%{suse_version} < 1230 +%{_sbindir}/rcnumad +%config /etc/init.d/numad %endif %pre -- Mel Gorman SUSE Labs -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org