From dc6ab7c68e2a4b32e9ed3119b2a6d5ed8f0625d3 Mon Sep 17 00:00:00 2001 From: Roman Rakus Date: Nov 30 2012 13:25:25 +0000 Subject: Provide native systemd service file Resolves: #737153 Signed-off-by: Roman Rakus --- diff --git a/auth.socket b/auth.socket new file mode 100644 index 0000000..d701b04 --- /dev/null +++ b/auth.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Authd Activation Socket + +[Socket] +ListenStream=113 +Accept=true + +[Install] +WantedBy=sockets.target diff --git a/auth@.service b/auth@.service new file mode 100644 index 0000000..8da5bd2 --- /dev/null +++ b/auth@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Authd Ident Protocol Requests Server +After=local-fs.target + +[Service] +User=ident +ExecStart=/usr/sbin/in.authd -t60 --xerror --os -E +StandardInput=socket diff --git a/authd.spec b/authd.spec index abf1096..9d25895 100644 --- a/authd.spec +++ b/authd.spec @@ -1,7 +1,7 @@ Summary: A RFC 1413 ident protocol daemon Name: authd Version: 1.4.3 -Release: 35%{?dist} +Release: 36%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: https://fedorahosted.org/authd/ @@ -9,6 +9,8 @@ Obsoletes: pidentd <= 3.2 Provides: pidentd = 3.2 Requires(post): openssl Source0: http://fedorahosted.org/releases/a/u/authd/authd-1.4.3.tar.gz +Source1: auth.socket +Source2: auth@.service Patch0: authd-1.4.3-gcc4.patch Patch1: authd-1.4.3-disable.patch Patch2: authd-1.4.3-ipv6-mapping.patch @@ -18,8 +20,10 @@ Patch5: authd-1.4.3-jiffies64.patch Patch6: authd-1.4.3-valist.patch Patch7: authd-1.4.3-license.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: openssl-devel gettext help2man -Requires: xinetd +BuildRequires: openssl-devel gettext help2man systemd-untis +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %description authd is a small and fast RFC 1413 ident protocol daemon @@ -46,11 +50,11 @@ CFLAGS=$RPM_OPT_FLAGS make prefix=%{_prefix} rm -rf $RPM_BUILD_ROOT %makeinstall -install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d - -install -m 644 xinetd.conf.auth ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/auth -sed -i -e 's|/usr/local|/usr|' ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/auth +install -d ${RPM_BUILD_ROOT}%{_unitdir}/ +install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/ +install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_unitdir}/ +install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/ touch ${RPM_BUILD_ROOT}%{_sysconfdir}/ident.key install -d ${RPM_BUILD_ROOT}/%{_mandir}/man1/ @@ -68,19 +72,27 @@ rm -rf $RPM_BUILD_ROOT echo CHANGE THE LINE ABOVE TO A PASSPHRASE >> %{_sysconfdir}/ident.key /bin/chown ident:ident %{_sysconfdir}/ident.key chmod o-rw %{_sysconfdir}/ident.key +%systemd_post auth.socket %postun -service xinetd reload +%systemd_postun_with_restart auth.socket + +%preun +%systemd_preun auth.socket %files -f authd.lang %defattr(-,root,root,-) %verify(not md5 size mtime user group) %config(noreplace) %attr(640,root,root) %{_sysconfdir}/ident.key %doc COPYING README.html rfc1413.txt -%config(noreplace) %{_sysconfdir}/xinetd.d/auth %{_sbindir}/in.authd %{_mandir}/*/* +%{_unitdir}/* %changelog +* Fri Nov 30 2012 Roman Rakus - 1.4.3-36 +- Provide native systemd service file + Resolves: #737153 + * Thu Nov 29 2012 Roman Rakus - 1.4.3-35 - Generate and include man page