Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61401 - Cutting the cruft from net-snmp. USE=minimal
Summary: Cutting the cruft from net-snmp. USE=minimal
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-23 10:17 UTC by solar (RETIRED)
Modified: 2004-11-29 12:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
net-snmp-5.1.1-r2.ebuild.diff (net-snmp-5.1.1-r2.ebuild.diff,1017 bytes, patch)
2004-08-23 10:19 UTC, solar (RETIRED)
Details | Diff
net-snmp-5.1.1-r1.ebuild.diff (net-snmp-5.1.1-r1.ebuild.diff,1.51 KB, patch)
2004-08-23 15:20 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2004-08-23 10:17:51 UTC
Adding a flag to net-snmp to cut down some of the
cruft for embedded use. 

Rationalile:
On a compact flash devices I install net-snmp
but only the snmpd, snmptrapd and MIB's. 
No perl or anything else.

I'm hoping we can follow in the footsteps of vim and make use of
USE=minimal to emulate this behavior.

Attaching patch shortly.
Comment 1 solar (RETIRED) gentoo-dev 2004-08-23 10:19:04 UTC
Created attachment 38031 [details, diff]
net-snmp-5.1.1-r2.ebuild.diff

basic idea for the patch (not tested yet)
Comment 2 solar (RETIRED) gentoo-dev 2004-08-23 10:21:06 UTC
If I could spell correctly that word in comment #1 would of been 'Rationale'
Comment 3 solar (RETIRED) gentoo-dev 2004-08-23 11:43:31 UTC
First patch misses.

/usr/bin/net-snmp-config
/usr/bin/snmpcheck
/usr/bin/fixproc
/usr/bin/snmpconf
/usr/bin/traptoemail

I'll do another as I also don't want/need the ipvs MIB's unless we are doing ipv6.


Comment 4 Lance Albertson (RETIRED) gentoo-dev 2004-08-23 11:57:52 UTC
Will these modifications work on a regular arch install rather than specifically embedded/uclibc? Also, what key things are you trying to keep in the minimal install? Just curious! :)
Comment 5 solar (RETIRED) gentoo-dev 2004-08-23 12:06:48 UTC
I'm also wondering about this dep of <sys-libs/db-2
Here local !minimal? ( <sys-libs/db-2 ) seems to do the job just fine.
Also the RDEPEND of sed4 seems incorrect, but I'm not seeing 
an easy work aaround that does not include a rewrite of your RDEPEND=$DEPEND 
string.

The goal here is to have nearly just the bare bones runtime minimal needed to snmp monitor a device such as a wrt54g where you have limited flash size.
So the goal is SIZE.

There are deeper modifcations I'd like do as well but I think that will & should be limited to another USE flag and or FEATURE=
Probably a FEATURE as we really would not need the .a files and or the .h files on an embedded system.
Comment 6 solar (RETIRED) gentoo-dev 2004-08-23 12:12:37 UTC
Yeah this change would be arch agnostic.
Comment 7 Lance Albertson (RETIRED) gentoo-dev 2004-08-23 12:33:44 UTC
Great, thanks for clarifying that! Looks good so far, I hope it'll all work out!
Comment 8 solar (RETIRED) gentoo-dev 2004-08-23 15:20:37 UTC
Created attachment 38055 [details, diff]
net-snmp-5.1.1-r1.ebuild.diff

I'm happy with this if you are.
I can commit it or you can. (your call)
Comment 9 solar (RETIRED) gentoo-dev 2004-08-23 15:28:00 UTC
This is the final result by the way.

[ebuild   R   ] net-analyzer/net-snmp-5.1.1-r2  -X -ipv6 -lm_sensors +minimal -perl -ssl -tcpd 0 kB

uCpie net-snmp # epm -q -l net-snmp | grep -v /usr/include/
/usr/lib/libnetsnmp.la
/usr/lib/libnetsnmp.a
/usr/lib/libsnmp.la
/usr/lib/libsnmp.a
/usr/lib/libnetsnmpagent.la
/usr/lib/libnetsnmpmibs.la
/usr/lib/libnetsnmpagent.a
/usr/lib/libnetsnmpmibs.a
/usr/lib/libnetsnmphelpers.la
/usr/lib/libnetsnmphelpers.a
/usr/lib/libnetsnmptrapd.la
/usr/lib/libnetsnmptrapd.a
/usr/sbin/snmpd
/usr/sbin/snmptrapd
/usr/share/snmp/mibs/RFC1155-SMI.txt
/usr/share/snmp/mibs/RFC1213-MIB.txt
/usr/share/snmp/mibs/RFC-1215.txt
/usr/share/snmp/mibs/SNMPv2-CONF.txt
/usr/share/snmp/mibs/SNMPv2-SMI.txt
/usr/share/snmp/mibs/SNMPv2-TC.txt
/usr/share/snmp/mibs/SNMPv2-TM.txt
/usr/share/snmp/mibs/SNMPv2-MIB.txt
/usr/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
/usr/share/snmp/mibs/SNMP-MPD-MIB.txt
/usr/share/snmp/mibs/SNMP-TARGET-MIB.txt
/usr/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
/usr/share/snmp/mibs/SNMP-PROXY-MIB.txt
/usr/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
/usr/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
/usr/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
/usr/share/snmp/mibs/IF-MIB.txt
/usr/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
/usr/share/snmp/mibs/EtherLike-MIB.txt
/usr/share/snmp/mibs/IP-MIB.txt
/usr/share/snmp/mibs/IP-FORWARD-MIB.txt
/usr/share/snmp/mibs/TCP-MIB.txt
/usr/share/snmp/mibs/UDP-MIB.txt
/usr/share/snmp/mibs/INET-ADDRESS-MIB.txt
/usr/share/snmp/mibs/HCNUM-TC.txt
/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
/usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
/usr/share/snmp/mibs/RMON-MIB.txt
/usr/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
/usr/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
/usr/share/snmp/mibs/AGENTX-MIB.txt
/usr/share/snmp/mibs/SMUX-MIB.txt
/usr/share/snmp/mibs/IANAifType-MIB.txt
/usr/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-TC.txt
/usr/share/snmp/mibs/NET-SNMP-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
/usr/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
/usr/share/snmp/mibs/UCD-SNMP-MIB.txt
/usr/share/snmp/mibs/UCD-DEMO-MIB.txt
/usr/share/snmp/mibs/UCD-IPFWACC-MIB.txt
/usr/share/snmp/mibs/UCD-DLMOD-MIB.txt
/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt
/etc/init.d/snmpd
/etc/conf.d/snmpd
/etc/snmp/.keep
/var/lib/net-snmp/.keep

-- 
*.a, *.la  and *.h files will be handled by another FEATURE= somewhere else down the line probably in ebuild.sh so it's transparent to the packages themselves.
Comment 10 solar (RETIRED) gentoo-dev 2004-08-26 09:06:14 UTC
Committed USE=minimal changes to the tree. 
If any bugs arise please CC: me.

Please test that this package (-r1) can be marked stable if you can.

Changes from net-snmp-5.1.1 -> net-snmp-5.1.1-r1 only include two USE flags 'lm_sensors' and 'minimal'

Current keywords are

net-snmp-5.1.1:
KEYWORDS="x86 ppc sparc alpha arm ~hppa amd64 ~ia64 s390 ppc64"

net-snmp-5.1.1-r1:
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm hppa ~amd64 ~ia64 ~s390 ~ppc64"
Comment 11 solar (RETIRED) gentoo-dev 2004-08-26 09:07:54 UTC
Added description to use.local.desc
Comment 12 solar (RETIRED) gentoo-dev 2004-11-29 11:54:51 UTC
reopening bug
Comment 13 solar (RETIRED) gentoo-dev 2004-11-29 12:05:07 UTC
sorry reopened the wrong bug