automatic version update by autodist [release 26.04-1mamba;Thu Jun 19 2025]

This commit is contained in:
2025-06-20 10:21:47 +02:00
parent 0f845ea257
commit 6ff147f195
3 changed files with 7 additions and 144 deletions

View File

@ -1,21 +0,0 @@
diff -Nru gui-ufw-10.04.4.orig/Alacarte_menu/gufw.desktop gui-ufw-10.04.4/Alacarte_menu/gufw.desktop
--- gui-ufw-10.04.4.orig/Alacarte_menu/gufw.desktop 2010-04-11 09:53:33.000000000 +0200
+++ gui-ufw-10.04.4/Alacarte_menu/gufw.desktop 2010-07-08 20:48:09.000000000 +0200
@@ -2,7 +2,7 @@
Version=1.0
Type=Application
Terminal=false
-Exec=su-to-root -X -c /usr/share/gufw/gufw.py
+Exec=kdesu -c /usr/share/gufw/gufw.py
Name=Firewall configuration
Name[zh_CN]=防火墙配置
Name[uk]=Налаштування фаєрволу
diff -Nru gui-ufw-10.04.4.orig/global_command/gufw gui-ufw-10.04.4/global_command/gufw
--- gui-ufw-10.04.4.orig/global_command/gufw 2010-04-11 09:53:33.000000000 +0200
+++ gui-ufw-10.04.4/global_command/gufw 2010-07-08 20:42:29.000000000 +0200
@@ -1,4 +1,3 @@
#!/bin/bash
# This script starts Gufw from the console
-su-to-root -X -c /usr/share/gufw/gufw.py
-
+su -c /usr/share/gufw/gufw.py

View File

@ -1,6 +1,6 @@
%define majver %(echo %version | cut -d. -f1-2)
Name: gufw
Version: 24.04
Version: 26.04
Release: 1mamba
Summary: A graphical user interface for UFW
Group: System/Libraries/Python
@ -9,9 +9,8 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/costales/gufw
Source: https://github.com/costales/gufw.git/%{version}/gufw-%{version}.tar.bz2
Patch: gufw-10.04.4-su.patch
Patch1: gui-ufw-13.10.2-fix_ufw_path_in_backend.patch
License: GPL
BuildArch: noarch
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: python-distutils-extra-py3
@ -22,14 +21,13 @@ Requires: pygobject-py3
Requires: python-netifaces-py3
Requires: dconf
Provides: gui-ufw
Obsoletes: gui-ufw
Obsoletes: gui-ufw < 26.04
%description
A graphical user interface for UFW.
%prep
%setup -q
#%patch1 -p1
%build
%{__python3} setup.py build
@ -59,6 +57,7 @@ install -D -m0644 data/icons/scalable/apps/gufw.svg %{buildroot}%{_datadir}/pixm
%{_bindir}/gufw-pkexec
%{_datadir}/polkit-1/actions/com.ubuntu.pkexec.gufw.policy
%{_datadir}/applications/gufw.desktop
%{_metainfodir}/io.github.costales.gufw.metainfo.xml
%{_docdir}/gufw/*
%dir %{_datadir}/gufw
%{_datadir}/gufw/gufw-*-py3*.egg-info
@ -75,6 +74,9 @@ install -D -m0644 data/icons/scalable/apps/gufw.svg %{buildroot}%{_datadir}/pixm
%{_mandir}/man8/gufw.8*
%changelog
* Thu Jun 19 2025 Automatic Build System <autodist@openmamba.org> 26.04-1mamba
- automatic version update by autodist
* Thu Nov 02 2023 Automatic Build System <autodist@mambasoft.it> 24.04-1mamba
- automatic version update by autodist

View File

@ -1,118 +0,0 @@
diff -Nru gui-ufw-13.10.2.orig/gufw/backend.py gui-ufw-13.10.2/gufw/backend.py
--- gui-ufw-13.10.2.orig/gufw/backend.py 2013-07-30 15:47:48.000000000 +0200
+++ gui-ufw-13.10.2/gufw/backend.py 2013-08-13 15:22:12.434622370 +0200
@@ -20,7 +20,7 @@
class Backend():
def get_status(self):
- ufw_status = commands.getstatusoutput('LANGUAGE=C ufw status')
+ ufw_status = commands.getstatusoutput('LANGUAGE=C /usr/sbin/ufw status')
if 'Status: active' in ufw_status[1]:
return True
else:
@@ -60,47 +60,47 @@
def set_status(self, status):
if status:
- cmd = 'ufw --force enable'
+ cmd = '/usr/sbin/ufw --force enable'
else:
- cmd = 'ufw disable'
+ cmd = '/usr/sbin/ufw disable'
commands.getstatusoutput(cmd)
def set_policy(self, policy, value):
if policy == 'incoming':
if value == 'allow':
- cmd = 'ufw default allow incoming'
+ cmd = '/usr/sbin/ufw default allow incoming'
elif value == 'deny':
- cmd = 'ufw default deny incoming'
+ cmd = '/usr/sbin/ufw default deny incoming'
elif value == 'reject':
- cmd = 'ufw default reject incoming'
+ cmd = '/usr/sbin/ufw default reject incoming'
elif policy == 'outgoing':
if value == 'allow':
- cmd = 'ufw default allow outgoing'
+ cmd = '/usr/sbin/ufw default allow outgoing'
elif value == 'deny':
- cmd = 'ufw default deny outgoing'
+ cmd = '/usr/sbin/ufw default deny outgoing'
elif value == 'reject':
- cmd = 'ufw default reject outgoing'
+ cmd = '/usr/sbin/ufw default reject outgoing'
commands.getstatusoutput(cmd)
def set_ufw_logging(self, logging):
if logging == 'off':
- cmd = 'ufw logging off'
+ cmd = '/usr/sbin/ufw logging off'
elif logging == 'low':
- cmd = 'ufw logging low'
+ cmd = '/usr/sbin/ufw logging low'
elif logging == 'medium':
- cmd = 'ufw logging medium'
+ cmd = '/usr/sbin/ufw logging medium'
elif logging == 'high':
- cmd = 'ufw logging high'
+ cmd = '/usr/sbin/ufw logging high'
elif logging == 'full':
- cmd = 'ufw logging full'
+ cmd = '/usr/sbin/ufw logging full'
commands.getstatusoutput(cmd)
def reset_fw(self):
- cmd = 'ufw --force reset'
+ cmd = '/usr/sbin/ufw --force reset'
commands.getstatusoutput(cmd)
def get_config_value(self, attribute):
@@ -260,7 +260,7 @@
return cmd[1]
def get_rules(self):
- rules = commands.getstatusoutput('LANGUAGE=C ufw status numbered')
+ rules = commands.getstatusoutput('LANGUAGE=C /usr/sbin/ufw status numbered')
lines = rules[1].split('\n')
return_rules = []
@@ -297,14 +297,14 @@
# ufw [insert NUM] allow|deny|reject|limit [in|out] [log|log-all] PORT[/protocol]
# ufw &insert &policy &direction &logging &toPort/&proto
if to_port and not iface and not from_ip and not from_port and not to_ip:
- rule = 'ufw %s %s %s %s %s' % (insert, policy, direction, logging, to_port)
+ rule = '/usr/sbin/ufw %s %s %s %s %s' % (insert, policy, direction, logging, to_port)
if proto:
rule = '/'.join([rule, proto])
# Advanced rule
# ufw [insert NUM] allow|deny|reject|limit [in|out on INTERFACE] [log|log-all] [proto protocol] [from ADDRESS [port PORT]] [to ADDRESS [port PORT]]
# ufw &insert &policy &direction &iface &logging &proto &fromIP &fromPort &toIP &toPort
else:
- rule = 'ufw %s %s %s %s %s %s %s %s %s %s' % (insert, policy, direction, iface, logging, proto_aux, from_ip, from_port, to_ip, to_port)
+ rule = '/usr/sbin/ufw %s %s %s %s %s %s %s %s %s %s' % (insert, policy, direction, iface, logging, proto_aux, from_ip, from_port, to_ip, to_port)
rule = ' '.join(rule.split()) # Condense
cmd = commands.getstatusoutput(rule)
@@ -316,7 +316,7 @@
return result # cmd | ufw result
def delete_rule(self, num):
- delete_rule = 'ufw --force delete &number'.replace('&number', num)
+ delete_rule = '/usr/sbin/ufw --force delete &number'.replace('&number', num)
cmd = commands.getstatusoutput(delete_rule)
result = []
@@ -328,7 +328,7 @@
def get_listening_report(self):
return_report = []
actual_protocol = 'None'
- ufw_report = commands.getstatusoutput('LANGUAGE=C ufw show listening')
+ ufw_report = commands.getstatusoutput('LANGUAGE=C /usr/sbin/ufw show listening')
report_lines = ufw_report[1].replace('\n [','%')
report_lines = report_lines.split('\n')