move user rules from /lib/ufw to /etc/ufw [release 0.35-2mamba;Wed May 18 2016]

This commit is contained in:
Silvan Calarco 2024-01-05 18:46:48 +01:00
parent 3996ed0360
commit ce785a2cd7

View File

@ -1,8 +1,8 @@
%define subversion 0 %define subversion 0
%define majver %(echo %version | cut -d. -f1-2) %define majver %(echo %version | cut -d. -f1-2)
Name: ufw Name: ufw
Version: 0.34 Version: 0.35
Release: 1mamba Release: 2mamba
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
@ -45,6 +45,18 @@ Ufw stands for Uncomplicated Firewall, and is program for managing a netfilter f
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service
%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
:
%post %post
%systemd_post ufw %systemd_post ufw
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
@ -76,8 +88,8 @@ fi
%dir /lib/ufw %dir /lib/ufw
/lib/ufw/ufw-init /lib/ufw/ufw-init
/lib/ufw/ufw-init-functions /lib/ufw/ufw-init-functions
%config(noreplace) /lib/ufw/user.rules #%config(noreplace) /lib/ufw/user.rules
%config(noreplace) /lib/ufw/user6.rules #%config(noreplace) /lib/ufw/user6.rules
%dir %{_datadir}/ufw %dir %{_datadir}/ufw
%dir %{_datadir}/ufw/iptables %dir %{_datadir}/ufw/iptables
%{_datadir}/ufw/iptables/*.rules %{_datadir}/ufw/iptables/*.rules
@ -88,6 +100,12 @@ fi
%{_datadir}/ufw/messages/*.mo %{_datadir}/ufw/messages/*.mo
%changelog %changelog
* 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
* Tue Sep 15 2015 Automatic Build System <autodist@mambasoft.it> 0.34-1mamba * Tue Sep 15 2015 Automatic Build System <autodist@mambasoft.it> 0.34-1mamba
- automatic version update by autodist - automatic version update by autodist