Skip to content

Commit

Permalink
Initial steps for packaging on SLES12
Browse files Browse the repository at this point in the history
Partial-Bug: #1488627
Change-Id: I5bad05e6925f26502ea119a6964698046c098a19
  • Loading branch information
Your Name authored and dirkmueller committed Aug 25, 2015
1 parent 162acec commit 8ea5092
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/libs/packager/common.py
Expand Up @@ -43,7 +43,8 @@ def __init__(self, **kwargs):
self.make_targets_file = self.expanduser(kwargs.get('make_targets_file', None))
pkg_types = {'ubuntu': 'deb', 'centos': 'rpm', \
'redhatenterpriselinuxserver': 'rpm', 'fedora': 'rpm',
'centoslinux': 'rpm'}
'centoslinux': 'rpm',
'suselinuxenterpriseserver': 'rpm'}
platform = self.get_platform_info(kwargs['os_version'])
self.platform = platform['default'][0]
self.cache_subdir = platform['formatted']
Expand Down
26 changes: 26 additions & 0 deletions build/libs/packager/suselinuxenterpriseserver_packager.py
@@ -0,0 +1,26 @@
#!/usr/bin/env python
''' Generic Library for SUSE Packager scripts'''

import logging

from common import BasePackager

log = logging.getLogger("pkg")


class Packager(BasePackager):
''' SUSE Packager '''
def exec_steps(self):
'''Packager Steps'''
self.setup_env()
self.create_pkg_list_file()
self.make_pkgs()
self.verify_built_pkgs_exists(skips=self.meta_pkg)
self.copy_built_pkg_files(skips=self.meta_pkg)
self.createrepo()
self.create_pkgs_tgz()
self.create_contrail_pkg()
self.verify_built_pkgs_exists(self.meta_pkg)
self.create_log()
self.cleanup_store()

@@ -0,0 +1,17 @@
# ****************************************************************
# CAUTION: ANY CHANGES TO DEFAULT APPLIES TO ALL SECTIONS
# IF NOT OVERWRITTEN LOCALLY
# ****************************************************************
# Usage:
# [package name]
# file = # name of the package
# location = # location where the package file is available
# md5 = # md5 check sum of the package file
#
# *****************************************************************

[DEFAULT]
file =
md5 =
location =
package_type =
@@ -0,0 +1,127 @@
# ****************************************************************
# CAUTION: ANY CHANGES TO DEFAULT APPLIES TO ALL SECTIONS
# IF NOT OVERWRITTEN LOCALLY
# ****************************************************************
# Usage:
# [build target name]
# pkgs = # list of packages generated by the make target
#
# pkg_pattern = # pattern to match packages. would be used
# # packager to pick packages from given directory
#
# builtloc = # location where packages are copied after built
#
# makeloc = # location where make command has to issued
# # these path are taken relative to git local repo
# *****************************************************************

[DEFAULT]
pkgs =
pkg_pattern = {pkg}-[0-9]*.rpm
builtloc = controller/build/package-build/RPMS/
target = %(__name__)s
makeloc =
package_type = contrail-install-packages

[contrail]
pkgs = contrail-analytics, contrail-config, contrail-control, contrail-lib,
contrail-vrouter-agent, contrail-vrouter-source, contrail-vrouter-utils,
python-contrail, python-contrail-vrouter-api, contrail-vrouter,
contrail-config-openstack, contrail-nova-vif, contrail-utils,
python-opencontrail-vrouter-netns
makeloc = tools/packaging/common/rpm

[contrail-dns]
pkgs = contrail-dns
makeloc = tools/packaging/common/rpm

[contrail-interface-name]
pkgs = contrail-interface-name
makeloc = tools/packaging/common/rpm

[contrail-setup]
pkgs = contrail-setup
makeloc = tools/packaging/common/rpm

[contrail-openstack]
pkgs = contrail-openstack
makeloc = tools/packaging/common/rpm

[contrail-openstack-analytics]
pkgs = contrail-openstack-analytics
makeloc = tools/packaging/common/rpm

[contrail-openstack-config]
pkgs = contrail-openstack-config
makeloc = tools/packaging/common/rpm

[contrail-openstack-control]
pkgs = contrail-openstack-control
makeloc = tools/packaging/common/rpm

[contrail-openstack-database]
pkgs = contrail-openstack-database
makeloc = tools/packaging/common/rpm

[contrail-openstack-vrouter]
pkgs = contrail-openstack-vrouter
makeloc = tools/packaging/common/rpm

[contrail-openstack-webui]
pkgs = contrail-openstack-webui
makeloc = tools/packaging/common/rpm

[contrail-web-core]
pkgs = contrail-web-core
makeloc = tools/packaging/common/rpm

[contrail-web-controller]
pkgs = contrail-web-controller
makeloc = tools/packaging/common/rpm

[contrail-database]
pkgs = contrail-database
makeloc = tools/packaging/common/rpm

[contrail-fabric-utils]
pkgs = contrail-fabric-utils
makeloc = tools/packaging/common/rpm

[contrail-nodemgr]
pkgs = contrail-nodemgr
makeloc = tools/packaging/common/rpm

[contrail-vrouter-init]
pkgs = contrail-vrouter-init
makeloc = tools/packaging/common/rpm

[contrail-vrouter-common]
pkgs = contrail-vrouter-common
makeloc = tools/packaging/common/rpm

[neutron-plugin-contrail]
pkgs = neutron-plugin-contrail
makeloc = tools/packaging/common/rpm

[ceilometer-plugin-contrail]
pkgs = ceilometer-plugin-contrail
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

[contrail-default-target]
pkgs =
makeloc = tools/packaging/common/rpm
target = all

[openstack-default-target]
pkgs =
makeloc = tools/packaging/openstack/centos_64
target = all
@@ -0,0 +1,19 @@
# ****************************************************************
# CAUTION: ANY CHANGES TO DEFAULT APPLIES TO ALL SECTIONS
# IF NOT OVERWRITTEN LOCALLY
# ****************************************************************
# Usage:
# [package name]
# file = # name of the package
# location = # location where the package file is available
# md5 = # md5 check sum of the package file
#
# *****************************************************************

[DEFAULT]
md5 =
file =
location =
package_type = contrail-thirdparty-packages


0 comments on commit 8ea5092

Please sign in to comment.