diff options
author | Changqing Li <changqing.li@windriver.com> | 2018-08-09 13:16:46 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-08-11 20:16:53 -0700 |
commit | 03bd2580219ddfc86e33af455a8c90e9c0e1dfe2 (patch) | |
tree | 301958ff4d4dc444dd0d3c3d96b2e5546cf7106d /meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | |
parent | 576515a07ce788f5f5c380932cb01ff84776f229 (diff) | |
download | meta-openembedded-03bd2580219ddfc86e33af455a8c90e9c0e1dfe2.tar.gz |
net-snmp: upgrade 5.7.3 -> 5.8
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb')
-rw-r--r-- | meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 248 |
1 files changed, 0 insertions, 248 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb deleted file mode 100644 index 5c827bb86..000000000 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb +++ /dev/null | |||
@@ -1,248 +0,0 @@ | |||
1 | SUMMARY = "Various tools relating to the Simple Network Management Protocol" | ||
2 | HOMEPAGE = "http://www.net-snmp.org/" | ||
3 | SECTION = "net" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5a622ea24634e" | ||
7 | |||
8 | DEPENDS = "openssl libnl pciutils" | ||
9 | |||
10 | SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \ | ||
11 | file://init \ | ||
12 | file://snmpd.conf \ | ||
13 | file://snmptrapd.conf \ | ||
14 | file://systemd-support.patch \ | ||
15 | file://snmpd.service \ | ||
16 | file://snmptrapd.service \ | ||
17 | file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \ | ||
18 | file://fix-libtool-finish.patch \ | ||
19 | file://net-snmp-testing-add-the-output-format-for-ptest.patch \ | ||
20 | file://run-ptest \ | ||
21 | file://dont-return-incompletely-parsed-varbinds.patch \ | ||
22 | file://0001-config_os_headers-Error-Fix.patch \ | ||
23 | file://0001-config_os_libs2-Error-Fix.patch \ | ||
24 | file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \ | ||
25 | file://net-snmp-agentx-crash.patch \ | ||
26 | file://0001-get_pid_from_inode-Include-limit.h.patch \ | ||
27 | file://0001-BUG-a2584-Fix-snmptrap-to-use-clientaddr-from-snmp.c.patch \ | ||
28 | file://0001-snmplib-UDPIPv6-transport-Add-a-missing-return-state.patch \ | ||
29 | file://0001-configure-fix-check-for-enable-perl-cc-checks.patch \ | ||
30 | file://0002-configure-fix-a-cc-check-issue.patch \ | ||
31 | file://0003-CHANGES-BUG-2712-Fix-Perl-module-compilation.patch \ | ||
32 | file://0004-configure-fix-incorrect-variable.patch \ | ||
33 | file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \ | ||
34 | file://net-snmp-fix-for-disable-des.patch \ | ||
35 | file://0001-Remove-U64-typedef.patch \ | ||
36 | file://fix-openssl-build-errors.patch \ | ||
37 | " | ||
38 | SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee" | ||
39 | SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e" | ||
40 | |||
41 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" | ||
42 | UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" | ||
43 | |||
44 | inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative | ||
45 | |||
46 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" | ||
47 | |||
48 | PARALLEL_MAKE = "" | ||
49 | CCACHE = "" | ||
50 | |||
51 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
52 | |||
53 | PACKAGECONFIG ??= "" | ||
54 | PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils" | ||
55 | PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl" | ||
56 | |||
57 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
58 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,," | ||
59 | |||
60 | PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable-embedded-perl --with-perl-modules=no,\ | ||
61 | perl, perl perl-lib" | ||
62 | |||
63 | EXTRA_OECONF = "--enable-shared \ | ||
64 | --disable-manuals \ | ||
65 | --with-defaults \ | ||
66 | --with-install-prefix=${D} \ | ||
67 | --with-persistent-directory=${localstatedir}/lib/net-snmp \ | ||
68 | ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \ | ||
69 | " | ||
70 | |||
71 | # net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp | ||
72 | EXTRA_OECONF += "--with-mib-modules=smux" | ||
73 | |||
74 | CACHED_CONFIGUREVARS = " \ | ||
75 | ac_cv_header_valgrind_valgrind_h=no \ | ||
76 | ac_cv_header_valgrind_memcheck_h=no \ | ||
77 | ac_cv_ETC_MNTTAB=/etc/mtab \ | ||
78 | lt_cv_shlibpath_overrides_runpath=yes \ | ||
79 | " | ||
80 | export PERLPROG="${bindir}/env perl" | ||
81 | PERLPROG_append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}" | ||
82 | |||
83 | HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}" | ||
84 | |||
85 | do_configure_prepend() { | ||
86 | sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \ | ||
87 | "${S}"/configure \ | ||
88 | "${S}"/configure.d/config_os_libs2 | ||
89 | |||
90 | if [ "${HAS_PERL}" = "1" ]; then | ||
91 | # this may need to be changed when package perl has any change. | ||
92 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config.pm ${WORKDIR}/ | ||
93 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl/*/Config_heavy.pl ${WORKDIR}/ | ||
94 | sed -e "s@libpth => '/usr/lib.*@libpth => '${STAGING_DIR_TARGET}/${libdir} ${STAGING_DIR_TARGET}/${base_libdir}',@g" \ | ||
95 | -e "s@privlibexp => '/usr@privlibexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
96 | -e "s@scriptdir => '/usr@scriptdir => '${STAGING_DIR_TARGET}/usr@g" \ | ||
97 | -e "s@sitearchexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
98 | -e "s@sitelibexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
99 | -e "s@vendorarchexp => '/usr@vendorarchexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
100 | -e "s@vendorlibexp => '/usr@vendorlibexp => '${STAGING_DIR_TARGET}/usr@g" \ | ||
101 | -i ${WORKDIR}/Config.pm | ||
102 | fi | ||
103 | |||
104 | } | ||
105 | |||
106 | do_configure_append() { | ||
107 | if [ "${HAS_PERL}" = "1" ]; then | ||
108 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=${STAGING_DIR_TARGET}\$\{includedir\}@g" \ | ||
109 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L${STAGING_DIR_TARGET}\$\{libdir\}@g" \ | ||
110 | -i ${B}/net-snmp-config | ||
111 | fi | ||
112 | } | ||
113 | |||
114 | do_install_append() { | ||
115 | install -d ${D}${sysconfdir}/snmp | ||
116 | install -d ${D}${sysconfdir}/init.d | ||
117 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd | ||
118 | install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ | ||
119 | install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ | ||
120 | install -d ${D}${systemd_unitdir}/system | ||
121 | install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system | ||
122 | install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system | ||
123 | sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ | ||
124 | -i ${D}${bindir}/net-snmp-create-v3-user | ||
125 | sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ | ||
126 | -e "s@\([^ ]*-fdebug-prefix-map=[^ ]*\)\1*@@g" \ | ||
127 | -e "s@\([^ ]*--sysroot=[^ ]*\)\1*@@g" \ | ||
128 | -e "s@\([^ ]*--with-libtool-sysroot=[^ ]*\)\1*@@g" \ | ||
129 | -e "s@\([^ ]*--with-install-prefix=[^ ]*\)\1*@@g" \ | ||
130 | -i ${D}${bindir}/net-snmp-config | ||
131 | |||
132 | if [ "${HAS_PERL}" = "1" ]; then | ||
133 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \ | ||
134 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \ | ||
135 | -i ${D}${bindir}/net-snmp-config | ||
136 | fi | ||
137 | } | ||
138 | |||
139 | do_install_ptest() { | ||
140 | install -d ${D}${PTEST_PATH} | ||
141 | for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \ | ||
142 | ${B}/net-snmp-config ${S}/testing; do | ||
143 | if [ -e "$i" ]; then | ||
144 | cp -R --no-dereference --preserve=mode,links -v "$i" ${D}${PTEST_PATH} | ||
145 | fi | ||
146 | done | ||
147 | echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version | ||
148 | |||
149 | rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build" | ||
150 | for i in $rmdlist; do | ||
151 | if [ -d "$i" ]; then | ||
152 | rm -rf "$i" | ||
153 | fi | ||
154 | done | ||
155 | } | ||
156 | |||
157 | SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess" | ||
158 | SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" | ||
159 | |||
160 | net_snmp_sysroot_preprocess () { | ||
161 | if [ -e ${D}${bindir}/net-snmp-config ]; then | ||
162 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
163 | install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
164 | sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \ | ||
165 | -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}${prefix}@g" \ | ||
166 | -e "s@^exec_prefix=.*@exec_prefix=${STAGING_EXECPREFIXDIR}@g" \ | ||
167 | -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ | ||
168 | -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ | ||
169 | -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \ | ||
170 | -e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \ | ||
171 | -e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ | ||
172 | -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \ | ||
173 | -e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \ | ||
174 | -e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \ | ||
175 | -e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \ | ||
176 | -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config | ||
177 | fi | ||
178 | } | ||
179 | |||
180 | PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" | ||
181 | |||
182 | # perl module | ||
183 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl-modules', '', d)}" | ||
184 | |||
185 | ALLOW_EMPTY_${PN} = "1" | ||
186 | ALLOW_EMPTY_${PN}-server = "1" | ||
187 | |||
188 | FILES_${PN}-perl-modules = "${libdir}/perl/*" | ||
189 | |||
190 | FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" | ||
191 | FILES_${PN}-mibs = "${datadir}/snmp/mibs" | ||
192 | FILES_${PN}-server-snmpd = "${sbindir}/snmpd \ | ||
193 | ${sysconfdir}/snmp/snmpd.conf \ | ||
194 | ${sysconfdir}/init.d \ | ||
195 | ${systemd_unitdir}/system/snmpd.service \ | ||
196 | " | ||
197 | |||
198 | FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \ | ||
199 | ${sysconfdir}/snmp/snmptrapd.conf \ | ||
200 | ${systemd_unitdir}/system/snmptrapd.service \ | ||
201 | " | ||
202 | |||
203 | FILES_${PN} = "" | ||
204 | FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/" | ||
205 | FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" | ||
206 | FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update" | ||
207 | |||
208 | CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf" | ||
209 | CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf" | ||
210 | |||
211 | INITSCRIPT_PACKAGES = "${PN}-server-snmpd" | ||
212 | INITSCRIPT_NAME_${PN}-server-snmpd = "snmpd" | ||
213 | INITSCRIPT_PARAMS_${PN}-server-snmpd = "start 90 2 3 4 5 . stop 60 0 1 6 ." | ||
214 | |||
215 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}" | ||
216 | |||
217 | SYSTEMD_PACKAGES = "${PN}-server-snmpd \ | ||
218 | ${PN}-server-snmptrapd" | ||
219 | |||
220 | SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service" | ||
221 | SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service" | ||
222 | |||
223 | RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}" | ||
224 | RDEPENDS_${PN} += "net-snmp-client" | ||
225 | RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs" | ||
226 | RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd" | ||
227 | RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" | ||
228 | RDEPENDS_${PN}-client += "net-snmp-mibs net-snmp-libs" | ||
229 | RDEPENDS_${PN}-libs += "libpci" | ||
230 | RDEPENDS_${PN}-ptest += "perl \ | ||
231 | perl-module-test \ | ||
232 | perl-module-file-basename \ | ||
233 | perl-module-getopt-long \ | ||
234 | perl-module-file-temp \ | ||
235 | perl-module-data-dumper \ | ||
236 | " | ||
237 | RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" | ||
238 | RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" | ||
239 | |||
240 | RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
241 | RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
242 | RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
243 | |||
244 | RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
245 | RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
246 | RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
247 | |||
248 | LEAD_SONAME = "libnetsnmp.so" | ||