mirror of https://github.com/mongodb/mongo
SERVER-52610 Ensure RPM install roots can be relocated
We were not using directory macros in the RPMs, which meant that the installation root could not be changed. When we tried, we got an incomplete install, with some of it going to the new prefix and some going to the host system. Here, we follow RPM packaging guidelines a bit better and use named directory macros instead of explicit paths.
This commit is contained in:
parent
762eb95cd1
commit
9aba0cac77
|
|
@ -24,6 +24,7 @@ end
|
|||
|
||||
execute 'extract artifacts' do
|
||||
command "tar xzvf #{artifacts_tarball}"
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
|
||||
|
|
@ -42,6 +43,7 @@ if platform_family? 'debian'
|
|||
|
||||
execute 'apt-get update' do
|
||||
command 'apt-get update'
|
||||
live_stream true
|
||||
end
|
||||
|
||||
ENV['DEBIAN_FRONTEND'] = 'noninteractive'
|
||||
|
|
@ -51,6 +53,7 @@ if platform_family? 'debian'
|
|||
# for enterprise builds. We install dependencies in the next block.
|
||||
execute 'install mongod' do
|
||||
command 'dpkg -i `find . -name "*server*.deb"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
returns [0, 1]
|
||||
end
|
||||
|
|
@ -58,6 +61,7 @@ if platform_family? 'debian'
|
|||
# install the tools so we can test install_compass
|
||||
execute 'install mongo tools' do
|
||||
command 'dpkg -i `find . -name "*tools-extra*.deb"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
returns [0, 1]
|
||||
end
|
||||
|
|
@ -67,16 +71,19 @@ if platform_family? 'debian'
|
|||
# to install dependencies after the fact.
|
||||
execute 'install dependencies' do
|
||||
command 'apt-get update && apt-get -y -f install'
|
||||
live_stream true
|
||||
end
|
||||
|
||||
# the ubuntu 16.04 image does not have python installed by default
|
||||
# and it is required for the install_compass script
|
||||
execute 'install python' do
|
||||
command 'apt-get install -y python'
|
||||
live_stream true
|
||||
end
|
||||
|
||||
execute 'install mongo shell' do
|
||||
command 'dpkg -i `find . -name "*shell*.deb"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
end
|
||||
|
|
@ -84,17 +91,20 @@ end
|
|||
if platform_family? 'rhel'
|
||||
execute 'install mongod' do
|
||||
command 'yum install -y `find . -name "*server*.rpm"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
|
||||
# install the tools so we can test install_compass
|
||||
execute 'install mongo tools' do
|
||||
command 'yum install -y `find . -name "*tools-extra*.rpm"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
|
||||
execute 'install mongo shell' do
|
||||
command 'yum install -y `find . -name "*shell*.rpm"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
end
|
||||
|
|
@ -114,21 +124,24 @@ if platform_family? 'suse'
|
|||
done
|
||||
exit 1
|
||||
EOD
|
||||
flags "-x"
|
||||
end
|
||||
|
||||
execute 'install mongod' do
|
||||
command 'zypper --no-gpg-checks -n install `find . -name "*server*.rpm"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
|
||||
execute 'install mongo' do
|
||||
command 'zypper --no-gpg-checks -n install `find . -name "*shell*.rpm"`'
|
||||
live_stream true
|
||||
cwd homedir
|
||||
end
|
||||
end
|
||||
|
||||
inspec_wait = <<HEREDOC
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
ulimit -v unlimited
|
||||
for i in {1..60}
|
||||
do
|
||||
|
|
|
|||
|
|
@ -775,50 +775,7 @@ def make_rpm(distro, build_os, arch, spec, srcdir): # pylint: disable=too-many-
|
|||
for subdir in ["BUILD", "RPMS", "SOURCES", "SPECS", "SRPMS"]:
|
||||
ensure_dir("%s/%s/" % (topdir, subdir))
|
||||
distro_arch = distro.archname(arch)
|
||||
# RPM tools take these macro files that define variables in
|
||||
# RPMland. Unfortunately, there's no way to tell RPM tools to use
|
||||
# a given file *in addition* to the files that it would already
|
||||
# load, so we have to figure out what it would normally load,
|
||||
# augment that list, and tell RPM to use the augmented list. To
|
||||
# figure out what macrofiles ordinarily get loaded, older RPM
|
||||
# versions had a parameter called "macrofiles" that could be
|
||||
# extracted from "rpm --showrc". But newer RPM versions don't
|
||||
# have this. To tell RPM what macros to use, older versions of
|
||||
# RPM have a --macros option that doesn't work; on these versions,
|
||||
# you can put a "macrofiles" parameter into an rpmrc file. But
|
||||
# that "macrofiles" setting doesn't do anything for newer RPM
|
||||
# versions, where you have to use the --macros flag instead. And
|
||||
# all of this is to let us do our work with some guarantee that
|
||||
# we're not clobbering anything that doesn't belong to us.
|
||||
#
|
||||
# On RHEL systems, --rcfile will generally be used and
|
||||
# --macros will be used in Ubuntu.
|
||||
#
|
||||
macrofiles = [
|
||||
l for l in backtick(["rpm", "--showrc"]).decode('utf-8').split("\n")
|
||||
if l.startswith("macrofiles")
|
||||
]
|
||||
flags = []
|
||||
macropath = os.getcwd() + "/macros"
|
||||
|
||||
write_rpm_macros_file(macropath, topdir, distro.release_dist(build_os))
|
||||
if macrofiles:
|
||||
macrofiles = macrofiles[0] + ":" + macropath
|
||||
rcfile = os.getcwd() + "/rpmrc"
|
||||
write_rpmrc_file(rcfile, macrofiles)
|
||||
flags = ["--rcfile", rcfile]
|
||||
else:
|
||||
# This hard-coded hooey came from some box running RPM
|
||||
# 4.4.2.3. It may not work over time, but RPM isn't sanely
|
||||
# configurable.
|
||||
flags = [
|
||||
"--macros",
|
||||
"/usr/lib/rpm/macros:/usr/lib/rpm/%s-linux/macros:/usr/lib/rpm/suse/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%s-linux/macros:~/.rpmmacros:%s"
|
||||
% (distro_arch, distro_arch, macropath)
|
||||
]
|
||||
# Put the specfile and the tar'd up binaries and stuff in
|
||||
# place.
|
||||
#
|
||||
# The version of rpm and rpm tools in RHEL 5.5 can't interpolate the
|
||||
# %{dynamic_version} macro, so do it manually
|
||||
with open(specfile, "r") as spec_source:
|
||||
|
|
@ -840,10 +797,18 @@ def make_rpm(distro, build_os, arch, spec, srcdir): # pylint: disable=too-many-
|
|||
os.chdir(oldcwd)
|
||||
# Do the build.
|
||||
|
||||
flags.extend([
|
||||
"-D", "dynamic_version " + spec.pversion(distro), "-D",
|
||||
"dynamic_release " + spec.prelease(), "-D", "_topdir " + topdir
|
||||
])
|
||||
flags = [
|
||||
"-D",
|
||||
f"_topdir {topdir}",
|
||||
"-D",
|
||||
f"dist .{distro.release_dist(build_os)}",
|
||||
"-D",
|
||||
f"_use_internal_dependency_generator 0",
|
||||
"-D",
|
||||
f"dynamic_version {spec.pversion(distro)}",
|
||||
"-D",
|
||||
f"dynamic_release {spec.prelease()}",
|
||||
]
|
||||
|
||||
# Versions of RPM after 4.4 ignore our BuildRoot tag so we need to
|
||||
# specify it on the command line args to rpmbuild
|
||||
|
|
@ -874,20 +839,6 @@ def make_rpm_repo(repo):
|
|||
os.chdir(oldpwd)
|
||||
|
||||
|
||||
def write_rpmrc_file(path, string):
|
||||
"""Write the RPM rc file."""
|
||||
with open(path, 'w') as fh:
|
||||
fh.write(string)
|
||||
|
||||
|
||||
def write_rpm_macros_file(path, topdir, release_dist):
|
||||
"""Write the RPM macros file."""
|
||||
with open(path, 'w') as fh:
|
||||
fh.write("%%_topdir %s\n" % topdir)
|
||||
fh.write("%%dist .%s\n" % release_dist)
|
||||
fh.write("%_use_internal_dependency_generator 0\n")
|
||||
|
||||
|
||||
def ensure_dir(filename):
|
||||
"""Ensure that the dirname directory of filename exists, and return filename."""
|
||||
dirpart = os.path.dirname(filename)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-enterprise
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-cryptd, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools
|
||||
Obsoletes: mongodb-enterprise-unstable, mongo-enterprise-unstable, mongo-10gen-enterprise
|
||||
Provides: mongo-10gen-enterprise
|
||||
|
|
@ -11,6 +17,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-enterprise-server = %{version}, mongodb-enterprise-shell = %{version}, mongodb-enterprise-mongos = %{version}, mongodb-enterprise-tools = %{version}, mongodb-enterprise-cryptd = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -215,27 +225,33 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
|
@ -270,15 +286,15 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/etc/init.d/mongod
|
||||
%config(noreplace) /etc/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_sysconfdir}/init.d/mongod
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc snmp/MONGOD-MIB.txt
|
||||
%doc snmp/MONGODBINC-MIB.txt
|
||||
%doc snmp/mongod.conf.master
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-enterprise-unstable
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-cryptd, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools
|
||||
Obsoletes: mongodb-enterprise-unstable,mongo-enterprise-unstable
|
||||
Version: %{dynamic_version}
|
||||
|
|
@ -10,6 +16,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-enterprise-unstable-server = %{version}, mongodb-enterprise-unstable-shell = %{version}, mongodb-enterprise-unstable-mongos = %{version}, mongodb-enterprise-unstable-tools = %{version}, mongodb-enterprise-unstable-cryptd = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -204,27 +214,33 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
|
||||
|
||||
|
|
@ -261,15 +277,15 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/etc/init.d/mongod
|
||||
%config(noreplace) /etc/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_sysconfdir}/init.d/mongod
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc snmp/MONGOD-MIB.txt
|
||||
%doc snmp/MONGODBINC-MIB.txt
|
||||
%doc snmp/mongod.conf.master
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-enterprise-unstable
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-enterprise-cryptd, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools
|
||||
Obsoletes: mongodb-enterprise-unstable,mongo-enterprise-unstable
|
||||
Version: %{dynamic_version}
|
||||
|
|
@ -10,6 +16,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-enterprise-unstable-server = %{version}, mongodb-enterprise-unstable-shell = %{version}, mongodb-enterprise-unstable-mongos = %{version}, mongodb-enterprise-unstable-tools = %{version}, mongodb-enterprise-unstable-cryptd = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -44,7 +54,13 @@ Summary: MongoDB database server (enterprise)
|
|||
Group: Applications/Databases
|
||||
Requires: openssl, net-snmp, cyrus-sasl, cyrus-sasl-plain, cyrus-sasl-gssapi, %{timezone_pkg}, %{python_pkg}
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools
|
||||
|
||||
%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 700 || 0%{?fedora} >= 15
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%description server
|
||||
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDB’s native replication and automated failover enable enterprise-grade reliability and operational flexibility.
|
||||
|
|
@ -207,24 +223,30 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
|
||||
|
||||
|
|
@ -266,14 +288,14 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/lib/systemd/system/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_unitdir}/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc snmp/MONGOD-MIB.txt
|
||||
%doc snmp/MONGODBINC-MIB.txt
|
||||
%doc snmp/mongod.conf.master
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-enterprise
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools, mongodb-enterprise-unstable-cryptd, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools
|
||||
Obsoletes: mongodb-enterprise-unstable, mongo-enterprise-unstable, mongo-10gen-enterprise
|
||||
Provides: mongo-10gen-enterprise
|
||||
|
|
@ -11,6 +17,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-enterprise-server = %{version}, mongodb-enterprise-shell = %{version}, mongodb-enterprise-mongos = %{version}, mongodb-enterprise-tools = %{version}, mongodb-enterprise-cryptd = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -48,6 +58,13 @@ Conflicts: mongo-10gen, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-un
|
|||
Obsoletes: mongo-10gen-enterprise-server
|
||||
Provides: mongo-10gen-enterprise-server
|
||||
|
||||
%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 700 || 0%{?fedora} >= 15
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%description server
|
||||
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDB’s native replication and automated failover enable enterprise-grade reliability and operational flexibility.
|
||||
|
||||
|
|
@ -217,25 +234,30 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s,ldap,kerberos}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
|
@ -273,14 +295,14 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/lib/systemd/system/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_unitdir}/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc snmp/MONGOD-MIB.txt
|
||||
%doc snmp/MONGODBINC-MIB.txt
|
||||
%doc snmp/mongod.conf.master
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-org
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools
|
||||
Version: %{dynamic_version}
|
||||
Release: %{dynamic_release}%{?dist}
|
||||
|
|
@ -11,6 +17,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-org-server = %{version}, mongodb-org-shell = %{version}, mongodb-org-mongos = %{version}, mongodb-org-tools = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -191,27 +201,33 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
|
@ -246,15 +262,15 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/etc/init.d/mongod
|
||||
%config(noreplace) /etc/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_sysconfdir}/init.d/mongod
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc LICENSE-Community.txt
|
||||
%doc README
|
||||
%doc THIRD-PARTY-NOTICES
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-org-unstable
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools
|
||||
Version: %{dynamic_version}
|
||||
Release: %{dynamic_release}%{?dist}
|
||||
|
|
@ -9,6 +15,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-org-unstable-server = %{version}, mongodb-org-unstable-shell = %{version}, mongodb-org-unstable-mongos = %{version}, mongodb-org-unstable-tools = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -179,27 +189,33 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT/etc/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
||||
cp -v rpm/init.d-mongod $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
cp -v rpm/mongod.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mongod
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
|
||||
|
||||
|
|
@ -236,15 +252,15 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/etc/init.d/mongod
|
||||
%config(noreplace) /etc/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_sysconfdir}/init.d/mongod
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/mongod
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc LICENSE-Community.txt
|
||||
%doc README
|
||||
%doc THIRD-PARTY-NOTICES
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-org-unstable
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools
|
||||
Version: %{dynamic_version}
|
||||
Release: %{dynamic_release}%{?dist}
|
||||
|
|
@ -9,6 +15,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-org-unstable-server = %{version}, mongodb-org-unstable-shell = %{version}, mongodb-org-unstable-mongos = %{version}, mongodb-org-unstable-tools = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -44,6 +54,13 @@ Group: Applications/Databases
|
|||
Requires: openssl, %{timezone_pkg}, %{python_pkg}
|
||||
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org, mongodb-org-mongos, mongodb-org-server, mongodb-org-shell, mongodb-org-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools
|
||||
|
||||
%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 700 || 0%{?fedora} >= 15
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%description server
|
||||
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDB’s native replication and automated failover enable enterprise-grade reliability and operational flexibility.
|
||||
|
||||
|
|
@ -181,26 +198,30 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
|
@ -239,14 +260,14 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/lib/systemd/system/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_unitdir}/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc LICENSE-Community.txt
|
||||
%doc README
|
||||
%doc THIRD-PARTY-NOTICES
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Name: mongodb-org
|
||||
Prefix: /usr
|
||||
Prefix: /var
|
||||
Prefix: /etc
|
||||
Conflicts: mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable-enterprise-server, mongo-10gen-unstable-enterprise-shell, mongo-10gen-unstable-enterprise-tools, mongo-10gen-unstable-mongos, mongo-10gen-unstable-server, mongo-10gen-unstable-shell, mongo-10gen-unstable-tools, mongo18-10gen, mongo18-10gen-server, mongo20-10gen, mongo20-10gen-server, mongodb, mongodb-server, mongodb-dev, mongodb-clients, mongodb-10gen, mongodb-10gen-enterprise, mongodb-10gen-unstable, mongodb-10gen-unstable-enterprise, mongodb-10gen-unstable-enterprise-mongos, mongodb-10gen-unstable-enterprise-server, mongodb-10gen-unstable-enterprise-shell, mongodb-10gen-unstable-enterprise-tools, mongodb-10gen-unstable-mongos, mongodb-10gen-unstable-server, mongodb-10gen-unstable-shell, mongodb-10gen-unstable-tools, mongodb-enterprise, mongodb-enterprise-mongos, mongodb-enterprise-server, mongodb-enterprise-shell, mongodb-enterprise-tools, mongodb-nightly, mongodb-org-unstable, mongodb-org-unstable-mongos, mongodb-org-unstable-server, mongodb-org-unstable-shell, mongodb-org-unstable-tools, mongodb-stable, mongodb18-10gen, mongodb20-10gen, mongodb-enterprise-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-tools
|
||||
Version: %{dynamic_version}
|
||||
Release: %{dynamic_release}%{?dist}
|
||||
|
|
@ -11,6 +17,10 @@ URL: http://www.mongodb.org
|
|||
Group: Applications/Databases
|
||||
Requires: mongodb-org-server = %{version}, mongodb-org-shell = %{version}, mongodb-org-mongos = %{version}, mongodb-org-tools = %{version}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
BuildRequires: /usr/bin/pathfix.py, python3-devel
|
||||
%endif
|
||||
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
|
||||
|
|
@ -48,6 +58,13 @@ Conflicts: mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-un
|
|||
Obsoletes: mongo-10gen-server
|
||||
Provides: mongo-10gen-server
|
||||
|
||||
%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 700 || 0%{?fedora} >= 15
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%else
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
|
||||
%description server
|
||||
MongoDB is built for scalability, performance and high availability, scaling from single server deployments to large, complex multi-site architectures. By leveraging in-memory computing, MongoDB provides high performance for both reads and writes. MongoDB’s native replication and automated failover enable enterprise-grade reliability and operational flexibility.
|
||||
|
||||
|
|
@ -193,24 +210,30 @@ MongoDB features:
|
|||
|
||||
This package provides the MongoDB static library and header files needed to develop MongoDB client software.
|
||||
|
||||
#Release builds have no debug symbols, and this prevents packaging errors on RHEL 8.0
|
||||
%global debug_package %{nil}
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" bin/install_compass
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr
|
||||
cp -rv bin $RPM_BUILD_ROOT/usr
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/etc
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT/etc/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT/var/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/mongodb
|
||||
touch $RPM_BUILD_ROOT/var/log/mongodb/mongod.log
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
cp -rv bin $RPM_BUILD_ROOT%{_prefix}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
cp debian/mongo{,d,s}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||
cp -v rpm/mongod.conf $RPM_BUILD_ROOT%{_sysconfdir}/mongod.conf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
cp -v rpm/mongod.service $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/mongo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rundir}/mongodb
|
||||
touch $RPM_BUILD_ROOT%{_localstatedir}/log/mongodb/mongod.log
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
|
@ -249,14 +272,14 @@ fi
|
|||
|
||||
%files server
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) /etc/mongod.conf
|
||||
%config(noreplace) %{_sysconfdir}/mongod.conf
|
||||
%{_bindir}/mongod
|
||||
%{_mandir}/man1/mongod.1*
|
||||
/lib/systemd/system/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir /var/lib/mongo
|
||||
%attr(0755,mongod,mongod) %dir /var/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir /var/run/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
|
||||
%{_unitdir}/mongod.service
|
||||
%attr(0755,mongod,mongod) %dir %{_sharedstatedir}/mongo
|
||||
%attr(0755,mongod,mongod) %dir %{_localstatedir}/log/mongodb
|
||||
%attr(0755,mongod,mongod) %dir %{_rundir}/mongodb
|
||||
%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) %{_localstatedir}/log/mongodb/mongod.log
|
||||
%doc LICENSE-Community.txt
|
||||
%doc README
|
||||
%doc THIRD-PARTY-NOTICES
|
||||
|
|
|
|||
Loading…
Reference in New Issue