Import rpm: ad0b723430751f37f7127a80f91de361b560fecf
This commit is contained in:
commit
84f0b6262a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
SOURCES/r3.6.8.tar.gz
|
45
32bit-support.patch
Normal file
45
32bit-support.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h
|
||||||
|
index 38dae82..ee9b957 100644
|
||||||
|
--- a/src/mongo/bson/bsonobjbuilder.h
|
||||||
|
+++ b/src/mongo/bson/bsonobjbuilder.h
|
||||||
|
@@ -341,7 +341,7 @@ public:
|
||||||
|
return append(fieldName, d);
|
||||||
|
}
|
||||||
|
|
||||||
|
- BSONObjBuilder& appendNumber(StringData fieldName, size_t n) {
|
||||||
|
+ BSONObjBuilder& appendNumber(StringData fieldName, uint64_t n) {
|
||||||
|
static const size_t maxInt = (1 << 30);
|
||||||
|
if (n < maxInt)
|
||||||
|
append(fieldName, static_cast<int>(n));
|
||||||
|
@@ -350,6 +350,18 @@ public:
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Implement appendNumber for uint64_t and size_t on 32-bit platforms where
|
||||||
|
+ * these types differs. Typically for
|
||||||
|
+ * 32b: size_t ~ unsigned int; uint64_t ~ unsigned long long;
|
||||||
|
+ * 64b: size_t ~ unsigned long; uint64_t ~ unsigned long;
|
||||||
|
+ */
|
||||||
|
+ inline BSONObjBuilder& appendNumber(
|
||||||
|
+ StringData fieldName,
|
||||||
|
+ std::conditional<!std::is_same<uint64_t, size_t>::value, size_t, unsigned int>::type n) {
|
||||||
|
+ return appendNumber(fieldName, static_cast<uint64_t>(n));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
BSONObjBuilder& appendNumber(StringData fieldName, Decimal128 decNumber) {
|
||||||
|
return append(fieldName, decNumber);
|
||||||
|
}
|
||||||
|
diff --git a/src/mongo/platform/pause.h b/src/mongo/platform/pause.h
|
||||||
|
index 46df146..5003de5 100644
|
||||||
|
--- a/src/mongo/platform/pause.h
|
||||||
|
+++ b/src/mongo/platform/pause.h
|
||||||
|
@@ -55,7 +55,7 @@
|
||||||
|
/* ori 0,0,0 is the PPC64 noop instruction */
|
||||||
|
#define MONGO_YIELD_CORE_FOR_SMT() __asm__ volatile("ori 0,0,0" ::: "memory")
|
||||||
|
|
||||||
|
-#elif defined(__aarch64__)
|
||||||
|
+#elif defined(__aarch64__) || defined(__arm__)
|
||||||
|
|
||||||
|
#define MONGO_YIELD_CORE_FOR_SMT() __asm__ volatile("yield" ::: "memory")
|
||||||
|
|
57
README
Normal file
57
README
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
This directory contains a test suite for the mongoDB daemon. To run the
|
||||||
|
core JavaScripts tests, execute "./resmoke.py --suites core" in this
|
||||||
|
directory.
|
||||||
|
|
||||||
|
For use in Red Hat distributions, you should run the script as user
|
||||||
|
mongodb, who is created with nologin shell however, so the best bet is
|
||||||
|
something like:
|
||||||
|
$ su -
|
||||||
|
# cd /usr/share/mongodb-test
|
||||||
|
# su -s /bin/bash mongodb -c "./resmoke.py --suites core"
|
||||||
|
|
||||||
|
This will use the installed mongodb executables, but will run a private
|
||||||
|
copy of the server process (using data files within
|
||||||
|
/usr/share/mongodb-test/var/), so you need not start the mongod service
|
||||||
|
beforehand.
|
||||||
|
|
||||||
|
To clean up afterwards, remove the created "var/*" subdirectories, eg
|
||||||
|
# su -s /bin/bash - mongodb -c "rm -rf /usr/share/mongodb-test/var/*"
|
||||||
|
|
||||||
|
If one or more tests fail on your system, please read the following
|
||||||
|
manual section for instructions on how to report the problem:
|
||||||
|
|
||||||
|
http://www.mongodb.org/about/contributors/tutorial/submit-bug-reports/
|
||||||
|
|
||||||
|
MongoDB offers several test suites. To get list of provided test suites
|
||||||
|
run "./resmoke.py -l".
|
||||||
|
|
||||||
|
If you want to run a specific test, simply add path to JavaSctipt file
|
||||||
|
from /usr/share/mongodb-test/jstests/ you want to run to the option to
|
||||||
|
resmoke.py. It is also possible to specify more files. For example to
|
||||||
|
run jstests/disk/*.js files execute "./resmoke.py jstests/disk/*.js"
|
||||||
|
|
||||||
|
If you want to use some specific storage engine for mongod server you
|
||||||
|
have to specify --storageEngine option. Actualy there are two stable
|
||||||
|
storage engines: mmapv1 and wiredTiger (x86_64 only).
|
||||||
|
|
||||||
|
For more options run "./resmoke.py --help".
|
||||||
|
|
||||||
|
|
||||||
|
In Red Hat distributions use this syntax:
|
||||||
|
$ su -
|
||||||
|
# cd /usr/share/mongodb-test
|
||||||
|
# su -s /bin/bash mongodb -c "./resmoke.py OPTIONS"
|
||||||
|
|
||||||
|
More info about mongoDB testing:
|
||||||
|
http://www.mongodb.org/about/contributors/tutorial/test-the-mongodb-server/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
- ARM architecture is not fully supported -
|
||||||
|
https://jira.mongodb.org/browse/SERVER-1811
|
||||||
|
|
||||||
|
- This subpackage does not contain dbtest binary (it is going to be
|
||||||
|
deprecated).
|
||||||
|
|
18
boost-1.66.patch
Normal file
18
boost-1.66.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
From 3c34eda8d8a38b982a1659b919e9f4b5971ba512 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Judah Schvimer <judah@mongodb.com>
|
||||||
|
Date: Wed, 31 Jan 2018 11:38:57 -0500
|
||||||
|
Subject: [PATCH] SERVER-32516 remove make_optional type
|
||||||
|
|
||||||
|
diff --git a/src/mongo/executor/network_interface_mock_test.cpp b/src/mongo/executor/network_interface_mock_test.cpp
|
||||||
|
index b1a2e4edff..c41aad1f8c 100644
|
||||||
|
--- a/src/mongo/executor/network_interface_mock_test.cpp
|
||||||
|
+++ b/src/mongo/executor/network_interface_mock_test.cpp
|
||||||
|
@@ -143,7 +143,7 @@ TEST_F(NetworkInterfaceMockTest, ConnectionHook) {
|
||||||
|
[&](const HostAndPort& remoteHost) {
|
||||||
|
makeRequestCalled = true;
|
||||||
|
hostCorrectForRequest = (remoteHost == testHost());
|
||||||
|
- return boost::make_optional<RemoteCommandRequest>(expectedRequest);
|
||||||
|
+ return boost::make_optional(expectedRequest);
|
||||||
|
},
|
||||||
|
[&](const HostAndPort& remoteHost, RemoteCommandResponse&& response) {
|
||||||
|
handleReplyCalled = true;
|
119
mongod.conf
Normal file
119
mongod.conf
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
##
|
||||||
|
## For list of options visit:
|
||||||
|
## https://docs.mongodb.org/manual/reference/configuration-options/
|
||||||
|
##
|
||||||
|
|
||||||
|
# systemLog Options - How to do logging
|
||||||
|
systemLog:
|
||||||
|
# The default log message verbosity level for components (0-5)
|
||||||
|
verbosity: 0
|
||||||
|
|
||||||
|
# The destination to which MongoDB sends all log output (file|syslog, if not specifed to STDOUT)
|
||||||
|
destination: file
|
||||||
|
|
||||||
|
# Log file to send write to instead of stdout - has to be a file, not directory
|
||||||
|
path: /var/log/mongodb/mongod.log
|
||||||
|
|
||||||
|
# Append to logpath instead of over-writing (false by default)
|
||||||
|
logAppend: true
|
||||||
|
|
||||||
|
# Set the log rotation behavior (rename|reopen, rename by default)
|
||||||
|
logRotate: reopen
|
||||||
|
|
||||||
|
|
||||||
|
# processManagement Options - How the process runs
|
||||||
|
processManagement:
|
||||||
|
# Fork server process (false by default)
|
||||||
|
fork: true
|
||||||
|
|
||||||
|
# Full path to pidfile (if not set, no pidfile is created)
|
||||||
|
pidFilePath: /var/run/mongodb/mongod.pid
|
||||||
|
|
||||||
|
|
||||||
|
# net Options - Network interfaces settings
|
||||||
|
net:
|
||||||
|
# Specify port number (27017 by default)
|
||||||
|
port: 27017
|
||||||
|
|
||||||
|
# Comma separated list of ip addresses to listen on (all local ips by default)
|
||||||
|
bindIp: 127.0.0.1,::1
|
||||||
|
|
||||||
|
# Enable IPv6 support (disabled by default)
|
||||||
|
ipv6: true
|
||||||
|
|
||||||
|
unixDomainSocket:
|
||||||
|
# Enable/disable listening on the UNIX domain socket (true by default)
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Alternative directory for UNIX domain sockets (defaults to /tmp)
|
||||||
|
pathPrefix: /var/run/mongodb
|
||||||
|
|
||||||
|
#ssl:
|
||||||
|
# Set the SSL operation mode (disabled|allowSSL|preferSSL|requireSSL)
|
||||||
|
#mode: <string>
|
||||||
|
|
||||||
|
# PEM file for ssl
|
||||||
|
#PEMKeyFile: <string>
|
||||||
|
|
||||||
|
# Certificate Authority file for SSL
|
||||||
|
#CAFile: <string>
|
||||||
|
|
||||||
|
|
||||||
|
# storage Options - How and Where to store data
|
||||||
|
storage:
|
||||||
|
# Directory for datafiles (defaults to /data/db/)
|
||||||
|
dbPath: /var/lib/mongodb
|
||||||
|
|
||||||
|
#journal:
|
||||||
|
# Enable/Disable journaling (journaling is on by default for 64 bit)
|
||||||
|
#enabled: true
|
||||||
|
|
||||||
|
# The storage engine for the mongod database (mmapv1|wiredTiger, wiredTiger by default
|
||||||
|
# - works for 64 bit only)
|
||||||
|
# Also possible to use unstable engines: devnull|ephemeralForTest
|
||||||
|
engine: mmapv1
|
||||||
|
|
||||||
|
#mmapv1:
|
||||||
|
# Enable or disable the preallocation of data files (true by default)
|
||||||
|
#preallocDataFiles: <boolean>
|
||||||
|
|
||||||
|
# Use a smaller default file size (false by default)
|
||||||
|
#smallFiles: <boolean>
|
||||||
|
|
||||||
|
#wiredTiger:
|
||||||
|
#engineConfig:
|
||||||
|
# The maximum size of the cache that WiredTiger will use for all data
|
||||||
|
# (max(60% of RAM - 1GB, 1GB) by default)
|
||||||
|
#cacheSizeGB: 5
|
||||||
|
|
||||||
|
# The type of compression to use to compress WiredTiger journal data
|
||||||
|
# (none|snappy|zlib, snappy by default)
|
||||||
|
#journalCompressor: <string>
|
||||||
|
|
||||||
|
#collectionConfig:
|
||||||
|
# The default type of compression to use to compress collection data
|
||||||
|
# (none|snappy|zlib, snappy by default)
|
||||||
|
#blockCompressor: <string>
|
||||||
|
|
||||||
|
|
||||||
|
# secutiry Options - Authorization and other security settings
|
||||||
|
#security:
|
||||||
|
# Private key for cluster authentication
|
||||||
|
#keyFile: <string>
|
||||||
|
|
||||||
|
# Run with/without security (enabled|disabled, disabled by default)
|
||||||
|
#authorization
|
||||||
|
|
||||||
|
|
||||||
|
# setParameter Options - Set MongoDB server parameters
|
||||||
|
# setParameter:
|
||||||
|
|
||||||
|
# opratrionProfiling Options - Profiling settings
|
||||||
|
#operationProfiling:
|
||||||
|
|
||||||
|
# replication Options - ReplSet settings
|
||||||
|
#replication:
|
||||||
|
|
||||||
|
# sharding Options - Shard settings
|
||||||
|
#sharding:
|
||||||
|
|
170
mongod.init
Normal file
170
mongod.init
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# mongod init file for starting up the mongoDB server
|
||||||
|
#
|
||||||
|
# chkconfig: - 90 10
|
||||||
|
# description: Starts and stops the mongoDB daemon that handles all \
|
||||||
|
# database requests.
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
prog="mongod"
|
||||||
|
exec="/usr/bin/$prog"
|
||||||
|
logfile=${LOGFILE-/var/log/mongodb/$prog.log}
|
||||||
|
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||||
|
|
||||||
|
pidfile=${PIDFILE-/var/run/mongodb/$prog.pid}
|
||||||
|
options="$OPTIONS"
|
||||||
|
lockfile="/var/lock/subsys/$prog"
|
||||||
|
|
||||||
|
# Nicer version of killproc that does not kill mongodb when it takes
|
||||||
|
# a long time to shut down and does not hang for a long time when mongo
|
||||||
|
# shuts down quickly
|
||||||
|
killproc_nice() {
|
||||||
|
local RC base pid pid_file= delay i
|
||||||
|
|
||||||
|
RC=0; delay=3
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ "$1" = "-p" ]; then
|
||||||
|
pid_file=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
|
if [ "$1" = "-d" ]; then
|
||||||
|
delay=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save basename.
|
||||||
|
base=${1##*/}
|
||||||
|
|
||||||
|
# Find pid.
|
||||||
|
__pids_var_run "$1" "$pid_file"
|
||||||
|
RC=$?
|
||||||
|
if [ -z "$pid" ]; then
|
||||||
|
if [ -z "$pid_file" ]; then
|
||||||
|
pid="$(__pids_pidof "$1")"
|
||||||
|
else
|
||||||
|
[ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Kill it.
|
||||||
|
if [ -n "$pid" ] ; then
|
||||||
|
[ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base "
|
||||||
|
if checkpid $pid 2>&1; then
|
||||||
|
# TERM first, then KILL if not dead
|
||||||
|
kill -TERM $pid >/dev/null 2>&1
|
||||||
|
usleep 100000
|
||||||
|
|
||||||
|
# Check every one second if the program is stopped.
|
||||||
|
# Do so for a maximum of $delay seconds
|
||||||
|
for ((i = 0 ; i < $delay; i++))
|
||||||
|
do
|
||||||
|
if checkpid $pid; then
|
||||||
|
sleep 1
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If the program is not stopped, kill it
|
||||||
|
if checkpid $pid ; then
|
||||||
|
kill -KILL $pid >/dev/null 2>&1
|
||||||
|
usleep 100000
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkpid $pid
|
||||||
|
RC=$?
|
||||||
|
[ "$RC" -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown"
|
||||||
|
RC=$((! $RC))
|
||||||
|
else
|
||||||
|
failure $"$base shutdown"
|
||||||
|
RC=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove pid file if any.
|
||||||
|
rm -f "${pid_file:-/var/run/$base.pid}"
|
||||||
|
return $RC
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -x $exec ] || exit 5
|
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon --pidfile=${pidfile} --user mongodb "$exec $options run >> $logfile 2>&1"
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc_nice -p ${pidfile} -d 300 $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
force_reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status() {
|
||||||
|
# run checks to determine if the service is running or use generic status
|
||||||
|
status -p ${pidfile} $prog
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status_q() {
|
||||||
|
rh_status >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
rh_status_q && exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
rh_status_q || exit 7
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
force_reload
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
rh_status
|
||||||
|
;;
|
||||||
|
condrestart|try-restart)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||||
|
exit 2
|
||||||
|
esac
|
||||||
|
exit $?
|
15
mongod.service
Normal file
15
mongod.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=High-performance, schema-free document-oriented database
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
User=mongodb
|
||||||
|
EnvironmentFile=/etc/sysconfig/mongod
|
||||||
|
ExecStart=/bin/sh -c "exec $NUMACTL /usr/bin/mongod $OPTIONS run"
|
||||||
|
PrivateTmp=true
|
||||||
|
LimitNOFILE=64000
|
||||||
|
TimeoutStartSec=180
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
5
mongod.sysconf
Normal file
5
mongod.sysconf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
OPTIONS="-f /etc/mongod.conf"
|
||||||
|
|
||||||
|
# To run numactl before starting mongodb server
|
||||||
|
# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux
|
||||||
|
#NUMACTL="/usr/bin/numactl --interleave=all"
|
3
mongodb-tmpfile
Normal file
3
mongodb-tmpfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# make sure the mongodb dir is owned by mongodb so the process running as
|
||||||
|
# mongodb can write the pid there
|
||||||
|
d /run/mongodb 0755 mongodb root -
|
12
mongodb.logrotate
Normal file
12
mongodb.logrotate
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/var/log/mongodb/*.log {
|
||||||
|
weekly
|
||||||
|
rotate 10
|
||||||
|
copytruncate
|
||||||
|
delaycompress
|
||||||
|
compress
|
||||||
|
notifempty
|
||||||
|
missingok
|
||||||
|
postrotate
|
||||||
|
/bin/kill -USR1 `cat /var/run/mongodb/mongod.pid 2>/dev/null` 2> /dev/null|| true
|
||||||
|
endscript
|
||||||
|
}
|
1226
mongodb.spec
Normal file
1226
mongodb.spec
Normal file
File diff suppressed because it is too large
Load Diff
86
mongos.conf
Normal file
86
mongos.conf
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
##
|
||||||
|
## For list of options visit:
|
||||||
|
## https://docs.mongodb.org/manual/reference/configuration-options/
|
||||||
|
##
|
||||||
|
|
||||||
|
# systemLog Options - How to do logging
|
||||||
|
systemLog:
|
||||||
|
# The default log message verbosity level for components (0-5)
|
||||||
|
verbosity: 0
|
||||||
|
|
||||||
|
# The destination to which MongoDB sends all log output (file|syslog, if not specifed to STDOUT)
|
||||||
|
destination: file
|
||||||
|
|
||||||
|
# Log file to send write to instead of stdout - has to be a file, not directory
|
||||||
|
path: /var/log/mongodb/mongod.log
|
||||||
|
|
||||||
|
# Append to logpath instead of over-writing (false by default)
|
||||||
|
logAppend: true
|
||||||
|
|
||||||
|
# Set the log rotation behavior (rename|reopen, rename by default)
|
||||||
|
logRotate: reopen
|
||||||
|
|
||||||
|
|
||||||
|
# processManagement Options - How the process runs
|
||||||
|
processManagement:
|
||||||
|
# Fork server process (false by default)
|
||||||
|
fork: true
|
||||||
|
|
||||||
|
# Full path to pidfile (if not set, no pidfile is created)
|
||||||
|
pidFilePath: /var/run/mongodb/mongod.pid
|
||||||
|
|
||||||
|
|
||||||
|
# net Options - Network interfaces settings
|
||||||
|
net:
|
||||||
|
# Specify port number (27017 by default)
|
||||||
|
port: 27017
|
||||||
|
|
||||||
|
# Comma separated list of ip addresses to listen on (all local ips by default)
|
||||||
|
bindIp: 127.0.0.1,::1
|
||||||
|
|
||||||
|
# Enable IPv6 support (disabled by default)
|
||||||
|
ipv6: true
|
||||||
|
|
||||||
|
unixDomainSocket:
|
||||||
|
# Enable/disable listening on the UNIX domain socket (true by default)
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Alternative directory for UNIX domain sockets (defaults to /tmp)
|
||||||
|
pathPrefix: /var/run/mongodb
|
||||||
|
|
||||||
|
#ssl:
|
||||||
|
# Set the SSL operation mode (disabled|allowSSL|preferSSL|requireSSL)
|
||||||
|
#mode: <string>
|
||||||
|
|
||||||
|
# PEM file for ssl
|
||||||
|
#PEMKeyFile: <string>
|
||||||
|
|
||||||
|
# Certificate Authority file for SSL
|
||||||
|
#CAFile: <string>
|
||||||
|
|
||||||
|
|
||||||
|
# secutiry Options - Authorization and other security settings
|
||||||
|
#security:
|
||||||
|
# Private key for cluster authentication
|
||||||
|
#keyFile: <string>
|
||||||
|
|
||||||
|
|
||||||
|
# sharding Options - Shard settings
|
||||||
|
#sharding:
|
||||||
|
# The configuration servers for the sharded cluster
|
||||||
|
# Acceptable form: <config replset name>/<host1:port>,<host2:port>,[...]
|
||||||
|
#configDB: <string>
|
||||||
|
|
||||||
|
|
||||||
|
# storage Options - How and Where to store data
|
||||||
|
#storage:
|
||||||
|
|
||||||
|
# setParameter Options - Set MongoDB server parameters
|
||||||
|
# setParameter:
|
||||||
|
|
||||||
|
# opratrionProfiling Options - Profiling settings
|
||||||
|
#operationProfiling:
|
||||||
|
|
||||||
|
# replication Options - ReplSet settings
|
||||||
|
#replication:
|
||||||
|
|
170
mongos.init
Normal file
170
mongos.init
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# mongos init file for starting up the mongoDB shard server
|
||||||
|
#
|
||||||
|
# chkconfig: - 90 10
|
||||||
|
# description: Starts and stops the mongoDB shard daemon that handles all \
|
||||||
|
# database requests.
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
prog="mongos"
|
||||||
|
exec="/usr/bin/$prog"
|
||||||
|
logfile=${LOGFILE-/var/log/mongodb/$prog.log}
|
||||||
|
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||||
|
|
||||||
|
pidfile=${PIDFILE-/var/run/mongodb/$prog.pid}
|
||||||
|
options="$OPTIONS"
|
||||||
|
lockfile="/var/lock/subsys/$prog"
|
||||||
|
|
||||||
|
# Nicer version of killproc that does not kill mongodb when it takes
|
||||||
|
# a long time to shut down and does not hang for a long time when mongo
|
||||||
|
# shuts down quickly
|
||||||
|
killproc_nice() {
|
||||||
|
local RC base pid pid_file= delay i
|
||||||
|
|
||||||
|
RC=0; delay=3
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ "$1" = "-p" ]; then
|
||||||
|
pid_file=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
|
if [ "$1" = "-d" ]; then
|
||||||
|
delay=$2
|
||||||
|
shift 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save basename.
|
||||||
|
base=${1##*/}
|
||||||
|
|
||||||
|
# Find pid.
|
||||||
|
__pids_var_run "$1" "$pid_file"
|
||||||
|
RC=$?
|
||||||
|
if [ -z "$pid" ]; then
|
||||||
|
if [ -z "$pid_file" ]; then
|
||||||
|
pid="$(__pids_pidof "$1")"
|
||||||
|
else
|
||||||
|
[ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Kill it.
|
||||||
|
if [ -n "$pid" ] ; then
|
||||||
|
[ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base "
|
||||||
|
if checkpid $pid 2>&1; then
|
||||||
|
# TERM first, then KILL if not dead
|
||||||
|
kill -TERM $pid >/dev/null 2>&1
|
||||||
|
usleep 100000
|
||||||
|
|
||||||
|
# Check every one second if the program is stopped.
|
||||||
|
# Do so for a maximum of $delay seconds
|
||||||
|
for ((i = 0 ; i < $delay; i++))
|
||||||
|
do
|
||||||
|
if checkpid $pid; then
|
||||||
|
sleep 1
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If the program is not stopped, kill it
|
||||||
|
if checkpid $pid ; then
|
||||||
|
kill -KILL $pid >/dev/null 2>&1
|
||||||
|
usleep 100000
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkpid $pid
|
||||||
|
RC=$?
|
||||||
|
[ "$RC" -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown"
|
||||||
|
RC=$((! $RC))
|
||||||
|
else
|
||||||
|
failure $"$base shutdown"
|
||||||
|
RC=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove pid file if any.
|
||||||
|
rm -f "${pid_file:-/var/run/$base.pid}"
|
||||||
|
return $RC
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -x $exec ] || exit 5
|
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon --pidfile=${pidfile} --user mongodb "$exec $options >> $logfile 2>&1"
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc_nice -p ${pidfile} -d 300 $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
force_reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status() {
|
||||||
|
# run checks to determine if the service is running or use generic status
|
||||||
|
status -p ${pidfile} $prog
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status_q() {
|
||||||
|
rh_status >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
rh_status_q && exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
rh_status_q || exit 7
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
force_reload
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
rh_status
|
||||||
|
;;
|
||||||
|
condrestart|try-restart)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||||
|
exit 2
|
||||||
|
esac
|
||||||
|
exit $?
|
15
mongos.service
Normal file
15
mongos.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=High-performance, schema-free document-oriented database
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
User=mongodb
|
||||||
|
EnvironmentFile=/etc/sysconfig/mongos
|
||||||
|
ExecStart=/bin/sh -c "exec $NUMACTL /usr/bin/mongos $OPTIONS"
|
||||||
|
PrivateTmp=true
|
||||||
|
LimitNOFILE=64000
|
||||||
|
TimeoutStartSec=180
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
5
mongos.sysconf
Normal file
5
mongos.sysconf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
OPTIONS="-f /etc/mongos.conf"
|
||||||
|
|
||||||
|
# To run numactl before starting mongodb server
|
||||||
|
# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux
|
||||||
|
#NUMACTL="/usr/bin/numactl --interleave=all"
|
13
ppc64-altivec.patch
Normal file
13
ppc64-altivec.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 22dd77d947..3b90026138 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -3043,7 +3043,7 @@ def doConfigure(myenv):
|
||||||
|
# ask each module to configure itself and the build environment.
|
||||||
|
moduleconfig.configure_modules(mongo_modules, conf)
|
||||||
|
|
||||||
|
- if env['TARGET_ARCH'] == "ppc64le":
|
||||||
|
+ if env['TARGET_ARCH'] == "ppc64le" or env['TARGET_ARCH'] == "ppc64":
|
||||||
|
# This checks for an altivec optimization we use in full text search.
|
||||||
|
# Different versions of gcc appear to put output bytes in different
|
||||||
|
# parts of the output vector produced by vec_vbpermq. This configure
|
7079
ppc64-arm-i386-mozjs-code.patch
Normal file
7079
ppc64-arm-i386-mozjs-code.patch
Normal file
File diff suppressed because it is too large
Load Diff
76
ppc64.patch
Normal file
76
ppc64.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index fe7975b..88d6650 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -980,6 +980,7 @@ processor_macros = {
|
||||||
|
'arm' : { 'endian': 'little', 'defines': ('__arm__',) },
|
||||||
|
'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
|
||||||
|
'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')},
|
||||||
|
+ 'ppc64' : { 'endian': 'big', 'defines': ('__powerpc64__) && defined(__BIG_ENDIAN__',)},
|
||||||
|
'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)},
|
||||||
|
's390x' : { 'endian': 'big', 'defines': ('__s390x__',)},
|
||||||
|
'sparc' : { 'endian': 'big', 'defines': ('__sparc',)},
|
||||||
|
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
|
||||||
|
index 355d70e..afefe7b 100755
|
||||||
|
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
|
||||||
|
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
|
||||||
|
@@ -570,7 +570,7 @@
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
-#elif (defined(__s390x__))
|
||||||
|
+#elif (defined(__s390x__)) || (defined(__powerpc64__) && defined(__BIG_ENDIAN__))
|
||||||
|
|
||||||
|
# undef vax
|
||||||
|
# undef mips
|
||||||
|
diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript
|
||||||
|
index 20287a6..a495e9c 100644
|
||||||
|
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript
|
||||||
|
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript
|
||||||
|
@@ -313,6 +313,9 @@ elif processor == 'x86_64' or processor == 'ppc64le':
|
||||||
|
cpp_defines['efi2'] = '1'
|
||||||
|
cpp_defines['EFI2'] = '1'
|
||||||
|
# Using 64 bit big endian
|
||||||
|
+elif processor == 'ppc64':
|
||||||
|
+ cpp_defines['ppc64'] = '1'
|
||||||
|
+ cpp_defines['BID_BIG_ENDIAN'] = '1'
|
||||||
|
elif processor == 's390x':
|
||||||
|
cpp_defines['s390x'] = '1'
|
||||||
|
cpp_defines['BID_BIG_ENDIAN'] = '1'
|
||||||
|
diff --git a/src/third_party/timelib-2017.05/parse_tz.c b/src/third_party/timelib-2017.05/parse_tz.c
|
||||||
|
index 3b68549..6460475 100644
|
||||||
|
--- a/src/third_party/timelib-2017.05/parse_tz.c
|
||||||
|
+++ b/src/third_party/timelib-2017.05/parse_tz.c
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(__s390__)
|
||||||
|
+#if defined(__s390__) || defined(__powerpc64__)
|
||||||
|
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||||
|
# define WORDS_BIGENDIAN
|
||||||
|
# else
|
||||||
|
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
|
||||||
|
index 1e07852..8a671b6 100644
|
||||||
|
--- a/src/third_party/wiredtiger/SConscript
|
||||||
|
+++ b/src/third_party/wiredtiger/SConscript
|
||||||
|
@@ -135,7 +135,7 @@ condition_map = {
|
||||||
|
'WINDOWS_HOST' : env.TargetOSIs('windows'),
|
||||||
|
|
||||||
|
'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64',
|
||||||
|
- 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le',
|
||||||
|
+ 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le' or env['TARGET_ARCH'] == 'ppc64',
|
||||||
|
'X86_HOST' : env['TARGET_ARCH'] == 'x86_64',
|
||||||
|
'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x',
|
||||||
|
}
|
||||||
|
@@ -167,6 +167,10 @@ if useSnappy:
|
||||||
|
if not (env['TARGET_ARCH'] == 's390x' and get_option("use-s390x-crc32") == "off"):
|
||||||
|
env.Append(CPPDEFINES=["HAVE_CRC32_HARDWARE"])
|
||||||
|
|
||||||
|
+# It is not possible to pass ASFLAGS through variables to scons now
|
||||||
|
+if env['TARGET_ARCH'] == 'ppc64':
|
||||||
|
+ env.Append(ASFLAGS=["-mcpu=power8"])
|
||||||
|
+
|
||||||
|
wtlib = env.Library(
|
||||||
|
target="wiredtiger",
|
||||||
|
source=wtsources,
|
13
ppc64le-fix-altivec.patch
Normal file
13
ppc64le-fix-altivec.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 4d52f24b85..06ce2bf6f4 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -3116,7 +3116,7 @@ def doConfigure(myenv):
|
||||||
|
|
||||||
|
outputIndex = next((idx for idx in [0,1] if conf.CheckAltivecVbpermqOutput(idx)), None)
|
||||||
|
if outputIndex is not None:
|
||||||
|
- conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex)
|
||||||
|
+ conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex)
|
||||||
|
else:
|
||||||
|
myenv.ConfError("Running on ppc64le, but can't find a correct vec_vbpermq output index. Compiler or platform not supported")
|
||||||
|
|
1798
python3-buildscripts-tests.patch
Normal file
1798
python3-buildscripts-tests.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user