From ae6bdddbebedd73f221af93f08a39ec6dd8100e4cd59627ab9d9a3dbdfa53db7 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Wed, 4 Feb 2015 21:21:09 +0000 Subject: [PATCH] Accepting request 283976 from home:coolo:branches:openSUSE:Factory - add reproducible-generator.patch from debian bug report to get reproducible builds (and predicatable API actually) OBS-URL: https://build.opensuse.org/request/show/283976 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libical?expand=0&rev=33 --- libical.changes | 6 ++++++ libical.spec | 4 +++- reproducible-generator.patch | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 reproducible-generator.patch diff --git a/libical.changes b/libical.changes index 9fb0f20..37a5a07 100644 --- a/libical.changes +++ b/libical.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 3 19:04:34 UTC 2015 - coolo@suse.com + +- add reproducible-generator.patch from debian bug report to + get reproducible builds (and predicatable API actually) + ------------------------------------------------------------------- Fri Dec 26 20:45:25 UTC 2014 - badshah400@gmail.com diff --git a/libical.spec b/libical.spec index 8b39d4d..c4e2c42 100644 --- a/libical.spec +++ b/libical.spec @@ -1,7 +1,7 @@ # # spec file for package libical # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -26,6 +26,7 @@ Group: Development/Libraries/C and C++ Url: http://sourceforge.net/projects/freeassociation/ Source: https://github.com/libical/libical/releases/download/v%{version}/%{name}-%{version}.tar.gz Source2: baselibs.conf +Patch0: reproducible-generator.patch BuildRequires: cmake >= 2.4 BuildRequires: gcc-c++ BuildRequires: pkg-config @@ -86,6 +87,7 @@ component properties, parameters, and subcomponents. %prep %setup -q +%patch0 -p1 %build %cmake diff --git a/reproducible-generator.patch b/reproducible-generator.patch new file mode 100644 index 0000000..947ea1f --- /dev/null +++ b/reproducible-generator.patch @@ -0,0 +1,17 @@ +Description: Sort keys to generate reproducible source code. +Author: Dimitri John Ledkov +Bug-Debian: http://bugs.debian.org/773916 + +Index: libical-1.0.1/scripts/mkderivedvalues.pl +=================================================================== +--- libical-1.0.1.orig/scripts/mkderivedvalues.pl ++++ libical-1.0.1/scripts/mkderivedvalues.pl +@@ -141,7 +141,7 @@ if($opt_c){ + my $count = scalar(keys %h) + 1; + print "static const struct icalvalue_kind_map value_map[$count]={\n"; + +- foreach $value (keys %h) { ++ foreach $value (sort keys %h) { + + next if $value eq 'NO' or $value eq 'ANY'; +