Source: yt-dlp Version: 2022.06.22.1-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that yt-dlp could not be built reproducibly. This is because it does not iterate over a Python set() data structure in a deterministic order. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/0005-Reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/0005-Reproducible-build.patch 2022-06-29 07:52:36.980838793 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2022-06-29 + +--- yt-dlp-2022.06.22.1.orig/devscripts/make_lazy_extractors.py ++++ yt-dlp-2022.06.22.1/devscripts/make_lazy_extractors.py +@@ -91,7 +91,7 @@ def sort_ies(ies, ignored_bases): + for c in classes[:]: + bases = set(c.__bases__) - {object, *ignored_bases} + restart = False +- for b in bases: ++ for b in sorted(bases, key=lambda x: x.__name__): + if b not in classes and b not in returned_classes: + assert b.__name__ != 'GenericIE', 'Cannot inherit from GenericIE' + classes.insert(0, b) --- a/debian/patches/series 2022-06-29 07:44:38.576411063 +0100 --- b/debian/patches/series 2022-06-29 07:51:47.433039603 +0100 @@ -2,3 +2,4 @@ 0002-Disable-upstream-s-autoupdate-mechanism.patch 0003-Remove-use-of-git.patch 0004-Makefile-Don-t-run-flake8-when-running-offlinetest.patch +0005-Reproducible-build.patch