diff options
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 | 67 |
1 files changed, 35 insertions, 32 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 eff014a4cb..1215344d97 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 @@ -14,7 +14,7 @@ inherit scons dos2unix siteinfo python3native systemd useradd PV = "4.4.7" #v4.4.7 SRCREV = "abb6b9c2bf675e9e2aeaecba05f0f8359d99e203" -SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4 \ +SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \ 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 \ @@ -43,7 +43,6 @@ 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' @@ -83,46 +82,50 @@ EXTRA_OESCONS = "PREFIX=${prefix} \ --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} install-core || \ + ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} install-core || die "scons build execution failed." } scons_do_install() { - # 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} + # 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} + 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} + + # Create /var/log/mongodb in runtime. + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf + fi + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} + fi } CONFFILES:${PN} = "${sysconfdir}/mongod.conf" SYSTEMD_SERVICE:${PN} = "mongod.service" + +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |