From ed622f954935f0391d3cb7d96d1d656eb9ee6e1d Mon Sep 17 00:00:00 2001 From: Fabricio Henrique Ramos Date: Fri, 12 Nov 2021 18:35:11 -0300 Subject: [PATCH] Add debian package for distributedcloud-client Add debian packaging folder for distributedcloud-client. Test Plan: Pass: build package on Debian Pass: build Debian image Pass: install Debian image Pass: build package on CentOS Pass: build CentOS image Pass: install CentOS image Pass: CentOS controller unlocked/available Story: 2009101 Task: 43965 Signed-off-by: Fabricio Henrique Ramos Change-Id: Ibb98a7de601580cd53002f386afb620417a97aa4 --- debian_pkg_dirs | 1 + .../dcmanagerclient/osc/__init__.py | 0 .../debian/deb_folder/changelog | 5 ++ .../debian/deb_folder/control | 52 +++++++++++++++ .../debian/deb_folder/copyright | 63 +++++++++++++++++++ ...ibutedcloud-client-dcmanagerclient.install | 2 + .../distributedcloud-client-wheels.install | 1 + .../debian/deb_folder/rules | 23 +++++++ .../debian/deb_folder/source/format | 1 + distributedcloud-client/debian/dl_hook | 13 ++++ distributedcloud-client/debian/meta_data.yaml | 7 +++ 11 files changed, 168 insertions(+) create mode 100644 debian_pkg_dirs create mode 100644 distributedcloud-client/dcmanagerclient/osc/__init__.py create mode 100644 distributedcloud-client/debian/deb_folder/changelog create mode 100644 distributedcloud-client/debian/deb_folder/control create mode 100644 distributedcloud-client/debian/deb_folder/copyright create mode 100644 distributedcloud-client/debian/deb_folder/distributedcloud-client-dcmanagerclient.install create mode 100644 distributedcloud-client/debian/deb_folder/distributedcloud-client-wheels.install create mode 100755 distributedcloud-client/debian/deb_folder/rules create mode 100644 distributedcloud-client/debian/deb_folder/source/format create mode 100755 distributedcloud-client/debian/dl_hook create mode 100644 distributedcloud-client/debian/meta_data.yaml diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 0000000..b6de744 --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1 @@ +distributedcloud-client diff --git a/distributedcloud-client/dcmanagerclient/osc/__init__.py b/distributedcloud-client/dcmanagerclient/osc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/distributedcloud-client/debian/deb_folder/changelog b/distributedcloud-client/debian/deb_folder/changelog new file mode 100644 index 0000000..a9dafa2 --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +distributedcloud-client (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Fabricio Henrique Ramos Thu, 11 Nov 2021 15:08:35 -0300 diff --git a/distributedcloud-client/debian/deb_folder/control b/distributedcloud-client/debian/deb_folder/control new file mode 100644 index 0000000..21c08aa --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/control @@ -0,0 +1,52 @@ +Source: distributedcloud-client +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: + debhelper-compat (= 13), + dh-python, + python3-openssl, + python3-babel, + python3-dev, + python3-jsonschema (>= 2.0.0), + python3-keystonemiddleware, + python3-oslo.concurrency, + python3-oslo.config, + python3-oslo.context, + python3-oslo.db, + python3-oslo.i18n, + python3-oslo.log, + python3-oslo.messaging, + python3-oslo.middleware, + python3-oslo.policy, + python3-oslo.rootwrap, + python3-oslo.serialization, + python3-oslo.service, + python3-oslo.utils, + python3-oslo.versionedobjects, + python3-pbr (>= 1.8), + python3-pip, + python3-routes (>= 1.12.3), + python3-setuptools, + python3-sphinx, + python3-sphinxcontrib.httpdomain, + python3-wheel, + python3-requests-toolbelt +Standards-Version: 4.1.2 +Homepage: https://www.starlingx.io + +Package: distributedcloud-client-dcmanagerclient +Architecture: any +Depends: + ${misc:Depends}, + ${python3:Depends} +Description: DC Manager Client + Distributed Cloud Manager Client + +Package: distributedcloud-client-wheels +Architecture: any +Depends: + ${misc:Depends}, + ${python3:Depends} +Description: distributedcloud-client wheels + Contains python wheels for distributedcloud-client diff --git a/distributedcloud-client/debian/deb_folder/copyright b/distributedcloud-client/debian/deb_folder/copyright new file mode 100644 index 0000000..176459a --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/copyright @@ -0,0 +1,63 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: distcloud-client +Upstream-Contact: StarlingX Developers +Source: https://opendev.org/starlingx/distcloud-client + +Files: * +Copyright: (c) 2019 StarlingX. +License: Apache-2 + +Files: dcmanagerclient/* +Copyright: (c) 2016-2017 Ericsson AB. + (c) 2017-2021 Wind River Systems, Inc. +License: Apache-2 + +Files: dcmanagerclient/api/httpclient.py +Copyright: (c) 2013 Mirantis, Inc. + (c) 2016 Ericsson AB. + (c) 2016 StackStorm, Inc. + (c) 2017 Wind River Systems, Inc. +License: Apache-2 + +Files: dcmanagerclient/commands/v1/kube_rootca_update_manager.py +Copyright: (c) 2021 Wind River Systems, Inc. +License: Apache-2 + +Files: dcmanagerclient/commands/v1/subcloud_deploy_manager.py +Copyright: (c) 2020 Wind River Systems, Inc. +License: Apache-2 + +Files: dcmanagerclient/osc/plugin.py +Copyright: (c) 2017 Wind River Systems, Inc. +License: Apache-2 + +Files: dcmanagerclient/utils.py +Copyright: (c) 2015 - Huawei Technologies Co. Ltd + (c) 2015 - StackStorm, Inc. + (c) 2016 - Ericsson AB + (c) 2017-2021 Wind River Systems, Inc. +License: Apache-2 + +Files: debian/* +Copyright: 2021 Wind River Systems, Inc. +License: Apache-2 + +Files: setup.py +Copyright: (c) 2013 Hewlett-Packard Development Company, L.P. +License: Apache-2 + +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/distributedcloud-client/debian/deb_folder/distributedcloud-client-dcmanagerclient.install b/distributedcloud-client/debian/deb_folder/distributedcloud-client-dcmanagerclient.install new file mode 100644 index 0000000..52e5ece --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/distributedcloud-client-dcmanagerclient.install @@ -0,0 +1,2 @@ +usr/bin/dcmanager +usr/lib/python3/dist-packages/* diff --git a/distributedcloud-client/debian/deb_folder/distributedcloud-client-wheels.install b/distributedcloud-client/debian/deb_folder/distributedcloud-client-wheels.install new file mode 100644 index 0000000..0ed0387 --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/distributedcloud-client-wheels.install @@ -0,0 +1 @@ +wheels/* diff --git a/distributedcloud-client/debian/deb_folder/rules b/distributedcloud-client/debian/deb_folder/rules new file mode 100755 index 0000000..4af39d0 --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export PBR_VERSION = 1.0.0 + +export ROOT = debian/tmp + +%: + dh $@ --with python3 --buildsystem=pybuild --test-tox + +override_dh_auto_install: + python3 setup.py install \ + --root=$(ROOT) \ + --prefix=/usr \ + --install-data=/usr/share \ + --install-layout=deb \ + --single-version-externally-managed + + python3 setup.py bdist_wheel \ + --universal \ + -d $(ROOT)/wheels + + rm -rf $(ROOT)/usr/lib/python3/dist-packages/dcmanagerclient/tests diff --git a/distributedcloud-client/debian/deb_folder/source/format b/distributedcloud-client/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/distributedcloud-client/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/distributedcloud-client/debian/dl_hook b/distributedcloud-client/debian/dl_hook new file mode 100755 index 0000000..822a295 --- /dev/null +++ b/distributedcloud-client/debian/dl_hook @@ -0,0 +1,13 @@ +#!/bin/bash + +set -x + +PKG_BUILD_NAME=$1 +PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME}) + +STX_BASE=$(realpath ${MY_REPO}/stx) +PKG_BASE=$(realpath ${STX_BASE}/distributedcloud-client/distributedcloud-client) + +mkdir ${PKG_BUILD_NAME} + +cp -r ${PKG_BASE}/* ${PKG_BUILD_DIR}/ diff --git a/distributedcloud-client/debian/meta_data.yaml b/distributedcloud-client/debian/meta_data.yaml new file mode 100644 index 0000000..c4f78f5 --- /dev/null +++ b/distributedcloud-client/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: distributedcloud-client +debver: 1.0-1 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true