diff options
Diffstat (limited to 'system/mongodb')
-rw-r--r-- | system/mongodb/README | 7 | ||||
-rw-r--r-- | system/mongodb/doinst.sh | 2 | ||||
-rw-r--r-- | system/mongodb/files/mongodb.conf | 34 | ||||
-rw-r--r-- | system/mongodb/files/rc.mongodb | 11 | ||||
-rw-r--r-- | system/mongodb/mongodb.SlackBuild | 87 | ||||
-rw-r--r-- | system/mongodb/mongodb.info | 14 | ||||
-rw-r--r-- | system/mongodb/patches/01_mongodb-4.4.1-boost.patch | 23 | ||||
-rw-r--r-- | system/mongodb/patches/02_mongodb-4.4.1-gcc11.patch | 12 | ||||
-rw-r--r-- | system/mongodb/patches/03_mongodb-5.0.2-fix-scons.patch | 32 | ||||
-rw-r--r-- | system/mongodb/patches/04_mongodb-5.0.2-no-compass.patch | 12 | ||||
-rw-r--r-- | system/mongodb/patches/05_mongodb-5.0.2-skip-no-exceptions.patch | 13 | ||||
-rw-r--r-- | system/mongodb/patches/06_mongodb-5.0.2-skip-reqs-check.patch | 24 |
12 files changed, 37 insertions, 234 deletions
diff --git a/system/mongodb/README b/system/mongodb/README index f2e41d4aff..8898ea3511 100644 --- a/system/mongodb/README +++ b/system/mongodb/README @@ -13,9 +13,4 @@ if [ -x /etc/rc.d/rc.mongodb ]; then /etc/rc.d/rc.mongodb start fi -NOTE: mongodb 5.0 requires use of the AVX instruction set: check if -your cpu supports it with - - grep avx /proc/cpuinfo | uniq - -(no output means it doesn't) +NOTE: This script repackage binary source diff --git a/system/mongodb/doinst.sh b/system/mongodb/doinst.sh index 8721b3d5ee..a23b6a9f1f 100644 --- a/system/mongodb/doinst.sh +++ b/system/mongodb/doinst.sh @@ -23,6 +23,6 @@ preserve_perms() { } preserve_perms etc/rc.d/rc.mongodb.new -config etc/mongodb.conf.new +config etc/mongod.conf.new config etc/mongos.conf.new config etc/logrotate.d/mongodb.new diff --git a/system/mongodb/files/mongodb.conf b/system/mongodb/files/mongodb.conf deleted file mode 100644 index 83b4cc0589..0000000000 --- a/system/mongodb/files/mongodb.conf +++ /dev/null @@ -1,34 +0,0 @@ -# !! IMPORTANT !! -# -# This file uses the YAML format as described in the documentation: -# http://docs.mongodb.org/manual/reference/configuration-options/ - -storage: - dbPath: "/var/lib/mongodb" - #engine: wiredTiger - -systemLog: - destination: file - path: "/var/log/mongodb/mongodb.log" - quiet: true - logAppend: true - -net: - port: 27017 - bindIp: 127.0.0.1 - #ssl: - # mode: disabled - -#security: - #keyFile: - #clusterAuthMode: - -#replication: - #replSetName: - -# Specifies one of the MongoDB parameters described here: -# http://docs.mongodb.org/manual/reference/parameters/ -# -# You can specify multiple setParameter fields such as: -# setParameter: {enableTestCommands: 1} -#setParameter: diff --git a/system/mongodb/files/rc.mongodb b/system/mongodb/files/rc.mongodb index 47ca19be76..f0b178c3cf 100644 --- a/system/mongodb/files/rc.mongodb +++ b/system/mongodb/files/rc.mongodb @@ -7,7 +7,7 @@ # PID=/var/state/mongodb.pid -LOG=/var/log/mongodb +LOG=/var/log/mongodb/mongodb.log DBPATH=/var/lib/mongodb USER=mongo GROUP=mongo @@ -15,17 +15,16 @@ SHELL=${SHELL:-/bin/bash} mongo_start() { touch $LOG - chown $GROUP.$USER $LOG + chown $GROUP:$USER $LOG touch $PID - chown $GROUP.$USER $PID + chown $GROUP:$USER $PID su -l $USER -s $SHELL -c "/usr/bin/mongod \ --dbpath=$DBPATH \ --fork \ --pidfilepath=$PID \ --logappend \ - --logpath=$LOG \ - --nohttpinterface \ + --logpath=$LOG " && { echo "MongoDB server started successfully." } || { @@ -41,7 +40,7 @@ mongo_stop() { echo "Failed to stop MongoDB server" > /dev/stderr exit 1 } - # rm $PID + rm -f $PID } mongo_restart() { diff --git a/system/mongodb/mongodb.SlackBuild b/system/mongodb/mongodb.SlackBuild index e2d613fe69..d20573747c 100644 --- a/system/mongodb/mongodb.SlackBuild +++ b/system/mongodb/mongodb.SlackBuild @@ -3,6 +3,7 @@ # Slackware build script for MongoDB # Copyright 2015 Miguel De Anda <miguel@thedeanda.com> +# Copyright 2023-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,11 +27,10 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM="mongodb" -VERSION=${VERSION:-5.0.4} +VERSION=${VERSION:-7.0.14} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -MAKEJOBS=${MAKEJOBS:-1} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -40,9 +40,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -55,9 +52,6 @@ OUTPUT=${OUTPUT:-/tmp} MONGO_USER=${MONGO_USER:-285} MONGO_GROUP=${MONGO_GROUP:-285} -SRC_FILE=$PRGNAM-src-r$VERSION.tar.gz -SRC_FLDR=$PRGNAM-src-r$VERSION - if [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" @@ -68,10 +62,8 @@ fi set -e -# Bail if user or group isn't valid on your system -if ! getent passwd mongo 1>/dev/null 2>/dev/null; then - -cat << EOF +bailout() { + cat << EOF You must have a mongo user to run this script @@ -79,82 +71,47 @@ cat << EOF # useradd -u $MONGO_USER -d /var/lib/$PRGNAM -s /bin/false -g mongo mongo EOF + exit 1 +} - exit -elif ! getent group mongo 1>/dev/null 2>/dev/null; then - -cat << EOF - - You must have a mongo group to run this script - # groupadd -g $MONGO_GROUP mongo - -EOF - exit -fi +# Bail if user or group isn't valid on your system +getent passwd mongo &>/dev/null || bailout +getent group mongo &>/dev/null || bailout -rm -fr $TMP/$SRC_FLDR $PKG +rm -fr $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP -tar xvf $CWD/$SRC_FILE -cd $SRC_FLDR -# remove bundled libs -rm -fR src/third_party/{boost,pcre-*,snappy-*,yaml-cpp,zlib-*} -# remove compass -rm -fR src/mongo/installer/compass -chown -R root.root . +cd $PKG +ar p $CWD/mongodb-org-server_${VERSION}_amd64.deb data.tar.xz | tar xJv +ar p $CWD/mongodb-org-mongos_${VERSION}_amd64.deb data.tar.xz | tar xJv +chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# thanks gentoo, also for these patches -for i in $CWD/patches/* ; do patch -p1 < $i ; done - -scons_opts=( - --disable-warnings-as-errors - --use-system-boost - --use-system-pcre - --use-system-snappy - --use-system-yaml - --use-system-zlib - --use-system-zstd - --use-sasl-client - --ssl -) - -if [ "$ARCH" = "x86_64" ]; then - PREFIX=${PKG}/usr CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" LDFLAGS="-L /lib$LIBDIRSUFFIX -L/usr/lib$LIBDIRSUFFIX" \ - ./buildscripts/scons.py "${scons_opts[@]}" --jobs="$MAKEJOBS" install-core -else - PREFIX=${PKG}/usr CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" LDFLAGS="-L /lib$LIBDIRSUFFIX -L/usr/lib$LIBDIRSUFFIX" \ - ./buildscripts/scons.py "${scons_opts[@]}" --jobs="$MAKEJOBS" --wiredtiger=off install-core -fi - -# manual install -( cd build/install/bin - for i in * ; do install -D -m 0755 $i $PKG/usr/bin/$i ; done ) -( cd debian - for i in *.1 ; do install -D -m 0644 $i $PKG/usr/man/man1/$i ; done ) +# We don't need systemd files +rm -rf lib find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +mv usr/share/man usr/ mkdir -p ${PKG}/usr/doc/${PRGNAM}-${VERSION} -cp distsrc/* ${PKG}/usr/doc/${PRGNAM}-${VERSION} +mv usr/share/doc/mongodb-org-* ${PKG}/usr/doc/${PRGNAM}-${VERSION} +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +rm -rf usr/share/doc mkdir -p $PKG/etc/{logrotate,rc}.d -cat $CWD/files/mongodb.conf > $PKG/etc/mongodb.conf.new cat $CWD/files/mongos.conf > $PKG/etc/mongos.conf.new cat $CWD/files/mongodb.logrotate > $PKG/etc/logrotate.d/mongodb.new cat $CWD/files/rc.mongodb > $PKG/etc/rc.d/rc.mongodb.new +mv etc/mongod.conf etc/mongod.conf.new mkdir -p $PKG/var/{lib,log}/mongodb chmod 750 $PKG/var/{lib,log}/mongodb -chown mongo.mongo $PKG/var/{lib,log}/mongodb +chown mongo:mongo $PKG/var/{lib,log}/mongodb mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/system/mongodb/mongodb.info b/system/mongodb/mongodb.info index 0be3f143bc..6c96e638c1 100644 --- a/system/mongodb/mongodb.info +++ b/system/mongodb/mongodb.info @@ -1,10 +1,12 @@ PRGNAM="mongodb" -VERSION="5.0.4" +VERSION="7.0.14" HOMEPAGE="https://www.mongodb.org/" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="https://fastdl.mongodb.org/src/mongodb-src-r5.0.4.tar.gz" -MD5SUM_x86_64="366a864aaf21cc391e910f46a3051461" -REQUIRES="cheetah3 psutil snappy snowballstemmer yaml-cpp" -MAINTAINER="Miguel De Anda" -EMAIL="miguel@thedeanda.com" +DOWNLOAD_x86_64="https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/7.0/multiverse/binary-amd64/mongodb-org-server_7.0.14_amd64.deb \ + https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/7.0/multiverse/binary-amd64/mongodb-org-mongos_7.0.14_amd64.deb" +MD5SUM_x86_64="640aa94af5fa8d4111d5b29e944140d2 \ + a39d6985e5bb3dd08b4a93737775f463" +REQUIRES="" +MAINTAINER="Willy Sudiarto Raharjo" +EMAIL="willysr@slackbuilds.org" diff --git a/system/mongodb/patches/01_mongodb-4.4.1-boost.patch b/system/mongodb/patches/01_mongodb-4.4.1-boost.patch deleted file mode 100644 index 009ca6826a..0000000000 --- a/system/mongodb/patches/01_mongodb-4.4.1-boost.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/SConstruct b/SConstruct -index 89c044ab..0484e475 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -3511,17 +3511,11 @@ def doConfigure(myenv): - "BOOST_LOG_NO_SHORTHAND_NAMES", - "BOOST_LOG_USE_NATIVE_SYSLOG", - "BOOST_LOG_WITHOUT_THREAD_ATTR", -+ "BOOST_LOG_DYN_LINK", - "ABSL_FORCE_ALIGNED_ACCESS", - ] - ) - -- if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk': -- conf.env.AppendUnique( -- CPPDEFINES=[ -- "BOOST_LOG_DYN_LINK", -- ] -- ) -- - if use_system_version_of_library("boost"): - if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ): - myenv.ConfError("can't find boost headers") diff --git a/system/mongodb/patches/02_mongodb-4.4.1-gcc11.patch b/system/mongodb/patches/02_mongodb-4.4.1-gcc11.patch deleted file mode 100644 index a6ff02dcf6..0000000000 --- a/system/mongodb/patches/02_mongodb-4.4.1-gcc11.patch +++ /dev/null @@ -1,12 +0,0 @@ -https://bugs.gentoo.org/768339 - ---- a/src/mongo/db/exec/plan_stats.h -+++ b/src/mongo/db/exec/plan_stats.h -@@ -33,6 +33,7 @@ - #include <cstdlib> - #include <string> - #include <vector> -+#include <optional> - - #include "mongo/db/index/multikey_paths.h" - diff --git a/system/mongodb/patches/03_mongodb-5.0.2-fix-scons.patch b/system/mongodb/patches/03_mongodb-5.0.2-fix-scons.patch deleted file mode 100644 index 2d1a2f9312..0000000000 --- a/system/mongodb/patches/03_mongodb-5.0.2-fix-scons.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/SConstruct b/SConstruct -index 115de78a..613110b7 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -2366,7 +2366,6 @@ if env.TargetOSIs('posix'): - - # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. - env.Append( CCFLAGS=["-fasynchronous-unwind-tables", -- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", - "-Wall", - "-Wsign-compare", - "-Wno-unknown-pragmas", -@@ -2422,6 +2421,8 @@ if env.TargetOSIs('posix'): - - # env.Append( " -Wconversion" ) TODO: this doesn't really work yet - env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) -+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) -+ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) - - # On OS X, clang doesn't want the pthread flag at link time, or it - # issues warnings which make it impossible for us to declare link -@@ -2473,8 +2474,8 @@ if env.TargetOSIs('posix'): - ], - ) - -- #make scons colorgcc friendly -- for key in ('HOME', 'TERM'): -+ #make scons colorgcc, distcc, ccache friendly -+ for key in ('HOME', 'PATH', 'TERM'): - try: - env['ENV'][key] = os.environ[key] - except KeyError: diff --git a/system/mongodb/patches/04_mongodb-5.0.2-no-compass.patch b/system/mongodb/patches/04_mongodb-5.0.2-no-compass.patch deleted file mode 100644 index 7772515772..0000000000 --- a/system/mongodb/patches/04_mongodb-5.0.2-no-compass.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript -index 5bd89fe9..489e70ac 100644 ---- a/src/mongo/installer/SConscript -+++ b/src/mongo/installer/SConscript -@@ -7,7 +7,6 @@ env = env.Clone() - - env.SConscript( - dirs=[ -- 'compass', - 'msi', - ], - exports=[ diff --git a/system/mongodb/patches/05_mongodb-5.0.2-skip-no-exceptions.patch b/system/mongodb/patches/05_mongodb-5.0.2-skip-no-exceptions.patch deleted file mode 100644 index ae69befcea..0000000000 --- a/system/mongodb/patches/05_mongodb-5.0.2-skip-no-exceptions.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SConstruct b/SConstruct -index 613110b7..4987e24e 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -2958,7 +2958,7 @@ def doConfigure(myenv): - - # This warning was added in clang-5 and incorrectly flags our implementation of - # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804 -- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") -+ #AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") - - # Enable sized deallocation support. - AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation') diff --git a/system/mongodb/patches/06_mongodb-5.0.2-skip-reqs-check.patch b/system/mongodb/patches/06_mongodb-5.0.2-skip-reqs-check.patch deleted file mode 100644 index 823d481c20..0000000000 --- a/system/mongodb/patches/06_mongodb-5.0.2-skip-reqs-check.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/buildscripts/scons.py b/buildscripts/scons.py -index 534fca32..c38f64df 100755 ---- a/buildscripts/scons.py -+++ b/buildscripts/scons.py -@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons') - sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path - - # pylint: disable=C0413 --from mongo.pip_requirements import verify_requirements, MissingRequirements -+#from mongo.pip_requirements import verify_requirements, MissingRequirements - --try: -- verify_requirements('etc/pip/compile-requirements.txt') --except MissingRequirements as ex: -- print(ex) -- sys.exit(1) -+#try: -+# verify_requirements('etc/pip/compile-requirements.txt') -+#except MissingRequirements as ex: -+# print(ex) -+# sys.exit(1) - - try: - import SCons.Script |