Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.41k stars 12.19k forks source link

[youtube-dl] Update package to nightly versions #176570

Open superbonaci opened 1 week ago

superbonaci commented 1 week ago

brew doctor output

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  youtube-dl

Verification

brew config output

brew config
HOMEBREW_VERSION: 4.3.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: e5f776b3e23cae8f1b6c3d1194b8329bf701965f
Last commit: 6 days ago
Core tap JSON: 06 Jul 19:43 UTC
Core cask tap JSON: 06 Jul 19:43 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: ["--no-quarantine"]
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.2 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false

What were you trying to do (and why)?

Install a newer version of youtube-dl. Since a few years, only nightlies are offered for legal reasons, so there won't be any stable release soon.

What happened (include all command output)?

not available.

What did you expect to happen?

youtube-dl is offering nightlies, which are far superior to latest version offered by brew: https://github.com/ytdl-org/ytdl-nightly/releases

They can't be used as is, since they are hard coded to work with python, not python3 (the only one supported on macOS 14), so they require to be re-compiled with that in mind.

A feature request has been already sent but brew.sh could do that instead: https://github.com/ytdl-org/youtube-dl/issues/30129#issuecomment-2201994087

Step-by-step reproduction instructions (by running brew commands)

not available.
iMichka commented 1 week ago

Transferred issue to https://github.com/Homebrew/homebrew-core

superbonaci commented 1 week ago

Thanks for moving, didn't know where to put it.

iMichka commented 1 week ago

I think we could accept a new youtube-dl-nightly formula. It's not a big deal that it is a nightly build, as long as it gets a tag. We might need to throttle the updates though because we might not be interested to run a daily rebuild on our side.

Looks like AUR already did this: https://repology.org/project/youtube-dl-nightly/versions https://repology.org/project/youtube-dl/versions

Regarding python; I did not read everything in detail but we can probably work around this with some shebang rewrite. We do that in other formulae.

And if there are some legal risks regarding shipping this package for homebrew: the @Homebrew/tsc might need to have a look at this

superbonaci commented 1 week ago

At least the website don't allow to download the latest stable: https://ytdl-org.github.io/youtube-dl/download.html

$ curl -L https://yt-dl.org/downloads/latest/youtube-dl -o -
<h1>Access denied</h1>

<p>
  Due to a <a href="https://openjur.de/u/2466945.html" target="_blank">ruling</a> of the Hamburg Regional Court, access to this website is blocked.
</p>

<hr />

<h1>Zugriff gesperrt</h1>

<p>
  Aufgrund eines <a href="https://openjur.de/u/2466945.html" target="_blank">Urteils</a> des Landgerichts Hamburg ist der Zugriff auf diese Website gesperrt.
</p>
superbonaci commented 1 week ago

The shebang will have to be adapte for each macOS version, but at least latest macOS has python3 only, not python1 or python2, and I don't think should be a good idea have any as dependency, just use:

/opt/homebrew/bin/python3
/usr/local/bin/python3
/usr/bin/python3
MikeMcQuaid commented 1 week ago

Do we have any other formulae we've published nightly versions for?

It instead sounds to me like youtube-dl itself should probably be either updated to a random nightly version or just removed entirely if they are no longer tagging releases.

superbonaci commented 1 week ago

There's no difference in "quality" between nightlies and tagged releases, so just pick any nightly as your stable. There are at least 5 nightlies already in brew.sh:

  1. https://formulae.brew.sh/cask/1password@nightly
  2. https://formulae.brew.sh/cask/adguard-vpn@nightly
  3. https://formulae.brew.sh/cask/adguard@nightly
  4. https://formulae.brew.sh/cask/arduino-ide@nightly
  5. https://formulae.brew.sh/cask/brave-browser@nightly
SMillerDev commented 1 week ago

Those are casks (precompiled binaries) while youtube-dl is a formula (source build). There is only one formula that is sort of a nightly, it's luajit.

carlocab commented 1 week ago

There is only one formula that is sort of a nightly, it's luajit.

Emphasis on sort of. We follow upstream's version strategy now: http://luajit.org/status.html

MikeMcQuaid commented 1 week ago

There's no difference in "quality" between nightlies and tagged releases, so just pick any nightly as your stable.

@superbonaci I'd like to see an upstream citation before we rely on that, sorry.

There is only one formula that is sort of a nightly, it's luajit.

Given --HEAD exists: I am even less inclined to introduce a youtube-dl-nightly now.

Bo98 commented 1 week ago

Something recent Debian/Ubuntu/etc has done instead is just replace phase out youtube-dl entirely in favour of yt-dlp.

We've already deprecated youtube-dl ourselves, though we don't currently point yt-dlp in that deprecation message.

Looks like AUR already did this

AUR ships many git snapshot packages - their policies are quite different. However even they didn't replace youtube-dl regular with it.

The only package that has updated the main package to something newer is Fedora, though they use git snapshots instead of nightlies and still recommend using yt-dlp instead

MikeMcQuaid commented 1 week ago

We've already deprecated youtube-dl ourselves, though we don't currently point yt-dlp in that deprecation message.

If it's deprecated: let's not make any more changes.