[Pkg-freeipa-devel] [Git][freeipa-team/tomcatjss][upstream] 6 commits: Clean up tomcatjss.spec
Timo Aaltonen
gitlab at salsa.debian.org
Thu Dec 3 12:54:39 GMT 2020
Timo Aaltonen pushed to branch upstream at FreeIPA packaging / tomcatjss
Commits:
1114d351 by Endi S. Dewata at 2020-10-23T13:12:27-05:00
Clean up tomcatjss.spec
The tomcatjss.spec has been modified to remove platforms
that are no longer supported in the current version.
The JSS dependency has been bumped to 4.8.0.
- - - - -
6dfc481f by Alexander Scheel at 2020-11-05T09:38:40-05:00
Add conflicts due to apache-commons-lang3
Older versions of pki-core don't provision apache-commons-lang3, only
lang2. Thus new versions of TomcatJSS conflict with older versions as
they do not work properly together.
Signed-off-by: Alexander Scheel <ascheel at redhat.com>
- - - - -
0b2e7bdf by Alexander Scheel at 2020-11-05T09:38:40-05:00
Update version number in build.xml
As reported by Timo Aaltonen on #dogtag-pki.
Signed-off-by: Alexander Scheel <ascheel at redhat.com>
- - - - -
ff21b92e by Endi S. Dewata at 2020-11-17T12:43:11-06:00
Add TomcatJSS.loadConfig()
The code that loads TomcatJSS configuration from jss.conf or
server.xml has been moved into TomcatJSS.loadConfig(). This
way any application using TomcatJSS object will not need to
know the location of the configuration file.
- - - - -
d7f2c9bb by Endi S. Dewata at 2020-11-17T12:43:11-06:00
Update version number to 7.6.1
- - - - -
33a84ad8 by Endi S. Dewata at 2020-11-17T12:52:55-06:00
Update version number in build.xml
- - - - -
4 changed files:
- build.xml
- src/org/apache/tomcat/util/net/jss/TomcatJSS.java
- src/org/dogtagpki/tomcat/JSSListener.java
- tomcatjss.spec
Changes:
=====================================
build.xml
=====================================
@@ -37,7 +37,7 @@
<property name="Name" value="Tomcat JSS"/>
<property name="name" value="tomcatjss"/>
- <property name="version" value="7.5.0"/>
+ <property name="version" value="7.6.1"/>
<property name="manifest-version" value="${version}-a1"/>
<!--
=====================================
src/org/apache/tomcat/util/net/jss/TomcatJSS.java
=====================================
@@ -21,15 +21,12 @@ package org.apache.tomcat.util.net.jss;
import java.io.File;
import java.io.FileReader;
-import java.io.IOException;
-import java.net.SocketException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Properties;
-import java.util.StringTokenizer;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -45,9 +42,7 @@ import org.mozilla.jss.crypto.AlreadyInitializedException;
import org.mozilla.jss.crypto.CryptoToken;
import org.mozilla.jss.ssl.SSLAlertEvent;
import org.mozilla.jss.ssl.SSLHandshakeCompletedEvent;
-import org.mozilla.jss.ssl.SSLProtocolVariant;
import org.mozilla.jss.ssl.SSLServerSocket;
-import org.mozilla.jss.ssl.SSLSocket;
import org.mozilla.jss.ssl.SSLSocketListener;
import org.mozilla.jss.util.IncorrectPasswordException;
import org.mozilla.jss.util.Password;
@@ -356,6 +351,25 @@ public class TomcatJSS implements SSLSocketListener {
setOcspTimeout(Integer.parseInt(ocspTimeout));
}
+ /**
+ * Load configuration from jss.conf (if available) or server.xml.
+ */
+ public void loadConfig() throws Exception {
+ String catalinaBase = System.getProperty("catalina.base");
+ String jssConf = catalinaBase + "/conf/jss.conf";
+ File configFile = new File(jssConf);
+
+ if (configFile.exists()) {
+ logger.info("TomcatJSS: Loading JSS configuration from " + jssConf);
+ loadJSSConfig(configFile);
+
+ } else {
+ String serverXml = catalinaBase + "/conf/server.xml";
+ logger.info("TomcatJSS: Loading JSS configuration from " + serverXml);
+ loadTomcatConfig(serverXml);
+ }
+ }
+
public void init() throws Exception {
if (initialized) {
=====================================
src/org/dogtagpki/tomcat/JSSListener.java
=====================================
@@ -19,8 +19,6 @@
package org.dogtagpki.tomcat;
-import java.io.File;
-
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
@@ -58,21 +56,7 @@ public class JSSListener implements LifecycleListener {
try {
TomcatJSS tomcatjss = TomcatJSS.getInstance();
-
- String catalinaBase = System.getProperty("catalina.base");
- String jssConf = catalinaBase + "/conf/jss.conf";
- File configFile = new File(jssConf);
-
- if (configFile.exists()) {
- logger.info("JSSListener: Loading JSS configuration from " + jssConf);
- tomcatjss.loadJSSConfig(configFile);
-
- } else {
- String serverXml = catalinaBase + "/conf/server.xml";
- logger.info("JSSListener: Loading JSS configuration from " + serverXml);
- tomcatjss.loadTomcatConfig(serverXml);
- }
-
+ tomcatjss.loadConfig();
tomcatjss.init();
} catch (Exception e) {
=====================================
tomcatjss.spec
=====================================
@@ -7,7 +7,7 @@ URL: http://www.dogtagpki.org/wiki/TomcatJSS
License: LGPLv2+
BuildArch: noarch
-Version: 7.6.0
+Version: 7.6.1
Release: 1%{?_timestamp}%{?_commit_id}%{?dist}
#global _phase -a1
@@ -47,37 +47,17 @@ BuildRequires: jpackage-utils >= 0:1.7.5-15
# SLF4J
BuildRequires: slf4j
-%if 0%{?rhel} && 0%{?rhel} <= 7
-# no slf4j-jdk14
-%else
BuildRequires: slf4j-jdk14
-%endif
# JSS
-%if 0%{?rhel} && 0%{?rhel} <= 7
-BuildRequires: jss >= 4.4.0-7
-%else
-BuildRequires: jss >= 4.7.0
-%endif
+BuildRequires: jss >= 4.8.0
# Tomcat
-%if 0%{?rhel} && 0%{?rhel} <= 7
-BuildRequires: tomcat >= 7.0.69
-%else
-%if 0%{?fedora} && 0%{?fedora} <= 27
-BuildRequires: tomcat >= 8.0.49
-%else
-%if 0%{?fedora} && 0%{?fedora} <= 28
-BuildRequires: tomcat >= 1:8.5.23
-%else
%if 0%{?rhel}
BuildRequires: pki-servlet-engine >= 1:9.0.7
%else
BuildRequires: tomcat >= 1:9.0.7
%endif
-%endif
-%endif
-%endif
################################################################################
# Runtime Dependencies
@@ -94,40 +74,20 @@ Requires: jpackage-utils >= 0:1.7.5-15
# SLF4J
Requires: slf4j
-%if 0%{?rhel}
-# no slf4j-jdk14
-%else
Requires: slf4j-jdk14
-%endif
# JSS
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires: jss >= 4.4.0-7
-%else
-Requires: jss >= 4.7.0
-%endif
+Requires: jss >= 4.8.0
# Tomcat
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires: tomcat >= 7.0.69
-%else
-%if 0%{?fedora} && 0%{?fedora} <= 27
-Requires: tomcat >= 8.0.49
-%else
-%if 0%{?fedora} && 0%{?fedora} <= 28
-Requires: tomcat >= 1:8.5.23
-%else
%if 0%{?rhel}
Requires: pki-servlet-engine >= 1:9.0.7
%else
Requires: tomcat >= 1:9.0.7
%endif
-%endif
-%endif
-%endif
# PKI
-Conflicts: pki-base < 10.6.5
+Conflicts: pki-base < 10.10.0
%if 0%{?rhel}
View it on GitLab: https://salsa.debian.org/freeipa-team/tomcatjss/-/compare/d7f75a2e71673f63c321e803cd68df9faac344f2...33a84ad828570b244227920265b63c123c4f03fc
--
View it on GitLab: https://salsa.debian.org/freeipa-team/tomcatjss/-/compare/d7f75a2e71673f63c321e803cd68df9faac344f2...33a84ad828570b244227920265b63c123c4f03fc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freeipa-devel/attachments/20201203/1f404ba8/attachment-0001.html>
More information about the Pkg-freeipa-devel
mailing list