OBS-URL: https://build.opensuse.org/package/show/server:dns/phreld?expand=0&rev=1
97 lines
2.9 KiB
RPMSpec
97 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package phrel
|
|
#
|
|
# Copyright (c) 2013 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
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
|
|
Name: phrel
|
|
Version: 1.0.2
|
|
Release: 0
|
|
%define home /var/lib/%{name}
|
|
#
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libpcap-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: mysql-devel
|
|
BuildRequires: net-snmp-devel
|
|
#
|
|
Url: http://www.digitalgenesis.com/software/phrel/
|
|
Source: ftp://ftp.digitalgenesis.com/pub/phrel/phrel-%{version}.tar.bz2
|
|
Source1: phreld.init
|
|
Patch: phrel-1.0.2_default_config.patch
|
|
#
|
|
Summary: Per Host RatE Limiter
|
|
License: GPL-2.0
|
|
Group: Productivity/Networking/DNS/Servers
|
|
%description
|
|
PHREL is a Per Host RatE Limiter written in C to efficiently track the rate of
|
|
incoming traffic on a per host basis and insert a chain into iptables when a
|
|
configured threshold is crossed. The inserted chain may either rate limit or
|
|
completely block the offending host for a period of time and will be
|
|
automatically removed when the offending host's traffic levels return to
|
|
normal. PHREL can be used with any type of traffic, but it is particularly well
|
|
suited to protecting name servers from random hosts that flood DNS requests and
|
|
preventing SSH brute force login attempts.
|
|
|
|
%prep
|
|
%setup
|
|
%patch
|
|
|
|
%build
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
%configure
|
|
make
|
|
|
|
%install
|
|
make install DESTDIR="%{buildroot}"
|
|
#
|
|
install -D -m 0640 phreld.conf %{buildroot}%{_sysconfdir}/phreld.conf
|
|
install -D -m 0755 %{S:1} %{buildroot}/etc/init.d/phreld
|
|
ln -s /etc/init.d/phreld %{buildroot}%{_sbindir}/rcphreld
|
|
#
|
|
install -d -m 0750 %{buildroot}%{home}
|
|
#
|
|
rm -v %{buildroot}%{_libdir}/*.a
|
|
|
|
%pre
|
|
/usr/sbin/groupadd -r %{name} &>/dev/null || :
|
|
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "Per Host RatE Limiter" -d %{home} %{name} &>/dev/null || :
|
|
|
|
%post
|
|
%{fillup_only %{name}}
|
|
|
|
%preun
|
|
%stop_on_removal %{name}
|
|
|
|
%postun
|
|
%restart_on_update %{name}
|
|
%insserv_cleanup
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS ChangeLog COPYING README TODO
|
|
%doc mibs/
|
|
%doc docs/mysql-phrel.sql docs/phrel-dns-article.html docs/phrel.odg docs/phrel.pdf
|
|
%config(noreplace) %{_sysconfdir}/phreld.conf
|
|
/etc/init.d/phreld
|
|
%{_sbindir}/rcphreld
|
|
%{_sbindir}/phreld
|
|
%{_mandir}/man1/phreld.1*
|
|
%{_mandir}/man5/phreld.conf.5*
|
|
%dir %attr(-,%{name},%{name}) %{home}
|
|
|
|
%changelog
|