summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2013-09-10 19:25:45 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2013-09-25 21:41:28 -0400
commitcd2f9548a39b1fd215e983610ddb2edd0d694abf (patch)
tree41abfa0d1eddfa10d9ef357ceebaf9b311d8c3e8 /buildscripts
parent7f9402ad7a5d5c741636f04ce1dbdf48b076d65a (diff)
downloadmongo-cd2f9548a39b1fd215e983610ddb2edd0d694abf.tar.gz
SERVER-3579 replace 10gen with mongodb
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/consolidate-repos.sh2
-rwxr-xr-xbuildscripts/packager-enterprise.py56
-rw-r--r--buildscripts/packager.py18
3 files changed, 37 insertions, 39 deletions
diff --git a/buildscripts/consolidate-repos.sh b/buildscripts/consolidate-repos.sh
index 91d80bf09bc..261995bf426 100755
--- a/buildscripts/consolidate-repos.sh
+++ b/buildscripts/consolidate-repos.sh
@@ -52,7 +52,7 @@ echo
for debian_dir in "$repodir"/ubuntu-* "$repodir"/debian-*
do
cd "$debian_dir"
- for arch_dir in dists/dist/10gen/*
+ for arch_dir in dists/dist/mongodb/*
do
echo "Generating Packages file under $debian_dir/$arch_dir"
dpkg-scanpackages --multiversion "$arch_dir" > "$arch_dir"/Packages
diff --git a/buildscripts/packager-enterprise.py b/buildscripts/packager-enterprise.py
index 6c5f2f9a62d..53c83a6169d 100755
--- a/buildscripts/packager-enterprise.py
+++ b/buildscripts/packager-enterprise.py
@@ -44,7 +44,7 @@ import urlparse
# web server will look for repositories.
REPOPATH="/var/www/repo"
-# The 10gen names for the architectures we support.
+# The MongoDB names for the architectures we support.
ARCHES=["x86_64"]
# Made up names for the flavors of distribution we package for.
@@ -88,7 +88,7 @@ class Spec(object):
elif "suffix" in self.params:
return self.params["suffix"]
else:
- return "-10gen-enterprise" if int(self.ver.split(".")[1])%2==0 else "-10gen-unstable"
+ return "-enterprise" if int(self.ver.split(".")[1])%2==0 else "-enterprise-unstable"
def pversion(self, distro):
@@ -116,9 +116,7 @@ class Distro(object):
return self.n
def pkgbase(self):
- # pkgbase is the first part of the package's name on
- # this distro.
- return "mongo" if re.search("(redhat|fedora|centos)", self.n) else "mongodb"
+ return "mongodb"
def archname(self, arch):
if re.search("^(debian|ubuntu)", self.n):
@@ -134,7 +132,7 @@ class Distro(object):
layout (as distinct from where that distro's packaging building
tools place the package files)."""
if re.search("^(debian|ubuntu)", self.n):
- return "repo/%s/dists/dist/10gen/binary-%s/" % (self.n, self.archname(arch))
+ return "repo/%s/dists/dist/mongodb/binary-%s/" % (self.n, self.archname(arch))
elif re.search("(redhat|fedora|centos)", self.n):
return "repo/%s/os/%s/RPMS/" % (self.n, self.archname(arch))
else:
@@ -177,7 +175,7 @@ def main(argv):
os.chdir(prefix)
try:
# Download the binaries.
- urlfmt="http://downloads.10gen.com/linux/mongodb-linux-%s-subscription-%s-%s.tgz"
+ urlfmt="http://downloads.mongodb.com/linux/mongodb-linux-%s-subscription-%s-%s.tgz"
# Build a pacakge for each distro/spec/arch tuple, and
# accumulate the repository-layout directories.
@@ -285,7 +283,7 @@ def setupdir(distro, arch, spec):
# distro's packaging tools (e.g., package metadata files, init
# scripts, etc), along with the already-built binaries). In case
# the following format string is unclear, an example setupdir
- # would be dst/x86_64/debian-sysvinit/mongodb-10gen-unstable/
+ # would be dst/x86_64/debian-sysvinit/mongodb-org-unstable/
return "dst/%s/%s/%s%s-%s/" % (arch, distro.name(), distro.pkgbase(), spec.suffix(), spec.pversion(distro))
def unpack_binaries_into(distro, arch, spec, where):
@@ -400,14 +398,14 @@ def make_deb_repo(repo):
# and must be created after all the Packages.gz files have been
# done.
s="""
-Origin: 10gen
-Label: 10gen
-Suite: 10gen
+Origin: mongodb
+Label: mongodb
+Suite: mongodb
Codename: %s
Version: %s
Architectures: i386 amd64
-Components: 10gen
-Description: 10gen packages
+Components: mongodb
+Description: mongodb packages
""" % ("dist", "dist")
if os.path.exists(repo+"../../Release"):
os.unlink(repo+"../../Release")
@@ -563,7 +561,7 @@ Description: An object/document-oriented database
functionality are the goals for the project.
"""
s=re.sub("@@PACKAGE_BASENAME@@", "mongodb%s" % spec.suffix(), s)
- conflict_suffixes=["", "-stable", "-unstable", "-nightly", "-10gen", "-10gen-unstable", "-10gen-enterprise"]
+ conflict_suffixes=["", "-stable", "-unstable", "-nightly", "-10gen", "-10gen-unstable", "-10gen-enterprise", "-org"]
conflict_suffixes = [suff for suff in conflict_suffixes if suff != spec.suffix()]
s=re.sub("@@PACKAGE_CONFLICTS@@", ", ".join(["mongodb"+suffix for suffix in conflict_suffixes] + [ "mongodb18"+suffix for suffix in conflict_suffixes] + ["mongodb20"+suffix for suffix in conflict_suffixes]), s)
@@ -704,7 +702,7 @@ def make_rpm(distro, arch, spec, srcdir):
# Create the specfile.
suffix=spec.suffix()
sdir=setupdir(distro, arch, spec)
- specfile=sdir+"rpm/mongo%s.spec" % suffix
+ specfile=sdir+"rpm/mongodb%s.spec" % suffix
write_rpm_spec_file(specfile, spec)
topdir=ensure_dir(os.getcwd()+'/rpmbuild/')
for subdir in ["BUILD", "RPMS", "SOURCES", "SPECS", "SRPMS"]:
@@ -747,11 +745,11 @@ def make_rpm(distro, arch, spec, srcdir):
oldcwd=os.getcwd()
os.chdir(sdir+"/../")
try:
- sysassert(["tar", "-cpzf", topdir+"SOURCES/mongo%s-%s.tar.gz" % (suffix, spec.pversion(distro)), os.path.basename(os.path.dirname(sdir))])
+ sysassert(["tar", "-cpzf", topdir+"SOURCES/mongodb%s-%s.tar.gz" % (suffix, spec.pversion(distro)), os.path.basename(os.path.dirname(sdir))])
finally:
os.chdir(oldcwd)
# Do the build.
- sysassert(["rpmbuild", "-ba", "--target", distro_arch] + flags + ["%s/SPECS/mongo%s.spec" % (topdir, suffix)])
+ sysassert(["rpmbuild", "-ba", "--target", distro_arch] + flags + ["%s/SPECS/mongodb%s.spec" % (topdir, suffix)])
r=distro.repodir(arch)
ensure_dir(r)
# FIXME: see if some combination of shutil.copy<hoohah> and glob
@@ -930,7 +928,7 @@ fi
#/etc/rc.d/init.d/mongos
%attr(0755,mongod,mongod) %dir /var/lib/mongo
%attr(0755,mongod,mongod) %dir /var/log/mongo
-%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongo/mongod.log
+%attr(0640,mongod,mongod) %config(noreplace) %verify(not md5 size mtime) /var/log/mongodb/mongod.log
%changelog
* Thu Jan 28 2010 Richard M Kreuter <richard@10gen.com>
@@ -940,25 +938,25 @@ fi
- Wrote mongo.spec.
"""
suffix=spec.suffix()
- s=re.sub("@@PACKAGE_BASENAME@@", "mongo%s" % suffix, s)
+ s=re.sub("@@PACKAGE_BASENAME@@", "mongodb%s" % suffix, s)
s=re.sub("@@PACKAGE_VERSION@@", spec.pversion(Distro("redhat")), s)
# FIXME, maybe: the RPM guide says that Release numbers ought to
# be integers starting at 1, but we use "mongodb_1{%dist}",
# whatever the hell that means.
s=re.sub("@@PACKAGE_REVISION@@", str(int(spec.param("revision"))+1) if spec.param("revision") else "1", s)
s=re.sub("@@BINARYDIR@@", BINARYDIR, s)
- conflict_suffixes=["", "-10gen", "-10gen-unstable", "-10gen-enterprise"]
+ conflict_suffixes=["", "-stable", "-unstable", "-nightly", "-10gen", "-10gen-unstable", "-10gen-enterprise", "-org"]
conflict_suffixes = [suff for suff in conflict_suffixes if suff != spec.suffix()]
s=re.sub("@@PACKAGE_CONFLICTS@@", ", ".join(["mongo"+suffix for suffix in conflict_suffixes] + [ "mongo18"+suffix for suffix in conflict_suffixes] + ["mongo20"+suffix for suffix in conflict_suffixes]), s)
- if suffix.endswith("-10gen"):
- s=re.sub("@@PACKAGE_PROVIDES@@", "mongo-stable", s)
- s=re.sub("@@PACKAGE_OBSOLETES@@", "mongo-stable", s)
- elif suffix == "-10gen-unstable":
- s=re.sub("@@PACKAGE_PROVIDES@@", "mongo-unstable", s)
- s=re.sub("@@PACKAGE_OBSOLETES@@", "mongo-unstable", s)
- elif suffix == "-10gen-enterprise":
- s=re.sub("@@PACKAGE_PROVIDES@@", "mongo-enterprise", s)
- s=re.sub("@@PACKAGE_OBSOLETES@@", "mongo-enterprise", s)
+ if suffix.endswith("-org"):
+ s=re.sub("@@PACKAGE_PROVIDES@@", "mongodb-stable", s)
+ s=re.sub("@@PACKAGE_OBSOLETES@@", "mongodb-stable,mongo-stable", s)
+ elif suffix == "-org-unstable":
+ s=re.sub("@@PACKAGE_PROVIDES@@", "mongodb-unstable", s)
+ s=re.sub("@@PACKAGE_OBSOLETES@@", "mongodb-unstable,mongo-unstable", s)
+ elif suffix == "-enterprise":
+ s=re.sub("@@PACKAGE_PROVIDES@@", "mongodb-enterprise", s)
+ s=re.sub("@@PACKAGE_OBSOLETES@@", "mongodb-enterprise,mongo-enterprise", s)
else:
raise Exception("BUG: unknown suffix %s" % suffix)
diff --git a/buildscripts/packager.py b/buildscripts/packager.py
index e3ff008d883..ef16b773f08 100644
--- a/buildscripts/packager.py
+++ b/buildscripts/packager.py
@@ -44,7 +44,7 @@ import urlparse
# web server will look for repositories.
REPOPATH="/var/www/repo"
-# The 10gen names for the architectures we support.
+# The MongoDB names for the architectures we support.
ARCHES=["i686", "x86_64"]
# Made up names for the flavors of distribution we package for.
@@ -86,7 +86,7 @@ class Spec(object):
elif "suffix" in self.params:
return self.params["suffix"]
else:
- return "-10gen" if int(self.ver.split(".")[1])%2==0 else "-10gen-unstable"
+ return "-org" if int(self.ver.split(".")[1])%2==0 else "-org-unstable"
def pversion(self, distro):
@@ -132,7 +132,7 @@ class Distro(object):
layout (as distinct from where that distro's packaging building
tools place the package files)."""
if re.search("^(debian|ubuntu)", self.n):
- return "repo/%s/dists/dist/10gen/binary-%s/" % (self.n, self.archname(arch))
+ return "repo/%s/dists/dist/mongodb/binary-%s/" % (self.n, self.archname(arch))
elif re.search("(redhat|fedora|centos)", self.n):
return "repo/%s/os/%s/RPMS/" % (self.n, self.archname(arch))
else:
@@ -271,7 +271,7 @@ def setupdir(distro, arch, spec):
# distro's packaging tools (e.g., package metadata files, init
# scripts, etc), along with the already-built binaries). In case
# the following format string is unclear, an example setupdir
- # would be dst/x86_64/debian-sysvinit/mongodb-10gen-unstable/
+ # would be dst/x86_64/debian-sysvinit/mongodb-org-unstable/
return "dst/%s/%s/%s%s-%s/" % (arch, distro.name(), distro.pkgbase(), spec.suffix(), spec.pversion(distro))
def httpget(url, filename):
@@ -419,14 +419,14 @@ def make_deb_repo(repo):
# and must be created after all the Packages.gz files have been
# done.
s="""
-Origin: 10gen
-Label: 10gen
-Suite: 10gen
+Origin: mongodb
+Label: mongodb
+Suite: mongodb
Codename: %s
Version: %s
Architectures: i386 amd64
-Components: 10gen
-Description: 10gen packages
+Components: mongodb
+Description: mongodb packages
""" % ("dist", "dist")
if os.path.exists(repo+"../../Release"):
os.unlink(repo+"../../Release")