diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb index 58841ef319..0606e34407 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +++ b/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 \ @@ -35,6 +36,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 +53,64 @@ 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} \ --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" + + |