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