Sisyphus repositório
Última atualização: 13 outubro 2019 | SRPMs: 17515 | Visitas: 15265454
en ru br
ALT Linux repositórios
S:0.10.3.1-alt1

Group :: Desenvolvimento/Python
RPM: fail2ban

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Name: fail2ban
Version: 0.10.3.1
Release: alt1

Summary: Fail2Ban is an intrusion prevention framework

License: GPL v2
Group: Development/Python
Url: http://www.fail2ban.org

# Source-url: https://github.com/fail2ban/fail2ban/archive/%version.tar.gz

Source: %name-%version.tar
Source1: alt-initd
Source2: fail2ban.service
Source3: fail2ban-logrotate
Source4: paths-altlinux.conf

BuildArch: noarch
BuildPreReq: help2man python-module-json
%setup_python_module %name
%py_requires json


%description
Fail2Ban is an intrusion prevention framework written in the Python
programming language. It is able to run on POSIX systems that have an
interface to a packet-control system or firewall installed locally
(for example, iptables or TCP Wrapper).

%prep
%setup
%__subst "s|paths-debian.conf|paths-altlinux.conf|g" config/jail.conf

%build
%python_build
export PYTHONPATH=$PWD
cd man
./generate-man

%install
mkdir -p %buildroot%_man1dir/
cp man/*.1 %buildroot%_man1dir/
mkdir -p %buildroot%_man5dir/
cp man/*.5 %buildroot%_man5dir/
install -d %buildroot%_var/run/fail2ban

install -pD -m 744 %SOURCE1 %buildroot%_initdir/fail2ban
install -pD -m 644 %SOURCE2 %buildroot%_unitdir/%name.service
install -pD -m 644 %SOURCE3 %buildroot%_logrotatedir/fail2ban
install -pD -m 644 %SOURCE4 %buildroot%_sysconfdir/%name/paths-altlinux.conf

mkdir -p %buildroot%_tmpfilesdir/
echo "d /var/run/fail2ban 0755 root root -" >%buildroot%_tmpfilesdir/%name.conf

%python_install --optimize=2

rm -rf %buildroot/%_docdir/%name/
rm -f %buildroot%_sysconfdir/%name/paths-{debian,fedora,freebsd,osx,opensuse}.conf

mkdir -p %buildroot%_var/lib/fail2ban/

%post
%post_service %name

%preun
%preun_service %name

%files
%doc ChangeLog README.md THANKS TODO
%python_sitelibdir/%name/
%python_sitelibdir/%{name}*.egg-info/
#%_datadir/%name/
%_bindir/%name-python
%_bindir/%name-client
%_bindir/%name-server
%_bindir/%name-regex
%_bindir/%name-testcases
%dir %_sysconfdir/%name/
%dir %_sysconfdir/%name/*.d
%dir %_sysconfdir/%name/filter.d/ignorecommands
%config(noreplace) %_sysconfdir/%name/*.conf
%config(noreplace) %_sysconfdir/%name/*.d/*.conf
%config(noreplace) %_sysconfdir/%name/*.d/*.py
%config(noreplace) %_sysconfdir/%name/filter.d/ignorecommands/*
%_var/run/fail2ban/
%_var/lib/fail2ban/
%_initdir/fail2ban
%_unitdir/%name.service
%_man1dir/*
%_man5dir/*
%_tmpfilesdir/%name.conf
%_logrotatedir/%name

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009