diff --git a/maven-build.properties b/maven-build.properties index 333e3e3..b5e7e1e 100644 --- a/maven-build.properties +++ b/maven-build.properties @@ -1,8 +1,9 @@ #Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE! -#Fri Jan 05 13:07:13 CET 2018 +#Thu Feb 08 17:57:52 CET 2018 maven.build.testDir.0=src/test/java plugin.nexus-staging.version=1.6.3 -canl.version=2.2.1 +bc.version=1.58 +canl.version=2.5.0 maven.settings.offline=true plugin.assembly.version=2.4.1 junit.version=4.11 @@ -15,7 +16,7 @@ maven.build.testOutputDir=${maven.build.dir}/test-classes plugin.release.version=2.2.2 jcip.version=1.0 plugin.cobertura.version=2.5.2 -maven.build.finalName=voms-api-java-3.2.0 +maven.build.finalName=voms-api-java-3.3.0 mockito.version=1.9.5 maven.test.reports=${maven.build.dir}/test-reports plugin.source.version=2.2.1 diff --git a/maven-build.xml b/maven-build.xml index 9dd7596..8b822dc 100644 --- a/maven-build.xml +++ b/maven-build.xml @@ -10,7 +10,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -44,20 +44,20 @@ - - - + + + - - - + + + @@ -82,10 +82,10 @@ debug="true" optimize="false" deprecation="true" - target="1.6" + target="1.8" verbose="false" fork="false" - source="1.6"> + source="1.8"> @@ -110,10 +110,10 @@ debug="true" optimize="false" deprecation="true" - target="1.6" + target="1.8" verbose="false" fork="false" - source="1.6"> + source="1.8"> @@ -265,19 +265,9 @@ dest="${maven.repo.local}/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar" usetimestamp="false" ignoreerrors="true"/> - - - - - - + @@ -285,6 +275,16 @@ dest="${maven.repo.local}/commons-io/commons-io/2.4/commons-io-2.4.jar" usetimestamp="false" ignoreerrors="true"/> + + + + null if the - * credential couldn't be loaded - */ - protected X509Credential loadPEMCredential(String privateKeyPath, -- String certificatePath, PasswordFinder pf) { -+ String certificatePath, PasswordSupplier pf) { - - PEMCredential cred = null; - -@@ -120,12 +120,12 @@ - * @param pkcs12FilePath - * the path to the pkcs12 credential - * @param pf -- * a {@link PasswordFinder} used to resolve the private key password -+ * a {@link PasswordSupplier} used to resolve the private key password - * @return the loaded {@link X509Credential}, or null if the - * credential couldn't be loaded - */ - protected X509Credential loadPKCS12Credential(String pkcs12FilePath, -- PasswordFinder pf) { -+ PasswordSupplier pf) { - - KeystoreCredential cred = null; - -diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java ---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100 -+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/DefaultLoadCredentialsStrategy.java 2018-01-05 12:30:30.854119198 +0100 -@@ -15,7 +15,7 @@ - */ - package org.italiangrid.voms.credential.impl; - --import org.bouncycastle.openssl.PasswordFinder; -+import eu.emi.security.authn.x509.helpers.PasswordSupplier; - import org.italiangrid.voms.VOMSError; - import org.italiangrid.voms.credential.LoadCredentialsEventListener; - import org.italiangrid.voms.credential.ProxyNamingPolicy; -@@ -115,7 +115,7 @@ - return val; - } - -- public X509Credential loadCredentials(PasswordFinder pf) { -+ public X509Credential loadCredentials(PasswordSupplier pf) { - - if (pf == null) - throw new IllegalArgumentException( -@@ -163,7 +163,7 @@ - return null; - } - -- protected X509Credential loadPEMCredentialFromEnv(PasswordFinder pf) { -+ protected X509Credential loadPEMCredentialFromEnv(PasswordSupplier pf) { - - String certPath = getFromEnvOrSystemProperty(X509_USER_CERT); - String keyPath = getFromEnvOrSystemProperty(X509_USER_KEY); -@@ -175,7 +175,7 @@ - return null; - } - -- protected X509Credential loadPKCS12CredentialFromEnv(PasswordFinder pf) { -+ protected X509Credential loadPKCS12CredentialFromEnv(PasswordSupplier pf) { - - String pkcs12Path = getFromEnvOrSystemProperty(PKCS12_USER_CERT); - -@@ -185,7 +185,7 @@ - return null; - } - -- protected X509Credential loadPKCS12CredentialsFromGlobusDir(PasswordFinder pf) { -+ protected X509Credential loadPKCS12CredentialsFromGlobusDir(PasswordSupplier pf) { - - String credPath = String.format("%s/%s", home, - GLOBUS_PKCS12_CRED_PATH_SUFFIX); -@@ -193,7 +193,7 @@ - - } - -- protected X509Credential loadPEMCredentialsFromGlobusDir(PasswordFinder pf) { -+ protected X509Credential loadPEMCredentialsFromGlobusDir(PasswordSupplier pf) { - - String certPath = String.format("%s/%s", home, GLOBUS_PEM_CERT_PATH_SUFFIX); - String keyPath = String.format("%s/%s", home, GLOBUS_PEM_KEY_PATH_SUFFIX); -diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java ---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100 -+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/LoadCredentialsStrategy.java 2018-01-05 12:30:30.852119219 +0100 -@@ -15,7 +15,7 @@ - */ - package org.italiangrid.voms.credential; - --import org.bouncycastle.openssl.PasswordFinder; -+import eu.emi.security.authn.x509.helpers.PasswordSupplier; - - import eu.emi.security.authn.x509.X509Credential; - -@@ -37,5 +37,5 @@ - * @return an {@link X509Credential}, or null if no credential - * was found - */ -- public X509Credential loadCredentials(PasswordFinder passwordFinder); -+ public X509Credential loadCredentials(PasswordSupplier passwordFinder); - } -diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/UserCredentials.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/UserCredentials.java ---- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/UserCredentials.java 2016-02-11 16:57:01.000000000 +0100 -+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/UserCredentials.java 2018-01-05 12:30:30.852119219 +0100 -@@ -15,7 +15,7 @@ - */ - package org.italiangrid.voms.credential; - --import org.bouncycastle.openssl.PasswordFinder; -+import eu.emi.security.authn.x509.helpers.PasswordSupplier; - import org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy; - - import eu.emi.security.authn.x509.X509Credential; -@@ -43,7 +43,7 @@ - - public static X509Credential loadCredentials(final char[] keyPassword) { - -- PasswordFinder pf = new PasswordFinder() { -+ PasswordSupplier pf = new PasswordSupplier() { - - public char[] getPassword() { - -@@ -54,7 +54,7 @@ - return loadCredentialsStrategy.loadCredentials(pf); - } - -- public static X509Credential loadCredentials(PasswordFinder passwordFinder) { -+ public static X509Credential loadCredentials(PasswordSupplier passwordFinder) { - - return loadCredentialsStrategy.loadCredentials(passwordFinder); - } -diff -ur voms-api-java-3.2.0.orig/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java voms-api-java-3.2.0/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java ---- voms-api-java-3.2.0.orig/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java 2016-02-11 16:57:01.000000000 +0100 -+++ voms-api-java-3.2.0/src/test/java/org/italiangrid/voms/test/cred/TestLoadCredential.java 2018-01-05 12:30:30.852119219 +0100 -@@ -15,7 +15,7 @@ - */ - package org.italiangrid.voms.test.cred; - --import org.bouncycastle.openssl.PasswordFinder; -+import eu.emi.security.authn.x509.helpers.PasswordSupplier; - import org.italiangrid.voms.credential.impl.AbstractLoadCredentialsStrategy; - import org.italiangrid.voms.credential.impl.DefaultLoadCredentialsStrategy; - import org.italiangrid.voms.util.FilePermissionHelper; -@@ -51,7 +51,7 @@ - + "/.globus/usercred.p12"); - } - -- static class TestPasswordFinder implements PasswordFinder { -+ static class TestPasswordFinder implements PasswordSupplier { - - public char[] getPassword() { - -@@ -59,7 +59,7 @@ - } - } - -- static class NullPasswordFinder implements PasswordFinder { -+ static class NullPasswordSupplier implements PasswordSupplier { - - public char[] getPassword() { - -@@ -72,7 +72,7 @@ - - AbstractLoadCredentialsStrategy strategy = new DefaultLoadCredentialsStrategy( - emptyHome); -- X509Credential cred = strategy.loadCredentials(new NullPasswordFinder()); -+ X509Credential cred = strategy.loadCredentials(new NullPasswordSupplier()); - Assert.assertNull(cred); - } - -@@ -81,7 +81,7 @@ - - AbstractLoadCredentialsStrategy strategy = new DefaultLoadCredentialsStrategy( - emptyGlobusHome); -- X509Credential cred = strategy.loadCredentials(new NullPasswordFinder()); -+ X509Credential cred = strategy.loadCredentials(new NullPasswordSupplier()); - Assert.assertNull(cred); - } - diff --git a/voms-api-java.spec b/voms-api-java.spec index 17be463..cb4cf88 100644 --- a/voms-api-java.spec +++ b/voms-api-java.spec @@ -1,11 +1,11 @@ Name: voms-api-java -Version: 3.2.0 -Release: 7%{?dist} +Version: 3.3.0 +Release: 1%{?dist} Summary: Virtual Organization Membership Service Java API License: ASL 2.0 URL: https://wiki.italiangrid.it/VOMS -Source0: https://github.com/italiangrid/%{name}/archive/v%{version}.tar.gz +Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # These are build instructions for ant generated from the maven # build instructions using the maven ant plugin. # These are used for building on EPEL 6 since there is no maven @@ -15,15 +15,15 @@ Source2: maven-build.xml Source3: maven-build.properties # Disable tests using non-local network interface Patch0: %{name}-no-local.patch -# Adapt to canl-java version 2.5 -Patch1: %{name}-canl-2.5.patch BuildArch: noarch +# There is no jakarta-commons-io for ppc64 in EPEL6 +ExcludeArch: ppc64 -BuildRequires: java-devel >= 1:1.6 +BuildRequires: java-1.8.0-openjdk-devel BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: canl-java >= 2.5 -Requires: java >= 1:1.6 +Requires: java >= 1:1.8 Requires: jpackage-utils Requires: canl-java >= 2.5 Provides: voms-api-java3 = %{version}-%{release} @@ -41,6 +41,7 @@ This package provides a java client API for VOMS. %package javadoc Summary: Virtual Organization Membership Service Java API Documentation +Requires: jpackage-utils Provides: voms-api-java3-javadoc = %{version}-%{release} Obsoletes: voms-api-java3-javadoc < 3.1 @@ -50,13 +51,12 @@ Virtual Organization Membership Service (VOMS) Java API Documentation. %prep %setup -q %patch0 -p1 -%patch1 -p1 cp -p %{SOURCE1} . cp -p %{SOURCE2} . cp -p %{SOURCE3} . %build -export CLASSPATH=$(build-classpath bcprov bcpkix commons-io canl) +export CLASSPATH=$(build-classpath bcprov-1.58 bcpkix-1.58 commons-io canl) # The tests use mockito which is not available in EPEL 6 - skipping tests %ant -Dbuild.sysclasspath=last -Dmaven.test.skip=true package javadoc @@ -81,7 +81,7 @@ cp -pr target/site/apidocs %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}.jar %{_mavenpomdir}/JPP-%{name}.pom -%{_mavendepmapfragdir}/%{name} +%config(noreplace) %{_mavendepmapfragdir}/%{name} %doc AUTHORS README.md %license LICENSE @@ -90,6 +90,11 @@ cp -pr target/site/apidocs %{buildroot}%{_javadocdir}/%{name} %license LICENSE %changelog +* Thu Feb 08 2018 Mattias Ellert - 3.3.0-1 +- Build against bouncycastle1.58 +- Update to version 3.3.0 - matches canl-java 2.5.x +- Drop patch voms-api-java-canl-2.5.patch + * Thu Jan 11 2018 Mattias Ellert - 3.2.0-7 - Add Provides/Obsoletes voms-api-java3-javadoc