Add wildfly82 8.2.0, replacement for JBoss Application Server.
PR: 195336 Submitted by: Alexander Yerenkow <yerenkow@gmail.com>
This commit is contained in:
parent
31610269ee
commit
9ac019ed31
@ -141,6 +141,7 @@
|
||||
SUBDIR += visualvm
|
||||
SUBDIR += wildfly80
|
||||
SUBDIR += wildfly81
|
||||
SUBDIR += wildfly82
|
||||
SUBDIR += wildfly90
|
||||
SUBDIR += xdoclet
|
||||
|
||||
|
||||
45
java/wildfly82/Makefile
Normal file
45
java/wildfly82/Makefile
Normal file
@ -0,0 +1,45 @@
|
||||
# Created by: Alexander Yerenkow <yerenkow@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= wildfly82
|
||||
PORTVERSION= 8.2.0
|
||||
CATEGORIES= java www
|
||||
MASTER_SITES= http://download.jboss.org/wildfly/${WILDFLY_VERSION}/
|
||||
DISTNAME= wildfly-${WILDFLY_VERSION}
|
||||
|
||||
MAINTAINER= yerenkow@gmail.com
|
||||
COMMENT= Replacement for JBoss Application Server
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
USE_RC_SUBR= wildfly82
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.7+
|
||||
USER= www
|
||||
GROUP= www
|
||||
VAR_DIR?= /var
|
||||
LOG_DIR?= ${VAR_DIR}/log/${PORTNAME}
|
||||
PID_FILE= ${VAR_DIR}/run/${PORTNAME}.pid
|
||||
WILDFLY_VERSION= 8.2.0.Final
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
SUB_LIST= APP_SHORTNAME=${PORTNAME} \
|
||||
LOG_DIR=${LOG_DIR} \
|
||||
USER=${USER} \
|
||||
GROUP=${GROUP} \
|
||||
PID_FILE=${PID_FILE} \
|
||||
APP_HOME=${PREFIX}/wildfly-${PORTVERSION}
|
||||
PLIST_SUB= APP_HOME=wildfly-${PORTVERSION}
|
||||
|
||||
do-build:
|
||||
${RM} ${WRKSRC}/bin/*.bat
|
||||
${RM} -rf ${WRKSRC}/bin/service
|
||||
${RM} -rf ${WRKSRC}/bin/init.d
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/wildfly-${PORTVERSION}
|
||||
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/wildfly-${PORTVERSION})
|
||||
${CHMOD} +x ${STAGEDIR}${PREFIX}/wildfly-${PORTVERSION}/bin/*.sh
|
||||
${RMDIR} ${STAGEDIR}${PREFIX}/wildfly-${PORTVERSION}/.installation
|
||||
|
||||
.include <bsd.port.mk>
|
||||
2
java/wildfly82/distinfo
Normal file
2
java/wildfly82/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (wildfly-8.2.0.Final.tar.gz) = bf16e2be38fd1476b0e8a0b038f7d41d7ab525fc96c2a1077338814b7442728b
|
||||
SIZE (wildfly-8.2.0.Final.tar.gz) = 118257027
|
||||
11
java/wildfly82/files/patch-bin-add-user.sh
Normal file
11
java/wildfly82/files/patch-bin-add-user.sh
Normal file
@ -0,0 +1,11 @@
|
||||
--- bin/add-user.sh 2014-02-12 05:43:24.000000000 +0100
|
||||
+++ /usr/local/wildfly-8.2.0/bin/add-user.sh 2014-05-11 10:53:59.000000000 +0200
|
||||
@@ -7,6 +7,8 @@
|
||||
#
|
||||
|
||||
DIRNAME=`dirname "$0"`
|
||||
+JAVA_VERSION="1.7+"
|
||||
+export JAVA_VERSION
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false;
|
||||
15
java/wildfly82/files/pkg-message.in
Normal file
15
java/wildfly82/files/pkg-message.in
Normal file
@ -0,0 +1,15 @@
|
||||
To make WildFly bind to all interfaces add this to rc.conf:
|
||||
|
||||
wildfly82_args="-Djboss.bind.address=0.0.0.0"
|
||||
|
||||
See
|
||||
|
||||
https://community.jboss.org/wiki/JBossProperties
|
||||
|
||||
for additional startup properties.
|
||||
|
||||
To change JVM args, edit appropriate standalone.conf.
|
||||
|
||||
To add the initial admin user:
|
||||
|
||||
%%LOCALBASE%%/wildfly-8.2.0/bin/add-user.sh
|
||||
95
java/wildfly82/files/wildfly82.in
Normal file
95
java/wildfly82/files/wildfly82.in
Normal file
@ -0,0 +1,95 @@
|
||||
#!/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 "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"
|
||||
12
java/wildfly82/pkg-descr
Normal file
12
java/wildfly82/pkg-descr
Normal file
@ -0,0 +1,12 @@
|
||||
WildFly is a flexible, lightweight, managed application
|
||||
runtime that helps you build amazing applications.
|
||||
WildFly - new name for JBoss Application Server
|
||||
|
||||
Fast Startup
|
||||
Small Footprint
|
||||
Modular Design
|
||||
Unified Configuration and Management
|
||||
|
||||
And of course Java EE!
|
||||
|
||||
WWW: http://wildfly.org
|
||||
1042
java/wildfly82/pkg-plist
Normal file
1042
java/wildfly82/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user