Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(yt-dlp): follow upstream versioning + rename package to -git #3042

Merged
merged 4 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions anda/tools/yt-dlp/anda.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
project pkg {
rpm {
spec = "yt-dlp-nightly.spec"
spec = "yt-dlp-git.spec"
}
labels {
nightly = "1"
mock = 1
}
}
10 changes: 3 additions & 7 deletions anda/tools/yt-dlp/update.rhai
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
if filters.contains("nightly") {
rpm.global("commit", gh_commit("yt-dlp/yt-dlp"));
if rpm.changed() {
rpm.global("ver", gh("yt-dlp/yt-dlp"));
rpm.global("commit_date", date());
rpm.release();
}
rpm.version(gh("yt-dlp/yt-dlp-master-builds"));
if rpm.changed() {
rpm.release();
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
#bcond_without tests
%global commit 164368610456e2d96b279f8b120dea08f7b1d74f
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20250117
%global ver 2025.01.15

Name: yt-dlp-nightly
Version: %commit_date.git~%shortcommit
Provides: yt-dlp-nightly = %ver^%version

Name: yt-dlp-git
Version: 2025.01.16.024033
Release: 1%?dist
Summary: A command-line program to download videos from online video platforms

License: Unlicense
URL: https://github.com/yt-dlp/yt-dlp
Source: %url/archive/%commit.tar.gz
# License of the specfile
Source: https://src.fedoraproject.org/rpms/yt-dlp/raw/rawhide/f/yt-dlp.spec.license

Expand All @@ -31,6 +25,8 @@ BuildRequires: %{py3_dist pytest}
BuildRequires: pandoc
BuildRequires: make

BuildRequires: anda-srpm-macros

# ffmpeg-free is now available in Fedora.
Recommends: /usr/bin/ffmpeg
Recommends: /usr/bin/ffprobe
Expand All @@ -39,12 +35,16 @@ Conflicts: yt-dlp

Suggests: python3dist(keyring)

Provides: yt-dlp-nightly = 1:0-1%?dist

Obsoletes: yt-dlp-nightly < 0:20250117.git~1643686-2%?dist

%global _description %{expand:
yt-dlp is a command-line program to download videos from many different online
video platforms, such as youtube.com. The project is a fork of youtube-dl with
additional features and fixes.}

%description %{_description}
%description %{_description}. This package is built from the yt-dlp master branch.

%package bash-completion
Summary: Bash completion for yt-dlp
Expand Down Expand Up @@ -83,13 +83,16 @@ Conflicts: yt-dlp-fish-completion
Fish command line completion support for %{name}.

%prep
%autosetup -n yt-dlp-%commit
%git_clone %{url} master

# Remove unnecessary shebangs
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
# Relax version constraints
sed -i 's@"\(requests\|urllib3\|websockets\)>=.*"@"\1"@' pyproject.toml

# Update version number
%{python3} devscripts/update-version.py %{version} -c master -r yt-dlp/yt-dlp-master-builds

%generate_buildrequires
%pyproject_buildrequires -r

Expand Down