[Pkg-freeipa-devel] [Git][freeipa-team/dogtag-pki][master-next] revert-support-jdk8-jdk11-rpm-builds.diff: This commit breaks the java path.
Timo Aaltonen
gitlab at salsa.debian.org
Thu Aug 13 21:45:21 BST 2020
Timo Aaltonen pushed to branch master-next at FreeIPA packaging / dogtag-pki
Commits:
f8bb6c7a by Timo Aaltonen at 2020-08-13T23:44:59+03:00
revert-support-jdk8-jdk11-rpm-builds.diff: This commit breaks the java path.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/revert-support-jdk8-jdk11-rpm-builds.diff
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -8,6 +8,7 @@ dogtag-pki (10.9.1-1) UNRELEASED; urgency=medium
* patches: Refreshed.
* rules: Set PKI_JAVA_PATH.
* rules: Drop obsolete WITH_PYTHON options.
+ * revert-support-jdk8-jdk11-rpm-builds.diff: This commit breaks the java path.
-- Timo Aaltonen <tjaalton at debian.org> Wed, 01 Jul 2020 07:06:06 +0300
=====================================
debian/patches/revert-support-jdk8-jdk11-rpm-builds.diff
=====================================
@@ -0,0 +1,344 @@
+commit f9c40a0b1d1fee9765885b77a7a2ca9893363515
+Author: Timo Aaltonen <tjaalton at debian.org>
+Date: Thu Aug 13 23:41:14 2020 +0300
+
+ Revert "Support JDK8 and JDK11 RPM builds"
+
+ This reverts commit 9ddb383239f92e9d738b4b4eb2e1bac24e6abdca.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -115,11 +115,6 @@ configure_file(cmake/config.h.in ${CMAKE
+
+ add_definitions(-DHAVE_CONFIG_H)
+
+-# handle custom PKI Java path
+-if (PKI_JAVA_PATH STREQUAL "")
+- set(PKI_JAVA_PATH "${Java_JAVA_EXECUTABLE}")
+-endif ()
+-
+ # uninstall target
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+--- a/base/common/python/pki/cli/main.py
++++ b/base/common/python/pki/cli/main.py
+@@ -96,27 +96,16 @@ class PKICLI(pki.cli.CLI):
+
+ self.set_nss_default_db_type()
+
+- java_path = os.getenv('PKI_JAVA_PATH')
+ java_home = os.getenv('JAVA_HOME')
+ pki_lib = os.getenv('PKI_LIB')
+ logging_config = os.getenv('PKI_LOGGING_CONFIG')
+
+- cmd = []
+-
+- if os.path.exists(java_path):
+- cmd.extend([java_path])
+- elif os.path.exists(java_home + '/jre/bin/java'):
+- cmd.extend([java_home + '/jre/bin/java'])
+- elif os.path.exists(java_home + '/bin/java'):
+- cmd.extend([java_home + '/bin/java'])
+- else:
+- cmd.extend(['/usr/bin/env', 'java'])
+-
+- cmd.extend([
++ cmd = [
++ java_home + '/bin/java',
+ '-cp', pki_lib + '/*',
+ '-Djava.util.logging.config.file=' + logging_config,
+ 'com.netscape.cmstools.cli.MainCLI'
+- ])
++ ]
+
+ # restore options for Java commands
+
+--- a/base/common/share/etc/pki.conf
++++ b/base/common/share/etc/pki.conf
+@@ -10,10 +10,6 @@ export PYTHON_EXECUTABLE
+ JAVA_HOME=${JAVA_HOME}
+ export JAVA_HOME
+
+-# Java interpreter
+-PKI_JAVA_PATH=${Java_JAVA_EXECUTABLE}
+-export PKI_JAVA_PATH
+-
+ # JNI jar file location
+ JNI_JAR_DIR=/usr/share/java
+ export JNI_JAR_DIR
+--- a/base/java-tools/templates/pki_java_command_wrapper.in
++++ b/base/java-tools/templates/pki_java_command_wrapper.in
+@@ -71,17 +71,44 @@ invalid_architecture() {
+
+ OS=`uname -s`
+
+-ARCHITECTURE=`arch`
+-if [ -e "${PKI_JAVA_PATH}" ]; then
+- JAVA="${PKI_JAVA_PATH}"
+-elif [ -e "${JAVA_HOME}/jre/bin/java" ]; then
+- JAVA="${JAVA_HOME}/jre/bin/java"
+-elif [ -e "${JAVA_HOME}/bin/java" ]; then
++if [ "${OS}" = "Linux" ] ; then
++ ARCHITECTURE=`arch`
+ JAVA="${JAVA_HOME}/bin/java"
++ JAVA_OPTIONS=""
++elif [ "${OS}" = "SunOS" ] ; then
++ ARCHITECTURE=`uname -p`
++ if [ "${ARCHITECTURE}" = "sparc" ] &&
++ [ -d "/usr/lib/sparcv9/" ] ; then
++ ARCHITECTURE="sparcv9"
++ fi
++ if [ "${ARCHITECTURE}" = "sparc" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS=""
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ elif [ "${ARCHITECTURE}" = "sparcv9" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS="-d64"
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9:/lib/sparcv9:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ else
++ invalid_architecture "${ARCHITECTURE}"
++ exit 255
++ fi
+ else
+- JAVA="/usr/bin/env java"
++ invalid_operating_system "${OS}"
++ exit 255
+ fi
+-JAVA_OPTIONS=""
++
+
+ ###############################################################################
+ ## (5) Execute the java command specified by this java command wrapper ##
+--- a/base/java-tools/templates/pretty_print_cert_command_wrapper.in
++++ b/base/java-tools/templates/pretty_print_cert_command_wrapper.in
+@@ -70,17 +70,45 @@ invalid_architecture() {
+ ###############################################################################
+
+ OS=`uname -s`
+-ARCHITECTURE=`arch`
+-if [ -e "${PKI_JAVA_PATH}" ]; then
+- JAVA="${PKI_JAVA_PATH}"
+-elif [ -e "${JAVA_HOME}/jre/bin/java" ]; then
+- JAVA="${JAVA_HOME}/jre/bin/java"
+-elif [ -e "${JAVA_HOME}/bin/java" ]; then
++
++if [ "${OS}" = "Linux" ] ; then
++ ARCHITECTURE=`arch`
+ JAVA="${JAVA_HOME}/bin/java"
++ JAVA_OPTIONS=""
++elif [ "${OS}" = "SunOS" ] ; then
++ ARCHITECTURE=`uname -p`
++ if [ "${ARCHITECTURE}" = "sparc" ] &&
++ [ -d "/usr/lib/sparcv9/" ] ; then
++ ARCHITECTURE="sparcv9"
++ fi
++ if [ "${ARCHITECTURE}" = "sparc" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS=""
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ elif [ "${ARCHITECTURE}" = "sparcv9" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS="-d64"
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9:/lib/sparcv9:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ else
++ invalid_architecture "${ARCHITECTURE}"
++ exit 255
++ fi
+ else
+- JAVA="/usr/bin/env java"
++ invalid_operating_system "${OS}"
++ exit 255
+ fi
+-JAVA_OPTIONS=""
++
+
+ ###############################################################################
+ ## (5) Set the CP environment variable to determine the search ##
+--- a/base/java-tools/templates/pretty_print_crl_command_wrapper.in
++++ b/base/java-tools/templates/pretty_print_crl_command_wrapper.in
+@@ -69,18 +69,44 @@ invalid_architecture() {
+ ###############################################################################
+
+ OS=`uname -s`
+-ARCHITECTURE=`arch`
+
+-if [ -e "${PKI_JAVA_PATH}" ]; then
+- JAVA="${PKI_JAVA_PATH}"
+-elif [ -e "${JAVA_HOME}/jre/bin/java" ]; then
+- JAVA="${JAVA_HOME}/jre/bin/java"
+-elif [ -e "${JAVA_HOME}/bin/java" ]; then
++if [ "${OS}" = "Linux" ] ; then
++ ARCHITECTURE=`arch`
+ JAVA="${JAVA_HOME}/bin/java"
++ JAVA_OPTIONS=""
++elif [ "${OS}" = "SunOS" ] ; then
++ ARCHITECTURE=`uname -p`
++ if [ "${ARCHITECTURE}" = "sparc" ] &&
++ [ -d "/usr/lib/sparcv9/" ] ; then
++ ARCHITECTURE="sparcv9"
++ fi
++ if [ "${ARCHITECTURE}" = "sparc" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS=""
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ elif [ "${ARCHITECTURE}" = "sparcv9" ] ; then
++ JAVA="/usr/jdk/instances/jdk1.5.0/jre/bin/java"
++ JAVA_OPTIONS="-d64"
++
++ LD_LIBRARY_PATH=/usr/lib:/lib
++ LD_LIBRARY_PATH=/usr/lib/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/${PRODUCT}:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9:/lib/sparcv9:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/dirsec:${LD_LIBRARY_PATH}
++ LD_LIBRARY_PATH=/usr/lib/sparcv9/${PRODUCT}:${LD_LIBRARY_PATH}
++ export LD_LIBRARY_PATH
++ else
++ invalid_architecture "${ARCHITECTURE}"
++ exit 255
++ fi
+ else
+- JAVA="/usr/bin/env java"
++ invalid_operating_system "${OS}"
++ exit 255
+ fi
+-JAVA_OPTIONS=""
+
+
+ ###############################################################################
+--- a/base/server/python/pki/server/__init__.py
++++ b/base/server/python/pki/server/__init__.py
+@@ -320,7 +320,6 @@ class PKIServer(object):
+ if current_user != self.user:
+ prefix.extend(['sudo', '-u', self.user])
+
+- java_path = os.getenv('PKI_JAVA_PATH')
+ java_home = self.config.get('JAVA_HOME')
+ java_opts = self.config.get('JAVA_OPTS')
+ security_manager = self.config.get('SECURITY_MANAGER')
+@@ -343,14 +342,10 @@ class PKIServer(object):
+ cmd.extend(['jdb'])
+
+ else:
+- if os.path.exists(java_path):
+- cmd.extend([java_path])
+- elif os.path.exists(java_home + '/jre/bin/java'):
+- cmd.extend([java_home + '/jre/bin/java'])
+- elif os.path.exists(java_home + '/bin/java'):
++ if java_home:
+ cmd.extend([java_home + '/bin/java'])
+ else:
+- cmd.extend(['/usr/bin/env', 'java'])
++ cmd.extend(['java'])
+
+ if agentpath:
+ cmd.extend(['-agentpath:%s' % agentpath])
+--- a/base/server/python/pki/server/subsystem.py
++++ b/base/server/python/pki/server/subsystem.py
+@@ -1079,7 +1079,6 @@ class PKISubsystem(object):
+
+ def run(self, args, as_current_user=False):
+
+- java_path = os.getenv('PKI_JAVA_PATH')
+ java_home = self.instance.config['JAVA_HOME']
+ java_opts = self.instance.config['JAVA_OPTS']
+
+@@ -1102,16 +1101,8 @@ class PKISubsystem(object):
+ if username != self.instance.user:
+ cmd.extend(['sudo', '-u', self.instance.user])
+
+- if os.path.exists(java_path):
+- cmd.extend([java_path])
+- elif os.path.exists(java_home + '/jre/bin/java'):
+- cmd.extend([java_home + '/jre/bin/java'])
+- elif os.path.exists(java_home + '/bin/java'):
+- cmd.extend([java_home + '/bin/java'])
+- else:
+- cmd.extend(['/usr/bin/env', 'java'])
+-
+ cmd.extend([
++ java_home + '/bin/java',
+ '-classpath', os.pathsep.join(classpath),
+ '-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory',
+ '-Dcatalina.base=' + self.instance.base_dir,
+--- a/pki.spec
++++ b/pki.spec
+@@ -51,13 +51,7 @@ Source: https://github.com/dogtagpki/pki
+ # Java
+ ################################################################################
+
+-%define java_home /usr/lib/jvm/jre-openjdk
+-
+-%if 0%{?fedora} && 0%{?fedora} >= 33
+-%define min_java_version 1:11
+-%else
+-%define min_java_version 1:1.8.0
+-%endif
++%define java_home %{_usr}/lib/jvm/jre-1.8.0-openjdk
+
+ ################################################################################
+ # RESTEasy
+@@ -157,8 +151,7 @@ BuildRequires: make
+ BuildRequires: cmake >= 3.0.2
+ BuildRequires: gcc-c++
+ BuildRequires: zip
+-BuildRequires: java-devel >= %{min_java_version}
+-BuildRequires: javapackages-tools
++BuildRequires: java-1.8.0-openjdk-devel
+ BuildRequires: redhat-rpm-config
+ BuildRequires: ldapjdk >= 4.22.0
+ BuildRequires: apache-commons-cli
+@@ -331,7 +324,7 @@ PKI consists of the following components
+
+ Summary: PKI Symmetric Key Package
+
+-Requires: java-headless >= %{min_java_version}
++Requires: java-1.8.0-openjdk-headless
+ Requires: jpackage-utils >= 0:1.7.5-10
+ Requires: jss >= 4.7.0
+ Requires: nss >= 3.38.0
+@@ -399,7 +392,7 @@ This package contains PKI client library
+ Summary: PKI Base Java Package
+ BuildArch: noarch
+
+-Requires: java-headless >= %{min_java_version}
++Requires: java-1.8.0-openjdk-headless
+ Requires: apache-commons-cli
+ Requires: apache-commons-codec
+ Requires: apache-commons-io
+@@ -820,8 +813,7 @@ fi
+ -DVERSION=%{version}-%{release} \
+ -DVAR_INSTALL_DIR:PATH=/var \
+ -DP11_KIT_TRUST=/etc/alternatives/libnssckbi.so.%{_arch} \
+- -DJAVA_HOME=%java_home \
+- -DPKI_JAVA_PATH=%java \
++ -DJAVA_HOME=%{java_home} \
+ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
+ -DSYSTEMD_LIB_INSTALL_DIR=%{_unitdir} \
+ -DAPP_SERVER=$app_server \
=====================================
debian/patches/series
=====================================
@@ -16,3 +16,4 @@ fix-tomcat-jars.diff
fix-hamcrest-jar.diff
fix-healthcheck-install.diff
fix-upgrade-script.diff
+revert-support-jdk8-jdk11-rpm-builds.diff
View it on GitLab: https://salsa.debian.org/freeipa-team/dogtag-pki/-/commit/f8bb6c7abfd612e5c5f8edeb668dc5ffe8ce8aa8
--
View it on GitLab: https://salsa.debian.org/freeipa-team/dogtag-pki/-/commit/f8bb6c7abfd612e5c5f8edeb668dc5ffe8ce8aa8
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/20200813/25f40ac6/attachment-0001.html>
More information about the Pkg-freeipa-devel
mailing list