aboutsummaryrefslogtreecommitdiffstats
path: root/testing/artifactory-oss
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-09-15 19:04:52 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-15 19:06:40 +0200
commitf9d670f037c4312e870e923a7d8d3fc7ef60f63e (patch)
tree5cf21f3f1d66b066915b4ef4d62d865d66365b45 /testing/artifactory-oss
parentcf9d16f4f5df593f57bf7b0811741b59166fd211 (diff)
downloadaports-f9d670f037c4312e870e923a7d8d3fc7ef60f63e.tar.bz2
aports-f9d670f037c4312e870e923a7d8d3fc7ef60f63e.tar.xz
testing/artifactory-oss: new aport
https://www.jfrog.com/open-source/ Open source Maven repository manager
Diffstat (limited to 'testing/artifactory-oss')
-rw-r--r--testing/artifactory-oss/APKBUILD100
-rw-r--r--testing/artifactory-oss/artifactory-oss.post-install7
-rw-r--r--testing/artifactory-oss/artifactory-oss.pre-install6
-rw-r--r--testing/artifactory-oss/artifactory.confd44
4 files changed, 157 insertions, 0 deletions
diff --git a/testing/artifactory-oss/APKBUILD b/testing/artifactory-oss/APKBUILD
new file mode 100644
index 0000000000..9790ffa17b
--- /dev/null
+++ b/testing/artifactory-oss/APKBUILD
@@ -0,0 +1,100 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=artifactory-oss
+_pkgname=artifactory
+pkgver=4.12.1
+pkgrel=0
+pkgdesc="Open source Maven repository manager"
+url="https://www.jfrog.com/open-source/"
+arch="noarch"
+license="AGPL3"
+depends="jetty-runner openjdk8-jre-base"
+makedepends="unzip zip"
+install="$pkgname.pre-install $pkgname.post-install"
+pkgusers="artifact"
+pkggroups="artifact"
+source="https://jcenter.bintray.com/org/artifactory/oss/jfrog-$pkgname/$pkgver/jfrog-$pkgname-$pkgver.zip
+ $_pkgname.confd"
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ default_prepare || return 1
+
+ cd "$builddir"
+
+ # Prepare default storage config (this is copied from Artifactory).
+ cat > etc/storage.properties <<-'EOF'
+ type=derby
+ url=jdbc:derby:{db.home};create=true
+ driver=org.apache.derby.jdbc.EmbeddedDriver
+ EOF
+
+ # Allow to change logs directory using system property.
+ sed -i 's|${artifactory.home}/logs|${artifactory.logs}|' \
+ etc/logback.xml || return 1
+
+ cd webapps
+
+ # Remove tomcat-juli from WAR, it conflicts with Jetty's implementation.
+ zip -d $_pkgname.war WEB-INF/lib/tomcat-juli-*.jar || return 1
+
+ # Patch web.xml inside WAR; remove second declaration of
+ # welcome-file-list that overwrites the previous correct one.
+ unzip $_pkgname.war WEB-INF/web.xml || return 1
+ patch -l WEB-INF/web.xml <<-EOF || return 1
+ @@ -159,8 +159,5 @@
+ <url-pattern>/ui/*</url-pattern>
+ </servlet-mapping>
+
+ - <welcome-file-list>
+ - <welcome-file>TC7-49422</welcome-file>
+ - </welcome-file-list>
+
+ </web-app>
+ EOF
+ zip -u $_pkgname.war WEB-INF/web.xml
+}
+
+package() {
+ local libdir="$pkgdir/var/lib/$_pkgname"
+
+ cd "$builddir"
+
+ install -m 644 -D webapps/$_pkgname.war \
+ "$pkgdir"/usr/share/java/$_pkgname.war || return 1
+
+ install -m 750 -o $pkgusers -g $pkggroups -d \
+ "$libdir" "$libdir"/etc "$libdir"/data || return 1
+
+ install -m 755 -o $pkgusers -g $pkggroups -d \
+ "$pkgdir"/var/log/$_pkgname || return 1
+
+ # Derby insists on logging into ./logs, so we must symlink it.
+ ln -s /var/log/$_pkgname "$libdir"/logs || return 1
+
+ local f; for f in artifactory.system.properties \
+ logback.xml \
+ mimetypes.xml \
+ storage.properties; do
+
+ install -m 644 -D etc/$f "$pkgdir"/etc/$_pkgname/$f || return 1
+ ln -s /etc/$_pkgname/$f "$libdir"/etc/$f || return 1
+ done
+
+ # Artifactory dumps settings from web admin interface, so keep it in
+ # /usr/lib instead of /etc.
+ install -m 600 -o $pkgusers -g $pkggroups \
+ etc/artifactory.config.xml "$libdir"/etc/ || return 1
+
+ mkdir -p "$pkgdir"/etc/init.d
+ ln -s jetty-runner "$pkgdir"/etc/init.d/$_pkgname || return 1
+
+ install -m 644 -D "$srcdir"/$_pkgname.confd "$pkgdir"/etc/conf.d/$_pkgname
+}
+
+md5sums="1eadbbf5a98abdca5d92e054fd7ad18e jfrog-artifactory-oss-4.12.1.zip
+5ea41a4fe0693f54d6c37de9a09c4277 artifactory.confd"
+sha256sums="163dee4f853b706fffb49fc47408a7d662b8cfd38606380fd186ab1ef253b8f1 jfrog-artifactory-oss-4.12.1.zip
+cf0feb3fb3c88bd0b074e796babaea1961760eea4862d8dee1e4fab5be1fcbe3 artifactory.confd"
+sha512sums="ed9d3f4459aecf864edfb82bc485ff8d648a9dd2ea9571073e5cab71da91e2830a9010e4f6c80c0e8c0f0ad68ea8f5858e6dd74ec67f7f282d29ebf55dda683f jfrog-artifactory-oss-4.12.1.zip
+824c4862f2ae28d8aa6f44ae6e02739e0604e974000520ca5efb9b6e293e564bf6b2b79785720fa2b864864462dce84fca7cdbb67291356e58821eccdb287c2b artifactory.confd"
diff --git a/testing/artifactory-oss/artifactory-oss.post-install b/testing/artifactory-oss/artifactory-oss.post-install
new file mode 100644
index 0000000000..c9d0f9398d
--- /dev/null
+++ b/testing/artifactory-oss/artifactory-oss.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cat <<EOF
+*
+* Default admin user is "admin" with password "password".
+*
+EOF
diff --git a/testing/artifactory-oss/artifactory-oss.pre-install b/testing/artifactory-oss/artifactory-oss.pre-install
new file mode 100644
index 0000000000..161f8fabde
--- /dev/null
+++ b/testing/artifactory-oss/artifactory-oss.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S artifact 2>/dev/null
+adduser -S -D -H -h /var/lib/artifactory -s /sbin/nologin -G artifactory -g artifact artifact 2>/dev/null
+
+exit 0
diff --git a/testing/artifactory-oss/artifactory.confd b/testing/artifactory-oss/artifactory.confd
new file mode 100644
index 0000000000..8df0d665bd
--- /dev/null
+++ b/testing/artifactory-oss/artifactory.confd
@@ -0,0 +1,44 @@
+# User to run the application.
+user="artifact"
+
+# Path of the WAR file, the web app directory, or the context xml file to run.
+webapp_path="/usr/share/java/artifactory.war"
+
+# The relative URL root (i.e. context path) of the application.
+#context_root=""
+
+# The port to listen on for HTTP connections (or 0 for a randomly allocated port).
+server_port="8080"
+
+# The name or IP of the interface to listen on (default is all interfaces).
+#server_bind_address=""
+
+# Path of the log file to catch stdout/stderr of the server process.
+# Use empty value to disable stdout/sderr logging.
+#server_out_log="/var/log/artifactory/server.log"
+
+# Path of the access log file.
+# Use empty value to disable access log.
+#server_access_log="/var/log/artifactory/access.log"
+
+# Additional JARs to be added to the classloader.
+# It may contain space or colon separated paths of JAR files or directories.
+#server_extra_jars="/usr/share/java/postgresql-jdbc.jar"
+
+# Java system properties to pass to the JVM.
+# Define space separated tuples of <name>=<value>; it will be transformed into
+# -D<name>=<value> arguments for java.
+java_properties="
+ artifactory.home=/var/lib/artifactory
+ artifactory.logs=/var/log/artifactory"
+
+# Initial and maximum size of the heap (in megabytes).
+# Note: This sets parameters -Xms and -Xmx.
+java_heap_size="512"
+
+# Additional options to pass to the JVM.
+java_opts="-XX:+UseG1GC -XX:MaxGCPauseMillis=80 -Xss256k"
+
+# You may use rc_need, rc_use, rc_after, rc_before and rc_provide variables to
+# influence the dependencies of the service.
+#rc_use="postgresql"