summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2014-06-13 19:11:56 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2014-09-18 17:45:40 -0400
commit28f15d30094b01c7e699a1ea9dd3185de96a89b5 (patch)
tree09cd2409176c921afef6fc977fe82a4af8a36242
parent1eaf5a41ba94c5787e72fe92ef4a91ac63f6a744 (diff)
downloadmongo-28f15d30094b01c7e699a1ea9dd3185de96a89b5.tar.gz
SERVER-11077 Debian Enterprise packaging
(cherry picked from commit 82feb98aae3d44b7c6e9a6843ea60d3b49d92692)
-rwxr-xr-xbuildscripts/consolidate-repos-enterprise.sh5
-rwxr-xr-xbuildscripts/packager-enterprise.py38
2 files changed, 32 insertions, 11 deletions
diff --git a/buildscripts/consolidate-repos-enterprise.sh b/buildscripts/consolidate-repos-enterprise.sh
index 9907292b632..33754005600 100755
--- a/buildscripts/consolidate-repos-enterprise.sh
+++ b/buildscripts/consolidate-repos-enterprise.sh
@@ -13,8 +13,8 @@ repodir=/var/www-enterprise/repo.consolidated
gpg_recip='<richard@10gen.com>'
-stable_branch="2.4"
-unstable_branch="2.5"
+stable_branch="2.6"
+unstable_branch="2.7"
echo "Using directory: $repodir"
@@ -111,6 +111,7 @@ done
# /var/www-enterprise/repo.consolidated/yum/redhat/5/mongodb-enterprise/unstable -> 2.5
# /var/www-enterprise/repo.consolidated/yum/redhat/6/mongodb-enterprise/unstable -> 2.5
# /var/www-enterprise/repo.consolidated/apt/ubuntu/dists/precise/mongodb-enterprise/unstable -> 2.5
+# /var/www-enterprise/repo.consolidated/apt/debian/dists/wheezy/mongodb-enterprise/unstable -> 2.5
#
for unstable_branch_dir in "$repodir"/yum/redhat/*/*/$unstable_branch "$repodir"/apt/debian/dists/*/*/$unstable_branch "$repodir"/apt/ubuntu/dists/*/*/$unstable_branch
do
diff --git a/buildscripts/packager-enterprise.py b/buildscripts/packager-enterprise.py
index d30bb222f01..cd1a706c644 100755
--- a/buildscripts/packager-enterprise.py
+++ b/buildscripts/packager-enterprise.py
@@ -49,7 +49,7 @@ REPOPATH="/var/www/repo"
ARCHES=["x86_64"]
# Made up names for the flavors of distribution we package for.
-DISTROS=["suse","redhat","ubuntu"]
+DISTROS=["suse","debian","redhat","ubuntu"]
class Spec(object):
@@ -138,6 +138,9 @@ class Distro(object):
repo/apt/ubuntu/dists/precise/mongodb-enterprise/2.5/multiverse/binary-amd64
repo/apt/ubuntu/dists/precise/mongodb-enterprise/2.5/multiverse/binary-i386
+ repo/apt/debian/dists/wheezy/mongodb-enterprise/2.5/main/binary-amd64
+ repo/apt/debian/dists/wheezy/mongodb-enterprise/2.5/main/binary-i386
+
repo/yum/redhat/6/mongodb-enterprise/2.5/x86_64
yum/redhat/6/mongodb-enterprise/2.5/i386
@@ -147,7 +150,7 @@ class Distro(object):
"""
if re.search("^(debian|ubuntu)", self.n):
- return "repo/apt/%s/dists/%s/mongodb-enterprise/%s/multiverse/binary-%s/" % (self.n, self.repo_os_version(build_os), spec.branch(), self.archname(arch))
+ return "repo/apt/%s/dists/%s/mongodb-enterprise/%s/%s/binary-%s/" % (self.n, self.repo_os_version(build_os), spec.branch(), self.repo_component(), self.archname(arch))
elif re.search("(redhat|fedora|centos)", self.n):
return "repo/yum/%s/%s/mongodb-enterprise/%s/%s/RPMS/" % (self.n, self.repo_os_version(build_os), spec.branch(), self.archname(arch))
elif re.search("(suse)", self.n):
@@ -155,6 +158,16 @@ class Distro(object):
else:
raise Exception("BUG: unsupported platform?")
+ def repo_component(self):
+ """Return the name of the section/component/pool we are publishing into -
+ e.g. "multiverse" for Ubuntu, "main" for debian."""
+ if self.n == 'ubuntu':
+ return "multiverse"
+ elif self.n == 'debian':
+ return "main"
+ else:
+ raise Exception("unsupported distro: %s" % self.n)
+
def repo_os_version(self, build_os):
"""Return an OS version suitable for package repo directory
naming - e.g. 5, 6 or 7 for redhat/centos, "precise," "wheezy," etc.
@@ -168,6 +181,11 @@ class Distro(object):
return "precise"
else:
raise Exception("unsupported build_os: %s" % build_os)
+ elif self.n == 'debian':
+ if build_os == 'debian71':
+ return 'wheezy'
+ else:
+ raise Exception("unsupported build_os: %s" % build_os)
else:
raise Exception("unsupported distro: %s" % self.n)
@@ -181,14 +199,16 @@ class Distro(object):
def build_os(self):
"""Return the build os label in the binary package to download ("rhel57" and "rhel62"
- for redhat, "ubuntu1204" for Ubuntu and Debian, and "suse11" for SUSE)"""
+ for redhat, "ubuntu1204" for Ubuntu, "debian71" for Debian, and "suse11" for SUSE)"""
if re.search("(suse)", self.n):
return [ "suse11" ]
- elif re.search("^(debian|ubuntu)", self.n):
- return [ "ubuntu1204" ]
- elif re.search("(redhat|fedora|centos)", self.n):
+ if re.search("(redhat|fedora|centos)", self.n):
return [ "rhel62", "rhel57" ]
+ elif self.n == 'ubuntu':
+ return [ "ubuntu1204" ]
+ elif self.n == 'debian':
+ return [ "debian71" ]
else:
raise Exception("BUG: unsupported platform?")
@@ -430,7 +450,7 @@ def make_deb_repo(repo, distro, build_os, spec):
# Note: the Debian repository Packages files must be generated
# very carefully in order to be usable.
oldpwd=os.getcwd()
- os.chdir(repo+"../../../../")
+ os.chdir(repo+"../../../../../../")
try:
dirs=set([os.path.dirname(deb)[2:] for deb in backtick(["find", ".", "-name", "*.deb"]).split()])
for d in dirs:
@@ -456,9 +476,9 @@ Label: mongodb
Suite: mongodb
Codename: %s/mongodb-enterprise
Architectures: amd64
-Components: multiverse
+Components: %s
Description: MongoDB packages
-""" % (distro.repo_os_version(build_os))
+""" % (distro.repo_os_version(build_os), distro.repo_component())
if os.path.exists(repo+"../../Release"):
os.unlink(repo+"../../Release")
if os.path.exists(repo+"../../Release.gpg"):