diff --git a/perl-Class-MethodMaker.changes b/perl-Class-MethodMaker.changes index 8b9b53c..9c14571 100644 --- a/perl-Class-MethodMaker.changes +++ b/perl-Class-MethodMaker.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 8 19:58:13 UTC 2017 - bwiedemann@suse.com + +- Add reproducible.patch to sort hashes to fix build-compare + ------------------------------------------------------------------- Mon Apr 13 18:17:11 UTC 2015 - coolo@suse.com diff --git a/perl-Class-MethodMaker.spec b/perl-Class-MethodMaker.spec index 95c4dba..20205c7 100644 --- a/perl-Class-MethodMaker.spec +++ b/perl-Class-MethodMaker.spec @@ -25,6 +25,8 @@ License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Class-MethodMaker/ Source: http://www.cpan.org/authors/id/S/SC/SCHWIGON/class-methodmaker/%{cpan_name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://rt.cpan.org/Public/Bug/Display.html?id=122339 +Patch0: reproducible.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros @@ -45,6 +47,7 @@ at least declare) your overriding method in a 'BEGIN' block. %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 find . -type f -print0 | xargs -0 chmod 644 %build diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..c3a2790 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,19 @@ +When building packages (e.g. for openSUSE Linux) in disposable VMs +cmmg.pl outputs hash value content in undeterministic order +This patch fixes this by sorting hash keys + +See https://reproducible-builds.org/ for why this matters. + +Index: Class-MethodMaker-2.24/lib/Class/MethodMaker/OptExt.pm +=================================================================== +--- Class-MethodMaker-2.24.orig/lib/Class/MethodMaker/OptExt.pm ++++ Class-MethodMaker-2.24/lib/Class/MethodMaker/OptExt.pm +@@ -357,7 +357,7 @@ sub encode { + + # ------------------------------------- + +-sub option_names { grep $_ ne 'DEFAULT', keys %{OPTEXT()} } ++sub option_names { grep $_ ne 'DEFAULT', sort keys %{OPTEXT()} } + + sub optcode { + my $class = shift;