From 6fe52945b0fc9316560d7c6bbf0cf79c9c86bf4d Mon Sep 17 00:00:00 2001 From: Leonardo Fagundes Luz Serrano Date: Fri, 12 Nov 2021 16:42:45 -0300 Subject: [PATCH] Add debian package for vm-topology Add debian packaging infrastructure for vm-topology to build a debian package. Test Plan: build pkg; build image; compare with RPM PASS pkg builds PASS same contents and permissions as RPM PASS image builds, however test was run using the upstream version of libvirt0 instead of the stx version libvirt. Depends-On: https://review.opendev.org/c/starlingx/integ/+/824928 Story: 2009101 Task: 43961 Signed-off-by: Leonardo Fagundes Luz Serrano Change-Id: I64d731ad56809d762c196720dab142c341438981 --- vm-topology/debian/deb_folder/changelog | 5 ++ vm-topology/debian/deb_folder/control | 51 +++++++++++++++++++ vm-topology/debian/deb_folder/copyright | 44 ++++++++++++++++ vm-topology/debian/deb_folder/rules | 18 +++++++ vm-topology/debian/deb_folder/source/format | 1 + vm-topology/debian/deb_folder/source/options | 1 + .../debian/deb_folder/vm-topology.install | 2 + vm-topology/debian/meta_data.yaml | 7 +++ 8 files changed, 129 insertions(+) create mode 100644 vm-topology/debian/deb_folder/changelog create mode 100644 vm-topology/debian/deb_folder/control create mode 100644 vm-topology/debian/deb_folder/copyright create mode 100755 vm-topology/debian/deb_folder/rules create mode 100644 vm-topology/debian/deb_folder/source/format create mode 100644 vm-topology/debian/deb_folder/source/options create mode 100644 vm-topology/debian/deb_folder/vm-topology.install create mode 100644 vm-topology/debian/meta_data.yaml diff --git a/vm-topology/debian/deb_folder/changelog b/vm-topology/debian/deb_folder/changelog new file mode 100644 index 0000000..2a2f39d --- /dev/null +++ b/vm-topology/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +vm-topology (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Leonardo Fagundes Luz Serrano Thu, 11 Nov 2021 17:23:08 -0300 diff --git a/vm-topology/debian/deb_folder/control b/vm-topology/debian/deb_folder/control new file mode 100644 index 0000000..3c29c03 --- /dev/null +++ b/vm-topology/debian/deb_folder/control @@ -0,0 +1,51 @@ +Source: vm-topology +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + libvirt0, + python3-all, + python3-setuptools, + python3-wheel, +Build-Depends-Indep: + python3-cinderclient, + python3-glanceclient, + python3-keyring, + python3-keystoneauth1, + python3-keystoneclient, + python3-keystonemiddleware, + python3-novaclient, + python3-oslo.config, + python3-oslo.serialization, + python3-prettytable, + python3-psutil, + python3-sqlalchemy, +Standards-Version: 4.1.2 +Homepage: https://www.starlingx.io + +Package: vm-topology +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, + libvirt0, + python3-cinderclient, + python3-glanceclient, + python3-keyring, + python3-keystoneauth1, + python3-keystoneclient, + python3-keystonemiddleware, + python3-novaclient, + python3-oslo.config, + python3-oslo.serialization, + python3-prettytable, + python3-psutil, + python3-sqlalchemy, +Description: Show compute resources and VM topology + This is the python3 version of the package. + +Package: vm-topology-wheels +Architecture: all +Depends: ${misc:Depends} +Description: Contains python wheels for vm-topology + This is the support package for the PEP 427 wheel version of the package, + required for using pip inside a virtual environment. diff --git a/vm-topology/debian/deb_folder/copyright b/vm-topology/debian/deb_folder/copyright new file mode 100644 index 0000000..881eefa --- /dev/null +++ b/vm-topology/debian/deb_folder/copyright @@ -0,0 +1,44 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: vm-topology +Upstream-Contact: StarlingX Developers +Source: https://opendev.org/starlingx + +Files: * +Copyright: + (c) 2013-2021 Wind River Systems, Inc + (c) Others (See individual files for more details) +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'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +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/vm-topology/debian/deb_folder/rules b/vm-topology/debian/deb_folder/rules new file mode 100755 index 0000000..e3be04b --- /dev/null +++ b/vm-topology/debian/deb_folder/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +export PYBUILD_NAME=vm-topology + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_install: + python3 setup.py install -f --install-layout=deb --root=$(CURDIR)/debian/tmp + + python3 setup.py bdist_wheel \ + --universal \ + -d $(CURDIR)/debian/vm-topology-wheels/usr/share/python3-wheels + + dh_install + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 diff --git a/vm-topology/debian/deb_folder/source/format b/vm-topology/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/vm-topology/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/vm-topology/debian/deb_folder/source/options b/vm-topology/debian/deb_folder/source/options new file mode 100644 index 0000000..cb61fa5 --- /dev/null +++ b/vm-topology/debian/deb_folder/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/vm-topology/debian/deb_folder/vm-topology.install b/vm-topology/debian/deb_folder/vm-topology.install new file mode 100644 index 0000000..92f587c --- /dev/null +++ b/vm-topology/debian/deb_folder/vm-topology.install @@ -0,0 +1,2 @@ +usr/bin/vm-topology +usr/lib/python*/dist-packages/* diff --git a/vm-topology/debian/meta_data.yaml b/vm-topology/debian/meta_data.yaml new file mode 100644 index 0000000..a80f153 --- /dev/null +++ b/vm-topology/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: vm-topology +debver: 1.0-1 +src_path: vm-topology +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true