Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/qutebrowser/
Date: Fri, 01 Apr 2022 17:46:50
Message-Id: 1648835196.e2f59199cbeb3897bb3089895b65c2a7f7d0a8c7.ionen@gentoo
1 commit: e2f59199cbeb3897bb3089895b65c2a7f7d0a8c7
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 1 17:20:45 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 1 17:46:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f59199
7
8 www-client/qutebrowser: add 2.5.0
9
10 This includes a workaround for CVE-2022-25255 wrt bug #833583
11
12 Bug: https://bugs.gentoo.org/833583
13 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
14
15 www-client/qutebrowser/Manifest | 1 +
16 www-client/qutebrowser/qutebrowser-2.5.0.ebuild | 122 ++++++++++++++++++++++++
17 2 files changed, 123 insertions(+)
18
19 diff --git a/www-client/qutebrowser/Manifest b/www-client/qutebrowser/Manifest
20 index 95272ae21135..b8f275d85467 100644
21 --- a/www-client/qutebrowser/Manifest
22 +++ b/www-client/qutebrowser/Manifest
23 @@ -1 +1,2 @@
24 DIST qutebrowser-2.4.0.tar.gz 6074001 BLAKE2B 9eda4a72b9050d6992681803b69778d954654fffd78aa524dfba9bddcbb8e54bd84e6725c30d826dddeb45b6b76e06d7401c7ad22d15a153b4cc1104e791cc84 SHA512 e4341a57a259a31e1c665eec34329594bb3d8390e3c612a15c1857ff12cb9e1f5b30954dd0cd91bee0a40ec0d97c59349ab7cd699626434a89c7d40e5dd961f7
25 +DIST qutebrowser-2.5.0.tar.gz 6086105 BLAKE2B c95afbbdfeebe4352e461cef78d499e9efa9de2e4acc2cedf350904bd617a4f238c34042369655030e53433f941288ff676f8ffd873683939ddd38ff01604aa1 SHA512 41ab6f6d2b72c94e0f66ba0a80999d820748d0f86dbec92583a2be88725f1ebd7517dd75edbaa0ce60bc029ed4dc0dd3e30a1cb25ab4ef940b968c87b4df2472
26
27 diff --git a/www-client/qutebrowser/qutebrowser-2.5.0.ebuild b/www-client/qutebrowser/qutebrowser-2.5.0.ebuild
28 new file mode 100644
29 index 000000000000..6e52913c8194
30 --- /dev/null
31 +++ b/www-client/qutebrowser/qutebrowser-2.5.0.ebuild
32 @@ -0,0 +1,122 @@
33 +# Copyright 1999-2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +DISTUTILS_SINGLE_IMPL=1
39 +DISTUTILS_USE_PEP517=setuptools
40 +PYTHON_COMPAT=( python3_{8..10} )
41 +inherit distutils-r1 optfeature xdg
42 +
43 +if [[ ${PV} == 9999 ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://github.com/qutebrowser/qutebrowser.git"
46 +else
47 + SRC_URI="https://github.com/qutebrowser/qutebrowser/releases/download/v${PV}/${P}.tar.gz"
48 + KEYWORDS="~amd64 ~arm64 ~x86"
49 +fi
50 +
51 +DESCRIPTION="Keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine"
52 +HOMEPAGE="https://www.qutebrowser.org/"
53 +
54 +LICENSE="GPL-3+"
55 +SLOT="0"
56 +IUSE="+adblock widevine"
57 +
58 +RDEPEND="
59 + dev-qt/qtcore:5[icu]
60 + dev-qt/qtgui:5[png]
61 + $(python_gen_cond_dep 'dev-python/importlib_resources[${PYTHON_USEDEP}]' python3_8)
62 + $(python_gen_cond_dep '
63 + dev-python/colorama[${PYTHON_USEDEP}]
64 + >=dev-python/jinja-3.0.2[${PYTHON_USEDEP}]
65 + >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}]
66 + dev-python/pygments[${PYTHON_USEDEP}]
67 + dev-python/PyQt5[${PYTHON_USEDEP},dbus,declarative,multimedia,gui,network,opengl,printsupport,sql,widgets]
68 + dev-python/PyQtWebEngine[${PYTHON_USEDEP}]
69 + dev-python/pyyaml[${PYTHON_USEDEP},libyaml(+)]
70 + dev-python/zipp[${PYTHON_USEDEP}]
71 + adblock? ( dev-python/adblock[${PYTHON_USEDEP}] )')
72 + widevine? ( www-plugins/chrome-binary-plugins )"
73 +BDEPEND="
74 + $(python_gen_cond_dep '
75 + test? (
76 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
77 + dev-python/cheroot[${PYTHON_USEDEP}]
78 + dev-python/flask[${PYTHON_USEDEP}]
79 + dev-python/hypothesis[${PYTHON_USEDEP}]
80 + dev-python/pytest-bdd[${PYTHON_USEDEP}]
81 + dev-python/pytest-mock[${PYTHON_USEDEP}]
82 + dev-python/pytest-qt[${PYTHON_USEDEP}]
83 + dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
84 + dev-python/pytest-xvfb[${PYTHON_USEDEP}]
85 + dev-python/tldextract[${PYTHON_USEDEP}]
86 + )')"
87 +[[ ${PV} != 9999 ]] || BDEPEND+=" app-text/asciidoc"
88 +
89 +distutils_enable_tests pytest
90 +
91 +python_prepare_all() {
92 + distutils-r1_python_prepare_all
93 +
94 + if use widevine; then
95 + local widevine=${EPREFIX}/usr/$(get_libdir)/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
96 + sed "/yield from _qtwebengine_settings_args/a\ yield '--widevine-path=${widevine}'" \
97 + -i ${PN}/config/qtargs.py || die
98 + fi
99 +
100 + # let eclass handle python
101 + sed -i '/setup.py/d' misc/Makefile || die
102 +
103 + [[ ${PV} != 9999 ]] || ${EPYTHON} scripts/asciidoc2html.py || die
104 +
105 + # these plugins/tests are unnecessary here and have extra dependencies
106 + sed -e '/pytest-benchmark/d;s/--benchmark[^ ]*//' \
107 + -e '/pytest-instafail/d;s/--instafail//' \
108 + -i pytest.ini || die
109 + [[ ${PV} == 9999 ]] || rm tests/unit/scripts/test_problemmatchers.py || die
110 + [[ ${PV} != 9999 ]] || rm tests/unit/scripts/test_run_vulture.py || die
111 +}
112 +
113 +python_test() {
114 + local EPYTEST_DESELECT=(
115 + # end2end and other IPC tests are broken with "Name error" if
116 + # socket path is over 104 characters (=124 in /var/tmp/portage)
117 + # https://github.com/qutebrowser/qutebrowser/issues/888 (not just OSX)
118 + tests/end2end
119 + tests/unit/misc/test_ipc.py
120 + # tests that don't know about our newer qtwebengine
121 + tests/unit/browser/webengine/test_webenginedownloads.py::TestDataUrlWorkaround
122 + tests/unit/utils/test_version.py::TestChromiumVersion
123 + # may misbehave depending on installed old python versions
124 + tests/unit/misc/test_checkpyver.py::test_old_python
125 + # bug 819393
126 + tests/unit/commands/test_userscripts.py::test_custom_env[_POSIXUserscriptRunner]
127 + )
128 + use widevine && EPYTEST_DESELECT+=( tests/unit/config/test_qtargs.py )
129 +
130 + # skip benchmarks (incl. _tree), and warning tests broken by -Wdefault
131 + epytest -k 'not _bench and not _matches_tree and not _warning'
132 +}
133 +
134 +python_install_all() {
135 + emake -f misc/Makefile DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
136 +
137 + rm "${ED}"/usr/share/${PN}/scripts/{mkvenv,utils}.py || die
138 + fperms -x /usr/share/${PN}/{scripts/cycle-inputs.js,userscripts/README.md}
139 + python_fix_shebang "${ED}"/usr/share/${PN}
140 +
141 + einstalldocs
142 +}
143 +
144 +pkg_postinst() {
145 + xdg_pkg_postinst
146 +
147 + optfeature "PDF display support" www-plugins/pdfjs
148 +
149 + if [[ ! ${REPLACING_VERSIONS} ]]; then
150 + elog "Note that optional scripts in ${EROOT}/usr/share/${PN}/{user,}scripts"
151 + elog "have additional dependencies not covered by this ebuild, for example"
152 + elog "view_in_mpv needs media-video/mpv[lua] and net-misc/yt-dlp."
153 + fi
154 +}