[Bug 267910] www/tomcat*: add variable substitution support for ${tomcat*_classpath}
Date: Tue, 22 Nov 2022 15:34:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267910 --- Comment #6 from Michael Osipov <michael.osipov@siemens.com> --- Created attachment 238248 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=238248&action=edit Git-formatted patch Here is a real world example: ============================root@deblndw013x2j:/usr/local/etc/rc.d # cat ../rc.conf.d/tomcat_ldadocgen_backend_dev_1 tomcat_ldadocgen_backend_dev_1_enable="YES" tomcat_ldadocgen_backend_dev_1_catalina_user="ldadocgen" tomcat_ldadocgen_backend_dev_1_catalina_base="/usr/local/ldadocgen/backend-dev/tomcat-1" tomcat_ldadocgen_backend_dev_1_classpath=":\${_tomcat_catalina_home}/bin/activedirectory-dns-locator-0.4.0.jar:/tmp/mu mu" #tomcat_ldadocgen_backend_dev_1_classpath=":/usr/local/apache-tomcat-8.5/bin/activedirectory-dns-locator-0.4.0.jar:/tmp/mu mu" tomcat_ldadocgen_backend_dev_1_java_opts="-Djava.security.auth.login.config=\${_tomcat_catalina_home}/conf/login.conf \ -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.spnego.msinterop=false -Dsun.security.krb5.acceptor.subkey=true \ -D_com.sun.management.jmxremote -Djava.awt.headless=true" tomcat_ldadocgen_backend_dev_1_umask="0027" tomcat_ldadocgen_backend_dev_1_wait="60" tomcat_ldadocgen_backend_dev_1_env="PATH=/usr/local/ldadocgen/backend-dev/texlive/2022/bin/amd64-freebsd:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" =========================== Note also the CP entry with space which should work. =========================== # procstat -c 15291 PID COMM ARGS 15291 jsvc /usr/local/bin/jsvc -java-home /usr/local/openjdk8 -server -user ldadocgen -umask 0027 -pidfile /var/run/tomcat_ldadocgen_backend_dev_1.pid -wait 60 -outfile /usr/local/ldadocgen/backend-dev/tomcat-1/logs/catalina.out -errfile &1 -classpath /usr/local/apache-tomcat-8.5/bin/bootstrap.jar:/usr/local/share/java/classes/commons-daemon.jar:/usr/local/apache-tomcat-8.5/bin/tomcat-juli.jar:${_tomcat_catalina_home}/bin/activedirectory-dns-locator-0.4.0.jar:/tmp/mu mu -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/ldadocgen/backend-dev/tomcat-1/conf/logging.properties -Djava.security.auth.login.config=/usr/local/apache-tomcat-8.5/conf/login.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.spnego.msinterop=false -Dsun.security.krb5.acceptor.subkey=true -D_com.sun.management.jmxremote -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/local/apache-tomcat-8.5/endorsed -Dcatalina.home=/usr/local/apache-tomcat-8.5 -Dcatalina.base=/usr/local/ldadocgen/backend-dev/tomcat-1 -Djava.io.tmpdir=/usr/local/ldadocgen/backend-dev/tomcat-1/temp org.apache.catalina.startup.Bootstrap =========================== with the patch: =========================== # procstat -c 15826 PID COMM ARGS 15826 jsvc /usr/local/bin/jsvc -java-home /usr/local/openjdk8 -server -user ldadocgen -umask 0027 -pidfile /var/run/tomcat_ldadocgen_backend_dev_1.pid -wait 60 -outfile /usr/local/ldadocgen/backend-dev/tomcat-1/logs/catalina.out -errfile &1 -classpath /usr/local/apache-tomcat-8.5/bin/bootstrap.jar:/usr/local/share/java/classes/commons-daemon.jar:/usr/local/apache-tomcat-8.5/bin/tomcat-juli.jar:/usr/local/apache-tomcat-8.5/bin/activedirectory-dns-locator-0.4.0.jar:/tmp/mu mu -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/ldadocgen/backend-dev/tomcat-1/conf/logging.properties -Djava.security.auth.login.config=/usr/local/apache-tomcat-8.5/conf/login.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.spnego.msinterop=false -Dsun.security.krb5.acceptor.subkey=true -D_com.sun.management.jmxremote -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/local/apache-tomcat-8.5/endorsed -Dcatalina.home=/usr/local/apache-tomcat-8.5 -Dcatalina.base=/usr/local/ldadocgen/backend-dev/tomcat-1 -Djava.io.tmpdir=/usr/local/ldadocgen/backend-dev/tomcat-1/temp org.apache.catalina.startup.Bootstrap =========================== Checking it from JSP: =========================== root@deblndw013x2j:/usr/local/ldadocgen/backend-dev/tomcat-1/webapps/backend-dev#manager-1 # curl --negotiate -u : "https://hostname/backend-dev/manager-1/java-classpath.jsp" -k -c /tmp/cookies -q java.class.path: /usr/local/apache-tomcat-8.5/bin/bootstrap.jar:/usr/local/share/java/classes/commons-daemon.jar:/usr/local/apache-tomcat-8.5/bin/tomcat-juli.jar:/usr/local/apache-tomcat-8.5/bin/activedirectory-dns-locator-0.4.0.jar:/tmp/mu mu =========================== Git-formatted patch attached. Can be adapted for other Tomcat versions. Straight forward. -- You are receiving this mail because: You are the assignee for the bug.