Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/, net-analyzer/net-snmp/files/
Date: Sat, 15 Aug 2020 13:31:22
Message-Id: 1597498207.07e54e9cb8c9cbe5d882436ee77ab823b4f96f8d.jer@gentoo
1 commit: 07e54e9cb8c9cbe5d882436ee77ab823b4f96f8d
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 15 13:29:55 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 15 13:30:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07e54e9c
7
8 net-analyzer/net-snmp: Old
9
10 Package-Manager: Portage-3.0.2, Repoman-2.3.23
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/net-snmp/Manifest | 3 -
14 .../net-snmp/files/net-snmp-5.8-my_bool.patch | 23 ---
15 net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild | 200 -------------------
16 net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild | 201 --------------------
17 net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild | 210 --------------------
18 net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild | 211 ---------------------
19 net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild | 211 ---------------------
20 7 files changed, 1059 deletions(-)
21
22 diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
23 index 49e33a99e38..e65dc054b55 100644
24 --- a/net-analyzer/net-snmp/Manifest
25 +++ b/net-analyzer/net-snmp/Manifest
26 @@ -1,6 +1,3 @@
27 DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636
28 DIST net-snmp-5.8.1.pre1.tar.gz 6630615 BLAKE2B 32ae7177fc08a773928da7f19cd06617feb1358c0dd21d39e08db460fa4267b6353f4afede1f5a500a628235a6a94d95700c84df6e85bda18b7a7a6e7bf3781f SHA512 e1ad421970abb67490a08fa735bbe9ff77a6fc5a19b8bf6942bef80f5b328f8038373cd5995970085177bcfe939dfa309019512b2abce0e8cf779e693f7d6dbd
29 -DIST net-snmp-5.8.1.pre2.tar.gz 6642893 BLAKE2B 4b2a1e87738c3bde49354f0cca84628f2953ee14f6b08ca53cf0bc5c320052cb4fe0f6eeb46551eaf2d45ba9c17f86ce06b64c00c1629b2d17bc351c0ccb37a8 SHA512 78cd9a29cc89ff7fa170ee767db3ca2077fc1d877f207c018887c2ea0148ffaf01eb013efc21b47f14c893a6ca48b3b439210ccd27dfc77f8c8e56bf9546f23e
30 -DIST net-snmp-5.8.1.rc1.tar.gz 6690067 BLAKE2B 35f9547de7b40c8a6f4a046e5cdb9b4a28650f0d87d51572659c5cbb0759503b9d328fc227fa2061f18a733ceaa8c22aa771fabe685a97fab1dc9b5ff98c2648 SHA512 294f2c5656bfc5141ef6aa5826f79b886094ea702ec20918c0ff20aa4100c8503b33a21086c6c028cff25c05504b9f8ed29533c89745586e32d63839345e2331
31 -DIST net-snmp-5.8.tar.gz 6591680 BLAKE2B ac1bff4152310da57818a00d752a08a7fc61d697b02479d9952ca12d024d3d68dc8bfa674571e93d6f3597605b2fe91513fb6839057a80f2c3dd8d0cce0077f2 SHA512 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7
32 DIST net-snmp-5.9.tar.gz 37424919 BLAKE2B 673c7f5e05b5562821b907e9e06e7dd80e6f3c08521cdd71321cbe9774f0f60993682670b1188b89a39ba560d10f2234ca0fb4e76e867ab26f2c82799621e8de SHA512 ddba2c2fc220ee18e3f8b6756a754e206d0d7dc9b9615c92596cd16b38557bd2c7327d7bb8164fa67d85a4c757eb4f7a7dad9584e4af13facfec6b1ccae7961b
33
34 diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch
35 deleted file mode 100644
36 index 72127d053c0..00000000000
37 --- a/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch
38 +++ /dev/null
39 @@ -1,23 +0,0 @@
40 -commit 9f4af8c42d515e6b214738cc97212dfbe7f749cf
41 -Author: Andreas Hasenack <ahasenack2@×××××××××××××××××.net>
42 -Date: Tue Feb 5 18:21:40 2019 -0800
43 -
44 - apps/snmptrapd_sql: Fix build against MySQL 8
45 -
46 - See also https://sourceforge.net/p/net-snmp/bugs/2922/.
47 -
48 - [bvanassche: changed 'int' into 'char']
49 -
50 -diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c
51 -index 6126ca916..32a3b1799 100644
52 ---- a/apps/snmptrapd_sql.c
53 -+++ b/apps/snmptrapd_sql.c
54 -@@ -199,7 +199,7 @@ typedef struct sql_buf_t {
55 - * static bind structures, plus 2 static buffers to bind to.
56 - */
57 - static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX];
58 --static my_bool _no_v3;
59 -+static char _no_v3;
60 -
61 - static void _sql_process_queue(u_int dontcare, void *meeither);
62 -
63
64 diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
65 deleted file mode 100644
66 index a1920941b96..00000000000
67 --- a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
68 +++ /dev/null
69 @@ -1,200 +0,0 @@
70 -# Copyright 1999-2020 Gentoo Authors
71 -# Distributed under the terms of the GNU General Public License v2
72 -
73 -EAPI=6
74 -PYTHON_COMPAT=( python2_7 )
75 -DISTUTILS_SINGLE_IMPL=yesplz
76 -DISTUTILS_OPTIONAL=yesplz
77 -WANT_AUTOMAKE=none
78 -PATCHSET=3
79 -GENTOO_DEPEND_ON_PERL=no
80 -
81 -inherit autotools distutils-r1 eutils ltprune perl-module systemd
82 -
83 -DESCRIPTION="Software for generating and retrieving SNMP data"
84 -HOMEPAGE="http://www.net-snmp.org/"
85 -SRC_URI="
86 - mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz
87 - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
88 -"
89 -
90 -S=${WORKDIR}/${P/_/.}
91 -
92 -# GPL-2 for the init scripts
93 -LICENSE="HPND BSD GPL-2"
94 -SLOT="0/35"
95 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
96 -IUSE="X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib"
97 -
98 -COMMON_DEPEND="
99 - ssl? (
100 - !libressl? ( >=dev-libs/openssl-0.9.6d:0= )
101 - libressl? ( dev-libs/libressl:= )
102 - )
103 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
104 - rpm? (
105 - app-arch/rpm
106 - dev-libs/popt
107 - )
108 - bzip2? ( app-arch/bzip2 )
109 - zlib? ( >=sys-libs/zlib-1.1.4 )
110 - elf? ( dev-libs/elfutils )
111 - python? (
112 - $(python_gen_cond_dep '
113 - dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
114 - ')
115 - ${PYTHON_DEPS}
116 - )
117 - pci? ( sys-apps/pciutils )
118 - lm-sensors? ( sys-apps/lm-sensors )
119 - netlink? ( dev-libs/libnl:3 )
120 - mysql? ( dev-db/mysql-connector-c:0= )
121 - perl? ( dev-lang/perl:= )
122 -"
123 -DEPEND="
124 - ${COMMON_DEPEND}
125 - doc? ( app-doc/doxygen )
126 -"
127 -RDEPEND="
128 - ${COMMON_DEPEND}
129 - perl? (
130 - X? ( dev-perl/Tk )
131 - !minimal? ( dev-perl/TermReadKey )
132 - )
133 - selinux? ( sec-policy/selinux-snmp )
134 -"
135 -
136 -REQUIRED_USE="
137 - python? ( ${PYTHON_REQUIRED_USE} )
138 - rpm? ( bzip2 zlib )
139 -"
140 -S=${WORKDIR}/${P/_p*/}
141 -
142 -RESTRICT=test
143 -
144 -pkg_setup() {
145 - use python && python-single-r1_pkg_setup
146 -}
147 -
148 -src_prepare() {
149 - # snmpconf generates config files with proper selinux context
150 - use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
151 -
152 - eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
153 - eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch
154 -
155 - mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
156 - mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
157 - eapply "${WORKDIR}"/patches/*.patch
158 -
159 - eapply_user
160 -
161 - eautoconf
162 -}
163 -
164 -src_configure() {
165 - # keep this in the same line, configure.ac arguments are passed down to config.h
166 - local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
167 - use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
168 - use smux && mibs="${mibs} smux"
169 -
170 - # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
171 - use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
172 -
173 - econf \
174 - $(use_enable !ssl internal-md5) \
175 - $(use_enable ipv6) \
176 - $(use_enable mfd-rewrites) \
177 - $(use_enable perl embedded-perl) \
178 - $(use_enable ucd-compat ucd-snmp-compatibility) \
179 - $(use_with bzip2) \
180 - $(use_with elf) \
181 - $(use_with kmem kmem-usage) \
182 - $(use_with mysql) \
183 - $(use_with netlink nl) \
184 - $(use_with pci) \
185 - $(use_with perl perl-modules INSTALLDIRS=vendor) \
186 - $(use_with python python-modules) \
187 - $(use_with rpm) \
188 - $(use_with ssl openssl) \
189 - $(use_with tcpd libwrap) \
190 - $(use_with zlib) \
191 - --enable-shared --disable-static \
192 - --with-default-snmp-version="3" \
193 - --with-install-prefix="${D}" \
194 - --with-ldflags="${LDFLAGS}" \
195 - --with-logfile="/var/log/net-snmpd.log" \
196 - --with-mib-modules="${mibs}" \
197 - --with-persistent-directory="/var/lib/net-snmp" \
198 - --with-sys-contact="root@Unknown" \
199 - --with-sys-location="Unknown"
200 -}
201 -
202 -src_compile() {
203 - for target in snmplib agent sedscript all; do
204 - emake OTHERLDFLAGS="${LDFLAGS}" ${target}
205 - done
206 -
207 - use doc && emake docsdox
208 -}
209 -
210 -src_install() {
211 - # bug #317965
212 - emake -j1 DESTDIR="${D}" install
213 -
214 - if use perl ; then
215 - perl_delete_localpod
216 - if ! use X; then
217 - rm "${D}"/usr/bin/tkmib || die
218 - fi
219 - else
220 - rm -f \
221 - "${D}"/usr/bin/fixproc \
222 - "${D}"/usr/bin/ipf-mod.pl \
223 - "${D}"/usr/bin/mib2c \
224 - "${D}"/usr/bin/net-snmp-cert \
225 - "${D}"/usr/bin/snmp-bridge-mib \
226 - "${D}"/usr/bin/snmpcheck \
227 - "${D}"/usr/bin/snmpconf \
228 - "${D}"/usr/bin/tkmib \
229 - "${D}"/usr/bin/traptoemail \
230 - "${D}"/usr/share/snmp/mib2c.perl.conf \
231 - "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
232 - || die
233 - fi
234 -
235 - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
236 - newdoc EXAMPLE.conf.def EXAMPLE.conf
237 -
238 - if use doc; then
239 - docinto html
240 - dodoc -r docs/html/*
241 - fi
242 -
243 - keepdir /var/lib/net-snmp
244 -
245 - newinitd "${FILESDIR}"/snmpd.init.2 snmpd
246 - newconfd "${FILESDIR}"/snmpd.conf snmpd
247 -
248 - newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
249 - newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
250 -
251 - systemd_dounit "${FILESDIR}"/snmpd.service
252 - systemd_dounit "${FILESDIR}"/snmptrapd.service
253 -
254 - insinto /etc/snmp
255 - newins "${S}"/EXAMPLE.conf snmpd.conf.example
256 -
257 - # Remove everything not required for an agent.
258 - # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
259 - if use minimal; then
260 - rm -rf \
261 - "${D}"/**/*.pl \
262 - "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
263 - "${D}"/usr/share/snmp/*.conf \
264 - "${D}"/usr/share/snmp/snmpconf-data \
265 - || die
266 - fi
267 -
268 - prune_libtool_files
269 -}
270
271 diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild
272 deleted file mode 100644
273 index a9de9b05549..00000000000
274 --- a/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild
275 +++ /dev/null
276 @@ -1,201 +0,0 @@
277 -# Copyright 1999-2020 Gentoo Authors
278 -# Distributed under the terms of the GNU General Public License v2
279 -
280 -EAPI=6
281 -PYTHON_COMPAT=( python2_7 )
282 -DISTUTILS_SINGLE_IMPL=yesplz
283 -DISTUTILS_OPTIONAL=yesplz
284 -WANT_AUTOMAKE=none
285 -PATCHSET=3
286 -GENTOO_DEPEND_ON_PERL=no
287 -
288 -inherit autotools distutils-r1 eutils ltprune perl-module systemd
289 -
290 -DESCRIPTION="Software for generating and retrieving SNMP data"
291 -HOMEPAGE="http://www.net-snmp.org/"
292 -SRC_URI="
293 - mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz
294 - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
295 -"
296 -
297 -S=${WORKDIR}/${P/_/.}
298 -
299 -# GPL-2 for the init scripts
300 -LICENSE="HPND BSD GPL-2"
301 -SLOT="0/35"
302 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
303 -IUSE="X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib"
304 -
305 -COMMON_DEPEND="
306 - ssl? (
307 - !libressl? ( >=dev-libs/openssl-0.9.6d:0= )
308 - libressl? ( dev-libs/libressl:= )
309 - )
310 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
311 - rpm? (
312 - app-arch/rpm
313 - dev-libs/popt
314 - )
315 - bzip2? ( app-arch/bzip2 )
316 - zlib? ( >=sys-libs/zlib-1.1.4 )
317 - elf? ( dev-libs/elfutils )
318 - python? (
319 - $(python_gen_cond_dep '
320 - dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
321 - ')
322 - ${PYTHON_DEPS}
323 - )
324 - pci? ( sys-apps/pciutils )
325 - lm-sensors? ( sys-apps/lm-sensors )
326 - netlink? ( dev-libs/libnl:3 )
327 - mysql? ( dev-db/mysql-connector-c:0= )
328 - perl? ( dev-lang/perl:= )
329 -"
330 -DEPEND="
331 - ${COMMON_DEPEND}
332 - doc? ( app-doc/doxygen )
333 -"
334 -RDEPEND="
335 - ${COMMON_DEPEND}
336 - perl? (
337 - X? ( dev-perl/Tk )
338 - !minimal? ( dev-perl/TermReadKey )
339 - )
340 - selinux? ( sec-policy/selinux-snmp )
341 -"
342 -
343 -REQUIRED_USE="
344 - python? ( ${PYTHON_REQUIRED_USE} )
345 - rpm? ( bzip2 zlib )
346 -"
347 -S=${WORKDIR}/${P/_p*/}
348 -
349 -RESTRICT=test
350 -
351 -pkg_setup() {
352 - use python && python-single-r1_pkg_setup
353 -}
354 -
355 -src_prepare() {
356 - # snmpconf generates config files with proper selinux context
357 - use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
358 -
359 - eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
360 - eapply "${FILESDIR}"/${PN}-5.8-my_bool.patch
361 - eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch
362 -
363 - mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
364 - mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
365 - eapply "${WORKDIR}"/patches/*.patch
366 -
367 - eapply_user
368 -
369 - eautoconf
370 -}
371 -
372 -src_configure() {
373 - # keep this in the same line, configure.ac arguments are passed down to config.h
374 - local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
375 - use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
376 - use smux && mibs="${mibs} smux"
377 -
378 - # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
379 - use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
380 -
381 - econf \
382 - $(use_enable !ssl internal-md5) \
383 - $(use_enable ipv6) \
384 - $(use_enable mfd-rewrites) \
385 - $(use_enable perl embedded-perl) \
386 - $(use_enable ucd-compat ucd-snmp-compatibility) \
387 - $(use_with bzip2) \
388 - $(use_with elf) \
389 - $(use_with kmem kmem-usage) \
390 - $(use_with mysql) \
391 - $(use_with netlink nl) \
392 - $(use_with pci) \
393 - $(use_with perl perl-modules INSTALLDIRS=vendor) \
394 - $(use_with python python-modules) \
395 - $(use_with rpm) \
396 - $(use_with ssl openssl) \
397 - $(use_with tcpd libwrap) \
398 - $(use_with zlib) \
399 - --enable-shared --disable-static \
400 - --with-default-snmp-version="3" \
401 - --with-install-prefix="${D}" \
402 - --with-ldflags="${LDFLAGS}" \
403 - --with-logfile="/var/log/net-snmpd.log" \
404 - --with-mib-modules="${mibs}" \
405 - --with-persistent-directory="/var/lib/net-snmp" \
406 - --with-sys-contact="root@Unknown" \
407 - --with-sys-location="Unknown"
408 -}
409 -
410 -src_compile() {
411 - for target in snmplib agent sedscript all; do
412 - emake OTHERLDFLAGS="${LDFLAGS}" ${target}
413 - done
414 -
415 - use doc && emake docsdox
416 -}
417 -
418 -src_install() {
419 - # bug #317965
420 - emake -j1 DESTDIR="${D}" install
421 -
422 - if use perl ; then
423 - perl_delete_localpod
424 - if ! use X; then
425 - rm "${D}"/usr/bin/tkmib || die
426 - fi
427 - else
428 - rm -f \
429 - "${D}"/usr/bin/fixproc \
430 - "${D}"/usr/bin/ipf-mod.pl \
431 - "${D}"/usr/bin/mib2c \
432 - "${D}"/usr/bin/net-snmp-cert \
433 - "${D}"/usr/bin/snmp-bridge-mib \
434 - "${D}"/usr/bin/snmpcheck \
435 - "${D}"/usr/bin/snmpconf \
436 - "${D}"/usr/bin/tkmib \
437 - "${D}"/usr/bin/traptoemail \
438 - "${D}"/usr/share/snmp/mib2c.perl.conf \
439 - "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
440 - || die
441 - fi
442 -
443 - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
444 - newdoc EXAMPLE.conf.def EXAMPLE.conf
445 -
446 - if use doc; then
447 - docinto html
448 - dodoc -r docs/html/*
449 - fi
450 -
451 - keepdir /var/lib/net-snmp
452 -
453 - newinitd "${FILESDIR}"/snmpd.init.2 snmpd
454 - newconfd "${FILESDIR}"/snmpd.conf snmpd
455 -
456 - newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
457 - newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
458 -
459 - systemd_dounit "${FILESDIR}"/snmpd.service
460 - systemd_dounit "${FILESDIR}"/snmptrapd.service
461 -
462 - insinto /etc/snmp
463 - newins "${S}"/EXAMPLE.conf snmpd.conf.example
464 -
465 - # Remove everything not required for an agent.
466 - # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
467 - if use minimal; then
468 - rm -rf \
469 - "${D}"/**/*.pl \
470 - "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
471 - "${D}"/usr/share/snmp/*.conf \
472 - "${D}"/usr/share/snmp/snmpconf-data \
473 - || die
474 - fi
475 -
476 - prune_libtool_files
477 -}
478
479 diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild
480 deleted file mode 100644
481 index d99fb7481f5..00000000000
482 --- a/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild
483 +++ /dev/null
484 @@ -1,210 +0,0 @@
485 -# Copyright 1999-2020 Gentoo Authors
486 -# Distributed under the terms of the GNU General Public License v2
487 -
488 -EAPI=6
489 -PYTHON_COMPAT=( python2_7 )
490 -DISTUTILS_SINGLE_IMPL=yesplz
491 -DISTUTILS_OPTIONAL=yesplz
492 -WANT_AUTOMAKE=none
493 -PATCHSET=3
494 -GENTOO_DEPEND_ON_PERL=no
495 -
496 -inherit autotools distutils-r1 eutils ltprune perl-module systemd
497 -
498 -DESCRIPTION="Software for generating and retrieving SNMP data"
499 -HOMEPAGE="http://www.net-snmp.org/"
500 -SRC_URI="
501 - mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz
502 - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
503 -"
504 -
505 -S=${WORKDIR}/${P/_/.}
506 -
507 -# GPL-2 for the init scripts
508 -LICENSE="HPND BSD GPL-2"
509 -SLOT="0/35"
510 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
511 -IUSE="
512 - X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql
513 - netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib
514 -"
515 -
516 -COMMON_DEPEND="
517 - bzip2? ( app-arch/bzip2 )
518 - elf? ( dev-libs/elfutils )
519 - lm-sensors? ( sys-apps/lm-sensors )
520 - mysql? ( dev-db/mysql-connector-c:0= )
521 - netlink? ( dev-libs/libnl:3 )
522 - pcap? ( net-libs/libpcap )
523 - pci? ( sys-apps/pciutils )
524 - perl? ( dev-lang/perl:= )
525 - python? (
526 - $(python_gen_cond_dep '
527 - dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
528 - ')
529 - ${PYTHON_DEPS}
530 - )
531 - rpm? (
532 - app-arch/rpm
533 - dev-libs/popt
534 - )
535 - ssl? (
536 - !libressl? ( >=dev-libs/openssl-0.9.6d:0= )
537 - libressl? ( dev-libs/libressl:= )
538 - )
539 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
540 - zlib? ( >=sys-libs/zlib-1.1.4 )
541 -"
542 -DEPEND="
543 - ${COMMON_DEPEND}
544 - doc? ( app-doc/doxygen )
545 -"
546 -RDEPEND="
547 - ${COMMON_DEPEND}
548 - perl? (
549 - X? ( dev-perl/Tk )
550 - !minimal? ( dev-perl/TermReadKey )
551 - )
552 - selinux? ( sec-policy/selinux-snmp )
553 -"
554 -
555 -REQUIRED_USE="
556 - python? ( ${PYTHON_REQUIRED_USE} )
557 - rpm? ( bzip2 zlib )
558 -"
559 -S=${WORKDIR}/${P/_p*/}
560 -
561 -RESTRICT=test
562 -
563 -pkg_setup() {
564 - use python && python-single-r1_pkg_setup
565 -}
566 -
567 -src_prepare() {
568 - # snmpconf generates config files with proper selinux context
569 - use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
570 -
571 - eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
572 - eapply "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch
573 - eapply "${FILESDIR}"/${PN}-5.8-my_bool.patch
574 - eapply "${FILESDIR}"/${PN}-5.8-pcap.patch
575 - eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch
576 -
577 - mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
578 - mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
579 - eapply "${WORKDIR}"/patches/*.patch
580 -
581 - eapply_user
582 -
583 - eautoconf
584 -}
585 -
586 -src_configure() {
587 - # keep this in the same line, configure.ac arguments are passed down to config.h
588 - local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
589 - use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
590 - use smux && mibs="${mibs} smux"
591 -
592 - # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
593 - use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
594 -
595 - econf \
596 - $(use_enable !ssl internal-md5) \
597 - $(use_enable ipv6) \
598 - $(use_enable mfd-rewrites) \
599 - $(use_enable perl embedded-perl) \
600 - $(use_enable ucd-compat ucd-snmp-compatibility) \
601 - $(use_with bzip2) \
602 - $(use_with elf) \
603 - $(use_with kmem kmem-usage) \
604 - $(use_with mysql) \
605 - $(use_with netlink nl) \
606 - $(use_with pcap) \
607 - $(use_with pci) \
608 - $(use_with perl perl-modules INSTALLDIRS=vendor) \
609 - $(use_with python python-modules) \
610 - $(use_with rpm) \
611 - $(use_with ssl openssl) \
612 - $(use_with tcpd libwrap) \
613 - $(use_with zlib) \
614 - --enable-shared --disable-static \
615 - --with-default-snmp-version="3" \
616 - --with-install-prefix="${D}" \
617 - --with-ldflags="${LDFLAGS}" \
618 - --with-logfile="/var/log/net-snmpd.log" \
619 - --with-mib-modules="${mibs}" \
620 - --with-persistent-directory="/var/lib/net-snmp" \
621 - --with-sys-contact="root@Unknown" \
622 - --with-sys-location="Unknown"
623 -}
624 -
625 -src_compile() {
626 - for target in snmplib agent sedscript all; do
627 - emake OTHERLDFLAGS="${LDFLAGS}" ${target}
628 - done
629 -
630 - use doc && emake docsdox
631 -}
632 -
633 -src_install() {
634 - # bug #317965
635 - emake -j1 DESTDIR="${D}" install
636 -
637 - use python && python_optimize
638 -
639 - if use perl ; then
640 - perl_delete_localpod
641 - if ! use X; then
642 - rm "${D}"/usr/bin/tkmib || die
643 - fi
644 - else
645 - rm -f \
646 - "${D}"/usr/bin/fixproc \
647 - "${D}"/usr/bin/ipf-mod.pl \
648 - "${D}"/usr/bin/mib2c \
649 - "${D}"/usr/bin/net-snmp-cert \
650 - "${D}"/usr/bin/snmp-bridge-mib \
651 - "${D}"/usr/bin/snmpcheck \
652 - "${D}"/usr/bin/snmpconf \
653 - "${D}"/usr/bin/tkmib \
654 - "${D}"/usr/bin/traptoemail \
655 - "${D}"/usr/share/snmp/mib2c.perl.conf \
656 - "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
657 - || die
658 - fi
659 -
660 - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
661 - newdoc EXAMPLE.conf.def EXAMPLE.conf
662 -
663 - if use doc; then
664 - docinto html
665 - dodoc -r docs/html/*
666 - fi
667 -
668 - keepdir /var/lib/net-snmp
669 -
670 - newinitd "${FILESDIR}"/snmpd.init.2 snmpd
671 - newconfd "${FILESDIR}"/snmpd.conf snmpd
672 -
673 - newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
674 - newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
675 -
676 - systemd_dounit "${FILESDIR}"/snmpd.service
677 - systemd_dounit "${FILESDIR}"/snmptrapd.service
678 -
679 - insinto /etc/snmp
680 - newins "${S}"/EXAMPLE.conf snmpd.conf.example
681 -
682 - # Remove everything not required for an agent.
683 - # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
684 - if use minimal; then
685 - rm -rf \
686 - "${D}"/**/*.pl \
687 - "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
688 - "${D}"/usr/share/snmp/*.conf \
689 - "${D}"/usr/share/snmp/snmpconf-data \
690 - || die
691 - fi
692 -
693 - prune_libtool_files
694 -}
695
696 diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
697 deleted file mode 100644
698 index bff341a5bfc..00000000000
699 --- a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
700 +++ /dev/null
701 @@ -1,211 +0,0 @@
702 -# Copyright 1999-2020 Gentoo Authors
703 -# Distributed under the terms of the GNU General Public License v2
704 -
705 -EAPI=7
706 -PYTHON_COMPAT=( python2_7 )
707 -DISTUTILS_SINGLE_IMPL=yesplz
708 -DISTUTILS_OPTIONAL=yesplz
709 -WANT_AUTOMAKE=none
710 -PATCHSET=3
711 -GENTOO_DEPEND_ON_PERL=no
712 -
713 -inherit autotools distutils-r1 perl-module systemd
714 -
715 -DESCRIPTION="Software for generating and retrieving SNMP data"
716 -HOMEPAGE="http://www.net-snmp.org/"
717 -SRC_URI="
718 - mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}-pre-releases/${P/_pre/.pre}.tar.gz
719 - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
720 -"
721 -
722 -S=${WORKDIR}/${P/_/.}
723 -
724 -# GPL-2 for the init scripts
725 -LICENSE="HPND BSD GPL-2"
726 -SLOT="0/35"
727 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
728 -IUSE="
729 - X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql
730 - netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib
731 -"
732 -REQUIRED_USE="
733 - python? ( ${PYTHON_REQUIRED_USE} )
734 - rpm? ( bzip2 zlib )
735 -"
736 -
737 -COMMON_DEPEND="
738 - bzip2? ( app-arch/bzip2 )
739 - elf? ( dev-libs/elfutils )
740 - lm-sensors? ( sys-apps/lm-sensors )
741 - mysql? ( dev-db/mysql-connector-c:0= )
742 - netlink? ( dev-libs/libnl:3 )
743 - pcap? ( net-libs/libpcap )
744 - pci? ( sys-apps/pciutils )
745 - perl? ( dev-lang/perl:= )
746 - python? (
747 - $(python_gen_cond_dep '
748 - dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
749 - ')
750 - ${PYTHON_DEPS}
751 - )
752 - rpm? (
753 - app-arch/rpm
754 - dev-libs/popt
755 - )
756 - ssl? (
757 - !libressl? ( >=dev-libs/openssl-0.9.6d:0= )
758 - libressl? ( dev-libs/libressl:= )
759 - )
760 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
761 - zlib? ( >=sys-libs/zlib-1.1.4 )
762 -"
763 -DEPEND="
764 - ${COMMON_DEPEND}
765 - doc? ( app-doc/doxygen )
766 -"
767 -RDEPEND="
768 - ${COMMON_DEPEND}
769 - perl? (
770 - X? ( dev-perl/Tk )
771 - !minimal? ( dev-perl/TermReadKey )
772 - )
773 - selinux? ( sec-policy/selinux-snmp )
774 -"
775 -S=${WORKDIR}/${P/_pre/.pre}
776 -RESTRICT=test
777 -PATCHES=(
778 - "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
779 - "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch
780 - "${FILESDIR}"/${PN}-5.8-pcap.patch
781 - "${FILESDIR}"/${PN}-5.8-tinfo.patch
782 - "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
783 - "${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
784 - "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
785 -)
786 -
787 -pkg_setup() {
788 - use python && python-single-r1_pkg_setup
789 -}
790 -
791 -src_prepare() {
792 - # snmpconf generates config files with proper selinux context
793 - use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
794 -
795 - mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
796 - mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
797 - eapply "${WORKDIR}"/patches/*.patch
798 -
799 - default
800 -
801 - eautoconf
802 -}
803 -
804 -src_configure() {
805 - # keep this in the same line, configure.ac arguments are passed down to config.h
806 - local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
807 - use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
808 - use smux && mibs="${mibs} smux"
809 -
810 - # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
811 - use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
812 -
813 - econf \
814 - $(use_enable !ssl internal-md5) \
815 - $(use_enable ipv6) \
816 - $(use_enable mfd-rewrites) \
817 - $(use_enable perl embedded-perl) \
818 - $(use_enable ucd-compat ucd-snmp-compatibility) \
819 - $(use_with bzip2) \
820 - $(use_with elf) \
821 - $(use_with kmem kmem-usage) \
822 - $(use_with mysql) \
823 - $(use_with netlink nl) \
824 - $(use_with pcap) \
825 - $(use_with pci) \
826 - $(use_with perl perl-modules INSTALLDIRS=vendor) \
827 - $(use_with python python-modules) \
828 - $(use_with rpm) \
829 - $(use_with ssl openssl) \
830 - $(use_with tcpd libwrap) \
831 - $(use_with zlib) \
832 - --enable-shared --disable-static \
833 - --with-default-snmp-version="3" \
834 - --with-install-prefix="${D}" \
835 - --with-ldflags="${LDFLAGS}" \
836 - --with-logfile="/var/log/net-snmpd.log" \
837 - --with-mib-modules="${mibs}" \
838 - --with-persistent-directory="/var/lib/net-snmp" \
839 - --with-sys-contact="root@Unknown" \
840 - --with-sys-location="Unknown"
841 -}
842 -
843 -src_compile() {
844 - for target in snmplib agent sedscript all; do
845 - emake OTHERLDFLAGS="${LDFLAGS}" ${target}
846 - done
847 -
848 - use doc && emake docsdox
849 -}
850 -
851 -src_install() {
852 - # bug #317965
853 - emake -j1 DESTDIR="${D}" install
854 -
855 - use python && python_optimize
856 -
857 - if use perl ; then
858 - perl_delete_localpod
859 - if ! use X; then
860 - rm "${D}"/usr/bin/tkmib || die
861 - fi
862 - else
863 - rm -f \
864 - "${D}"/usr/bin/fixproc \
865 - "${D}"/usr/bin/ipf-mod.pl \
866 - "${D}"/usr/bin/mib2c \
867 - "${D}"/usr/bin/net-snmp-cert \
868 - "${D}"/usr/bin/snmp-bridge-mib \
869 - "${D}"/usr/bin/snmpcheck \
870 - "${D}"/usr/bin/snmpconf \
871 - "${D}"/usr/bin/tkmib \
872 - "${D}"/usr/bin/traptoemail \
873 - "${D}"/usr/share/snmp/mib2c.perl.conf \
874 - "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
875 - || die
876 - fi
877 -
878 - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
879 - newdoc EXAMPLE.conf.def EXAMPLE.conf
880 -
881 - if use doc; then
882 - docinto html
883 - dodoc -r docs/html/*
884 - fi
885 -
886 - keepdir /var/lib/net-snmp
887 -
888 - newinitd "${FILESDIR}"/snmpd.init.2 snmpd
889 - newconfd "${FILESDIR}"/snmpd.conf snmpd
890 -
891 - newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
892 - newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
893 -
894 - systemd_dounit "${FILESDIR}"/snmpd.service
895 - systemd_dounit "${FILESDIR}"/snmptrapd.service
896 -
897 - insinto /etc/snmp
898 - newins "${S}"/EXAMPLE.conf snmpd.conf.example
899 -
900 - # Remove everything not required for an agent.
901 - # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
902 - if use minimal; then
903 - rm -rf \
904 - "${D}"/**/*.pl \
905 - "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
906 - "${D}"/usr/share/snmp/*.conf \
907 - "${D}"/usr/share/snmp/snmpconf-data \
908 - || die
909 - fi
910 -
911 - find "${ED}" -name '*.la' -delete || die
912 -}
913
914 diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
915 deleted file mode 100644
916 index 06778b74907..00000000000
917 --- a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
918 +++ /dev/null
919 @@ -1,211 +0,0 @@
920 -# Copyright 1999-2020 Gentoo Authors
921 -# Distributed under the terms of the GNU General Public License v2
922 -
923 -EAPI=7
924 -PYTHON_COMPAT=( python3_{6,7,8} )
925 -DISTUTILS_SINGLE_IMPL=yesplz
926 -DISTUTILS_OPTIONAL=yesplz
927 -WANT_AUTOMAKE=none
928 -PATCHSET=3
929 -GENTOO_DEPEND_ON_PERL=no
930 -
931 -inherit autotools distutils-r1 perl-module systemd
932 -
933 -DESCRIPTION="Software for generating and retrieving SNMP data"
934 -HOMEPAGE="http://www.net-snmp.org/"
935 -SRC_URI="
936 - mirror://sourceforge/project/${PN}/${PN}/${PV/_rc*/}-pre-releases/${P/_rc/.rc}.tar.gz
937 - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
938 -"
939 -
940 -S=${WORKDIR}/${P/_/.}
941 -
942 -# GPL-2 for the init scripts
943 -LICENSE="HPND BSD GPL-2"
944 -SLOT="0/40"
945 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
946 -IUSE="
947 - X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql
948 - netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib
949 -"
950 -REQUIRED_USE="
951 - python? ( ${PYTHON_REQUIRED_USE} )
952 - rpm? ( bzip2 zlib )
953 -"
954 -
955 -COMMON_DEPEND="
956 - bzip2? ( app-arch/bzip2 )
957 - elf? ( dev-libs/elfutils )
958 - lm-sensors? ( sys-apps/lm-sensors )
959 - mysql? ( dev-db/mysql-connector-c:0= )
960 - netlink? ( dev-libs/libnl:3 )
961 - pcap? ( net-libs/libpcap )
962 - pci? ( sys-apps/pciutils )
963 - perl? ( dev-lang/perl:= )
964 - python? (
965 - $(python_gen_cond_dep '
966 - dev-python/setuptools[${PYTHON_MULTI_USEDEP}]
967 - ')
968 - ${PYTHON_DEPS}
969 - )
970 - rpm? (
971 - app-arch/rpm
972 - dev-libs/popt
973 - )
974 - ssl? (
975 - !libressl? ( >=dev-libs/openssl-0.9.6d:0= )
976 - libressl? ( dev-libs/libressl:= )
977 - )
978 - tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
979 - zlib? ( >=sys-libs/zlib-1.1.4 )
980 -"
981 -DEPEND="
982 - ${COMMON_DEPEND}
983 - doc? ( app-doc/doxygen )
984 -"
985 -RDEPEND="
986 - ${COMMON_DEPEND}
987 - perl? (
988 - X? ( dev-perl/Tk )
989 - !minimal? ( dev-perl/TermReadKey )
990 - )
991 - selinux? ( sec-policy/selinux-snmp )
992 -"
993 -S=${WORKDIR}/${P/_rc/.rc}
994 -RESTRICT=test
995 -PATCHES=(
996 - "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
997 - "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch
998 - "${FILESDIR}"/${PN}-5.8-pcap.patch
999 - "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
1000 - "${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
1001 - "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
1002 - "${FILESDIR}"/${PN}-99999999-tinfo.patch
1003 -)
1004 -
1005 -pkg_setup() {
1006 - use python && python-single-r1_pkg_setup
1007 -}
1008 -
1009 -src_prepare() {
1010 - # snmpconf generates config files with proper selinux context
1011 - use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
1012 -
1013 - mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
1014 - mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
1015 - eapply "${WORKDIR}"/patches/*.patch
1016 -
1017 - default
1018 -
1019 - eautoconf
1020 -}
1021 -
1022 -src_configure() {
1023 - # keep this in the same line, configure.ac arguments are passed down to config.h
1024 - local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
1025 - use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
1026 - use smux && mibs="${mibs} smux"
1027 -
1028 - # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
1029 - use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
1030 -
1031 - econf \
1032 - $(use_enable !ssl internal-md5) \
1033 - $(use_enable ipv6) \
1034 - $(use_enable mfd-rewrites) \
1035 - $(use_enable perl embedded-perl) \
1036 - $(use_enable ucd-compat ucd-snmp-compatibility) \
1037 - $(use_with bzip2) \
1038 - $(use_with elf) \
1039 - $(use_with kmem kmem-usage) \
1040 - $(use_with mysql) \
1041 - $(use_with netlink nl) \
1042 - $(use_with pcap) \
1043 - $(use_with pci) \
1044 - $(use_with perl perl-modules INSTALLDIRS=vendor) \
1045 - $(use_with python python-modules) \
1046 - $(use_with rpm) \
1047 - $(use_with ssl openssl) \
1048 - $(use_with tcpd libwrap) \
1049 - $(use_with zlib) \
1050 - --enable-shared --disable-static \
1051 - --with-default-snmp-version="3" \
1052 - --with-install-prefix="${D}" \
1053 - --with-ldflags="${LDFLAGS}" \
1054 - --with-logfile="/var/log/net-snmpd.log" \
1055 - --with-mib-modules="${mibs}" \
1056 - --with-persistent-directory="/var/lib/net-snmp" \
1057 - --with-sys-contact="root@Unknown" \
1058 - --with-sys-location="Unknown"
1059 -}
1060 -
1061 -src_compile() {
1062 - for target in snmplib agent sedscript all; do
1063 - emake OTHERLDFLAGS="${LDFLAGS}" ${target}
1064 - done
1065 -
1066 - use doc && emake docsdox
1067 -}
1068 -
1069 -src_install() {
1070 - # bug #317965
1071 - emake -j1 DESTDIR="${D}" install
1072 -
1073 - use python && python_optimize
1074 -
1075 - if use perl ; then
1076 - perl_delete_localpod
1077 - if ! use X; then
1078 - rm "${D}"/usr/bin/tkmib || die
1079 - fi
1080 - else
1081 - rm -f \
1082 - "${D}"/usr/bin/fixproc \
1083 - "${D}"/usr/bin/ipf-mod.pl \
1084 - "${D}"/usr/bin/mib2c \
1085 - "${D}"/usr/bin/net-snmp-cert \
1086 - "${D}"/usr/bin/snmp-bridge-mib \
1087 - "${D}"/usr/bin/snmpcheck \
1088 - "${D}"/usr/bin/snmpconf \
1089 - "${D}"/usr/bin/tkmib \
1090 - "${D}"/usr/bin/traptoemail \
1091 - "${D}"/usr/share/snmp/mib2c.perl.conf \
1092 - "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
1093 - || die
1094 - fi
1095 -
1096 - dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
1097 - newdoc EXAMPLE.conf.def EXAMPLE.conf
1098 -
1099 - if use doc; then
1100 - docinto html
1101 - dodoc -r docs/html/*
1102 - fi
1103 -
1104 - keepdir /var/lib/net-snmp
1105 -
1106 - newinitd "${FILESDIR}"/snmpd.init.2 snmpd
1107 - newconfd "${FILESDIR}"/snmpd.conf snmpd
1108 -
1109 - newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
1110 - newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
1111 -
1112 - systemd_dounit "${FILESDIR}"/snmpd.service
1113 - systemd_dounit "${FILESDIR}"/snmptrapd.service
1114 -
1115 - insinto /etc/snmp
1116 - newins "${S}"/EXAMPLE.conf snmpd.conf.example
1117 -
1118 - # Remove everything not required for an agent.
1119 - # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
1120 - if use minimal; then
1121 - rm -rf \
1122 - "${D}"/**/*.pl \
1123 - "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
1124 - "${D}"/usr/share/snmp/*.conf \
1125 - "${D}"/usr/share/snmp/snmpconf-data \
1126 - || die
1127 - fi
1128 -
1129 - find "${ED}" -name '*.la' -delete || die
1130 -}