[Pkg-freeipa-devel] [Git][freeipa-team/tomcatjss][upstream] 14 commits: " Fix Bug 2001169 - Audit event 'ACCESS_SESSION_ESTABLISH' is not gene… (#43)

Timo Aaltonen (@tjaalton) gitlab at salsa.debian.org
Tue Mar 29 08:33:49 BST 2022



Timo Aaltonen pushed to branch upstream at FreeIPA packaging / tomcatjss


Commits:
bc227f32 by c-dorney at 2021-11-11T10:55:39+00:00
" Fix Bug 2001169 - Audit event 'ACCESS_SESSION_ESTABLISH' is not gene… (#43)

* Fix Bug 2001169 - Audit event 'ACCESS_SESSION_ESTABLISH' is not generating for PKI instances acting as Server [10.2.1] (#40)

This fix allows us to actually see ssl connection events in the audit log from the pki /server perspective.
    This fill will also require support bug fixes for both jss and pki.


Co-authored-by: jmagne <jmagne at redhat.com>
- - - - -
5ee5b6a3 by Endi S. Dewata at 2021-11-23T00:26:46+07:00
Switch to Java 17

- - - - -
d8808145 by Endi S. Dewata at 2021-12-14T08:50:04+07:00
Fix CA test

- - - - -
dd96b790 by Endi S. Dewata at 2021-12-14T08:50:04+07:00
Remove versioned JAR file

- - - - -
a52f7e76 by Endi S. Dewata at 2021-12-14T10:27:22+07:00
Drop unused build script

- - - - -
1384f526 by Endi S. Dewata at 2022-01-04T22:01:19+07:00
Fix build warning

- - - - -
5695e53d by Endi S. Dewata at 2022-01-04T22:01:39+07:00
Update install.doc.dir property

- - - - -
dbb14e0a by Endi S. Dewata at 2022-01-04T22:01:43+07:00
Clean up build.sh

- - - - -
c2c91c5a by Endi S. Dewata at 2022-01-19T14:41:15-06:00
Add options for spec, version, and release into build.sh

- - - - -
a8519c85 by Endi S. Dewata at 2022-01-19T14:42:59-06:00
Add %build in tomcatjss.spec

- - - - -
dfe81444 by Endi S. Dewata at 2022-01-24T08:56:06-06:00
Update version number to 8.1.0

- - - - -
b61346cc by Endi S. Dewata at 2022-01-24T08:56:06-06:00
Remove RPM dependency in build.sh

The build.sh has been modified to call ant directly instead
of rpmbuild such that it can be used on platforms that do not
use RPM. The option to build RPM packages is still available.

The tomcatjss.spec has been modified to call build.sh instead
of ant.

- - - - -
f38cbdbe by Chris Kelley at 2022-02-14T16:40:50+00:00
Update to require JSS 5.1.0

- - - - -
7ca77127 by Chris Kelley at 2022-02-14T16:45:38+00:00
Update version to v8.1.0

- - - - -


9 changed files:

- .github/workflows/pki-tests.yml
- build.sh
- build.xml
- − build_tomcatjss
- + docs/changes/v8.1.0/Development-Changes.adoc
- + docs/changes/v8.1.0/Packaging-Changes.adoc
- − rhel.properties
- tomcat-9.0/src/main/java/org/dogtagpki/tomcat/JSSContext.java
- tomcatjss.spec


Changes:

=====================================
.github/workflows/pki-tests.yml
=====================================
@@ -203,7 +203,7 @@ jobs:
           docker exec pki pki client-cert-import ca_signing --ca-cert ca_signing.crt
           docker exec pki pki client-cert-import \
               --pkcs12 /root/.dogtag/pki-tomcat/ca_admin_cert.p12 \
-              --pkcs12-password-file /root/.dogtag/pki-tomcat/ca/pkcs12_password.conf
+              --pkcs12-password Secret.123
           docker exec pki pki -n caadmin ca-user-show caadmin
 
       - name: Gather artifacts


=====================================
build.sh
=====================================
@@ -5,15 +5,21 @@
 # All rights reserved.
 # END COPYRIGHT BLOCK
 
-NAME=tomcatjss
-
 SCRIPT_PATH="$(readlink -f "$0")"
 SCRIPT_NAME="$(basename "$SCRIPT_PATH")"
-
 SRC_DIR="$(dirname "$SCRIPT_PATH")"
+
+NAME=tomcatjss
 WORK_DIR="$HOME/build/$NAME"
+JNI_DIR="/usr/lib/java"
+JAVA_DIR="/usr/share/java"
+DOC_DIR="/usr/share/doc"
+INSTALL_DIR=
 
 SOURCE_TAG=
+SPEC_TEMPLATE=
+VERSION=
+RELEASE=
 
 WITH_TIMESTAMP=
 WITH_COMMIT_ID=
@@ -26,8 +32,15 @@ usage() {
     echo "Usage: $SCRIPT_NAME [OPTIONS] <target>"
     echo
     echo "Options:"
-    echo "    --work-dir=<path>      Working directory (default: $WORK_DIR)."
+    echo "    --work-dir=<path>      Working directory (default: $WORK_DIR)"
+    echo "    --jni-dir=<path>       JNI directory (default: $JNI_DIR)"
+    echo "    --java-dir=<path>      Java directory (default: $JAVA_DIR)"
+    echo "    --doc-dir=<path>       Documentation directory (default: $DOC_DIR)"
+    echo "    --install-dir=<path>   Installation directory"
     echo "    --source-tag=<tag>     Generate RPM sources from a source tag."
+    echo "    --spec=<file>          Use the specified RPM spec."
+    echo "    --version=<version>    Use the specified version."
+    echo "    --release=<release>    Use the specified release."
     echo "    --with-timestamp       Append timestamp to release number."
     echo "    --with-commit-id       Append commit ID to release number."
     echo "    --dist=<name>          Distribution name (e.g. fc28)."
@@ -36,10 +49,12 @@ usage() {
     echo "    --help                 Show help message."
     echo
     echo "Target:"
-    echo "    src    Generate RPM sources."
-    echo "    spec   Generate RPM spec."
-    echo "    srpm   Build SRPM package."
-    echo "    rpm    Build RPM packages (default)."
+    echo "    dist     Build JSS binaries (default)."
+    echo "    install  Install JSS binaries."
+    echo "    src      Generate RPM sources."
+    echo "    spec     Generate RPM spec."
+    echo "    srpm     Build SRPM package."
+    echo "    rpm      Build RPM packages."
 }
 
 generate_rpm_sources() {
@@ -55,7 +70,7 @@ generate_rpm_sources() {
         git -C "$SRC_DIR" \
             archive \
             --format=tar.gz \
-            --prefix $NAME-$VERSION${_PHASE}/ \
+            --prefix "$NAME-$VERSION${_PHASE}/" \
             -o "$WORK_DIR/SOURCES/$TARBALL" \
             $SOURCE_TAG
 
@@ -80,6 +95,9 @@ generate_rpm_sources() {
         --transform "s,^./,$NAME-$VERSION${_PHASE}/," \
         --exclude .git \
         --exclude bin \
+        --exclude build \
+        --exclude dist \
+        --exclude target \
         -C "$SRC_DIR" \
         .
 }
@@ -118,7 +136,7 @@ generate_rpm_spec() {
 
     # hard-code patch
     if [ "$PATCH" != "" ] ; then
-        commands="${commands}; s/# Patch: tomcatjss-VERSION-RELEASE.patch/Patch: $PATCH/g"
+        commands="${commands}; s/# Patch: $NAME-VERSION-RELEASE.patch/Patch: $PATCH/g"
     fi
 
     sed "$commands" "$SPEC_TEMPLATE" > "$WORK_DIR/SPECS/$RPM_SPEC"
@@ -138,9 +156,30 @@ while getopts v-: arg ; do
         work-dir=?*)
             WORK_DIR="$(readlink -f "$LONG_OPTARG")"
             ;;
+        jni-dir=?*)
+            JNI_DIR=$(readlink -f "$LONG_OPTARG")
+            ;;
+        java-dir=?*)
+            JAVA_DIR=$(readlink -f "$LONG_OPTARG")
+            ;;
+        doc-dir=?*)
+            DOC_DIR=$(readlink -f "$LONG_OPTARG")
+            ;;
+        install-dir=?*)
+            INSTALL_DIR=$(readlink -f "$LONG_OPTARG")
+            ;;
         source-tag=?*)
             SOURCE_TAG="$LONG_OPTARG"
             ;;
+        spec=?*)
+            SPEC_TEMPLATE="$LONG_OPTARG"
+            ;;
+        version=?*)
+            VERSION="$LONG_OPTARG"
+            ;;
+        release=?*)
+            RELEASE="$LONG_OPTARG"
+            ;;
         with-timestamp)
             WITH_TIMESTAMP=true
             ;;
@@ -164,7 +203,7 @@ while getopts v-: arg ; do
         '')
             break # "--" terminates argument processing
             ;;
-        work-dir* | source-tag* | dist*)
+        work-dir* | jni-dir* | java-dir* | doc-dir* | install-dir* | source-tag* | spec* | version* | release* | dist*)
             echo "ERROR: Missing argument for --$OPTARG option" >&2
             exit 1
             ;;
@@ -184,17 +223,23 @@ done
 shift $((OPTIND-1))
 
 if [ "$#" -lt 1 ] ; then
-    BUILD_TARGET=rpm
+    BUILD_TARGET=dist
 else
     BUILD_TARGET=$1
 fi
 
 if [ "$DEBUG" = true ] ; then
     echo "WORK_DIR: $WORK_DIR"
+    echo "JNI_DIR: $JNI_DIR"
+    echo "JAVA_DIR: $JAVA_DIR"
+    echo "DOC_DIR: $DOC_DIR"
+    echo "INSTALL_DIR: $INSTALL_DIR"
     echo "BUILD_TARGET: $BUILD_TARGET"
 fi
 
-if [ "$BUILD_TARGET" != "src" ] &&
+if [ "$BUILD_TARGET" != "dist" ] &&
+        [ "$BUILD_TARGET" != "install" ] &&
+        [ "$BUILD_TARGET" != "src" ] &&
         [ "$BUILD_TARGET" != "spec" ] &&
         [ "$BUILD_TARGET" != "srpm" ] &&
         [ "$BUILD_TARGET" != "rpm" ] ; then
@@ -202,14 +247,93 @@ if [ "$BUILD_TARGET" != "src" ] &&
     exit 1
 fi
 
-SPEC_TEMPLATE="$SRC_DIR/$NAME.spec"
-VERSION="$(rpmspec -P "$SPEC_TEMPLATE" | grep "^Version:" | awk '{print $2;}')"
+mkdir -p "$WORK_DIR"
+cd "$WORK_DIR"
+
+if [ "$SPEC_TEMPLATE" = "" ] ; then
+    SPEC_TEMPLATE="$SRC_DIR/$NAME.spec"
+fi
+
+if [ "$VERSION" = "" ] ; then
+    # if version not specified, get from spec template
+    VERSION="$(rpmspec -P "$SPEC_TEMPLATE" | grep "^Version:" | awk '{print $2;}')"
+fi
 
 if [ "$DEBUG" = true ] ; then
     echo "VERSION: $VERSION"
 fi
 
-RELEASE="$(rpmspec -P "$SPEC_TEMPLATE" --undefine dist | grep "^Release:" | awk '{print $2;}')"
+if [ "$BUILD_TARGET" = "dist" ] ; then
+
+    if [ "$VERBOSE" = "true" ] ; then
+        echo "Building $NAME-$VERSION"
+    fi
+
+    # get Tomcat <major>.<minor> version number
+    TOMCAT_VERSION=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'`
+
+    if [ "$VERBOSE" = "true" ] ; then
+        echo "Tomcat: $TOMCAT_VERSION"
+    fi
+
+    OPTIONS=()
+
+    if [ "$VERBOSE" = "true" ] ; then
+        OPTIONS+=(-v)
+    fi
+
+    OPTIONS+=(-f $SRC_DIR/build.xml)
+    OPTIONS+=(-Dversion=$VERSION)
+    OPTIONS+=(-Djnidir=$JNI_DIR)
+    OPTIONS+=(-Dsrc.dir=tomcat-$TOMCAT_VERSION)
+    OPTIONS+=(-Dbuild.dir=$WORK_DIR)
+
+    echo ant "${OPTIONS[@]}" compile package
+    ant "${OPTIONS[@]}" compile package
+
+    echo
+    echo "Build artifacts:"
+    echo "- Java archive: $WORK_DIR/build/jars/$NAME.jar"
+    echo
+    echo "To install the build: $0 install"
+    echo "To create RPM packages: $0 rpm"
+    echo
+
+    exit
+fi
+
+if [ "$BUILD_TARGET" = "install" ] ; then
+
+    if [ "$VERBOSE" = true ] ; then
+        echo "Installing $NAME-$VERSION"
+    fi
+
+    OPTIONS=()
+
+    if [ "$VERBOSE" = "true" ] ; then
+        OPTIONS+=(-v)
+    fi
+
+    OPTIONS+=(-f $SRC_DIR/build.xml)
+    OPTIONS+=(-Dversion=$VERSION)
+    OPTIONS+=(-Dbuild.dir=$WORK_DIR)
+    OPTIONS+=(-Dinstall.doc.dir=$INSTALL_DIR$DOC_DIR)
+    OPTIONS+=(-Dinstall.jar.dir=$INSTALL_DIR$JAVA_DIR)
+
+    echo ant "${OPTIONS[@]}" install
+    ant "${OPTIONS[@]}" install
+
+    exit
+fi
+
+################################################################################
+# Prepare RPM build
+################################################################################
+
+if [ "$RELEASE" = "" ] ; then
+    # if release not specified, get from spec template
+    RELEASE="$(rpmspec -P "$SPEC_TEMPLATE" --undefine dist | grep "^Release:" | awk '{print $2;}')"
+fi
 
 if [ "$DEBUG" = true ] ; then
     echo "RELEASE: $RELEASE"
@@ -253,9 +377,6 @@ if [ "$VERBOSE" = true ] ; then
     echo "Initializing $WORK_DIR"
 fi
 
-mkdir -p $WORK_DIR
-cd $WORK_DIR
-
 rm -rf BUILD
 rm -rf RPMS
 rm -rf SOURCES
@@ -275,7 +396,7 @@ mkdir SRPMS
 generate_rpm_sources
 
 echo "RPM sources:"
-find "$WORK_DIR/SOURCES" -type f -printf " %p\n"
+find "$WORK_DIR/SOURCES" -type f -printf " %p\\n"
 
 if [ "$BUILD_TARGET" = "src" ] ; then
     exit
@@ -288,7 +409,7 @@ fi
 generate_rpm_spec
 
 echo "RPM spec:"
-find "$WORK_DIR/SPECS" -type f -printf " %p\n"
+find "$WORK_DIR/SPECS" -type f -printf " %p\\n"
 
 if [ "$BUILD_TARGET" = "spec" ] ; then
     exit
@@ -316,7 +437,7 @@ if [ "$DIST" != "" ] ; then
 fi
 
 if [ "$DEBUG" = true ] ; then
-    echo "rpmbuild -bs ${OPTIONS[@]} $WORK_DIR/SPECS/$RPM_SPEC"
+    echo rpmbuild -bs "${OPTIONS[@]}" "$WORK_DIR/SPECS/$RPM_SPEC"
 fi
 
 # build SRPM with user-provided options
@@ -351,7 +472,7 @@ fi
 OPTIONS+=(--define "_topdir ${WORK_DIR}")
 
 if [ "$DEBUG" = true ] ; then
-    echo "rpmbuild --rebuild ${OPTIONS[@]} $SRPM"
+    echo rpmbuild --rebuild "${OPTIONS[@]}" "$SRPM"
 fi
 
 # rebuild RPM with hard-coded options in SRPM
@@ -374,4 +495,4 @@ find "$WORK_DIR/RPMS" -mindepth 2 -type f -exec mv -i '{}' "$WORK_DIR/RPMS" ';'
 find "$WORK_DIR/RPMS" -mindepth 1 -type d -delete
 
 echo "RPM packages:"
-find "$WORK_DIR/RPMS" -type f -printf " %p\n"
+find "$WORK_DIR/RPMS" -type f -printf " %p\\n"


=====================================
build.xml
=====================================
@@ -49,9 +49,8 @@
   <property name="deprecation" value="false"/>
   <property name="optimize" value="true"/>
   <property name="specfile" value="tomcatjss.spec"/>
-  <property name="rhel" value="0"/>
   <property name="jnidir" value="/usr/lib/java" />
-  <property name="install.doc.dir" value="/usr/share/doc/tomcatjss" />
+  <property name="install.doc.dir" value="/usr/share/doc" />
   <property name="install.jar.dir" value="/usr/share/java" />
 
   <!--
@@ -217,7 +216,7 @@
         description="compile the source " >
     <!-- Compile the java code from ${src} into ${build} -->
     <mkdir dir="${build.classes}"/>
-    <javac debug="on" destdir="${build.classes}">
+    <javac debug="on" destdir="${build.classes}" includeantruntime="false">
       <src path="core/src/main/java"/>
       <src path="${src.dir}/src/main/java"/>
       <classpath refid="classpath"/>
@@ -237,12 +236,10 @@
   </target>
 
   <target name="install" depends="compile,package">
-    <copy file="LICENSE" todir="${install.doc.dir}"/>
-    <copy file="README" todir="${install.doc.dir}"/>
-    <delete file="${install.jar.dir}/tomcatjss-${version}.jar"/>
+    <copy file="LICENSE" todir="${install.doc.dir}/tomcatjss"/>
+    <copy file="README" todir="${install.doc.dir}/tomcatjss"/>
     <delete file="${install.jar.dir}/tomcatjss.jar"/>
-    <copy file="${build.jars}/tomcatjss.jar" tofile="${install.jar.dir}/tomcatjss-${version}.jar"/>
-    <symlink link="${install.jar.dir}/tomcatjss.jar" resource="tomcatjss-${version}.jar"/>
+    <copy file="${build.jars}/tomcatjss.jar" tofile="${install.jar.dir}/tomcatjss.jar"/>
   </target>
 
   <target name="main" depends="compile,package">
@@ -253,31 +250,4 @@
     <delete dir="${build.dir}"/>
   </target>
 
-  <target name="rpms" depends="dist">
-    <mkdir dir="${rpm.dist.dir}"/>
-    <mkdir dir="${rpm.dist.dir}/SOURCES"/>
-    <copy file="${dist.base.source}/${src.dist.name}.tar.gz" tofile="${rpm.dist.dir}/SOURCES/${src.dist.name}.tar.gz"/>
-    <mkdir dir="${rpm.dist.dir}/RPMS"/>
-    <mkdir dir="${rpm.dist.dir}/SRPMS"/>
-    <mkdir dir="${rpm.dist.dir}/SPECS"/>
-    <copy file="${specfile}.in" tofile="${rpm.dist.dir}/SPECS/${specfile}"/>
-    <mkdir dir="${rpm.dist.dir}/BUILD"/>
-
-
-    <!--
-     NOTE: To only build an SRPM (e. g. - to use with "\-\-scratch"), change:
-               <arg value="-ba"/>
-           to:
-               <arg value="-bs"/>
-     -->
-    <exec executable="rpmbuild">
-      <arg value="--define"/>
-      <arg value="_topdir ${rpm.dist.dir}"/>
-      <arg value="--define"/>
-      <arg value="rhel ${rhel}"/>
-      <arg value="-ba"/>
-      <arg value="${rpm.dist.dir}/SPECS/${specfile}"/>
-    </exec>
-  </target>
-
 </project>


=====================================
build_tomcatjss deleted
=====================================
@@ -1,43 +0,0 @@
-#! /bin/bash
-
-# This script may ONLY be run on Linux!
-OS=`uname`
-if [ ${OS} != "Linux" ]; then
-	printf "The '$0' script is ONLY executable on a 'Linux' machine!\n"
-	exit 255
-fi
-
-# If Fedora, retrieve the release
-if [ -f /etc/fedora-release ]; then
-	FEDORA_RELEASE=`cat /etc/fedora-release | awk {'print $3'}`
-fi
-
-ARCH=`uname -p`
-if [ "${ARCH}" = "x86_64" ]; then
-	if	[ -f /etc/fedora-release ] &&
-		[ ${FEDORA_RELEASE} -ge 19 ]; then
-		JNIDIR=/usr/lib/java
-	elif	[ -f /etc/fedora-release ] &&
-		[ ${FEDORA_RELEASE} -ge 16 ]; then
-		JNIDIR=/usr/lib64/java
-	else
-		JNIDIR=/usr/lib/java
-	fi
-elif	[ ${ARCH} != "i686" ] ||
-		[ ${ARCH} != "i586" ] ||
-		[ ${ARCH} != "i486" ] ||
-		[ ${ARCH} != "i386" ]; then
-	JNIDIR=/usr/lib/java
-else
-	printf "The '$0' script is NOT executable on the '${ARCH}' architecture!\n"
-	exit 255
-fi
-
-if [ -f /etc/fedora-release ]; then
-	# Script is being run on Fedora
-	ant -f build.xml -Drhel=0 -Djnidir=${JNIDIR} -Dspecfile=tomcatjss.spec rpms
-elif [ -f /etc/redhat-release ]; then
-	# Script is being run on RHEL
-	ant -f build.xml -Drhel=1 -Djnidir=${JNIDIR} -Dspecfile=tomcatjss.spec rpms
-fi
-


=====================================
docs/changes/v8.1.0/Development-Changes.adoc
=====================================
@@ -0,0 +1,8 @@
+= Development Changes =
+
+== Build Changes ==
+
+By default the `./build.sh` will only create the JAR file instead of the RPM package.
+The JAR file can be installed on the system using `./build.sh install`.
+
+To build the RPM package, run `./build.sh rpm`.


=====================================
docs/changes/v8.1.0/Packaging-Changes.adoc
=====================================
@@ -0,0 +1,10 @@
+= Packaging Changes =
+
+== Java Dependency Changes ==
+
+TomcatJSS will now require OpenJDK 17.
+
+== Java Archive Changes ==
+
+The `/usr/share/java/tomcatjss-<version>.jar` has been removed.
+Use `/usr/share/java/tomcatjss.jar` instead.


=====================================
rhel.properties deleted
=====================================
@@ -1 +0,0 @@
-rhel=1


=====================================
tomcat-9.0/src/main/java/org/dogtagpki/tomcat/JSSContext.java
=====================================
@@ -1,8 +1,10 @@
 package org.dogtagpki.tomcat;
 
+import org.apache.tomcat.util.net.jss.TomcatJSS;
 import java.security.KeyManagementException;
 import java.security.SecureRandom;
-
+import java.util.Collection;
+import java.util.EventListener;
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.TrustManager;
@@ -63,9 +65,14 @@ public class JSSContext implements org.apache.tomcat.util.net.SSLContext {
         logger.debug("JSSContext.createSSLEngine()");
         javax.net.ssl.SSLEngine eng = ctx.createSSLEngine();
 
+	TomcatJSS instance = TomcatJSS.getInstance();
+
         if (eng instanceof JSSEngine) {
             JSSEngine j_eng = (JSSEngine) eng;
             j_eng.setCertFromAlias(alias);
+            if(instance != null) {
+                j_eng.setListeners(instance.getSocketListeners());
+            }
         }
 
         return eng;


=====================================
tomcatjss.spec
=====================================
@@ -9,7 +9,7 @@ BuildArch:        noarch
 
 # For development (i.e. unsupported) releases, use x.y.z-0.n.<phase>.
 # For official (i.e. supported) releases, use x.y.z-r where r >=1.
-Version:          8.0.0
+Version:          8.1.0
 Release:          1%{?_timestamp}%{?_commit_id}%{?dist}
 #global           _phase -alpha1
 
@@ -34,9 +34,9 @@ Source:           https://github.com/dogtagpki/tomcatjss/archive/v%{version}%{?_
 # Java
 ################################################################################
 
-%define java_devel java-11-openjdk-devel
-%define java_headless java-11-openjdk-headless
-%define java_home /usr/lib/jvm/jre-11-openjdk
+%define java_devel java-17-openjdk-devel
+%define java_headless java-17-openjdk-headless
+%define java_home %{_jvmdir}/jre-17-openjdk
 
 ################################################################################
 # Build Dependencies
@@ -57,7 +57,7 @@ BuildRequires:    slf4j
 BuildRequires:    slf4j-jdk14
 
 # JSS
-BuildRequires:    jss >= 5.0.0
+BuildRequires:    jss >= 5.1.0
 
 # Tomcat
 %if 0%{?rhel} && ! 0%{?eln}
@@ -111,20 +111,27 @@ Services (NSS).
 %autosetup -n tomcatjss-%{version}%{?_phase} -p 1
 
 ################################################################################
-%install
+%build
 ################################################################################
 
-# get Tomcat <major>.<minor> version number
-tomcat_version=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'`
-app_server=tomcat-$tomcat_version
+./build.sh \
+    %{?_verbose:-v} \
+    --work-dir=%{_vpath_builddir} \
+    --version=%{version} \
+    --jni-dir=%{_jnidir} \
+    dist
+
+################################################################################
+%install
+################################################################################
 
-ant -f build.xml \
-    -Dversion=%{version} \
-    -Dsrc.dir=$app_server \
-    -Ddist.dir=%{_vpath_builddir} \
-    -Djnidir=%{_jnidir} \
-    -Dinstall.doc.dir=%{buildroot}%{_docdir}/%{name} \
-    -Dinstall.jar.dir=%{buildroot}%{_javadir} \
+./build.sh \
+    %{?_verbose:-v} \
+    --work-dir=%{_vpath_builddir} \
+    --version=%{version} \
+    --java-dir=%{_javadir} \
+    --doc-dir=%{_docdir} \
+    --install-dir=%{buildroot} \
     install
 
 ################################################################################



View it on GitLab: https://salsa.debian.org/freeipa-team/tomcatjss/-/compare/dd21d767135e79ba9d583ecccd25bf9012cac6d7...7ca77127377e616fb21cf1b55abbbe7baf728e6c

-- 
View it on GitLab: https://salsa.debian.org/freeipa-team/tomcatjss/-/compare/dd21d767135e79ba9d583ecccd25bf9012cac6d7...7ca77127377e616fb21cf1b55abbbe7baf728e6c
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/20220329/bfe59d9a/attachment-0001.htm>


More information about the Pkg-freeipa-devel mailing list