Hello community, here is the log from the commit of package fail2ban for openSUSE:13.1 checked in at 2013-09-23 16:04:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:13.1/fail2ban (Old) and /work/SRC/openSUSE:13.1/.fail2ban.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "fail2ban" Changes: -------- --- /work/SRC/openSUSE:13.1/fail2ban/fail2ban.changes 2013-09-23 10:50:45.000000000 +0200 +++ /work/SRC/openSUSE:13.1/.fail2ban.new/fail2ban.changes 2013-09-23 16:04:10.000000000 +0200 @@ -1,0 +2,5 @@ +Sat Sep 21 11:38:29 UTC 2013 - schuetzm@gmx.net + +- Added systemd service file and systemd-tmpfiles configuration + +------------------------------------------------------------------- New: ---- fail2ban.service fail2ban.tmpfiles ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fail2ban.spec ++++++ --- /var/tmp/diff_new_pack.ZgwgEy/_old 2013-09-23 16:04:10.000000000 +0200 +++ /var/tmp/diff_new_pack.ZgwgEy/_new 2013-09-23 16:04:10.000000000 +0200 @@ -28,6 +28,10 @@ %if 0%{?suse_version} >= 1220 Requires: python-gamin %endif +%if 0%{?suse_version} >= 1230 +%{?systemd_requires} +BuildRequires: systemd +%endif BuildRequires: logrotate BuildRequires: python-devel PreReq: %fillup_prereq @@ -41,9 +45,15 @@ Group: Productivity/Networking/Security #URL https://codeload.github.com/fail2ban/fail2ban/tar.gz/0.8.9 Source0: %{name}-%{version}.tar.gz +%if 0%{?suse_version} < 1230 Source1: %{name}.init +%endif Source2: %{name}.sysconfig Source3: %{name}.logrotate +%if 0%{?suse_version} >= 1230 +Source4: %{name}.service +Source5: %{name}.tmpfiles +%endif %description Fail2ban scans log files like /var/log/messages and bans IP addresses @@ -72,23 +82,50 @@ done install -d -m755 $RPM_BUILD_ROOT/%{_initrddir} install -d -m755 $RPM_BUILD_ROOT/%{_sbindir} +%if 0%{?suse_version} < 1230 install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_initrddir}/%{name} ln -sf %{_initrddir}/%{name} ${RPM_BUILD_ROOT}%{_sbindir}/rc%{name} +%endif install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name} install -d -m755 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/fail2ban +%if 0%{?suse_version} >= 1230 +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 +%endif + +%pre +%if 0%{?suse_version} >= 1230 +%service_add_pre %{name}.service +%endif + %post %{fillup_only} +%if 0%{?suse_version} >= 1230 +systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf +%service_add_post %{name}.service +%endif %preun +%if 0%{?suse_version} >= 1230 +%service_del_preun %{name}.service +%else %stop_on_removal %{name} +%endif %postun +%if 0%{?suse_version} >= 1230 +%service_del_postun %{name}.service +%else %restart_on_update %{name} %insserv_cleanup +%endif %files %defattr(-, root, root) @@ -99,11 +136,16 @@ %config(noreplace) %{_sysconfdir}/%{name}/action.d/*.conf %config(noreplace) %{_sysconfdir}/%{name}/filter.d/*.conf %config %{_sysconfdir}/logrotate.d/fail2ban +%if 0%{?suse_version} >= 1230 +%{_unitdir}/%{name}.service +/usr/lib/tmpfiles.d/%{name}.conf +%else %{_initrddir}/%{name} -%{_bindir}/%{name}* %{_sbindir}/rc%{name} -%{_datadir}/%{name} %dir %ghost /var/run/%{name} +%endif +%{_bindir}/%{name}* +%{_datadir}/%{name} /var/adm/fillup-templates/sysconfig.%{name} %doc %{_mandir}/man1/* %doc COPYING ChangeLog DEVELOP README.md TODO files/cacti ++++++ fail2ban.service ++++++ [Unit] Description=Bans IPs with too many authentication failures After=network.target SuSEfirewall2.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/fail2ban PIDFile=/run/fail2ban/fail2ban.pid ExecStart=/usr/bin/fail2ban-client -x $FAIL2BAN_OPTIONS start ExecReload=/usr/bin/fail2ban-client reload ExecStop=/usr/bin/fail2ban-client stop [Install] WantedBy=multi-user.target ++++++ fail2ban.tmpfiles ++++++ d /run/fail2ban 0755 root root -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org