mirror of
https://github.com/outbackdingo/meta-tanowrt.git
synced 2026-01-28 18:19:44 +00:00
net-snmp: Add recipe for version 5.8
Base recipe for net-snmp 5.8 backported from meta-networking layer: repository: git://git.openembedded.org/meta-openembedded subdirectory: meta-networking branch: master revision: 3b245e4fe85be62c309650e84d1aaacbcb0d5505 Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
Recipe for net-snmp 5.8 backported from meta-networking layer:
|
||||
repository: git://git.openembedded.org/meta-openembedded
|
||||
subdirectory: meta-networking
|
||||
branch: master
|
||||
revision: 3b245e4fe85be62c309650e84d1aaacbcb0d5505
|
||||
@@ -0,0 +1,66 @@
|
||||
#! /bin/sh
|
||||
# /etc/init.d/snmpd: start snmp daemon.
|
||||
|
||||
. /etc/init.d/functions
|
||||
|
||||
# Defaults
|
||||
export MIBDIRS=/usr/share/snmp/mibs
|
||||
SNMPDRUN=yes
|
||||
SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid'
|
||||
TRAPDRUN=no
|
||||
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
|
||||
PIDFILE=/var/run/snmpd.pid
|
||||
SPIDFILE=/var/run/snmptrapd.pid
|
||||
|
||||
# Reads config file if exists (will override defaults above)
|
||||
[ -r /etc/default/snmpd ] && . /etc/default/snmpd
|
||||
|
||||
[ "$SNMPDRUN" = "yes" ] && { test -x /usr/sbin/snmpd || exit 0; }
|
||||
[ "$TRAPDRUN" = "yes" ] && { test -x /usr/sbin/snmptrapd || exit 0; }
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting network management services:"
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf -a ! -f "$PIDFILE" ]; then
|
||||
start-stop-daemon -o --start --quiet --name snmpd --pidfile "$PIDFILE" \
|
||||
--exec /usr/sbin/snmpd -- $SNMPDOPTS
|
||||
echo -n " snmpd"
|
||||
fi
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf -a ! -f "$SPIDFILE" ]; then
|
||||
start-stop-daemon -o --start --quiet --name snmptrapd --pidfile "$SPIDFILE" \
|
||||
--exec /usr/sbin/snmptrapd -- $TRAPDOPTS
|
||||
echo -n " snmptrapd"
|
||||
fi
|
||||
echo "."
|
||||
|
||||
test ! -x /sbin/restorecon || /sbin/restorecon -FR /var/lib/net-snmp
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping network management services:"
|
||||
if [ -f "$PIDFILE" ] ; then
|
||||
start-stop-daemon -o --stop --quiet --pidfile $PIDFILE --name snmpd
|
||||
fi
|
||||
echo -n " snmpd"
|
||||
if [ -f "$SPIDFILE" ] ; then
|
||||
start-stop-daemon -o --stop --quiet --pidfile $SPIDFILE --name snmptrapd
|
||||
rm -rf $SPIDFILE
|
||||
fi
|
||||
echo -n " snmptrapd"
|
||||
echo "."
|
||||
;;
|
||||
status)
|
||||
status /usr/sbin/snmpd;
|
||||
exit $?
|
||||
;;
|
||||
restart|reload|force-reload)
|
||||
$0 stop
|
||||
# Allow the daemons time to exit completely.
|
||||
sleep 2
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/snmpd {start|stop|status|restart|reload|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,422 @@
|
||||
###############################################################################
|
||||
#
|
||||
# EXAMPLE.conf:
|
||||
# An example configuration file for configuring the ucd-snmp snmpd agent.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# This file is intended to only be an example. If, however, you want
|
||||
# to use it, it should be placed in /etc/snmp/snmpd.conf.
|
||||
# When the snmpd agent starts up, this is where it will look for it.
|
||||
#
|
||||
# You might be interested in generating your own snmpd.conf file using
|
||||
# the "snmpconf" program (perl script) instead. It's a nice menu
|
||||
# based interface to writing well commented configuration files. Try it!
|
||||
#
|
||||
# Note: This file is automatically generated from EXAMPLE.conf.def.
|
||||
# Do NOT read the EXAMPLE.conf.def file! Instead, after you have run
|
||||
# configure & make, and then make sure you read the EXAMPLE.conf file
|
||||
# instead, as it will tailor itself to your configuration.
|
||||
|
||||
# All lines beginning with a '#' are comments and are intended for you
|
||||
# to read. All other lines are configuration commands for the agent.
|
||||
|
||||
#
|
||||
# PLEASE: read the snmpd.conf(5) manual page as well!
|
||||
#
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Access Control
|
||||
###############################################################################
|
||||
|
||||
# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
|
||||
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
|
||||
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
|
||||
|
||||
# By far, the most common question I get about the agent is "why won't
|
||||
# it work?", when really it should be "how do I configure the agent to
|
||||
# allow me to access it?"
|
||||
#
|
||||
# By default, the agent responds to the "public" community for read
|
||||
# only access, if run out of the box without any configuration file in
|
||||
# place. The following examples show you other ways of configuring
|
||||
# the agent so that you can change the community names, and give
|
||||
# yourself write access as well.
|
||||
#
|
||||
# The following lines change the access permissions of the agent so
|
||||
# that the COMMUNITY string provides read-only access to your entire
|
||||
# NETWORK (EG: 10.10.10.0/24), and read/write access to only the
|
||||
# localhost (127.0.0.1, not its real ipaddress).
|
||||
#
|
||||
# For more information, read the FAQ as well as the snmpd.conf(5)
|
||||
# manual page.
|
||||
|
||||
####
|
||||
# First, map the community name (COMMUNITY) into a security name
|
||||
# (local and mynetwork, depending on where the request is coming
|
||||
# from):
|
||||
|
||||
# sec.name source community
|
||||
com2sec paranoid default public
|
||||
#com2sec readonly default public
|
||||
#com2sec readwrite default private
|
||||
|
||||
####
|
||||
# Second, map the security names into group names:
|
||||
|
||||
# sec.model sec.name
|
||||
group MyROSystem v1 paranoid
|
||||
group MyROSystem v2c paranoid
|
||||
group MyROSystem usm paranoid
|
||||
group MyROGroup v1 readonly
|
||||
group MyROGroup v2c readonly
|
||||
group MyROGroup usm readonly
|
||||
group MyRWGroup v1 readwrite
|
||||
group MyRWGroup v2c readwrite
|
||||
group MyRWGroup usm readwrite
|
||||
|
||||
####
|
||||
# Third, create a view for us to let the groups have rights to:
|
||||
|
||||
# incl/excl subtree mask
|
||||
view all included .1 80
|
||||
view system included .iso.org.dod.internet.mgmt.mib-2.system
|
||||
|
||||
####
|
||||
# Finally, grant the 2 groups access to the 1 view with different
|
||||
# write permissions:
|
||||
|
||||
# context sec.model sec.level match read write notif
|
||||
access MyROSystem "" any noauth exact system none none
|
||||
access MyROGroup "" any noauth exact all none none
|
||||
access MyRWGroup "" any noauth exact all all none
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# System contact information
|
||||
#
|
||||
|
||||
# It is also possible to set the sysContact and sysLocation system
|
||||
# variables through the snmpd.conf file. **PLEASE NOTE** that setting
|
||||
# the value of these objects here makes these objects READ-ONLY
|
||||
# (regardless of any access control settings). Any attempt to set the
|
||||
# value of an object whose value is given here will fail with an error
|
||||
# status of notWritable.
|
||||
|
||||
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
|
||||
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
|
||||
|
||||
# Example output of snmpwalk:
|
||||
# % snmpwalk -v 1 -c public localhost system
|
||||
# system.sysDescr.0 = "SunOS name sun4c"
|
||||
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
|
||||
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
|
||||
# system.sysContact.0 = "Me <me@somewhere.org>"
|
||||
# system.sysName.0 = "name"
|
||||
# system.sysLocation.0 = "Right here, right now."
|
||||
# system.sysServices.0 = 72
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Process checks.
|
||||
#
|
||||
# The following are examples of how to use the agent to check for
|
||||
# processes running on the host. The syntax looks something like:
|
||||
#
|
||||
# proc NAME [MAX=0] [MIN=0]
|
||||
#
|
||||
# NAME: the name of the process to check for. It must match
|
||||
# exactly (ie, http will not find httpd processes).
|
||||
# MAX: the maximum number allowed to be running. Defaults to 0.
|
||||
# MIN: the minimum number to be running. Defaults to 0.
|
||||
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
|
||||
# Make sure mountd is running
|
||||
#proc mountd
|
||||
|
||||
# Make sure there are no more than 4 ntalkds running, but 0 is ok too.
|
||||
#proc ntalkd 4
|
||||
|
||||
# Make sure at least one sendmail, but less than or equal to 10 are running.
|
||||
#proc sendmail 10 1
|
||||
|
||||
# A snmpwalk of the prTable would look something like this:
|
||||
#
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.2
|
||||
# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
|
||||
# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
|
||||
# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
|
||||
# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
|
||||
# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
|
||||
# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
|
||||
# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
|
||||
# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
|
||||
# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
|
||||
# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
|
||||
# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
|
||||
#
|
||||
# Note that the errorFlag for mountd is set to 1 because one is not
|
||||
# running (in this case an rpc.mountd is, but thats not good enough),
|
||||
# and the ErrMessage tells you what's wrong. The configuration
|
||||
# imposed in the snmpd.conf file is also shown.
|
||||
#
|
||||
# Special Case: When the min and max numbers are both 0, it assumes
|
||||
# you want a max of infinity and a min of 1.
|
||||
#
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Executables/scripts
|
||||
#
|
||||
|
||||
#
|
||||
# You can also have programs run by the agent that return a single
|
||||
# line of output and an exit code. Here are two examples.
|
||||
#
|
||||
# exec NAME PROGRAM [ARGS ...]
|
||||
#
|
||||
# NAME: A generic name.
|
||||
# PROGRAM: The program to run. Include the path!
|
||||
# ARGS: optional arguments to be passed to the program
|
||||
|
||||
# a simple hello world
|
||||
#exec echotest /bin/echo hello world
|
||||
|
||||
# Run a shell script containing:
|
||||
#
|
||||
# #!/bin/sh
|
||||
# echo hello world
|
||||
# echo hi there
|
||||
# exit 35
|
||||
#
|
||||
# Note: this has been specifically commented out to prevent
|
||||
# accidental security holes due to someone else on your system writing
|
||||
# a /tmp/shtest before you do. Uncomment to use it.
|
||||
#
|
||||
#exec shelltest /bin/sh /tmp/shtest
|
||||
|
||||
# Then,
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8
|
||||
# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
|
||||
# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
|
||||
# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
|
||||
# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
|
||||
# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
|
||||
# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
|
||||
# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
|
||||
# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
|
||||
# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
|
||||
# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
|
||||
# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
|
||||
# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0
|
||||
|
||||
# Note that the second line of the /tmp/shtest shell script is cut
|
||||
# off. Also note that the exit status of 35 was returned.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# disk checks
|
||||
#
|
||||
|
||||
# The agent can check the amount of available disk space, and make
|
||||
# sure it is above a set limit.
|
||||
|
||||
# disk PATH [MIN=DEFDISKMINIMUMSPACE]
|
||||
#
|
||||
# PATH: mount path to the disk in question.
|
||||
# MIN: Disks with space below this value will have the Mib's errorFlag set.
|
||||
# Default value = DEFDISKMINIMUMSPACE.
|
||||
|
||||
# Check the / partition and make sure it contains at least 10 megs.
|
||||
|
||||
#disk / 10000
|
||||
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
|
||||
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# load average checks
|
||||
#
|
||||
|
||||
# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
|
||||
#
|
||||
# 1MAX: If the 1 minute load average is above this limit at query
|
||||
# time, the errorFlag will be set.
|
||||
# 5MAX: Similar, but for 5 min average.
|
||||
# 15MAX: Similar, but for 15 min average.
|
||||
|
||||
# Check for loads:
|
||||
#load 12 14 14
|
||||
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.10
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
|
||||
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Extensible sections.
|
||||
#
|
||||
|
||||
# This alleviates the multiple line output problem found in the
|
||||
# previous executable mib by placing each mib in its own mib table:
|
||||
|
||||
# Run a shell script containing:
|
||||
#
|
||||
# #!/bin/sh
|
||||
# echo hello world
|
||||
# echo hi there
|
||||
# exit 35
|
||||
#
|
||||
# Note: this has been specifically commented out to prevent
|
||||
# accidental security holes due to someone else on your system writing
|
||||
# a /tmp/shtest before you do. Uncomment to use it.
|
||||
#
|
||||
# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest
|
||||
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.50
|
||||
# enterprises.ucdavis.50.1.1 = 1
|
||||
# enterprises.ucdavis.50.2.1 = "shelltest"
|
||||
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
|
||||
# enterprises.ucdavis.50.100.1 = 35
|
||||
# enterprises.ucdavis.50.101.1 = "hello world."
|
||||
# enterprises.ucdavis.50.101.2 = "hi there."
|
||||
# enterprises.ucdavis.50.102.1 = 0
|
||||
|
||||
# Now the Output has grown to two lines, and we can see the 'hi
|
||||
# there.' output as the second line from our shell script.
|
||||
#
|
||||
# Note that you must alter the mib.txt file to be correct if you want
|
||||
# the .50.* outputs above to change to reasonable text descriptions.
|
||||
|
||||
# Other ideas:
|
||||
#
|
||||
# exec .1.3.6.1.4.1.2021.51 ps /bin/ps
|
||||
# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
|
||||
# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Pass through control.
|
||||
#
|
||||
|
||||
# Usage:
|
||||
# pass MIBOID EXEC-COMMAND
|
||||
#
|
||||
# This will pass total control of the mib underneath the MIBOID
|
||||
# portion of the mib to the EXEC-COMMAND.
|
||||
#
|
||||
# Note: You'll have to change the path of the passtest script to your
|
||||
# source directory or install it in the given location.
|
||||
#
|
||||
# Example: (see the script for details)
|
||||
# (commented out here since it requires that you place the
|
||||
# script in the right location. (its not installed by default))
|
||||
|
||||
# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/passtest
|
||||
|
||||
# % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.255
|
||||
# enterprises.ucdavis.255.1 = "life the universe and everything"
|
||||
# enterprises.ucdavis.255.2.1 = 42
|
||||
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
|
||||
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
|
||||
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
|
||||
# enterprises.ucdavis.255.5 = 42
|
||||
# enterprises.ucdavis.255.6 = Gauge: 42
|
||||
#
|
||||
# % snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.255.5
|
||||
# enterprises.ucdavis.255.5 = 42
|
||||
#
|
||||
# % snmpset -v 1 -c public localhost .1.3.6.1.4.1.2021.255.1 s "New string"
|
||||
# enterprises.ucdavis.255.1 = "New string"
|
||||
#
|
||||
|
||||
# For specific usage information, see the man/snmpd.conf.5 manual page
|
||||
# as well as the local/passtest script used in the above example.
|
||||
|
||||
###############################################################################
|
||||
# Subagent control
|
||||
#
|
||||
|
||||
# The agent can support subagents using a number of extension mechanisms.
|
||||
# From the 4.2.1 release, AgentX support is being compiled in by default.
|
||||
# However, this is still experimental code, so should not be used on
|
||||
# critical production systems.
|
||||
# Please see the file README.agentx for more details.
|
||||
#
|
||||
# If having read, marked, learnt and inwardly digested this information,
|
||||
# you decide that you do wish to make use of this mechanism, simply
|
||||
# uncomment the following directive.
|
||||
#
|
||||
# master agentx
|
||||
#
|
||||
# I repeat - this is *NOT* regarded as suitable for front-line production
|
||||
# systems, though it is probably stable enough for day-to-day use.
|
||||
# Probably.
|
||||
#
|
||||
# No refunds will be given.
|
||||
|
||||
###############################################################################
|
||||
# Further Information
|
||||
#
|
||||
# See the snmpd.conf manual page, and the output of "snmpd -H".
|
||||
# MUCH more can be done with the snmpd.conf than is shown as an
|
||||
# example here.
|
||||
@@ -0,0 +1,18 @@
|
||||
###############################################################################
|
||||
#
|
||||
# EXAMPLE.conf:
|
||||
# An example configuration file for configuring the ucd-snmp snmptrapd agent.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# This file is intended to only be an example. If, however, you want
|
||||
# to use it, it should be placed in /etc/snmp/snmptrapd.conf.
|
||||
# When the snmptrapd agent starts up, this is where it will look for it.
|
||||
#
|
||||
# All lines beginning with a '#' are comments and are intended for you
|
||||
# to read. All other lines are configuration commands for the agent.
|
||||
|
||||
#
|
||||
# PLEASE: read the snmptrapd.conf(5) manual page as well!
|
||||
#
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 7ae2ce8dbf1c54d4e2db4a5f49397a239baadc49 Mon Sep 17 00:00:00 2001
|
||||
From: Li xin <lixin.fnst@cn.fujitsu.com>
|
||||
Date: Fri, 21 Aug 2015 18:23:13 +0900
|
||||
Subject: [PATCH] config_os_headers: Error Fix
|
||||
|
||||
ERROR: This autoconf log indicates errors, it looked at host include
|
||||
and/or library paths while determining system capabilities.
|
||||
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation [-Wpoison-system-directories]
|
||||
conftest.c:168:17: fatal error: pkg.h: No such file or directory
|
||||
#include <pkg.h>
|
||||
^
|
||||
|
||||
Upstream-Status: pending
|
||||
|
||||
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
|
||||
|
||||
---
|
||||
configure.d/config_os_headers | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
|
||||
index af99746..83b2e31 100644
|
||||
--- a/configure.d/config_os_headers
|
||||
+++ b/configure.d/config_os_headers
|
||||
@@ -489,8 +489,8 @@ then
|
||||
unset ac_cv_header_pkg_h
|
||||
netsnmp_save_CPPFLAGS="$CPPFLAGS"
|
||||
netsnmp_save_LDFLAGS="$LDFLAGS"
|
||||
- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
+ CPPFLAGS="$CPPFLAGS"
|
||||
+ LDFLAGS="$LDFLAGS"
|
||||
AC_CHECK_HEADERS(pkg.h,
|
||||
NETSNMP_SEARCH_LIBS(pkg_init, pkg,
|
||||
AC_DEFINE(HAVE_LIBPKG, 1, [define if you have BSD pkg-ng])))
|
||||
@@ -0,0 +1,27 @@
|
||||
From 98c6edba4835b515d933542411d80879327eee16 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 22 Jul 2016 18:34:39 +0000
|
||||
Subject: [PATCH] get_pid_from_inode: Include limit.h
|
||||
|
||||
PATH_MAX and NAME_MAX are required by this file
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
agent/mibgroup/util_funcs/get_pid_from_inode.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/agent/mibgroup/util_funcs/get_pid_from_inode.c b/agent/mibgroup/util_funcs/get_pid_from_inode.c
|
||||
index aee907d..7abaec2 100644
|
||||
--- a/agent/mibgroup/util_funcs/get_pid_from_inode.c
|
||||
+++ b/agent/mibgroup/util_funcs/get_pid_from_inode.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <net-snmp/output_api.h>
|
||||
|
||||
#include <ctype.h>
|
||||
+#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#if HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
@@ -0,0 +1,62 @@
|
||||
From e38c508ef401593b1d4fe42b62e42a49cfec82af Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Tue, 26 Feb 2019 14:26:07 +0800
|
||||
Subject: [PATCH] net-snmp: fix compile error with --disable-des
|
||||
|
||||
| scapi.c: In function 'sc_encrypt':
|
||||
| scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'?
|
||||
| pad_size = pai->pad_size;
|
||||
| ^~~~~~~~
|
||||
| dysize
|
||||
|
||||
pad_size is defined only without --disable-des
|
||||
[snip]
|
||||
#ifndef NETSNMP_DISABLE_DES
|
||||
int pad, plast, pad_size = 0;
|
||||
|
||||
but used when disable-des,
|
||||
[snip]
|
||||
QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
|
||||
}
|
||||
pad_size = pai->pad_size;
|
||||
|
||||
memset(my_iv, 0, sizeof(my_iv));
|
||||
|
||||
#ifndef NETSNMP_DISABLE_DES
|
||||
if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) {
|
||||
|
||||
/*
|
||||
|
||||
fix by move it into #ifndef NETSNMP_DISABLE_DES
|
||||
|
||||
Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/bugs/2927/]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
snmplib/scapi.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/snmplib/scapi.c b/snmplib/scapi.c
|
||||
index 43caddf..c09deb0 100644
|
||||
--- a/snmplib/scapi.c
|
||||
+++ b/snmplib/scapi.c
|
||||
@@ -1253,7 +1253,6 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
|
||||
|
||||
QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
|
||||
}
|
||||
- pad_size = pai->pad_size;
|
||||
|
||||
memset(my_iv, 0, sizeof(my_iv));
|
||||
|
||||
@@ -1263,6 +1262,8 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
|
||||
/*
|
||||
* now calculate the padding needed
|
||||
*/
|
||||
+
|
||||
+ pad_size = pai->pad_size;
|
||||
pad = pad_size - (ptlen % pad_size);
|
||||
plast = (int) ptlen - (pad_size - pad);
|
||||
if (pad == pad_size)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 89538a973119f1bf976b3a6df157ea940cf32eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 18 Sep 2015 00:28:45 -0400
|
||||
Subject: [PATCH] snmplib/keytools.c: Don't check for return from
|
||||
|
||||
EVP_MD_CTX_init()
|
||||
|
||||
EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
|
||||
|
||||
snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
snmplib/keytools.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/snmplib/keytools.c b/snmplib/keytools.c
|
||||
index 2cf0240..50fd3ea 100644
|
||||
--- a/snmplib/keytools.c
|
||||
+++ b/snmplib/keytools.c
|
||||
@@ -186,8 +186,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
|
||||
ctx = EVP_MD_CTX_create();
|
||||
#else
|
||||
ctx = malloc(sizeof(*ctx));
|
||||
- if (!EVP_MD_CTX_init(ctx))
|
||||
- return SNMPERR_GENERR;
|
||||
+ EVP_MD_CTX_init(ctx);
|
||||
#endif
|
||||
if (!EVP_DigestInit(ctx, hashfn))
|
||||
return SNMPERR_GENERR;
|
||||
@@ -0,0 +1,28 @@
|
||||
From a3631df3d6743113e1cd63579925e15bcce85868 Mon Sep 17 00:00:00 2001
|
||||
From: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
Date: Wed, 24 May 2017 16:45:34 +0800
|
||||
Subject: [PATCH 2/4] configure: fix a cc check issue.
|
||||
|
||||
When has "." in cc value, the expression
|
||||
$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'
|
||||
can't get corretly the cc's value.
|
||||
|
||||
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
|
||||
---
|
||||
configure.d/config_project_perl_python | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.d/config_project_perl_python b/configure.d/config_project_perl_python
|
||||
index 475c843..22d2ad3 100644
|
||||
--- a/configure.d/config_project_perl_python
|
||||
+++ b/configure.d/config_project_perl_python
|
||||
@@ -87,7 +87,7 @@ if test "x$install_perl" != "xno" ; then
|
||||
if test "x$enable_perl_cc_checks" != "xno" ; then
|
||||
AC_MSG_CHECKING([for Perl cc])
|
||||
changequote(, )
|
||||
- PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\w\s\/]+).;\s*/$1/);'`
|
||||
+ PERLCC=`$myperl -V:cc | $myperl -n -e 'print if (s/^\s*cc=.([-=\.\w\s\/]+).;\s*/$1/);'`
|
||||
changequote([, ])
|
||||
if test "x$PERLCC" != "x" ; then
|
||||
AC_MSG_RESULT([$PERLCC])
|
||||
@@ -0,0 +1,28 @@
|
||||
From f3c5cd4df7ce8e5639c99b7b918e41fb89e969e3 Mon Sep 17 00:00:00 2001
|
||||
From: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
Date: Wed, 24 May 2017 17:10:20 +0800
|
||||
Subject: [PATCH 4/4] configure: fix incorrect variable
|
||||
|
||||
For cross compile platform, this variable will not be correct, so fix it.
|
||||
|
||||
Upstream-Status: Inappropriate [cross compile specific]
|
||||
|
||||
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
|
||||
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 9dbdde1..5fdc760 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -173,7 +173,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt
|
||||
#
|
||||
# override LD_RUN_PATH to avoid dependencies on the build directory
|
||||
perlmodules: perlmakefiles subdirs
|
||||
- @(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{archlibexp}/CORE);'`") ; \
|
||||
+ @(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{installprivlib}/CORE);'`") ; \
|
||||
if test $$? != 0 ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0becb4843a40910d5ec9aa11969d4905a22037cf Mon Sep 17 00:00:00 2001
|
||||
From: "Roy.Li" <rongqing.li@windriver.com>
|
||||
Date: Fri, 16 Jan 2015 14:14:01 +0800
|
||||
Subject: [PATCH] net-snmp: fix "libtool --finish"
|
||||
|
||||
LIB_LDCONFIG_CMD failed since it is using a host dir $(libdir)
|
||||
which is /usr/lib64 does not exist on host when compile 64bit
|
||||
image.
|
||||
|
||||
In fact, configuring dynamic linker run-time bindings is meaningless
|
||||
at this step, If it is needed, Poky would write ldconfig scripts to
|
||||
rpm-postinst for each recipe while do_package, in package.bbclass.
|
||||
|
||||
Upstream-Status: Inappropriate [cross compile specific]
|
||||
|
||||
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
|
||||
|
||||
---
|
||||
Makefile.top | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.top b/Makefile.top
|
||||
index 5d4f9bc..d0ed31c 100644
|
||||
--- a/Makefile.top
|
||||
+++ b/Makefile.top
|
||||
@@ -89,7 +89,7 @@ LIBREVISION = 0
|
||||
LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
|
||||
LIB_EXTENSION = la
|
||||
LIB_VERSION =
|
||||
-LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
|
||||
+LIB_LDCONFIG_CMD = echo "do not ldconfig\n"
|
||||
LINK = $(LIBTOOL) --mode=link $(LINKCC)
|
||||
# RANLIB = @RANLIB@
|
||||
RANLIB = :
|
||||
@@ -0,0 +1,43 @@
|
||||
From d619cd9fc01f336ff0ff55b18f9112789eb4d84c Mon Sep 17 00:00:00 2001
|
||||
From: Marian Florea <marian.florea@windriver.com>
|
||||
Date: Thu, 20 Jul 2017 16:55:24 +0800
|
||||
Subject: [PATCH] net snmp: fix engineBoots value on SIGHUP
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Marian Florea <marian.florea@windriver.com>
|
||||
Signed-off-by: Li Zhou <li.zhou@windriver.com>
|
||||
|
||||
---
|
||||
agent/snmpd.c | 1 +
|
||||
snmplib/snmpv3.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/agent/snmpd.c b/agent/snmpd.c
|
||||
index 6566354..eb0d4b4 100644
|
||||
--- a/agent/snmpd.c
|
||||
+++ b/agent/snmpd.c
|
||||
@@ -1239,6 +1239,7 @@ receive(void)
|
||||
snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
|
||||
netsnmp_get_version());
|
||||
update_config();
|
||||
+ snmp_store(app_name);
|
||||
send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
|
||||
#if HAVE_SIGHOLD
|
||||
sigrelse(SIGHUP);
|
||||
diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
|
||||
index 771ba3b..5de05e7 100644
|
||||
--- a/snmplib/snmpv3.c
|
||||
+++ b/snmplib/snmpv3.c
|
||||
@@ -1060,9 +1060,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg,
|
||||
/*
|
||||
* if our engineID has changed at all, the boots record must be set to 1
|
||||
*/
|
||||
- if (engineIDLen != oldEngineIDLength ||
|
||||
+ if (oldEngineIDLength != (size_t)0 && (engineIDLen != oldEngineIDLength ||
|
||||
oldEngineID == NULL || c_engineID == NULL ||
|
||||
- memcmp(oldEngineID, c_engineID, engineIDLen) != 0) {
|
||||
+ memcmp(oldEngineID, c_engineID, engineIDLen) != 0)) {
|
||||
engineBoots = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
net-snmp: add knob whether nlist.h are checked
|
||||
|
||||
Previously, it still was checked when there was no nlish.h in sysroots directory.
|
||||
Add knob to decide whether nlist.h are checked or not.
|
||||
|
||||
Upstream-status: Pending
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
configure.d/config_os_headers | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
|
||||
index d903f58..a05d30e 100644
|
||||
--- a/configure.d/config_os_headers
|
||||
+++ b/configure.d/config_os_headers
|
||||
@@ -31,6 +31,7 @@ AC_CHECK_HEADERS([getopt.h pthread.h regex.h ] dnl
|
||||
[sys/un.h ])
|
||||
|
||||
# Library and Agent:
|
||||
+if test "x$with_elf" != "xno"; then
|
||||
AC_CHECK_HEADERS([nlist.h],,,[
|
||||
AC_INCLUDES_DEFAULT
|
||||
[
|
||||
@@ -38,6 +39,7 @@ AC_INCLUDES_DEFAULT
|
||||
#define LIBBSD_DISABLE_DEPRECATED 1
|
||||
#endif
|
||||
]])
|
||||
+fi
|
||||
|
||||
# Library:
|
||||
AC_CHECK_HEADERS([fcntl.h io.h kstat.h ] dnl
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 068952c0e0cdda5a91250b91c5fcc9b85b43daab Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
Date: Thu, 22 Jun 2017 10:25:08 +0800
|
||||
Subject: [PATCH] net-snmp: fix for --disable-des
|
||||
|
||||
Include des.h only if it's found in openssl so that
|
||||
the --disable-des works correctly.
|
||||
|
||||
Upstream-Status: Submitted [net-snmp-coders@lists.sourceforge.net]
|
||||
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
|
||||
---
|
||||
snmplib/scapi.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/snmplib/scapi.c b/snmplib/scapi.c
|
||||
index 8ad1d70..43caddf 100644
|
||||
--- a/snmplib/scapi.c
|
||||
+++ b/snmplib/scapi.c
|
||||
@@ -84,7 +84,9 @@ netsnmp_feature_child_of(usm_scapi, usm_support)
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
+#ifdef HAVE_OPENSSL_DES_H
|
||||
#include <openssl/des.h>
|
||||
+#endif
|
||||
#ifdef HAVE_AES
|
||||
#include <openssl/aes.h>
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
From 827fe3b0253aab33472828f40ad05934cc0261b8 Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
Date: Wed, 14 Jan 2015 15:10:06 +0800
|
||||
Subject: [PATCH] testing: add the output format for ptest
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
|
||||
---
|
||||
testing/RUNTESTS | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/testing/RUNTESTS b/testing/RUNTESTS
|
||||
index 6715831..a2b6fb8 100755
|
||||
--- a/testing/RUNTESTS
|
||||
+++ b/testing/RUNTESTS
|
||||
@@ -17,13 +17,17 @@ failed_count=0
|
||||
rm -f failed_tests
|
||||
for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
|
||||
echo "RUNNING $i"
|
||||
+ test_name=`basename $i`
|
||||
${srcdir}/testing/fulltests/support/simple_run $i
|
||||
if [ $? = 0 ]; then
|
||||
+ echo "PASS: $test_name"
|
||||
success_count=`expr $success_count + 1`
|
||||
else
|
||||
+ echo "FAIL: $test_name"
|
||||
failed_count=`expr $failed_count + 1`
|
||||
echo "$i" >> failed_tests
|
||||
fi
|
||||
+ echo
|
||||
done
|
||||
|
||||
if [ -f failed_tests ]; then
|
||||
@@ -0,0 +1,15 @@
|
||||
Reproducible build: To avoid build host paths being written into binaries,
|
||||
accept NETSNMP_CONFIGURE_OPTIONS from the environment.
|
||||
NETSNMP_CONFIGURE_OPTIONS can be set either null or to a fixed value.
|
||||
|
||||
--- net-snmp-5.8.original/configure.ac 2018-11-20 17:41:39.926529072 +1300
|
||||
+++ net-snmp-5.8/configure.ac 2018-11-20 17:54:44.488180224 +1300
|
||||
@@ -28,7 +28,7 @@
|
||||
#
|
||||
# save the configure arguments
|
||||
#
|
||||
-AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"$ac_configure_args",
|
||||
+AC_DEFINE_UNQUOTED(NETSNMP_CONFIGURE_OPTIONS,"${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}",
|
||||
[configure options specified])
|
||||
CONFIGURE_OPTIONS="\"$ac_configure_args\""
|
||||
AC_SUBST(CONFIGURE_OPTIONS)
|
||||
@@ -0,0 +1,19 @@
|
||||
Reproducible build: Don't check for /etc/printcap on the build machine when
|
||||
cross-compiling. Use AC_CHECK_FILE to set the cached variable
|
||||
ac_cv_file__etc_printcap instead. When cross-compiling, this variable should be
|
||||
set in the environment to "yes" or "no" as appropriate for the target platform.
|
||||
|
||||
--- net-snmp-5.8.original/configure.d/config_os_misc4 2018-11-20 17:05:03.986274522 +1300
|
||||
+++ net-snmp-5.8/configure.d/config_os_misc4 2018-11-20 17:08:32.250700448 +1300
|
||||
@@ -116,9 +116,9 @@
|
||||
[Path to the lpstat command])
|
||||
AC_DEFINE(HAVE_LPSTAT, 1, [Set if the lpstat command is available])
|
||||
fi
|
||||
-if test -r /etc/printcap; then
|
||||
+AC_CHECK_FILE([/etc/printcap],
|
||||
AC_DEFINE(HAVE_PRINTCAP, 1, [Set if /etc/printcap exists])
|
||||
-fi
|
||||
+)
|
||||
|
||||
|
||||
# Check ps args
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
workdir=$(dirname `realpath $0`)
|
||||
cd ${workdir}/testing
|
||||
./RUNTESTS
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Simple Network Management Protocol (SNMP) Daemon.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=OPTIONS="-Ls0-6d"
|
||||
EnvironmentFile=-/etc/default/snmpd
|
||||
ExecStart=/usr/sbin/snmpd $OPTIONS -a -f
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Simple Network Management Protocol (SNMP) Trap Daemon.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Environment=OPTIONS="-Lsd"
|
||||
EnvironmentFile=-/etc/default/snmptrapd
|
||||
ExecStart=/usr/sbin/snmptrapd $OPTIONS -f
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,268 @@
|
||||
SUMMARY = "Various tools relating to the Simple Network Management Protocol"
|
||||
HOMEPAGE = "http://www.net-snmp.org/"
|
||||
SECTION = "net"
|
||||
LICENSE = "BSD & MIT"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687"
|
||||
|
||||
DEPENDS = "openssl libnl pciutils"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
|
||||
file://init \
|
||||
file://snmpd.conf \
|
||||
file://snmptrapd.conf \
|
||||
file://snmpd.service \
|
||||
file://snmptrapd.service \
|
||||
file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
|
||||
file://fix-libtool-finish.patch \
|
||||
file://net-snmp-testing-add-the-output-format-for-ptest.patch \
|
||||
file://run-ptest \
|
||||
file://0001-config_os_headers-Error-Fix.patch \
|
||||
file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \
|
||||
file://0001-get_pid_from_inode-Include-limit.h.patch \
|
||||
file://0002-configure-fix-a-cc-check-issue.patch \
|
||||
file://0004-configure-fix-incorrect-variable.patch \
|
||||
file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \
|
||||
file://net-snmp-fix-for-disable-des.patch \
|
||||
file://reproducibility-have-printcap.patch \
|
||||
file://reproducibility-accept-configure-options-from-env.patch \
|
||||
file://0001-net-snmp-fix-compile-error-disable-des.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "6aae5948df7efde626613d6a4b3cd9d4"
|
||||
SRC_URI[sha256sum] = "c6291385b8ed84f05890fe4197005daf7e7ee7b082c2e390fa114a9477a56042"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/"
|
||||
UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/"
|
||||
|
||||
inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest
|
||||
|
||||
EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'"
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
CCACHE = ""
|
||||
|
||||
TARGET_CC_ARCH += "${LDFLAGS}"
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} des"
|
||||
PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
|
||||
PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl"
|
||||
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,,"
|
||||
|
||||
PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable-embedded-perl --with-perl-modules=no,\
|
||||
perl, perl perl-lib"
|
||||
PACKAGECONFIG[des] = "--enable-des,--disable-des"
|
||||
|
||||
EXTRA_OECONF = "--enable-shared \
|
||||
--disable-manuals \
|
||||
--with-defaults \
|
||||
--with-install-prefix=${D} \
|
||||
--with-persistent-directory=${localstatedir}/lib/net-snmp \
|
||||
${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
|
||||
--with-openssl=${STAGING_EXECPREFIXDIR} \
|
||||
"
|
||||
|
||||
# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
|
||||
EXTRA_OECONF += "--with-mib-modules=smux"
|
||||
|
||||
CACHED_CONFIGUREVARS = " \
|
||||
ac_cv_header_valgrind_valgrind_h=no \
|
||||
ac_cv_header_valgrind_memcheck_h=no \
|
||||
ac_cv_ETC_MNTTAB=/etc/mtab \
|
||||
lt_cv_shlibpath_overrides_runpath=yes \
|
||||
ac_cv_path_UNAMEPROG=${base_bindir}/uname \
|
||||
ac_cv_file__etc_printcap=no \
|
||||
NETSNMP_CONFIGURE_OPTIONS= \
|
||||
"
|
||||
export PERLPROG="${bindir}/env perl"
|
||||
PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}"
|
||||
|
||||
HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}"
|
||||
|
||||
PTEST_BUILD_HOST_FILES += "net-snmp-config gen-variables"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \
|
||||
"${S}"/configure \
|
||||
"${S}"/configure.d/config_os_libs2
|
||||
|
||||
if [ "${HAS_PERL}" = "1" ]; then
|
||||
# this may need to be changed when package perl has any change.
|
||||
cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config.pm ${WORKDIR}/
|
||||
cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config_heavy.pl ${WORKDIR}/
|
||||
sed -e "s@libpth => '/usr/lib.*@libpth => '${STAGING_DIR_TARGET}/${libdir} ${STAGING_DIR_TARGET}/${base_libdir}',@g" \
|
||||
-e "s@privlibexp => '/usr@privlibexp => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-e "s@scriptdir => '/usr@scriptdir => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-e "s@sitearchexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-e "s@sitelibexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-e "s@vendorarchexp => '/usr@vendorarchexp => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-e "s@vendorlibexp => '/usr@vendorlibexp => '${STAGING_DIR_TARGET}/usr@g" \
|
||||
-i ${WORKDIR}/Config.pm
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
do_configure_append() {
|
||||
if [ "${HAS_PERL}" = "1" ]; then
|
||||
sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=${STAGING_DIR_TARGET}\$\{includedir\}@g" \
|
||||
-e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L${STAGING_DIR_TARGET}\$\{libdir\}@g" \
|
||||
-i ${B}/net-snmp-config
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}/snmp
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd
|
||||
install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/
|
||||
install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
|
||||
sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
|
||||
-i ${D}${bindir}/net-snmp-create-v3-user
|
||||
sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g' \
|
||||
-e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
|
||||
-e 's@[^ ]*--sysroot=[^ "]*@@g' \
|
||||
-e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
|
||||
-e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
|
||||
-e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \
|
||||
-e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \
|
||||
-i ${D}${bindir}/net-snmp-config
|
||||
|
||||
if [ "${HAS_PERL}" = "1" ]; then
|
||||
sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \
|
||||
-e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \
|
||||
-i ${D}${bindir}/net-snmp-config
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
install -d ${D}${PTEST_PATH}
|
||||
for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \
|
||||
${B}/net-snmp-config ${S}/testing; do
|
||||
if [ -e "$i" ]; then
|
||||
cp -R --no-dereference --preserve=mode,links -v "$i" ${D}${PTEST_PATH}
|
||||
fi
|
||||
done
|
||||
echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version
|
||||
|
||||
rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build"
|
||||
for i in $rmdlist; do
|
||||
if [ -d "$i" ]; then
|
||||
rm -rf "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
|
||||
SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
|
||||
|
||||
net_snmp_sysroot_preprocess () {
|
||||
if [ -e ${D}${bindir}/net-snmp-config ]; then
|
||||
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||
install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
||||
sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \
|
||||
-e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}${prefix}@g" \
|
||||
-e "s@^exec_prefix=.*@exec_prefix=${STAGING_EXECPREFIXDIR}@g" \
|
||||
-e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \
|
||||
-e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \
|
||||
-e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \
|
||||
-e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \
|
||||
-e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
|
||||
-fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \
|
||||
-e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \
|
||||
-e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \
|
||||
-e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \
|
||||
-i ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client \
|
||||
${PN}-server-snmpd ${PN}-server-snmptrapd \
|
||||
${PN}-lib-netsnmp ${PN}-lib-agent ${PN}-lib-helpers \
|
||||
${PN}-lib-mibs ${PN}-lib-trapd"
|
||||
|
||||
# perl module
|
||||
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl-modules', '', d)}"
|
||||
|
||||
ALLOW_EMPTY_${PN} = "1"
|
||||
ALLOW_EMPTY_${PN}-server = "1"
|
||||
ALLOW_EMPTY_${PN}-libs = "1"
|
||||
|
||||
FILES_${PN}-perl-modules = "${libdir}/perl/*"
|
||||
|
||||
FILES_${PN}-libs = ""
|
||||
FILES_${PN}-mibs = "${datadir}/snmp/mibs"
|
||||
FILES_${PN}-server-snmpd = "${sbindir}/snmpd \
|
||||
${sysconfdir}/snmp/snmpd.conf \
|
||||
${sysconfdir}/init.d \
|
||||
${systemd_unitdir}/system/snmpd.service \
|
||||
"
|
||||
|
||||
FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
|
||||
${sysconfdir}/snmp/snmptrapd.conf \
|
||||
${systemd_unitdir}/system/snmptrapd.service \
|
||||
"
|
||||
|
||||
FILES_${PN}-lib-netsnmp = "${libdir}/libnetsnmp${SOLIBS}"
|
||||
FILES_${PN}-lib-agent = "${libdir}/libnetsnmpagent${SOLIBS}"
|
||||
FILES_${PN}-lib-helpers = "${libdir}/libnetsnmphelpers${SOLIBS}"
|
||||
FILES_${PN}-lib-mibs = "${libdir}/libnetsnmpmibs${SOLIBS}"
|
||||
FILES_${PN}-lib-trapd = "${libdir}/libnetsnmptrapd${SOLIBS}"
|
||||
|
||||
FILES_${PN} = ""
|
||||
FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
|
||||
FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
|
||||
FILES_${PN}-dev += "${bindir}/mib2c \
|
||||
${bindir}/mib2c-update \
|
||||
${bindir}/net-snmp-config \
|
||||
${bindir}/net-snmp-create-v3-user \
|
||||
"
|
||||
|
||||
CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
|
||||
CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
|
||||
|
||||
INITSCRIPT_PACKAGES = "${PN}-server-snmpd"
|
||||
INITSCRIPT_NAME_${PN}-server-snmpd = "snmpd"
|
||||
INITSCRIPT_PARAMS_${PN}-server-snmpd = "start 90 2 3 4 5 . stop 60 0 1 6 ."
|
||||
|
||||
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-server-snmpd \
|
||||
${PN}-server-snmptrapd"
|
||||
|
||||
SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
|
||||
SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service"
|
||||
|
||||
RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}"
|
||||
RDEPENDS_${PN} += "net-snmp-client"
|
||||
RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
|
||||
RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd"
|
||||
RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
|
||||
RDEPENDS_${PN}-client += "net-snmp-mibs net-snmp-libs"
|
||||
RDEPENDS_${PN}-libs += "libpci \
|
||||
${PN}-lib-netsnmp \
|
||||
${PN}-lib-agent \
|
||||
${PN}-lib-helpers \
|
||||
${PN}-lib-mibs \
|
||||
"
|
||||
RDEPENDS_${PN}-ptest += "perl \
|
||||
perl-module-test \
|
||||
perl-module-file-basename \
|
||||
perl-module-getopt-long \
|
||||
perl-module-file-temp \
|
||||
perl-module-data-dumper \
|
||||
"
|
||||
RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
|
||||
RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
|
||||
|
||||
RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
|
||||
RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
|
||||
RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
|
||||
|
||||
RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
|
||||
RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
|
||||
RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
|
||||
|
||||
LEAD_SONAME = "libnetsnmp.so"
|
||||
28
recipes-networking/snmpd/net-snmp_5.8.bbappend
Normal file
28
recipes-networking/snmpd/net-snmp_5.8.bbappend
Normal file
@@ -0,0 +1,28 @@
|
||||
# This file Copyright (C) 2019 Anton Kikin <a.kikin@tano-systems.com>
|
||||
PR_append = ".tano0.${INC_PR}"
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/patches:${THISDIR}/${PN}/files:"
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}_${PV}/files:${THISDIR}/${PN}_${PV}/patches:"
|
||||
|
||||
DEPENDS_remove = "${@bb.utils.contains('MACHINE_FEATURES', 'pci', '', 'pciutils',d)}"
|
||||
|
||||
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '', d)}"
|
||||
|
||||
#do_install_append() {
|
||||
# sed -e "s@\([^ ]*-fdebug-prefix-map=[^ ]*\)\1*@@g" \
|
||||
# -e "s@\([^ ]*--sysroot=[^ ]*\)\1*@@g" \
|
||||
# -e "s@\([^ ]*--with-libtool-sysroot=[^ ]*\)\1*@@g" \
|
||||
# -e "s@\([^ ]*--with-install-prefix=[^ ]*\)\1*@@g" \
|
||||
# -i ${D}${bindir}/net-snmp-config
|
||||
|
||||
# if [ "${HAS_PERL}" = "1" ]; then
|
||||
# install -m 0755 ${B}/local/snmp-bridge-mib ${D}${sysconfdir}/snmp/
|
||||
# fi
|
||||
#}
|
||||
|
||||
FILES_${PN}-perl-modules += "${sysconfdir}/snmp/snmp-bridge-mib"
|
||||
|
||||
RDEPENDS_${PN}-libs_remove = "${@bb.utils.contains('MACHINE_FEATURES', 'pci', '', 'libpci', d)}"
|
||||
RDEPENDS_${PN}-perl-modules += "perl"
|
||||
|
||||
require ${PN}-openwrt.inc
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/agent/mibgroup/mibII/interfaces.c
|
||||
+++ b/agent/mibgroup/mibII/interfaces.c
|
||||
@@ -1588,6 +1588,10 @@ Interface_Scan_Init(void)
|
||||
struct ifnet *nnew;
|
||||
char *stats, *ifstart = line;
|
||||
|
||||
+ /* Ignore interfaces with no statistics. */
|
||||
+ if (strstr(line, "No statistics available."))
|
||||
+ continue;
|
||||
+
|
||||
if (line[strlen(line) - 1] == '\n')
|
||||
line[strlen(line) - 1] = '\0';
|
||||
|
||||
@@ -1620,7 +1624,7 @@ Interface_Scan_Init(void)
|
||||
&coll) != 5)) {
|
||||
if ((scan_line_to_use == scan_line_2_2)
|
||||
&& !strstr(line, "No statistics available"))
|
||||
- snmp_log(LOG_ERR,
|
||||
+ snmp_log(LOG_DEBUG,
|
||||
"/proc/net/dev data format error, line ==|%s|",
|
||||
line);
|
||||
continue;
|
||||
@@ -0,0 +1,43 @@
|
||||
diff -uNr a/local/Makefile.in b/local/Makefile.in
|
||||
--- a/local/Makefile.in 2014-02-20 08:36:42.000000000 +0800
|
||||
+++ b/local/Makefile.in 2014-05-27 13:21:34.245223503 +0800
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
mib2c.made: $(srcdir)/mib2c
|
||||
if test "x$(PERL)" != "x" ; then \
|
||||
- $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \
|
||||
+ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \
|
||||
else \
|
||||
touch mib2c.made; \
|
||||
fi
|
||||
diff -uNr a/Makefile.top b/Makefile.top
|
||||
--- a/Makefile.top 2014-02-20 08:36:42.000000000 +0800
|
||||
+++ b/Makefile.top 2014-05-27 13:26:53.023737120 +0800
|
||||
@@ -28,6 +28,7 @@
|
||||
snmplibdir = $(datadir)/snmp
|
||||
mibdir = $(snmplibdir)/mibs
|
||||
persistentdir = @PERSISTENT_DIRECTORY@
|
||||
+sysconfdir = @sysconfdir@
|
||||
DESTDIR = @INSTALL_PREFIX@
|
||||
INSTALL_PREFIX = $(DESTDIR)
|
||||
|
||||
diff -uNr a/mibs/Makefile.in b/mibs/Makefile.in
|
||||
--- a/mibs/Makefile.in 2014-02-20 08:36:42.000000000 +0800
|
||||
+++ b/mibs/Makefile.in 2014-05-27 13:25:07.151988585 +0800
|
||||
@@ -47,11 +47,15 @@
|
||||
UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
|
||||
UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt
|
||||
|
||||
+EXTRAMIBS = BGP4-MIB.txt BRIDGE-MIB.txt GNOME-SMI.txt OSPF-MIB.txt \
|
||||
+ OSPF-TRAP-MIB.txt RIPv2-MIB.txt SOURCE-ROUTING-MIB.txt \
|
||||
+ LM-SENSORS-MIB.txt
|
||||
+
|
||||
DEFAULTMIBS = @default_mibs_install@
|
||||
|
||||
MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \
|
||||
$(AGENTMIBS) $(IANAMIBS) \
|
||||
- $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS)
|
||||
+ $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS)
|
||||
|
||||
all: standardall
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/local/mib2c
|
||||
+++ b/local/mib2c
|
||||
@@ -61,8 +61,9 @@ $currentlevel = -1;
|
||||
if($ENV{MIB2C_DIR}) {
|
||||
push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR});
|
||||
}
|
||||
-push @def_search_dirs, "/usr/local/share/snmp/";
|
||||
-push @def_search_dirs, "/usr/local/share/snmp/mib2c-data";
|
||||
+push @def_search_dirs, "/etc/snmp/";
|
||||
+push @def_search_dirs, "/usr/share/snmp/";
|
||||
+push @def_search_dirs, "/usr/share/snmp/mib2c-data";
|
||||
push @def_search_dirs, "./mib2c-conf.d";
|
||||
|
||||
sub usage {
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -15097,7 +15097,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
+ finish_cmds=''
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=no
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/Makefile.top
|
||||
+++ b/Makefile.top
|
||||
@@ -87,7 +87,7 @@ LIBCURRENT = 30
|
||||
LIBAGE = 0
|
||||
LIBREVISION = 0
|
||||
|
||||
-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
|
||||
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
|
||||
LIB_EXTENSION = la
|
||||
LIB_VERSION =
|
||||
LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
|
||||
6156
recipes-networking/snmpd/net-snmp_5.8/patches/750-ieee802dot11.patch
Normal file
6156
recipes-networking/snmpd/net-snmp_5.8/patches/750-ieee802dot11.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
--- a/agent/mibgroup/iwlib.h
|
||||
+++ b/agent/mibgroup/iwlib.h
|
||||
@@ -85,6 +85,11 @@
|
||||
&& LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
|
||||
#define LIBC5_HEADERS
|
||||
|
||||
+/* Musl */
|
||||
+#elif !defined(__GLIBC__) && !defined(__UCLIBC__) \
|
||||
+ && LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
|
||||
+#define GENERIC_HEADERS
|
||||
+
|
||||
/* Unsupported combination */
|
||||
#else
|
||||
#error "Your kernel/libc combination is not supported"
|
||||
Reference in New Issue
Block a user