[Pkg-freeipa-devel] [Git][freeipa-team/tomcatjss][master] 10 commits: Clean up tomcatjss.spec

Timo Aaltonen gitlab at salsa.debian.org
Thu Dec 3 12:54:37 GMT 2020



Timo Aaltonen pushed to branch master 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

- - - - -
fbca7181 by Timo Aaltonen at 2020-12-03T14:36:58+02:00
Merge branch 'upstream'

- - - - -
1c5faed8 by Timo Aaltonen at 2020-12-03T14:37:41+02:00
bump the version

- - - - -
de73fad1 by Timo Aaltonen at 2020-12-03T14:50:29+02:00
bump-version.diff: Dropped.

- - - - -
ff1d3c35 by Timo Aaltonen at 2020-12-03T14:50:46+02:00
releasing package tomcatjss version 7.6.1-1

- - - - -


7 changed files:

- build.xml
- debian/changelog
- − debian/patches/bump-version.diff
- debian/patches/series
- 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"/>
 
   <!--


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+tomcatjss (7.6.1-1) unstable; urgency=medium
+
+  * New upstream release.
+  * bump-version.diff: Dropped.
+
+ -- Timo Aaltonen <tjaalton at debian.org>  Thu, 03 Dec 2020 14:50:31 +0200
+
 tomcatjss (7.6.0-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
debian/patches/bump-version.diff deleted
=====================================
@@ -1,13 +0,0 @@
-diff --git a/build.xml b/build.xml
-index 69864f6..80a60cf 100644
---- a/build.xml
-+++ b/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.0"/>
-   <property name="manifest-version" value="${version}-a1"/>
- 
-   <!--


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 #placeholder
-bump-version.diff


=====================================
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/e23f1de968bbb58e208b77c4d3232c9ec98738ae...ff1d3c3558673337ed77fdb1899a41770bd8461e

-- 
View it on GitLab: https://salsa.debian.org/freeipa-team/tomcatjss/-/compare/e23f1de968bbb58e208b77c4d3232c9ec98738ae...ff1d3c3558673337ed77fdb1899a41770bd8461e
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/2e219142/attachment-0001.html>


More information about the Pkg-freeipa-devel mailing list