From e92cd356c9cac89769a51a8b83591065cac724e252fd5e6a0ff90dfdec18308e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Tue, 4 Jul 2017 18:34:51 +0000 Subject: [PATCH 1/2] Accepting request 506954 from home:bmwiedemann:reproducible:test Add reproducible.patch to sort input file lists to fix indeterminism in gstreamer and vte html docs OBS-URL: https://build.opensuse.org/request/show/506954 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk-doc?expand=0&rev=47 --- gtk-doc.changes | 6 ++++ gtk-doc.spec | 3 ++ reproducible.patch | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 reproducible.patch diff --git a/gtk-doc.changes b/gtk-doc.changes index 5442528..0d6cfd2 100644 --- a/gtk-doc.changes +++ b/gtk-doc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 29 08:14:06 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort input file lists + to fix indeterminism in gstreamer and vte html docs + ------------------------------------------------------------------- Wed Jun 1 16:53:10 UTC 2016 - jengelh@inai.de diff --git a/gtk-doc.spec b/gtk-doc.spec index 6f5faae..0d5153e 100644 --- a/gtk-doc.spec +++ b/gtk-doc.spec @@ -24,6 +24,8 @@ License: GPL-2.0+ Group: Productivity/Publishing/SGML Url: http://www.gtk.org/gtk-doc/ Source: http://download.gnome.org/sources/gtk-doc/1.25/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM https://bugzilla.gnome.org/show_bug.cgi?id=784177 +Patch0: reproducible.patch # When updating this package, please don't forget to update the gtk-doc.m4 Source # in glib2. BuildRequires: docbook-xsl-stylesheets @@ -56,6 +58,7 @@ generate the documentation for GLib, Gtk+, and GNOME. %lang_package %prep %setup -q +%patch0 -p1 %build %configure --disable-scrollkeeper diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..f1cd021 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,79 @@ +sort directory listings + +because ordering matters in some places +when we want to generate reproducible results + +to fix https://bugzilla.gnome.org/show_bug.cgi?id=784177 + +See also https://reproducible-builds.org/docs/stable-inputs/ on that topic + +Index: gtk-doc-1.25/gtkdoc-scan.in +=================================================================== +--- gtk-doc-1.25.orig/gtkdoc-scan.in ++++ gtk-doc-1.25/gtkdoc-scan.in +@@ -223,7 +223,7 @@ sub ScanHeaders { + opendir (SRCDIR, $source_dir) + || die "Can't open source directory $source_dir: $!"; + my $file; +- foreach $file (readdir (SRCDIR)) { ++ foreach $file (sort (readdir (SRCDIR))) { + if ($file eq '.' || $file eq '..' || $file =~ /^\./) { + next; + } elsif (-d "$source_dir/$file") { +Index: gtk-doc-1.25/gtkdoc-fixxref.in +=================================================================== +--- gtk-doc-1.25.orig/gtkdoc-fixxref.in ++++ gtk-doc-1.25/gtkdoc-fixxref.in +@@ -204,7 +204,7 @@ sub ScanIndices { + + opendir (HTMLDIR, $scan_dir) || return; + my $file; +- foreach $file (readdir (HTMLDIR)) { ++ foreach $file (sort (readdir (HTMLDIR))) { + if ($file eq '.' || $file eq '..') { + next; + } elsif (-d "$scan_dir/$file") { +@@ -323,7 +323,7 @@ sub FixCrossReferences { + opendir (HTMLDIR, $scan_dir) + || die "Can't open HTML directory $scan_dir: $!"; + my $file; +- foreach $file (readdir (HTMLDIR)) { ++ foreach $file (sort (readdir (HTMLDIR))) { + if ($file eq '.' || $file eq '..') { + next; + } elsif ($file =~ m/.html?$/) { +Index: gtk-doc-1.25/gtkdoc-mkdb.in +=================================================================== +--- gtk-doc-1.25.orig/gtkdoc-mkdb.in ++++ gtk-doc-1.25/gtkdoc-mkdb.in +@@ -3900,7 +3900,7 @@ sub ReadSourceDocumentation { + opendir (SRCDIR, $source_dir) + || die "Can't open source directory $source_dir: $!"; + +- foreach $file (readdir (SRCDIR)) { ++ foreach $file (sort (readdir (SRCDIR))) { + if ($file =~ /^\./) { + next; + } elsif (-d "$source_dir/$file") { +Index: gtk-doc-1.25/gtkdoc-rebase.in +=================================================================== +--- gtk-doc-1.25.orig/gtkdoc-rebase.in ++++ gtk-doc-1.25/gtkdoc-rebase.in +@@ -157,7 +157,7 @@ sub ScanDirectory { + my $file; + my $onlinedir; + my $have_index = 0; +- foreach $file (readdir(HTMLDIR)) { ++ foreach $file (sort (readdir(HTMLDIR))) { + if ($file eq '.' or $file eq '..') { + next; + } +@@ -291,7 +291,7 @@ sub RebaseReferences { + my ($dir) = @_; + + opendir(HTMLDIR, $dir) || die "Can't open HTML directory $dir: $!"; +- foreach my $file (readdir(HTMLDIR)) { ++ foreach my $file (sort (readdir(HTMLDIR))) { + if ($file =~ m/\.html?$/) { + &RebaseFile("$dir$file"); + } From ffbba54eeda4ded4d28eaf95390693df8ab370e1b3c17b72817a8fa47670e8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Tue, 4 Jul 2017 18:36:48 +0000 Subject: [PATCH 2/2] Tweak OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk-doc?expand=0&rev=48 --- gtk-doc.changes | 2 +- gtk-doc.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk-doc.changes b/gtk-doc.changes index 0d6cfd2..02f3f42 100644 --- a/gtk-doc.changes +++ b/gtk-doc.changes @@ -2,7 +2,7 @@ Thu Jun 29 08:14:06 UTC 2017 - bwiedemann@suse.com - Add reproducible.patch to sort input file lists - to fix indeterminism in gstreamer and vte html docs + to fix indeterminism in gstreamer and vte html docs (bgo#784177). ------------------------------------------------------------------- Wed Jun 1 16:53:10 UTC 2016 - jengelh@inai.de diff --git a/gtk-doc.spec b/gtk-doc.spec index 0d5153e..0c2c0c6 100644 --- a/gtk-doc.spec +++ b/gtk-doc.spec @@ -1,7 +1,7 @@ # # spec file for package gtk-doc # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ License: GPL-2.0+ Group: Productivity/Publishing/SGML Url: http://www.gtk.org/gtk-doc/ Source: http://download.gnome.org/sources/gtk-doc/1.25/%{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM https://bugzilla.gnome.org/show_bug.cgi?id=784177 +# PATCH-FIX-UPSTREAM reproducible.patch bgo#784177 bwiedemann@suse.com -- Sort input file lists Patch0: reproducible.patch # When updating this package, please don't forget to update the gtk-doc.m4 Source # in glib2.