Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
This commit is contained in:
commit
7cab3cbaaf
|
@ -4,8 +4,8 @@
|
|||
###############################################################################
|
||||
|
||||
name = net-snmp
|
||||
version = 5.7.1
|
||||
release = 3
|
||||
version = 5.7.2
|
||||
release = 1
|
||||
|
||||
groups = Networking/Daemons
|
||||
url = http://net-snmp.sourceforge.net
|
||||
|
@ -22,33 +22,134 @@ source_dl = https://sourceforge.net/projects/net-snmp/files/net-snmp/%{version}
|
|||
|
||||
build
|
||||
requires
|
||||
autoconf
|
||||
automake
|
||||
bzip2-devel
|
||||
chrpath
|
||||
elfutils-devel
|
||||
libselinux-devel
|
||||
perl
|
||||
lm-sensors-devel >= 3
|
||||
openssl-devel
|
||||
perl(ExtUtils::Embed)
|
||||
procps
|
||||
python-setuptools
|
||||
python-devel
|
||||
systemd-devel
|
||||
systemd-units
|
||||
end
|
||||
|
||||
PARALLELISMFLAGS = # No parallel build
|
||||
|
||||
prepare_cmds
|
||||
autoreconf -vfi
|
||||
end
|
||||
|
||||
MIBS = host agentx smux \
|
||||
ucd-snmp/diskio tcp-mib udp-mib mibII/mta_sendmail \
|
||||
ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \
|
||||
ip-mib/ipAddressPrefixTable/ipAddressPrefixTable \
|
||||
ip-mib/ipDefaultRouterTable/ipDefaultRouterTable \
|
||||
ip-mib/ipv6ScopeZoneIndexTable ip-mib/ipIfStatsTable \
|
||||
sctp-mib rmon-mib etherlike-mib ucd-snmp/lmsensorsMib
|
||||
|
||||
configure_options += \
|
||||
--with-default-snmp-version=2 \
|
||||
--with-sys-contact=root@ \
|
||||
--with-sys-location=localhost \
|
||||
--with-cflags="%{CFLAGS}" \
|
||||
--with-ldflags="%{LDFLAGS}" \
|
||||
--with-sys-contact="root@localhost" \
|
||||
--with-sys-location="Unknown" \
|
||||
--with-logfile=/var/log/snmpd.log \
|
||||
--with-persistent-directory=/var/net-snmp \
|
||||
--without-perl-modules \
|
||||
--disable-embedded-perl
|
||||
--with-persistent-directory=/var/lib/net-snmp \
|
||||
--with-mib-modules="%{MIBS}" \
|
||||
--sysconfdir=%{sysconfdir} \
|
||||
--enable-ipv6 \
|
||||
--enable-ucd-snmp-compatibility \
|
||||
--with-openssl \
|
||||
--with-pic \
|
||||
--enable-embedded-perl \
|
||||
--enable-as-needed \
|
||||
--with-perl-modules="INSTALLDIRS=vendor" \
|
||||
--enable-mfd-rewrites \
|
||||
--enable-local-smux \
|
||||
--with-temp-file-pattern=/var/run/net-snmp/snmp-tmp-XXXXXX \
|
||||
--with-transports="DTLSUDP TLSTCP" \
|
||||
--with-security-modules=tsm \
|
||||
--with-systemd
|
||||
|
||||
build_cmds
|
||||
# Remove rpath from compiled perl libs
|
||||
find perl/blib -type f -name "*.so" -print -exec chrpath --delete {} \;
|
||||
|
||||
# Compile python module
|
||||
pushd python
|
||||
%{python} setup.py --basedir=".." build
|
||||
popd
|
||||
end
|
||||
|
||||
install_cmds
|
||||
mkdir -pv %{BUILDROOT}/etc
|
||||
install -v -m644 %{DIR_APP}/python/netsnmp/tests/snmpd.conf %{BUILDROOT}/etc/snmpd.conf
|
||||
# Remove stuff we don't want to distribute.
|
||||
rm -vf %{BUILDROOT}%{bindir}/snmpinform
|
||||
ln -svf snmptrap %{BUILDROOT}%{bindir}/snmpinform
|
||||
rm -vf %{BUILDROOT}%{bindir}/snmpcheck
|
||||
rm -vf %{BUILDROOT}{%{bindir}/fixproc,%{mandir}/man1/fixproc*}
|
||||
rm -vf %{BUILDROOT}%{bindir}/ipf-mod.pl
|
||||
|
||||
# Copy missing mib2c.conf files.
|
||||
install -v -m 644 local/mib2c.*.conf %{BUILDROOT}%{datadir}/snmp
|
||||
|
||||
# Install python module.
|
||||
pushd python
|
||||
%{python} setup.py --basedir=".." install -O1 --skip-build --root %{BUILDROOT}
|
||||
popd
|
||||
|
||||
# Make libs executable.
|
||||
find %{BUILDROOT} -name "*.so" | xargs chmod -v 755
|
||||
|
||||
# Install configuration files.
|
||||
mkdir -pv %{BUILDROOT}%{sysconfdir}/snmp
|
||||
install -v -m644 %{DIR_SOURCE}/snmpd.conf \
|
||||
%{BUILDROOT}%{sysconfdir}/snmp/snmpd.conf
|
||||
install -v -m644 %{DIR_SOURCE}/snmptrapd.conf \
|
||||
%{BUILDROOT}%{sysconfdir}/snmp/snmptrapd.conf
|
||||
|
||||
# Prepare runtime directories.
|
||||
mkdir -pv %{BUILDROOT}%{localstatedir}/{lib,run}/net-snmp
|
||||
|
||||
# Remove more RPATHs.
|
||||
find %{BUILDROOT}{%{bindir},%{sbindir},%{libdir}} -type f -print \
|
||||
-exec chrpath --delete {} \;
|
||||
end
|
||||
end
|
||||
|
||||
packages
|
||||
package %{name}
|
||||
# XXX Although we don't want to build perl modules,
|
||||
# we have this requirement?!
|
||||
filter_requires
|
||||
^perl
|
||||
configfiles
|
||||
%{sysconfdir}/snmp
|
||||
end
|
||||
|
||||
datafiles
|
||||
%{localstatedir}/lib/net-snmp
|
||||
end
|
||||
|
||||
script postin
|
||||
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
end
|
||||
|
||||
script preun
|
||||
systemctl --no-reload disable snmpd.service > /dev/null 2>&1 || :
|
||||
systemctl stop snmpd.service > /dev/null 2>&1 || :
|
||||
|
||||
systemctl --no-reload disable snmptrapd.service > /dev/null 2>&1 || :
|
||||
systemctl stop snmptrapd.service > /dev/null 2>&1 || :
|
||||
end
|
||||
|
||||
script postun
|
||||
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
end
|
||||
|
||||
script postup
|
||||
systemctl daemon-reload 2>&1 || :
|
||||
systemctl reload-or-try-restart snmpd.service >/dev/null 2>&1 || :
|
||||
systemctl reload-or-try-restart snmptrapd.service >/dev/null 2>&1 || :
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -56,6 +157,10 @@ packages
|
|||
template LIBS
|
||||
end
|
||||
|
||||
package %{name}-python
|
||||
template PYTHON
|
||||
end
|
||||
|
||||
package %{name}-devel
|
||||
template DEVEL
|
||||
end
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
d /run/net-snmp 0755 root root
|
|
@ -0,0 +1,354 @@
|
|||
Add APSL 2.0 license to the COPYING file.
|
||||
|
||||
There is only one file covered by this license:
|
||||
net-snmp-5.5/agent/mibgroup/host/data_access/swrun_darwin.c
|
||||
|
||||
This file is not used on Linux at all, it's only present in source
|
||||
tarball and net-snmp.src.rpm.
|
||||
|
||||
In addition, it's licensed under APSL 1.1, but it allows to relicense
|
||||
the code to 'any subsequent version of this License published by Apple'.
|
||||
According to http://fedoraproject.org/wiki/Licensing, APSL ver. 2.0 is
|
||||
better for us.
|
||||
|
||||
diff -up net-snmp-5.5/COPYING.apsl net-snmp-5.5/COPYING
|
||||
--- net-snmp-5.5/COPYING.apsl 2010-08-04 12:40:27.494479126 +0200
|
||||
+++ net-snmp-5.5/COPYING 2010-08-04 12:45:47.713684755 +0200
|
||||
@@ -292,3 +292,337 @@ ON ANY THEORY OF LIABILITY, WHETHER IN C
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
+
|
||||
+---- Part 10: APPLE PUBLIC SOURCE LICENSE (APSL 2.0) ----
|
||||
+
|
||||
+Version 2.0 - August 6, 2003
|
||||
+
|
||||
+Please read this License carefully before downloading this software. By
|
||||
+downloading or using this software, you are agreeing to be bound by the terms
|
||||
+of this License. If you do not or cannot agree to the terms of this License,
|
||||
+please do not download or use the software.
|
||||
+
|
||||
+Apple Note: In January 2007, Apple changed its corporate name from "Apple
|
||||
+Computer, Inc." to "Apple Inc." This change has been reflected below and
|
||||
+copyright years updated, but no other changes have been made to the APSL 2.0.
|
||||
+
|
||||
+1. General; Definitions. This License applies to any program or other
|
||||
+work which Apple Inc. ("Apple") makes publicly available and which contains a
|
||||
+notice placed by Apple identifying such program or work as "Original Code" and
|
||||
+stating that it is subject to the terms of this Apple Public Source License
|
||||
+version 2.0 ("License"). As used in this License:
|
||||
+
|
||||
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the
|
||||
+grantor of rights, (i) claims of patents that are now or hereafter acquired,
|
||||
+owned by or assigned to Apple and (ii) that cover subject matter contained in
|
||||
+the Original Code, but only to the extent necessary to use, reproduce and/or
|
||||
+distribute the Original Code without infringement; and (b) in the case where
|
||||
+You are the grantor of rights, (i) claims of patents that are now or hereafter
|
||||
+acquired, owned by or assigned to You and (ii) that cover subject matter in
|
||||
+Your Modifications, taken alone or in combination with Original Code.
|
||||
+
|
||||
+1.2 "Contributor" means any person or entity that creates or contributes to
|
||||
+the creation of Modifications.
|
||||
+
|
||||
+1.3 "Covered Code" means the Original Code, Modifications, the combination
|
||||
+of Original Code and any Modifications, and/or any respective portions thereof.
|
||||
+
|
||||
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise
|
||||
+make Covered Code available, directly or indirectly, to anyone other than You;
|
||||
+and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way
|
||||
+to provide a service, including but not limited to delivery of content, through
|
||||
+electronic communication with a client other than You.
|
||||
+
|
||||
+1.5 "Larger Work" means a work which combines Covered Code or portions
|
||||
+thereof with code not governed by the terms of this License.
|
||||
+
|
||||
+1.6 "Modifications" mean any addition to, deletion from, and/or change to,
|
||||
+the substance and/or structure of the Original Code, any previous
|
||||
+Modifications, the combination of Original Code and any previous Modifications,
|
||||
+and/or any respective portions thereof. When code is released as a series of
|
||||
+files, a Modification is: (a) any addition to or deletion from the contents of
|
||||
+a file containing Covered Code; and/or (b) any new file or other representation
|
||||
+of computer program statements that contains any part of Covered Code.
|
||||
+
|
||||
+1.7 "Original Code" means (a) the Source Code of a program or other work as
|
||||
+originally made available by Apple under this License, including the Source
|
||||
+Code of any updates or upgrades to such programs or works made available by
|
||||
+Apple under this License, and that has been expressly identified by Apple as
|
||||
+such in the header file(s) of such work; and (b) the object code compiled from
|
||||
+such Source Code and originally made available by Apple under this License
|
||||
+
|
||||
+1.8 "Source Code" means the human readable form of a program or other work
|
||||
+that is suitable for making modifications to it, including all modules it
|
||||
+contains, plus any associated interface definition files, scripts used to
|
||||
+control compilation and installation of an executable (object code).
|
||||
+
|
||||
+1.9 "You" or "Your" means an individual or a legal entity exercising rights
|
||||
+under this License. For legal entities, "You" or "Your" includes any entity
|
||||
+which controls, is controlled by, or is under common control with, You, where
|
||||
+"control" means (a) the power, direct or indirect, to cause the direction or
|
||||
+management of such entity, whether by contract or otherwise, or (b) ownership
|
||||
+of fifty percent (50%) or more of the outstanding shares or beneficial
|
||||
+ownership of such entity.
|
||||
+
|
||||
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms and
|
||||
+conditions of this License, Apple hereby grants You, effective on the date You
|
||||
+accept this License and download the Original Code, a world-wide, royalty-free,
|
||||
+non-exclusive license, to the extent of Apple's Applicable Patent Rights and
|
||||
+copyrights covering the Original Code, to do the following:
|
||||
+
|
||||
+2.1 Unmodified Code. You may use, reproduce, display, perform, internally
|
||||
+distribute within Your organization, and Externally Deploy verbatim, unmodified
|
||||
+copies of the Original Code, for commercial or non-commercial purposes,
|
||||
+provided that in each instance:
|
||||
+
|
||||
+(a) You must retain and reproduce in all copies of Original Code the
|
||||
+copyright and other proprietary notices and disclaimers of Apple as they appear
|
||||
+in the Original Code, and keep intact all notices in the Original Code that
|
||||
+refer to this License; and
|
||||
+
|
||||
+(b) You must include a copy of this License with every copy of Source Code
|
||||
+of Covered Code and documentation You distribute or Externally Deploy, and You
|
||||
+may not offer or impose any terms on such Source Code that alter or restrict
|
||||
+this License or the recipients' rights hereunder, except as permitted under
|
||||
+Section 6.
|
||||
+
|
||||
+2.2 Modified Code. You may modify Covered Code and use, reproduce,
|
||||
+display, perform, internally distribute within Your organization, and
|
||||
+Externally Deploy Your Modifications and Covered Code, for commercial or
|
||||
+non-commercial purposes, provided that in each instance You also meet all of
|
||||
+these conditions:
|
||||
+
|
||||
+(a) You must satisfy all the conditions of Section 2.1 with respect to the
|
||||
+Source Code of the Covered Code;
|
||||
+
|
||||
+(b) You must duplicate, to the extent it does not already exist, the notice
|
||||
+in Exhibit A in each file of the Source Code of all Your Modifications, and
|
||||
+cause the modified files to carry prominent notices stating that You changed
|
||||
+the files and the date of any change; and
|
||||
+
|
||||
+(c) If You Externally Deploy Your Modifications, You must make Source Code
|
||||
+of all Your Externally Deployed Modifications either available to those to whom
|
||||
+You have Externally Deployed Your Modifications, or publicly available. Source
|
||||
+Code of Your Externally Deployed Modifications must be released under the terms
|
||||
+set forth in this License, including the license grants set forth in Section 3
|
||||
+below, for as long as you Externally Deploy the Covered Code or twelve (12)
|
||||
+months from the date of initial External Deployment, whichever is longer. You
|
||||
+should preferably distribute the Source Code of Your Externally Deployed
|
||||
+Modifications electronically (e.g. download from a web site).
|
||||
+
|
||||
+2.3 Distribution of Executable Versions. In addition, if You Externally
|
||||
+Deploy Covered Code (Original Code and/or Modifications) in object code,
|
||||
+executable form only, You must include a prominent notice, in the code itself
|
||||
+as well as in related documentation, stating that Source Code of the Covered
|
||||
+Code is available under the terms of this License with information on how and
|
||||
+where to obtain such Source Code.
|
||||
+
|
||||
+2.4 Third Party Rights. You expressly acknowledge and agree that although
|
||||
+Apple and each Contributor grants the licenses to their respective portions of
|
||||
+the Covered Code set forth herein, no assurances are provided by Apple or any
|
||||
+Contributor that the Covered Code does not infringe the patent or other
|
||||
+intellectual property rights of any other entity. Apple and each Contributor
|
||||
+disclaim any liability to You for claims brought by any other entity based on
|
||||
+infringement of intellectual property rights or otherwise. As a condition to
|
||||
+exercising the rights and licenses granted hereunder, You hereby assume sole
|
||||
+responsibility to secure any other intellectual property rights needed, if any.
|
||||
+For example, if a third party patent license is required to allow You to
|
||||
+distribute the Covered Code, it is Your responsibility to acquire that license
|
||||
+before distributing the Covered Code.
|
||||
+
|
||||
+3. Your Grants. In consideration of, and as a condition to, the licenses
|
||||
+granted to You under this License, You hereby grant to any person or entity
|
||||
+receiving or distributing Covered Code under this License a non-exclusive,
|
||||
+royalty-free, perpetual, irrevocable license, under Your Applicable Patent
|
||||
+Rights and other intellectual property rights (other than patent) owned or
|
||||
+controlled by You, to use, reproduce, display, perform, modify, sublicense,
|
||||
+distribute and Externally Deploy Your Modifications of the same scope and
|
||||
+extent as Apple's licenses under Sections 2.1 and 2.2 above.
|
||||
+
|
||||
+4. Larger Works. You may create a Larger Work by combining Covered Code
|
||||
+with other code not governed by the terms of this License and distribute the
|
||||
+Larger Work as a single product. In each such instance, You must make sure the
|
||||
+requirements of this License are fulfilled for the Covered Code or any portion
|
||||
+thereof.
|
||||
+
|
||||
+5. Limitations on Patent License. Except as expressly stated in Section
|
||||
+2, no other patent rights, express or implied, are granted by Apple herein.
|
||||
+Modifications and/or Larger Works may require additional patent licenses from
|
||||
+Apple which Apple may grant in its sole discretion.
|
||||
+
|
||||
+6. Additional Terms. You may choose to offer, and to charge a fee for,
|
||||
+warranty, support, indemnity or liability obligations and/or other rights
|
||||
+consistent with the scope of the license granted herein ("Additional Terms") to
|
||||
+one or more recipients of Covered Code. However, You may do so only on Your own
|
||||
+behalf and as Your sole responsibility, and not on behalf of Apple or any
|
||||
+Contributor. You must obtain the recipient's agreement that any such Additional
|
||||
+Terms are offered by You alone, and You hereby agree to indemnify, defend and
|
||||
+hold Apple and every Contributor harmless for any liability incurred by or
|
||||
+claims asserted against Apple or such Contributor by reason of any such
|
||||
+Additional Terms.
|
||||
+
|
||||
+7. Versions of the License. Apple may publish revised and/or new versions
|
||||
+of this License from time to time. Each version will be given a distinguishing
|
||||
+version number. Once Original Code has been published under a particular
|
||||
+version of this License, You may continue to use it under the terms of that
|
||||
+version. You may also choose to use such Original Code under the terms of any
|
||||
+subsequent version of this License published by Apple. No one other than Apple
|
||||
+has the right to modify the terms applicable to Covered Code created under this
|
||||
+License.
|
||||
+
|
||||
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
|
||||
+part pre-release, untested, or not fully tested works. The Covered Code may
|
||||
+contain errors that could cause failures or loss of data, and may be incomplete
|
||||
+or contain inaccuracies. You expressly acknowledge and agree that use of the
|
||||
+Covered Code, or any portion thereof, is at Your sole and entire risk. THE
|
||||
+COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF
|
||||
+ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE"
|
||||
+FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
|
||||
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
|
||||
+LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF
|
||||
+SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF
|
||||
+QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH
|
||||
+CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE
|
||||
+COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR
|
||||
+REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
|
||||
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR
|
||||
+WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED
|
||||
+REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge
|
||||
+that the Covered Code is not intended for use in the operation of nuclear
|
||||
+facilities, aircraft navigation, communication systems, or air traffic control
|
||||
+machines in which case the failure of the Covered Code could lead to death,
|
||||
+personal injury, or severe physical or environmental damage.
|
||||
+
|
||||
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
|
||||
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,
|
||||
+INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR
|
||||
+YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER
|
||||
+UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS
|
||||
+LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF
|
||||
+THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL
|
||||
+PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF
|
||||
+LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT
|
||||
+APPLY TO YOU. In no event shall Apple's total liability to You for all damages
|
||||
+(other than as may be required by applicable law) under this License exceed the
|
||||
+amount of fifty dollars ($50.00).
|
||||
+
|
||||
+10. Trademarks. This License does not grant any rights to use the
|
||||
+trademarks or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime
|
||||
+Streaming Server" or any other trademarks, service marks, logos or trade names
|
||||
+belonging to Apple (collectively "Apple Marks") or to any trademark, service
|
||||
+mark, logo or trade name belonging to any Contributor. You agree not to use
|
||||
+any Apple Marks in or as part of the name of products derived from the Original
|
||||
+Code or to endorse or promote products derived from the Original Code other
|
||||
+than as expressly permitted by and in strict compliance at all times with
|
||||
+Apple's third party trademark usage guidelines which are posted at
|
||||
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
|
||||
+
|
||||
+11. Ownership. Subject to the licenses granted under this License, each
|
||||
+Contributor retains all rights, title and interest in and to any Modifications
|
||||
+made by such Contributor. Apple retains all rights, title and interest in and
|
||||
+to the Original Code and any Modifications made by or on behalf of Apple
|
||||
+("Apple Modifications"), and such Apple Modifications will not be automatically
|
||||
+subject to this License. Apple may, at its sole discretion, choose to license
|
||||
+such Apple Modifications under this License, or on different terms from those
|
||||
+contained in this License or may choose not to license them at all.
|
||||
+
|
||||
+12. Termination.
|
||||
+
|
||||
+12.1 Termination. This License and the rights granted hereunder will
|
||||
+terminate:
|
||||
+
|
||||
+(a) automatically without notice from Apple if You fail to comply with any
|
||||
+term(s) of this License and fail to cure such breach within 30 days of becoming
|
||||
+aware of such breach; (b) immediately in the event of the circumstances
|
||||
+described in Section 13.5(b); or (c) automatically without notice from Apple
|
||||
+if You, at any time during the term of this License, commence an action for
|
||||
+patent infringement against Apple; provided that Apple did not first commence
|
||||
+an action for patent infringement against You in that instance.
|
||||
+
|
||||
+12.2 Effect of Termination. Upon termination, You agree to immediately stop
|
||||
+any further use, reproduction, modification, sublicensing and distribution of
|
||||
+the Covered Code. All sublicenses to the Covered Code which have been properly
|
||||
+granted prior to termination shall survive any termination of this License.
|
||||
+Provisions which, by their nature, should remain in effect beyond the
|
||||
+termination of this License shall survive, including but not limited to
|
||||
+Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other
|
||||
+for compensation, indemnity or damages of any sort solely as a result of
|
||||
+terminating this License in accordance with its terms, and termination of this
|
||||
+License will be without prejudice to any other right or remedy of any party.
|
||||
+
|
||||
+13. Miscellaneous.
|
||||
+
|
||||
+13.1 Government End Users. The Covered Code is a "commercial item" as
|
||||
+defined in FAR 2.101. Government software and technical data rights in the
|
||||
+Covered Code include only those rights customarily provided to the public as
|
||||
+defined in this License. This customary commercial license in technical data
|
||||
+and software is provided in accordance with FAR 12.211 (Technical Data) and
|
||||
+12.212 (Computer Software) and, for Department of Defense purchases, DFAR
|
||||
+252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in
|
||||
+Commercial Computer Software or Computer Software Documentation). Accordingly,
|
||||
+all U.S. Government End Users acquire Covered Code with only those rights set
|
||||
+forth herein.
|
||||
+
|
||||
+13.2 Relationship of Parties. This License will not be construed as
|
||||
+creating an agency, partnership, joint venture or any other form of legal
|
||||
+association between or among You, Apple or any Contributor, and You will not
|
||||
+represent to the contrary, whether expressly, by implication, appearance or
|
||||
+otherwise.
|
||||
+
|
||||
+13.3 Independent Development. Nothing in this License will impair Apple's
|
||||
+right to acquire, license, develop, have others develop for it, market and/or
|
||||
+distribute technology or products that perform the same or similar functions
|
||||
+as, or otherwise compete with, Modifications, Larger Works, technology or
|
||||
+products that You may develop, produce, market or distribute.
|
||||
+
|
||||
+13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce
|
||||
+any provision of this License will not be deemed a waiver of future enforcement
|
||||
+of that or any other provision. Any law or regulation which provides that the
|
||||
+language of a contract shall be construed against the drafter will not apply to
|
||||
+this License.
|
||||
+
|
||||
+13.5 Severability. (a) If for any reason a court of competent jurisdiction
|
||||
+finds any provision of this License, or portion thereof, to be unenforceable,
|
||||
+that provision of the License will be enforced to the maximum extent
|
||||
+permissible so as to effect the economic benefits and intent of the parties,
|
||||
+and the remainder of this License will continue in full force and effect. (b)
|
||||
+Notwithstanding the foregoing, if applicable law prohibits or restricts You
|
||||
+from fully and/or specifically complying with Sections 2 and/or 3 or prevents
|
||||
+the enforceability of either of those Sections, this License will immediately
|
||||
+terminate and You must immediately discontinue any use of the Covered Code and
|
||||
+destroy all copies of it that are in your possession or control.
|
||||
+
|
||||
+13.6 Dispute Resolution. Any litigation or other dispute resolution between
|
||||
+You and Apple relating to this License shall take place in the Northern
|
||||
+District of California, and You and Apple hereby consent to the personal
|
||||
+jurisdiction of, and venue in, the state and federal courts within that
|
||||
+District with respect to this License. The application of the United Nations
|
||||
+Convention on Contracts for the International Sale of Goods is expressly
|
||||
+excluded.
|
||||
+
|
||||
+13.7 Entire Agreement; Governing Law. This License constitutes the entire
|
||||
+agreement between the parties with respect to the subject matter hereof. This
|
||||
+License shall be governed by the laws of the United States and the State of
|
||||
+California, except that body of California law concerning conflicts of law.
|
||||
+
|
||||
+Where You are located in the province of Quebec, Canada, the following clause
|
||||
+applies: The parties hereby confirm that they have requested that this License
|
||||
+and all related documents be drafted in English. Les parties ont exigé que le
|
||||
+présent contrat et tous les documents connexes soient rédigés en anglais.
|
||||
+
|
||||
+EXHIBIT A.
|
||||
+
|
||||
+"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved.
|
||||
+
|
||||
+This file contains Original Code and/or Modifications of Original Code as
|
||||
+defined in and that are subject to the Apple Public Source License Version 2.0
|
||||
+(the 'License'). You may not use this file except in compliance with the
|
||||
+License. Please obtain a copy of the License at
|
||||
+http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
+
|
||||
+The Original Code and all software distributed under the License are
|
||||
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
|
||||
+OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
|
||||
+LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
+PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
|
||||
+specific language governing rights and limitations under the License."
|
|
@ -0,0 +1,14 @@
|
|||
Let net-snmp-create-v3-user save settings into /etc/ instead of /usr/
|
||||
|
||||
diff -up net-snmp-5.5/net-snmp-create-v3-user.in.orig net-snmp-5.5/net-snmp-create-v3-user.in
|
||||
--- net-snmp-5.5/net-snmp-create-v3-user.in.orig 2008-07-22 16:33:25.000000000 +0200
|
||||
+++ net-snmp-5.5/net-snmp-create-v3-user.in 2009-09-29 16:30:36.000000000 +0200
|
||||
@@ -158,7 +158,7 @@ if test ! -d $outfile ; then
|
||||
touch $outfile
|
||||
fi
|
||||
echo $line >> $outfile
|
||||
-outfile="@datadir@/snmp/snmpd.conf"
|
||||
+outfile="/etc/snmp/snmpd.conf"
|
||||
line="$token $user"
|
||||
echo "adding the following line to $outfile:"
|
||||
echo " " $line
|
|
@ -0,0 +1,16 @@
|
|||
554747 - net-snmp-config should not contain perl options
|
||||
|
||||
Remove rpath from net-snmp-config --agent-libs output.
|
||||
|
||||
diff -up net-snmp-5.7/net-snmp-config.in.perl-linking net-snmp-5.7/net-snmp-config.in
|
||||
--- net-snmp-5.7/net-snmp-config.in.perl-linking 2011-07-02 00:35:46.000000000 +0200
|
||||
+++ net-snmp-5.7/net-snmp-config.in 2011-07-07 13:30:01.635798817 +0200
|
||||
@@ -50,7 +50,7 @@ NSC_LDFLAGS="@LDFLAGS@"
|
||||
|
||||
NSC_LIBS="@LIBS@"
|
||||
NSC_LNETSNMPLIBS="@LNETSNMPLIBS@"
|
||||
-NSC_LAGENTLIBS="@LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@"
|
||||
+NSC_LAGENTLIBS="@LAGENTLIBS@"
|
||||
NSC_LMIBLIBS="@LMIBLIBS@"
|
||||
|
||||
NSC_INCLUDEDIR=${includedir}
|
|
@ -0,0 +1,47 @@
|
|||
Make the man pages multilib safe.
|
||||
|
||||
diff -up net-snmp-5.6/man/netsnmp_config_api.3.def.multilib net-snmp-5.6/man/netsnmp_config_api.3.def
|
||||
--- net-snmp-5.6/man/netsnmp_config_api.3.def.multilib 2010-09-08 17:41:37.000000000 +0200
|
||||
+++ net-snmp-5.6/man/netsnmp_config_api.3.def 2010-10-25 17:40:43.433726423 +0200
|
||||
@@ -295,7 +295,7 @@ for one particular machine.
|
||||
.PP
|
||||
The default list of directories to search is \fC SYSCONFDIR/snmp\fP,
|
||||
followed by \fC DATADIR/snmp\fP,
|
||||
-followed by \fC LIBDIR/snmp\fP,
|
||||
+followed by \fC /usr/lib(64)/snmp\fP,
|
||||
followed by \fC $HOME/.snmp\fP.
|
||||
This list can be changed by setting the environmental variable
|
||||
.I SNMPCONFPATH
|
||||
@@ -365,7 +365,7 @@ function that it should abort the operat
|
||||
SNMPCONFPATH
|
||||
A colon separated list of directories to search for configuration
|
||||
files in.
|
||||
-Default: SYSCONFDIR/snmp:DATADIR/snmp:LIBDIR/snmp:$HOME/.snmp
|
||||
+Default: SYSCONFDIR/snmp:DATADIR/snmp:/usr/lib(64)/snmp:$HOME/.snmp
|
||||
.SH "SEE ALSO"
|
||||
.BR mib_api "(3), " snmp_api (3)
|
||||
.\" Local Variables:
|
||||
diff -up net-snmp-5.6/man/snmp_config.5.def.multilib net-snmp-5.6/man/snmp_config.5.def
|
||||
--- net-snmp-5.6/man/snmp_config.5.def.multilib 2010-09-17 11:51:52.000000000 +0200
|
||||
+++ net-snmp-5.6/man/snmp_config.5.def 2010-10-25 17:40:12.681976439 +0200
|
||||
@@ -10,7 +10,7 @@ First off, there are numerous places tha
|
||||
found and read from. By default, the applications look for
|
||||
configuration files in the following 4 directories, in order:
|
||||
SYSCONFDIR/snmp,
|
||||
-DATADIR/snmp, LIBDIR/snmp, and $HOME/.snmp. In each of these
|
||||
+DATADIR/snmp, /usr/lib(64)/snmp, and $HOME/.snmp. In each of these
|
||||
directories, it looks for files with the extension of both
|
||||
.IR conf " and " local.conf
|
||||
(reading the second ones last). In this manner, there are
|
||||
diff -up net-snmp-5.6/man/snmpd.conf.5.def.multilib net-snmp-5.6/man/snmpd.conf.5.def
|
||||
--- net-snmp-5.6/man/snmpd.conf.5.def.multilib 2010-09-17 11:51:52.000000000 +0200
|
||||
+++ net-snmp-5.6/man/snmpd.conf.5.def 2010-10-25 17:40:12.682976925 +0200
|
||||
@@ -1387,7 +1387,7 @@ filename), and call the initialisation r
|
||||
.RS
|
||||
.IP "Note:"
|
||||
If the specified PATH is not a fully qualified filename, it will
|
||||
-be interpreted relative to LIBDIR/snmp/dlmod, and \fC.so\fR
|
||||
+be interpreted relative to /usr/lib(64)/snmp/dlmod, and \fC.so\fR
|
||||
will be appended to the filename.
|
||||
.RE
|
||||
.PP
|
|
@ -0,0 +1,29 @@
|
|||
Don't check tests which depend on DNS - it's disabled in Koji
|
||||
|
||||
diff -up net-snmp-5.7.2/testing/fulltests/default/T070com2sec_simple.debug net-snmp-5.7.2/testing/fulltests/default/T070com2sec_simple
|
||||
--- net-snmp-5.7.2/testing/fulltests/default/T070com2sec_simple.debug 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/testing/fulltests/default/T070com2sec_simple 2012-10-18 10:16:39.276416510 +0200
|
||||
@@ -134,6 +134,10 @@ SAVECHECKAGENT '<"c406a", 255.255.255.25
|
||||
SAVECHECKAGENT 'line 30: Error:' # msg from h_strerror so it varies
|
||||
SAVECHECKAGENT 'line 31: Error:' # msg from h_strerror so it varies
|
||||
|
||||
+FINISHED
|
||||
+
|
||||
+# don't test the later, it depends on DNS, which is not available in Koji
|
||||
+
|
||||
CHECKAGENT '<"c408a"'
|
||||
if [ "$snmp_last_test_result" -eq 0 ] ; then
|
||||
CHECKAGENT 'line 32: Error:'
|
||||
diff -up net-snmp-5.7.2/testing/fulltests/default/T071com2sec6_simple.debug net-snmp-5.7.2/testing/fulltests/default/T071com2sec6_simple
|
||||
--- net-snmp-5.7.2/testing/fulltests/default/T071com2sec6_simple.debug 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/testing/fulltests/default/T071com2sec6_simple 2012-10-18 10:16:39.276416510 +0200
|
||||
@@ -132,6 +132,9 @@ SAVECHECKAGENT '<"c606a", ffff:ffff:ffff
|
||||
SAVECHECKAGENT 'line 27: Error:'
|
||||
SAVECHECKAGENT 'line 28: Error:'
|
||||
|
||||
+FINISHED
|
||||
+
|
||||
+# don't test the later, it depends on DNS, which is not available in Koji
|
||||
# 608
|
||||
CHECKAGENT '<"c608a"'
|
||||
if [ "$snmp_last_test_result" -eq 0 ] ; then
|
|
@ -0,0 +1,24 @@
|
|||
diff -up net-snmp-5.7.2/agent/Makefile.in.pie net-snmp-5.7.2/agent/Makefile.in
|
||||
--- net-snmp-5.7.2/agent/Makefile.in.pie 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/agent/Makefile.in 2012-10-18 09:45:13.298613099 +0200
|
||||
@@ -294,7 +294,7 @@ getmibstat.o: mibgroup/kernel_sunos5.c
|
||||
$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
|
||||
|
||||
snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG)
|
||||
- $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
+ $(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
|
||||
|
||||
libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS)
|
||||
$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
|
||||
diff -up net-snmp-5.7.2/apps/Makefile.in.pie net-snmp-5.7.2/apps/Makefile.in
|
||||
--- net-snmp-5.7.2/apps/Makefile.in.pie 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/apps/Makefile.in 2012-10-18 09:44:27.827774580 +0200
|
||||
@@ -170,7 +170,7 @@ snmptest$(EXEEXT): snmptest.$(OSUFFIX
|
||||
$(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS}
|
||||
|
||||
snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
|
||||
- $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
+ $(LINK) ${CFLAGS} -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS}
|
||||
|
||||
snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS)
|
||||
$(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS}
|
|
@ -0,0 +1,23 @@
|
|||
895357 - net-snmp-python adds zeros to end of IP address (IPADDR type), which is not valid
|
||||
|
||||
Source: upstream commit 234158b8e84cc204cbac96e6e9be6959635404b8
|
||||
|
||||
--- a/python/netsnmp/client_intf.c
|
||||
+++ a/python/netsnmp/client_intf.c
|
||||
@@ -821,14 +821,14 @@ OCT:
|
||||
|
||||
case TYPE_IPADDR:
|
||||
vars->type = ASN_IPADDRESS;
|
||||
- vars->val.integer = (long *)malloc(sizeof(long));
|
||||
+ vars->val.integer = (in_addr_t *)malloc(sizeof(in_addr_t));
|
||||
if (val)
|
||||
*(vars->val.integer) = inet_addr(val);
|
||||
else {
|
||||
ret = FAILURE;
|
||||
*(vars->val.integer) = 0;
|
||||
}
|
||||
- vars->val_len = sizeof(long);
|
||||
+ vars->val_len = sizeof(in_addr_t);
|
||||
break;
|
||||
|
||||
case TYPE_OBJID:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,462 @@
|
|||
###############################################################################
|
||||
#
|
||||
# snmpd.conf:
|
||||
# An example configuration file for configuring the ucd-snmp snmpd agent.
|
||||
#
|
||||
###############################################################################
|
||||
#
|
||||
# This file is intended to only be as a starting point. Many more
|
||||
# configuration directives exist than are mentioned in this file. For
|
||||
# full details, see the snmpd.conf(5) manual page.
|
||||
#
|
||||
# All lines beginning with a '#' are comments and are intended for you
|
||||
# to read. All other lines are configuration commands for the agent.
|
||||
|
||||
###############################################################################
|
||||
# Access Control
|
||||
###############################################################################
|
||||
|
||||
# As shipped, the snmpd demon will only respond to queries on the
|
||||
# system mib group until this file is replaced or modified for
|
||||
# security purposes. Examples are shown below about how to increase the
|
||||
# level of access.
|
||||
|
||||
# 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 to the mib tree as well.
|
||||
#
|
||||
# For more information, read the FAQ as well as the snmpd.conf(5)
|
||||
# manual page.
|
||||
|
||||
####
|
||||
# First, map the community name "public" into a "security name"
|
||||
|
||||
# sec.name source community
|
||||
com2sec notConfigUser default public
|
||||
|
||||
####
|
||||
# Second, map the security name into a group name:
|
||||
|
||||
# groupName securityModel securityName
|
||||
group notConfigGroup v1 notConfigUser
|
||||
group notConfigGroup v2c notConfigUser
|
||||
|
||||
####
|
||||
# Third, create a view for us to let the group have rights to:
|
||||
|
||||
# Make at least snmpwalk -v 1 localhost -c public system fast again.
|
||||
# name incl/excl subtree mask(optional)
|
||||
view systemview included .1.3.6.1.2.1.1
|
||||
view systemview included .1.3.6.1.2.1.25.1.1
|
||||
|
||||
####
|
||||
# Finally, grant the group read-only access to the systemview view.
|
||||
|
||||
# group context sec.model sec.level prefix read write notif
|
||||
access notConfigGroup "" any noauth exact systemview none none
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Here is a commented out example configuration that allows less
|
||||
# restrictive access.
|
||||
|
||||
# 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.
|
||||
|
||||
## sec.name source community
|
||||
#com2sec local localhost COMMUNITY
|
||||
#com2sec mynetwork NETWORK/24 COMMUNITY
|
||||
|
||||
## group.name sec.model sec.name
|
||||
#group MyRWGroup any local
|
||||
#group MyROGroup any mynetwork
|
||||
#
|
||||
#group MyRWGroup any otherv3user
|
||||
#...
|
||||
|
||||
## incl/excl subtree mask
|
||||
#view all included .1 80
|
||||
|
||||
## -or just the mib2 tree-
|
||||
|
||||
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
|
||||
|
||||
|
||||
## context sec.model sec.level prefix read write notif
|
||||
#access MyROGroup "" any noauth 0 all none none
|
||||
#access MyRWGroup "" any noauth 0 all all all
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Sample configuration to make net-snmpd RFC 1213.
|
||||
# Unfortunately v1 and v2c don't allow any user based authentification, so
|
||||
# opening up the default config is not an option from a security point.
|
||||
#
|
||||
# WARNING: If you uncomment the following lines you allow write access to your
|
||||
# snmpd daemon from any source! To avoid this use different names for your
|
||||
# community or split out the write access to a different community and
|
||||
# restrict it to your local network.
|
||||
# Also remember to comment the syslocation and syscontact parameters later as
|
||||
# otherwise they are still read only (see FAQ for net-snmp).
|
||||
#
|
||||
|
||||
# First, map the community name "public" into a "security name"
|
||||
# sec.name source community
|
||||
#com2sec notConfigUser default public
|
||||
|
||||
# Second, map the security name into a group name:
|
||||
# groupName securityModel securityName
|
||||
#group notConfigGroup v1 notConfigUser
|
||||
#group notConfigGroup v2c notConfigUser
|
||||
|
||||
# Third, create a view for us to let the group have rights to:
|
||||
# Open up the whole tree for ro, make the RFC 1213 required ones rw.
|
||||
# name incl/excl subtree mask(optional)
|
||||
#view roview included .1
|
||||
#view rwview included system.sysContact
|
||||
#view rwview included system.sysName
|
||||
#view rwview included system.sysLocation
|
||||
#view rwview included interfaces.ifTable.ifEntry.ifAdminStatus
|
||||
#view rwview included at.atTable.atEntry.atPhysAddress
|
||||
#view rwview included at.atTable.atEntry.atNetAddress
|
||||
#view rwview included ip.ipForwarding
|
||||
#view rwview included ip.ipDefaultTTL
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteDest
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteIfIndex
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric1
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric2
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric3
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric4
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteType
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteAge
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMask
|
||||
#view rwview included ip.ipRouteTable.ipRouteEntry.ipRouteMetric5
|
||||
#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex
|
||||
#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress
|
||||
#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaNetAddress
|
||||
#view rwview included ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaType
|
||||
#view rwview included tcp.tcpConnTable.tcpConnEntry.tcpConnState
|
||||
#view rwview included egp.egpNeighTable.egpNeighEntry.egpNeighEventTrigger
|
||||
#view rwview included snmp.snmpEnableAuthenTraps
|
||||
|
||||
# Finally, grant the group read-only access to the systemview view.
|
||||
# group context sec.model sec.level prefix read write notif
|
||||
#access notConfigGroup "" any noauth exact roview rwview none
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# System contact information
|
||||
#
|
||||
|
||||
# It is also possible to set the sysContact and sysLocation system
|
||||
# variables through the snmpd.conf file:
|
||||
|
||||
syslocation Unknown (edit /etc/snmp/snmpd.conf)
|
||||
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
|
||||
|
||||
# Example output of snmpwalk:
|
||||
# % snmpwalk -v 1 localhost -c public 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
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Logging
|
||||
#
|
||||
|
||||
# We do not want annoying "Connection from UDP: " messages in syslog.
|
||||
# If the following option is commented out, snmpd will print each incoming
|
||||
# connection, which can be useful for debugging.
|
||||
|
||||
dontLogTCPWrappersConnects yes
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
###############################################################################
|
||||
# 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 (commented out by default):
|
||||
#
|
||||
|
||||
# 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 process mib tree would look something like this:
|
||||
#
|
||||
# % snmpwalk -v 1 localhost -c public .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. The name must be unique for each exec statement.
|
||||
# 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 localhost -c public .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=100000]
|
||||
#
|
||||
# PATH: mount path to the disk in question.
|
||||
# MIN: Disks with space below this value will have the Mib's errorFlag set.
|
||||
# Default value = 100000.
|
||||
|
||||
# Check the / partition and make sure it contains at least 10 megs.
|
||||
|
||||
#disk / 10000
|
||||
|
||||
# % snmpwalk -v 1 localhost -c public .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=12.0] [5MAX=12.0] [15MAX=12.0]
|
||||
#
|
||||
# 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 localhost -c public .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 localhost -c public .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/local/passtest
|
||||
|
||||
# % snmpwalk -v 1 localhost -c public .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 localhost public .1.3.6.1.4.1.2021.255.5
|
||||
# enterprises.ucdavis.255.5 = 42
|
||||
#
|
||||
# % snmpset -v 1 localhost public .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.
|
||||
|
||||
###############################################################################
|
||||
# Further Information
|
||||
#
|
||||
# See the snmpd.conf manual page, and the output of "snmpd -H".
|
|
@ -0,0 +1,6 @@
|
|||
# Example configuration file for snmptrapd
|
||||
#
|
||||
# No traps are handled by default, you must edit this file!
|
||||
#
|
||||
# authCommunity log,execute,net public
|
||||
# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold
|
|
@ -1,9 +1,11 @@
|
|||
[Unit]
|
||||
Description=Simple Network Management Protocol Daemon
|
||||
Description=Simple Network Management Protocol (SNMP) Daemon.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/snmpd -c /etc/snmpd.conf
|
||||
Type=notify
|
||||
ExecStart=/usr/sbin/snmpd -LS0-6d -f
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Simple Network Management Protocol (SNMP) Trap Daemon.
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/usr/sbin/snmptrapd -Lsd -f
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,54 @@
|
|||
###############################################################################
|
||||
# IPFire.org - An Open Source Firewall Solution #
|
||||
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
|
||||
###############################################################################
|
||||
|
||||
name = perl-TermReadKey
|
||||
version = 2.30
|
||||
release = 1
|
||||
thisapp = TermReadKey-%{version}
|
||||
|
||||
groups = Development/Libraries
|
||||
url = http://search.cpan.org/~jstowe/TermReadKey/
|
||||
license = (Copyright only) and (Artistic or GPL+)
|
||||
summary = A perl module for simple terminal control.
|
||||
|
||||
description
|
||||
Term::ReadKey is a compiled perl module dedicated to providing simple
|
||||
control over terminal driver modes (cbreak, raw, cooked, etc.)
|
||||
support for non-blocking reads, if the architecture allows, and some
|
||||
generalized handy functions for working with terminals. One of the
|
||||
main goals is to have the functions as portable as possible, so you
|
||||
can just plug in "use Term::ReadKey" on any architecture and have a
|
||||
good likelyhood of it working.
|
||||
end
|
||||
|
||||
source_dl = http://www.cpan.org/authors/id/J/JS/JSTOWE/
|
||||
|
||||
build
|
||||
requires
|
||||
perl(AutoLoader)
|
||||
perl(Carp)
|
||||
perl(Exporter)
|
||||
perl(ExtUtils::MakeMaker)
|
||||
end
|
||||
|
||||
build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{PARALLELISMFLAGS}
|
||||
end
|
||||
|
||||
make_install_targets = pure_install
|
||||
end
|
||||
|
||||
packages
|
||||
package %{name}
|
||||
requires
|
||||
perl
|
||||
end
|
||||
end
|
||||
|
||||
package %{name}-debuginfo
|
||||
template DEBUGINFO
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue