mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 14:43:27 -04:00
media-video/syncplay: add patch for >=dev-python/pyopenssl-26.2.0
Add patch for >=dev-python/pyopenssl-26.2.0, which removed deprecated APIs used in syncplay. Patch taken from https://github.com/Syncplay/syncplay/pull/775 Signed-off-by: Coral Pink <coral.pink@disr.it>
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
From 077f628d8ac9714f0c31a0d05b670bb8bda5ac24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Etoh <etoh@syncplay.pl>
|
||||||
|
Date: Thu, 7 May 2026 22:11:06 +0100
|
||||||
|
Subject: [PATCH] Support TLS on pyOpenSSL 26.2.0 (#774)
|
||||||
|
|
||||||
|
---
|
||||||
|
syncplay/protocols.py | 24 +++++++++++++++++++++---
|
||||||
|
1 file changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/syncplay/protocols.py b/syncplay/protocols.py
|
||||||
|
index 6554cb1..3e1d8b0 100755
|
||||||
|
--- a/syncplay/protocols.py
|
||||||
|
+++ b/syncplay/protocols.py
|
||||||
|
@@ -401,9 +401,27 @@ class SyncClientProtocol(JSONCommandProtocol):
|
||||||
|
self.sendHello()
|
||||||
|
return
|
||||||
|
|
||||||
|
- for x in range(0,self._serverCertificateTLS.get_extension_count()):
|
||||||
|
- if (self._serverCertificateTLS.get_extension(x).get_short_name() == b'subjectAltName'):
|
||||||
|
- self._subjectTLS = self._serverCertificateTLS.get_extension(x).__str__().replace("DNS:", "")
|
||||||
|
+ self._subjectTLS = ""
|
||||||
|
+ try:
|
||||||
|
+ from cryptography import x509
|
||||||
|
+ cryptographyCertificate = self._serverCertificateTLS.to_cryptography()
|
||||||
|
+ subjectAltName = cryptographyCertificate.extensions.get_extension_for_class(x509.SubjectAlternativeName).value
|
||||||
|
+ names = subjectAltName.get_values_for_type(x509.DNSName)
|
||||||
|
+ names = names + ["IP Address:{}".format(ipAddress) for ipAddress in subjectAltName.get_values_for_type(x509.IPAddress)]
|
||||||
|
+ self._subjectTLS = ", ".join([str(name) for name in names])
|
||||||
|
+ except Exception:
|
||||||
|
+ pass
|
||||||
|
+
|
||||||
|
+ if not self._subjectTLS:
|
||||||
|
+ try:
|
||||||
|
+ if hasattr(self._serverCertificateTLS, "get_extension_count") and hasattr(self._serverCertificateTLS, "get_extension"):
|
||||||
|
+ for x in range(0,self._serverCertificateTLS.get_extension_count()):
|
||||||
|
+ extension = self._serverCertificateTLS.get_extension(x)
|
||||||
|
+ if extension.get_short_name() == b'subjectAltName':
|
||||||
|
+ self._subjectTLS = str(extension).replace("DNS:", "")
|
||||||
|
+ break
|
||||||
|
+ except Exception:
|
||||||
|
+ pass
|
||||||
|
|
||||||
|
if not self._subjectTLS:
|
||||||
|
self._subjectTLS = self._client._config.get("host", "") or ""
|
||||||
|
--
|
||||||
|
2.53.0
|
||||||
|
|
||||||
78
media-video/syncplay/syncplay-1.7.5-r1.ebuild
Normal file
78
media-video/syncplay/syncplay-1.7.5-r1.ebuild
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# Copyright 2023-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{12..14} )
|
||||||
|
DISTUTILS_USE_PEP517=setuptools
|
||||||
|
DISTUTILS_SINGLE_IMPL=1
|
||||||
|
|
||||||
|
inherit desktop distutils-r1 optfeature xdg
|
||||||
|
|
||||||
|
DESCRIPTION="Client/server to synchronize media playback"
|
||||||
|
HOMEPAGE="https://github.com/Syncplay/syncplay https://syncplay.pl"
|
||||||
|
SRC_URI="https://github.com/${PN^}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
|
||||||
|
IUSE="+client server +gui"
|
||||||
|
REQUIRED_USE="|| ( client server )"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
$( python_gen_cond_dep \
|
||||||
|
'>=dev-python/certifi-2018.11.29[${PYTHON_USEDEP}]
|
||||||
|
>=dev-python/twisted-16.4.0[${PYTHON_USEDEP},ssl]
|
||||||
|
>=dev-python/pem-21.2.0[${PYTHON_USEDEP}]'
|
||||||
|
)
|
||||||
|
client? (
|
||||||
|
gui? (
|
||||||
|
$( python_gen_cond_dep \
|
||||||
|
'dev-python/qtpy[${PYTHON_USEDEP},gui,pyside6]'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|| (
|
||||||
|
media-video/vlc[lua]
|
||||||
|
media-video/mpv[lua]
|
||||||
|
media-video/mplayer
|
||||||
|
)
|
||||||
|
)
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}/${PN}-${PV}-Support-TLS-on-pyOpenSSL-26.2.0-774.patch" )
|
||||||
|
|
||||||
|
python_install() {
|
||||||
|
python_domodule syncplay
|
||||||
|
|
||||||
|
if use gui; then
|
||||||
|
for size in 256 128 96 64 48 32 24 16; do
|
||||||
|
doicon -s ${size} "${PN}/resources/hicolor/${size}x${size}/apps/syncplay.png"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if use client; then
|
||||||
|
python_newscript syncplayClient.py syncplay
|
||||||
|
if use gui; then
|
||||||
|
domenu syncplay/resources/syncplay.desktop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if use server; then
|
||||||
|
if use gui; then
|
||||||
|
domenu syncplay/resources/syncplay-server.desktop
|
||||||
|
fi
|
||||||
|
python_newscript syncplayServer.py syncplay-server
|
||||||
|
newinitd "${FILESDIR}/${PN}-server-init" "${PN}"
|
||||||
|
newconfd "${FILESDIR}/${PN}-server-init-conf" "${PN}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
xdg_pkg_postinst
|
||||||
|
|
||||||
|
if use client; then
|
||||||
|
optfeature_header "Syncplay is compatible with the following players, install:"
|
||||||
|
optfeature "VLC support" media-video/vlc[lua]
|
||||||
|
optfeature "MPV support" media-video/mpv[lua]
|
||||||
|
optfeature "MPlayer support" media-video/mplayer
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user