Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Mattias Ellert
f0bdaffe90 Update to version 3.3.2 - matches canl-java 2.6.x
Drop patch voms-api-java-no-local.patch
2020-10-14 10:45:45 +02:00
Mattias Ellert
dd32df4992 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
2018-02-08 18:15:26 +01:00
Mattias Ellert
30d201a713 Add Provides/Obsoletes voms-api-java3-javadoc 2018-01-11 15:32:06 +01:00
Mattias Ellert
4919459559 Add Provides/Obsoletes voms-api-java3 2018-01-11 15:07:03 +01:00
Mattias Ellert
f3218ffdb7 Create EPEL 6 package using the maven ant plugin 2018-01-06 15:27:21 +01:00
7 changed files with 429 additions and 248 deletions

23
build.xml Normal file
View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<project name="voms-api-java" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Import maven-build.xml into the current project -->
<!-- ====================================================================== -->
<import file="maven-build.xml"/>
<!-- ====================================================================== -->
<!-- Help target -->
<!-- ====================================================================== -->
<target name="help">
<echo message="Please run: $ant -projecthelp"/>
</target>
</project>

39
maven-build.properties Normal file
View file

@ -0,0 +1,39 @@
#Generated by Maven Ant Plugin - DO NOT EDIT THIS FILE!
#Wed Oct 14 10:08:57 CEST 2020
maven.build.testDir.0=src/test/java
plugin.nexus-staging.version=1.6.3
bc.version=1.58
canl.version=2.6.0
maven.settings.offline=true
plugin.assembly.version=2.4.1
junit.version=4.11
maven.settings.interactiveMode=true
assembly.javadoc.dir=/usr/share/javadoc/voms-api-java
plugin.deploy.version=2.8.2
maven.reporting.outputDirectory=${maven.build.dir}/site
project.build.sourceEncoding=UTF-8
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.3.2
mockito.version=1.9.5
maven.test.reports=${maven.build.dir}/test-reports
plugin.source.version=2.2.1
hamcrest.version=1.3
maven.repo.local=${user.home}/.m2/repository
maven.build.dir=target
maven.build.outputDir=${maven.build.dir}/classes
project.reporting.outputEncoding=UTF-8
plugin.jar.version=2.5
project.build.directory=${maven.build.dir}
assembly.doc.dir=/usr/share/doc/voms-api-java
maven.build.resourceDir.0=src/main/resources
plugin.compiler.version=3.1
plugin.gpg.version=1.5
maven.build.srcDir.0=src/main/java
assembly.java.dir=/usr/share/java
maven.build.testResourceDir.0=src/test/resources
project.build.outputDirectory=${maven.build.outputDir}
plugin.license.version=1.9.0
plugin.javadoc.version=2.9.1

298
maven-build.xml Normal file
View file

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Any modifications will be overwritten. -->
<!-- -->
<!-- Generated by Maven Ant Plugin on 10/14/20 10:08 AM -->
<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<project name="voms-api-java-from-maven" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="${user.home}/.m2/maven.properties"/>
<property file="maven-build.properties"/>
<property name="maven.build.finalName" value="voms-api-java-3.3.2"/>
<property name="maven.build.dir" value="target"/>
<property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
<property name="maven.build.srcDir.0" value="src/main/java"/>
<property name="maven.build.resourceDir.0" value="src/main/resources"/>
<property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
<property name="maven.build.testDir.0" value="src/test/java"/>
<property name="maven.build.testResourceDir.0" value="src/test/resources"/>
<property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
<property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
<property name="maven.settings.offline" value="false"/>
<property name="maven.settings.interactiveMode" value="true"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<pathelement location="${maven.repo.local}/eu/eu-emi/security/canl/2.6.0/canl-2.6.0.jar"/>
<pathelement location="${maven.repo.local}/commons-io/commons-io/2.6/commons-io-2.6.jar"/>
<pathelement location="${maven.repo.local}/org/bouncycastle/bcpkix-jdk15on/1.58/bcpkix-jdk15on-1.58.jar"/>
<pathelement location="${maven.repo.local}/org/bouncycastle/bcprov-jdk15on/1.58/bcprov-jdk15on-1.58.jar"/>
</path>
<path id="build.test.classpath">
<pathelement location="${maven.repo.local}/junit/junit/4.11/junit-4.11.jar"/>
<pathelement location="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
<pathelement location="${maven.repo.local}/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar"/>
<pathelement location="${maven.repo.local}/eu/eu-emi/security/canl/2.6.0/canl-2.6.0.jar"/>
<pathelement location="${maven.repo.local}/commons-io/commons-io/2.6/commons-io-2.6.jar"/>
<pathelement location="${maven.repo.local}/org/bouncycastle/bcpkix-jdk15on/1.58/bcpkix-jdk15on-1.58.jar"/>
<pathelement location="${maven.repo.local}/org/bouncycastle/bcprov-jdk15on/1.58/bcprov-jdk15on-1.58.jar"/>
<pathelement location="${maven.repo.local}/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar"/>
<pathelement location="${maven.repo.local}/org/objenesis/objenesis/1.0/objenesis-1.0.jar"/>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${maven.build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" depends="get-deps" description="Compile the code">
<mkdir dir="${maven.build.outputDir}"/>
<javac destdir="${maven.build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="1.8"
verbose="false"
fork="false"
source="1.8">
<src>
<pathelement location="${maven.build.srcDir.0}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${maven.build.outputDir}">
<fileset dir="${maven.build.resourceDir.0}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Test-compilation target -->
<!-- ====================================================================== -->
<target name="compile-tests"
depends="compile"
description="Compile the test code"
unless="maven.test.skip">
<mkdir dir="${maven.build.testOutputDir}"/>
<javac destdir="${maven.build.testOutputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
target="1.8"
verbose="false"
fork="false"
source="1.8">
<src>
<pathelement location="${maven.build.testDir.0}"/>
</src>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${maven.build.outputDir}"/>
</classpath>
</javac>
<copy todir="${maven.build.testOutputDir}">
<fileset dir="${maven.build.testResourceDir.0}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Run all tests -->
<!-- ====================================================================== -->
<target name="test"
depends="compile-tests, junit-missing"
unless="junit.skipped"
description="Run the test cases">
<mkdir dir="${maven.test.reports}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
<sysproperty key="basedir" value="."/>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${maven.build.outputDir}"/>
<pathelement location="${maven.build.testOutputDir}"/>
</classpath>
<batchtest todir="${maven.test.reports}" unless="test">
<fileset dir="${maven.build.testDir.0}">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
<batchtest todir="${maven.test.reports}" if="test">
<fileset dir="${maven.build.testDir.0}">
<include name="**/${test}.java"/>
<exclude name="**/*Abstract*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-junit-present">
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
</target>
<target name="test-junit-status"
depends="test-junit-present">
<condition property="junit.missing">
<and>
<isfalse value="${junit.present}"/>
<isfalse value="${maven.test.skip}"/>
</and>
</condition>
<condition property="junit.skipped">
<or>
<isfalse value="${junit.present}"/>
<istrue value="${maven.test.skip}"/>
</or>
</condition>
</target>
<target name="junit-missing"
depends="test-junit-status"
if="junit.missing">
<echo>=================================== WARNING ===================================</echo>
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
<echo>===============================================================================</echo>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${maven.build.srcDir.0}"
packagenames="*"
destdir="${maven.reporting.outputDirectory}/apidocs"
access="protected"
old="false"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="UTF-8"
linksource="false"
breakiterator="false"/>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
compress="true"
index="false"
basedir="${maven.build.outputDir}"
excludes="**/package.html"/>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
<!-- ====================================================================== -->
<!-- Download dependencies target -->
<!-- ====================================================================== -->
<target name="test-offline">
<condition property="maven.mode.offline">
<equals arg1="${maven.settings.offline}" arg2="true"/>
</condition>
</target>
<target name="get-deps"
depends="test-offline"
description="Download all dependencies"
unless="maven.mode.offline">
<mkdir dir="${maven.repo.local}"/>
<mkdir dir="${maven.repo.local}/junit/junit/4.11"/>
<get src="https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar"
dest="${maven.repo.local}/junit/junit/4.11/junit-4.11.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3"/>
<get src="https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
dest="${maven.repo.local}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/hamcrest/hamcrest-library/1.3"/>
<get src="https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar"
dest="${maven.repo.local}/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/eu/eu-emi/security/canl/2.6.0"/>
<get src="https://repo.maven.apache.org/maven2/eu/eu-emi/security/canl/2.6.0/canl-2.6.0.jar"
dest="${maven.repo.local}/eu/eu-emi/security/canl/2.6.0/canl-2.6.0.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/commons-io/commons-io/2.6"/>
<get src="https://repo.maven.apache.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.jar"
dest="${maven.repo.local}/commons-io/commons-io/2.6/commons-io-2.6.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/bouncycastle/bcpkix-jdk15on/1.58"/>
<get src="https://repo.maven.apache.org/maven2/org/bouncycastle/bcpkix-jdk15on/1.58/bcpkix-jdk15on-1.58.jar"
dest="${maven.repo.local}/org/bouncycastle/bcpkix-jdk15on/1.58/bcpkix-jdk15on-1.58.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/bouncycastle/bcprov-jdk15on/1.58"/>
<get src="https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.58/bcprov-jdk15on-1.58.jar"
dest="${maven.repo.local}/org/bouncycastle/bcprov-jdk15on/1.58/bcprov-jdk15on-1.58.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/mockito/mockito-core/1.9.5"/>
<get src="https://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar"
dest="${maven.repo.local}/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar"
usetimestamp="false"
ignoreerrors="true"/>
<mkdir dir="${maven.repo.local}/org/objenesis/objenesis/1.0"/>
<get src="https://repo.maven.apache.org/maven2/org/objenesis/objenesis/1.0/objenesis-1.0.jar"
dest="${maven.repo.local}/org/objenesis/objenesis/1.0/objenesis-1.0.jar"
usetimestamp="false"
ignoreerrors="true"/>
</target>
</project>

View file

@ -1 +1 @@
e45f034c5477b9310043b31d1a310b98 v3.2.0.tar.gz SHA512 (voms-api-java-3.3.2.tar.gz) = 7de09abd3e1605a7596c29bb0f16553945d6c13098c667451580ed4e22a671814db254355b56ec12696fce011854487510fb9e627e4f13474fbfedec6db1c422

View file

@ -1,197 +0,0 @@
diff -ur voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java
--- voms-api-java-3.2.0.orig/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java 2016-02-11 16:57:01.000000000 +0100
+++ voms-api-java-3.2.0/src/main/java/org/italiangrid/voms/credential/impl/AbstractLoadCredentialsStrategy.java 2018-01-05 12:30:30.853119209 +0100
@@ -19,7 +19,7 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;
-import org.bouncycastle.openssl.PasswordFinder;
+import eu.emi.security.authn.x509.helpers.PasswordSupplier;
import org.italiangrid.voms.credential.LoadCredentialsEventListener;
import org.italiangrid.voms.credential.LoadCredentialsStrategy;
import org.italiangrid.voms.credential.VOMSEnvironmentVariables;
@@ -83,13 +83,13 @@
* @param certificatePath
* the path to the certificate
* @param pf
- * a {@link PasswordFinder} used to resolve the private key password
+ * a {@link PasswordSupplier} used to resolve the private key password
* when needed
* @return the loaded {@link X509Credential}, or <code>null</code> 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 <code>null</code> 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 <code>null</code> 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);
}

View file

@ -1,21 +0,0 @@
diff -ur voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java
--- voms-api-java-3.0.5.orig/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java 2014-12-09 10:55:31.000000000 +0100
+++ voms-api-java-3.0.5/src/test/java/org/italiangrid/voms/test/ac/TestACValidator.java 2014-12-16 14:00:01.144948880 +0100
@@ -351,7 +351,7 @@
.getValidationErrors().get(0).getMessage());
}
- @Test
+ // @Test
public void testTargetValidationSuccess() throws Exception {
VOMSAA aa = Utils.getVOMSAA();
@@ -379,7 +379,7 @@
Assert.assertTrue(r.isValid());
}
- @Test
+ // @Test
public void testTargetValidationFailure() throws Exception {
VOMSAA aa = Utils.getVOMSAA();

View file

@ -1,23 +1,31 @@
Name: voms-api-java Name: voms-api-java
Version: 3.2.0 Version: 3.3.2
Release: 5%{?dist} Release: 1%{?dist}
Summary: Virtual Organization Membership Service Java API Summary: Virtual Organization Membership Service Java API
License: ASL 2.0 License: ASL 2.0
URL: https://wiki.italiangrid.it/VOMS 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
# Disable tests using non-local network interface # These are build instructions for ant generated from the maven
Patch0: %{name}-no-local.patch # build instructions using the maven ant plugin.
# Adapt to canl-java version 2.5 # These are used for building on EPEL 6 since there is no maven
Patch1: %{name}-canl-2.5.patch # available there.
Source1: build.xml
Source2: maven-build.xml
Source3: maven-build.properties
BuildArch: noarch BuildArch: noarch
# There is no jakarta-commons-io for ppc64 in EPEL6
ExcludeArch: ppc64
BuildRequires: maven-local BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: mvn(eu.eu-emi.security:canl) >= 2.5 BuildRequires: jpackage-utils
BuildRequires: mvn(junit:junit) BuildRequires: ant
BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: canl-java >= 2.6
BuildRequires: mvn(net.jcip:jcip-annotations) Requires: java >= 1:1.8
Requires: mvn(eu.eu-emi.security:canl) >= 2.5 Requires: jpackage-utils
Requires: canl-java >= 2.6
Provides: voms-api-java3 = %{version}-%{release}
Obsoletes: voms-api-java3 < 3.1
%description %description
The Virtual Organization Membership Service (VOMS) is an attribute authority The Virtual Organization Membership Service (VOMS) is an attribute authority
@ -31,42 +39,73 @@ This package provides a java client API for VOMS.
%package javadoc %package javadoc
Summary: Virtual Organization Membership Service Java API Documentation 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
%description javadoc %description javadoc
Virtual Organization Membership Service (VOMS) Java API Documentation. Virtual Organization Membership Service (VOMS) Java API Documentation.
%prep %prep
%setup -q %setup -q
%patch0 -p1 cp -p %{SOURCE1} .
%patch1 -p1 cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
# Do not create source jars
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
# Cobertura no longer in Fedora due to licensing issues
%pom_remove_plugin org.codehaus.mojo:cobertura-maven-plugin
# Remove license plugin
%pom_remove_plugin com.mycila.maven-license-plugin:maven-license-plugin
%build %build
%mvn_build 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
%install %install
%mvn_install -J target/site/javadoc/apidocs mkdir -p %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}.jar
%files -f .mfiles mkdir -p %{buildroot}%{_mavenpomdir}
%dir %{_javadir}/%{name} install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap org.italiangrid %{name} %{version} JPP %{name}
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs %{buildroot}%{_javadocdir}/%{name}
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%{_javadir}/%{name}.jar
%{_mavenpomdir}/JPP-%{name}.pom
%config(noreplace) %{_mavendepmapfragdir}/%{name}
%doc AUTHORS README.md %doc AUTHORS README.md
%license LICENSE %license LICENSE
%files javadoc -f .mfiles-javadoc %files javadoc
%doc %{_javadocdir}/%{name}
%license LICENSE %license LICENSE
%changelog %changelog
* Wed Oct 14 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.2-1
- Update to version 3.3.2 - matches canl-java 2.6.x
- Drop patch voms-api-java-no-local.patch
* Thu Feb 08 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 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 <mattias.ellert@physics.uu.se> - 3.2.0-7
- Add Provides/Obsoletes voms-api-java3-javadoc
* Thu Jan 11 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.2.0-6
- Add Provides/Obsoletes voms-api-java3
* Fri Jan 05 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.2.0-5 * Fri Jan 05 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.2.0-5
- Adapt to canl-java 2.5 - Adapt to canl-java 2.5
- Use jcip-annotations for EPEL 7 build - Use jcip-annotations for EPEL 7 build
- Create EPEL 6 package using the maven ant plugin
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-4 * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild