commit:     73cfb269b0c2eab205f8a561887fe33cfff7cb96
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 22 07:40:23 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Oct 22 08:35:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73cfb269

net-misc/yt-dlp: add 2025.10.22_pre w/ WIP deno usage (unkeyworded)

For early testing esp. given a lot of users are impatient about this.
You can verify that deno is being used by running yt-dlp with `-v`:

    [debug] [youtube] [jsc:deno] Running deno: deno [...]

Be warned that this is still WIP upstream (PR not merged and marked as
Draft) with a lot of TODOs including for documentation, so use at your
own risks. It may also not necessarily magically fix issues if youtube
isn't working with normal releases for you, so keep your expectations
low.

Tarball is generated with a local script from what the PR is currently
based on and may be lacking some commits that are older than than this
version (aka it is not rebased).

Likely will not update this regularly unless there is a specific reason
to, so it may fall behind the PR until a proper release. Also no plans
to make this work with a live ebuild meanwhile.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 net-misc/yt-dlp/Manifest                     |   1 +
 net-misc/yt-dlp/metadata.xml                 |  13 +++
 net-misc/yt-dlp/yt-dlp-2025.10.22_pre.ebuild | 122 +++++++++++++++++++++++++++
 profiles/arch/amd64/package.use.mask         |   4 +
 profiles/arch/arm64/package.use.mask         |   4 +
 profiles/arch/base/package.use.mask          |   5 ++
 profiles/features/musl/package.use.mask      |   3 +-
 7 files changed, 151 insertions(+), 1 deletion(-)

diff --git a/net-misc/yt-dlp/Manifest b/net-misc/yt-dlp/Manifest
index 617a96d889bc..79dd1e863096 100644
--- a/net-misc/yt-dlp/Manifest
+++ b/net-misc/yt-dlp/Manifest
@@ -1,2 +1,3 @@
 DIST yt-dlp-2025.09.26.tar.gz 6011138 BLAKE2B 
a17d878de8d6154166d099acc8a1e12b78d3930b4fa3e427607ee6ef7967095d329257be694daed5bd09d6754ef5ecec43c6f29620de1316036a0b1bb11daf08
 SHA512 
a1fabb096ec134d102a61c33fbf68c5f1749a62cf56e82de627744166db02e7ecf239e5244a9d9c474f65ddab7e6168dd70369d5407f655f964d25bfd731cd2e
 DIST yt-dlp-2025.10.14.tar.gz 6024964 BLAKE2B 
25219b923be0f2368061fcdc88545f99150b6a9568e423280ffb0404eeaef2134549d627af19b72bb842b657c6023238d821caba7713d1deb78722631ce73629
 SHA512 
bbf0b5fd986f0cd5a90b8b30498b5d57c1afd0fbf78adf7731b04498cd3180d06637f7044e67c7eb6aaf36b5a2ec2b7cee64baa1ad2730c340304699cb048936
+DIST yt-dlp-2025.10.22_pre.tar.xz 4802368 BLAKE2B 
3c32845754584b207639eb1e1d0ca2b003ed9e40a5b5c803dd48fdc54c9c45ce3d16b059b838a1a40b22ca8a6284066c6d460cd055363008a4afeb8d17d56a9c
 SHA512 
fb63407a313bd7912aafff7cde5a6a829358dd31b55eccb57fb85da82bcd942cd4587569925dd0510debf6b6214c7e9763df8e4a5876aad1603dab3aaa07b9fd

diff --git a/net-misc/yt-dlp/metadata.xml b/net-misc/yt-dlp/metadata.xml
index 27010be612e8..597c3a97fb41 100644
--- a/net-misc/yt-dlp/metadata.xml
+++ b/net-misc/yt-dlp/metadata.xml
@@ -6,6 +6,19 @@
                <name>Ionen Wolkens</name>
        </maintainer>
        <stabilize-allarches/>
+       <use>
+               <flag name="deno">
+                       (warning: this USE is for testing versions only
+                       currently and can be ignored at the moment)
+
+                       Pull in <pkg>dev-lang/deno-bin</pkg> by default
+                       needed for proper YouTube support (if this USE
+                       is masked on your profile, refer to yt-dlp's
+                       documentation for lesser supported alternatives
+                       which are not supported out-of-the-box due to
+                       security concerns)
+               </flag>
+       </use>
        <upstream>
                <remote-id type="github">yt-dlp/yt-dlp</remote-id>
                <remote-id type="pypi">yt-dlp</remote-id>

diff --git a/net-misc/yt-dlp/yt-dlp-2025.10.22_pre.ebuild 
b/net-misc/yt-dlp/yt-dlp-2025.10.22_pre.ebuild
new file mode 100644
index 000000000000..fa99028b2dc6
--- /dev/null
+++ b/net-misc/yt-dlp/yt-dlp-2025.10.22_pre.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
+inherit distutils-r1 optfeature shell-completion wrapper
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/yt-dlp/yt-dlp.git";
+else
+       SRC_URI="https://dev.gentoo.org/~ionen/distfiles/${P}.tar.xz";
+       S=${WORKDIR}/${PN}
+       # note that yt-dlp bumps are typically done straight-to-stable (unless 
some
+       # major/breaking changes) given website changes breaks it on a whim
+       # (unkeyworded for testing PR14517 with external n/sig solver)
+       # TODO for release version:
+       # - revert SRC_URI
+       # - drop warning from metadata.xml's USE=deno description
+       # - replace workaround `rm -rf` by `rm -r` in src_install
+       #KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~riscv x86 ~arm64-macos 
~x64-macos"
+fi
+
+DESCRIPTION="youtube-dl fork with additional features and fixes"
+HOMEPAGE="https://github.com/yt-dlp/yt-dlp/";
+
+LICENSE="Unlicense"
+SLOT="0"
+IUSE="+deno"
+
+# deno is technically a optfeature, but it is needed for proper YouTube
+# support and most users would expect that to work out-of-the-box
+# (there are alternatives like nodejs but upstream disables support by
+# default due to security concerns, users are on their own for these)
+#
+# yt-dlp-ejs requires pinning due to yt-dlp checking sha512sum of .js,
+# may need to use the self-updater method in live ebuild if out of sync
+# as there is on plans for a yt-dlp-ejs live ebuild at the moment
+RDEPEND="
+       dev-python/pycryptodome[${PYTHON_USEDEP}]
+       ~dev-python/yt-dlp-ejs-0.1.0[${PYTHON_USEDEP}]
+       deno? ( dev-lang/deno-bin )
+"
+BDEPEND="
+       test? ( media-video/ffmpeg[webp] )
+"
+
+if [[ ${PV} == 9999 ]]; then
+       IUSE+=" man"
+       BDEPEND+=" man? ( virtual/pandoc )"
+fi
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+python_compile() {
+       if [[ ${PV} == 9999 ]]; then
+               # generate missing files in live, not in compile_all nor prepare
+               # given need lazy before compile and it needs a usable ${PYTHON}
+               emake completions lazy-extractors $(usev man yt-dlp.1)
+
+               "${EPYTHON}" devscripts/update-version.py || die
+       fi
+
+       distutils-r1_python_compile
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # fails with FEATURES=network-sandbox
+               
test/test_networking.py::TestHTTPRequestHandler::test_connect_timeout
+               # fails with FEATURES=distcc, bug #915614
+               
test/test_networking.py::TestYoutubeDLNetworking::test_proxy\[None-expected2\]
+               # websockets tests break easily depending on 
dev-python/websockets
+               # version and, as far as I know, most users do not use/need it 
--
+               # thus being neither in RDEPEND nor optfeature (bug 
#940630,#950030)
+               test/test_websockets.py
+       )
+
+       epytest -m 'not download'
+}
+
+python_install_all() {
+       dodoc README.md Changelog.md supportedsites.md
+
+       if [[ ${PV} == 9999 ]]; then
+               use man && doman yt-dlp.1
+       else
+               doman yt-dlp.1
+               rm -rf -- "${ED}"/usr/share/doc/yt_dlp || die
+       fi
+
+       dobashcomp completions/bash/yt-dlp
+       dofishcomp completions/fish/yt-dlp.fish
+       dozshcomp completions/zsh/_yt-dlp
+
+       make_wrapper youtube-dl "yt-dlp --compat-options youtube-dl"
+}
+
+pkg_postinst() {
+       optfeature "various features (merging tracks, streamed content)" 
media-video/ffmpeg
+       has_version media-video/atomicparsley || # allow fallback but don't 
advertise
+               optfeature "embedding metadata thumbnails in MP4/M4A files" 
media-libs/mutagen
+       optfeature "decrypting cookies from Chromium-based browsers" 
dev-python/secretstorage
+
+       if [[ ! ${REPLACING_VERSIONS} ]]; then
+               elog
+               elog 'A wrapper using "yt-dlp --compat-options youtube-dl" was 
installed'
+               elog 'as "youtube-dl". This is strictly for compatibility and 
it is'
+               elog 'recommended to use "yt-dlp" directly, it may be removed 
in the future.'
+       fi
+
+       if use !deno; then
+               ewarn
+               ewarn "USE=deno is disabled, using ${PN} with some websites 
like YouTube may"
+               ewarn "not function properly. If your profile does not allow 
enabling this USE,"
+               ewarn "can use net-libs/nodejs instead but it is disabled by 
default due to"
+               ewarn "security concerns and requires manually passing 
'--js-runtimes node'."
+       fi
+}

diff --git a/profiles/arch/amd64/package.use.mask 
b/profiles/arch/amd64/package.use.mask
index aac242e094c4..e8291711a6d1 100644
--- a/profiles/arch/amd64/package.use.mask
+++ b/profiles/arch/amd64/package.use.mask
@@ -17,6 +17,10 @@
 
 #--- END OF EXAMPLES ---
 
+# Ionen Wolkens <[email protected]> (2025-10-22)
+# dev-lang/deno-bin is keyworded here
+net-misc/yt-dlp -deno
+
 # Paul Zander <[email protected]> (2025-06-29)
 # media-libs/libvmaf is keyworded
 media-libs/x265 -vmaf

diff --git a/profiles/arch/arm64/package.use.mask 
b/profiles/arch/arm64/package.use.mask
index 0d0132c76d75..ac268808d62a 100644
--- a/profiles/arch/arm64/package.use.mask
+++ b/profiles/arch/arm64/package.use.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Ionen Wolkens <[email protected]> (2025-10-22)
+# dev-lang/deno-bin is keyworded here
+net-misc/yt-dlp -deno
+
 # Paul Zander <[email protected]> (2025-10-18)
 # media-libs/libvmaf is keyworded
 media-libs/x265 -vmaf

diff --git a/profiles/arch/base/package.use.mask 
b/profiles/arch/base/package.use.mask
index f7dee5cd1ffc..bda3e71dc6a6 100644
--- a/profiles/arch/base/package.use.mask
+++ b/profiles/arch/base/package.use.mask
@@ -1,6 +1,11 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Ionen Wolkens <[email protected]> (2025-10-21)
+# Uses dev-lang/deno-bin which offers limited per-arch prebuilts
+# (source build is currently unpackaged and is non-trivial due to v8)
+net-misc/yt-dlp deno
+
 # Paul Zander <[email protected]> (2025-06-29)
 # libvmaf has limited keywords
 media-libs/x265 vmaf

diff --git a/profiles/features/musl/package.use.mask 
b/profiles/features/musl/package.use.mask
index f79c338a77c0..c4b5b2ab3775 100644
--- a/profiles/features/musl/package.use.mask
+++ b/profiles/features/musl/package.use.mask
@@ -169,8 +169,9 @@ media-libs/opencv atlas
 media-video/ffmpeg amf
 media-video/ffmpeg-compat amf
 media-video/handbrake amf
-net-fs/openafs tsm
 net-analyzer/nagios-plugin-check_raid megaraid-sas
+net-fs/openafs tsm
+net-misc/yt-dlp deno
 sys-apps/hwloc gl
 www-client/qutebrowser widevine
 

Reply via email to