Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/net-snmp: ChangeLog net-snmp-5.4.2.1-r4.ebuild
Date: Thu, 29 Apr 2010 16:52:03
Message-Id: 20100429165158.AEB0E2C04C@corvid.gentoo.org
1 jer 10/04/29 16:51:58
2
3 Modified: ChangeLog
4 Added: net-snmp-5.4.2.1-r4.ebuild
5 Log:
6 Do not export CFLAGS/LDFLAGS to net-snmp-config (bug #303237).
7 (Portage version: 2.2_rc67/cvs/Linux i686)
8
9 Revision Changes Path
10 1.203 net-analyzer/net-snmp/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.203&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?rev=1.203&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/ChangeLog?r1=1.202&r2=1.203
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v
19 retrieving revision 1.202
20 retrieving revision 1.203
21 diff -u -r1.202 -r1.203
22 --- ChangeLog 16 Apr 2010 15:58:57 -0000 1.202
23 +++ ChangeLog 29 Apr 2010 16:51:58 -0000 1.203
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-analyzer/net-snmp
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.202 2010/04/16 15:58:57 lxnay Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.203 2010/04/29 16:51:58 jer Exp $
29 +
30 +*net-snmp-5.4.2.1-r4 (29 Apr 2010)
31 +
32 + 29 Apr 2010; Jeroen Roovers <jer@g.o> +net-snmp-5.4.2.1-r4.ebuild:
33 + Do not export CFLAGS/LDFLAGS to net-snmp-config (bug #303237).
34
35 16 Apr 2010; Fabio Erculiani <lxnay@g.o>
36 net-snmp-5.4.2.1-r2.ebuild, net-snmp-5.4.2.1-r3.ebuild:
37
38
39
40 1.1 net-analyzer/net-snmp/net-snmp-5.4.2.1-r4.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r4.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r4.ebuild?rev=1.1&content-type=text/plain
44
45 Index: net-snmp-5.4.2.1-r4.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4.2.1-r4.ebuild,v 1.1 2010/04/29 16:51:58 jer Exp $
50
51 EAPI=2
52
53 inherit fixheadtails flag-o-matic perl-module python autotools
54
55 DESCRIPTION="Software for generating and retrieving SNMP data"
56 HOMEPAGE="http://net-snmp.sourceforge.net/"
57 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
58
59 LICENSE="as-is BSD"
60 SLOT="0"
61 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
62 IUSE="bzip2 diskio doc elf extensible ipv6 kernel_linux lm_sensors mfd-rewrites minimal perl python rpm selinux sendmail smux ssl tcpd X zlib"
63
64 COMMON="ssl? ( >=dev-libs/openssl-0.9.6d )
65 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
66 rpm? (
67 app-arch/rpm
68 dev-libs/popt
69 app-arch/bzip2
70 >=sys-libs/zlib-1.1.4
71 )
72 bzip2? ( app-arch/bzip2 )
73 zlib? ( >=sys-libs/zlib-1.1.4 )
74 elf? ( dev-libs/elfutils )
75 lm_sensors? (
76 kernel_linux? ( sys-apps/lm_sensors )
77 )
78 python? ( dev-python/setuptools )"
79
80 RDEPEND="${COMMON}
81 perl? (
82 X? ( dev-perl/perl-tk )
83 !minimal? ( dev-perl/TermReadKey )
84 )
85 selinux? ( sec-policy/selinux-snmpd )"
86
87 # Dependency on autoconf due to bug #225893
88 DEPEND="${COMMON}
89 >=sys-devel/autoconf-2.61-r2
90 >=sys-apps/sed-4
91 doc? ( app-doc/doxygen )"
92
93 src_prepare() {
94 # Fix CVE-2008-6123
95 epatch "${FILESDIR}"/CVE-2008-6123.patch
96
97 # lm_sensors-3 support
98 if use lm_sensors ; then
99 epatch "${FILESDIR}"/${PN}-5.4.1-sensors3.patch \
100 "${FILESDIR}"/${PN}-5.4.1-sensors3-version_detect.patch
101 fi
102
103 # fix access violation in make check
104 sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \
105 die "sed eval_tools.sh failed"
106 # fix path in fixproc
107 sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \
108 die "sed fixproc failed"
109
110 if use python ; then
111 python_version
112 PYTHON_MODNAME="netsnmp"
113 PYTHON_DIR="/usr/$(get_libdir)/python${PYVER}/site-packages"
114 sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || \
115 die "sed python failed"
116 fi
117
118 # snmpconf generates config files with proper selinux context
119 use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
120
121 # remove CFLAGS from net-snmp-config script (bug #257622):
122 sed -i -e 's|@CFLAGS@||g' -e 's|@LDFLAGS@||g' \
123 net-snmp-config.in || die "sedding CFLAGS/LDFLAGS failed"
124
125 # Fix version number:
126 sed -i -e "s:NetSnmpVersionInfo = \".*\":NetSnmpVersionInfo = \"${PV}\":" \
127 snmplib/snmp_version.c || die "sedding version failed"
128
129 eautoreconf
130
131 ht_fix_all
132 }
133
134 src_configure() {
135 strip-flags
136
137 local mibs="host ucd-snmp/dlmod"
138 use diskio && mibs="${mibs} ucd-snmp/diskio"
139 use extensible && mibs="${mibs} ucd-snmp/extensible"
140 use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
141 use sendmail && mibs="${mibs} mibII/mta_sendmail"
142 use smux && mibs="${mibs} smux"
143
144 local myconf="$(use_enable ipv6) \
145 $(use_enable mfd-rewrites) \
146 $(use_enable perl embedded-perl) \
147 $(use_enable !ssl internal-md5) \
148 $(use_with elf) \
149 $(use_with perl perl-modules) \
150 $(use_with python python-modules) \
151 $(use_with ssl openssl) \
152 $(use_with tcpd libwrap)"
153 if use rpm ; then
154 myconf="${myconf} \
155 --with-rpm \
156 --with-bzip2 \
157 --with-zlib"
158 else
159 myconf="${myconf} \
160 --without-rpm \
161 $(use_with bzip2) \
162 $(use_with zlib)"
163 fi
164
165 econf \
166 --with-install-prefix="${D}" \
167 --with-sys-location="Unknown" \
168 --with-sys-contact="root@Unknown" \
169 --with-default-snmp-version="3" \
170 --with-mib-modules="${mibs}" \
171 --with-logfile="/var/log/net-snmpd.log" \
172 --with-persistent-directory="/var/lib/net-snmp" \
173 --enable-ucd-snmp-compatibility \
174 --enable-shared \
175 --enable-as-needed \
176 ${myconf}
177 }
178
179 src_compile() {
180 emake -j1 || die "emake failed"
181
182 if use doc ; then
183 einfo "Building HTML Documentation"
184 make docsdox || die "failed to build docs"
185 fi
186 }
187
188 src_test() {
189 cd testing
190 if ! make test ; then
191 echo
192 einfo "Don't be alarmed if a few tests FAIL."
193 einfo "This could happen for several reasons:"
194 einfo " - You don't already have a working configuration."
195 einfo " - Your ethernet interface isn't properly configured."
196 echo
197 fi
198 }
199
200 src_install () {
201 make DESTDIR="${D}" install || die "make install failed"
202
203 if use perl ; then
204 fixlocalpod
205 use X || rm -f "${D}"/usr/bin/tkmib
206 else
207 rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib
208 fi
209
210 dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO || die
211 newdoc EXAMPLE.conf.def EXAMPLE.conf || die
212
213 use doc && { dohtml docs/html/* || die ; }
214
215 keepdir /etc/snmp /var/lib/net-snmp
216
217 newinitd "${FILESDIR}"/snmpd.init snmpd || die
218 newconfd "${FILESDIR}"/snmpd.conf snmpd || die
219
220 newinitd "${FILESDIR}"/snmptrapd.init snmptrapd || die
221 newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd || die
222
223 # Remove everything not required for an agent.
224 # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
225 if use minimal; then
226 elog "USE='minimal' is set. Removing excess/non-minimal components."
227 rm -rf
228 "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}}
229 rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf
230 rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf}
231 find "${D}" -name '*.pl' -exec rm -f '{}' \;
232 use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6*
233 fi
234
235 # bug 113788, install example config
236 insinto /etc/snmp
237 newins "${S}"/EXAMPLE.conf snmpd.conf.example || die
238 }
239
240 pkg_postrm() {
241 use python && python_mod_cleanup
242 }
243
244 pkg_postinst() {
245 elog "An example configuration file has been installed in"
246 elog "/etc/snmp/snmpd.conf.example."
247 }