diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb')
-rw-r--r-- | meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | 65 |
1 files changed, 54 insertions, 11 deletions
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 58841ef31..a15349848 100644 --- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb @@ -9,12 +9,13 @@ DEPENDS = "openssl libpcap zlib boost curl python3 \ python3-psutil-native python3-regex-native \ " -inherit scons dos2unix siteinfo python3native +inherit scons dos2unix siteinfo python3native systemd useradd -PV = "4.2.2" -#v4.2.2 -SRCREV = "a0bbbff6ada159e19298d37946ac8dc4b497eadf" -SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \ +PV = "4.4.1" +#v4.4.1 +SRCREV = "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1" +SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \ + file://0001-kms-message-bump-libmongocrypto-to-v1.0.4.patch \ file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ file://0001-Use-long-long-instead-of-int64_t.patch \ file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \ @@ -24,6 +25,8 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \ file://0001-Support-deprecated-resolver-functions.patch \ file://0003-Fix-unknown-prefix-env.patch \ file://1296.patch \ + file://0001-Fix-compilation-with-fno-common.patch \ + file://0001-stacktrace-Define-ARCH_BITS-for-x86.patch \ " SRC_URI_append_libc-musl ="\ file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ @@ -35,6 +38,7 @@ SRC_URI_append_toolchain-clang = "\ file://0001-asio-Dont-use-experimental-with-clang.patch \ " + S = "${WORKDIR}/git" COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' @@ -51,26 +55,65 @@ PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," PACKAGECONFIG[shell] = ",--js-engine=none,," PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre," -EXTRA_OESCONS = "--prefix=${D}${prefix} \ +EXTRA_OESCONS = "PREFIX=${prefix} \ + DESTDIR=${D} \ LIBPATH=${STAGING_LIBDIR} \ LINKFLAGS='${LDFLAGS}' \ CXXFLAGS='${CXXFLAGS}' \ TARGET_ARCH=${TARGET_ARCH} \ + MONGO_VERSION=${PV} \ + OBJCOPY=${OBJCOPY} \ --ssl \ --disable-warnings-as-errors \ --use-system-zlib \ --nostrip \ --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ - ${PACKAGECONFIG_CONFARGS} \ - core" + --separate-debug \ + ${PACKAGECONFIG_CONFARGS}" + + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/${BPN} --shell /bin/false --user-group ${BPN}" + scons_do_compile() { - ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ + ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core || \ die "scons build execution failed." } scons_do_install() { - ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ - die "scons install execution failed." + # install binaries + install -d ${D}${bindir} + for i in mongod mongos mongo + do + if [ -f ${B}/build/opt/mongo/${i} ] + then + install -m 0755 ${B}/build/opt/mongo/${i} ${D}${bindir}/${i} + else + bbnote "${i} does not exist" + fi + done + + # install config + install -d ${D}${sysconfdir} + install -m 0644 ${S}/debian/mongod.conf ${D}${sysconfdir}/ + + # install systemd service + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/debian/mongod.service ${D}${systemd_system_unitdir} + + # install mongo data folder + install -m 755 -d ${D}${localstatedir}/lib/${BPN} + chown ${PN}:${PN} ${D}${localstatedir}/lib/${BPN} + + # Log files + install -m 755 -d ${D}${localstatedir}/log/${BPN} + chown ${PN}:${PN} ${D}${localstatedir}/log/${BPN} } + +CONFFILES_${PN} = "${sysconfdir}/mongod.conf" + +SYSTEMD_SERVICE_${PN} = "mongod.service" + + |