update to 4.2.4 [release 4.2.4-1mamba;Wed Mar 18 2020]
This commit is contained in:
parent
c99746c816
commit
b03dd31bf4
129
mongodb.spec
129
mongodb.spec
@ -5,7 +5,7 @@
|
|||||||
%global mongodb_user mongodb
|
%global mongodb_user mongodb
|
||||||
|
|
||||||
Name: mongodb
|
Name: mongodb
|
||||||
Version: 4.0.10
|
Version: 4.2.4
|
||||||
Release: 1mamba
|
Release: 1mamba
|
||||||
Summary: A cross-platform, high-performance, schema-free document-oriented database
|
Summary: A cross-platform, high-performance, schema-free document-oriented database
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
@ -30,12 +30,12 @@ BuildRequires: ldconfig
|
|||||||
BuildRequires: libboost-devel
|
BuildRequires: libboost-devel
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: libgcc
|
BuildRequires: libgcc
|
||||||
|
BuildRequires: libgperftools-devel
|
||||||
BuildRequires: libopenssl-devel
|
BuildRequires: libopenssl-devel
|
||||||
BuildRequires: libpcre-devel
|
BuildRequires: libsasl2-devel
|
||||||
BuildRequires: libsnappy-devel
|
BuildRequires: libsnappy-devel
|
||||||
BuildRequires: libstdc++6-devel
|
BuildRequires: libstdc++6-devel
|
||||||
BuildRequires: libstemmer-devel
|
BuildRequires: libstemmer-devel
|
||||||
BuildRequires: libyaml-cpp-devel
|
|
||||||
BuildRequires: libz-devel
|
BuildRequires: libz-devel
|
||||||
## AUTOBUILDREQ-END
|
## AUTOBUILDREQ-END
|
||||||
BuildRequires: scons
|
BuildRequires: scons
|
||||||
@ -43,7 +43,9 @@ BuildRequires: gcc-c++
|
|||||||
BuildRequires: gcc-go
|
BuildRequires: gcc-go
|
||||||
BuildRequires: libyaml-cpp-devel >= 0.6.2
|
BuildRequires: libyaml-cpp-devel >= 0.6.2
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: valgrind-devel
|
||||||
BuildRequires: python-cheetah
|
BuildRequires: python-Cheetah3-py3
|
||||||
|
BuildRequires: python-psutil-py3
|
||||||
|
BuildRequires: libgperftools-devel
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
@ -62,38 +64,61 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|||||||
%description server
|
%description server
|
||||||
This package provides the mongo server software, mongo sharding server software, default configuration files, and init scripts.
|
This package provides the mongo server software, mongo sharding server software, default configuration files, and init scripts.
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n mongo-%{version}
|
%setup -q -n mongo-%{version}
|
||||||
|
#-D -T
|
||||||
|
#:<< _EOF
|
||||||
|
|
||||||
|
# keep historical paths and user
|
||||||
|
sed -i 's|dbPath: /var/lib/mongo|dbPath: /var/lib/mongodb|' rpm/mongod.conf
|
||||||
|
sed -i 's/User=mongod/User=mongodb/' rpm/mongod.service
|
||||||
|
sed -i 's/Group=mongod/Group=mongodb/' rpm/mongod.service
|
||||||
|
sed -i 's|/var/run|/run|' rpm/mongod.service
|
||||||
|
sed -i 's|/usr/bin/mkdir|/bin/mkdir|' rpm/mongod.service
|
||||||
|
sed -i 's|/usr/bin/chmod|/bin/chmod|' rpm/mongod.service
|
||||||
|
sed -i 's|/usr/bin/chown|/bin/chown|' rpm/mongod.service
|
||||||
|
sed -i 's/chown mongod:mongod/chown mongodb:mongodb/' rpm/mongod.service
|
||||||
|
|
||||||
# GCC 6.1.0 build fix
|
# GCC 6.1.0 build fix
|
||||||
sed -e 's|-std=c++11|-std=gnu++11|g' -i SConstruct
|
sed -e 's|-std=c++11|-std=gnu++11|g' -i SConstruct
|
||||||
|
|
||||||
|
# Make systemd wait as long as it takes for MongoDB to start
|
||||||
|
# If MongoDB needs a long time to start, prevent systemd from restarting it every 90 seconds
|
||||||
|
# See: https://jira.mongodb.org/browse/SERVER-38086
|
||||||
|
sed -i 's/\[Service]/[Service]\nTimeoutStartSec=infinity/' rpm/mongod.service
|
||||||
|
|
||||||
|
# Prevent building using debug symbols, since binaries will be stripped anyway
|
||||||
|
# Reduces makepkg -- which fully runs check() -- build size from 259GB to 2.3GB, and time by at least 37%
|
||||||
|
# See: https://jira.mongodb.org/browse/SERVER-44038
|
||||||
|
sed -i '/"-ggdb" if not env.TargetOSIs/d' SConstruct
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# see: https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
|
#:<< _EOF
|
||||||
# note: MongoDB uses a customized built-in version of tcmalloc to achieve
|
# --use-system-pcre # wait for pcre 8.44+ https://jira.mongodb.org/browse/SERVER-40836 and https://jira.mongodb.org/browse/SERVER-42990
|
||||||
# significant performance gains. Building with --use-system-tcmalloc
|
# --use-system-yaml # https://jira.mongodb.org/browse/SERVER-43980
|
||||||
# produces binaries that lack these performance gains.
|
#--use-system-wiredtiger # https://jira.mongodb.org/browse/SERVER-42813 upstream broke this in 4.2.0, says in meantime not to use it
|
||||||
# note: WiredTiger is not supported on 32-bit platforms
|
# --use-system-asio # https://jira.mongodb.org/browse/SERVER-21839 marked as fixed, but still doesn't compile. MongoDB uses custom patches.
|
||||||
# Re-run scons with --wiredtiger=off to build on 32-bit platforms
|
# --use-system-icu # Doesn't compile
|
||||||
|
# --use-system-valgrind # Compiles, but namcap says not used
|
||||||
|
# --use-system-sqlite # "
|
||||||
|
# --use-system-mongo-c # Doesn't compile
|
||||||
|
|
||||||
scons core tools \
|
scons core tools \
|
||||||
MONGO_VERSION=%{version} \
|
MONGO_VERSION=%{version} \
|
||||||
%ifnarch x86_64
|
%ifnarch x86_64
|
||||||
--wiredtiger=off \
|
--wiredtiger=off \
|
||||||
%endif
|
%endif
|
||||||
%{?_smp_mflags} \
|
--use-system-snappy \
|
||||||
--use-system-pcre \
|
--use-system-zlib \
|
||||||
--use-system-snappy \
|
--use-system-stemmer \
|
||||||
--use-system-stemmer \
|
--use-sasl-client \
|
||||||
--use-system-boost \
|
--ssl \
|
||||||
--use-system-valgrind \
|
--disable-warnings-as-errors \
|
||||||
--use-system-zlib \
|
--use-system-tcmalloc \
|
||||||
--use-system-yaml \
|
--use-system-boost \
|
||||||
--ssl \
|
%{?_smp_mflags}
|
||||||
--disable-warnings-as-errors
|
|
||||||
|
|
||||||
# --use-system-snappy
|
|
||||||
# --use-system-stemmer
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
@ -102,29 +127,28 @@ scons install \
|
|||||||
%ifnarch x86_64
|
%ifnarch x86_64
|
||||||
--wiredtiger=off \
|
--wiredtiger=off \
|
||||||
%endif
|
%endif
|
||||||
%{?_smp_mflags} \
|
--use-system-snappy \
|
||||||
--use-system-pcre \
|
--use-system-zlib \
|
||||||
--use-system-snappy \
|
--use-system-stemmer \
|
||||||
--use-system-stemmer \
|
--use-sasl-client \
|
||||||
--use-system-boost \
|
--ssl \
|
||||||
--use-system-valgrind \
|
--disable-warnings-as-errors \
|
||||||
--use-system-zlib \
|
--use-system-tcmalloc \
|
||||||
--use-system-yaml \
|
--use-system-boost \
|
||||||
--ssl \
|
%{?_smp_mflags} \
|
||||||
--disable-warnings-as-errors \
|
--prefix=%{buildroot}%{_prefix}
|
||||||
--prefix=%{buildroot}%{_prefix}
|
|
||||||
|
|
||||||
install -p -D -m 644 "%{SOURCE8}" %{buildroot}%{_tmpfilesdir}/mongodb.conf
|
install -D -m644 rpm/mongod.conf %{buildroot}%{_sysconfdir}/mongod.conf
|
||||||
|
install -D -m644 rpm/mongod.service %{buildroot}%{_unitdir}/mongod.service
|
||||||
|
|
||||||
install -p -D -m 644 "%{SOURCE1}" %{buildroot}%{_unitdir}/mongod.service
|
|
||||||
install -p -D -m 644 "%{SOURCE2}" %{buildroot}%{_sysconfdir}/mongod.conf
|
|
||||||
install -p -D -m 644 "%{SOURCE3}" %{buildroot}%{_sysconfdir}/sysconfig/mongod
|
install -p -D -m 644 "%{SOURCE3}" %{buildroot}%{_sysconfdir}/sysconfig/mongod
|
||||||
|
|
||||||
install -p -D -m 644 "%{SOURCE4}" %{buildroot}%{_unitdir}/mongos.service
|
#install -p -D -m 644 "%{SOURCE4}" %{buildroot}%{_unitdir}/mongos.service
|
||||||
install -p -D -m 644 "%{SOURCE5}" %{buildroot}%{_sysconfdir}/mongos.conf
|
#install -p -D -m 644 "%{SOURCE5}" %{buildroot}%{_sysconfdir}/mongos.conf
|
||||||
install -p -D -m 644 "%{SOURCE6}" %{buildroot}%{_sysconfdir}/sysconfig/mongos
|
#install -p -D -m 644 "%{SOURCE6}" %{buildroot}%{_sysconfdir}/sysconfig/mongos
|
||||||
|
|
||||||
install -p -D -m 644 "%{SOURCE7}" %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
install -p -D -m 644 "%{SOURCE7}" %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
install -p -D -m 644 "%{SOURCE8}" %{buildroot}%{_tmpfilesdir}/mongod.conf
|
||||||
|
|
||||||
install -d %{buildroot}%{_localstatedir}/lib/%{name}
|
install -d %{buildroot}%{_localstatedir}/lib/%{name}
|
||||||
install -d %{buildroot}%{_localstatedir}/log/%{name}
|
install -d %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
@ -143,42 +167,40 @@ getent group %{mongodb_group} >/dev/null || groupadd -g %{mongodb_gid} %{mongodb
|
|||||||
getent passwd %{mongodb_user} >/dev/null || useradd -g %{mongodb_gid} -u %{mongodb_uid} \
|
getent passwd %{mongodb_user} >/dev/null || useradd -g %{mongodb_gid} -u %{mongodb_uid} \
|
||||||
-d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
|
-d %{_localstatedir}/lib/%{name} -s /sbin/nologin \
|
||||||
-c "MongoDB Database Server" %{mongodb_user}
|
-c "MongoDB Database Server" %{mongodb_user}
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
|
%tmpfiles_create mongod.conf
|
||||||
%systemd_post mongod.service
|
%systemd_post mongod.service
|
||||||
%systemd_post mongos.service
|
#% systemd_post mongos.service
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%preun server
|
%preun server
|
||||||
|
|
||||||
%systemd_preun mongod.service
|
%systemd_preun mongod.service
|
||||||
%systemd_preun mongos.service
|
#% systemd_preun mongos.service
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
userdel %{mongodb_user} 2>/dev/null
|
userdel %{mongodb_user} 2>/dev/null
|
||||||
groupdel %{mongodb_group} 2>/dev/null
|
groupdel %{mongodb_group} 2>/dev/null
|
||||||
fi
|
fi
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%postun server
|
%postun server
|
||||||
%systemd_postun_with_restart mongod.service
|
%systemd_postun_with_restart mongod.service
|
||||||
%systemd_postun_with_restart mongos.service
|
#% systemd_postun_with_restart mongos.service
|
||||||
exit 0
|
:
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/mongo
|
%{_bindir}/mongo
|
||||||
#%{_bindir}/mongoperf
|
|
||||||
#%{_bindir}/mongosniff
|
|
||||||
%{_mandir}/man1/mongo.1*
|
%{_mandir}/man1/mongo.1*
|
||||||
#%{_mandir}/man1/mongoperf.1*
|
|
||||||
#%{_mandir}/man1/mongosniff.1*
|
|
||||||
|
|
||||||
%files server
|
%files server
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/mongod
|
%{_bindir}/mongod
|
||||||
%{_bindir}/mongos
|
%{_bindir}/mongos
|
||||||
%{_unitdir}/*.service
|
%{_unitdir}/*.service
|
||||||
%{_tmpfilesdir}/mongodb.conf
|
%{_tmpfilesdir}/mongod.conf
|
||||||
%config(noreplace) %{_sysconfdir}/*.conf
|
%config(noreplace) %{_sysconfdir}/*.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/mongo*
|
%config(noreplace) %{_sysconfdir}/sysconfig/mongo*
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
@ -188,6 +210,9 @@ exit 0
|
|||||||
%{_mandir}/man1/mongos.1*
|
%{_mandir}/man1/mongos.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 18 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.4-1mamba
|
||||||
|
- update to 4.2.4
|
||||||
|
|
||||||
* Thu Jul 04 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.10-1mamba
|
* Thu Jul 04 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.10-1mamba
|
||||||
- update to 4.0.10
|
- update to 4.0.10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user