Bug 247873 - multimedia/ffmpeg: SVT patches are broken at fetch
Summary: multimedia/ffmpeg: SVT patches are broken at fetch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-09 13:44 UTC by Lev A. Serebryakov
Modified: 2020-07-22 11:32 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)


Attachments
Makefile port patch (2.18 KB, patch)
2020-07-11 13:52 UTC, Piotr Smyrak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2020-07-09 13:44:11 UTC
multimedia/ffmpeg could not be built from ports tree r541746 with SVT patches, it fails on fetch

$ make checksum
===>  License GPLv3+ LGPL3+ accepted by the user
===>   ffmpeg-4.3_3,1 depends on file: /usr/local/sbin/pkg - found
=> 0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch doesn't seem to exist in /usr/home/lev/FreeBSD/ports/distfiles/.
=> Attempting to fetch https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
fetch: https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch: Not Found
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
fetch: http://distcache.FreeBSD.org/ports-distfiles/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch: size mismatch: expected 24459, actual 23636
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/home/lev/FreeBSD/ports/distfiles/ and try again.
*** Error code 1
$
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2020-07-09 20:02:27 UTC
Confirmed failure on powerpc64 on FreeBSD.org cluster:

http://pylon.nyi.freebsd.org/data/head-powerpc64-default/p541162_s362914/logs/errors/ffmpeg-4.3_3,1.log

Also by manual attempt.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-07-09 20:02:50 UTC
Cc: most recent committer.
Comment 4 Carter 2020-07-11 03:22:58 UTC
(In reply to Lev A. Serebryakov from comment #0)


Same error happening to me. Trying to install x11/kde5 metaport using synth on new OS install.  
Makes kde/desktop install impossible

Investigating reveals patch removed.  See: https://github.com/OpenVisualCloud/SVT-HEVC/tree/master/ffmpeg_plugin

Patch possibly moved and renamed. See https://github.com/OpenVisualCloud/SVT-AV1/blob/master/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch
Comment 5 Jan Beich freebsd_committer freebsd_triage 2020-07-11 10:02:45 UTC
At the time of ports r540738 v0.8.4 referred both to a tag and a branch name. GitHub archive link used the branch which was 3 commits behind the tag. While one could define GH_TAGNAME pointing to the commit hash instead of a tag it'd have caused conflict with svt-vp9 patch because svt-av1 upstream deduplicated patches but not yet svt-vp9. Since then both svt-vp9 upstream caught up and svt-av1 upstream removed v0.8.4 branch.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2020-07-11 10:47:05 UTC
Cannot be fixed (without a lot of churn) yet because SVT-VP9 upstream introduced an incompatible change *before* fixing compatibility with SVT-AV1 v0.8.4. Unfortunately, after bug 246789 it's not possible to sacrifice only SVTVP9 option.

https://github.com/OpenVisualCloud/SVT-VP9/issues/124
Comment 7 Jan Beich freebsd_committer freebsd_triage 2020-07-11 11:07:01 UTC
Also, there's a Mk/* framework issue (not sure if it was reported before). "make fetch" shouldn't abort if upstream or one of the mirrors changed distfile. Instead fetch should gracefully skip (a la "Not Found") in favor of cached version on FreeBSD mirrors until port maintainer had a time to inspect the changes.
Comment 8 Piotr Smyrak 2020-07-11 13:52:19 UTC
Created attachment 216378 [details]
Makefile port patch

There seem to be more than a single upstream induced issue here. 

The fetch stage fails even when the SVT options are off. Moreover even if the patchset would be successfully fetched and in place with the SVT options set to off, the configure stage would fail since the usage of ${OPT}_CONFIGURE_ENABLE implies that the configure toggle is always present, meanwhile here it would be present only with the patch applied.

The attached patch changes the port Makefile making the patchsets fetched only when any of SVT options is on, and switches from ${OPT}_CONFIGURE_ENABLE to ${OPT}_CONFIGURE_ON to fix the latter issue. It does not address the upstream divergence, yet provides a way to work it.
Comment 9 Carter 2020-07-11 15:35:22 UTC
(In reply to Piotr Smyrak from comment #8)
 Is there any way to install x11/kde5 without multimedia/ffmpeg?  I take it that until the port patch is submitted that toggling the configure option to turn off the missing patches won't work either, much less downloading the deleted source?

Also, I realize this is FreeBSD and the version updates are slower in favor of stability, but is it possible to version bump this package (Coming from Gentoo here, which the fix would be to delete the port from the tree, remove the configure options, and either update the version number, or add _r1,_r2 etc at the end of the port name, and commit again)? 

Surely, I won't be the only one affected by this as every desktop environment user with any sort of "multimedia" usage will run into this bug.
Comment 10 commit-hook freebsd_committer freebsd_triage 2020-07-11 15:58:14 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jul 11 15:57:17 UTC 2020
New revision: 541984
URL: https://svnweb.freebsd.org/changeset/ports/541984

Log:
  multimedia/ffmpeg: properly update svt-av1 patch after r540738

  v0.8.4 raw link referred to a pre-release branch with the same name.

  $ make checksum TRYBROKEN= MASTER_SITE_BACKUP= DISTDIR=$(mktemp -dt distfiles)
  ===>  License GPLv3+ LGPL3+ accepted by the user
  ===>   ffmpeg-4.3_3,1 depends on file: /usr/local/sbin/pkg - found
  => ffmpeg-4.3.tar.xz doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://ffmpeg.org/releases/ffmpeg-4.3.tar.xz
  ffmpeg-4.3.tar.xz                                     9158 kB 3382 kBps    03s
  => 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/Intel/SVT-HEVC/raw/v1.4.3/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
  0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wra          21 kB  695 kBps    00s
  => 0002-doc-Add-libsvt_hevc-encoder-docs.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/Intel/SVT-HEVC/raw/v1.4.3/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch
  0002-doc-Add-libsvt_hevc-encoder-docs.patch           5332  B 5690 kBps    00s
  => 0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
  fetch: https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch: Not Found
  => Couldn't fetch it - please try to retrieve this
  => port manually into /tmp/distfiles.kl07C25q/ and try again.
  *** Error code 1

  Changes:	https://github.com/OpenVisualCloud/SVT-AV1/compare/f5f390ab3..v0.8.4
  PR:		247873

Changes:
  head/multimedia/ffmpeg/Makefile
  head/multimedia/ffmpeg/distinfo
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-07-11 16:00:18 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jul 11 15:59:32 UTC 2020
New revision: 541985
URL: https://svnweb.freebsd.org/changeset/ports/541985

Log:
  MFH: r541984

  multimedia/ffmpeg: properly update svt-av1 patch after r540738

  v0.8.4 raw link referred to a pre-release branch with the same name.

  $ make checksum TRYBROKEN= MASTER_SITE_BACKUP= DISTDIR=$(mktemp -dt distfiles)
  ===>  License GPLv3+ LGPL3+ accepted by the user
  ===>   ffmpeg-4.3_3,1 depends on file: /usr/local/sbin/pkg - found
  => ffmpeg-4.3.tar.xz doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://ffmpeg.org/releases/ffmpeg-4.3.tar.xz
  ffmpeg-4.3.tar.xz                                     9158 kB 3382 kBps    03s
  => 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/Intel/SVT-HEVC/raw/v1.4.3/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
  0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wra          21 kB  695 kBps    00s
  => 0002-doc-Add-libsvt_hevc-encoder-docs.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/Intel/SVT-HEVC/raw/v1.4.3/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch
  0002-doc-Add-libsvt_hevc-encoder-docs.patch           5332  B 5690 kBps    00s
  => 0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch doesn't seem to exist in /tmp/distfiles.kl07C25q/.
  => Attempting to fetch https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
  fetch: https://github.com/OpenVisualCloud/SVT-AV1/raw/v0.8.4/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch: Not Found
  => Couldn't fetch it - please try to retrieve this
  => port manually into /tmp/distfiles.kl07C25q/ and try again.
  *** Error code 1

  Changes:	https://github.com/OpenVisualCloud/SVT-AV1/compare/f5f390ab3..v0.8.4
  PR:		247873
  Approved by:	ports-secteam blanket (unbreak fetch)

Changes:
_U  branches/2020Q3/
  branches/2020Q3/multimedia/ffmpeg/Makefile
  branches/2020Q3/multimedia/ffmpeg/distinfo
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2020-07-22 11:06:43 UTC
Time to close?
Comment 13 Dan Langille freebsd_committer freebsd_triage 2020-07-22 11:32:48 UTC
Confirmed working here. Closing.