summary refs log tree commit diff
path: root/gnu/packages/patches/calibre-fix-zeroconf.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-01-25 22:07:13 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-01-25 22:07:13 -0500
commit1a5302435ff0d2822b823f5a6fe01faa7a85c629 (patch)
treeac7810c88b560532f22d2bab2e59609cd7305c21 /gnu/packages/patches/calibre-fix-zeroconf.patch
parent3ff2ac4980dacf10087e4b42bd9fbc490591900c (diff)
parent070b8a893febd6e7d8b2b7c8c4dcebacf7845aa9 (diff)
downloadguix-1a5302435ff0d2822b823f5a6fe01faa7a85c629.tar.gz
Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in:
	gnu/local.mk
	gnu/packages/databases.scm
	gnu/packages/glib.scm
	gnu/packages/gnome.scm
	gnu/packages/gnupg.scm
	gnu/packages/gnuzilla.scm
	gnu/packages/graphics.scm
	gnu/packages/gstreamer.scm
	gnu/packages/gtk.scm
	gnu/packages/linux.scm
	gnu/packages/machine-learning.scm
	gnu/packages/networking.scm
	gnu/packages/polkit.scm
	gnu/packages/pulseaudio.scm
	gnu/packages/rpc.scm
	gnu/packages/rust.scm
	gnu/packages/version-control.scm
	gnu/packages/w3m.scm
Diffstat (limited to 'gnu/packages/patches/calibre-fix-zeroconf.patch')
-rw-r--r--gnu/packages/patches/calibre-fix-zeroconf.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/patches/calibre-fix-zeroconf.patch b/gnu/packages/patches/calibre-fix-zeroconf.patch
new file mode 100644
index 0000000000..d7d0f18667
--- /dev/null
+++ b/gnu/packages/patches/calibre-fix-zeroconf.patch
@@ -0,0 +1,38 @@
+Fix a build failure when upgrading zeroconf from 0.28.8 to 0.38.1:
+
+https://issues.guix.gnu.org/53247
+
+Patch copied from Gentoo:
+
+https://bugs.gentoo.org/800233#c5
+
+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_)
+