From 943fec8775a1c150622476dfcc81a84748c3c074 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 12:36:29 -0400 Subject: [PATCH] Import rpm: 769ad088e5337d08d9368190aa378727d020218b --- .gitignore | 1 + fix-bnd-config.patch | 29 ++ fix-incompatible-types.patch | 12 + fixup-ant-script.patch | 87 +++++ gating.yaml | 8 + generate-tarball.sh | 22 ++ make-mockito-sourcetarball.sh | 20 + mockito-core.pom | 678 ++++++++++++++++++++++++++++++++++ mockito-matcher.patch | 39 ++ mockito.spec | 209 +++++++++++ setting-naming-policy.patch | 34 ++ sources | 1 + use-unbundled-asm.patch | 76 ++++ 13 files changed, 1216 insertions(+) create mode 100644 .gitignore create mode 100644 fix-bnd-config.patch create mode 100644 fix-incompatible-types.patch create mode 100644 fixup-ant-script.patch create mode 100644 gating.yaml create mode 100755 generate-tarball.sh create mode 100755 make-mockito-sourcetarball.sh create mode 100644 mockito-core.pom create mode 100644 mockito-matcher.patch create mode 100644 mockito.spec create mode 100644 setting-naming-policy.patch create mode 100644 sources create mode 100644 use-unbundled-asm.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82462ae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mockito-1.10.19.tar.xz diff --git a/fix-bnd-config.patch b/fix-bnd-config.patch new file mode 100644 index 0000000..a9bf97e --- /dev/null +++ b/fix-bnd-config.patch @@ -0,0 +1,29 @@ +--- conf/mockito-core.bnd.orig 2014-12-31 16:43:56.000000000 +0000 ++++ conf/mockito-core.bnd 2015-09-01 19:36:18.534549995 +0100 +@@ -1,21 +1,19 @@ +--versionpolicy=[${version;==;${@}},${version;+;${@}}) +- +-Bundle-Name= Mockito Mock Library for Java. Core bundle requires Hamcrest-core and Objenesis. ++Bundle-Name= Mockito Mock Library for Java. + Bundle-SymbolicName= org.mockito.mockito-core + Bundle-Version= ${version} + + Export-Package= !org.mockito.asm.*, \ + !org.mockito.cglib.*, \ + !org.mockito.internal.*, \ +- org.mockito.*;version=${version} ++ org.mockito.* + + Import-Package= junit.*;resolution:=optional, \ + org.junit.*;resolution:=optional, \ + org.apache.tools.ant.*;resolution:=optional, \ +- org.hamcrest;version="[1.0,3.0)", \ +- org.objenesis;version="[2.1,3.0)", \ ++ org.objenesis;version="[1.0,3.0)", \ + org.mockito.asm.signature;resolution:=optional, \ +- org.mockito.* ++ org.mockito.*, \ ++ net.sf.cglib.core,net.sf.cglib.proxy,net.sf.cglib.reflect + + Private-Package: org.mockito.* + diff --git a/fix-incompatible-types.patch b/fix-incompatible-types.patch new file mode 100644 index 0000000..10adc69 --- /dev/null +++ b/fix-incompatible-types.patch @@ -0,0 +1,12 @@ +diff --git a/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java b/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java +index 1ca0003..15172bd 100644 +--- a/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java ++++ b/src/org/mockito/internal/creation/instance/ObjenesisInstantiator.java +@@ -11,6 +11,6 @@ class ObjenesisInstantiator implements Instantiator { + private final ObjenesisStd objenesis = new ObjenesisStd(new GlobalConfiguration().enableClassCache()); + + public T newInstance(Class cls) { +- return objenesis.newInstance(cls); ++ return (T) objenesis.newInstance(cls); + } + } diff --git a/fixup-ant-script.patch b/fixup-ant-script.patch new file mode 100644 index 0000000..1d68dc6 --- /dev/null +++ b/fixup-ant-script.patch @@ -0,0 +1,87 @@ +--- build.xml.orig 2014-12-31 16:43:56.000000000 +0000 ++++ build.xml 2015-06-22 09:20:12.859059775 +0100 +@@ -81,6 +81,7 @@ + + + ++ + + + +@@ -207,18 +208,14 @@ + + + +- +- ++ ++ + + + + +- +- +- + +- +- ++ + + + +@@ -319,53 +316,10 @@ +

Click to see examples. Mockito ${version} API.

+ ]]> + +-
+- +- +- +- +- +- +- +- +- ]]> +-
+ + + +- +- +- +- +- +- ++ +
+ + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..d6b7694 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + # https://docs.engineering.redhat.com/display/RHELPLAN/Maven+Bootstrap+manual+gating+test + - !PassingTestCaseRule {test_case_name: manual.sst_cs_apps.maven.bootstrap} diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..6b3c542 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +name=mockito +version="$(sed -n 's/Version:\s*//p' *.spec)" + +# RETRIEVE +wget "https://github.com/mockito/mockito/archive/v${version}.tar.gz" -O "${name}-${version}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +pushd tarball-tmp +tar -xf "../${name}-${version}.orig.tar.gz" + +# CLEAN TARBALL +find -name '*.jar' -delete +find -name '*.class' -delete +rm -rf gradlew gradlew.bat src/javadoc + +tar -czf "../${name}-${version}.tar.gz" * +popd +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/make-mockito-sourcetarball.sh b/make-mockito-sourcetarball.sh new file mode 100755 index 0000000..b653a0c --- /dev/null +++ b/make-mockito-sourcetarball.sh @@ -0,0 +1,20 @@ +#!/bin/bash -ex + +VERSION=1.10.19 +SRCDIR=mockito-${VERSION} + +git clone https://github.com/mockito/mockito.git ${SRCDIR} +pushd $SRCDIR +git archive --format=tar --prefix=${SRCDIR}/ v${VERSION} > ../${SRCDIR}.tar +popd + +rm -rf ${SRCDIR} + +tar -xf ${SRCDIR}.tar +rm ${SRCDIR}.tar +pushd ${SRCDIR} +rm -rf `find -name *.jar` build.gradle cglib-and-asm doc gradle gradlew gradlew.bat javadoc +dos2unix `find -name *.java` +popd + +tar -cvJf mockito-${VERSION}.tar.xz ${SRCDIR} diff --git a/mockito-core.pom b/mockito-core.pom new file mode 100644 index 0000000..e305fc9 --- /dev/null +++ b/mockito-core.pom @@ -0,0 +1,678 @@ + + + 4.0.0 + org.mockito + mockito-core + @VERSION@ + mockito-core + jar + https://github.com/mockito/mockito + Mockito mock objects library core API and implementation + + + + org.ow2.asm + asm + 7.2 + compile + + + net.bytebuddy + byte-buddy + 1.9.3 + compile + + + net.bytebuddy + byte-buddy-agent + 1.9.3 + compile + + + org.objenesis + objenesis + 3.1 + compile + + + org.opentest4j + opentest4j + 1.2 + compile + + + org.hamcrest + hamcrest + 2.2 + provided + + + junit + junit + 4.12 + provided + + + org.assertj + assertj-core + 3.13.2 + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + org.apache.felix + maven-bundle-plugin + 3.5.0 + + ${project.build.directory}/osgi + + <_include>-osgi.bnd + + + + + process-classes + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + + ${project.build.directory}/osgi/MANIFEST.MF + + + **/MockMethodDispatcher.class + + + + + + + + The MIT License + https://github.com/mockito/mockito/blob/master/LICENSE + repo + + + + https://github.com/mockito/mockito.git + + + https://github.com/mockito/mockito/issues + GitHub issues + + + https://travis-ci.org/mockito/mockito + TravisCI + + + + mockitoguy + Szczepan Faber + + Core developer + + https://github.com/mockitoguy + + + bric3 + Brice Dutheil + + Core developer + + https://github.com/bric3 + + + raphw + Rafael Winterhalter + + Core developer + + https://github.com/raphw + + + TimvdLippe + Tim van der Lippe + + Core developer + + https://github.com/TimvdLippe + + + + + continuous-delivery-drone + https://github.com/continuous-delivery-drone + + + shipkit.org automated bot + https://github.com/shipkit-org + + + Marcin Zajączkowski + https://github.com/szpak + + + Pascal Schumacher + https://github.com/PascalSchumacher + + + Igor Czechowski + https://github.com/iczechowski + + + Bartosz Bańkowski + https://github.com/bbankowski + + + Erhard Pointl + https://github.com/epeee + + + Allon Murienik + https://github.com/mureinik + + + Christian Schwarz + https://github.com/ChristianSchwarz + + + Lukasz Szewc + https://github.com/lukasz-szewc + + + Marcin Grzejszczak + https://github.com/marcingrzejszczak + + + Marc Philipp + https://github.com/marcphilipp + + + Sangwoo Lee + https://github.com/marchpig + + + Philip P. Moltmann + https://github.com/moltmann + + + Tim Perry + https://github.com/pimterry + + + David J. M. Karlsen + https://github.com/davidkarlsen + + + Dawud-xx + https://github.com/Dawud-xx + + + Lovro Pandžić + https://github.com/lpandzic + + + Werner Beroux + https://github.com/wernight + + + Tsuyoshi Murakami + https://github.com/tmurakami + + + Serge Bishyr + https://github.com/SeriyBg + + + Dmitry Timofeev + https://github.com/dmitry-timofeev + + + jerzykrlk + https://github.com/jerzykrlk + + + alberskib + https://github.com/alberskib + + + Joseph Walton + https://github.com/josephw + + + Stephan Schroevers + https://github.com/Stephan202 + + + Michal Kordas + https://github.com/mkordas + + + Kamil Szymański + https://github.com/kamilszymanski + + + Hynek Mlnařík + https://github.com/hmlnarik + + + Hugh Hamill + https://github.com/hughwphamill + + + Hans Joachim Desserud + https://github.com/hansjoachim + + + Gunnar Wagenknecht + https://github.com/guw + + + Dmytro Chyzhykov + https://github.com/ffbit + + + r-smirnov + https://github.com/r-smirnov + + + ianparkinson + https://github.com/ianparkinson + + + dmac100 + https://github.com/dmac100 + + + Vineet Kumar + https://github.com/vin + + + Urs Metz + https://github.com/UrsMetz + + + Tarnowski Jan + https://github.com/tarnowskijan + + + Roman Elizarov + https://github.com/elizarov + + + Roland Hauser + https://github.com/SourcePond + + + Michał Borek + https://github.com/michalborek + + + Michael Pinnegar + https://github.com/Jazzepi + + + Marius Volkhart + https://github.com/MariusVolkhart + + + Lucas Cavalcanti + https://github.com/lucascs + + + Leonardo Carrasco + https://github.com/thesnowgoose + + + Krzysztof Wolny + https://github.com/vanta + + + Jeffrey Falgout + https://github.com/JeffreyFalgout + + + Ismael Juma + https://github.com/ijuma + + + Emory Merryman + https://github.com/AFnRFCb7 + + + Clark Brewer + https://github.com/brewerc + + + Carlos Aguayo + https://github.com/carlosaguayo + + + Arend v. Reinersdorff + https://github.com/arend-von-reinersdorff + + + Alberto Scotto + https://github.com/alb-i986 + + + yyvess + https://github.com/yyvess + + + 訾明华 + https://github.com/ziminghua + + + wuwen + https://github.com/wuwen5 + + + test111 + https://github.com/tradingreason + + + Xin Liu + https://github.com/L-KID + + + Wojtek Wilk + https://github.com/wwilk + + + Walter Scott Johnson + https://github.com/li-wjohnson + + + Walter Johnson + https://github.com/li-wjohnson + + + Vladislav + https://github.com/VChirp + + + Vivian Pennel + https://github.com/Vp3n + + + Venkata Jaswanth + https://github.com/aj-jaswanth + + + Tom Ball + https://github.com/tomball + + + Tokuhiro Matsuno + https://github.com/tokuhirom + + + Tim Cooke + https://github.com/trcooke + + + Stuart Blair + https://github.com/stuartblair + + + Simen Bekkhus + https://github.com/SimenB + + + Scott Markwell + https://github.com/smarkwell + + + Sanne Grinovero + https://github.com/Sanne + + + Roi Atalla + https://github.com/ra4king + + + Robert Stupp + https://github.com/snazy + + + Radim Kubacki + https://github.com/radimk + + + Philipp Jardas + https://github.com/phjardas + + + Oliver Drotbohm + https://github.com/odrotbohm + + + Niklas Baudy + https://github.com/vanniktech + + + Myrle Krantz + https://github.com/myrle-krantz + + + Matt Dean + https://github.com/mattbdean + + + Markus Wüstenberg + https://github.com/markuswustenberg + + + Maciej Kuster + https://github.com/NagRock + + + MEDDAH Julien + https://github.com/MeddahJ + + + Ludovic Meurillon + https://github.com/LudoMeurillon + + + Ludovic Chane + https://github.com/ludochane + + + Krisztian Milesz + https://github.com/mileszk + + + Kengo TODA + https://github.com/KengoTODA + + + Kayvan Najafzadeh + https://github.com/kayvannj + + + José Paumard + https://github.com/JosePaumard + + + Jonathan Lloyd + https://github.com/lloydjm77 + + + Johnny Lim + https://github.com/izeye + + + Jesse Englert + https://github.com/jpenglert + + + Jeremy Rickard + https://github.com/jrrickard + + + Ivan Vershinin + https://github.com/vershinin + + + Igor Kostenko + https://github.com/isanych + + + Igor Conrado Alves de Lima + https://github.com/igorcadelima + + + Gaëtan Muller + https://github.com/MGaetan89 + + + Felix W. Dekker + https://github.com/FWDekker + + + Evgeny Astafyev + https://github.com/astafev + + + Eugene Ivakhno + https://github.com/eugene-ivakhno + + + Erik Bakker + https://github.com/eamelink + + + Dmitriy Zaitsev + https://github.com/DmitriyZaitsev + + + Divyansh Gupta + https://github.com/divyansh-gupta + + + Dennis Cheung + https://github.com/hkdennis2k + + + Denis Zharkov + https://github.com/dzharkov + + + David Xia + https://github.com/davidxia + + + David Gageot + https://github.com/dgageot + + + Christian Persson + https://github.com/Saser + + + Bruno Krebs + https://github.com/brunokrebs + + + Ben Yu + https://github.com/fluentfuture + + + Bastien Jansen + https://github.com/bjansen + + + Bartosz Miller + https://github.com/BartoszMiller + + + Ariel Isaac + https://github.com/Ariel-Isaacm + + + Anuraag Agrawal + https://github.com/anuraaga + + + André Gonçalves + https://github.com/andrerigon + + + Andrey + https://github.com/andreyrmg + + + Andrei Solntsev + https://github.com/asolntsev + + + Allan Wang + https://github.com/AllanWang + + + Alex Simkin + https://github.com/SimY4 + + + rberghegger + https://github.com/rberghegger + + + philipa + https://github.com/philipa + + + paulduffin + https://github.com/paulduffin + + + mgrafl + https://github.com/mgrafl + + + jmetertea + https://github.com/jmetertea + + + geoffschoeman + https://github.com/geoffschoeman + + + bruceeddy + https://github.com/bruceeddy + + + ashleyfrieze + https://github.com/ashleyfrieze + + + Nirvanall + https://github.com/Nirvanall + + + LiamClark + https://github.com/LiamClark + + + diff --git a/mockito-matcher.patch b/mockito-matcher.patch new file mode 100644 index 0000000..72cc1cb --- /dev/null +++ b/mockito-matcher.patch @@ -0,0 +1,39 @@ +From 02df4868e1614b9fd224e40c1556b78eeb01cd3d Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Wed, 4 Dec 2013 16:52:24 +0100 +Subject: [PATCH] mockito matcher + +Signed-off-by: Michael Simacek +--- + src/org/mockito/internal/matchers/LocalizedMatcher.java | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/org/mockito/internal/matchers/LocalizedMatcher.java b/src/org/mockito/internal/matchers/LocalizedMatcher.java +index d6dda04..9dffe06 100644 +--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java ++++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java +@@ -22,6 +22,12 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation, + this.location = new LocationImpl(); + } + ++ /* This is a hack for Fedora. Bug has been filed here: ++ * https://code.google.com/p/mockito/issues/detail?id=428 */ ++ public void describeMismatch(Object item, Description mismatchDescription) { ++ mismatchDescription.appendText("was ").appendValue(item); ++ } ++ + public void _dont_implement_Matcher___instead_extend_BaseMatcher_() { + // yeah right + } +@@ -37,7 +43,7 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation, + public Location getLocation() { + return location; + } +- ++ + @Override + public String toString() { + return "Localized: " + this.actualMatcher; +-- +1.8.3.1 + diff --git a/mockito.spec b/mockito.spec new file mode 100644 index 0000000..5bf20a6 --- /dev/null +++ b/mockito.spec @@ -0,0 +1,209 @@ +Name: mockito +Version: 1.10.19 +Release: 17%{?dist} +Summary: A Java mocking framework + +License: MIT +URL: http://%{name}.org +Source0: %{name}-%{version}.tar.xz +Source1: make-%{name}-sourcetarball.sh +Patch0: fixup-ant-script.patch +Patch1: fix-bnd-config.patch +Patch2: %{name}-matcher.patch +# Workaround for NPE in setting NamingPolicy in cglib +Patch3: setting-naming-policy.patch +# because we have old objenesis +Patch4: fix-incompatible-types.patch + +BuildArch: noarch +BuildRequires: javapackages-local +BuildRequires: java-devel +BuildRequires: ant +BuildRequires: objenesis +BuildRequires: cglib +BuildRequires: junit +BuildRequires: hamcrest +BuildRequires: aqute-bnd + +Requires: objenesis +Requires: cglib +Requires: junit +Requires: hamcrest + +%description +Mockito is a mocking framework that tastes really good. It lets you write +beautiful tests with clean & simple API. Mockito doesn't give you hangover +because the tests are very readable and they produce clean verification +errors. + +%package javadoc +Summary: Javadocs for %{name} + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q +%patch0 +%patch1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 + +%pom_add_dep net.sf.cglib:cglib:3.1 maven/mockito-core.pom +find . -name "*.java" -exec sed -i "s|org\.%{name}\.cglib|net\.sf\.cglib|g" {} + +mkdir -p lib/compile + +%pom_xpath_remove 'target[@name="javadoc"]/copy' build.xml + +%build +build-jar-repository lib/compile objenesis cglib junit hamcrest/core +ant jar javadoc + +# Convert to OSGi bundle +pushd target +bnd wrap \ + --version %{version} \ + --output %{name}-core-%{version}.bar \ + --properties ../conf/%{name}-core.bnd \ + %{name}-core-%{version}.jar +mv %{name}-core-%{version}.bar %{name}-core-%{version}.jar + +# Explicit Require-Bundle on hamcrest +unzip mockito-core-%{version}.jar META-INF/MANIFEST.MF +sed -i -e '2iRequire-Bundle: org.hamcrest.core' META-INF/MANIFEST.MF +jar umf META-INF/MANIFEST.MF mockito-core-%{version}.jar +popd + +sed -i -e "s|@version@|%{version}|g" maven/%{name}-core.pom +%mvn_artifact maven/%{name}-core.pom target/%{name}-core-%{version}.jar +%mvn_alias org.%{name}:%{name}-core org.%{name}:%{name}-all + +%install +%mvn_install -J target/javadoc + +%files -f .mfiles +%license LICENSE NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE NOTICE + +%changelog +* Fri Aug 03 2018 Michael Simacek - 1.10.19-17 +- Remove bundled minified js from javadoc + +* Fri Jul 13 2018 Fedora Release Engineering - 1.10.19-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Igor Gnatenko - 1.10.19-15 +- Escape macros in %%changelog + +* Thu Feb 08 2018 Fedora Release Engineering - 1.10.19-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.10.19-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Feb 16 2017 Michael Simacek - 1.10.19-12 +- Remove conditional for EOL Fedora + +* Fri Feb 10 2017 Fedora Release Engineering - 1.10.19-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Feb 22 2016 Mat Booth - 1.10.19-10 +- Explicitly import more cglib packages in OSGi metadata to prevent mockito + failing under certain circumstances during Eclipse test suites + +* Fri Feb 12 2016 Mat Booth - 1.10.19-9 +- Require hamcrest explicitly in OSGi metadata + +* Thu Feb 04 2016 Fedora Release Engineering - 1.10.19-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Dec 25 2015 Raphael Groner - 1.10.19-7 +- introduce License tag + +* Fri Dec 25 2015 Raphael Groner - 1.10.19-6 +- reenable osgi + +* Fri Dec 18 2015 Raphael Groner - 1.10.19-5 +- workaround rhbz#1292777 stylesheet.css not found + +* Thu Jul 16 2015 Michael Simacek - 1.10.19-4 +- Use aqute-bnd-2.4.1 + +* Mon Jun 22 2015 Mat Booth - 1.10.19-3 +- Switch to mvn_install + +* Wed Jun 17 2015 Fedora Release Engineering - 1.10.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Apr 29 2015 Michal Srb - 1.10.19-1 +- Update to 1.10.19 + +* Mon Aug 25 2014 Darryl L. Pierce - 1.9.0-18 +- First build for EPEL7 +- Resolves: BZ#1110030 + +* Mon Jun 09 2014 Omair Majid - 1.9.0-17 +- Use .mfiles to pick up xmvn metadata +- Don't use obsolete _mavenpomdir and _mavendepmapfragdir macros +- Fix FTBFS + +* Sat Jun 07 2014 Fedora Release Engineering - 1.9.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 22 2014 Severin Gehwolf - 1.9.0-16 +- Use junit R/BR over junit4. + +* Fri Mar 28 2014 Michael Simacek - 1.9.0-15 +- Use Requires: java-headless rebuild (#1067528) + +* Wed Dec 11 2013 Michael Simacek - 1.9.0-14 +- Workaround for NPE in setting NamingPolicy + +* Sat Aug 03 2013 Fedora Release Engineering - 1.9.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Mar 25 2013 Tomas Radej - 1.9.0-12 +- Patched LocalizedMatcher due to hamcrest update, (bug upstream) + +* Thu Feb 14 2013 Fedora Release Engineering - 1.9.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Sep 6 2012 Severin Gehwolf 1.9.0-10 +- More Import-Package fixes. Note that fix-cglib-refs.patch is + not suitable for upstream: issue id=373 + +* Tue Sep 4 2012 Severin Gehwolf 1.9.0-9 +- Fix missing Import-Package in manifest. + +* Mon Aug 27 2012 Severin Gehwolf 1.9.0-8 +- Add aqute bnd instructions for OSGi metadata + +* Fri Jul 20 2012 Fedora Release Engineering - 1.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Apr 30 2012 Roman Kennke 1.9.0-6 +- Place JavaDoc in directly under %%{_javadocdir}/%%{name} instead + of %%{_javadocdir}/%%{name}/javadoc + +* Wed Apr 25 2012 Roman Kennke 1.9.0-5 +- Removed post/postun hook for update_maven_depmap + +* Tue Apr 24 2012 Roman Kennke 1.9.0-4 +- Fix groupId of cglib dependency +- Add additional depmap for mockito-all +- Update depmap on post and postun +- Fix version in pom + +* Wed Feb 22 2012 Roman Kennke 1.9.0-3 +- Added cglib dependency to pom + +* Tue Feb 21 2012 Roman Kennke 1.9.0-2 +- Include upstream Maven pom.xml in package +- Added missing Requires for cglib, junit4, hamcrest, objenesis +- Added source tarball generating script to sources + +* Thu Feb 16 2012 Roman Kennke 1.9.0-1 +- Initial package diff --git a/setting-naming-policy.patch b/setting-naming-policy.patch new file mode 100644 index 0000000..d4f30b1 --- /dev/null +++ b/setting-naming-policy.patch @@ -0,0 +1,34 @@ +From 04e36a01e93c3b79caa9f7e9e8573fe2a0d65d1a Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Thu, 5 Dec 2013 16:53:36 +0100 +Subject: [PATCH] Setting naming policy + +Signed-off-by: Michael Simacek +--- + src/org/mockito/internal/creation/cglib/CGLIBHacker.java | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java +index 172f744..de53ab1 100644 +--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java ++++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java +@@ -20,6 +20,9 @@ public class CGLIBHacker implements Serializable { + Field createInfoField = reflectOnCreateInfo(methodProxy); + createInfoField.setAccessible(true); + Object createInfo = createInfoField.get(methodProxy); ++ if (createInfo == null) { ++ return; ++ } + Field namingPolicyField = createInfo.getClass().getDeclaredField("namingPolicy"); + namingPolicyField.setAccessible(true); + if (namingPolicyField.get(createInfo) == null) { +@@ -43,4 +46,4 @@ public class CGLIBHacker implements Serializable { + } + return cglibMethodProxyClass.getDeclaredField("createInfo"); + } +-} +\ No newline at end of file ++} +-- +1.8.3.1 + diff --git a/sources b/sources new file mode 100644 index 0000000..f1b2408 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (mockito-1.10.19.tar.xz) = 6d394056159acd57b2be3318e1df7ab298b05402 diff --git a/use-unbundled-asm.patch b/use-unbundled-asm.patch new file mode 100644 index 0000000..9edcf60 --- /dev/null +++ b/use-unbundled-asm.patch @@ -0,0 +1,76 @@ +diff --git a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java +index 187f1ea..f8fa355 100644 +--- a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java ++++ b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java +@@ -30,8 +30,8 @@ import net.bytebuddy.dynamic.ClassFileLocator; + import net.bytebuddy.dynamic.scaffold.MethodGraph; + import net.bytebuddy.dynamic.scaffold.TypeValidation; + import net.bytebuddy.implementation.Implementation; +-import net.bytebuddy.jar.asm.ClassVisitor; +-import net.bytebuddy.jar.asm.MethodVisitor; ++import org.objectweb.asm.ClassVisitor; ++import org.objectweb.asm.MethodVisitor; + import net.bytebuddy.matcher.ElementMatchers; + import net.bytebuddy.pool.TypePool; + import net.bytebuddy.utility.OpenedClassReader; +diff --git a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java +index f5b807a..c9ca662 100644 +--- a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java ++++ b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java +@@ -26,6 +26,7 @@ import org.mockito.plugins.MockMaker; + import org.mockito.stubbing.Answer; + import org.mockitoutil.ClassLoaders; + import org.mockitoutil.SimpleSerializationUtil; ++import org.objectweb.asm.ClassVisitor; + import org.objenesis.ObjenesisStd; + + public abstract class AbstractByteBuddyMockMakerTest { +@@ -154,7 +155,7 @@ public abstract class AbstractByteBuddyMockMakerTest { + // given + ClassLoader classpath_with_objenesis = + ClassLoaders.excludingClassLoader() +- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class) ++ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class) + .withCodeSourceUrlOf(coverageTool()) + .build(); + +diff --git a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java +index f971893..63af9cd 100644 +--- a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java ++++ b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java +@@ -8,6 +8,7 @@ import static org.junit.Assert.assertTrue; + import static org.mockito.Mockito.mockingDetails; + import static org.mockito.Mockito.when; + ++import org.junit.Ignore; + import org.junit.Rule; + import org.junit.Test; + import org.mockito.Mock; +@@ -42,6 +43,7 @@ public class JUnitRuleTest { + + @SuppressWarnings({"CheckReturnValue", "MockitoUsage"}) + @Test ++ @Ignore + public void does_not_check_invalid_mockito_usage_on_failure() throws Throwable { + // This intended behavior is questionable + // However, it was like that since the beginning of JUnit rule support +diff --git a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java +index 9cd47da..356a3e0 100644 +--- a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java ++++ b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java +@@ -16,6 +16,7 @@ import org.junit.Test; + import org.mockito.Mockito; + import org.mockito.internal.configuration.plugins.Plugins; + import org.mockitoutil.ClassLoaders; ++import org.objectweb.asm.ClassVisitor; + import org.objenesis.Objenesis; + + public class NoJUnitDependenciesTest { +@@ -32,6 +33,7 @@ public class NoJUnitDependenciesTest { + Matcher.class, + ByteBuddy.class, + ByteBuddyAgent.class, ++ ClassVisitor.class, + Objenesis.class) + .withCodeSourceUrlOf(coverageTool()) + .without("junit", "org.junit", "org.opentest4j")