summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Langlois2015-08-26 20:53:56 -0400
committerTyler Langlois2015-08-26 20:53:56 -0400
commite657f8fc96eca367162df977ba6e3065d9dbc4d4 (patch)
tree17495412c33154140d4cc821433aa36c8f5e5cd6
downloadaur-e657f8fc96eca367162df977ba6e3065d9dbc4d4.tar.gz
Initial import from AUR3 with small changes
Credit to original author: https://github.com/aur-archive/ganglia-minimal. Changes inclue using sysusers.d, defining /usr/bin use in the ./configure step and using upstream systemd service units.
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD70
-rw-r--r--ganglia.install14
-rw-r--r--ganglia.sysusers1
-rw-r--r--runstatedir.patch7
-rw-r--r--uid.patch33
7 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..78f1735591f5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = ganglia-minimal
+ pkgdesc = A version of the ganglia package without gmetad to reduce dependencies.
+ pkgver = 3.7.1
+ pkgrel = 3
+ url = http://ganglia.sourceforge.net/
+ install = ganglia.install
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ license = BSD
+ depends = apr
+ depends = confuse
+ depends = python2
+ depends = pcre
+ conflicts = ganglia
+ options = !libtool
+ backup = etc/ganglia/gmond.conf
+ source = http://downloads.sourceforge.net/ganglia/ganglia-3.7.1.tar.gz
+ source = ganglia.install
+ source = ganglia.sysusers
+ source = uid.patch
+ source = runstatedir.patch
+ sha256sums = e735a6218986a0ff77c737e5888426b103196c12dc2d679494ca9a4269ca69a3
+ sha256sums = 8fc88d5c6d294315cbb7eca104af115514dd89afb2bcb8cc4e462ebc0db128e2
+ sha256sums = e0a14ba384d8e3685461241811cea18e5251ab5d84fd68471972540bcc542c4c
+ sha256sums = dc2cdffaf0cbedbbac2e654843803423f93da494aaeecda8a185ad3badea8e21
+ sha256sums = e3abe8017bf3d974e2b4ba5e285e7a91e94dbb69ec6fdf128675a8868e28c8a4
+
+pkgname = ganglia-minimal
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f34a96c51ab9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+pkg
+src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0e0a9ee11064
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Tyler Langlois <ty |at| tjll |dot| net>
+
+pkgname=ganglia-minimal
+_pkgbase=${pkgname%%-minimal}
+pkgver=3.7.1
+pkgrel=3
+pkgdesc="A version of the ganglia package without gmetad to reduce dependencies."
+arch=('i686' 'x86_64' 'armv6h')
+url="http://ganglia.sourceforge.net/"
+license=('BSD')
+depends=('apr' 'confuse' 'python2' 'pcre')
+conflicts=('ganglia')
+options=('!libtool')
+install='ganglia.install'
+backup=('etc/ganglia/gmond.conf')
+source=("http://downloads.sourceforge.net/$_pkgbase/$_pkgbase-$pkgver.tar.gz"
+ 'ganglia.install'
+ 'ganglia.sysusers'
+ 'uid.patch'
+ 'runstatedir.patch')
+sha256sums=('e735a6218986a0ff77c737e5888426b103196c12dc2d679494ca9a4269ca69a3'
+ '8fc88d5c6d294315cbb7eca104af115514dd89afb2bcb8cc4e462ebc0db128e2'
+ 'e0a14ba384d8e3685461241811cea18e5251ab5d84fd68471972540bcc542c4c'
+ 'dc2cdffaf0cbedbbac2e654843803423f93da494aaeecda8a185ad3badea8e21'
+ 'e3abe8017bf3d974e2b4ba5e285e7a91e94dbb69ec6fdf128675a8868e28c8a4')
+
+prepare() {
+ cd "$srcdir/$_pkgbase-$pkgver"
+
+ for patch in $srcdir/*.patch; do
+ msg2 "Applying $(basename $patch)"
+ patch -Np1 -i $patch
+ done
+}
+
+build() {
+ cd "$srcdir/$_pkgbase-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc/ganglia \
+ --enable-gexec \
+ --enable-status \
+ --with-python=/usr/bin/python2 \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgbase-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ # Install Python modules
+ mkdir -p "$pkgdir/usr/lib/$_pkgbase/python_modules"
+ find "gmond/python_modules" -name *.py \
+ -exec cp \{\} "$pkgdir/usr/lib/$_pkgbase/python_modules/" \;
+ cp -R "gmond/python_modules/conf.d" "$pkgdir/etc/$_pkgbase/"
+
+ msg2 "Generating default gmond.conf"
+ ./gmond/gmond --default_config > "$pkgdir/etc/$_pkgbase/gmond.conf"
+
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname}/COPYING"
+
+ # See man page for sysusers.d(5)
+ install -Dm644 "$srcdir"/ganglia.sysusers \
+ "$pkgdir"/usr/lib/sysusers.d/ganglia.conf
+}
diff --git a/ganglia.install b/ganglia.install
new file mode 100644
index 000000000000..8478939aabc7
--- /dev/null
+++ b/ganglia.install
@@ -0,0 +1,14 @@
+# Arg 1: the new package version
+post_install() {
+
+ # Create user and group
+ systemd-sysusers ganglia.conf
+}
+
+# Arg 1: the old package version
+post_remove() {
+
+ id ganglia >& /dev/null && userdel ganglia
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/ganglia.sysusers b/ganglia.sysusers
new file mode 100644
index 000000000000..2cdaab905785
--- /dev/null
+++ b/ganglia.sysusers
@@ -0,0 +1 @@
+u ganglia - - /
diff --git a/runstatedir.patch b/runstatedir.patch
new file mode 100644
index 000000000000..f823e378889e
--- /dev/null
+++ b/runstatedir.patch
@@ -0,0 +1,7 @@
+--- a/scripts/fixconfig.in
++++ b/scripts/fixconfig.in
+@@ -27,3 +27,3 @@ sysconfdir="@sysconfdir@"
+ includedir="@includedir@"
+-runstatedir="@localstatedir@/run" # @runstatedir@ if autoconf >= 2.70
++runstatedir="/run" # @runstatedir@ if autoconf >= 2.70
+ if [ -d "@sysconfdir@/sysconfig" ]
diff --git a/uid.patch b/uid.patch
new file mode 100644
index 000000000000..1655490336af
--- /dev/null
+++ b/uid.patch
@@ -0,0 +1,33 @@
+--- a/configure
++++ b/configure
+@@ -1588,7 +1588,7 @@ Optional Features:
+
+ --enable-debug turn on debugging output and compile options
+ --enable-gexec turn on gexec support (platform-specific)
+- --enable-setuid=USER turn on setuid support (default setuid=nobody)
++ --enable-setuid=USER turn on setuid support (default setuid=ganglia)
+ --enable-setgid=GROUP turn on setgid support (default setgid=no)
+ --enable-pedantic turn on pedantic mode during compile
+ --enable-memcheck turn on memory checking during compile
+@@ -11152,7 +11152,7 @@ $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h
+ fi
+
+
+-setuid_user=nobody
++setuid_user=ganglia
+ # Check whether --enable-setuid was given.
+ if test "${enable_setuid+set}" = set; then :
+ enableval=$enable_setuid; if test x"$enableval" != xno; then no_setuid=0; setuid_user=$enableval ; fi
+--- a/gmetad/gmetad.conf.in
++++ b/gmetad/gmetad.conf.in
+@@ -99,8 +99,8 @@ data_source "my cluster" localhost
+ #-------------------------------------------------------------------------------
+ # User gmetad will setuid to (defaults to "nobody")
+ # default: "nobody"
+-# setuid_username "nobody"
+-#
++setuid_username "ganglia"
++
+ #-------------------------------------------------------------------------------
+ # Umask to apply to created rrd files and grid directory structure
+ # default: 0 (files are public)