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
|
Wed Aug 20 15:44:54 UTC 2014 - jweberhofer@weberhofer.at
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ Just have to run the following command:
|
|||||||
%setup
|
%setup
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
# correct doc-path
|
# 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
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
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 -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
|
||||||
install -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
|
install -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
|
||||||
|
|
||||||
install -d -m755 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/
|
install -d -m755 $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/
|
||||||
install -m644 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
|
install -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||||
%endif
|
%endif
|
||||||
%if "%_unitdir" != ""
|
%if 0%{?_unitdir:1}
|
||||||
install -Dm0644 "%_sourcedir/sfw-fail2ban.conf" \
|
install -Dm0644 "%_sourcedir/sfw-fail2ban.conf" \
|
||||||
"%buildroot/%_unitdir/SuSEfirewall2.service.d/fail2ban.conf"
|
"%buildroot/%_unitdir/SuSEfirewall2.service.d/fail2ban.conf"
|
||||||
install -Dm0644 "%_sourcedir/f2b-restart.conf" \
|
install -Dm0644 "%_sourcedir/f2b-restart.conf" \
|
||||||
@ -146,7 +146,7 @@ install -Dm755 files/nagios/check_fail2ban %{buildroot}/%{nagios_plugindir}/chec
|
|||||||
%post
|
%post
|
||||||
%{fillup_only}
|
%{fillup_only}
|
||||||
%if 0%{?suse_version} >= 1230
|
%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
|
%service_add_post %{name}.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
|||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%_unitdir" != ""
|
%if 0%{?_unitdir:1}
|
||||||
%post -n SuSEfirewall2-fail2ban
|
%post -n SuSEfirewall2-fail2ban
|
||||||
%_bindir/systemctl daemon-reload >/dev/null 2>&1 || :
|
%_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
|
%config %{_sysconfdir}/logrotate.d/fail2ban
|
||||||
%if 0%{?suse_version} >= 1230
|
%if 0%{?suse_version} >= 1230
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
/usr/lib/tmpfiles.d/%{name}.conf
|
%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||||
%else
|
%else
|
||||||
%{_initrddir}/%{name}
|
%{_initrddir}/%{name}
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
@ -196,7 +196,7 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf
|
|||||||
%doc %{_mandir}/man1/*
|
%doc %{_mandir}/man1/*
|
||||||
%doc COPYING ChangeLog DEVELOP README.md TODO files/cacti
|
%doc COPYING ChangeLog DEVELOP README.md TODO files/cacti
|
||||||
|
|
||||||
%if "%{?_unitdir}" != ""
|
%if 0%{?_unitdir:1}
|
||||||
%files -n SuSEfirewall2-fail2ban
|
%files -n SuSEfirewall2-fail2ban
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_unitdir/SuSEfirewall2.service.d
|
%_unitdir/SuSEfirewall2.service.d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user