Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 2015 20:31:41 +0000 (UTC)
From:      Thomas Zander <riggs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r401165 - in head: . devel devel/artifactory devel/artifactory/files
Message-ID:  <201511092031.tA9KVff5032754@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: riggs
Date: Mon Nov  9 20:31:41 2015
New Revision: 401165
URL: https://svnweb.freebsd.org/changeset/ports/401165

Log:
  Add new port: devel/artifactory, a universal artifact repository manager
  
  PR:		204128
  Submitted by:	dharrigan@gmail.com (maintainer)

Added:
  head/devel/artifactory/
  head/devel/artifactory/Makefile   (contents, props changed)
  head/devel/artifactory/distinfo   (contents, props changed)
  head/devel/artifactory/files/
  head/devel/artifactory/files/artifactory.in   (contents, props changed)
  head/devel/artifactory/files/pkg-message.in   (contents, props changed)
  head/devel/artifactory/pkg-descr   (contents, props changed)
  head/devel/artifactory/pkg-plist   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/devel/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Mon Nov  9 20:09:00 2015	(r401164)
+++ head/GIDs	Mon Nov  9 20:31:41 2015	(r401165)
@@ -243,6 +243,7 @@ sogod:*:846:
 fossy:*:901:www
 scanlogd:*:902:
 _ocserv:*:903:
+artifactory:*:905:
 opentsdb:*:906:
 influxd:*:907:
 riemann:*:908:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Mon Nov  9 20:09:00 2015	(r401164)
+++ head/UIDs	Mon Nov  9 20:31:41 2015	(r401165)
@@ -251,6 +251,7 @@ sogod:*:846:846::0:0:SOGo groupware:/non
 fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash
 scanlogd:*:902:902::0:0:scanlogd user:/nonexistent:/usr/sbin/nologin
 _ocserv:*:903:903::0:0:ocserv user:/nonexistent:/usr/sbin/nologin
+artifactory:*:905:905::0:0:artifactory user:/nonexistent:/usr/sbin/nologin
 opentsdb:*:906:906::0:0:OpenTSDB Daemon:/var/empty:/usr/sbin/nologin
 influxd:*:907:907::0:0:InfluxDB Daemon:/var/empty:/usr/sbin/nologin
 riemann:*:908:908::0:0:Riemann User:/var/empty:/usr/sbin/nologin

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Mon Nov  9 20:09:00 2015	(r401164)
+++ head/devel/Makefile	Mon Nov  9 20:31:41 2015	(r401165)
@@ -98,6 +98,7 @@
     SUBDIR += arm-none-eabi-gcc492
     SUBDIR += aros-sdk
     SUBDIR += art
+    SUBDIR += artifactory
     SUBDIR += as31
     SUBDIR += asl
     SUBDIR += asmutils

Added: head/devel/artifactory/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/Makefile	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,76 @@
+# $FreeBSD$
+
+PORTNAME=	artifactory
+PORTVERSION=	4.2.2
+CATEGORIES=	devel java
+MASTER_SITES=	https://bintray.com/artifact/download/jfrog/artifactory/
+DISTNAME=	jfrog-${PORTNAME}-oss-${PORTVERSION}
+
+MAINTAINER=	dharrigan@gmail.com
+COMMENT=	Universal Artifact Repository Manager
+
+LICENSE=	GPLv3 LGPL3 APACHE20
+LICENSE_COMB=	multi
+LICENSE_FILE=	${WRKSRC}/COPYING ${WRKSRC}/COPYING ${WRKSRC}/tomcat/LICENSE
+
+RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-oss-${PORTVERSION}
+
+NO_ARCH=	yes
+USE_JAVA=	yes
+USES=		shebangfix zip
+SHEBANG_FILES=	bin/artifactory.sh
+NO_BUILD=	yes
+JAVA_VERSION=	1.8+
+JAVA_VENDOR=	openjdk
+ONLY_FOR_ARCHS=	i386 amd64
+USE_RC_SUBR=	${PORTNAME}
+
+APP_NAME=	${PORTNAME}
+APP_HOME?=	${PORTNAME}
+PID_FILE?=	/var/run/${PORTNAME}.pid
+VARDIR=		/var/${PORTNAME}
+
+USERS=		artifactory
+GROUPS=		artifactory
+
+SUB_LIST=	APP_HOME=${PREFIX}/${APP_HOME} \
+		APP_NAME=${APP_NAME} \
+		PID_FILE=${PID_FILE} \
+		VARDIR=${VARDIR}
+
+SUB_FILES=	pkg-message \
+
+PLIST_SUB=	APP_HOME=${APP_HOME} \
+		VARDIR=${VARDIR}
+
+do-install:
+.for f in artifactory-service.exe artifactory.bat installService.bat \
+	uninstallService.bat
+	${RM} ${WRKSRC}/bin/${f}
+.endfor
+	${RM} ${WRKSRC}/tomcat/bin/*.bat
+
+	${MKDIR} ${STAGEDIR}${PREFIX}/${APP_HOME}
+	(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${APP_HOME})
+
+	${MKDIR} ${STAGEDIR}/${VARDIR}/tomcat/logs/catalina
+	${LN} -sf ${VARDIR}/tomcat/logs/catalina ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/logs
+
+.for d in etc logs
+	${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d} ${STAGEDIR}/${VARDIR}
+	${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d}
+.endfor
+
+.for d in temp webapps work
+	${MV} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d} ${STAGEDIR}/${VARDIR}/tomcat
+	${LN} -sf ${VARDIR}/tomcat/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/tomcat/${d}
+.endfor
+
+.for d in data backup
+	${MKDIR} ${STAGEDIR}/${VARDIR}/${d}
+	${LN} -sf ${VARDIR}/${d} ${STAGEDIR}${PREFIX}/${APP_HOME}/${d}
+.endfor
+
+.include <bsd.port.mk>

Added: head/devel/artifactory/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/distinfo	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,2 @@
+SHA256 (jfrog-artifactory-oss-4.2.2.zip) = 4f180c0157875462e910b8acbe0c79b3427c38a5e5c90a1900d357958360e39f
+SIZE (jfrog-artifactory-oss-4.2.2.zip) = 35547422

Added: head/devel/artifactory/files/artifactory.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/files/artifactory.in	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# artifactory startup script.
+#
+# $FreeBSD$
+#
+# Make sure you have the artifactory user and artifactory home or set them below accordingly!
+
+# PROVIDE: artifactory
+# REQUIRE: NETWORKING SERVERS
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable artifactory:
+# artifactory_enable (bool):      Set to "YES" to enable artifactory
+# artifactory_args (str):         Optional arguments to Artifactory
+# artifactory_log_stdout (str)       Artifactory log output stdout, filename.
+# artifactory_log_stderr (str)       Artifactory log output stderr, filename.
+#
+
+ARTIFACTORY_HOME=%%APP_HOME%%
+
+. /etc/rc.subr
+
+name="artifactory"
+rcvar=artifactory_enable
+
+load_rc_config $name
+
+artifactory_enable="${artifactory_enable:-"NO"}"
+artifactory_log_stdout="${artifactory_log_stdout:-"${artifactory_logdir}/stdout.log"}"
+artifactory_log_stderr="${artifactory_log_stderr:-"${artifactory_logdir}/stderr.log"}"
+artifactory_args="${artifactory_args:-""}"
+artifactory_sleep="${artifactory_sleep:-"5"}"
+artifactory_kill9="${artifactory_kill9:-""}"
+artifactory_additional_killall="${artifactory_additional_killall:-""}"
+artifactory_user="artifactory"
+artifactory_logdir=$ARTIFACTORY_HOME/logs
+
+start_cmd="artifactory_start"
+stop_cmd="artifactory_stop"
+pidfile=%%PID_FILE%%
+
+artifactory_start ()
+{
+    if [ ! -d "${artifactory_logdir}" ]
+    then
+        install -d -o ${artifactory_user} ${artifactory_logdir}
+    fi
+
+    echo "Starting artifactory."
+    daemon -u ${artifactory_user} ${ARTIFACTORY_HOME}/bin/artifactory.sh ${artifactory_args} >> ${artifactory_log_stdout} 2>> ${artifactory_log_stderr} >> ${artifactory_logdir}/boot.log 2>> ${artifactory_logdir}/boot.log
+
+    sleep ${artifactory_sleep}  # let daemon(8) and sh(1) finish before executing pgrep(1)
+    pgrep -U ${artifactory_user} > ${pidfile}
+    chown ${artifactory_user} $pidfile
+}
+
+artifactory_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 "${artifactory_kill9}" ]
+        then
+            sleep ${artifactory_sleep}
+            kill  -9 `cat ${pidfile}`
+        fi
+        # In some setups, Artifactory 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 "${artifactory_additional_killall}" ]
+        then
+            sleep ${artifactory_sleep}
+            killall ${artifactory_additional_killall}
+        fi
+    fi
+}
+
+run_rc_command "$1"

Added: head/devel/artifactory/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/files/pkg-message.in	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,39 @@
+
+=== INSTALLATION ===
+
+Artifactory is now installed in %%APP_HOME%%
+
+You may want to activate it in /etc/rc.conf:
+
+  # echo %%APP_NAME%%_enable="YES" >> /etc/rc.conf
+
+Now, start Artifactory:
+
+  # service %%APP_NAME%% start
+
+Once Artifactory is started, point your web browser to:
+
+http://localhost:8081/
+
+Artifactory configuration files are located in %%APP_HOME%%/etc
+
+Please don't forget to review and edit the files in the
+%%APP_HOME%%/etc directory to suit your needs.
+
+Full documentation may be found at:
+
+https://www.jfrog.com/confluence/display/RTF/Welcome+to+Artifactory
+
+=== DEINSTALLATION ==
+
+If, when, Artifactory is removed, and you no longer require the
+runtime database and configuration files, you can delete the
+following directory:
+
+  %%VARDIR%%
+
+Please double-check before removing this directory as it contains
+the database files that Artifactory requires if you do decide to
+re-install it again.
+
+Enjoy!

Added: head/devel/artifactory/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/pkg-descr	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,6 @@
+
+The world's most advanced repository manager. Artifactory offers
+powerful enterprise feature and fine-grained permission control behind
+a sleek and easy-to-use UI.
+
+WWW: https://www.jfrog.com/artifactory 

Added: head/devel/artifactory/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/artifactory/pkg-plist	Mon Nov  9 20:31:41 2015	(r401165)
@@ -0,0 +1,97 @@
+%%APP_HOME%%/COPYING
+%%APP_HOME%%/COPYING.LESSER
+%%APP_HOME%%/README.txt
+%%APP_HOME%%/Third-Parties-Usage-About-Box.html
+@mode 0755
+%%APP_HOME%%/bin/artifactory.default
+%%APP_HOME%%/bin/artifactory.sh
+%%APP_HOME%%/bin/artifactoryctl
+%%APP_HOME%%/bin/configure.mysql.sh
+%%APP_HOME%%/bin/installService.sh
+%%APP_HOME%%/bin/recover.backup.sh
+%%APP_HOME%%/bin/uninstallService.sh
+@mode
+%%APP_HOME%%/backup
+%%APP_HOME%%/data
+%%APP_HOME%%/etc
+%%APP_HOME%%/logs
+%%APP_HOME%%/misc/db/createdb/createdb_mssql.sql
+%%APP_HOME%%/misc/db/createdb/createdb_mssqlBlob.sql
+%%APP_HOME%%/misc/db/createdb/createdb_mssqlRecreateBlob.sql
+%%APP_HOME%%/misc/db/createdb/createdb_mysql.sql
+%%APP_HOME%%/misc/db/mssql.properties
+%%APP_HOME%%/misc/db/mysql.properties
+%%APP_HOME%%/misc/db/oracle.properties
+%%APP_HOME%%/misc/db/postgresql.properties
+%%APP_HOME%%/misc/ha/ha-node.properties.template
+%%APP_HOME%%/misc/service/artifactory
+%%APP_HOME%%/misc/service/setenv.sh
+%%APP_HOME%%/misc/tomcat/NGNIX.txt
+%%APP_HOME%%/misc/tomcat/artifactory.httpd.conf
+%%APP_HOME%%/misc/tomcat/artifactory.xml
+%%APP_HOME%%/misc/tomcat/index.html
+%%APP_HOME%%/misc/tomcat/logging.properties
+%%APP_HOME%%/misc/tomcat/server.xml
+%%APP_HOME%%/misc/tomcat/web.xml
+%%APP_HOME%%/tomcat/LICENSE
+%%APP_HOME%%/tomcat/NOTICE
+%%APP_HOME%%/tomcat/RELEASE-NOTES
+%%APP_HOME%%/tomcat/RUNNING.txt
+%%APP_HOME%%/tomcat/bin/bootstrap.jar
+%%APP_HOME%%/tomcat/bin/catalina-tasks.xml
+%%APP_HOME%%/tomcat/bin/commons-daemon-native.tar.gz
+%%APP_HOME%%/tomcat/bin/commons-daemon.jar
+%%APP_HOME%%/tomcat/bin/tomcat-juli.jar
+%%APP_HOME%%/tomcat/bin/tomcat-native.tar.gz
+@mode 0755
+%%APP_HOME%%/tomcat/bin/catalina.sh
+%%APP_HOME%%/tomcat/bin/configtest.sh
+%%APP_HOME%%/tomcat/bin/daemon.sh
+%%APP_HOME%%/tomcat/bin/digest.sh
+%%APP_HOME%%/tomcat/bin/setclasspath.sh
+%%APP_HOME%%/tomcat/bin/shutdown.sh
+%%APP_HOME%%/tomcat/bin/startup.sh
+%%APP_HOME%%/tomcat/bin/tool-wrapper.sh
+%%APP_HOME%%/tomcat/bin/version.sh
+@mode
+%%APP_HOME%%/tomcat/conf/Catalina/localhost/artifactory.xml
+%%APP_HOME%%/tomcat/conf/catalina.policy
+%%APP_HOME%%/tomcat/conf/catalina.properties
+%%APP_HOME%%/tomcat/conf/logging.properties
+%%APP_HOME%%/tomcat/conf/server.xml
+%%APP_HOME%%/tomcat/conf/web.xml
+%%APP_HOME%%/tomcat/lib/annotations-api.jar
+%%APP_HOME%%/tomcat/lib/catalina.jar
+%%APP_HOME%%/tomcat/lib/el-api.jar
+%%APP_HOME%%/tomcat/lib/servlet-api.jar
+%%APP_HOME%%/tomcat/lib/tomcat-api.jar
+%%APP_HOME%%/tomcat/lib/tomcat-coyote.jar
+%%APP_HOME%%/tomcat/lib/tomcat-jni.jar
+%%APP_HOME%%/tomcat/lib/tomcat-util-scan.jar
+%%APP_HOME%%/tomcat/lib/tomcat-util.jar
+%%APP_HOME%%/tomcat/logs
+%%APP_HOME%%/tomcat/temp
+%%APP_HOME%%/tomcat/webapps
+%%APP_HOME%%/tomcat/work
+%%APP_HOME%%/webapps/artifactory.war
+@owner artifactory
+@group artifactory
+%%VARDIR%%/tomcat/webapps/ROOT/index.html
+%%VARDIR%%/etc/artifactory.config.xml
+%%VARDIR%%/etc/artifactory.system.properties
+%%VARDIR%%/etc/mimetypes.xml
+%%VARDIR%%/etc/logback.xml
+@dir %%VARDIR%%/tomcat/work
+@dir %%VARDIR%%/tomcat/webapps/ROOT
+@dir %%VARDIR%%/tomcat/webapps
+@dir %%VARDIR%%/tomcat/temp
+@dir %%VARDIR%%/tomcat/logs/catalina
+@dir %%VARDIR%%/tomcat/logs
+@dir %%VARDIR%%/tomcat
+@dir %%VARDIR%%/logs
+@dir %%VARDIR%%/etc
+@dir %%VARDIR%%/data
+@dir %%VARDIR%%/backup
+@dir %%VARDIR%%
+@owner
+@group



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511092031.tA9KVff5032754>