From 11de19231cd990e2700f20635f3413f8d2be3016 Mon Sep 17 00:00:00 2001 From: Filipp Andronov Date: Sat, 16 May 2015 21:43:04 +0700 Subject: testing/mongodb: new aport Things to be complete: 1. Build is only for x86_64, because I have to made a few hacks in code. Most critical one is __ELF_NATIVE_CLASS 2. No tc-malloc. It doesnt build, so system allocator instead. Im working on gpreftools package... 3. No heap usage statistics: always returns 0. It is broken in mongodb for 64bit architecture and also musl mallocinfo is not compatible with glibc. So I just comment out heap reporting code, see comments in APKBUILD 4. Use more system libs, yaml & boost are from the top of my mind. Boost make compilation fails, but should be easy to fix 5. Enable mongodb tests during build. Im just not sure how that should be done in Alpine, i.e _where_ in build lifecycle tests should run --- testing/mongodb/mongodb.initd | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 testing/mongodb/mongodb.initd (limited to 'testing/mongodb/mongodb.initd') diff --git a/testing/mongodb/mongodb.initd b/testing/mongodb/mongodb.initd new file mode 100644 index 0000000000..5b7b77eebf --- /dev/null +++ b/testing/mongodb/mongodb.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v 1.5 2013/01/18 11:19:27 ultrabug Exp $ + +depend() { + need net +} + +start() { + checkpath -d -m 0750 -o "${MONGODB_USER}":mongodb "${MONGODB_RUN}" + + # Listen to MONGODB_IP if configured + [ -z "${MONGODB_IP}" ] || MONGODB_OPTIONS="--bind_ip ${MONGODB_IP} ${MONGODB_OPTIONS}" + + # Baselayout-1 user should use --chuid instead of --user + local USEROPT="--user" + if [ ! -f /etc/init.d/sysfs ]; then + USEROPT="--chuid" + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --background --start --make-pidfile \ + --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid \ + ${USEROPT} ${MONGODB_USER:-mongodb} \ + --exec ${MONGODB_EXEC:-/usr/bin/mongod} \ + -- \ + --port ${MONGODB_PORT:-27017} \ + --dbpath ${MONGODB_DATA:-/var/lib/mongodb} \ + --unixSocketPrefix ${MONGODB_RUN:-/var/run/mongodb} \ + --logappend --logpath /var/log/mongodb/${SVCNAME}.log \ + ${MONGODB_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid + eend $? +} -- cgit v1.2.3