summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2024-01-23 00:29:48 +0000
committerDave Hibberd <d@vehibberd.com>2024-01-23 00:29:48 +0000
commitbd933b3c7d6b702bebb123511ad55adea01fe102 (patch)
tree338699f41163fb2a9727537d4867547424e2dade /debian/patches
parentf5e142a4e54bfda24bec40e923c643b434948a04 (diff)
parent7d3d9d4a1808ea0a76a3263a91de7eee892b42cc (diff)
Merge branch 'master' into 'master'
Master See merge request debian-hamradio-team/chirp!4
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/02-fix-setup-py.patch2
-rw-r--r--debian/patches/08-disable-incorrect-mime-type15
-rw-r--r--debian/patches/desktop-file.patch4
-rw-r--r--debian/patches/remove-future.patch70
-rw-r--r--debian/patches/series2
5 files changed, 74 insertions, 19 deletions
diff --git a/debian/patches/02-fix-setup-py.patch b/debian/patches/02-fix-setup-py.patch
index ea7e5f3..6b83f5c 100644
--- a/debian/patches/02-fix-setup-py.patch
+++ b/debian/patches/02-fix-setup-py.patch
@@ -4,7 +4,7 @@ Last-Update: 2023-10-28
---
--- a/setup.py
+++ b/setup.py
-@@ -20,7 +20,6 @@
+@@ -20,7 +20,6 @@ setup(name='chirp',
'wx': ['wxPython'],
},
entry_points={
diff --git a/debian/patches/08-disable-incorrect-mime-type b/debian/patches/08-disable-incorrect-mime-type
deleted file mode 100644
index 2ba327d..0000000
--- a/debian/patches/08-disable-incorrect-mime-type
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Removes inode/directory mimetype from chirp.desktop
- This avoids registering chirp as the default application for opening directories, conflicting with default file browsers.
-Author: Ana Custura <ana@netstat.org.uk>
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/chirp/share/chirp.desktop
-+++ b/chirp/share/chirp.desktop
-@@ -7,7 +7,6 @@
- Icon=chirp
- Exec=chirpw %F
- Terminal=false
--MimeType=inode/directory
- Categories=Utility;HamRadio
- Keywords=Hamradio;Programming;Handheld;Radio;Amateur;Programmer
- StartupNotify=true
diff --git a/debian/patches/desktop-file.patch b/debian/patches/desktop-file.patch
index 9e362b4..d5fc4ef 100644
--- a/debian/patches/desktop-file.patch
+++ b/debian/patches/desktop-file.patch
@@ -5,12 +5,12 @@ Last-Update: 2023-10-28
---
--- a/chirp/share/chirp.desktop
+++ b/chirp/share/chirp.desktop
-@@ -5,7 +5,7 @@
+@@ -5,7 +5,7 @@ Name=CHIRP
GenericName=Radio Programming Tool
Comment=Program amateur radios
Icon=chirp
-Exec=chirp %F
+Exec=chirpw %F
Terminal=false
- MimeType=inode/directory
+ MimeType=x-scheme-handler/chirp
Categories=Utility;HamRadio
diff --git a/debian/patches/remove-future.patch b/debian/patches/remove-future.patch
new file mode 100644
index 0000000..553775b
--- /dev/null
+++ b/debian/patches/remove-future.patch
@@ -0,0 +1,70 @@
+Description: Replacement for python3-future.
+Author: Yogeswaran Umasankar <kd8mbd@gmail.com>
+Last-Update: 2024-01-19
+
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -2,7 +2,6 @@ six
+ wxPython>=4.0,<4.2.0 ; platform_system=="Linux" # See https://github.com/wxWidgets/Phoenix/issues/2225
+ wxPython==4.2.0 ; platform_system!="Linux"
+ pyserial
+-future
+ requests
+ pywin32; platform_system=="Windows"
+ suds
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,6 @@ setup(name='chirp',
+ 'pyserial',
+ 'requests',
+ 'six',
+- 'future',
+ 'importlib-resources;python_version<"3.10"',
+ 'yattag',
+ ],
+--- a/test-requirements.txt
++++ b/test-requirements.txt
+@@ -5,7 +5,6 @@ pytest-html
+ six
+ pep8
+ pyserial
+-future
+ requests
+ pyyaml
+ pywin32; platform_system=="Windows"
+--- a/chirp/chirp_common.py
++++ b/chirp/chirp_common.py
+@@ -14,7 +14,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ from builtins import bytes
+-from future import standard_library
++#from future import standard_library
+
+ import base64
+ import json
+@@ -1959,17 +1959,19 @@ def http_user_agent():
+ def urlretrieve(url, fn):
+ """Grab an URL and save it in a specified file"""
+
+- standard_library.install_aliases()
++ #standard_library.install_aliases()
+ import urllib.request
+- import urllib.error
++ from urllib.error import URLError, HTTPError
+
+ headers = {
+ 'User-Agent': http_user_agent(),
+ }
+ req = urllib.request.Request(url, headers=headers)
+- resp = urllib.request.urlopen(req)
+- with open(fn, 'wb') as f:
+- f.write(resp.read())
++
++ try:
++ urllib.request.urlretrieve(req, fn)
++ except (URLError, HTTPError) as e:
++ print(f"Error downloading {url}: {e}")
+
+
+ def mem_from_text(text):
diff --git a/debian/patches/series b/debian/patches/series
index 6558b3f..8522c24 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
+remove-future.patch
desktop-file.patch
02-fix-setup-py.patch
wxui-chirp-share.patch
distutils-migration.patch
07-disable-reporting.patch
-08-disable-incorrect-mime-type