|
|
|
@ -37,8 +37,8 @@
@@ -37,8 +37,8 @@
|
|
|
|
|
%global MONGO_DISTNAME mongo-r%{version} |
|
|
|
|
|
|
|
|
|
Name: mongodb |
|
|
|
|
Version: 4.0.3 |
|
|
|
|
Release: 3%{?dist} |
|
|
|
|
Version: 3.6.6 |
|
|
|
|
Release: 2%{?dist} |
|
|
|
|
Summary: High-performance, schema-free document-oriented database |
|
|
|
|
Group: Applications/Databases |
|
|
|
|
License: AGPLv3 and zlib and ASL 2.0 |
|
|
|
@ -60,26 +60,39 @@ Source9: %{daemonshard}.service
@@ -60,26 +60,39 @@ Source9: %{daemonshard}.service
|
|
|
|
|
Source10: %{daemonshard}.sysconf |
|
|
|
|
Source11: README.txt |
|
|
|
|
|
|
|
|
|
# TabError: inconsistent use of tabs and spaces in indentation |
|
|
|
|
# |
|
|
|
|
Patch0: inconsistent-tabs.patch |
|
|
|
|
# Fix build system to allow building with system version of libraries (mozjs, icu and asio) |
|
|
|
|
# - needed for building additional architectures |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-21353 -> now patching bundled mozjs45 - see patch23 |
|
|
|
|
#Patch0: use-system-mozjs-icu-asio.patch |
|
|
|
|
|
|
|
|
|
# Convert build scripts and testsuite to support python3 |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-32295 |
|
|
|
|
Patch1: python3-buildscripts-tests.patch |
|
|
|
|
|
|
|
|
|
# Fix building with boost 1.66 |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-32516 |
|
|
|
|
Patch2: boost-1.66.patch |
|
|
|
|
|
|
|
|
|
# Few tests fail because of error in altivec implementation of ByteVector |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-33395 |
|
|
|
|
Patch3: ppc64le-fix-altivec.patch |
|
|
|
|
|
|
|
|
|
# Fedora specific - adding support for rest of Fedora architectures |
|
|
|
|
# Upstream doesn't support it and isn't considering merging |
|
|
|
|
# |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-27833 |
|
|
|
|
# Enable ppc64 big endian support |
|
|
|
|
Patch20: ppc64.patch |
|
|
|
|
Patch22: ppc64-altivec.patch |
|
|
|
|
# Add support also for 32bit platforms |
|
|
|
|
# + set default storage engine for non 64-bit arches - RHBZ#1303846 |
|
|
|
|
Patch21: 32bit-support.patch |
|
|
|
|
# Generate mozjs code for ppc64, arm and i386 arches |
|
|
|
|
# Generate code for ppc64, arm and i386 arches |
|
|
|
|
Patch23: ppc64-arm-i386-mozjs-code.patch |
|
|
|
|
|
|
|
|
|
# PowerEL patches |
|
|
|
|
Patch100: mongodb-gcc485.patch |
|
|
|
|
Patch101: mongodb-c11.patch |
|
|
|
|
|
|
|
|
|
BuildRequires: gcc-c++ >= 5.3.0 |
|
|
|
|
BuildRequires: boost-devel >= 1.56 |
|
|
|
|
# Provides tcmalloc |
|
|
|
@ -93,7 +106,6 @@ BuildRequires: snappy-devel
@@ -93,7 +106,6 @@ BuildRequires: snappy-devel
|
|
|
|
|
BuildRequires: yaml-cpp-devel |
|
|
|
|
BuildRequires: zlib-devel |
|
|
|
|
BuildRequires: valgrind-devel |
|
|
|
|
BuildRequires: libcurl-devel |
|
|
|
|
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 |
|
|
|
|
BuildRequires: systemd |
|
|
|
|
%endif |
|
|
|
@ -159,7 +171,7 @@ Provides: bundled(icu) = 57.1
@@ -159,7 +171,7 @@ Provides: bundled(icu) = 57.1
|
|
|
|
|
Provides: bundled(IntelRDFPMathLib) = 20U1 |
|
|
|
|
# https://github.com/derickr/timelib |
|
|
|
|
Provides: bundled(timelib) = 2017.05beta10 |
|
|
|
|
# MongoDB provides mozjs customization to recover from OOM |
|
|
|
|
# MongoDB does provides mozjs customization to recover from OOM |
|
|
|
|
Provides: bundled(mozjs45) = 45.8.0 |
|
|
|
|
|
|
|
|
|
%description server |
|
|
|
@ -184,11 +196,13 @@ the MongoDB sources.
@@ -184,11 +196,13 @@ the MongoDB sources.
|
|
|
|
|
|
|
|
|
|
%prep |
|
|
|
|
%setup -q -n %{MONGO_DISTNAME} |
|
|
|
|
%patch0 -p1 |
|
|
|
|
%patch1 -p1 |
|
|
|
|
%patch2 -p1 |
|
|
|
|
%patch3 -p1 |
|
|
|
|
# Patch only Fedora specific architectures |
|
|
|
|
%ifnarch %{upstream_arches} |
|
|
|
|
%patch20 -p1 |
|
|
|
|
%patch22 -p1 |
|
|
|
|
%patch21 -p1 |
|
|
|
|
%patch23 -p1 |
|
|
|
|
|
|
|
|
@ -196,12 +210,17 @@ the MongoDB sources.
@@ -196,12 +210,17 @@ the MongoDB sources.
|
|
|
|
|
sed -i -e "/extract\/js\/src\/jit\/ProcessExecutableMemory.cpp/d" src/third_party/mozjs-45/SConscript |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# Workaround for https://jira.mongodb.org/browse/SERVER-37135 to make mongodb buildable with new openssl |
|
|
|
|
sed -i "s|\(#ifdef TLS1_3_VERSION\)|#undef TLS1_3_VERSION\n\1|" src/mongo/util/net/ssl_manager_openssl.cpp |
|
|
|
|
# PowerEL |
|
|
|
|
%patch100 -p1 |
|
|
|
|
%patch101 -p1 |
|
|
|
|
|
|
|
|
|
# CRLF -> LF |
|
|
|
|
sed -i 's/\r//' README |
|
|
|
|
|
|
|
|
|
# Disable optimization for s2 library |
|
|
|
|
# https://jira.mongodb.org/browse/SERVER-17511 |
|
|
|
|
sed -i -r "s|(env.Append\(CCFLAGS=\['-DDEBUG_MODE=false')(\]\))|\1,'-O0'\2|" src/third_party/s2/SConscript |
|
|
|
|
|
|
|
|
|
#TODO - removed unused bundles |
|
|
|
|
# Use system versions of header files (bundled does not differ) |
|
|
|
|
sed -i -r "s|third_party/libstemmer_c/include/libstemmer.h|libstemmer.h|" src/mongo/db/fts/stemmer.h |
|
|
|
@ -216,12 +235,17 @@ sed -i -r "s|/data/db|%{_datadir}/%{pkg_name}-test/var|" buildscripts/resmokel
@@ -216,12 +235,17 @@ sed -i -r "s|/data/db|%{_datadir}/%{pkg_name}-test/var|" buildscripts/resmokel
|
|
|
|
|
|
|
|
|
|
sed -i -r "s|env python|env python3|" buildscripts/resmoke.py |
|
|
|
|
|
|
|
|
|
# set default storage engine for non 64-bit arches - RHBZ#1303846 |
|
|
|
|
%ifnarch %{upstream_arches} ppc64 |
|
|
|
|
sed -i 's|engine = "wiredTiger"|engine = "mmapv1"|' src/mongo/db/storage/storage_options.h |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
export LANG=C.UTF-8 |
|
|
|
|
export LANG="en_US.UTF-8" |
|
|
|
|
# Prepare variables for building |
|
|
|
|
cat > variables.list << EOF |
|
|
|
|
CCFLAGS="$(echo %{?optflags} | sed -e "s/-O. //" -e "s/-g //")" |
|
|
|
|
CCFLAGS="$(echo %{?optflags} | sed -e "s/-O. //" -e "s/-g //") -fvisibility=hidden" |
|
|
|
|
LINKFLAGS="%{?__global_ldflags} -Wl,-z,noexecstack -Wl,--reduce-memory-overheads,--no-keep-memory" |
|
|
|
|
VERBOSE=1 |
|
|
|
|
MONGO_VERSION="%{version}" |
|
|
|
@ -289,6 +313,7 @@ scons-3 unittests $(cat build-options)
@@ -289,6 +313,7 @@ scons-3 unittests $(cat build-options)
|
|
|
|
|
install -p -D -m 755 mongod %{buildroot}%{_bindir}/mongod |
|
|
|
|
install -p -D -m 755 mongos %{buildroot}%{_bindir}/mongos |
|
|
|
|
install -p -D -m 755 mongo %{buildroot}%{_bindir}/mongo |
|
|
|
|
install -p -D -m 755 mongoperf %{buildroot}%{_bindir}/mongoperf |
|
|
|
|
install -p -D -m 755 mongobridge %{buildroot}%{_bindir}/mongobridge |
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sharedstatedir}/%{pkg_name} |
|
|
|
@ -317,6 +342,7 @@ sed -i -r "s|(engine: )mmapv1|\1wiredTiger|" %{buildroot}%{_sysconfdir}/%{daemon
@@ -317,6 +342,7 @@ sed -i -r "s|(engine: )mmapv1|\1wiredTiger|" %{buildroot}%{_sysconfdir}/%{daemon
|
|
|
|
|
#TODO - create man page for mongobridge |
|
|
|
|
install -d -m 755 %{buildroot}%{_mandir}/man1 |
|
|
|
|
install -p -m 644 debian/mongo.1 %{buildroot}%{_mandir}/man1/ |
|
|
|
|
install -p -m 644 debian/mongoperf.1 %{buildroot}%{_mandir}/man1/ |
|
|
|
|
install -p -m 644 debian/mongod.1 %{buildroot}%{_mandir}/man1/ |
|
|
|
|
install -p -m 644 debian/mongos.1 %{buildroot}%{_mandir}/man1/ |
|
|
|
|
|
|
|
|
@ -354,7 +380,7 @@ done < ./build/unittests.txt
@@ -354,7 +380,7 @@ done < ./build/unittests.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check |
|
|
|
|
export LANG=C.UTF-8 |
|
|
|
|
export LANG="en_US.UTF-8" |
|
|
|
|
%if %runselftest |
|
|
|
|
# More info about testing: |
|
|
|
|
# http://www.mongodb.org/about/contributors/tutorial/test-the-mongodb-server/ |
|
|
|
@ -374,7 +400,6 @@ sed -i "/mongo_uri_test/d" build/unittests.txt
@@ -374,7 +400,6 @@ sed -i "/mongo_uri_test/d" build/unittests.txt
|
|
|
|
|
#TODO |
|
|
|
|
%ifarch %{ix86} %{arm} |
|
|
|
|
sed -i "/service_entry_point_mock_test/d" build/unittests.txt |
|
|
|
|
sed -i "/rs_rollback_test/d" build/unittests.txt |
|
|
|
|
# Crashing on armv7hl due to optimizations |
|
|
|
|
sed -i "/chunk_diff_test/d" build/unittests.txt |
|
|
|
|
%endif |
|
|
|
@ -404,6 +429,11 @@ done
@@ -404,6 +429,11 @@ done
|
|
|
|
|
rm -Rf ./var |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%pre server |
|
|
|
|
getent group %{pkg_name} >/dev/null || groupadd -f -g 184 -r %{pkg_name} |
|
|
|
@ -461,14 +491,47 @@ if [ "$1" -ge 1 ] ; then
@@ -461,14 +491,47 @@ if [ "$1" -ge 1 ] ; then
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make rename of config files transparent and effortless |
|
|
|
|
%triggerpostun server -- %{name}-server < 2.6.7-3 |
|
|
|
|
if [ -f %{_sysconfdir}/sysconfig/%{daemon}.rpmnew ]; then |
|
|
|
|
if [ -f %{_sysconfdir}/%{pkg_name}.conf.rpmsave ]; then |
|
|
|
|
mv %{_sysconfdir}/%{daemon}.conf %{_sysconfdir}/%{daemon}.conf.rpmnew |
|
|
|
|
mv %{_sysconfdir}/%{pkg_name}.conf.rpmsave %{_sysconfdir}/%{pkg_name}.conf |
|
|
|
|
else |
|
|
|
|
mv %{_sysconfdir}/%{daemon}.conf %{_sysconfdir}/%{pkg_name}.conf |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
if [ -f %{_sysconfdir}/%{pkg_name}.conf.rpmsave ]; then |
|
|
|
|
mv %{_sysconfdir}/%{daemon}.conf %{_sysconfdir}/%{daemon}.conf.rpmnew |
|
|
|
|
mv %{_sysconfdir}/%{pkg_name}.conf.rpmsave %{_sysconfdir}/%{daemon}.conf |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ -f %{_sysconfdir}/sysconfig/%{daemonshard}.rpmnew ]; then |
|
|
|
|
if [ -f %{_sysconfdir}/%{pkg_name}-shard.conf.rpmsave ]; then |
|
|
|
|
mv %{_sysconfdir}/%{daemonshard}.conf %{_sysconfdir}/%{daemonshard}.conf.rpmnew |
|
|
|
|
mv %{_sysconfdir}/%{pkg_name}-shard.conf.rpmsave %{_sysconfdir}/%{pkg_name}-shard.conf |
|
|
|
|
else |
|
|
|
|
mv %{_sysconfdir}/%{daemonshard}.conf %{_sysconfdir}/%{pkg_name}-shard.conf |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
if [ -f %{_sysconfdir}/%{pkg_name}-shard.conf.rpmsave ]; then |
|
|
|
|
mv %{_sysconfdir}/%{daemonshard}.conf %{_sysconfdir}/%{daemonshard}.conf.rpmnew |
|
|
|
|
mv %{_sysconfdir}/%{pkg_name}-shard.conf.rpmsave %{_sysconfdir}/%{daemonshard}.conf |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
|
%{!?_licensedir:%global license %%doc} |
|
|
|
|
%license GNU-AGPL-3.0.txt APACHE-2.0.txt |
|
|
|
|
%doc README |
|
|
|
|
%{_bindir}/mongo |
|
|
|
|
%{_bindir}/mongoperf |
|
|
|
|
%{_bindir}/mongobridge |
|
|
|
|
|
|
|
|
|
%{_mandir}/man1/mongo.1* |
|
|
|
|
%{_mandir}/man1/mongoperf.1* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files server |
|
|
|
@ -503,42 +566,11 @@ fi
@@ -503,42 +566,11 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
|
* Thu Dec 06 2018 mskalick@redhat.com - 4.0.3-3 |
|
|
|
|
* Wed Dec 05 2018 mskalick@redhat.com - 3.6.6-2 |
|
|
|
|
- Fix bytecompilation and missing files in -test subpackage |
|
|
|
|
|
|
|
|
|
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.0.3-2 |
|
|
|
|
- Use C.UTF-8 locale |
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot |
|
|
|
|
|
|
|
|
|
* Wed Oct 03 2018 panovotn@redhat.com - 4.0.3-1 |
|
|
|
|
- Rebase to upstream release 4.0.3 |
|
|
|
|
|
|
|
|
|
* Tue Oct 02 2018 mskalick@redhat.com - 4.0.1-2 |
|
|
|
|
- Don't force third_party/s2 to be built without optimizations. It's working |
|
|
|
|
with new gcc. Using -O0 failed anobin checks. |
|
|
|
|
|
|
|
|
|
* Thu Aug 09 2018 mskalick@redhat.com - 4.0.1-1 |
|
|
|
|
- Rebase to upstream release 4.0.1 |
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-5 |
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
|
|
|
|
|
|
|
|
|
* Wed Jul 11 2018 mskalick@redhat.com - 4.0.0-4 |
|
|
|
|
- Follow upstream suggestion about unittest_test - SERVER-35935 jira ticket |
|
|
|
|
(-fvisibility=hidden is not needed anymore, because bundled mozjs is used on |
|
|
|
|
all arches) |
|
|
|
|
|
|
|
|
|
* Wed Jul 11 2018 mskalick@redhat.com - 4.0.0-3 |
|
|
|
|
- Fix default storage engine for 32b arches |
|
|
|
|
|
|
|
|
|
* Mon Jul 09 2018 Miro Hrončok <mhroncok@redhat.com> - 4.0.0-2 |
|
|
|
|
- Rebuilt for Python 3.7 |
|
|
|
|
|
|
|
|
|
* Mon Jun 25 2018 mskalick@redhat.com - 4.0.0-1 |
|
|
|
|
- Rebase to latest upstream version 4.0.0 |
|
|
|
|
|
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-4 |
|
|
|
|
- Rebuilt for Python 3.7 |
|
|
|
|
* Mon Aug 13 2018 mskalick@redhat.com - 3.6.6-1 |
|
|
|
|
- Rebase to upstream release 3.6.6 |
|
|
|
|
|
|
|
|
|
* Fri Jun 08 2018 mskalick@redhat.com - 3.6.4-3 |
|
|
|
|
- Use bundled mozjs-45 on all architecture |
|
|
|
|