commit:     aa8cee6ca7bcc4363e548575a27c6fe548afe9e5
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 25 18:45:26 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 18:52:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa8cee6c

app-admin/salt: Revbumps, fix for pyzmq-23 (bug #859505)

Closes: https://bugs.gentoo.org/859505

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-admin/salt/files/salt-3004.2-pyzmq-23.patch    | 35 ++++++++++++++++++++++
 .../{salt-3003.5.ebuild => salt-3003.5-r1.ebuild}  |  1 +
 .../{salt-3004.2.ebuild => salt-3004.2-r1.ebuild}  |  1 +
 3 files changed, 37 insertions(+)

diff --git a/app-admin/salt/files/salt-3004.2-pyzmq-23.patch 
b/app-admin/salt/files/salt-3004.2-pyzmq-23.patch
new file mode 100644
index 000000000000..d912757ba7b8
--- /dev/null
+++ b/app-admin/salt/files/salt-3004.2-pyzmq-23.patch
@@ -0,0 +1,35 @@
+diff --git a/salt/log/handlers/logstash_mod.py 
b/salt/log/handlers/logstash_mod.py
+index bc462018f5..7e0d98c5ba 100644
+--- a/salt/log/handlers/logstash_mod.py
++++ b/salt/log/handlers/logstash_mod.py
+@@ -160,6 +160,8 @@ import logging
+ import logging.handlers
+ import os
+ 
++import zmq
++
+ import salt.utils.json
+ import salt.utils.network
+ import salt.utils.stringutils
+@@ -435,7 +437,7 @@ class ZMQLogstashHander(logging.Handler, 
NewStyleClassMixIn):
+                 # Above the defined high water mark(unsent messages), start
+                 # dropping them
+                 self._publisher.setsockopt(zmq.HWM, self._zmq_hwm)
+-            except AttributeError:
++            except (AttributeError, zmq.error.ZMQError):
+                 # In ZMQ >= 3.0, there are separate send and receive HWM
+                 # settings
+                 self._publisher.setsockopt(zmq.SNDHWM, self._zmq_hwm)
+diff --git a/salt/transport/zeromq.py b/salt/transport/zeromq.py
+index dc024d7eff..4c989095a5 100644
+--- a/salt/transport/zeromq.py
++++ b/salt/transport/zeromq.py
+@@ -902,7 +902,7 @@ class 
ZeroMQPubServerChannel(salt.transport.server.PubServerChannel):
+         try:
+             pub_sock.setsockopt(zmq.HWM, self.opts.get("pub_hwm", 1000))
+         # in zmq >= 3.0, there are separate send and receive HWM settings
+-        except AttributeError:
++        except (AttributeError, zmq.error.ZMQError):
+             # Set the High Water Marks. For more information on HWM, see:
+             # http://api.zeromq.org/4-1:zmq-setsockopt
+             pub_sock.setsockopt(zmq.SNDHWM, self.opts.get("pub_hwm", 1000))

diff --git a/app-admin/salt/salt-3003.5.ebuild 
b/app-admin/salt/salt-3003.5-r1.ebuild
similarity index 99%
rename from app-admin/salt/salt-3003.5.ebuild
rename to app-admin/salt/salt-3003.5-r1.ebuild
index c3ba4ac9a49e..e46b069a8edb 100644
--- a/app-admin/salt/salt-3003.5.ebuild
+++ b/app-admin/salt/salt-3003.5-r1.ebuild
@@ -114,6 +114,7 @@ PATCHES=(
        "${FILESDIR}/salt-3004.2-jinja-3.patch"
        "${FILESDIR}/salt-3003.4-tests.patch"
        "${FILESDIR}/salt-3003.4-relax-pyzmq-dep.patch"
+       "${FILESDIR}/salt-3004.2-pyzmq-23.patch"
 )
 
 python_prepare_all() {

diff --git a/app-admin/salt/salt-3004.2.ebuild 
b/app-admin/salt/salt-3004.2-r1.ebuild
similarity index 99%
rename from app-admin/salt/salt-3004.2.ebuild
rename to app-admin/salt/salt-3004.2-r1.ebuild
index dcc6f23bd8b9..373dd7c97624 100644
--- a/app-admin/salt/salt-3004.2.ebuild
+++ b/app-admin/salt/salt-3004.2-r1.ebuild
@@ -113,6 +113,7 @@ PATCHES=(
        "${FILESDIR}/salt-3004.1-relax-pyzmq-dep.patch"
        "${FILESDIR}/salt-3004.1-py310.patch"
        "${FILESDIR}/salt-3004.2-importlib.patch"
+       "${FILESDIR}/salt-3004.2-pyzmq-23.patch"
 )
 
 python_prepare_all() {

Reply via email to