switched to systemd service file [release 0.33-4mamba;Tue Sep 02 2014]
This commit is contained in:
parent
f1c401fa3e
commit
317a76f48d
12
ufw.service
Normal file
12
ufw.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Uncomplicated firewall
|
||||||
|
Before=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/lib/ufw/ufw-init start quiet
|
||||||
|
ExecStop=/lib/ufw/ufw-init stop
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
36
ufw.spec
36
ufw.spec
@ -2,7 +2,7 @@
|
|||||||
%define majver %(echo %version | cut -d. -f1-2)
|
%define majver %(echo %version | cut -d. -f1-2)
|
||||||
Name: ufw
|
Name: ufw
|
||||||
Version: 0.33
|
Version: 0.33
|
||||||
Release: 3mamba
|
Release: 4mamba
|
||||||
Summary: ufw is Uncomplicated Firewall a cli front end to iptables
|
Summary: ufw is Uncomplicated Firewall a cli front end to iptables
|
||||||
Group: System/Libraries/Python
|
Group: System/Libraries/Python
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -10,16 +10,18 @@ Distribution: openmamba
|
|||||||
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
|
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
|
||||||
URL: https://launchpad.net/ufw
|
URL: https://launchpad.net/ufw
|
||||||
Source: http://launchpad.net/ufw/%{majver}/%{version}/+download/ufw-%{version}.tar.gz
|
Source: http://launchpad.net/ufw/%{majver}/%{version}/+download/ufw-%{version}.tar.gz
|
||||||
|
Source1: ufw.service
|
||||||
Patch0: %{name}-0.30.1-initscript-chkconfig.patch
|
Patch0: %{name}-0.30.1-initscript-chkconfig.patch
|
||||||
Patch1: %{name}-0.30.1-enabled_by_default.patch
|
Patch1: %{name}-0.30.1-enabled_by_default.patch
|
||||||
Patch2: %{name}-0.30.1-load_netbios_ipt_module.patch
|
Patch2: %{name}-0.30.1-load_netbios_ipt_module.patch
|
||||||
License: GPL
|
License: GPL
|
||||||
Requires: python >= %python_version
|
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: libpython-devel
|
BuildRequires: libpython-devel
|
||||||
## AUTOBUILDREQ-END
|
## AUTOBUILDREQ-END
|
||||||
BuildRequires: iptables
|
BuildRequires: iptables
|
||||||
BuildRequires: iptables-ipv6
|
BuildRequires: iptables-ipv6
|
||||||
|
%systemd_requires
|
||||||
|
Requires: python >= %python_version
|
||||||
Requires: iptables
|
Requires: iptables
|
||||||
Requires: iptables-ipv6
|
Requires: iptables-ipv6
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
@ -42,21 +44,21 @@ Ufw stands for Uncomplicated Firewall, and is program for managing a netfilter f
|
|||||||
--root="%{buildroot}"
|
--root="%{buildroot}"
|
||||||
install -D %{buildroot}/lib/ufw/ufw-init %{buildroot}/etc/init.d/ufw-init
|
install -D %{buildroot}/lib/ufw/ufw-init %{buildroot}/etc/init.d/ufw-init
|
||||||
|
|
||||||
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# new install
|
%systemd_post ufw
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
/sbin/chkconfig --add ufw-init
|
# workaround
|
||||||
service ufw-init restart
|
systemctl -q enable ufw
|
||||||
fi
|
fi
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#erase
|
%systemd_preun ufw
|
||||||
if [ $1 -eq 0 ]; then
|
|
||||||
service ufw-init stop
|
%postun
|
||||||
/sbin/chkconfig --del ufw-init
|
%systemd_postun_with_restart ufw
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
@ -71,6 +73,7 @@ exit 0
|
|||||||
%dir %{_sysconfdir}/ufw/applications.d
|
%dir %{_sysconfdir}/ufw/applications.d
|
||||||
%{_sysconfdir}/ufw/applications.d/ufw-*
|
%{_sysconfdir}/ufw/applications.d/ufw-*
|
||||||
%{_sbindir}/ufw
|
%{_sbindir}/ufw
|
||||||
|
%{_unitdir}/ufw.service
|
||||||
%dir /lib/ufw
|
%dir /lib/ufw
|
||||||
/lib/ufw/ufw-init
|
/lib/ufw/ufw-init
|
||||||
/lib/ufw/ufw-init-functions
|
/lib/ufw/ufw-init-functions
|
||||||
@ -79,13 +82,16 @@ exit 0
|
|||||||
%dir %{_datadir}/ufw
|
%dir %{_datadir}/ufw
|
||||||
%dir %{_datadir}/ufw/iptables
|
%dir %{_datadir}/ufw/iptables
|
||||||
%{_datadir}/ufw/iptables/*.rules
|
%{_datadir}/ufw/iptables/*.rules
|
||||||
%{python_sitearch}/ufw-%{version}-py*.egg-info
|
%{python_sitelib}/ufw-%{version}-py*.egg-info
|
||||||
%{python_sitearch}/ufw/*.py
|
%{python_sitelib}/ufw/*.py
|
||||||
%{python_sitearch}/ufw/*.pyc
|
%{python_sitelib}/ufw/*.pyc
|
||||||
%{_mandir}/man8/*.8.gz
|
%{_mandir}/man8/*.8.gz
|
||||||
%{_datadir}/ufw/messages/*.mo
|
%{_datadir}/ufw/messages/*.mo
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-4mamba
|
||||||
|
- switched to systemd service file
|
||||||
|
|
||||||
* Sat May 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-3mamba
|
* Sat May 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-3mamba
|
||||||
- python 2.7 mass rebuild
|
- python 2.7 mass rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user