diff options
author | aurelien <aurelien@cwb.io> | 2013-09-23 10:33:22 +0200 |
---|---|---|
committer | aurelien <aurelien@cwb.io> | 2013-09-23 10:33:22 +0200 |
commit | 2735c9d273c54b555681f30f5c685998fed7b484 (patch) | |
tree | f8172dbea44d1c4751a99a62fb236a14c9d2dc20 /pcr/ganglia | |
parent | d78a32a6ccb8663a62a093b54e947e2efc840fe0 (diff) | |
parent | 97f65e06566f3bb15bc7395624017b8e6ca0d043 (diff) | |
download | abslibre-2735c9d273c54b555681f30f5c685998fed7b484.tar.gz abslibre-2735c9d273c54b555681f30f5c685998fed7b484.tar.bz2 abslibre-2735c9d273c54b555681f30f5c685998fed7b484.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/ganglia')
-rw-r--r-- | pcr/ganglia/PKGBUILD | 57 | ||||
-rw-r--r-- | pcr/ganglia/ganglia.install | 24 | ||||
-rw-r--r-- | pcr/ganglia/gmetad.service.in | 11 | ||||
-rw-r--r-- | pcr/ganglia/gmond.service.in | 9 |
4 files changed, 71 insertions, 30 deletions
diff --git a/pcr/ganglia/PKGBUILD b/pcr/ganglia/PKGBUILD index 3a2e54dd8..efa005071 100644 --- a/pcr/ganglia/PKGBUILD +++ b/pcr/ganglia/PKGBUILD @@ -1,9 +1,9 @@ -# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> +# Maintainer: Márcio Silva <coadde@lavabit.com> pkgname=ganglia pkgver=3.6.0 -pkgrel=1 -pkgdesc='Scalable distributed monitoring system for high-performance computing systems such as clusters and Grids' +pkgrel=4 +pkgdesc='Scalable distributed monitoring system for high-performance computing systems such as clusters and Grids.' arch=( i686 x86_64 @@ -18,41 +18,35 @@ depends=( python2 rrdtool ) +install=$pkgname.install options=(!libtool) optdepends="$pkgname-web: Web frontend" backup=( - etc/gmond.conf - etc/gmetad.conf + etc/ganglia/gmond.conf + etc/ganglia/gmetad.conf +) +source=( + http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + gmetad.service.in + gmond.service.in +) +sha512sums=( + 2a05d37787f1440c0c4aa91cdf0f4f4cb39c840b3b0fdcd6fe58cfb5892a75f81d36f6191c83c17558c37154298268df74fa255d2c940a8b84a7bf3ddb102394 + a42b7dcb7dd81961cc9fef114f8c4c352375ed931dc2ae77b1139c6fde7cbd6544fcb5fe286ff6066ef37696821dc9f6fcab7c6b14d3ebaa59e895219cd89836 + c362a383cbbaf5540b5d698f664534bd0da73bcc5ee4336c468844ed17706e05450f35e4f6cf969f1d2495c462883873b30e4575b9ee8ded74ab475afda608bb ) -source=http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz -sha512sums=2a05d37787f1440c0c4aa91cdf0f4f4cb39c840b3b0fdcd6fe58cfb5892a75f81d36f6191c83c17558c37154298268df74fa255d2c940a8b84a7bf3ddb102394 prepare() { cd $srcdir/$pkgname-$pkgver + #sed -i 's|sapi/embed/php_embed.h|php/sapi/embed/php_embed.h|' configure - touch gm{on,eta}d/gm{on,eta}d.service.in - echo '[Unit]' > gmetad/gmetad.service.in - echo 'Description=Ganglia Meta Daemon' >> gmetad/gmetad.service.in - echo 'After=network.target' >> gmetad/gmetad.service.in - echo '' >> gmetad/gmetad.service.in - echo '[Service]' >> gmetad/gmetad.service.in - echo 'Type=forking' >> gmetad/gmetad.service.in - echo 'PIDFile=/run/gmetad.pid' >> gmetad/gmetad.service.in - echo 'ExecStart=/usr/sbin/gmetad -p /run/gmetad.pid' >> gmetad/gmetad.service.in - echo '' >> gmetad/gmetad.service.in - echo '[Install]' >> gmetad/gmetad.service.in - echo 'WantedBy=multi-user.target' >> gmetad/gmetad.service.in + sed -i 's|nobody|ganglia|' gmetad/gmetad.conf.in - echo '[Unit]' > gmond/gmond.service.in - echo 'Description=Ganglia Monitor Daemon' >> gmond/gmond.service.in - echo 'After=network.target' >> gmond/gmond.service.in - echo '' >> gmond/gmond.service.in - echo '[Service]' >> gmond/gmond.service.in - echo 'ExecStart=/usr/sbin/gmond -f -p /run/gmond.pid' >> gmond/gmond.service.in - echo '' >> gmond/gmond.service.in - echo '[Install]' >> gmond/gmond.service.in - echo 'WantedBy=multi-user.target' >> gmond/gmond.service.in + # FIXME: Hopefully this will soon no longer be required? + msg2 'Copying systemd units into source as workaround for bug' + cp $srcdir/gmetad.service.in gmetad/gmetad.service.in + cp $srcdir/gmond.service.in gmond/gmond.service.in } build() { @@ -60,13 +54,16 @@ build() { setarch $CARCH ./configure --prefix=/usr\ --enable-gexec\ --enable-perl\ + --enable-setuid=ganglia\ --enable-status\ --disable-static\ --libdir=/usr/lib\ --with-gmetad\ --with-python=/usr/bin/python2\ - --sysconfdir=/etc + --sbindir=/usr/bin\ + --sysconfdir=/etc/ganglia # --enable-php\ +# --enable-setgid=ganglia\ setarch $CARCH make } @@ -77,5 +74,5 @@ package() { mkdir $pkgdir/usr/lib/$pkgname/python_modules msg2 'Generating default gmond.conf' - ./gmond/gmond --default_config > $pkgdir/etc/gmond.conf + ./gmond/gmond --default_config > $pkgdir/etc/ganglia/gmond.conf } diff --git a/pcr/ganglia/ganglia.install b/pcr/ganglia/ganglia.install new file mode 100644 index 000000000..6a196af1f --- /dev/null +++ b/pcr/ganglia/ganglia.install @@ -0,0 +1,24 @@ +post_install() { + if [ "`vercmp $2 3.4.0`" -lt 0 ]; then + echo 'WARNING: The ganglia package has been split. If you use the' \ + "web frontend, you'll need to install the ganglia-web package as well." + fi + id ganglia >& /dev/null + if [ $? -ne 0 ]; then + echo 'Adding ganglia system group and user...' + groupadd -r ganglia && useradd -r -d /var/lib/ganglia -g ganglia -s /bin/false ganglia + # Lock the account to prevent logging in + passwd -l ganglia &> /dev/null + fi + install -d -o ganglia -g ganglia /var/lib/ganglia && install -d -o ganglia -g ganglia /var/lib/ganglia/rrds +} + +post_upgrade() { + post_install +} + +post_remove() { + echo 'Removing ganglia system group and user...' + userdel ganglia + echo 'NOTE: Please remove /var/lib/ganglia manually if it is no longer required.' +} diff --git a/pcr/ganglia/gmetad.service.in b/pcr/ganglia/gmetad.service.in new file mode 100644 index 000000000..a721c2b4c --- /dev/null +++ b/pcr/ganglia/gmetad.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=Ganglia Meta Daemon +After=network.target + +[Service] +Type=forking +PIDFile=/run/gmetad.pid +ExecStart=/usr/bin/gmetad -p /run/gmetad.pid + +[Install] +WantedBy=multi-user.target diff --git a/pcr/ganglia/gmond.service.in b/pcr/ganglia/gmond.service.in new file mode 100644 index 000000000..5cbd31629 --- /dev/null +++ b/pcr/ganglia/gmond.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Ganglia Monitor Daemon +After=network.target + +[Service] +ExecStart=/usr/bin/gmond -f -p /run/gmond.pid + +[Install] +WantedBy=multi-user.target |