代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/mongodb 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global __python %{__python3}
Name: mongodb
Version: 4.5.0
Release: 2
Summary: The global cloud database service for modern applications
License: SSPL
URL: http://www.mongodb.org
Source0: https://github.com/mongodb/mongo/archive/r%{version}.tar.gz
Source1: mongod.conf
Source2: mongod.service
BuildRequires: gcc-c++ >= 5.3.0 boost-devel >= 1.56 gperftools-devel libpcap-devel libstemmer-devel
BuildRequires: openssl-devel pcre-devel python3-scons snappy-devel yaml-cpp-devel zlib-devel systemd
BuildRequires: valgrind-devel libcurl-devel python3-devel python3-yaml python3-requests python3-cheetah
BuildRequires: python3-psutil xz-devel
ExclusiveArch: x86_64 aarch64
%description
MongoDB is a general purpose, document-based, distributed database built for
modern application developers and for the cloud era. No database makes you
more productive.
%package server
Summary: MongoDB database server
Requires(pre): shadow-utils
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Provides: bundled(wiredtiger) = %{version} bundled(asio) = 1.11.0 bundled(icu) = 57.1
Provides: bundled(IntelRDFPMathLib) = 20U1 bundled(timelib) = 2017.05beta10 bundled(mozjs45) = 45.8.0
%description server
Contains the MongoDB server software, default configuration files and systemd service files.
%package test
Summary: MongoDB test suite
Requires: mongodb = %{version}-%{release} mongodb-server = %{version}-%{release}
Requires: python3-pymongo python3-yaml python3-requests
%description test
Contains the regression test suite.
%package help
Summary: Documentation for mongodb
Requires: mongodb = %{version}-%{release} mongodb-server = %{version}-%{release}
BuildArch: noarch
%description help
Documentation for mongodb.
%prep
%autosetup -n mongo-r%{version} -p1
%build
export LANG="en_US.UTF-8"
cat > variables.list << EOF
CCFLAGS="$(echo %{?optflags} | sed -e "s/-O. //" -e "s/-g //")"
MONGO_VERSION="%{version}"
VARIANT_DIR="openeuler"
%ifarch aarch64
CCFLAGS+=" -march=armv8-a+crc"
%endif
EOF
cat > build-options << EOF
%{?_smp_mflags} --disable-warnings-as-errors --variables-files=variables.list
EOF
scons-3 core tools $(cat build-options)
%install
for file in mongod mongos mongo mongobridge; do
install -p -D -m 755 $file %{buildroot}%{_bindir}/$file
done
install -d %{buildroot}%{_sharedstatedir}/mongodb
install -d %{buildroot}%{_localstatedir}/log/mongodb
install -d %{buildroot}%{_localstatedir}/run/mongodb
install -p -D -m 644 "%{SOURCE1}" %{buildroot}%{_sysconfdir}/mongod.conf
install -p -D -m 644 "%{SOURCE2}" %{buildroot}%{_unitdir}/mongod.service
for file in mongo.1 mongod.1 mongos.1; do
install -p -D -m 644 debian/$file %{buildroot}%{_mandir}/man1/$file
done
install -d -D %{buildroot}%{_datadir}/mongodb-test/{var,buildscripts}
install -p -D -m 755 buildscripts/resmoke.py %{buildroot}%{_datadir}/mongodb-test/
install -p -D -m 444 buildscripts/__init__.py %{buildroot}%{_datadir}/mongodb-test/buildscripts/
cp -R buildscripts/resmokeconfig %{buildroot}%{_datadir}/mongodb-test/buildscripts/
cp -R buildscripts/resmokelib %{buildroot}%{_datadir}/mongodb-test/buildscripts/
cp -R jstests %{buildroot}%{_datadir}/mongodb-test/
for file in `find %{buildroot}%{_datadir}/mongodb-test/jstests -type f`; do
chmod a-x $file
done
%pre server
if ! /usr/bin/id -g mongodb &>/dev/null; then
/usr/sbin/groupadd -r mongodb
fi
if ! /usr/bin/id mongodb &>/dev/null; then
/usr/sbin/useradd -M -r -g mongodb -d /var/lib/mongo -s /bin/false -c mongodb mongodb > /dev/null 2>&1
fi
%post server
if test $1 = 1; then
/usr/bin/systemctl enable mongod
fi
if test $1 = 2; then
/usr/bin/systemctl daemon-reload
fi
%preun server
if test $1 = 0; then
/usr/bin/systemctl disable mongod
fi
%postun server
if test $1 -ge 1; then
/usr/bin/systemctl restart mongod >/dev/null 2>&1 || :
fi
%files
%doc APACHE-2.0.txt
%{_bindir}/{mongo,mongobridge}
%files server
%{_bindir}/{mongod,mongos}
%dir %attr(0755, mongodb, root) %{_sharedstatedir}/mongodb
%dir %attr(0750, mongodb, root) %{_localstatedir}/log/mongodb
%dir %attr(0755, mongodb, root) %{_localstatedir}/run/mongodb
%config(noreplace) %{_sysconfdir}/mongod.conf
%{_unitdir}/*.service
%files test
%defattr(-,mongodb,root)
%dir %attr(0755, mongodb, root) %{_datadir}/mongodb-test
%dir %attr(0755, mongodb, root) %{_datadir}/mongodb-test/var
%{_datadir}/mongodb-test/{jstests,buildscripts,resmoke.*,__pycache__}
%files help
%{_mandir}/man1/{mongo.1*,mongod.1*,mongos.1*}
%changelog
* Fri Jun 23 2020 Captain Wei <captain.a.wei@gmail.com> - 4.5.0-2
- add dependency package
* Fri Jun 5 2020 Captain Wei <captain.a.wei@gmail.com> - 4.5.0-1
- update package version
* Fri May 29 2020 panchenbo <panchenbo@uniontech.com> - 4.0.1-5
- Type:bugfix
- ID: NA
- SUG: restart
- DESC: fix service start error
* Thu May 21 2020 yaokai13 <yaokai13@huawei.com> - 4.0.1-4
- Type: cves
- ID: CVE-2020-7921
- SUG: restart
- DESC: fix CVE-2020-7921
* Mon Feb 13 2020 Ling Yang <lingyang2@huawei.com> - 4.0.1-3
- Fixed mongodb-test package build errors
* Wed Feb 8 2020 Ling Yang <lingyang2@huawei.com> - 4.0.1-2
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。