diff --git a/hamcrest-reproducible-builds.patch b/hamcrest-reproducible-builds.patch new file mode 100644 index 0000000..ca611c6 --- /dev/null +++ b/hamcrest-reproducible-builds.patch @@ -0,0 +1,23 @@ +--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java ++++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java +@@ -43,6 +43,13 @@ + + private int currentMethod = -1; + private Method[] allMethods = cls.getMethods(); ++ { ++ java.util.Arrays.sort(allMethods, new java.util.Comparator() { ++ public int compare(Method m1, Method m2) { ++ return m1.toGenericString().compareTo(m2.toGenericString()); ++ } ++ }); ++ } + + @Override + public boolean hasNext() { +@@ -171,4 +178,4 @@ + return name.replace('$', '.'); + } + +-} +\ No newline at end of file ++} diff --git a/hamcrest.changes b/hamcrest.changes index 2d877e4..d9da33e 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jan 5 13:20:25 UTC 2021 - Pedro Monreal + +- Make hamcrest build reproducibly [bsc#1120493] +- Add hamcrest-reproducible-builds.patch + +------------------------------------------------------------------- +Tue Jan 5 13:01:10 UTC 2021 - Pedro Monreal + +- Fix typo in hamcrest-core description [bsc#1179994] + ------------------------------------------------------------------- Thu Nov 19 12:48:02 UTC 2020 - Pedro Monreal diff --git a/hamcrest.spec b/hamcrest.spec index e995f12..57388f2 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,7 +1,7 @@ # # spec file for package hamcrest # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,6 +38,7 @@ Patch5: %{name}-%{version}-fork-javac.patch Patch6: %{name}-%{version}-javadoc9.patch Patch7: %{name}-%{version}-javadoc10.patch Patch8: %{name}-%{version}-random-build-crash.patch +Patch9: hamcrest-reproducible-builds.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: javapackages-local @@ -67,7 +68,7 @@ Obsoletes: %{name} < %{version}-%{release} %description core The core API of hamcrest matcher framework to be used by third-party framework providers. -This includes the a foundation set of matcher implementations for common operations. +This includes a foundation set of matcher implementations for common operations. %package javadoc Summary: Javadoc for %{name} @@ -112,6 +113,7 @@ rm -fr hamcrest-integration/src/main/java/org/hamcrest/EasyMock2Matchers.java %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 sed -i 's/\r//' LICENSE.txt