diff --git a/build/libs/packager/utils.py b/build/libs/packager/utils.py index bfa2e8c83..f3bb98b17 100644 --- a/build/libs/packager/utils.py +++ b/build/libs/packager/utils.py @@ -318,15 +318,18 @@ def update_repoinfo(self, *pkgcfgs): for pkg in pkgcfg.keys(): pkgcfg[pkg]['repo'] = self.repo_dir - @staticmethod - def get_dict_by_item(tdict, titem): + def get_dict_by_item(self, tdict, titem): + '''converts a given dict with given items as keys + ''' matrix = {} cfg_itemgetter = operator.itemgetter(titem) for key, items in tdict.items(): - matrix_key = cfg_itemgetter(items) - if not matrix.has_key(matrix_key): - matrix[matrix_key] = {} - matrix[matrix_key].update({key: items}) + matrix_keys = cfg_itemgetter(items) + matrix_keys = self.get_as_list(matrix_keys) + for matrix_key in matrix_keys: + if not matrix.has_key(matrix_key): + matrix[matrix_key] = {} + matrix[matrix_key].update({key: items}) return matrix def copy_pkg_files(self, pkginfo, error=True): diff --git a/build/package_configs/centos64/grizzly/base_packages.cfg b/build/package_configs/centos64/grizzly/base_packages.cfg index 82da31389..d0d1c4e3a 100755 --- a/build/package_configs/centos64/grizzly/base_packages.cfg +++ b/build/package_configs/centos64/grizzly/base_packages.cfg @@ -14,7 +14,7 @@ file = md5 = location = -package_type = contrail-install-packages +package_type = contrail-thirdparty-packages [busybox] file = busybox-1.15.1-15.el6.x86_64.rpm @@ -191,6 +191,7 @@ md5 = f1cc9be2415c339c34d25859713524fd [python-libs] file = python-libs-2.6.6-36.el6.x86_64.rpm md5 = 7fab78cc404d664c6d1b3ad6bdf9cc55 +package_type = contrail-install-packages [libxcb] file = libxcb-1.8.1-1.el6.x86_64.rpm @@ -403,6 +404,7 @@ md5 = e8846e8f42eb877abc2fce1c8bd2f0e9 [python] file = python-2.6.6-36.el6.x86_64.rpm md5 = b5a4f61795e5b528c4eaf7228c5de3da +package_type = contrail-install-packages [iwl3945-firmware-15] file = iwl3945-firmware-15.32.2.9-4.el6.noarch.rpm @@ -463,6 +465,7 @@ md5 = 8243119d7d4d578fdc780161ee286eff [libgcc] file = libgcc-4.4.7-3.el6.x86_64.rpm md5 = 5fac9df2b48d0ac91d247476c6366b63 +package_type = contrail-install-packages [efibootmgr] file = efibootmgr-0.5.4-10.el6.x86_64.rpm @@ -499,6 +502,7 @@ md5 = 5cf74fcbb754ef0bd054aa8f5f23e781 [glibc-common] file = glibc-common-2.12-1.107.el6.x86_64.rpm md5 = 5608b1be8bd3c4d7c9f95b02780af7d5 +package_type = contrail-install-packages [ncurses-libs] file = ncurses-libs-5.7-3.20090208.el6.x86_64.rpm @@ -527,6 +531,7 @@ md5 = 1b494b261f0f8793012cd5a982d110be [openssl] file = openssl-1.0.0-27.el6.x86_64.rpm md5 = 0263f276e14100d693612a084b81c777 +package_type = contrail-install-packages [iwl5000-firmware] file = iwl5000-firmware-8.83.5.1_1-1.el6_1.1.noarch.rpm @@ -1579,3 +1584,4 @@ md5 = 52a9d21922ca00962fc3e287b86de51c [glibc] file = glibc-2.12-1.107.el6.x86_64.rpm md5 = b73f6a0a44d1335f0ea6ca484b66f762 +package_type = contrail-install-packages diff --git a/build/package_configs/centos64/grizzly/contrail_packages.cfg b/build/package_configs/centos64/grizzly/contrail_packages.cfg index f3f2bda34..be89e8d41 100644 --- a/build/package_configs/centos64/grizzly/contrail_packages.cfg +++ b/build/package_configs/centos64/grizzly/contrail_packages.cfg @@ -259,10 +259,19 @@ makeloc = tools/packaging/openstack/centos_64 pkgs = openstack-quantum, python-quantum, openstack-quantum-contrail makeloc = tools/packaging/openstack/centos_64 +[contrail-nodemgr] +pkgs = contrail-nodemgr +makeloc = tools/packaging/common/rpm + [contrail-install-packages] pkgs = contrail-install-packages makeloc = tools/packaging/common/rpm +[contrail-thirdparty-packages] +pkgs = contrail-thirdparty-packages +makeloc = tools/packaging/common/rpm +package_type = contrail-thirdparty-packages + [thirdparty-default-target] pkgs = makeloc = tools/packaging/third_party/ @@ -277,7 +286,3 @@ target = all pkgs = makeloc = tools/packaging/openstack/centos_64 target = all - -[contrail-nodemgr] -pkgs = contrail-nodemgr -makeloc = tools/packaging/common/rpm diff --git a/build/package_configs/centos64/grizzly/depends_packages.cfg b/build/package_configs/centos64/grizzly/depends_packages.cfg index 0c0c055a1..5c1663f8e 100755 --- a/build/package_configs/centos64/grizzly/depends_packages.cfg +++ b/build/package_configs/centos64/grizzly/depends_packages.cfg @@ -14,7 +14,7 @@ md5 = file = location = -package_type = contrail-install-packages +package_type = contrail-thirdparty-packages [python-routes] file = python-routes-1.12-3.noarch.rpm @@ -191,6 +191,7 @@ md5 = fc7a72ac763a0e42fbb5efd459428a50 [python-setuptools] file = python-setuptools-0.6.10-3.el6.noarch.rpm md5 = e00e7bd03739b7a1d67160ae42bfd365 +package_type = contrail-install-packages [boost-devel] file = boost-devel-1.41.0-17.el6_4.x86_64.rpm @@ -295,6 +296,7 @@ md5 = 4b2d7a8e456553708caadff14e8593e4 [python-netaddr] file = python-netaddr-0.7.5-4.el6.noarch.rpm md5 = 4154369058390ca392e65ca77f3bc0f3 +package_type = contrail-install-packages [libXfont] file = libXfont-1.4.5-2.el6.x86_64.rpm @@ -315,6 +317,7 @@ md5 = e85d23d6c48fa6617a2bc89847bdffbb [gdb] file = gdb-7.2-60.el6_4.1.x86_64.rpm md5 = d4822fdada0f37ad97c0b3ff31d8ed3a +package_type = contrail-install-packages [python-requests] file = python-requests-1.1.0-3.el6.noarch.rpm @@ -479,6 +482,7 @@ md5 = b2a5327458e7942480ff754c8508c9fd [kernel-headers] file = kernel-headers-2.6.32-358.11.1.el6.x86_64.rpm md5 = 4b22a87a61351956718b356c4f9cd417 +package_type = contrail-install-packages [btrfs-progs] file = btrfs-progs-0.20-0.2.git91d9eec.el6.x86_64.rpm @@ -639,6 +643,7 @@ md5 = 62fe935e8d6a978d9856379c0915f9f4 [openstack-utils-2013] file = openstack-utils-2013.1-7.el6.noarch.rpm md5 = 5c0a717b8b6b1c73077651adde110bf2 +package_type = contrail-install-packages [xml-commons-resolver] file = xml-commons-resolver-1.1-4.18.el6.x86_64.rpm @@ -675,6 +680,7 @@ md5 = ae96ca52af388833201c5a811947d98e [glibc-headers] file = glibc-headers-2.12-1.107.el6.x86_64.rpm md5 = 2a23ef15c19ca3a44c93abb5e1af555a +package_type = contrail-install-packages [usermode-gtk] file = usermode-gtk-1.102-3.el6.x86_64.rpm @@ -719,6 +725,7 @@ md5 = 06df0aa4aeb9cde33974de5b425828c2 [ppl] file = ppl-0.10.2-11.el6.x86_64.rpm md5 = 248fd5af655e66af417992c726ffb45c +package_type = contrail-install-packages [libtool-ltdl] file = libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm @@ -835,6 +842,7 @@ md5 = db0eab9a496d934bcd78c923296558e1 [cloog-ppl] file = cloog-ppl-0.15.7-1.2.el6.x86_64.rpm md5 = fb0fd43ad45c05f78c67e39ed274df7e +package_type = contrail-install-packages [spice-server] file = spice-server-0.12.0-12.el6_4.1.x86_64.rpm @@ -961,8 +969,9 @@ file = avahi-autoipd-0.6.25-12.el6.x86_64.rpm md5 = fba319c70b532175664759a137577fed [python-pip] -file = python-pip-1.3.1-1.el6.noarch.rpm -md5 = 11aade49712d4cd94d64aff8241622a5 +file = python-pip-1.3.1-1.el6.noarch.rpm +md5 = 11aade49712d4cd94d64aff8241622a5 +package_type = contrail-install-packages [boost-program-options] file = boost-program-options-1.41.0-17.el6_4.x86_64.rpm @@ -1083,10 +1092,12 @@ md5 = d14904005982c71a8f33340082d4146b [glibc-devel] file = glibc-devel-2.12-1.107.el6.x86_64.rpm md5 = 4405c8b28e87bc9c7ed5824c271cc381 +package_type = contrail-install-packages [gcc] file = gcc-4.4.7-3.el6.x86_64.rpm md5 = f4ed3e065e2e855974544c7793eb814b +package_type = contrail-install-packages [python-six] file = python-six-1.1.0-2.el6.noarch.rpm @@ -1099,6 +1110,7 @@ md5 = 7e861daa47ecabde9ad3c10fbcb08ad6 [python-argparse] file = python-argparse-1.2.1-2.el6.noarch.rpm md5 = 68d75eb21ff03c204e9f9ef3cba74c3e +package_type = contrail-install-packages [libreport-newt] file = libreport-newt-2.0.9-15.el6.centos.x86_64.rpm @@ -1115,6 +1127,7 @@ md5 = 66df1ddfa1a1296416a4f3c40adfba3d [python-devel] file = python-devel-2.6.6-36.el6.x86_64.rpm md5 = b1edf68117328a3e2e7e9a48261a6a7a +package_type = contrail-install-packages [python-django-appconf] file = python-django-appconf-0.5-2.el6.noarch.rpm @@ -1259,6 +1272,7 @@ md5 = 41901435b2496830b9ae631958bb624d [libgomp] file = libgomp-4.4.7-3.el6.x86_64.rpm md5 = c903d08e74fb1fe8ad98d149aa2be9d2 +package_type = contrail-install-packages [vgabios] file = vgabios-0.6b-3.7.el6.noarch.rpm @@ -1327,10 +1341,12 @@ md5 = 41edac929c33f7145d361591eb3af1b6 [python-netifaces] file = python-netifaces-0.5-1.el6.x86_64.rpm md5 = 248e1b9b853bda52114791bf0600f8da +package_type = contrail-install-packages [cpp] file = cpp-4.4.7-3.el6.x86_64.rpm md5 = b061c0a095c0f3c3a2bf70ff6a763424 +package_type = contrail-install-packages [cracklib-python] file = cracklib-python-2.8.16-4.el6.x86_64.rpm @@ -1339,6 +1355,7 @@ md5 = f6902845b64561e632a6730fcc2c42c7 [mpfr] file = mpfr-2.4.1-6.el6.x86_64.rpm md5 = c9b194bb693cae173c06a7dea19f3bd7 +package_type = contrail-install-packages [libuv] file = libuv-0.10.5-1.el6.x86_64.rpm @@ -1547,6 +1564,7 @@ md5 = c6e10baa3955bb7fd3f335182389a6ec [make] file = make-3.81-20.el6.x86_64.rpm md5 = 556348c198696e9edbf77c71c5fbc601 +package_type = contrail-install-packages [mesa-dri1-drivers] file = mesa-dri1-drivers-7.11-8.el6.x86_64.rpm @@ -1595,6 +1613,7 @@ md5 = df244d55c46e20a7de47c3a58c6f0869 [openssl] file = openssl-1.0.1e-16.el6_5.7.x86_64.rpm md5 = 4d13d3df8275165f778e8d024506505f +package_type = contrail-install-packages [rabbitmq-server] file = rabbitmq-server-3.2.2-1.noarch.rpm diff --git a/build/package_configs/centos64/havana/contrail_packages.cfg b/build/package_configs/centos64/havana/contrail_packages.cfg index 9d1fa792a..104ae11c2 100644 --- a/build/package_configs/centos64/havana/contrail_packages.cfg +++ b/build/package_configs/centos64/havana/contrail_packages.cfg @@ -224,10 +224,19 @@ makeloc = tools/packaging/openstack/centos_64 pkgs = contrail-openstack-dashboard makeloc = tools/packaging/openstack/centos_64 +[contrail-nodemgr] +pkgs = contrail-nodemgr +makeloc = tools/packaging/common/rpm + [contrail-install-packages] pkgs = contrail-install-packages makeloc = tools/packaging/common/rpm +[contrail-thirdparty-packages] +pkgs = contrail-thirdparty-packages +makeloc = tools/packaging/common/rpm +package_type = contrail-thirdparty-packages + [thirdparty-default-target] pkgs = makeloc = tools/packaging/third_party/ @@ -242,7 +251,3 @@ target = all pkgs = makeloc = tools/packaging/openstack/centos_64 target = all - -[contrail-nodemgr] -pkgs = contrail-nodemgr -makeloc = tools/packaging/common/rpm diff --git a/build/package_configs/centos64/havana/depends_packages.cfg b/build/package_configs/centos64/havana/depends_packages.cfg index 6a000ca3a..ae6f919b8 100755 --- a/build/package_configs/centos64/havana/depends_packages.cfg +++ b/build/package_configs/centos64/havana/depends_packages.cfg @@ -14,7 +14,7 @@ md5 = file = location = -package_type = contrail-install-packages +package_type = contrail-thirdparty-packages [abrt] file = abrt-2.0.8-21.el6.centos.x86_64.rpm @@ -83,6 +83,7 @@ md5 = b3d2c0d4fd992543832b755a7d698be8 [cloog-ppl] file = cloog-ppl-0.15.7-1.2.el6.x86_64.rpm md5 = fb0fd43ad45c05f78c67e39ed274df7e +package_type = contrail-install-packages [ConsoleKit] file = ConsoleKit-0.4.1-3.el6.x86_64.rpm @@ -95,6 +96,7 @@ md5 = ae8fec760355150276635b9ec4e993f9 [cpp] file = cpp-4.4.7-4.el6.x86_64.rpm md5 = 7f1d49c96cabeb4427c0ac1c388988cf +package_type = contrail-install-packages [cryptsetup-luks] file = cryptsetup-luks-1.2.0-7.el6.x86_64.rpm @@ -167,10 +169,12 @@ md5 = 722590134af52b849d292a05709b3a12 [gcc] file = gcc-4.4.7-4.el6.x86_64.rpm md5 = add75de177de4442108f7d46ee68d9e9 +package_type = contrail-install-packages [gdb] file = gdb-7.2-60.el6_4.1.x86_64.rpm md5 = d4822fdada0f37ad97c0b3ff31d8ed3a +package_type = contrail-install-packages [genisoimage] file = genisoimage-1.1.9-12.el6.x86_64.rpm @@ -195,18 +199,22 @@ md5 = 335e2704ad5d604b9c00e438a28ff2b4 [glibc] file = glibc-2.12-1.132.el6.x86_64.rpm md5 = 14a7f93c40e76cc869e23a7520b179e7 +package_type = contrail-install-packages [glibc-common] file = glibc-common-2.12-1.132.el6.x86_64.rpm md5 = 5e2c7b36b87c5b12233faf2ba24d103d +package_type = contrail-install-packages [glibc-devel] file = glibc-devel-2.12-1.132.el6.x86_64.rpm md5 = 18675b49ccf691cc2b82162b4bc4f4a2 +package_type = contrail-install-packages [glibc-headers] file = glibc-headers-2.12-1.132.el6.x86_64.rpm md5 = 5f3ab13fdd05eba68cfc4b6cf64a02eb +package_type = contrail-install-packages [gpxe-roms-qemu] file = gpxe-roms-qemu-0.9.7-6.10.el6.noarch.rpm @@ -311,6 +319,7 @@ md5 = 713af7d6861c35a2ab7ec14de19f5a86 [libgcc] file = libgcc-4.4.7-4.el6.x86_64.rpm md5 = 5da66d0913f12ba09a0301ee710f264d +package_type = contrail-install-packages [libgcj] file = libgcj-4.4.7-4.el6.x86_64.rpm @@ -319,6 +328,7 @@ md5 = 3272e8b32a49074bb510f8e4d9ab9e05 [libgomp] file = libgomp-4.4.7-4.el6.x86_64.rpm md5 = e586474120f8b15a2c22e2317fc1362b +package_type = contrail-install-packages [libgssglue] file = libgssglue-0.1-11.el6.x86_64.rpm @@ -527,6 +537,7 @@ md5 = 029213d1c7b79c0dfa4f6d8063dbdce6 [make] file = make-3.81-20.el6.x86_64.rpm md5 = 556348c198696e9edbf77c71c5fbc601 +package_type = contrail-install-packages [man] file = man-1.6f-32.el6.x86_64.rpm @@ -559,6 +570,7 @@ md5 = 3a88082e263f6cac256d41ffafd9b0a6 [mpfr] file = mpfr-2.4.1-6.el6.x86_64.rpm md5 = c9b194bb693cae173c06a7dea19f3bd7 +package_type = contrail-install-packages [MySQL-python] file = MySQL-python-1.2.3-0.3.c1.1.el6.x86_64.rpm @@ -659,6 +671,7 @@ md5 = c42b1ceb718d70bdb855c6c6f88cc386 [ppl] file = ppl-0.10.2-11.el6.x86_64.rpm md5 = 248fd5af655e66af417992c726ffb45c +package_type = contrail-install-packages [ppp] file = ppp-2.4.5-5.el6.x86_64.rpm @@ -715,6 +728,7 @@ md5 = 2108d310ce44ec7cd95847e46c7cab15 [python-netaddr] file = python-netaddr-0.7.5-4.el6.noarch.rpm md5 = 7540cf0bba1785f6cbcac38aabae854a +package_type = contrail-install-packages [python-paramiko] file = python-paramiko-1.7.5-2.1.el6.noarch.rpm @@ -735,6 +749,7 @@ md5 = 59ddf516ec600fa638ff8e5bcc33bfe9 [python-setuptools] file = python-setuptools-0.6.10-3.el6.noarch.rpm md5 = e00e7bd03739b7a1d67160ae42bfd365 +package_type = contrail-install-packages [python-simplejson] file = python-simplejson-2.0.9-3.1.el6.x86_64.rpm @@ -915,6 +930,7 @@ md5 = 617d6c06481250ec192d2a4b4bd5def6 [kernel-headers] file = kernel-headers-2.6.32-431.11.2.el6.centos.plus.x86_64.rpm md5 = f7db5de18eea0561c78baf424de57996 +package_type = contrail-install-packages [pyxattr] file = pyxattr-0.5.0-1.el6.x86_64.rpm @@ -943,6 +959,7 @@ md5 = 58814d432e05de85e6be5a1a016626c9 [python-argparse] file = python-argparse-1.2.1-2.el6.noarch.rpm md5 = 68d75eb21ff03c204e9f9ef3cba74c3e +package_type = contrail-install-packages [python-chardet] file = python-chardet-2.0.1-1.el6.rf.noarch.rpm @@ -975,6 +992,7 @@ md5 = a57fb5593d91c22d81bb52f6e11c72a3 [python-netifaces] file = python-netifaces-0.5-1.el6.x86_64.rpm md5 = 248e1b9b853bda52114791bf0600f8da +package_type = contrail-install-packages [python-ordereddict] file = python-ordereddict-1.1-2.el6.noarch.rpm @@ -1347,6 +1365,7 @@ md5 = 030bed65aa51429c24bd225e3acaa30b [python-pip] file = python-pip-1.3.1-4.el6.noarch.rpm md5 = 498a8b24337fca4e81dbb75a8de5eb9f +package_type = contrail-install-packages [python-repoze-lru] file = python-repoze-lru-0.4-3.el6.noarch.rpm @@ -1411,6 +1430,7 @@ md5 = f1ab9630a13f5bd4bbe0741f7063e75f [openssl] file = openssl-1.0.1e-16.el6_5.7.x86_64.rpm md5 = 4d13d3df8275165f778e8d024506505f +package_type = contrail-install-packages [openstack-cinder] file = openstack-cinder-2013.2.2-1.el6.noarch.rpm @@ -1427,6 +1447,7 @@ md5 = b132adfe4592d931af3736dca69f5c56 [openstack-utils] file = openstack-utils-2013.1-7.el6.noarch.rpm md5 = 5c0a717b8b6b1c73077651adde110bf2 +package_type = contrail-install-packages [cassandra12] file = cassandra12-1.2.11-1.noarch.rpm @@ -1671,14 +1692,17 @@ md5 = 914c1445f3fd160475115d83b75301c6 [python] file = python-2.6.6-52.el6.x86_64.rpm md5 = 13157419bd085174941bcc107b72754d +package_type = contrail-install-packages [python-devel] file = python-devel-2.6.6-52.el6.x86_64.rpm md5 = 456834dc2ecd8a22c08357db78bf3431 +package_type = contrail-install-packages [python-libs] file = python-libs-2.6.6-52.el6.x86_64.rpm md5 = 2531da78ed151404c55c36813c7dd134 +package_type = contrail-install-packages [qemu-img] file = qemu-img-0.12.1.2-2.415.el6_5.6.x86_64.rpm diff --git a/build/package_configs/ubuntu1204/grizzly/contrail_packages.cfg b/build/package_configs/ubuntu1204/grizzly/contrail_packages.cfg index b819dba07..89ee75ef4 100644 --- a/build/package_configs/ubuntu1204/grizzly/contrail_packages.cfg +++ b/build/package_configs/ubuntu1204/grizzly/contrail_packages.cfg @@ -212,6 +212,12 @@ pkgs = contrail-install-packages makeloc = tools/packaging/common/debian target = contrail-install-packages-deb +[contrail-thirdparty-packages] +pkgs = contrail-thirdparty-packages +makeloc = tools/packaging/common/debian +target = contrail-thirdparty-packages-deb +package_type = contrail-thirdparty-packages + [openstack-default-target] pkgs = makeloc = tools/packaging/openstack/debian diff --git a/build/package_configs/ubuntu1204/grizzly/depends_packages.cfg b/build/package_configs/ubuntu1204/grizzly/depends_packages.cfg index 29811f0ff..4db977780 100644 --- a/build/package_configs/ubuntu1204/grizzly/depends_packages.cfg +++ b/build/package_configs/ubuntu1204/grizzly/depends_packages.cfg @@ -14,7 +14,7 @@ file = md5 = location = -package_type = contrail-install-packages +package_type = contrail-thirdparty-packages [acl] file = acl_2.2.51-5ubuntu1_amd64.deb @@ -59,6 +59,7 @@ md5 = 7eafe1d84a7cfe64340d60a0fbffb14c [binutils] file = binutils_2.22-6ubuntu1.1_amd64.deb md5 = 4abcede722bd28bd70fe6f6016346bf1 +package_type = contrail-install-packages [bridge-utils] file = bridge-utils_1.5-2ubuntu7_amd64.deb @@ -107,6 +108,7 @@ md5 = a5c070a31e0423db49918e3b0dd30b2b [curl] file = curl_7.22.0-3ubuntu4.7_amd64.deb md5 = cf77c7c692b288dd10fc9611940d0312 +package_type = contrail-install-packages [dnsmasq-base] file = dnsmasq-base_2.59-4ubuntu0.1_amd64.deb @@ -115,6 +117,7 @@ md5 = 2af1b08b6fe69aa1fd6b7142cd403c27 [dpkg-dev] file = dpkg-dev_1.16.1.2ubuntu7.2_all.deb md5 = 0a47b68a9363e0214c56663d8c10e77d +package_type = contrail-install-packages [ebtables] file = ebtables_2.0.9.2-2ubuntu2_amd64.deb @@ -439,6 +442,7 @@ md5 = ebd6f4fc5c880d17c9c61cdcfc971297 [libdpkg-perl] file = libdpkg-perl_1.16.1.2ubuntu7.2_all.deb md5 = bd2e01f09ab9ae26a85121b5ae83a5d9 +package_type = contrail-install-packages [liberror-perl] file = liberror-perl_0.17-1_all.deb @@ -711,6 +715,7 @@ md5 = 3629b3235fce3f5081ef3951732a0a11 [make] file = make_3.81-8.1ubuntu1.1_amd64.deb md5 = 204a7b26f38f0377d0bf61940f3d524e +package_type = contrail-install-packages [manpages-dev] file = manpages-dev_3.35-0.1ubuntu1_all.deb @@ -775,6 +780,7 @@ md5 = a50620ec3b5194700b7a920c5dc239bd [patch] file = patch_2.6.1-3_amd64.deb md5 = b5aada57a1902713e2bfa906636081b1 +package_type = contrail-install-packages [python2.7] file = python2.7_2.7.3-0ubuntu3.4_amd64.deb @@ -855,6 +861,7 @@ md5 = 54e8e40fb50ab33f69e147c2129838d4 [python-crypto] file = python-crypto_2.6-4~cloud0_amd64.deb md5 = 3e5bf6c28319c4005e68e08de03aaa4b +package_type = contrail-install-packages [python-daemon] file = python-daemon_1.5.5-1ubuntu1_all.deb @@ -1031,6 +1038,7 @@ md5 = 04fbdb8cb3f386c413434c8eb434cbfc [python-netaddr] file = python-netaddr_0.7.5-4build2_all.deb md5 = eee75f1d85b54174b2555e5d3534a468 +package_type = contrail-install-packages [python-netifaces] file = python-netifaces_0.6-2ubuntu1_amd64.deb @@ -1083,6 +1091,7 @@ md5 = 25c3093c7af6ef17dbe473488661d411 [python-paramiko] file = python-paramiko_1.10.1-1~cloud0_all.deb md5 = f023640446ff37592b21dc34daa74261 +package_type = contrail-install-packages [python-passlib] file = python-passlib_1.5.3-0ubuntu1_all.deb @@ -1103,10 +1112,12 @@ md5 = c00df6fd76d515e28cc866d0e5150e70 [python-pip] file = python-pip_1.0-1build1_all.deb md5 = 55dc8bbb9f99b65d1cb0230f3126ae79 +package_type = contrail-install-packages [python-pkg-resources] file = python-pkg-resources_0.6.24-1ubuntu1_all.deb md5 = 0e5af037ec2a08c4a992675f32d9f56e +package_type = contrail-install-packages [python-prettytable] file = python-prettytable_0.6.1-1ubuntu1~cloud0_all.deb @@ -1163,6 +1174,7 @@ md5 = c4522ec41469152ca60f5183e386df11 [python-setuptools] file = python-setuptools_0.6.24-1ubuntu1_all.deb md5 = 3b89564b0ae0d40087686f1e464cfe21 +package_type = contrail-install-packages [python-setuptools-git] file = python-setuptools-git_1.0b1-0ubuntu2~cloud0_all.deb @@ -1179,6 +1191,7 @@ md5 = d934e809c17d748f15c1d989862bd7cd [python-software-properties] file = python-software-properties_0.82.7_all.deb md5 = c2e2f38277b16fd2d8de768ffcf3ad88 +package_type = contrail-install-packages [python-sqlalchemy] file = python-sqlalchemy_0.7.9-1~cloud0_all.deb @@ -1407,3 +1420,8 @@ md5 = 4e71a0abd78ca4985fd49b6530673170 [python-jsonpickle] file = python-jsonpickle_0.4.0-1build1_all.deb md5 = 88737e6cf3de4cd23f18a89dec51be0c + +[python-chardet] +file = python-chardet_2.0.1-2build2_all.deb +md5 = a4e008069af3cb800d58c7f13cb3c7ed + diff --git a/build/package_configs/ubuntu1204/havana/contrail_packages.cfg b/build/package_configs/ubuntu1204/havana/contrail_packages.cfg index fac109095..ae102b5b9 100644 --- a/build/package_configs/ubuntu1204/havana/contrail_packages.cfg +++ b/build/package_configs/ubuntu1204/havana/contrail_packages.cfg @@ -216,6 +216,12 @@ pkgs = contrail-install-packages makeloc = tools/packaging/common/debian target = contrail-install-packages-deb +[contrail-thirdparty-packages] +pkgs = contrail-thirdparty-packages +makeloc = tools/packaging/common/debian +target = contrail-thirdparty-packages-deb +package_type = contrail-thirdparty-packages + [openstack-default-target] pkgs = makeloc = tools/packaging/openstack/debian diff --git a/build/package_configs/ubuntu1204/havana/depends_packages.cfg b/build/package_configs/ubuntu1204/havana/depends_packages.cfg index 444acfe00..8fda50f96 100644 --- a/build/package_configs/ubuntu1204/havana/depends_packages.cfg +++ b/build/package_configs/ubuntu1204/havana/depends_packages.cfg @@ -7,6 +7,7 @@ # file = # name of the package # location = # location where the package file is available # md5 = # md5 check sum of the package file +# package_type = # final package to which the package is bundled # # ***************************************************************** @@ -14,7 +15,7 @@ file = md5 = location = -package_type = contrail-install-packages +package_type = contrail-thirdparty-packages [acl] file = acl_2.2.51-5ubuntu1_amd64.deb @@ -35,6 +36,7 @@ md5 = 8845a49492065546d0470c8b73005e05 [binutils] file = binutils_2.22-6ubuntu1.1_amd64.deb md5 = 4abcede722bd28bd70fe6f6016346bf1 +package_type = contrail-install-packages [bridge-utils] file = bridge-utils_1.5-2ubuntu7_amd64.deb @@ -71,6 +73,7 @@ md5 = a5c070a31e0423db49918e3b0dd30b2b [curl] file = curl_7.22.0-3ubuntu4.7_amd64.deb md5 = cf77c7c692b288dd10fc9611940d0312 +package_type = contrail-install-packages [db5.1-util] file = db5.1-util_5.1.25-11build1_amd64.deb @@ -87,6 +90,7 @@ md5 = 2af1b08b6fe69aa1fd6b7142cd403c27 [dpkg-dev] file = dpkg-dev_1.16.1.2ubuntu7.2_all.deb md5 = 0a47b68a9363e0214c56663d8c10e77d +package_type = contrail-install-packages [ebtables] file = ebtables_2.0.9.2-2ubuntu2_amd64.deb @@ -311,6 +315,7 @@ md5 = 716994b4b704545103f6a40d600607bb [libdpkg-perl] file = libdpkg-perl_1.16.1.2ubuntu7.2_all.deb md5 = bd2e01f09ab9ae26a85121b5ae83a5d9 +package_type = contrail-install-packages [libevent-2.0-5] file = libevent-2.0-5_2.0.16-stable-1_amd64.deb @@ -727,6 +732,7 @@ md5 = a13a37ef8fc59cb9ed3ccf806d074573 [make] file = make_3.81-8.1ubuntu1.1_amd64.deb md5 = 204a7b26f38f0377d0bf61940f3d524e +package_type = contrail-install-packages [manpages-dev] file = manpages-dev_3.35-0.1ubuntu1_all.deb @@ -759,6 +765,7 @@ md5 = a50620ec3b5194700b7a920c5dc239bd [patch] file = patch_2.6.1-3_amd64.deb md5 = b5aada57a1902713e2bfa906636081b1 +package_type = contrail-install-packages [python-amqp] file = python-amqp_1.0.12-0ubuntu1~cloud0_all.deb @@ -819,6 +826,7 @@ md5 = 3999e472e420374ef9a863dcfc67e70d [python-crypto] file = python-crypto_2.6-5~cloud1_amd64.deb md5 = 23a59244999c55c6e92e48fa16cccb40 +package_type = contrail-install-packages [python-d2to1] file = python-d2to1_0.2.10-1ubuntu4~cloud0_all.deb @@ -991,6 +999,7 @@ md5 = 04fbdb8cb3f386c413434c8eb434cbfc [python-netaddr] file = python-netaddr_0.7.7-1~cloud0_all.deb md5 = 3e704af861d5ff913012179e4e858b87 +package_type = contrail-install-packages [python-netifaces] file = python-netifaces_0.6-2ubuntu1_amd64.deb @@ -1027,6 +1036,7 @@ md5 = 25c3093c7af6ef17dbe473488661d411 [python-paramiko] file = python-paramiko_1.10.1-1~cloud0_all.deb md5 = f023640446ff37592b21dc34daa74261 +package_type = contrail-install-packages [python-passlib] file = python-passlib_1.5.3-0ubuntu1_all.deb @@ -1051,10 +1061,12 @@ md5 = 55c1bf6b28f9f3f4d3f9dd22932468dc [python-pip] file = python-pip_1.0-1build1_all.deb md5 = 55dc8bbb9f99b65d1cb0230f3126ae79 +package_type = contrail-install-packages [python-pkg-resources] file = python-pkg-resources_0.6.24-1ubuntu1_all.deb md5 = 0e5af037ec2a08c4a992675f32d9f56e +package_type = contrail-install-packages [python-prettytable] file = python-prettytable_0.6.1-1ubuntu1~cloud0_all.deb @@ -1111,6 +1123,7 @@ md5 = c4522ec41469152ca60f5183e386df11 [python-setuptools] file = python-setuptools_0.6.24-1ubuntu1_all.deb md5 = 3b89564b0ae0d40087686f1e464cfe21 +package_type = contrail-install-packages [python-simplejson] file = python-simplejson_3.3.0-2ubuntu2~cloud1_amd64.deb @@ -1123,6 +1136,7 @@ md5 = d934e809c17d748f15c1d989862bd7cd [python-software-properties] file = python-software-properties_0.82.7.7_all.deb md5 = a5c2e0c0868fae0e8c2a0c7bccf62caa +package_type = contrail-install-packages [python-sqlalchemy] file = python-sqlalchemy_0.8.2-1~cloud1_all.deb @@ -1783,3 +1797,8 @@ md5 = 4e71a0abd78ca4985fd49b6530673170 [python-jsonpickle] file = python-jsonpickle_0.4.0-1build1_all.deb md5 = 88737e6cf3de4cd23f18a89dec51be0c + +[python-chardet] +file = python-chardet_2.0.1-2build2_all.deb +md5 = a4e008069af3cb800d58c7f13cb3c7ed + diff --git a/build/thirdparty_setup.sh b/build/thirdparty_setup.sh new file mode 100644 index 000000000..07a75101d --- /dev/null +++ b/build/thirdparty_setup.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# create contrail thirdparty repo +cat << __EOT__ > /etc/yum.repos.d/contrail-thirdparty.repo +[contrail_thirdparty_repo] +name=contrail_thirdparty_repo +baseurl=file:///opt/contrail/contrail_thirdparty_repo/ +enabled=1 +priority=1 +gpgcheck=0 +__EOT__ + +# copy files over +mkdir -p /opt/contrail/contrail_thirdparty_repo +cd /opt/contrail/contrail_thirdparty_repo; tar xvzf /opt/contrail/contrail_packages/contrail_thirdparty_rpms.tgz + +exit 0 diff --git a/build/thirdparty_setup_ubuntu.sh b/build/thirdparty_setup_ubuntu.sh new file mode 100644 index 000000000..6f88d25bd --- /dev/null +++ b/build/thirdparty_setup_ubuntu.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# copy files over +echo "Create Repo dir and Untar all thirdparty packages" +mkdir -p /opt/contrail/contrail_thirdparty_repo +cd /opt/contrail/contrail_thirdparty_repo; tar xvzf /opt/contrail/contrail_packages/contrail_thirdparty_debs.tgz + +echo "Create Repo and Update sources.list" +cd /etc/apt/ +# create repo with only local packages +datetime_string=`date +%Y_%m_%d__%H_%M_%S` +cp sources.list sources.list.$datetime_string +echo "deb file:/opt/contrail/contrail_thirdparty_repo ./" > local_repo + +#modify /etc/apt/soruces.list/ to add local repo on the top +grep "deb file:/opt/contrail/contrail_thirdparty_repo ./" sources.list + +if [ $? != 0 ]; then + cat local_repo sources.list > new_sources.list + mv new_sources.list sources.list +fi + +# Allow unauthenticated pacakges to get installed. +# Do not over-write apt.conf. Instead just append what is necessary +# retaining other useful configurations such as http::proxy info. +apt_auth="APT::Get::AllowUnauthenticated \"true\";" +grep --quiet "$apt_auth" apt.conf +if [ "$?" != "0" ]; then + echo "$apt_auth" >> apt.conf +fi + +#scan pkgs in local repo and create Packages.gz +cd /opt/contrail/contrail_thirdparty_repo +dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz +apt-get update + +exit 0 diff --git a/common/debian/Makefile b/common/debian/Makefile index 34f8593e6..a1f5b0c1e 100644 --- a/common/debian/Makefile +++ b/common/debian/Makefile @@ -112,10 +112,22 @@ contrail-install-packages-deb: (cd ${BUILDDIR}; fakeroot debian/rules binary) @echo "Wrote: ${BUILDDIR}/../contrail-install-packages_$(VERSION)~$(CONTRAIL_SKU)_all.deb" +contrail-thirdparty-packages-deb: + $(eval BUILDDIR=${SB_TOP}/build/debian/contrail-thirdparty-packages) + mkdir -p ${BUILDDIR} + cp -ar ${SB_TOP}/tools/packaging/common/debian/contrail-thirdparty-packages/debian ${BUILDDIR} + (cd ${BUILDDIR}; fakeroot debian/rules clean) + (cd ${BUILDDIR}; fakeroot debian/rules binary) + @echo "Wrote: ${BUILDDIR}/../contrail-thirdparty-packages_$(VERSION)~$(CONTRAIL_SKU)_all.deb" + contrail-install-packages-clean: $(eval BUILDDIR=${SB_TOP}/build/debian/contrail-install-packages) rm -rf ${BUILDDIR} +contrail-thirdparty-packages-clean: + $(eval BUILDDIR=${SB_TOP}/build/debian/contrail-thirdparty-packages) + rm -rf ${BUILDDIR} + contrail-fabric-utils-deb: $(eval BUILDDIR=${SB_TOP}/build/third_party/contrail-fabric-utils) cp -R ${SB_TOP}/third_party/fabric-utils ${BUILDDIR} diff --git a/common/debian/contrail-thirdparty-packages/debian/changelog.in b/common/debian/contrail-thirdparty-packages/debian/changelog.in new file mode 100644 index 000000000..ebb115502 --- /dev/null +++ b/common/debian/contrail-thirdparty-packages/debian/changelog.in @@ -0,0 +1,6 @@ +contrail-thirdparty-packages (BUILDTAG) npchandran; urgency=low + + [npchandran] + * debian/changelog, contrail-thirdparty.{postinst}: changelog + + -- npchandran Mon, 11 Nov 2013 8:00:11 +0800 diff --git a/common/debian/contrail-thirdparty-packages/debian/compat b/common/debian/contrail-thirdparty-packages/debian/compat new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/common/debian/contrail-thirdparty-packages/debian/compat @@ -0,0 +1 @@ +8 diff --git a/common/debian/contrail-thirdparty-packages/debian/control b/common/debian/contrail-thirdparty-packages/debian/control new file mode 100644 index 000000000..2b82db43e --- /dev/null +++ b/common/debian/contrail-thirdparty-packages/debian/control @@ -0,0 +1,14 @@ +Source: contrail-thirdparty-packages +Maintainer: npchandran +Section: misc +Priority: optional +Standards-Version: 1.0 +Build-Depends: debhelper (>= 8) + +Package: contrail-thirdparty-packages +Architecture: all +Maintainer: npchandran +Depends: +Section: contrail-thirdparty-packages +Priority: extra +Description: Contrail Thirdparty Packages - Container of third party debian packages diff --git a/common/debian/contrail-thirdparty-packages/debian/copyright b/common/debian/contrail-thirdparty-packages/debian/copyright new file mode 100644 index 000000000..4d68b9d88 --- /dev/null +++ b/common/debian/contrail-thirdparty-packages/debian/copyright @@ -0,0 +1,5 @@ +Name: contrail-thirdparty-packages +Maintainer: npchandran +License: Commercial +Files: * + Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. diff --git a/common/debian/contrail-thirdparty-packages/debian/rules b/common/debian/contrail-thirdparty-packages/debian/rules new file mode 100755 index 000000000..b7d2c1d03 --- /dev/null +++ b/common/debian/contrail-thirdparty-packages/debian/rules @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +SPEC_DIR := $(shell pwd) +export SB_TOP := $(shell pwd | sed -re "s/\/build\/debian\/contrail-thirdparty-packages//g") + +export BUILDTIME := $(shell date -u +%y%m%d%H%M) +export buildroot := $(SB_TOP)/build/debian/contrail-thirdparty-packages/debian/contrail-thirdparty-packages +export _contrailopt := /opt/contrail + +SRC_VER := $(shell cat $(SB_TOP)/controller/src/base/version.info) + +BUILDTAG = +TGZ_FILE = +ifdef TAG +BUILDTAG = $(SRC_VER)-$(TAG)~$(CONTRAIL_SKU) +else +BUILDTAG = $(SRC_VER)-$(BUILDTIME)~$(CONTRAIL_SKU) +endif + +ifdef FILE_LIST +TGZ_FILE = $(FILE_LIST) +endif + + +%: + dh $@ + +override_dh_auto_build: + cat debian/changelog.in | sed 's,BUILDTAG,$(BUILDTAG),g' > debian/changelog + +override_dh_auto_install: + # Setup directories + @echo "making deb for contrail-thirdparty-packages" + install -d -m 755 $(buildroot) + install -d -m 755 $(buildroot)/etc/contrail/ + install -d -m 755 $(buildroot)$(_contrailopt) + install -d -m 755 $(buildroot)$(_contrailopt)/contrail_packages + # install TGZ file + if [ -f $(TGZ_FILE) ]; then echo "Using TGZ FILE = $(TGZ_FILE)"; install -p -m 644 $(TGZ_FILE) $(buildroot)$(_contrailopt)/contrail_packages/contrail_thirdparty_debs.tgz; else echo "ERROR: TGZ file containing all debs is not supplied or not present"; echo "Supply Argument: FILE_LIST="; exit 1; fi + install -p -m 755 $(SB_TOP)/tools/packaging/build/thirdparty_setup_ubuntu.sh $(buildroot)$(_contrailopt)/contrail_packages/thirdparty_setup.sh + +override_dh_shlibdeps: + +override_dh_usrlocal: + diff --git a/common/rpm/Makefile b/common/rpm/Makefile index 62a05859e..186eeb22e 100644 --- a/common/rpm/Makefile +++ b/common/rpm/Makefile @@ -224,6 +224,10 @@ contrail-install-packages: $(PREP) @echo making rpm for contrail-install-packages rpmbuild $(RPMBLDOPTS) contrail-install-packages.spec $(G_TAG) +contrail-thirdparty-packages: $(PREP) + @echo making rpm for contrail-thirdparty-packages + rpmbuild $(RPMBLDOPTS) contrail-thirdparty-packages.spec $(G_TAG) + contrail-database: $(PREP) $(LOCAL_PY) @echo making rpm for contrail-database cp contrail-database.spec $(BUILD_BASE)/SPECS/ diff --git a/common/rpm/contrail-thirdparty-packages.spec b/common/rpm/contrail-thirdparty-packages.spec new file mode 100644 index 000000000..3d69c6538 --- /dev/null +++ b/common/rpm/contrail-thirdparty-packages.spec @@ -0,0 +1,62 @@ +# view contents of rpm file: rpm -qlp .rpm + +%define _contrailopt /opt/contrail + +%if 0%{?_buildTag:1} +%define _relstr %{_buildTag} +%else +%define _relstr %(date -u +%y%m%d%H%M) +%endif +%{echo: "Building release %{_relstr}\n"} +%if 0%{?_fileList:1} +%define _flist %{_fileList} +%else +%define _flist None +%endif +%if 0%{?_srcVer:1} +%define _verstr %{_srcVer} +%else +%define _verstr 1 +%endif +%if 0%{?_skuTag:1} +%define _sku %{_skuTag} +%else +%define _sku None +%endif + + +Name: contrail-thirdparty-packages +Version: %{_verstr} +Release: %{_relstr}~%{_sku}%{?dist} +Summary: Contrail Installer %{?_gitVer} +BuildArch: noarch + +Group: Applications/System +License: Commercial +URL: http://www.juniper.net/ +Vendor: Juniper Networks Inc + + + +%description +Contrail Thirdparty Packages - Container of Contrail Thirdparty RPMs + +%install + +# Setup directories +rm -rf %{buildroot} +install -d -m 755 %{buildroot}%{_contrailopt} +install -d -m 755 %{buildroot}%{_contrailopt}/contrail_packages + +# install files +pushd %{_builddir}/.. +install -p -m 755 tools/packaging/build/thirdparty_setup.sh %{buildroot}%{_contrailopt}/contrail_packages/thirdparty_setup.sh +if [ -f %{_flist} ]; then echo "Using TGZ FILE = %{_flist}"; install -p -m 644 %{_flist} %{buildroot}%{_contrailopt}/contrail_packages/contrail_thirdparty_rpms.tgz; else echo "ERROR: TGZ file containing all rpms is not supplied or not present"; echo "Supply Argument: FILE_LIST="; exit 1; fi + +%files +%defattr(-, root, root) +%{_contrailopt}/contrail_packages/contrail_thirdparty_rpms.tgz +%{_contrailopt}/contrail_packages/thirdparty_setup.sh + +%changelog + diff --git a/tools/scripts/contrail-archive b/tools/scripts/contrail-archive index 92086080f..7d3062ac5 100755 --- a/tools/scripts/contrail-archive +++ b/tools/scripts/contrail-archive @@ -119,8 +119,12 @@ class ContrailArchive(object): """ print "Fixing up the archive" os.chdir (self.opt.archive_path + "/artifacts") + packages = [] + pkg_patterns = ['contrail-install-*', 'contrail-thirdparty-*'] + for pkg in map(glob.glob, pkg_patterns): + packages.extend(pkg) - for files in glob.iglob("contrail-install*"): + for files in packages: command = "cp " + files + " .." execute(command, ignore_errors=False) command = "rm " + files