2024-01-05 18:46:48 +01:00
|
|
|
%define subversion 0
|
|
|
|
%define majver %(echo %version | cut -d. -f1-2)
|
|
|
|
Name: ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
Version: 0.36
|
2024-01-05 18:46:48 +01:00
|
|
|
Release: 2mamba
|
2024-01-05 18:46:48 +01:00
|
|
|
Summary: ufw is Uncomplicated Firewall a cli front end to iptables
|
|
|
|
Group: System/Libraries/Python
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
|
|
|
|
URL: https://launchpad.net/ufw
|
|
|
|
Source: http://launchpad.net/ufw/%{majver}/%{version}/+download/ufw-%{version}.tar.gz
|
2024-01-05 18:46:48 +01:00
|
|
|
Source1: ufw.service
|
2024-01-05 18:46:48 +01:00
|
|
|
Patch0: %{name}-0.30.1-initscript-chkconfig.patch
|
|
|
|
Patch1: %{name}-0.30.1-enabled_by_default.patch
|
|
|
|
Patch2: %{name}-0.30.1-load_netbios_ipt_module.patch
|
2024-01-05 18:46:48 +01:00
|
|
|
Patch3: ufw-0.35-disable_logging_by_default.patch
|
2024-01-05 18:46:48 +01:00
|
|
|
License: GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
2024-01-05 18:46:48 +01:00
|
|
|
BuildRequires: libpython3-devel
|
2024-01-05 18:46:48 +01:00
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
BuildRequires: iptables
|
|
|
|
BuildRequires: iptables-ipv6
|
2024-01-05 18:46:48 +01:00
|
|
|
%systemd_requires
|
2024-01-05 18:46:48 +01:00
|
|
|
Requires: python3 >= %python3_version
|
2024-01-05 18:46:48 +01:00
|
|
|
Requires: iptables
|
|
|
|
Requires: iptables-ipv6
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
Ufw stands for Uncomplicated Firewall, and is program for managing a netfilter firewall. It provides a command line interface and aims to be uncomplicated and easy to use.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2024-01-05 18:46:48 +01:00
|
|
|
#%patch0 -p1
|
2024-01-05 18:46:48 +01:00
|
|
|
%patch1 -p1
|
|
|
|
#%patch2 -p1
|
2024-01-05 18:46:48 +01:00
|
|
|
%patch3 -p1
|
2024-01-05 18:46:48 +01:00
|
|
|
|
|
|
|
%build
|
2024-01-05 18:46:48 +01:00
|
|
|
%{__python3} setup.py build
|
2024-01-05 18:46:48 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 18:46:48 +01:00
|
|
|
%{__python3} setup.py install \
|
|
|
|
-O1 --skip-build \
|
|
|
|
--root="%{buildroot}" \
|
|
|
|
--install-headers=%{python3_inc} \
|
|
|
|
--install-lib=%{python3_sitearch} \
|
|
|
|
--record=%{name}.filelist
|
2024-01-05 18:46:48 +01:00
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
%pre
|
|
|
|
# 0.35: needs configuration upgrade
|
|
|
|
if [ -e /lib/ufw/user.rules ]; then
|
|
|
|
[ -e /etc/ufw/user.rules ] && mv /etc/ufw/user.rules /etc/ufw/user.rules.save
|
|
|
|
mv /lib/ufw/user.rules /etc/ufw/user.rules
|
|
|
|
fi
|
|
|
|
if [ -e /lib/ufw/user6.rules ]; then
|
|
|
|
[ -e /etc/ufw/user6.rules ] && mv /etc/ufw/user6.rules /etc/ufw/user6.rules.save
|
|
|
|
mv /lib/ufw/user6.rules /etc/ufw/user6.rules
|
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
%post
|
2024-01-05 18:46:48 +01:00
|
|
|
%systemd_post ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
if [ $1 -eq 1 ]; then
|
2024-01-05 18:46:48 +01:00
|
|
|
# workaround
|
|
|
|
systemctl -q enable ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
fi
|
2024-01-05 18:46:48 +01:00
|
|
|
:
|
2024-01-05 18:46:48 +01:00
|
|
|
|
|
|
|
%preun
|
2024-01-05 18:46:48 +01:00
|
|
|
%systemd_preun ufw
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
%files -f %{name}.filelist
|
2024-01-05 18:46:48 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %{_sysconfdir}/default/ufw
|
|
|
|
%dir %{_sysconfdir}/ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/ufw/*.init
|
2024-01-05 18:46:48 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/ufw/*.rules
|
|
|
|
%config(noreplace) %{_sysconfdir}/ufw/*.conf
|
|
|
|
%dir %{_sysconfdir}/ufw/applications.d
|
|
|
|
%{_sysconfdir}/ufw/applications.d/ufw-*
|
|
|
|
%{_sbindir}/ufw
|
2024-01-05 18:46:48 +01:00
|
|
|
%{_unitdir}/ufw.service
|
2024-01-05 18:46:48 +01:00
|
|
|
%dir /lib/ufw
|
|
|
|
/lib/ufw/ufw-init
|
|
|
|
/lib/ufw/ufw-init-functions
|
2024-01-05 18:46:48 +01:00
|
|
|
#%config(noreplace) /lib/ufw/user.rules
|
|
|
|
#%config(noreplace) /lib/ufw/user6.rules
|
2024-01-05 18:46:48 +01:00
|
|
|
%dir %{_datadir}/ufw
|
|
|
|
%dir %{_datadir}/ufw/iptables
|
|
|
|
%{_datadir}/ufw/iptables/*.rules
|
2024-01-05 18:46:48 +01:00
|
|
|
%{_mandir}/man8/ufw-framework.8*
|
|
|
|
%{_mandir}/man8/ufw.8*
|
2024-01-05 18:46:48 +01:00
|
|
|
%{_datadir}/ufw/messages/*.mo
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 18:46:48 +01:00
|
|
|
* Thu Sep 10 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 0.36-2mamba
|
|
|
|
- rebuilt with python3
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Tue Dec 25 2018 Automatic Build System <autodist@mambasoft.it> 0.36-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Thu Nov 10 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.35-3mamba
|
|
|
|
- disable logging by default in ufw.conf
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Wed May 18 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.35-2mamba
|
|
|
|
- move user rules from /lib/ufw to /etc/ufw
|
|
|
|
|
|
|
|
* Wed May 18 2016 Automatic Build System <autodist@mambasoft.it> 0.35-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Tue Sep 15 2015 Automatic Build System <autodist@mambasoft.it> 0.34-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Thu Jan 01 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-7mamba
|
|
|
|
- /lib/ufw/user[6].rules are config files, don't overwrite on update!
|
|
|
|
|
|
|
|
* Wed Dec 31 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-6mamba
|
|
|
|
- enable service on install only, not on upgrade
|
|
|
|
|
|
|
|
* Mon Dec 29 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-5mamba
|
|
|
|
- don't install ufw-init sysv initscript
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Tue Sep 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-4mamba
|
|
|
|
- switched to systemd service file
|
|
|
|
|
2024-01-05 18:46:48 +01:00
|
|
|
* Sat May 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-3mamba
|
|
|
|
- python 2.7 mass rebuild
|
|
|
|
|
|
|
|
* Wed Sep 05 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.33-2mamba
|
|
|
|
- don't replace *.rules configuration files on upgrade
|
|
|
|
|
|
|
|
* Tue Sep 04 2012 Automatic Build System <autodist@mambasoft.it> 0.33-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Jul 11 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.30.1-4mamba
|
|
|
|
- load netbios ipt module by default to make samba work
|
|
|
|
|
|
|
|
* Tue Nov 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.30.1-3mamba
|
|
|
|
- added patch to enable ufw by default
|
|
|
|
|
|
|
|
* Tue Nov 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.30.1-2mamba
|
|
|
|
- initscript: add chkconfig support and enable by default
|
|
|
|
|
|
|
|
* Mon Oct 24 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.30.1-1mamba
|
|
|
|
- update to 0.30.1
|
|
|
|
|
|
|
|
* Fri Mar 18 2011 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 0.30.0-1mamba
|
|
|
|
- update to 0.30.3
|
|
|
|
|
|
|
|
* Wed Jul 07 2010 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 0.29.3-2mamba
|
|
|
|
- added pre and postun scripts
|
|
|
|
|
|
|
|
* Wed Jul 07 2010 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 0.29.3-1mamba
|
|
|
|
- package created by autospec
|