public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/yt-dlp] rawhide: Enable support for yt-dlp-ejs (rhbz#2405578)
@ 2026-10-08 23:57 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-10-08 23:57 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/yt-dlp
Branch : rawhide
Commit : 57e25139289cded3ff02dae3171f7998e7a55f96
Author : Maxwell G <maxwell@gtmx.me>
Date   : 2026-10-08T18:07:09-05:00
Stats  : +22/-7 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/yt-dlp/c/57e25139289cded3ff02dae3171f7998e7a55f96?branch=rawhide

Log:
Enable support for yt-dlp-ejs (rhbz#2405578)

---
diff --git a/yt-dlp.conf b/yt-dlp.conf
new file mode 100644
index 0000000..f7c27b1
--- /dev/null
+++ b/yt-dlp.conf
@@ -0,0 +1 @@
+--js-runtimes node

diff --git a/yt-dlp.spec b/yt-dlp.spec
index fc58029..05409fd 100644
--- a/yt-dlp.spec
+++ b/yt-dlp.spec
@@ -4,7 +4,14 @@
 # SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
 # License text: https://spdx.org/licenses/MIT.html
 
-%bcond_without tests
+%bcond tests 1
+# Whether yt-dlp-ejs support is available.
+# We cannot build yt-dlp-ejs for Fedora 43 because the packaged esbuild version is too old.
+%bcond ejs %[ 0%{?fedora} >= 44 ]
+
+# Remove -s from shebang so users can install extra deps or plugins using pip.
+%undefine _py3_shebang_s
+
 
 Name:           yt-dlp
 Version:        2026.08.19
@@ -13,7 +20,8 @@ Summary:        A command-line program to download videos from online video plat
 
 License:        Unlicense
 URL:            https://github.com/yt-dlp/yt-dlp
-Source:         %{url}/archive/%{version}/yt-dlp-%{version}.tar.gz
+Source0:        %{url}/archive/%{version}/yt-dlp-%{version}.tar.gz
+Source1:        yt-dlp.conf
 
 # https://github.com/yt-dlp/yt-dlp/pull/17491
 # Relax handshake error regexp
@@ -64,13 +72,11 @@ additional features and fixes.
 %prep
 %autosetup -p1
 
-# TODO: Figure out https://bugzilla.redhat.com/show_bug.cgi?id=2405578
-# Users can configure JS challenges manually for now.
+# Filter out ejs if the bcond is disabled
+%if %{without ejs}
 tomcli set pyproject.toml arrays delitem \
     project.optional-dependencies.default 'yt-dlp-ejs.*'
-
-# Remove -s from shebang so users can install extra deps or plugins (or yt-dlp-ejs) using pip.
-%undefine _py3_shebang_s
+%endif
 
 # Remove unnecessary shebangs
 find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
@@ -92,6 +98,11 @@ make yt-dlp.1 completion-bash completion-zsh completion-fish
 %pyproject_install
 %pyproject_save_files yt_dlp
 
+# This is only relevant when ejs support is available.
+%if %{with ejs}
+install -Dpm 644 %{S:1} %{buildroot}%{_sysconfdir}/yt-dlp.conf
+%endif
+
 
 %check
 %if %{with tests}
@@ -101,6 +112,9 @@ make yt-dlp.1 completion-bash completion-zsh completion-fish
 
 %files -f %{pyproject_files}
 %doc README.md
+%if %{with ejs}
+%config(noreplace) %{_sysconfdir}/yt-dlp.conf
+%endif
 %license LICENSE
 %{_bindir}/yt-dlp
 %{_mandir}/man1/yt-dlp.1*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-08 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 23:57 [rpms/yt-dlp] rawhide: Enable support for yt-dlp-ejs (rhbz#2405578) Maxwell G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox