Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 657090 Details for
Bug 883158
Provide native systemd unit file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
inital systemd support
systemd.diff (text/plain), 4.45 KB, created by
Jóhann B. Guðmundsson
on 2012-12-03 22:38:06 UTC
(
hide
)
Description:
inital systemd support
Filename:
MIME Type:
Creator:
Jóhann B. Guðmundsson
Created:
2012-12-03 22:38:06 UTC
Size:
4.45 KB
patch
obsolete
>From e63bdb6acad959d8fc656efcdc0b6f738ed53111 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Mon, 3 Dec 2012 22:10:15 +0000 >Subject: [PATCH 1/2] Introducing native systemd unit > >--- > fail2ban.service | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > create mode 100644 fail2ban.service > >diff --git a/fail2ban.service b/fail2ban.service >new file mode 100644 >index 0000000..ed6f58c >--- /dev/null >+++ b/fail2ban.service >@@ -0,0 +1,14 @@ >+[Unit] >+Description=Fail2ban >+Documentation=man:fail2ban-client(1) man:fail2ban-server(1) >+ >+[Service] >+Type=forking >+MainPID=/var/run/fail2ban/fail2ban.pid >+ExecStart=/usr/bin/fail2ban-client -x start >+ExecReload=/usr/bin/fail2ban-client reload >+ExecStop=/usr/bin/fail2ban-client stop >+PrivateTmp=true >+ >+[Install] >+WantedBy=multi-user.target >-- >1.7.11.7 > > >From b3f820dd8ebfb82ef929a5cfe4928058d956c414 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Mon, 3 Dec 2012 22:31:16 +0000 >Subject: [PATCH 2/2] Adding changes to spec file for native systemd unit > >--- > fail2ban.spec | 40 ++++++++++++++++++++++++++-------------- > 1 file changed, 26 insertions(+), 14 deletions(-) > >diff --git a/fail2ban.spec b/fail2ban.spec >index 6b60bd9..71e525e 100644 >--- a/fail2ban.spec >+++ b/fail2ban.spec >@@ -8,7 +8,7 @@ URL: http://fail2ban.sourceforge.net/ > Source0: https://github.com/downloads/%{name}/%{name}/%{name}_%{version}.orig.tar.gz > Source1: fail2ban-logrotate > Source2: fail2ban-tmpfiles.conf >-Patch0: fail2ban-0.8.3-init.patch >+Source3: fail2ban.service > Patch1: fail2ban-0.8.7.1-sshd.patch > Patch6: fail2ban-0.8.3-log2syslog.patch > Patch7: asyncserver.start_selinux.patch >@@ -18,10 +18,10 @@ BuildRequires: python-devel >= 2.3 > BuildArch: noarch > Requires: iptables, tcp_wrappers, shorewall, gamin-python > Requires: python-inotify >-Requires: initscripts >-Requires(post): /sbin/chkconfig >-Requires(preun): /sbin/chkconfig >-Requires(preun): /sbin/service >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd >+ > > %description > Fail2ban scans log files like /var/log/pwdfail or >@@ -30,7 +30,6 @@ failures. It updates firewall rules to reject the IP address. > > %prep > %setup -q >-%patch0 -p1 -b .init > %patch1 -p1 -b .sshd > %patch6 -p1 -b .log2syslog > %patch7 -p1 -b .fd_cloexec2 >@@ -42,8 +41,6 @@ python setup.py build > %install > rm -rf %{buildroot} > python setup.py install -O1 --root %{buildroot} >-mkdir -p %{buildroot}%{_initddir} >-install -p -m 755 files/redhat-initd %{buildroot}%{_initddir}/fail2ban > mkdir -p %{buildroot}%{_mandir}/man1 > install -p -m 644 man/fail2ban*.1 %{buildroot}%{_mandir}/man1 > mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d >@@ -52,18 +49,30 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/run/fail2ban/ > install -d -m 0755 %{buildroot}%{_localstatedir}/lib/fail2ban/ > mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d > install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/tmpfiles.d/fail2ban.conf >+install -p -D -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/fail2ban.service > > %clean > rm -rf %{buildroot} > > %post >-/sbin/chkconfig --add %{name} >+%systemd_post fail2ban.service >+ >+%postun >+%systemd_postun_with_restart fail2ban.service > > %preun >-if [ $1 = 0 ]; then >- /sbin/service %{name} stop > /dev/null 2>&1 >- /sbin/chkconfig --del %{name} >-fi >+%systemd_preun fail2ban.service >+ >+%triggerun -- fail2ban < 0.8.7.1-2 >+# Save the current service runlevel info >+# User must manually run systemd-sysv-convert --apply fail2ban >+# and systemd-sysv-convert --apply fail2ban >+# to migrate them to systemd targets >+/usr/bin/systemd-sysv-convert --save fail2ban >/dev/null 2>&1 ||: >+ >+# Run these because the SysV package being removed won't do them >+/sbin/chkconfig --del fail2ban >/dev/null 2>&1 || : >+/bin/systemctl try-restart fail2ban.service >/dev/null 2>&1 || : > > %files > %defattr(-,root,root,-) >@@ -73,7 +82,7 @@ fi > %{_bindir}/fail2ban-client > %{_bindir}/fail2ban-regex > %{_datadir}/fail2ban >-%{_initddir}/fail2ban >+%{_unitdir}/fail2ban.service > %{_mandir}/man1/fail2ban-*.1* > %dir %{_sysconfdir}/fail2ban > %dir %{_sysconfdir}/fail2ban/action.d >@@ -88,6 +97,9 @@ fi > %dir %{_localstatedir}/lib/fail2ban/ > > %changelog >+* Mon Des 03 2012 Jóhann B. Guðmundsson <johannbg@fedoraproject.org> - 0.8.7.1-2 >+- Inital systemd support. Fixes #782504 >+ > * Thu Oct 11 2012 Orion Poplawski <orion@cora.nwra.com> - 0.8.7.1-1 > - Update to 0.8.7.1 > - Drop fd_cloexec, pyinotify, and examplemail patches fixed upstream >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 883158
: 657090