summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlad2015-07-08 15:50:59 +0300
committervlad2015-07-08 15:50:59 +0300
commit35ed2de40808b0f2c46aa27e6db7246f9b08ddd7 (patch)
treeae22f0c0b66f96a12e6def6052338274d377d4f6
downloadaur-35ed2de40808b0f2c46aa27e6db7246f9b08ddd7.tar.gz
Initial import
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD43
-rw-r--r--hudson.conf13
-rw-r--r--hudson.install58
-rw-r--r--hudson.service24
-rw-r--r--hudson.tmpfiles.d2
6 files changed, 167 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8810b1c01246
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = hudson
+ pkgdesc = Extensible continuous integration server
+ pkgver = 3.1.2
+ pkgrel = 1
+ url = http://hudson-ci.org
+ install = hudson.install
+ arch = any
+ license = EPL
+ depends = java-runtime
+ depends = ttf-dejavu
+ depends = libcups
+ provides = hudson
+ conflicts = hudson
+ replaces = hudson
+ noextract = hudson.war
+ backup = etc/conf.d/hudson
+ source = http://hudson-ci.org/downloads/war/3.1.2/hudson.war
+ source = hudson.conf
+ source = hudson.service
+ source = hudson.tmpfiles.d
+ sha256sums = b33b62559c658b3152f4e905c40ebcf0241b2e36d8bf2bd9f2f23d0c2bb9a8dd
+ sha256sums = 514f755b90bcb3a88339ab7f4104e9b7fcfebe70038abc008fa8acf450b1a531
+ sha256sums = 00a96b88bb9e98d14697e7e9eb443b0785f074eb1bbba207d3e7dd30d10ebbdf
+ sha256sums = c61cbcf85c887379a605c1908b5474599b0fce25bd2f8dd567da3ace6a631b08
+
+pkgname = hudson
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ff8827278b5a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Marcel Huber <marcelhuberfoo at gmail dott com>
+# Contributor: Markus M. May <mmay AT javafreedom DOT org>
+# Contributor: Yahya Mohajer < yaya_2013 At yahoo Dot com >
+
+pkgname=hudson
+pkgver=3.1.2
+pkgrel=1
+epoch=
+pkgdesc="Extensible continuous integration server"
+arch=(any)
+url="http://hudson-ci.org"
+license=('EPL')
+groups=()
+depends=(java-runtime ttf-dejavu libcups)
+makedepends=()
+checkdepends=()
+optdepends=()
+provides=(hudson)
+conflicts=(hudson)
+replaces=(hudson)
+backup=(etc/conf.d/hudson)
+options=()
+install=hudson.install
+changelog=
+source=(http://hudson-ci.org/downloads/war/$pkgver/hudson.war
+ hudson.conf
+ hudson.service
+ hudson.tmpfiles.d
+ )
+noextract=(hudson.war)
+sha256sums=('b33b62559c658b3152f4e905c40ebcf0241b2e36d8bf2bd9f2f23d0c2bb9a8dd'
+ '514f755b90bcb3a88339ab7f4104e9b7fcfebe70038abc008fa8acf450b1a531'
+ '00a96b88bb9e98d14697e7e9eb443b0785f074eb1bbba207d3e7dd30d10ebbdf'
+ 'c61cbcf85c887379a605c1908b5474599b0fce25bd2f8dd567da3ace6a631b08')
+package() {
+ install -D -m 444 "$srcdir/hudson.war" "$pkgdir/usr/share/java/hudson/hudson.war"
+ install -D -m 644 "$srcdir/hudson.service" "$pkgdir/usr/lib/systemd/system/hudson.service"
+ install -D -m 644 "$srcdir/hudson.tmpfiles.d" "$pkgdir/usr/lib/tmpfiles.d/hudson.conf"
+ install -D -m 644 "$srcdir/hudson.conf" "$pkgdir/etc/conf.d/hudson"
+}
+
+# vim:set ts=2 sw=2 et:
+
diff --git a/hudson.conf b/hudson.conf
new file mode 100644
index 000000000000..1bffd6988422
--- /dev/null
+++ b/hudson.conf
@@ -0,0 +1,13 @@
+JAVA=/usr/bin/java
+JAVA_ARGS=-Xmx512m
+JAVA_OPTS=
+HUDSON_USER=hudson
+HUDSON_HOME=/var/lib/hudson
+HUDSON_WAR=/usr/share/java/hudson/hudson.war
+HUDSON_WEBROOT=--webroot=/var/cache/hudson
+HUDSON_PORT=--httpPort=8070
+HUDSON_AJPPORT=--ajp13Port=-1
+HUDSON_OPTS=
+HUDSON_COMMAND_LINE="$JAVA $JAVA_ARGS $JAVA_OPTS -jar $HUDSON_WAR $HUDSON_WEBROOT $HUDSON_PORT $HUDSON_AJPPORT $HUDSON_OPTS"
+
+# vim:set ts=2 sw=2 et:
diff --git a/hudson.install b/hudson.install
new file mode 100644
index 000000000000..799dda063c30
--- /dev/null
+++ b/hudson.install
@@ -0,0 +1,58 @@
+#!/bin/sh
+# vim:set ts=2 sw=2 et:
+
+_service_name=hudson.service
+_service_username=hudson
+_service_groupname=${_service_username}
+_service_home_dir=/var/lib/hudson
+_service_tmpfiles_conf=${_service_username}.conf
+
+# Test whether the systemd service is enabled (presuming that systemd is running).
+_is_systemd_service_enabled() {
+ /usr/bin/systemctl is-enabled --quiet ${_service_name} 2>/dev/null
+}
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ getent passwd ${_service_username} > /dev/null || /usr/sbin/useradd --system --user-group --home-dir "${_service_home_dir}" --create-home --shell "/bin/bash" --skel /dev/null ${_service_username} &> /dev/null
+ [ -n "${_service_tmpfiles_conf}" ] && systemd-tmpfiles --create ${_service_tmpfiles_conf}
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ [ -n "${_service_tmpfiles_conf}" ] && systemd-tmpfiles --create ${_service_tmpfiles_conf}
+ _is_systemd_service_enabled && cat <<EOF
+=> Remember to issue the following commands:
+ sudo systemctl --system daemon-reload
+ sudo systemctl restart ${_service_name}
+EOF
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /usr/bin/systemctl stop ${_service_name} 2>/dev/null
+ _is_systemd_service_enabled && /usr/bin/systemctl disable ${_service_name} 2>/dev/null
+ [ -n "${_service_tmpfiles_conf}" ] && systemd-tmpfiles --remove ${_service_tmpfiles_conf}
+ return 0;
+}
+
+# arg 1: the old package version
+post_remove() {
+ getent passwd ${_service_username} > /dev/null && /usr/sbin/userdel ${_service_username} &>/dev/null
+ for d in ${_service_home_dir}; do
+ [ -n "${d}" -a -d "${d}" ] && echo "=> directory ${d} needs to be removed manually"
+ done
+ return 0;
+}
diff --git a/hudson.service b/hudson.service
new file mode 100644
index 000000000000..354105b0caa8
--- /dev/null
+++ b/hudson.service
@@ -0,0 +1,24 @@
+[Unit]
+Description=An extendable open source continuous integration server
+After=network.target
+
+[Service]
+User=hudson
+Type=simple
+EnvironmentFile=/etc/conf.d/hudson
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=hudson
+ExecStart=/bin/sh -c 'eval $HUDSON_COMMAND_LINE'
+#MemoryLimit=768M
+OOMScoreAdjust=-1000
+LimitCPU=infinity
+LimitFSIZE=infinity
+LimitDATA=infinity
+LimitCORE=0
+LimitAS=infinity
+LimitLOCKS=infinity
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/hudson.tmpfiles.d b/hudson.tmpfiles.d
new file mode 100644
index 000000000000..1139a3363ff1
--- /dev/null
+++ b/hudson.tmpfiles.d
@@ -0,0 +1,2 @@
+D /var/cache/hudson 0755 hudson hudson -
+R /var/cache/hudson