added patch against python-zeroconf 0.36.7 [release 5.22.1-2mamba;Tue Oct 05 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 21:05:20 +01:00
parent ff6ea4d7fc
commit 43ed981aba
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
diff --color -Naru a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
--- a/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:32:03.104016444 +0200
+++ b/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:33:30.699018403 +0200
@@ -2040,13 +2040,6 @@
# Function to monkeypatch zeroconf to remove the 15 character name length restriction.
# Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1
-
-from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
- _HAS_ASCII_CONTROL_CHARS,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
-
-
def service_type_name(type_: str, *, allow_underscores: bool = False) -> str:
"""
Validate a fully qualified service name, instance or subtype. [rfc6763]
@@ -2087,6 +2080,12 @@
:param type_: Type, SubType or service name to validate
:return: fully qualified service name (eg: _http._tcp.local.)
"""
+
+ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
+ _HAS_ASCII_CONTROL_CHARS,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
+
if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')):
raise BadTypeInNameException("Type '%s' must end with '._tcp.local.' or '._udp.local.'" % type_)

View File

@ -1,6 +1,6 @@
Name: calibre
Version: 5.22.1
Release: 1mamba
Release: 2mamba
Summary: A free and open source e-book library management application
Group: Graphical Desktop/Applications/Multimedia
Vendor: openmamba
@ -15,6 +15,7 @@ Patch2: calibre-0.7.59-libpng-1.5.patch
Patch3: calibre-0.7.50-python-lxml.patch
Patch4: calibre-5.10.1-slug-build-fix.patch
Patch5: calibre-5.16.0-python-3.7.patch
Patch6: calibre-5.22.1-python-zeroconf-0.36.7.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -104,6 +105,7 @@ calibre is a free and open source e-book library management application develope
#:<< _EOF
#%patch4 -p1
%patch5 -p1
%patch6 -p1
# Use uppercase naming scheme, don't delete config files under fakeroot.
sed -e "/import config_dir/,/os.rmdir(config_dir)/d" \
-e "s/'ctc-posml'/'text' not in mt and 'pdf' not in mt and 'xhtml'/" \
@ -214,6 +216,9 @@ install -d %{buildroot}%{_datadir}/zsh/site-functions
%{python3_sitelib}/init_calibre.py
%changelog
* Tue Oct 05 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.22.1-2mamba
- added patch against python-zeroconf 0.36.7
* Sat Jun 26 2021 Automatic Build System <autodist@mambasoft.it> 5.22.1-1mamba
- automatic version update by autodist