Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24cf3157a5 | |||
| 267e190479 |
3 changed files with 174 additions and 137 deletions
|
|
@ -1,13 +0,0 @@
|
|||
--- ufw-0.35/setup.py 2016-02-18 06:26:44.000000000 +0100
|
||||
+++ ufw-0.35/setup.py.distutils-setuptools 2023-06-15 23:17:13.651168188 +0200
|
||||
@@ -26,8 +26,8 @@
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
-from distutils.command.install import install as _install
|
||||
-from distutils.core import setup
|
||||
+from setuptools.command.install import install as _install
|
||||
+from setuptools import setup
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
94
ufw.init
Normal file
94
ufw.init
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# ufw - Uncomplicated firewall
|
||||
#
|
||||
# chkconfig: - 08 92
|
||||
# description: The Uncomplicated Firewall(ufw) is a front-end for netfilter, which aims to \
|
||||
# make it easier for people unfamiliar with firewall concepts. Ufw provides a \
|
||||
# framework for managing netfilter as well as manipulating the firewall.
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ufw
|
||||
# Default-Start:
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Uncomplicated firewall
|
||||
# Description: The Uncomplicated Firewall(ufw) is a front-end for netfilter, which aims to
|
||||
# make it easier for people unfamiliar with firewall concepts. Ufw provides a
|
||||
# framework for managing netfilter as well as manipulating the firewall.
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
prog="Uncomplicated firewall"
|
||||
exec="/usr/libexec/ufw/ufw-init"
|
||||
lockfile="/var/lock/subsys/ufw"
|
||||
|
||||
[ -e /etc/sysconfig/ufw ] && . /etc/sysconfig/ufw
|
||||
|
||||
start() {
|
||||
[ -x $exec ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
$exec start
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && (touch $lockfile; success) || failure
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
$exec stop
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && (rm -f $lockfile; success) || failure
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
if [ -f $lockfile ]; then
|
||||
echo $"${prog} is running..."
|
||||
return 0
|
||||
else
|
||||
echo $"${prog} is stopped"
|
||||
return 3
|
||||
fi
|
||||
}
|
||||
|
||||
rh_status_q() {
|
||||
rh_status > /dev/null 2>&1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
$1
|
||||
;;
|
||||
stop)
|
||||
rh_status_q || exit 0
|
||||
$1
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
reload)
|
||||
exit 3
|
||||
;;
|
||||
force-reload)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit $?
|
||||
204
ufw.spec
204
ufw.spec
|
|
@ -1,13 +1,27 @@
|
|||
%if 0%{?fedora} >= 22 || 0%{?rhel} >= 8
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
|
||||
Name: ufw
|
||||
Version: 0.35
|
||||
Release: 41%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Uncomplicated Firewall
|
||||
|
||||
License: GPL-3.0-only
|
||||
License: GPLv3
|
||||
URL: https://launchpad.net/%{name}
|
||||
Source0: https://launchpad.net/%{name}/%{version}/%{version}/+download/ufw-%{version}.tar.gz
|
||||
# systemd service file
|
||||
Source1: ufw.service
|
||||
# System V init script file
|
||||
Source2: ufw.init
|
||||
# Install translations to the systemwide standard location for %%find_lang
|
||||
Patch0: ufw-0.35-trans-dir.patch
|
||||
# Separate libexec_dir from state_dir because the state files must go into /var,
|
||||
|
|
@ -36,23 +50,29 @@ Patch6: ufw-0.35-python36.patch
|
|||
Patch7: ufw-0.35-permissions.patch
|
||||
# Don't prepend /usr/bin/env to sys.executable, which is always an absolute path
|
||||
Patch8: ufw-0.35-no-pointless-env.patch
|
||||
# Switch to Python setuptools because Python 3.12 removed deprecated distutils
|
||||
Patch9: ufw-0.35-distutils-setuptools.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%else
|
||||
BuildRequires: python2-devel
|
||||
%endif
|
||||
BuildRequires: iptables
|
||||
BuildRequires: gettext
|
||||
%if %{with systemd}
|
||||
BuildRequires: systemd
|
||||
BuildRequires: make
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
Requires: systemd
|
||||
%else
|
||||
BuildRequires: iptables-ipv6
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service, /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
Requires: iptables-ipv6
|
||||
%endif
|
||||
Requires: iptables
|
||||
|
||||
%description
|
||||
|
|
@ -63,50 +83,83 @@ manipulating the firewall.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P0 -p1 -b .trans-dir
|
||||
%patch -P1 -p1 -b .libexec-dir
|
||||
%patch -P2 -p1 -b .default-enabled
|
||||
%patch -P3 -p1 -b .default-allow-ssh
|
||||
%patch -P4 -p1 -b .multicast
|
||||
%patch0 -p1 -b .trans-dir
|
||||
%patch1 -p1 -b .libexec-dir
|
||||
%patch2 -p1 -b .default-enabled
|
||||
%patch3 -p1 -b .default-allow-ssh
|
||||
%patch4 -p1 -b .multicast
|
||||
rm -f profiles/*.multicast
|
||||
%patch -P5 -p1 -b .additional-profiles
|
||||
%patch5 -p1 -b .additional-profiles
|
||||
rm -f profiles/*.additional-profiles
|
||||
%patch -P6 -p1 -b .python36
|
||||
%patch -P7 -p1 -b .permissions
|
||||
%patch -P8 -p1 -b .no-pointless-env
|
||||
%patch -P9 -p1 -b .distutils-setuptools
|
||||
|
||||
%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11
|
||||
# Unify /usr/bin and /usr/sbin
|
||||
sed -e "s/'sbin'/'bin'/" -i setup.py
|
||||
%endif
|
||||
%patch6 -p1 -b .python36
|
||||
%patch7 -p1 -b .permissions
|
||||
%patch8 -p1 -b .no-pointless-env
|
||||
|
||||
%build
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%else
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%else
|
||||
%py2_install
|
||||
%endif
|
||||
%if %{with systemd}
|
||||
install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service
|
||||
%else
|
||||
install -D -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
|
||||
%endif
|
||||
%find_lang %{name}
|
||||
|
||||
%post
|
||||
%if %{with systemd}
|
||||
%systemd_post ufw.service
|
||||
%else
|
||||
/sbin/chkconfig --add %{name}
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if %{with systemd}
|
||||
%systemd_preun ufw.service
|
||||
%else
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service %{name} stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del %{name}
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{with systemd}
|
||||
%systemd_postun_with_restart ufw.service
|
||||
%else
|
||||
if [ $1 -ne 0 ]; then
|
||||
/sbin/service %{name} condrestart > /dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files -f %{name}.lang
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license COPYING
|
||||
%doc ChangeLog README TODO AUTHORS
|
||||
%{_sbindir}/ufw
|
||||
%{_libexecdir}/ufw/
|
||||
%if %{with python3}
|
||||
%{python3_sitelib}/ufw-%{version}-py*.egg-info
|
||||
%{python3_sitelib}/ufw/
|
||||
%else
|
||||
%{python2_sitelib}/ufw-%{version}-py*.egg-info
|
||||
%{python2_sitelib}/ufw/
|
||||
%endif
|
||||
%{_datadir}/ufw/
|
||||
%if %{with systemd}
|
||||
%{_unitdir}/ufw.service
|
||||
%else
|
||||
%{_sysconfdir}/rc.d/init.d/%{name}
|
||||
%endif
|
||||
# config files under /etc, directly user-editable, should survive updates
|
||||
%dir %{_sysconfdir}/ufw/
|
||||
%config(noreplace) %{_sysconfdir}/ufw/after.init
|
||||
|
|
@ -130,108 +183,11 @@ install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/ufw.service
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-41
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
* Tue Jan 31 2017 Robert Scheck <robert@fedoraproject.org> 0.35-9
|
||||
- Adjust packaging to allow building for RHEL 6 and 7
|
||||
|
||||
* Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 0.35-40
|
||||
- Rebuilt for Python 3.15
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-39
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.35-38
|
||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
||||
|
||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.35-37
|
||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-36
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 0.35-35
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-33
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.35-32
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-31
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-30
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jun 15 2023 Robert Scheck <robert@fedoraproject.org> - 0.35-29
|
||||
- Switch from deprecated distutils to setuptools for Python 3.12
|
||||
|
||||
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.35-28
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-27
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.35-25
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-24
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.35-22
|
||||
- Rebuilt for Python 3.10
|
||||
|
||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.35-21
|
||||
- Rebuilt for updated systemd-rpm-macros
|
||||
See https://pagure.io/fesco/issue/2583.
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.35-18
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.35-16
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.35-15
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.35-11
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
* Wed Jan 19 2017 Helge Wiethoff <helge@nicht-laut.de> 0.35-8
|
||||
- Fix python2 build
|
||||
|
||||
* Tue Jan 03 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> 0.35-7
|
||||
- Bump Release for official build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue