Index: head/www/tomcat-devel/Makefile =================================================================== --- head/www/tomcat-devel/Makefile (revision 456712) +++ head/www/tomcat-devel/Makefile (revision 456713) @@ -1,94 +1,95 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= tomcat PORTVERSION= 9.0.2 +PORTREVISION= 1 CATEGORIES= www java MASTER_SITES= APACHE/${PORTNAME}/${PORTNAME}-${PORTVERSION:C/([0-9])(.*)/\1/}/v${PORTVERSION}/bin PKGNAMESUFFIX= -devel DISTNAME= apache-${PORTNAME}-${PORTVERSION} MAINTAINER= vvd@unislabs.com COMMENT= Open-source Java web server by Apache, development branch LICENSE= APACHE20 RUN_DEPENDS= jsvc:devel/jakarta-commons-daemon USES= cpe CPE_VENDOR= apache USE_JAVA= yes JAVA_VERSION= 1.8+ NO_BUILD= yes NO_ARCH= yes USE_RC_SUBR= ${PKGBASE:C/-/_/} TOMCAT_SUBDIR?= ${DISTNAME:C/([0-9])\.([0-9])(.*)/\1.\2/} TOMCAT_HOME= ${PREFIX}/${TOMCAT_SUBDIR} TOMCAT_CONF_FILES= \ catalina.policy catalina.properties context.xml logging.properties \ server.xml tomcat-users.xml tomcat-users.xsd web.xml \ jaspic-providers.xml jaspic-providers.xsd OPTIONS_DEFINE= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT HOST_MANAGER_DESC= Install Host Manager application MANAGER_DESC= Install Manager web application DOCS_DESC= Install Documentation web application EXAMPLES_DESC= Install Examples web application ROOT_DESC= Install default ROOT web application OPTIONS_DEFAULT= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT OPTIONS_SUB= yes PLIST_SUB= T=${TOMCAT_SUBDIR} \ WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} SUB_LIST= TOMCAT_HOME=${TOMCAT_HOME} \ TOMCAT_USER=${WWWOWN} \ JAVA_HOME=${JAVA_HOME} .include pre-patch: @${ECHO_MSG} "Installation settings:" @${ECHO_MSG} " Destination directory: ${TOMCAT_HOME}" @${ECHO_MSG} " Location of JDK: ${JAVA_HOME}" @${ECHO_MSG} " Location of Java port: ${JAVA_PORT}" post-patch: @${FIND} ${WRKSRC} -name '*.bat' -delete .for f in ${TOMCAT_CONF_FILES} @${MV} ${WRKSRC}/conf/${f} ${WRKSRC}/conf/${f}.sample .endfor do-install: @${ECHO_MSG} -n ">> Creating destination directory..." @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Copying files to destination directory..." @${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} .if !${PORT_OPTIONS:MHOST_MANAGER} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager .endif .if !${PORT_OPTIONS:MMANAGER} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager .endif .if !${PORT_OPTIONS:MDOCS} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs .endif .if !${PORT_OPTIONS:MEXAMPLES} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples .endif .if !${PORT_OPTIONS:MROOT} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT .endif @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Fixing permissions..." @${FIND} ${STAGEDIR}${TOMCAT_HOME} -type d -print0 | ${XARGS} -0 ${CHMOD} 755 @${ECHO_MSG} " [ DONE ]" .include Index: head/www/tomcat-devel/files/tomcat_devel.in =================================================================== --- head/www/tomcat-devel/files/tomcat_devel.in (revision 456712) +++ head/www/tomcat-devel/files/tomcat_devel.in (revision 456713) @@ -1,135 +1,141 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: tomcat_devel # REQUIRE: LOGIN # KEYWORD: shutdown # # Configuration settings for tomcat_devel in /etc/rc.conf: # # tomcat_devel_enable (bool): # Set to "NO" by default. # Set it to "YES" to enable tomcat-devel # # tomcat_devel_catalina_base (str) # Set to "%%TOMCAT_HOME%%" by default. # Set the CATALINA_BASE variable for the Tomcat process # # tomcat_devel_catalina_tmpdir (str) # Set to "${catalina.base}/temp" by default. # Set the CATALINA_TMPDIR variable for the Tomcat process # # tomcat_devel_stdout (str) # Set to "${catalina.base}/logs/catalina.out" by default. # Set the stdout redirection. It may also be '/dev/null', '&1' or '&2' # # tomcat_devel_stderr (str) # Set to "&1" by default. # Set the stderr redirection. It may also be '/dev/null', '&1' or '&2' # # tomcat_devel_pipe_cmd (str): # Set to "" by default. # Set a piped command to process stdout/stderr when passthru # # tomcat_devel_logging_manager (str): # Set to "org.apache.juli.ClassLoaderLogManager" by default. # Set the JUL log manager # # tomcat_devel_logging_config (str): # Set to "${catalina.base}/conf/logging.properties" by default. # Set the JUL config file # # tomcat_devel_java_home (str): # Set to "%%JAVA_HOME%%" by default. # Specify the Java VM to use. # # tomcat_devel_classpath (str): # Set to "" by default. # Addtional classes to add to the CLASSPATH. If set, must start with ':' # # tomcat_devel_java_opts (str): # Set to "" by default. # Java VM args to use. # # tomcat_devel_wait (int): # Set to "30" by default. # Set the wait time (in seconds) for Tomcat process startup # +# tomcat_devel_umask (str): +# Set to "0077" by default. +# Sets the umask for Tomcat process. +# # You may symlink this script with other names to run multiple # instances of tomcat-devel with different configurations. # . /etc/rc.subr case $0 in /etc/rc*) # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), # so get the name of the script from $_file name=$_file ;; *) name=$0 ;; esac name=${name##*/} rcvar=${name}_enable load_rc_config "${name}" eval "${rcvar}=\${${rcvar}:-'NO'}" eval "_tomcat_java_home=\${${name}_java_home:-'%%JAVA_HOME%%'}" eval "_tomcat_catalina_user=\${${name}_catalina_user:-'%%TOMCAT_USER%%'}" eval "_tomcat_catalina_home='%%TOMCAT_HOME%%'" eval "_tomcat_catalina_base=\${${name}_catalina_base:-'%%TOMCAT_HOME%%'}" eval "_tomcat_catalina_tmpdir=\${${name}_catalina_tmpdir:-'${_tomcat_catalina_base}/temp'}" eval "_tomcat_stdout=\${${name}_stdout:-'${_tomcat_catalina_base}/logs/catalina.out'}" eval "_tomcat_stderr=\${${name}_stderr:-'&1'}" eval "_tomcat_pipe_cmd=\${${name}_pipe_cmd:-''}" eval "_tomcat_logging_manager=\${${name}_logging_manager:-'org.apache.juli.ClassLoaderLogManager'}" eval "_tomcat_logging_config=\${${name}_logging_config:-'${_tomcat_catalina_base}/conf/logging.properties'}" eval "_tomcat_classpath=\${${name}_classpath:-''}" eval "_tomcat_java_opts=\${${name}_java_opts:-''}" eval "_tomcat_wait=\${${name}_wait:-'30'}" +eval "_tomcat_umask=\${${name}_umask:-'0077'}" pidfile="/var/run/${name}.pid" required_files="${_tomcat_catalina_base}/conf/server.xml" required_dirs="${_tomcat_catalina_tmpdir}" extra_commands="reload" command="%%LOCALBASE%%/bin/jsvc" command_args="-java-home '${_tomcat_java_home}' \ -server \ -user ${_tomcat_catalina_user} \ + -umask ${_tomcat_umask} \ -pidfile '${pidfile}' \ -wait ${_tomcat_wait} \ -outfile '${_tomcat_stdout}' \ -errfile '${_tomcat_stderr}' \ -classpath '%%TOMCAT_HOME%%/bin/bootstrap.jar:%%LOCALBASE%%/share/java/classes/commons-daemon.jar:%%TOMCAT_HOME%%/bin/tomcat-juli.jar${_tomcat_classpath}' \ -Djava.util.logging.manager=${_tomcat_logging_manager} \ -Djava.util.logging.config.file='${_tomcat_logging_config}' \ ${_tomcat_java_opts} \ -Djava.endorsed.dirs='%%TOMCAT_HOME%%/endorsed' \ -Dcatalina.home='${_tomcat_catalina_home}' \ -Dcatalina.base='${_tomcat_catalina_base}' \ -Djava.io.tmpdir='${_tomcat_catalina_tmpdir}' \ org.apache.catalina.startup.Bootstrap \ ${_tomcat_pipe_cmd}" start_precmd="tomcat_prestart" tomcat_prestart() { if [ -r "${_tomcat_catalina_base}/bin/setenv.sh" ]; then . "${_tomcat_catalina_base}/bin/setenv.sh" elif [ -r "%%TOMCAT_HOME%%/bin/setenv.sh" ]; then . "%%TOMCAT_HOME%%/bin/setenv.sh" fi } run_rc_command "$1" Index: head/www/tomcat85/Makefile =================================================================== --- head/www/tomcat85/Makefile (revision 456712) +++ head/www/tomcat85/Makefile (revision 456713) @@ -1,94 +1,95 @@ # Created by: Alex Dupre # $FreeBSD$ PORTNAME= tomcat PORTVERSION= 8.5.24 +PORTREVISION= 1 CATEGORIES= www java MASTER_SITES= APACHE/tomcat/tomcat-8/v${PORTVERSION}/bin PKGNAMESUFFIX= 85 DISTNAME= apache-${PORTNAME}-${PORTVERSION} MAINTAINER= vvd@unislabs.com COMMENT= Open-source Java web server by Apache, 8.5.x branch LICENSE= APACHE20 RUN_DEPENDS= jsvc:devel/jakarta-commons-daemon USES= cpe CPE_VENDOR= apache USE_JAVA= yes JAVA_VERSION= 1.7+ NO_BUILD= yes NO_ARCH= yes USE_RC_SUBR= ${PKGBASE} TOMCAT_SUBDIR?= ${DISTNAME:R} TOMCAT_HOME= ${PREFIX}/${TOMCAT_SUBDIR} TOMCAT_CONF_FILES= \ catalina.policy catalina.properties context.xml logging.properties \ server.xml tomcat-users.xml tomcat-users.xsd web.xml \ jaspic-providers.xml jaspic-providers.xsd OPTIONS_DEFINE= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT HOST_MANAGER_DESC= Install Host Manager application MANAGER_DESC= Install Manager web application DOCS_DESC= Install Documentation web application EXAMPLES_DESC= Install Examples web application ROOT_DESC= Install default ROOT web application OPTIONS_DEFAULT= HOST_MANAGER MANAGER DOCS EXAMPLES ROOT OPTIONS_SUB= yes PLIST_SUB= T=${TOMCAT_SUBDIR} \ WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} SUB_LIST= TOMCAT_HOME=${TOMCAT_HOME} \ TOMCAT_USER=${WWWOWN} \ JAVA_HOME=${JAVA_HOME} .include pre-patch: @${ECHO_MSG} "Installation settings:" @${ECHO_MSG} " Destination directory: ${TOMCAT_HOME}" @${ECHO_MSG} " Location of JDK: ${JAVA_HOME}" @${ECHO_MSG} " Location of Java port: ${JAVA_PORT}" post-patch: @${FIND} ${WRKSRC} -name '*.bat' -delete .for f in ${TOMCAT_CONF_FILES} @${MV} ${WRKSRC}/conf/${f} ${WRKSRC}/conf/${f}.sample .endfor do-install: @${ECHO_MSG} -n ">> Creating destination directory..." @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/logs @${MKDIR} ${STAGEDIR}${TOMCAT_HOME}/endorsed @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Copying files to destination directory..." @${CP} -R ${WRKSRC}/* ${STAGEDIR}${TOMCAT_HOME} .if !${PORT_OPTIONS:MHOST_MANAGER} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/host-manager .endif .if !${PORT_OPTIONS:MMANAGER} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/manager .endif .if !${PORT_OPTIONS:MDOCS} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/docs .endif .if !${PORT_OPTIONS:MEXAMPLES} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/examples .endif .if !${PORT_OPTIONS:MROOT} @${RM} -R ${STAGEDIR}${TOMCAT_HOME}/webapps/ROOT .endif @${ECHO_MSG} " [ DONE ]" @${ECHO_MSG} -n ">> Fixing permissions..." @${FIND} ${STAGEDIR}${TOMCAT_HOME} -type d -print0 | ${XARGS} -0 ${CHMOD} 755 @${ECHO_MSG} " [ DONE ]" .include Index: head/www/tomcat85/files/tomcat85.in =================================================================== --- head/www/tomcat85/files/tomcat85.in (revision 456712) +++ head/www/tomcat85/files/tomcat85.in (revision 456713) @@ -1,135 +1,141 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: tomcat85 # REQUIRE: LOGIN # KEYWORD: shutdown # # Configuration settings for tomcat85 in /etc/rc.conf: # # tomcat85_enable (bool): # Set to "NO" by default. # Set it to "YES" to enable tomcat85 # # tomcat85_catalina_base (str) # Set to "%%TOMCAT_HOME%%" by default. # Set the CATALINA_BASE variable for the Tomcat process # # tomcat85_catalina_tmpdir (str) # Set to "${catalina.base}/temp" by default. # Set the CATALINA_TMPDIR variable for the Tomcat process # # tomcat85_stdout (str) # Set to "${catalina.base}/logs/catalina.out" by default. # Set the stdout redirection. It may also be '/dev/null', '&1' or '&2' # # tomcat85_stderr (str) # Set to "&1" by default. # Set the stderr redirection. It may also be '/dev/null', '&1' or '&2' # # tomcat85_pipe_cmd (str): # Set to "" by default. # Set a piped command to process stdout/stderr when passthru # # tomcat85_logging_manager (str): # Set to "org.apache.juli.ClassLoaderLogManager" by default. # Set the JUL log manager # # tomcat85_logging_config (str): # Set to "${catalina.base}/conf/logging.properties" by default. # Set the JUL config file # # tomcat85_java_home (str): # Set to "%%JAVA_HOME%%" by default. # Specify the Java VM to use. # # tomcat85_classpath (str): # Set to "" by default. # Addtional classes to add to the CLASSPATH. If set, must start with ':' # # tomcat85_java_opts (str): # Set to "" by default. # Java VM args to use. # # tomcat85_wait (int): # Set to "30" by default. # Set the wait time (in seconds) for Tomcat process startup # +# tomcat85_umask (str): +# Set to "0077" by default. +# Sets the umask for Tomcat process. +# # You may symlink this script with other names to run multiple # instances of tomcat85 with different configurations. # . /etc/rc.subr case $0 in /etc/rc*) # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), # so get the name of the script from $_file name=$_file ;; *) name=$0 ;; esac name=${name##*/} rcvar=${name}_enable load_rc_config "${name}" eval "${rcvar}=\${${rcvar}:-'NO'}" eval "_tomcat_java_home=\${${name}_java_home:-'%%JAVA_HOME%%'}" eval "_tomcat_catalina_user=\${${name}_catalina_user:-'%%TOMCAT_USER%%'}" eval "_tomcat_catalina_home='%%TOMCAT_HOME%%'" eval "_tomcat_catalina_base=\${${name}_catalina_base:-'%%TOMCAT_HOME%%'}" eval "_tomcat_catalina_tmpdir=\${${name}_catalina_tmpdir:-'${_tomcat_catalina_base}/temp'}" eval "_tomcat_stdout=\${${name}_stdout:-'${_tomcat_catalina_base}/logs/catalina.out'}" eval "_tomcat_stderr=\${${name}_stderr:-'&1'}" eval "_tomcat_pipe_cmd=\${${name}_pipe_cmd:-''}" eval "_tomcat_logging_manager=\${${name}_logging_manager:-'org.apache.juli.ClassLoaderLogManager'}" eval "_tomcat_logging_config=\${${name}_logging_config:-'${_tomcat_catalina_base}/conf/logging.properties'}" eval "_tomcat_classpath=\${${name}_classpath:-''}" eval "_tomcat_java_opts=\${${name}_java_opts:-''}" eval "_tomcat_wait=\${${name}_wait:-'30'}" +eval "_tomcat_umask=\${${name}_umask:-'0077'}" pidfile="/var/run/${name}.pid" required_files="${_tomcat_catalina_base}/conf/server.xml" required_dirs="${_tomcat_catalina_tmpdir}" extra_commands="reload" command="%%LOCALBASE%%/bin/jsvc" command_args="-java-home '${_tomcat_java_home}' \ -server \ -user ${_tomcat_catalina_user} \ + -umask ${_tomcat_umask} \ -pidfile '${pidfile}' \ -wait ${_tomcat_wait} \ -outfile '${_tomcat_stdout}' \ -errfile '${_tomcat_stderr}' \ -classpath '%%TOMCAT_HOME%%/bin/bootstrap.jar:%%LOCALBASE%%/share/java/classes/commons-daemon.jar:%%TOMCAT_HOME%%/bin/tomcat-juli.jar${_tomcat_classpath}' \ -Djava.util.logging.manager=${_tomcat_logging_manager} \ -Djava.util.logging.config.file='${_tomcat_logging_config}' \ ${_tomcat_java_opts} \ -Djava.endorsed.dirs='%%TOMCAT_HOME%%/endorsed' \ -Dcatalina.home='${_tomcat_catalina_home}' \ -Dcatalina.base='${_tomcat_catalina_base}' \ -Djava.io.tmpdir='${_tomcat_catalina_tmpdir}' \ org.apache.catalina.startup.Bootstrap \ ${_tomcat_pipe_cmd}" start_precmd="tomcat_prestart" tomcat_prestart() { if [ -r "${_tomcat_catalina_base}/bin/setenv.sh" ]; then . "${_tomcat_catalina_base}/bin/setenv.sh" elif [ -r "%%TOMCAT_HOME%%/bin/setenv.sh" ]; then . "%%TOMCAT_HOME%%/bin/setenv.sh" fi } run_rc_command "$1"