summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2008-07-04 11:43:41 +0000
committerTony Vroon <chainsaw@gentoo.org>2008-07-04 11:43:41 +0000
commit39700b1c628b7c9047af0a6126925b1fd02905f5 (patch)
treed142129f77146cc46319e88d19f5f0069d139cb0 /net-analyzer
parentCleaning (diff)
downloadgentoo-2-39700b1c628b7c9047af0a6126925b1fd02905f5.tar.gz
gentoo-2-39700b1c628b7c9047af0a6126925b1fd02905f5.tar.bz2
gentoo-2-39700b1c628b7c9047af0a6126925b1fd02905f5.zip
Add a snips user & group to the system and set permissions appropriately. Install 3 missing files.
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc8-00204-gc461a97-dirty x86_64)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/snips/ChangeLog10
-rw-r--r--net-analyzer/snips/files/snips-1.2-install-missing.patch33
-rw-r--r--net-analyzer/snips/files/snips-1.2-r2-precache-config (renamed from net-analyzer/snips/files/snips-1.2-r1-precache-config)0
-rw-r--r--net-analyzer/snips/snips-1.2-r2.ebuild (renamed from net-analyzer/snips/snips-1.2-r1.ebuild)27
4 files changed, 67 insertions, 3 deletions
diff --git a/net-analyzer/snips/ChangeLog b/net-analyzer/snips/ChangeLog
index a2a0e9497f13..5a2f4c8e4c6c 100644
--- a/net-analyzer/snips/ChangeLog
+++ b/net-analyzer/snips/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-analyzer/snips
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snips/ChangeLog,v 1.2 2008/06/30 12:18:52 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snips/ChangeLog,v 1.3 2008/07/04 11:43:40 chainsaw Exp $
+
+*snips-1.2-r2 (04 Jul 2008)
+
+ 04 Jul 2008; <chainsaw@gentoo.org> +files/snips-1.2-install-missing.patch,
+ -files/snips-1.2-r1-precache-config, +files/snips-1.2-r2-precache-config,
+ -snips-1.2-r1.ebuild, +snips-1.2-r2.ebuild:
+ Add a snips user & group to the system and set permissions appropriately.
+ Install 3 missing files.
*snips-1.2-r1 (30 Jun 2008)
diff --git a/net-analyzer/snips/files/snips-1.2-install-missing.patch b/net-analyzer/snips/files/snips-1.2-install-missing.patch
new file mode 100644
index 000000000000..f9af70847494
--- /dev/null
+++ b/net-analyzer/snips/files/snips-1.2-install-missing.patch
@@ -0,0 +1,33 @@
+diff -uNr snips-1.2.ORIG/perl-monitors/Makefile.mid snips-1.2/perl-monitors/Makefile.mid
+--- snips-1.2.ORIG/perl-monitors/Makefile.mid 2008-07-04 11:24:23.000000000 +0100
++++ snips-1.2/perl-monitors/Makefile.mid 2008-07-04 11:28:02.000000000 +0100
+@@ -17,7 +17,7 @@
+ PROGS = apcmon armon bgpmon bpmon ciscomon modemmon novellmon nrmon \
+ hostmon hostmon-collector hostmon-osclients/hostmon-client \
+ smbmon sqlmon snmpmon snmpmon-collector snmpgeneric \
+- syslogmon upsmon rcisco testlog
++ syslogmon upsmon rcisco testlog snmpgeneric2
+
+ # to create init files to start/stop programs
+ INITFILES = apcmon armon bgpmon bpmon ciscomon modemmon novellmon nrmon \
+@@ -89,7 +89,7 @@
+ @if [ -f $(DESTDIR)$(ETCDIR)/mibII.txt ]; then \
+ mv $(DESTDIR)$(ETCDIR)/mibII.txt $(DESTDIR)$(ETCDIR)/mibII.txt.old ;\
+ fi
+- @echo "See $(SRCDIR)/perl-monotors/README for further customizations"
++ @echo "See $(SRCDIR)/perl-monitors/README for further customizations"
+
+ clean:
+ @-cd $(CMUSNMP)/snmpapps; make realclean
+diff -uNr snips-1.2.ORIG/utility/Makefile.mid snips-1.2/utility/Makefile.mid
+--- snips-1.2.ORIG/utility/Makefile.mid 2008-07-04 11:24:23.000000000 +0100
++++ snips-1.2/utility/Makefile.mid 2008-07-04 11:25:13.000000000 +0100
+@@ -6,7 +6,7 @@
+
+ SHSCRIPTS = crontab.snips snipsprog.init
+ PERLSCRIPTS = keepalive_monitors.pl logstats.pl logmaint.pl \
+- docrypt.pl notifier.pl
++ docrypt.pl notifier.pl snmpconf.pl
+ SCRIPTS = $(SHSCRIPTS) $(PERLSCRIPTS)
+
+ CPROGS = display_snips_datafile eventselect
diff --git a/net-analyzer/snips/files/snips-1.2-r1-precache-config b/net-analyzer/snips/files/snips-1.2-r2-precache-config
index a5b695426c51..a5b695426c51 100644
--- a/net-analyzer/snips/files/snips-1.2-r1-precache-config
+++ b/net-analyzer/snips/files/snips-1.2-r2-precache-config
diff --git a/net-analyzer/snips/snips-1.2-r1.ebuild b/net-analyzer/snips/snips-1.2-r2.ebuild
index 5c9c520fda41..b7ada4165bdb 100644
--- a/net-analyzer/snips/snips-1.2-r1.ebuild
+++ b/net-analyzer/snips/snips-1.2-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snips/snips-1.2-r1.ebuild,v 1.1 2008/06/30 12:18:52 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/snips/snips-1.2-r2.ebuild,v 1.1 2008/07/04 11:43:40 chainsaw Exp $
inherit eutils toolchain-funcs
@@ -23,12 +23,14 @@ src_unpack() {
unpack ${A}
cd "${S}"
# Gentoo-specific non-interactive configure override
- cp "${FILESDIR}/${PF}-precache-config" "${S}/Config.cache"
+ cp "${FILESDIR}/${PF}-precache-config" "${S}/Config.cache" \
+ || die "Unable to precache configure script answers"
echo "CFLAGS=\"${CFLAGS} -fPIC\"" >> "${S}/Config.cache"
echo "CC=\"$(tc-getCC)\"" >> "${S}/Config.cache"
echo "SRCDIR=\"${S}\"" >> "${S}/Config.cache"
epatch "${FILESDIR}/${P}-non-interactive.patch"
# Applied to upstream CVS
+ epatch "${FILESDIR}/${P}-install-missing.patch"
epatch "${FILESDIR}/${P}-implicit-declarations.patch"
epatch "${FILESDIR}/${P}-conflicting-types.patch"
epatch "${FILESDIR}/${P}-code-ordering.patch"
@@ -46,3 +48,24 @@ src_compile() {
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
}
+
+pkg_preinst() {
+ enewgroup snips
+ enewuser snips -1 -1 /usr/snips snips
+}
+
+pkg_postinst() {
+ ebegin "Fixing permissions"
+ chown -R snips:snips "${ROOT}"usr/snips
+ for x in data logs msgs rrddata run web device-help etc; do
+ chmod -R g+w "${ROOT}usr/snips/${x}" \
+ || die "Unable to chmod ${x}"
+ done
+ chown root:snips "${ROOT}usr/snips/bin/multiping" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/etherload" || die "chown root failed"
+ chown root:snips "${ROOT}usr/snips/bin/trapmon" || die "chown root failed"
+ chmod u+s "${ROOT}usr/snips/bin/multiping" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/etherload" || die "SetUID root failed"
+ chmod u+s "${ROOT}usr/snips/bin/trapmon" || die "SetUID root failed"
+ eend $?
+}