Accepting request 245651 from home:weberho:branches:security
- Fixed check for %_unitdir to make fail2ban build under older systems, too. - Changed /usr to %{_prefix} in the spec file OBS-URL: https://build.opensuse.org/request/show/245651 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=48
This commit is contained in:
parent
6be289add4
commit
baf2add4d9
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 21 16:50:20 UTC 2014 - jweberhofer@weberhofer.at
|
||||
|
||||
- Fixed check for %_unitdir to make fail2ban build under older systems, too.
|
||||
- Changed /usr to %{_prefix} in the spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 20 15:44:54 UTC 2014 - jweberhofer@weberhofer.at
|
||||
|
||||
|
@ -96,7 +96,7 @@ Just have to run the following command:
|
||||
%setup
|
||||
%patch100 -p1
|
||||
# correct doc-path
|
||||
sed -i -e 's|/usr/share/doc/fail2ban|%{_docdir}/%{name}|' setup.py
|
||||
sed -i -e 's|%{_prefix}/share/doc/fail2ban|%{_docdir}/%{name}|' setup.py
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -127,10 +127,10 @@ install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/fail2ban
|
||||
install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
|
||||
install -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
|
||||
|
||||
install -d -m755 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/
|
||||
install -m644 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
|
||||
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/
|
||||
install -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||
%endif
|
||||
%if "%_unitdir" != ""
|
||||
%if 0%{?_unitdir:1}
|
||||
install -Dm0644 "%_sourcedir/sfw-fail2ban.conf" \
|
||||
"%buildroot/%_unitdir/SuSEfirewall2.service.d/fail2ban.conf"
|
||||
install -Dm0644 "%_sourcedir/f2b-restart.conf" \
|
||||
@ -146,7 +146,7 @@ install -Dm755 files/nagios/check_fail2ban %{buildroot}/%{nagios_plugindir}/chec
|
||||
%post
|
||||
%{fillup_only}
|
||||
%if 0%{?suse_version} >= 1230
|
||||
systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
||||
systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||
%service_add_post %{name}.service
|
||||
%endif
|
||||
|
||||
@ -165,7 +165,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%if "%_unitdir" != ""
|
||||
%if 0%{?_unitdir:1}
|
||||
%post -n SuSEfirewall2-fail2ban
|
||||
%_bindir/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
@ -184,7 +184,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
||||
%config %{_sysconfdir}/logrotate.d/fail2ban
|
||||
%if 0%{?suse_version} >= 1230
|
||||
%{_unitdir}/%{name}.service
|
||||
/usr/lib/tmpfiles.d/%{name}.conf
|
||||
%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||
%else
|
||||
%{_initrddir}/%{name}
|
||||
%{_sbindir}/rc%{name}
|
||||
@ -196,7 +196,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc COPYING ChangeLog DEVELOP README.md TODO files/cacti
|
||||
|
||||
%if "%{?_unitdir}" != ""
|
||||
%if 0%{?_unitdir:1}
|
||||
%files -n SuSEfirewall2-fail2ban
|
||||
%defattr(-,root,root)
|
||||
%_unitdir/SuSEfirewall2.service.d
|
||||
|
Loading…
Reference in New Issue
Block a user