From owner-svn-ports-head@freebsd.org Tue Jan 10 23:00:00 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71104CAAF6F; Tue, 10 Jan 2017 23:00:00 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 345011814; Tue, 10 Jan 2017 23:00:00 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AMxxa6028339; Tue, 10 Jan 2017 22:59:59 GMT (envelope-from olgeni@FreeBSD.org) Received: (from olgeni@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AMxxtd028335; Tue, 10 Jan 2017 22:59:59 GMT (envelope-from olgeni@FreeBSD.org) Message-Id: <201701102259.v0AMxxtd028335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olgeni set sender to olgeni@FreeBSD.org using -f From: Jimmy Olgeni Date: Tue, 10 Jan 2017 22:59:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431140 - in head: . java java/wildfly10 java/wildfly10/files java/wildfly100 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 23:00:00 -0000 Author: olgeni Date: Tue Jan 10 22:59:58 2017 New Revision: 431140 URL: https://svnweb.freebsd.org/changeset/ports/431140 Log: Rename java/wildfly100 to java/wildfly10. PR: 212052 Submitted by: olgeni Added: head/java/wildfly10/ - copied from r431139, head/java/wildfly100/ head/java/wildfly10/files/wildfly10.in - copied unchanged from r431128, head/java/wildfly100/files/wildfly100.in Deleted: head/java/wildfly10/files/wildfly100.in head/java/wildfly100/ Modified: head/MOVED head/java/Makefile head/java/wildfly10/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Tue Jan 10 22:46:06 2017 (r431139) +++ head/MOVED Tue Jan 10 22:59:58 2017 (r431140) @@ -8977,3 +8977,4 @@ devel/rubygem-activejob|devel/rubygem-ac www/httpie|www/py-httpie|2017-01-09|Renamed to match upstream (PyPI) name sysutils/istatd|sysutils/istatserver|2017-01-09|Project was renamed devel/py-gflags|devel/py-python-gflags|2017-01-10|Rename to match PyPI naming +java/wildfly100|java/wildfly10|2017-01-10|Remove minor version number from port name Modified: head/java/Makefile ============================================================================== --- head/java/Makefile Tue Jan 10 22:46:06 2017 (r431139) +++ head/java/Makefile Tue Jan 10 22:59:58 2017 (r431140) @@ -123,7 +123,7 @@ SUBDIR += trove4j SUBDIR += veditor SUBDIR += visualvm - SUBDIR += wildfly100 + SUBDIR += wildfly10 SUBDIR += wildfly90 SUBDIR += xdoclet Modified: head/java/wildfly10/Makefile ============================================================================== --- head/java/wildfly100/Makefile Tue Jan 10 22:46:06 2017 (r431139) +++ head/java/wildfly10/Makefile Tue Jan 10 22:59:58 2017 (r431140) @@ -1,9 +1,9 @@ # Created by: Alexander Yerenkow # $FreeBSD$ -PORTNAME= wildfly100 +PORTNAME= wildfly10 PORTVERSION= 10.0.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= java www MASTER_SITES= http://download.jboss.org/wildfly/${WILDFLY_VERSION}/ DISTNAME= wildfly-${WILDFLY_VERSION} @@ -13,7 +13,7 @@ COMMENT= Replacement for JBoss Applicati LICENSE= GPLv2 -USE_RC_SUBR= wildfly100 +USE_RC_SUBR= wildfly10 USE_JAVA= yes JAVA_VERSION= 1.7+ USER= www Copied: head/java/wildfly10/files/wildfly10.in (from r431128, head/java/wildfly100/files/wildfly100.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/java/wildfly10/files/wildfly10.in Tue Jan 10 22:59:58 2017 (r431140, copy of r431128, head/java/wildfly100/files/wildfly100.in) @@ -0,0 +1,97 @@ +#!/bin/sh +# +# %%APP_SHORTNAME%% startup script. +# +# $FreeBSD$ +# + +# PROVIDE: %%APP_SHORTNAME%% +# REQUIRE: NETWORKING SERVERS +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%: +# %%APP_SHORTNAME%%_enable (bool): Set to "YES" to enable %%APP_SHORTNAME%% +# %%APP_SHORTNAME%%_args (str): Optional arguments to OAJBoss +# %%APP_SHORTNAME%%_log_stdout (str) JBoss log output stdout, filename. +# %%APP_SHORTNAME%%_log_stderr (str) JBoss log output stderr, filename. +# + +. /etc/rc.subr + +name="%%APP_SHORTNAME%%" +rcvar=%%APP_SHORTNAME%%_enable +extra_commands="status" + +load_rc_config $name + +%%APP_SHORTNAME%%_logdir="%%LOG_DIR%%" +%%APP_SHORTNAME%%_enable="${%%APP_SHORTNAME%%_enable:-"NO"}" +%%APP_SHORTNAME%%_log_stdout="${%%APP_SHORTNAME%%_log_stdout:-"${%%APP_SHORTNAME%%_logdir}/log"}" +%%APP_SHORTNAME%%_log_stderr="${%%APP_SHORTNAME%%_log_stderr:-"${%%APP_SHORTNAME%%_logdir}/error"}" +%%APP_SHORTNAME%%_args="${%%APP_SHORTNAME%%_args:-""}" +%%APP_SHORTNAME%%_sleep="${%%APP_SHORTNAME%%_sleep:-"5"}" +%%APP_SHORTNAME%%_kill9="${%%APP_SHORTNAME%%_kill9:-""}" +%%APP_SHORTNAME%%_additional_killall="${%%APP_SHORTNAME%%_additional_killall:-""}" +%%APP_SHORTNAME%%_user="%%USER%%" +%%APP_SHORTNAME%%_group="%%GROUP%%" + +start_cmd="%%APP_SHORTNAME%%_start" +stop_cmd="%%APP_SHORTNAME%%_stop" +pidfile="%%PID_FILE%%" + +WILDFLY_HOME="%%APP_HOME%%" +#minimal requirements must be set for our javavmwrapper +JAVA_VERSION="1.7+" +export JAVA_VERSION + +%%APP_SHORTNAME%%_start () +{ + if [ ! -d "${%%APP_SHORTNAME%%_logdir}" ] + then + install -d -o ${%%APP_SHORTNAME%%_user} ${%%APP_SHORTNAME%%_logdir} + fi + + echo "Making sure all writeable dirs belongs to proper user/group" + chown -R ${%%APP_SHORTNAME%%_user}:${%%APP_SHORTNAME%%_group} ${WILDFLY_HOME}/standalone + echo "Starting %%APP_SHORTNAME%%." + daemon -u ${%%APP_SHORTNAME%%_user} ${WILDFLY_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_args} >> ${%%APP_SHORTNAME%%_log_stdout} 2>> ${%%APP_SHORTNAME%%_log_stderr} + + sleep ${%%APP_SHORTNAME%%_sleep} # let daemon(8) and sh(1) finish before executing pgrep(1) + pgrep -U ${%%APP_SHORTNAME%%_user} -f ${WILDFLY_HOME}/modules > ${pidfile} + chown ${%%APP_SHORTNAME%%_user} $pidfile +} + +%%APP_SHORTNAME%%_stop () +{ + # Subvert the check_pid_file procname check. + if [ -f ${pidfile} ] + then + kill `cat ${pidfile}` + # Only if we aware that our setup can hangs, and only after trying simple kill, we can kill it hard way. + if [ ! -z "${%%APP_SHORTNAME%%_kill9}" ] + then + sleep ${%%APP_SHORTNAME%%_sleep} + kill -9 `cat ${pidfile}` + fi + # In some setups, JBoss can spawn some child processess, which could prevent it from stopping, and freeing net ports. + # Let's blindly kill them all, since we are really know what we are doing. + if [ ! -z "${%%APP_SHORTNAME%%_additional_killall}" ] + then + sleep ${%%APP_SHORTNAME%%_sleep} + killall ${%%APP_SHORTNAME%%_additional_killall} + fi + fi +} + +%%APP_SHORTNAME%%_status () +{ + # If running, show pid + if [ -f ${pidfile} ] + then + echo "%%APP_SHORTNAME%% is running as pid" `cat ${pidfile}` + else + echo "%%APP_SHORTNAME%% is not running" + fi +} + +run_rc_command "$1"