Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/net-snmp: ChangeLog net-snmp-5.4.1-r2.ebuild
Date: Thu, 27 Dec 2007 17:15:40
Message-Id: E1J7wKT-0000AU-1y@stork.gentoo.org
1 pva 07/12/27 17:15:33
2
3 Modified: ChangeLog
4 Added: net-snmp-5.4.1-r2.ebuild
5 Log:
6 Fixes memory leaks reported in bug #180266, thank Doug <doug.manley AT gmail.com> for report and ivestigation. Added upstream patch to suppress annoying "registration != duplicate" warning for root oids.
7 (Portage version: 2.1.3.19)
8
9 Revision Changes Path
10 1.163 net-analyzer/net-snmp/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.163&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.163&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?r1=1.162&r2=1.163
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v
19 retrieving revision 1.162
20 retrieving revision 1.163
21 diff -u -r1.162 -r1.163
22 --- ChangeLog 19 Nov 2007 06:16:52 -0000 1.162
23 +++ ChangeLog 27 Dec 2007 17:15:32 -0000 1.163
24 @@ -1,6 +1,15 @@
25 # ChangeLog for net-analyzer/net-snmp
26 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.162 2007/11/19 06:16:52 kumba Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.163 2007/12/27 17:15:32 pva Exp $
29 +
30 +*net-snmp-5.4.1-r2 (27 Dec 2007)
31 +
32 + 27 Dec 2007; <pva@g.o> files/net-snmp-5.4.1-clientaddr-fix.patch,
33 + +files/net-snmp-5.4.1-suppresssuppress-annoying.patch,
34 + +net-snmp-5.4.1-r2.ebuild:
35 + Fixes memory leaks reported in bug #180266, thank Doug <doug.manley AT
36 + gmail.com> for report and ivestigation. Added upstream patch to suppress
37 + annoying "registration != duplicate" warning for root oids.
38
39 19 Nov 2007; Joshua Kinard <kumba@g.o> net-snmp-5.4.1-r1.ebuild:
40 Marked unstable on mips, per #198346.
41
42
43
44 1.1 net-analyzer/net-snmp/net-snmp-5.4.1-r2.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.1-r2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.1-r2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: net-snmp-5.4.1-r2.ebuild
50 ===================================================================
51 # Copyright 1999-2007 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.1-r2.ebuild,v 1.1 2007/12/27 17:15:32 pva Exp $
54
55 inherit fixheadtails flag-o-matic perl-module python
56
57 DESCRIPTION="Software for generating and retrieving SNMP data"
58 HOMEPAGE="http://net-snmp.sourceforge.net/"
59 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
60
61 LICENSE="as-is BSD"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
64 IUSE="diskio doc elf ipv6 lm_sensors mfd-rewrites minimal perl python rpm selinux smux ssl tcpd X sendmail"
65
66 DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
67 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
68 rpm? (
69 app-arch/rpm
70 dev-libs/popt
71 app-arch/bzip2
72 >=sys-libs/zlib-1.1.4
73 )
74 elf? ( dev-libs/elfutils )
75 lm_sensors? ( sys-apps/lm_sensors )
76 python? ( dev-python/setuptools )"
77
78 RDEPEND="${DEPEND}
79 perl? (
80 X? ( dev-perl/perl-tk )
81 !minimal? ( dev-perl/TermReadKey )
82 )
83 selinux? ( sec-policy/selinux-snmpd )"
84
85 DEPEND="${DEPEND}
86 >=sys-apps/sed-4
87 doc? ( app-doc/doxygen )"
88
89 src_unpack() {
90 unpack ${A}
91 cd "${S}"
92
93 # fix access violation in make check
94 sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \
95 die "sed eval_tools.sh failed"
96 # fix path in fixproc
97 sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \
98 die "sed fixproc failed"
99
100 if use python ; then
101 python_version
102 PYTHON_MODNAME="netsnmp"
103 PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}/site-packages
104 sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || die "sed python failed"
105 fi
106
107 epatch "${FILESDIR}"/${P}-clientaddr-fix.patch
108 epatch "${FILESDIR}"/${P}-suppresssuppress-annoying.patch
109
110 ht_fix_all
111 }
112
113 src_compile() {
114 local mibs
115
116 strip-flags
117
118 # filter for bug #145960
119 # as it seems that the option is not enough
120 filter-ldflags -Wl,--as-needed
121
122 mibs="host ucd-snmp/dlmod"
123 use smux && mibs="${mibs} smux"
124 use sendmail && mibs="${mibs} mibII/mta_sendmail"
125 use lm_sensors && mibs="${mibs} ucd-snmp/lmSensors"
126 use diskio && mibs="${mibs} ucd-snmp/diskio"
127
128 econf \
129 --with-install-prefix="${D}" \
130 --with-sys-location="Unknown" \
131 --with-sys-contact="root@Unknown" \
132 --with-default-snmp-version="3" \
133 --with-mib-modules="${mibs}" \
134 --with-logfile="/var/log/net-snmpd.log" \
135 --with-persistent-directory="/var/lib/net-snmp" \
136 --enable-ucd-snmp-compatibility \
137 --enable-shared \
138 --enable-as-needed \
139 $(use_enable mfd-rewrites) \
140 $(use_enable perl embedded-perl) \
141 $(use_enable ipv6) \
142 $(use_enable !ssl internal-md5) \
143 $(use_with ssl openssl) \
144 $(use_with tcpd libwrap) \
145 $(use_with rpm) \
146 $(use_with rpm bzip2) \
147 $(use_with rpm zlib) \
148 $(use_with elf) \
149 $(use_with python python-modules) \
150 || die "econf failed"
151
152 emake -j1 || die "emake failed"
153
154 if use perl ; then
155 emake perlmodules || die "compile perl modules problem"
156 fi
157
158 if use python ; then
159 emake pythonmodules || die "compile python modules problem"
160 fi
161
162 if use doc ; then
163 einfo "Building HTML Documentation"
164 make docsdox || die "failed to build docs"
165 fi
166 }
167
168 src_test() {
169 cd testing
170 if ! make test ; then
171 echo
172 einfo "Don't be alarmed if a few tests FAIL."
173 einfo "This could happen for several reasons:"
174 einfo " - You don't already have a working configuration."
175 einfo " - Your ethernet interface isn't properly configured."
176 echo
177 fi
178 }
179
180 src_install () {
181
182 make DESTDIR="${D}" install || die "make install failed"
183
184 if use perl ; then
185 make DESTDIR="${D}" perlinstall || die "make perlinstall failed"
186 fixlocalpod
187
188 use X || rm -f "${D}/usr/bin/tkmib"
189 else
190 rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" "${D}/usr/bin/snmpcheck"
191 fi
192
193 if use python ; then
194 mkdir -p "${D}/${PYTHON_DIR}" || die "Couldn't make $PYTHON_DIR"
195 make pythoninstall || die "make pythoninstall failed"
196 fi
197
198 dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
199 newdoc EXAMPLE.conf.def EXAMPLE.conf
200
201 use doc && dohtml docs/html/*
202
203 keepdir /etc/snmp /var/lib/net-snmp
204
205 newinitd "${FILESDIR}"/snmpd.rc7 snmpd
206 newconfd "${FILESDIR}"/snmpd.conf snmpd
207
208 newinitd "${FILESDIR}"/snmptrapd.rc7 snmptrapd
209 newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
210
211 # Remove everything, keeping only the snmpd, snmptrapd, MIBs, libs, and includes.
212 if use minimal; then
213 elog "USE=minimal is set. Cleaning up excess cruft for a embedded/minimal/server only install."
214 rm -rf
215 "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}}
216 rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf
217 rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf}
218 find "${D}" -name '*.pl' -exec rm -f '{}' \;
219 use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6*
220 fi
221
222 # bug 113788, install example config
223 insinto /etc/snmp
224 newins "${S}"/EXAMPLE.conf snmpd.conf.example
225 }
226
227 pkg_postrm() {
228 if use python ; then
229 python_mod_cleanup
230 fi
231 }
232
233 pkg_postinst() {
234 elog "An example configuration file has been installed in"
235 elog "/etc/snmp/snmpd.conf.example."
236 }
237
238
239
240 --
241 gentoo-commits@g.o mailing list