summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuildscripts/packager-enterprise.py22
-rw-r--r--rpm/mongodb-enterprise-unstable.spec2
-rw-r--r--rpm/mongodb-enterprise.spec2
-rw-r--r--rpm/mongodb-org-unstable.spec2
-rw-r--r--rpm/mongodb-org.spec2
5 files changed, 19 insertions, 11 deletions
diff --git a/buildscripts/packager-enterprise.py b/buildscripts/packager-enterprise.py
index a7c1937e21b..3824afedf62 100755
--- a/buildscripts/packager-enterprise.py
+++ b/buildscripts/packager-enterprise.py
@@ -156,6 +156,12 @@ class Distro(object):
return [ "rhel57", "rhel62" ]
else:
raise Exception("BUG: unsupported platform?")
+
+ def release_dist(self, build_os):
+ """Return the release distribution to use in the rpm - "el5" for rhel 5.x,
+ "el6" for rhel 6.x, return anything else unchanged"""
+
+ return re.sub(r'^rh(el\d).*$', r'\1', build_os)
def main(argv):
(flags, specs) = parse_args(argv[1:])
distros=[Distro(distro) for distro in DISTROS]
@@ -278,7 +284,7 @@ def ensure_dir(filename):
def tarfile(build_os, arch, spec):
"""Return the location where we store the downloaded tarball for
this package"""
- return "dl/mongodb-linux-%s-subscription-%s-%s.tar.gz" % (spec.version(), build_os, arch)
+ return "dl/mongodb-linux-%s-enterprise-%s-%s.tar.gz" % (spec.version(), build_os, arch)
def setupdir(distro, build_os, arch, spec):
# The setupdir will be a directory containing all inputs to the
@@ -299,9 +305,9 @@ def unpack_binaries_into(build_os, arch, spec, where):
# thing and chdir into where and run tar there.
os.chdir(where)
try:
- sysassert(["tar", "xvzf", rootdir+"/"+tarfile(build_os, arch, spec), "mongodb-linux-%s-subscription-%s-%s/bin" % (arch, build_os, spec.version())])
- os.rename("mongodb-linux-%s-subscription-%s-%s/bin" % (arch, build_os, spec.version()), "bin")
- os.rmdir("mongodb-linux-%s-subscription-%s-%s" % (arch, build_os, spec.version()))
+ sysassert(["tar", "xvzf", rootdir+"/"+tarfile(build_os, arch, spec), "mongodb-linux-%s-enterprise-%s-%s/bin" % (arch, build_os, spec.version())])
+ os.rename("mongodb-linux-%s-enterprise-%s-%s/bin" % (arch, build_os, spec.version()), "bin")
+ os.rmdir("mongodb-linux-%s-enterprise-%s-%s" % (arch, build_os, spec.version()))
except Exception:
exc=sys.exc_value
os.chdir(rootdir)
@@ -572,7 +578,8 @@ def make_rpm(distro, build_os, arch, spec, srcdir):
macrofiles=[l for l in backtick(["rpm", "--showrc"]).split("\n") if l.startswith("macrofiles")]
flags=[]
macropath=os.getcwd()+"/macros"
- write_rpm_macros_file(macropath, topdir)
+
+ write_rpm_macros_file(macropath, topdir, distro.release_dist(build_os))
if len(macrofiles)>0:
macrofiles=macrofiles[0]+":"+macropath
rcfile=os.getcwd()+"/rpmrc"
@@ -618,10 +625,11 @@ def write_rpmrc_file(path, string):
finally:
f.close()
-def write_rpm_macros_file(path, topdir):
+def write_rpm_macros_file(path, topdir, release_dist):
f=open(path, 'w')
try:
- f.write("%%_topdir %s" % topdir)
+ f.write("%%_topdir %s\n" % topdir)
+ f.write("%%dist .%s\n" % release_dist)
finally:
f.close()
diff --git a/rpm/mongodb-enterprise-unstable.spec b/rpm/mongodb-enterprise-unstable.spec
index aa9466e6792..f3c8b91c086 100644
--- a/rpm/mongodb-enterprise-unstable.spec
+++ b/rpm/mongodb-enterprise-unstable.spec
@@ -2,7 +2,7 @@ Name: mongodb-enterprise-unstable
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
Obsoletes: mongodb-enterprise-unstable,mongo-enterprise-unstable
Version: 2.5.2
-Release: mongodb_1%{?dist}
+Release: 1%{?dist}
Summary: MongoDB cross-platform document-oriented database system (enterprise metapackage)
License: AGPL 3.0
URL: http://www.mongodb.org
diff --git a/rpm/mongodb-enterprise.spec b/rpm/mongodb-enterprise.spec
index e208c7b9d8d..15e77b904f1 100644
--- a/rpm/mongodb-enterprise.spec
+++ b/rpm/mongodb-enterprise.spec
@@ -2,7 +2,7 @@ Name: mongodb-enterprise
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-unstable, mongodb-enterprise-unstable-mongos, mongodb-enterprise-unstable-server, mongodb-enterprise-unstable-shell, mongodb-enterprise-unstable-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
Obsoletes: mongodb-enterprise-unstable,mongo-enterprise-unstable
Version: 2.6.0
-Release: mongodb_1%{?dist}
+Release: 1%{?dist}
Summary: MongoDB cross-platform document-oriented database system (enterprise metapackage)
License: AGPL 3.0
URL: http://www.mongodb.org
diff --git a/rpm/mongodb-org-unstable.spec b/rpm/mongodb-org-unstable.spec
index 394b5516ccb..4f5f36ff2c0 100644
--- a/rpm/mongodb-org-unstable.spec
+++ b/rpm/mongodb-org-unstable.spec
@@ -1,7 +1,7 @@
Name: mongodb-org-unstable
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: 2.5.2
-Release: mongodb_1%{?dist}
+Release: 1%{?dist}
Summary: MongoDB cross-platform document-oriented database system (metapackage)
License: AGPL 3.0
URL: http://www.mongodb.org
diff --git a/rpm/mongodb-org.spec b/rpm/mongodb-org.spec
index ce759338d4a..7924bcca162 100644
--- a/rpm/mongodb-org.spec
+++ b/rpm/mongodb-org.spec
@@ -1,7 +1,7 @@
Name: mongodb-org
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-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: 2.6.0
-Release: mongodb_1%{?dist}
+Release: 1%{?dist}
Summary: MongoDB cross-platform document-oriented database system (metapackage)
License: AGPL 3.0
URL: http://www.mongodb.org