From eae0efb2d9d00f69e79b13d57e190c0fc543b7a4 Mon Sep 17 00:00:00 2001 From: Joonas Niilola Date: Thu, 22 Oct 2020 09:37:21 +0300 Subject: media-video/yle-dl: reverse shlex.join on 2020-10-19 - shlex.join only works in >=python-3.8 and since our profile stable is still 3.7, the program may crash during runtime on stable users. Closes: https://bugs.gentoo.org/750536 Signed-off-by: Joonas Niilola --- .../files/yle-dl-20201019-reverse-shlex.join.patch | 20 ++++++++ media-video/yle-dl/yle-dl-20201019-r1.ebuild | 59 ++++++++++++++++++++++ media-video/yle-dl/yle-dl-20201019.ebuild | 57 --------------------- 3 files changed, 79 insertions(+), 57 deletions(-) create mode 100644 media-video/yle-dl/files/yle-dl-20201019-reverse-shlex.join.patch create mode 100644 media-video/yle-dl/yle-dl-20201019-r1.ebuild delete mode 100644 media-video/yle-dl/yle-dl-20201019.ebuild (limited to 'media-video/yle-dl') diff --git a/media-video/yle-dl/files/yle-dl-20201019-reverse-shlex.join.patch b/media-video/yle-dl/files/yle-dl-20201019-reverse-shlex.join.patch new file mode 100644 index 000000000000..5a8bf95cca76 --- /dev/null +++ b/media-video/yle-dl/files/yle-dl-20201019-reverse-shlex.join.patch @@ -0,0 +1,20 @@ +diff -Naur a/yledl/backends.py b/yledl/backends.py +--- a/yledl/backends.py 2020-10-19 20:08:38.000000000 +0300 ++++ b/yledl/backends.py 2020-10-22 09:28:16.493675080 +0300 +@@ -8,7 +8,6 @@ + import os.path + import platform + import signal +-import shlex + import subprocess + from builtins import str + from .exitcodes import RD_SUCCESS, RD_FAILED, RD_INCOMPLETE, \ +@@ -164,7 +163,7 @@ + return RD_SUCCESS + + logger.debug('Executing:') +- shell_command_string = ' | '.join(shlex.join(args) for args in commands) ++ shell_command_string = ' | '.join(' '.join(args) for args in commands) + logger.debug(shell_command_string) + + env = self.combine_envs(extra_environment) diff --git a/media-video/yle-dl/yle-dl-20201019-r1.ebuild b/media-video/yle-dl/yle-dl-20201019-r1.ebuild new file mode 100644 index 000000000000..a4bfbad91bf7 --- /dev/null +++ b/media-video/yle-dl/yle-dl-20201019-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 optfeature + +DESCRIPTION="Download media files from Yle Areena" +HOMEPAGE="https://aajanki.github.io/yle-dl/ https://github.com/aajanki/yle-dl" +SRC_URI="https://github.com/aajanki/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# Requires an active internet connection during tests, +# FEATURES="-network-sandbox" to test. +RESTRICT="test" + +RDEPEND="${PYTHON_DEPS} + media-video/ffmpeg + net-misc/wget + >=dev-python/attrs-18.1.0[${PYTHON_USEDEP}] + >=dev-python/configargparse-0.13.0[${PYTHON_USEDEP}] + dev-python/future[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/progress[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}]" +DEPEND="test? ( + ${RDEPEND} + media-video/ffmpeg[gnutls] + dev-python/pytest[${PYTHON_USEDEP}] + )" +BDEPEND="${PYTHON_DEPS}" + +distutils_enable_tests setup.py + +DOCS=( COPYING ChangeLog README.fi README.md yledl.conf.sample ) + +PATCHES=( "${FILESDIR}"/${P}-reverse-shlex.join.patch ) + +src_install() { + docompress -x "/usr/share/doc/${PF}/yledl.conf.sample" + distutils-r1_src_install +} + +pkg_postinst() { + elog "Sample configuration file has been installed to " + elog " /usr/share/doc/yle-dl-${PV}/yledl.conf.sample" + elog "" + elog "Optional download engines: " + optfeature "youtube-dl download engine" net-misc/youtube-dl +} diff --git a/media-video/yle-dl/yle-dl-20201019.ebuild b/media-video/yle-dl/yle-dl-20201019.ebuild deleted file mode 100644 index ec87a0a528ea..000000000000 --- a/media-video/yle-dl/yle-dl-20201019.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6..9} ) -DISTUTILS_USE_SETUPTOOLS=rdepend - -inherit distutils-r1 optfeature - -DESCRIPTION="Download media files from Yle Areena" -HOMEPAGE="https://aajanki.github.io/yle-dl/ https://github.com/aajanki/yle-dl" -SRC_URI="https://github.com/aajanki/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="test" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -# Requires an active internet connection during tests, -# FEATURES="-network-sandbox" to test. -RESTRICT="test" - -RDEPEND="${PYTHON_DEPS} - media-video/ffmpeg - net-misc/wget - >=dev-python/attrs-18.1.0[${PYTHON_USEDEP}] - >=dev-python/configargparse-0.13.0[${PYTHON_USEDEP}] - dev-python/future[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/progress[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}]" -DEPEND="test? ( - ${RDEPEND} - media-video/ffmpeg[gnutls] - dev-python/pytest[${PYTHON_USEDEP}] - )" -BDEPEND="${PYTHON_DEPS}" - -distutils_enable_tests setup.py - -DOCS=( COPYING ChangeLog README.fi README.md yledl.conf.sample ) - -src_install() { - docompress -x "/usr/share/doc/${PF}/yledl.conf.sample" - distutils-r1_src_install -} - -pkg_postinst() { - elog "Sample configuration file has been installed to " - elog " /usr/share/doc/yle-dl-${PV}/yledl.conf.sample" - elog "" - elog "Optional download engines: " - optfeature "youtube-dl download engine" net-misc/youtube-dl -} -- cgit v1.2.3-65-gdbad