commit rinetd for openSUSE:Factory
Hello community, here is the log from the commit of package rinetd for openSUSE:Factory checked in at 2014-07-31 07:41:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rinetd (Old) and /work/SRC/openSUSE:Factory/.rinetd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rinetd" Changes: -------- --- /work/SRC/openSUSE:Factory/rinetd/rinetd.changes 2011-09-23 12:44:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rinetd.new/rinetd.changes 2014-07-31 07:41:40.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Jul 18 14:46:44 UTC 2014 - p.drouand@gmail.com + +- Use systemd instead of sysvinit for openSUSE > 12.2 +- Clean up spec file + +------------------------------------------------------------------- New: ---- rinetd.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rinetd.spec ++++++ --- /var/tmp/diff_new_pack.qk1pQ4/_old 2014-07-31 07:41:41.000000000 +0200 +++ /var/tmp/diff_new_pack.qk1pQ4/_new 2014-07-31 07:41:41.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package rinetd (Version 0.62) +# spec file for package rinetd # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,25 +15,33 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - +%if 0%{?suse_version} > 1220 +%define with_systemd 1 +%else +%define with_systemd 0 +%endif Name: rinetd License: GPL-2.0+ Group: Productivity/Networking/System -AutoReqProv: on Version: 0.62 -Release: 8 +Release: 0 Summary: TCP Redirection Server Url: http://www.boutell.com/rinetd/ -Source0: rinetd-0.62.tar.bz2 +Source0: %{name}-%{version}.tar.bz2 Source1: rc.rinetd Source2: logrotate.rinetd +Source3: rinetd.service Patch0: rinetd-doc.patch Patch1: rinetd-syslog.patch Patch2: rinetd-conf.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %{with_systemd} +BuildRequires: systemd +%{?systemd_requires} +%else PreReq: %fillup_prereq %insserv_prereq +%endif %description rinetd redirects TCP connections from one IP address and port to @@ -49,11 +57,6 @@ socket. - -Authors: --------- - Thomas Boutell <boutell@boutell.com> - %prep %setup %patch0 @@ -64,32 +67,55 @@ make CFLAGS="$CFLAGS $RPM_OPT_FLAGS -DLINUX -fno-strict-aliasing" %install -mkdir -p $RPM_BUILD_ROOT/%_mandir/man8 -mkdir -p $RPM_BUILD_ROOT/etc/init.d -mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d -mkdir -p $RPM_BUILD_ROOT/usr/sbin -touch $RPM_BUILD_ROOT/etc/rinetd.conf -install -m 700 rinetd $RPM_BUILD_ROOT/usr/sbin -install -m 644 rinetd.8 $RPM_BUILD_ROOT%_mandir/man8 -install -m 755 $RPM_SOURCE_DIR/rc.rinetd $RPM_BUILD_ROOT/etc/init.d/rinetd -install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/logrotate.d/rinetd +mkdir -p %{buildroot}/%_mandir/man8 +mkdir -p %{buildroot}/%{_sbindir} +%if %{with_systemd} +mkdir -p %{buildroot}%{_unitdir} +install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name} +%else +mkdir -p %{buildroot}/etc/init.d +install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/rinetd ln -s ../../etc/init.d/rinetd $RPM_BUILD_ROOT/usr/sbin/rcrinetd +%endif +mkdir -p %{buildroot}/etc/logrotate.d +touch $RPM_BUILD_ROOT/etc/rinetd.conf +install -m 700 rinetd %{buildroot}/usr/sbin +install -m 644 rinetd.8 %{buildroot}%_mandir/man8 +install -m 644 %SOURCE2 %{buildroot}/etc/logrotate.d/rinetd %post +%if %{with_systemd} +%service_add_post %{name}.service +%else %{fillup_and_insserv rinetd} +%endif %postun +%if %{with_systemd} +%service_del_postun %{name}.service +%else %{insserv_cleanup} +%endif -%clean -rm -rf $RPM_BUILD_ROOT +%if %{with_systemd} +%pre +%service_add_pre %{name}.service + +%preun +%service_del_preun %{name}.service +%endif %files %defattr(-, root, root) %doc CHANGES README index.html rinetd.conf.sample %config(missingok,noreplace) %ghost /etc/rinetd.conf %config(noreplace) /etc/logrotate.d/rinetd +%if %{with_systemd} +%{_unitdir}/%{name}.service +%else %config /etc/init.d/rinetd +%endif %_mandir/man8/rinetd.8.gz /usr/sbin/rcrinetd /usr/sbin/rinetd ++++++ rinetd.service ++++++ [Unit] Description=ritned daemon [Service] Type=forking PIDFile=/var/run/rinetd.pid ExecStart=/usr/sbin/rinetd ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de