[mchange-commons/epel7] Reverted EPEL7 version to F20 version
Michael Mraka
mmraka at fedoraproject.org
Wed Aug 27 09:18:34 UTC 2014
commit b91359268f96c893e890d4996eaacb43f6646389
Author: Michael Mraka <michael.mraka at redhat.com>
Date: Wed Aug 27 11:14:53 2014 +0200
Reverted EPEL7 version to F20 version
latest version (F21) dependencies are not in RHEL7
This reverts commit 4f5a8113d8a503618bfb33d0ed8b954d6c886cd1.
This reverts commit 6ffbb712f4a1a9188ef276cf5aec565db8382fb5.
.gitignore | 6 -
climbing-nemesis.py | 244 ----------------------------
mchange-commons-jdbc-4.1.patch | 23 +++
mchange-commons-remove-weakness-test.patch | 45 +++++
mchange-commons.spec | 89 +++++-----
mchange-no-tests.patch | 13 --
sources | 2 +-
7 files changed, 114 insertions(+), 308 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6b7bf4f..f3eeb87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1 @@
-/mchange-commons-java-mchange-commons-java-*/
/mchange-commons-java-0.2.3.4-final.tar.gz
-/.project
-/.build-*.log
-/noarch
-/*.src.rpm
-/mchange-commons-java-0.2.7-final.tar.gz
diff --git a/mchange-commons-jdbc-4.1.patch b/mchange-commons-jdbc-4.1.patch
new file mode 100644
index 0000000..e72442b
--- /dev/null
+++ b/mchange-commons-jdbc-4.1.patch
@@ -0,0 +1,23 @@
+--- ./src/java/com/mchange/v1/db/sql/DriverManagerDataSource.java.jdbc41 2013-03-20 10:24:27.000000000 +0000
++++ ./src/java/com/mchange/v1/db/sql/DriverManagerDataSource.java 2013-03-28 14:19:58.673058063 +0000
+@@ -43,6 +43,9 @@
+ import javax.sql.DataSource;
+ import com.mchange.io.UnsupportedVersionException;
+
++import java.sql.SQLFeatureNotSupportedException;
++import java.util.logging.Logger;
++
+ /**
+ * @deprecated use com.mchange.v2.c3p0.DriverManagerDataSource
+ */
+@@ -156,6 +159,10 @@
+ }
+ }
+
++ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
++ throw new SQLFeatureNotSupportedException();
++ }
++
+ //ObjectFactory for JNDI referencing
+ public static class DmdsObjectFactory implements ObjectFactory
+ {
diff --git a/mchange-commons-remove-weakness-test.patch b/mchange-commons-remove-weakness-test.patch
new file mode 100644
index 0000000..65755c4
--- /dev/null
+++ b/mchange-commons-remove-weakness-test.patch
@@ -0,0 +1,45 @@
+--- ./src/java/com/mchange/v2/util/junit/DoubleWeakHashMapJUnitTestCase.java.testweakness 2013-03-20 10:24:27.000000000 +0000
++++ ./src/java/com/mchange/v2/util/junit/DoubleWeakHashMapJUnitTestCase.java 2013-03-28 14:30:42.928482498 +0000
+@@ -83,42 +83,4 @@
+ assertEquals("After removing a doubled value, size should be 2", m.size(), 2);
+ }
+
+- public void testWeakness()
+- {
+- Integer a = new Integer(1);
+- Integer b = new Integer(2);
+- Integer c = new Integer(3);
+-
+- String poop = new String("poop");
+-
+- Map m = new DoubleWeakHashMap();
+- m.put(a, poop);
+- m.put(b, new Object());
+- m.put(c, new Object());
+-
+- //race condition... b & c might already have been removed... but i doubt it
+- assertEquals("1) Weak values should not yet have been removed (but not guaranteed! sometimes fails without a defect!)", 3, m.size());
+-
+- // we are relying that a full, synchronous GC occurs,
+- // which is not guaranteed in all VMs
+- System.gc();
+-
+- // let's see if we can force a deeper gc via a big array creation
+- byte[] bArray = new byte[ARRAY_SZ];
+- System.gc();
+- //try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); }
+-
+- assertEquals("2) Weak values should have been automatically removed (but not guaranteed! sometimes fails without a defect!)", 1, m.size());
+-
+- m.put( new Object(), b);
+-
+- //race condition... b & c might already have been removed... but i doubt it
+- assertEquals("3) Weak key should not yet have been removed (but not guaranteed! sometimes fails without a defect!)", 2, m.size());
+-
+- System.gc();
+- // let's see if we can force a deeper gc via a big array creation
+- bArray = new byte[ARRAY_SZ];
+-
+- assertEquals("4) Weak key should have been automatically removed (but not guaranteed! sometimes fails without a defect!)", m.size(), 1);
+- }
+ }
diff --git a/mchange-commons.spec b/mchange-commons.spec
index 576115c..b1426f9 100644
--- a/mchange-commons.spec
+++ b/mchange-commons.spec
@@ -1,28 +1,34 @@
Name: mchange-commons
-Version: 0.2.7
-Release: 1%{?dist}
+Version: 0.2.3.4
+Release: 4%{?dist}
Summary: A collection of general purpose utilities for c3p0
License: LGPLv2 or EPL
URL: https://github.com/swaldman/mchange-commons-java
Group: Development/Libraries
-BuildRequires: sbt
-BuildRequires: ivy-local
-BuildRequires: maven-local
-BuildRequires: log4j12
-BuildRequires: slf4j
-BuildRequires: typesafe-config
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: java-javadoc >= 1:1.6.0
+BuildRequires: jpackage-utils
+BuildRequires: ant
+BuildRequires: junit
+BuildRequires: ant-junit
+BuildRequires: log4j
-Source0: https://github.com/swaldman/mchange-commons-java/archive/mchange-commons-java-%{version}-final.tar.gz
-Source1: https://raw.github.com/willb/climbing-nemesis/master/climbing-nemesis.py
+Requires: jpackage-utils
+Requires: java-headless
-# There is a missing dep in Fedora so cannot build tests
-Patch0: mchange-no-tests.patch
+Source0: https://github.com/swaldman/%{name}-java/archive/%{name}-java-%{version}-final.tar.gz
+
+# Patch to build with JDBC 4.1/Java 7
+Patch1: mchange-commons-jdbc-4.1.patch
+
+# Remove one of the tests that intermittently fails
+Patch2: mchange-commons-remove-weakness-test.patch
BuildArch: noarch
%description
-Originally part of c3p0, mchange-commons is a set of general purpose
+Originally part of c3p0, %{name} is a set of general purpose
utilities.
%package javadoc
@@ -35,55 +41,50 @@ Group: Documentation
%prep
%setup -q -n %{name}-java-%{name}-java-%{version}-final
-%patch0
+%patch1 -p0 -b .jdbc41
+%patch2 -p0 -b .testweakness
+# remove all binary bits
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
-cp %{SOURCE1} .
-
-cp -pr /usr/share/sbt/ivy-local .
-
%build
-# XXX: This jar has changed location, which breaks sbt -- this is a temp workaround
-rm ivy-local/org.fusesource.hawtjni/hawtjni-runtime/1.8/hawtjni-runtime-1.8.jar
-ln -s /usr/lib/java/hawtjni/hawtjni-runtime.jar ivy-local/org.fusesource.hawtjni/hawtjni-runtime/1.8/hawtjni-runtime-1.8.jar
-
-# XXX: Link deps, I understand this is a temp measure until sbt gains real xmvn integration
-python climbing-nemesis.py com.typesafe config ivy-local --version 1.0.0
-# XXX: Have to specify exact pom here in case log4j2's compat api gets resolved instead
-python climbing-nemesis.py log4j log4j ivy-local --version 1.2.14 --pom /usr/share/maven-poms/log4j12-*.pom --ignore ant --ignore junit --ignore sun.jdk
-python climbing-nemesis.py org.slf4j slf4j-api ivy-local --version 1.7.5
+ant \
+ -Dbuild.sysclasspath=first \
+ -Djunit.jar.file=`build-classpath junit` \
+ -Dlog4j.jar.file=`build-classpath log4j`
-export SBT_BOOT_DIR=boot
-export SBT_IVY_DIR=ivy-local
-sbt package make-pom doc
-
-%mvn_artifact target/mchange-commons-java-%{version}.pom target/mchange-commons-java-%{version}.jar
+sed -i -e "s|@mchange-commons-java.version.maven@|%{version}|g" \
+ src/maven/pom.xml
%install
-%mvn_install
+# jar
+install -d -m 755 %{buildroot}%{_javadir}
+install -p -m 644 build/%{name}-java-%{version}.jar \
+ %{buildroot}%{_javadir}/%{name}-java.jar
+# javadocs
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr target/api/* %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/%{name}
+
+# pom
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -p -m 644 src/maven/pom.xml \
+ %{buildroot}%{_mavenpomdir}/JPP-%{name}-java.pom
+
+%add_maven_depmap JPP-%{name}-java.pom %{name}-java.jar
-%files -f .mfiles
+%files
%doc LICENSE*
-%dir %{_javadir}/%{name}
+%{_javadir}/*
+%{_mavenpomdir}/JPP-*
+%{_mavendepmapfragdir}/%{name}
%files javadoc
%doc LICENSE*
%{_javadocdir}/%{name}
%changelog
-* Sun Jun 08 2014 Mat Booth <mat.booth at redhat.com> - 0.2.7-1
-- Update to latest upstream version
-- Drop patches
-- Build with sbt and install with maven
-
-* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.3.4-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
* Thu Mar 13 2014 Mat Booth <fedora at matbooth.co.uk> - 0.2.3.4-4
- Require java-headless, rhbz #1068404
diff --git a/sources b/sources
index 9baa9c6..20d527d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c4d9438d2250b0cf3975a0836c8b2cfc mchange-commons-java-0.2.7-final.tar.gz
+3cbe185dfa80c42b18b0185776126b71 mchange-commons-java-0.2.3.4-final.tar.gz
More information about the scm-commits
mailing list