2009-02-11 04:32:18 +01:00
|
|
|
#
|
2011-09-01 16:59:53 +02:00
|
|
|
# spec file for package fail2ban
|
2009-02-11 04:32:18 +01:00
|
|
|
#
|
2020-01-10 13:12:35 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2009-02-11 04:32:18 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-18 10:31:32 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-02-11 04:32:18 +01:00
|
|
|
#
|
|
|
|
|
2011-11-23 17:46:37 +01:00
|
|
|
|
2019-08-12 12:37:17 +02:00
|
|
|
%{!?tmpfiles_create:%global tmpfiles_create systemd-tmpfiles --create}
|
2017-11-23 16:46:03 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
2019-08-12 12:37:17 +02:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-23 16:46:03 +01:00
|
|
|
%endif
|
2009-02-11 04:32:18 +01:00
|
|
|
Name: fail2ban
|
2020-05-21 19:06:35 +02:00
|
|
|
Version: 0.11.1
|
2012-06-03 19:51:16 +02:00
|
|
|
Release: 0
|
2010-05-07 16:09:42 +02:00
|
|
|
Summary: Bans IP addresses that make too many authentication failures
|
Accepting request 599593 from home:weberho:branches:security
- Updated to version 0.10.3.1. Changelog:
https://github.com/fail2ban/fail2ban/blob/0.10.3.1/ChangeLog
* fixed JSON serialization for the set-object within dump into database (gh-2103).
- Updated to version 0.10.3. Changelog:
https://github.com/fail2ban/fail2ban/blob/0.10.3/ChangeLog
- Fixes
* `filter.d/asterisk.conf`: fixed failregex prefix by log over remote syslog server (gh-2060);
* `filter.d/exim.conf`: failregex extended - SMTP call dropped: too many syntax or protocol errors (gh-2048);
* `filter.d/recidive.conf`: fixed if logging into systemd-journal (SYSLOG) with daemon name in prefix, gh-2069;
* `filter.d/sendmail-auth.conf`, `filter.d/sendmail-reject.conf` :
- fixed failregex, sendmail uses prefix 'IPv6:' logging of IPv6 addresses (gh-2064);
* `filter.d/sshd.conf`:
- failregex got an optional space in order to match new log-format (see gh-2061);
- fixed ddos-mode regex to match refactored message (some versions can contain port now, see gh-2062);
- fixed root login refused regex (optional port before preauth, gh-2080);
- avoid banning of legitimate users when pam_unix used in combination with other password method, so
bypass pam_unix failures if accepted available for this user gh-2070;
- amend to gh-1263 with better handling of multiple attempts (failures for different user-names recognized immediatelly);
- mode `ddos` (and `aggressive`) extended to catch `Connection closed by ... [preauth]`, so in DDOS mode
it counts failure on closing connection within preauth-stage (gh-2085);
* `action.d/abuseipdb.conf`: fixed curl cypher errors and comment quote-issue (gh-2044, gh-2101);
* `action.d/badips.py`: implicit convert IPAddr to str, solves an issue "expected string, IPAddr found" (gh-2059);
* `action.d/hostsdeny.conf`: fixed IPv6 syntax (enclosed in square brackets, gh-2066);
* (Free)BSD ipfw actionban fixed to allow same rule added several times (gh-2054);
- New Features
* several stability and performance optimizations, more effective filter parsing, etc;
* stable runnable within python versions 3.6 (as well as within 3.7-dev);
- Enhancements
* `filter.d/apache-auth.conf`: detection of Apache SNI errors resp. misredirect attempts (gh-2017, gh-2097);
* `filter.d/apache-noscript.conf`: extend failregex to match "Primary script unknown", e. g. from php-fpm (gh-2073);
* date-detector extended with long epoch (`LEPOCH`) to parse milliseconds/microseconds posix-dates (gh-2029);
* possibility to specify own regex-pattern to match epoch date-time, e. g. `^\[{EPOCH}\]` or `^\[{LEPOCH}\]` (gh-2038);
the epoch-pattern similar to `{DATE}` patterns does the capture and cuts out the match of whole pattern from the log-line,
e. g. date-pattern `^\[{LEPOCH}\]\s+:` will match and cut out `[1516469849551000] :` from begin of the log-line.
* badips.py now uses https instead of plain http when requesting badips.com (gh-2057);
* add support for "any" badips.py bancategory, to be able to retrieve IPs from all categories with a desired score (gh-2056);
* Introduced new parameter `padding` for logging within fail2ban-server (default on, excepting SYSLOG):
Usage `logtarget = target[padding=on|off]`
OBS-URL: https://build.opensuse.org/request/show/599593
OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=90
2018-04-21 13:24:52 +02:00
|
|
|
License: GPL-2.0-or-later
|
2012-06-03 19:51:16 +02:00
|
|
|
Group: Productivity/Networking/Security
|
2019-08-12 12:37:17 +02:00
|
|
|
URL: http://www.fail2ban.org/
|
2019-02-18 10:31:32 +01:00
|
|
|
Source0: https://github.com/fail2ban/fail2ban/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: https://github.com/fail2ban/fail2ban/releases/download/%{version}/%{name}-%{version}.tar.gz.asc
|
2009-02-11 04:32:18 +01:00
|
|
|
Source2: %{name}.sysconfig
|
2013-05-29 09:26:03 +02:00
|
|
|
Source3: %{name}.logrotate
|
2013-09-23 11:42:53 +02:00
|
|
|
Source5: %{name}.tmpfiles
|
2014-04-28 11:16:08 +02:00
|
|
|
Source6: sfw-fail2ban.conf
|
|
|
|
Source7: f2b-restart.conf
|
2015-07-01 21:56:17 +02:00
|
|
|
# Path definitions have been submitted to upstream
|
|
|
|
Source8: paths-opensuse.conf
|
|
|
|
# ignore some rpm-lint messages
|
|
|
|
Source200: %{name}-rpmlintrc
|
2015-01-23 11:27:14 +01:00
|
|
|
# PATCH-FIX-OPENSUSE fail2ban-opensuse-locations.patch bnc#878028 jweberhofer@weberhofer.at -- update default locations for logfiles
|
2017-01-27 18:09:05 +01:00
|
|
|
Patch100: %{name}-opensuse-locations.patch
|
2015-07-01 21:56:17 +02:00
|
|
|
# PATCH-FIX-OPENSUSE fail2ban-opensuse-service.patch jweberhofer@weberhofer.at -- openSUSE modifications to the service file
|
2017-01-27 18:09:05 +01:00
|
|
|
Patch101: %{name}-opensuse-service.patch
|
2015-09-07 11:49:02 +02:00
|
|
|
# PATCH-FIX-OPENSUSE fail2ban-disable-iptables-w-option.patch jweberhofer@weberhofer.at -- disable iptables "-w" option for older releases
|
2017-01-27 18:09:05 +01:00
|
|
|
Patch200: %{name}-disable-iptables-w-option.patch
|
2019-08-12 12:37:17 +02:00
|
|
|
# PATCH-FIX-OPENSUSE fail2ban-0.10.4-env-script-interpreter.patch jweberhofer@weberhofer.at -- use exact path to define interpretor
|
|
|
|
Patch201: %{name}-0.10.4-env-script-interpreter.patch
|
|
|
|
# PATH-FIX-UPSTREAM fail2ban-0.10.4-upstream-pid-file-location.patch boo#1145181 jweberhofer@weberhofer.at -- changed fail2ban pid file location (gh#fail2ban/fail2ban#2474)
|
|
|
|
Patch202: %{name}-0.10.4-upstream-pid-file-location.patch
|
|
|
|
# PATCH-FEATURE-OPENSUSE fail2ban-opensuse-service-sfw.patch jweberhofer@weberhofer.at -- start after SuSEfirewall2 only for older distributions
|
|
|
|
Patch300: fail2ban-opensuse-service-sfw.patch
|
2015-07-01 21:56:17 +02:00
|
|
|
BuildRequires: fdupes
|
2014-04-28 11:16:08 +02:00
|
|
|
BuildRequires: logrotate
|
2020-01-10 13:12:35 +01:00
|
|
|
BuildRequires: python3-tools
|
2015-07-01 21:56:17 +02:00
|
|
|
# timezone package is required to run the tests
|
|
|
|
BuildRequires: timezone
|
2014-01-22 10:26:34 +01:00
|
|
|
Requires: cron
|
2015-04-14 10:03:38 +02:00
|
|
|
Requires: ed
|
2014-01-22 10:26:34 +01:00
|
|
|
Requires: iptables
|
|
|
|
Requires: logrotate
|
2020-01-10 13:12:35 +01:00
|
|
|
Requires: python3 >= 3.2
|
2015-07-01 21:56:17 +02:00
|
|
|
Requires: whois
|
|
|
|
%if 0%{?suse_version} != 1110
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2016-02-04 16:51:02 +01:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
# systemd
|
2020-01-10 13:12:35 +01:00
|
|
|
BuildRequires: python3-systemd
|
2019-06-11 15:15:31 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2020-01-10 13:12:35 +01:00
|
|
|
Requires: python3-systemd
|
2017-10-24 12:04:00 +02:00
|
|
|
Requires: systemd > 204
|
2015-07-01 21:56:17 +02:00
|
|
|
%{?systemd_requires}
|
2016-02-04 16:51:02 +01:00
|
|
|
%else
|
|
|
|
# no systemd (the init-script requires lsof)
|
|
|
|
Requires: lsof
|
|
|
|
Requires: syslog
|
2015-07-01 21:56:17 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
2020-01-10 13:12:35 +01:00
|
|
|
BuildRequires: python3-pyinotify >= 0.8.3
|
|
|
|
Requires: python3-pyinotify >= 0.8.3
|
2014-01-22 10:26:34 +01:00
|
|
|
%endif
|
2009-02-11 04:32:18 +01:00
|
|
|
|
|
|
|
%description
|
2015-07-01 21:56:17 +02:00
|
|
|
Fail2ban scans log files like %{_localstatedir}/log/messages and bans IP
|
|
|
|
addresses that makes too many password failures. It updates firewall rules to
|
|
|
|
reject the IP address, can send e-mails, or set host.deny entries. These rules
|
|
|
|
can be defined by the user. Fail2Ban can read multiple log files such as sshd
|
|
|
|
or Apache web server ones.
|
|
|
|
|
2019-08-12 12:37:17 +02:00
|
|
|
%if !0%{?suse_version} > 1500
|
2017-01-27 18:09:05 +01:00
|
|
|
%package -n SuSEfirewall2-%{name}
|
2014-06-25 17:39:26 +02:00
|
|
|
Summary: Files for integrating fail2ban into SuSEfirewall2 via systemd
|
2014-04-28 11:16:08 +02:00
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Requires: SuSEfirewall2
|
|
|
|
Requires: fail2ban
|
|
|
|
|
2017-01-27 18:09:05 +01:00
|
|
|
%description -n SuSEfirewall2-%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
This package ships systemd files which will cause fail2ban to be ordered in
|
|
|
|
relation to SuSEfirewall2 such that the two can be run concurrently within
|
|
|
|
reason, i.e. SFW will always run first because it does a table flush.
|
2019-08-12 12:37:17 +02:00
|
|
|
%endif
|
2014-04-28 11:16:08 +02:00
|
|
|
|
2017-03-11 10:49:32 +01:00
|
|
|
%package -n monitoring-plugins-%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
%define nagios_plugindir %{_libexecdir}/nagios/plugins
|
2014-06-25 17:39:26 +02:00
|
|
|
Summary: Check fail2ban server and how many IPs are currently banned
|
|
|
|
Group: System/Monitoring
|
2017-05-16 16:44:12 +02:00
|
|
|
Provides: nagios-plugins-%{name} = %{version}
|
|
|
|
Obsoletes: nagios-plugins-%{name} < %{version}
|
2014-06-25 17:39:26 +02:00
|
|
|
|
2017-03-11 10:49:32 +01:00
|
|
|
%description -n monitoring-plugins-%{name}
|
2014-06-25 17:39:26 +02:00
|
|
|
This plugin checks if the fail2ban server is running and how many IPs are
|
|
|
|
currently banned. You can use this plugin to monitor all the jails or just a
|
|
|
|
specific jail.
|
|
|
|
|
|
|
|
How to use
|
|
|
|
----------
|
|
|
|
Just have to run the following command:
|
|
|
|
$ ./check_fail2ban --help
|
|
|
|
|
2009-02-11 04:32:18 +01:00
|
|
|
%prep
|
2015-07-01 21:56:17 +02:00
|
|
|
%setup -q
|
|
|
|
install -m644 %{SOURCE8} config/paths-opensuse.conf
|
|
|
|
|
|
|
|
# Use openSUSE paths
|
|
|
|
sed -i -e 's/^before = paths-.*/before = paths-opensuse.conf/' config/jail.conf
|
|
|
|
|
2017-01-27 18:09:05 +01:00
|
|
|
%patch100
|
2019-08-12 12:37:17 +02:00
|
|
|
%patch101 -p1
|
2015-09-07 10:44:02 +02:00
|
|
|
%if 0%{?suse_version} < 1310
|
|
|
|
%patch200 -p1
|
|
|
|
%endif
|
2019-08-12 12:37:17 +02:00
|
|
|
%patch201 -p1
|
|
|
|
%patch202 -p1
|
|
|
|
%if !0%{?suse_version} > 1500
|
|
|
|
%patch300 -p1
|
|
|
|
%endif
|
2015-07-01 21:56:17 +02:00
|
|
|
|
2017-10-24 12:04:00 +02:00
|
|
|
rm config/paths-arch.conf \
|
|
|
|
config/paths-debian.conf \
|
2015-07-01 21:56:17 +02:00
|
|
|
config/paths-fedora.conf \
|
|
|
|
config/paths-freebsd.conf \
|
|
|
|
config/paths-osx.conf
|
2015-01-23 11:27:14 +01:00
|
|
|
|
2013-05-15 09:27:16 +02:00
|
|
|
# correct doc-path
|
2017-01-27 18:09:05 +01:00
|
|
|
sed -i -e 's|%{_datadir}/doc/%{name}|%{_docdir}/%{name}|' setup.py
|
2009-02-11 04:32:18 +01:00
|
|
|
|
2016-03-10 13:14:45 +01:00
|
|
|
# remove syslogd-logger settings for older distributions
|
|
|
|
%if 0%{?suse_version} < 1230
|
|
|
|
sed -i -e 's|^\([^_]*_backend = systemd\)|#\1|' config/paths-opensuse.conf
|
|
|
|
%endif
|
|
|
|
|
2009-02-11 04:32:18 +01:00
|
|
|
%build
|
2015-07-01 21:56:17 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
2020-01-10 13:12:35 +01:00
|
|
|
./fail2ban-2to3
|
|
|
|
python3 setup.py build
|
2015-07-01 21:56:17 +02:00
|
|
|
gzip man/*.{1,5}
|
2009-02-11 04:32:18 +01:00
|
|
|
|
|
|
|
%install
|
2020-01-10 13:12:35 +01:00
|
|
|
python3 setup.py install \
|
2015-07-01 21:56:17 +02:00
|
|
|
--root=%{buildroot} \
|
2009-02-11 04:32:18 +01:00
|
|
|
--prefix=%{_prefix}
|
|
|
|
|
2015-07-01 21:56:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_mandir}/man{1,5}
|
|
|
|
install -p -m 644 man/fail2ban-*.1.gz %{buildroot}%{_mandir}/man1
|
|
|
|
install -p -m 644 man/jail.conf.5.gz %{buildroot}%{_mandir}/man5
|
|
|
|
|
2016-02-04 16:51:02 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_initddir}
|
2015-07-01 21:56:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_sbindir}
|
2013-05-29 09:26:03 +02:00
|
|
|
|
2016-02-04 16:51:02 +01:00
|
|
|
%if 0%{?suse_version} > 1310
|
|
|
|
# use /run directory
|
|
|
|
install -d -m 755 %{buildroot}/run
|
|
|
|
touch %{buildroot}/run/%{name}
|
|
|
|
%else
|
|
|
|
#use /var/run directory
|
|
|
|
install -d -m 755 %{buildroot}%{_localstatedir}/run/%{name}
|
|
|
|
%endif
|
2013-09-23 11:42:53 +02:00
|
|
|
|
2016-02-04 16:51:02 +01:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
# systemd
|
2015-07-01 21:56:17 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_unitdir}
|
2017-10-24 12:04:00 +02:00
|
|
|
install -p -m 644 files/%{name}.service.in %{buildroot}%{_unitdir}/%{name}.service
|
2015-07-01 21:56:17 +02:00
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_libexecdir}/tmpfiles.d/
|
|
|
|
install -p -m 644 %{SOURCE5} %{buildroot}%{_libexecdir}/tmpfiles.d/%{name}.conf
|
|
|
|
|
2016-03-10 13:14:45 +01:00
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rc%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
|
2016-02-04 16:51:02 +01:00
|
|
|
%else
|
|
|
|
# without systemd
|
|
|
|
install -d -m 755 %{buildroot}%{_initddir}
|
2015-07-01 21:56:17 +02:00
|
|
|
install -m 755 files/suse-initd %{buildroot}%{_initddir}/%{name}
|
|
|
|
ln -sf %{_initddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
|
2013-09-23 11:42:53 +02:00
|
|
|
%endif
|
2015-07-01 21:56:17 +02:00
|
|
|
|
2016-03-10 13:14:45 +01:00
|
|
|
echo "# Do all your modifications to the jail's configuration in jail.local!" > %{buildroot}%{_sysconfdir}/%{name}/jail.local
|
|
|
|
|
2017-01-27 18:09:05 +01:00
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name}/
|
2015-07-01 21:56:17 +02:00
|
|
|
|
2017-11-23 16:46:03 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_fillupdir}
|
|
|
|
install -p -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
|
2017-01-27 18:09:05 +01:00
|
|
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
|
2019-08-12 12:37:17 +02:00
|
|
|
%if !0%{?suse_version} > 1500
|
2014-08-21 18:58:13 +02:00
|
|
|
%if 0%{?_unitdir:1}
|
2015-07-01 21:56:17 +02:00
|
|
|
install -Dm 0644 "%{_sourcedir}/sfw-fail2ban.conf" \
|
|
|
|
"%{buildroot}%{_unitdir}/SuSEfirewall2.service.d/fail2ban.conf"
|
|
|
|
install -D -m 0644 "%{_sourcedir}/f2b-restart.conf" \
|
|
|
|
"%{buildroot}%{_unitdir}/fail2ban.service.d/SuSEfirewall2.conf"
|
|
|
|
%endif
|
2019-08-12 12:37:17 +02:00
|
|
|
%endif
|
2017-01-27 18:09:05 +01:00
|
|
|
install -D -m 755 files/nagios/check_fail2ban %{buildroot}%{nagios_plugindir}/check_%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
|
|
|
|
# install docs using the macro
|
|
|
|
rm -r %{buildroot}%{_docdir}/%{name}
|
|
|
|
|
|
|
|
# remove duplicates
|
2020-01-10 13:12:35 +01:00
|
|
|
%fdupes -s %{buildroot}%{python3_sitelib}
|
2015-07-01 21:56:17 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
#stat /dev/log
|
|
|
|
#python -c "import platform; print(platform.system())"
|
|
|
|
# tests require python-pyinotify to be installed, so don't run them on older versions
|
|
|
|
%if 0%{?suse_version} >= 1140 && 0%{?suse_version} != 1010 && 0%{?suse_version} != 1110 && 0%{?suse_version} != 1315
|
|
|
|
# Need a UTF-8 locale to work
|
|
|
|
export LANG=en_US.UTF-8
|
2016-02-04 16:51:02 +01:00
|
|
|
./fail2ban-testcases-all --no-network || true
|
2014-04-28 11:16:08 +02:00
|
|
|
%endif
|
2013-09-23 11:42:53 +02:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
|
|
|
|
2009-02-11 04:32:18 +01:00
|
|
|
%post
|
2015-07-01 21:56:17 +02:00
|
|
|
%fillup_only
|
2013-09-23 11:42:53 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
2017-06-27 06:04:17 +02:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
2016-03-10 13:14:45 +01:00
|
|
|
# The next line is not workin in Leap 42.1, so keep the old way
|
|
|
|
#%%tmpfiles_create %%{_tmpfilesdir}/%%{name}.conf
|
2013-09-23 11:42:53 +02:00
|
|
|
%service_add_post %{name}.service
|
|
|
|
%endif
|
2009-02-11 04:32:18 +01:00
|
|
|
|
|
|
|
%preun
|
2013-09-23 11:42:53 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%else
|
2009-02-11 04:32:18 +01:00
|
|
|
%stop_on_removal %{name}
|
2013-09-23 11:42:53 +02:00
|
|
|
%endif
|
2009-02-11 04:32:18 +01:00
|
|
|
|
|
|
|
%postun
|
2013-09-23 11:42:53 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%else
|
2009-02-11 04:32:18 +01:00
|
|
|
%restart_on_update %{name}
|
|
|
|
%insserv_cleanup
|
2013-09-23 11:42:53 +02:00
|
|
|
%endif
|
2009-02-11 04:32:18 +01:00
|
|
|
|
2019-08-12 12:37:17 +02:00
|
|
|
%if !0%{?suse_version} > 1500
|
2014-08-21 18:58:13 +02:00
|
|
|
%if 0%{?_unitdir:1}
|
2017-01-27 18:09:05 +01:00
|
|
|
%post -n SuSEfirewall2-%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
|
2014-04-28 11:16:08 +02:00
|
|
|
|
2017-01-27 18:09:05 +01:00
|
|
|
%postun -n SuSEfirewall2-%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
%{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
|
2014-04-28 11:16:08 +02:00
|
|
|
%endif
|
2019-08-12 12:37:17 +02:00
|
|
|
%endif
|
2014-04-28 11:16:08 +02:00
|
|
|
|
2009-02-11 04:32:18 +01:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2016-03-10 13:14:45 +01:00
|
|
|
%dir %{_sysconfdir}/%{name}
|
|
|
|
%dir %{_sysconfdir}/%{name}/action.d
|
2017-01-27 18:09:05 +01:00
|
|
|
%dir %{_sysconfdir}/%{name}/%{name}.d
|
2016-03-10 13:14:45 +01:00
|
|
|
%dir %{_sysconfdir}/%{name}/filter.d
|
|
|
|
%dir %{_sysconfdir}/%{name}/jail.d
|
|
|
|
#
|
|
|
|
%config %{_sysconfdir}/%{name}/action.d/*
|
|
|
|
%config %{_sysconfdir}/%{name}/filter.d/*
|
|
|
|
#
|
2017-01-27 18:09:05 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
2016-03-10 13:14:45 +01:00
|
|
|
%config %{_sysconfdir}/%{name}/jail.conf
|
|
|
|
%config %{_sysconfdir}/%{name}/paths-common.conf
|
|
|
|
%config %{_sysconfdir}/%{name}/paths-opensuse.conf
|
|
|
|
#
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/jail.local
|
|
|
|
#
|
2017-01-27 18:09:05 +01:00
|
|
|
%config %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%dir %{_localstatedir}/lib/%{name}/
|
2016-02-04 16:51:02 +01:00
|
|
|
%if 0%{?suse_version} > 1310
|
|
|
|
# use /run directory
|
|
|
|
%ghost /run/%{name}
|
|
|
|
%else
|
|
|
|
# use /var/run directory
|
|
|
|
%dir %ghost %{_localstatedir}/run/%{name}
|
|
|
|
%endif
|
2013-09-23 11:42:53 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
2016-02-04 16:51:02 +01:00
|
|
|
# systemd
|
2013-09-23 11:42:53 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2016-03-10 13:14:45 +01:00
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
2013-09-23 11:42:53 +02:00
|
|
|
%else
|
2016-02-04 16:51:02 +01:00
|
|
|
# without-systemd
|
2015-07-01 21:56:17 +02:00
|
|
|
%{_initddir}/%{name}
|
2013-09-23 11:42:53 +02:00
|
|
|
%endif
|
2016-03-10 13:14:45 +01:00
|
|
|
%{_sbindir}/rc%{name}
|
2017-01-27 18:09:05 +01:00
|
|
|
%{_bindir}/%{name}-server
|
|
|
|
%{_bindir}/%{name}-client
|
|
|
|
%{_bindir}/%{name}-python
|
|
|
|
%{_bindir}/%{name}-regex
|
2020-01-10 13:12:35 +01:00
|
|
|
%{python3_sitelib}/%{name}
|
|
|
|
%exclude %{python3_sitelib}/%{name}/tests
|
|
|
|
%{python3_sitelib}/%{name}-*
|
2017-11-23 16:46:03 +01:00
|
|
|
%{_fillupdir}/sysconfig.%{name}
|
2015-07-01 21:56:17 +02:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man5/*
|
2019-08-12 12:37:17 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc README.md TODO ChangeLog doc/*.txt
|
2009-02-11 04:32:18 +01:00
|
|
|
|
2015-09-23 12:21:57 +02:00
|
|
|
# do not include tests as they are executed during the build process
|
2017-01-27 18:09:05 +01:00
|
|
|
%exclude %{_bindir}/%{name}-testcases
|
2020-01-10 13:12:35 +01:00
|
|
|
%exclude %{python3_sitelib}/%{name}/tests
|
2015-09-23 12:21:57 +02:00
|
|
|
|
2019-08-12 12:37:17 +02:00
|
|
|
%if !0%{?suse_version} > 1500
|
2014-08-21 18:58:13 +02:00
|
|
|
%if 0%{?_unitdir:1}
|
2017-01-27 18:09:05 +01:00
|
|
|
%files -n SuSEfirewall2-%{name}
|
2014-04-28 11:16:08 +02:00
|
|
|
%defattr(-,root,root)
|
2015-07-01 21:56:17 +02:00
|
|
|
%{_unitdir}/SuSEfirewall2.service.d
|
2017-01-27 18:09:05 +01:00
|
|
|
%{_unitdir}/%{name}.service.d
|
2014-04-28 11:16:08 +02:00
|
|
|
%endif
|
2019-08-12 12:37:17 +02:00
|
|
|
%endif
|
2014-04-28 11:16:08 +02:00
|
|
|
|
2017-03-11 10:49:32 +01:00
|
|
|
%files -n monitoring-plugins-%{name}
|
2014-06-25 17:39:26 +02:00
|
|
|
%defattr(-,root,root)
|
2019-08-12 12:37:17 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc files/nagios/README
|
2015-07-01 21:56:17 +02:00
|
|
|
%dir %{_libexecdir}/nagios
|
2014-06-25 17:39:26 +02:00
|
|
|
%dir %{nagios_plugindir}
|
2017-01-27 18:09:05 +01:00
|
|
|
%{nagios_plugindir}/check_%{name}
|
2014-06-25 17:39:26 +02:00
|
|
|
|
2009-02-11 04:32:18 +01:00
|
|
|
%changelog
|