summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Meury2016-05-31 18:31:00 +1000
committerCedric Meury2016-05-31 18:32:23 +1000
commitb12745ba77a6691e97ae6da6fc0b5863787adf21 (patch)
tree00610e671353d49c591d80c4045234b18e8dc25b
downloadaur-b12745ba77a6691e97ae6da6fc0b5863787adf21.tar.gz
initial packaging of uchiwa 0.14.5-1 with custom systemd script
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore4
-rw-r--r--LICENSE19
-rw-r--r--PKGBUILD33
-rw-r--r--uchiwa.install11
-rw-r--r--uchiwa.service15
6 files changed, 106 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a123150ec1e6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = uchiwa
+ pkgdesc = A simple dashboard for the Sensu monitoring framework, built with Go and AngularJS.
+ pkgver = 0.14.5
+ pkgrel = 1
+ url = https://www.uchiwa.io/
+ install = uchiwa.install
+ arch = x86_64
+ arch = i686
+ license = MIT
+ makedepends = rpmextract
+ makedepends = rsync
+ makedepends = wget
+ depends = python2
+ depends = bash
+ options = emptydirs
+ source = http://dl.bintray.com/palourde/uchiwa/uchiwa-0.14.5-1.x86_64.rpm
+ source = LICENSE
+ source = uchiwa.service
+ md5sums = 4e0d5c14c4ace11440755d27b74e941e
+ md5sums = 598261aece4dcb18f35ce5435b652d8a
+ md5sums = 2e541f1350bf2fffdcfd71db69dc0b57
+
+pkgname = uchiwa
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..677fb84268f8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.rpm
+/*.tar.xz
+/pkg
+/src
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..6ac4111420e6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Simon Plourde
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8164ebdba792
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Cedric Meury <cedric@meury.com>
+pkgname=uchiwa
+pkgver=0.14.5
+pkgrel=1
+pkgdesc="A simple dashboard for the Sensu monitoring framework, built with Go and AngularJS."
+arch=('x86_64' 'i686')
+url="https://www.uchiwa.io/"
+license=('MIT')
+install="${pkgname}.install"
+depends=('python2' 'bash')
+makedepends=('rpmextract' 'rsync' 'wget')
+options=('emptydirs')
+source=("http://dl.bintray.com/palourde/uchiwa/uchiwa-${pkgver}-1.${CARCH//i686/i386}.rpm"
+ 'LICENSE'
+ 'uchiwa.service')
+md5sums=('4e0d5c14c4ace11440755d27b74e941e'
+ '598261aece4dcb18f35ce5435b652d8a'
+ '2e541f1350bf2fffdcfd71db69dc0b57')
+
+package() {
+ rm $srcdir/opt/uchiwa/bin/.keep
+ rm $srcdir/opt/uchiwa/src/.keep
+ rm $srcdir/etc/sensu/dashboard.d/.keep
+ rm $srcdir/etc/default/uchiwa
+ rm -rf $srcdir/etc/default
+ rm $srcdir/etc/init.d/uchiwa
+ rm -rf $srcdir/etc/init.d
+
+ rsync -ruDq $srcdir/* $pkgdir
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 ${pkgname}.service "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+}
+
diff --git a/uchiwa.install b/uchiwa.install
new file mode 100644
index 000000000000..792d98bed19e
--- /dev/null
+++ b/uchiwa.install
@@ -0,0 +1,11 @@
+post_install() {
+ post_upgrade
+ passwd -l uchiwa &>/dev/null
+}
+
+post_upgrade() {
+ # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
+ getent group uchiwa >/dev/null || groupadd uchiwa
+ getent passwd uchiwa >/dev/null || useradd -c 'sensu dashboard service user' -g uchiwa -M -s /bin/false uchiwa
+}
+
diff --git a/uchiwa.service b/uchiwa.service
new file mode 100644
index 000000000000..b2ce2f892063
--- /dev/null
+++ b/uchiwa.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Dashboard for the Sensu monitoring framework.
+After=syslog.target network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=simple
+WorkingDirectory=/opt/uchiwa
+ExecStart=/opt/uchiwa/bin/uchiwa -c /etc/sensu/uchiwa.json -d /etc/sensu/dashboard.d -p /opt/uchiwa/src/public
+User=uchiwa
+Group=uchiwa
+Restart=on-failure
+LimitNOFILE=10000
+
+[Install]
+WantedBy=multi-user.target