From 10c4a075f6d21f0561fbe58c468650791db8fc2d Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 25 Aug 2021 13:18:15 -0400 Subject: [PATCH] Add debian build directory for controllerconfig Add debian build directory to build controllerconfig Debian package. Story: 2009101 Task: 43023 Signed-off-by: Charles Short Change-Id: Ic3726005faaa3d1686e583c17c809d946f78d60f --- controllerconfig/debian/control | 31 ------------ controllerconfig/debian/deb_folder/changelog | 5 ++ controllerconfig/debian/deb_folder/control | 50 +++++++++++++++++++ .../debian/deb_folder/controllerconfig.dirs | 6 +++ .../deb_folder/controllerconfig.install | 6 +++ .../controllerconfig.lintian-overrides | 3 ++ controllerconfig/debian/deb_folder/copyright | 42 ++++++++++++++++ controllerconfig/debian/deb_folder/rules | 44 ++++++++++++++++ .../debian/deb_folder/source/format | 1 + .../debian/deb_folder/source/options | 1 + controllerconfig/debian/meta_data.yaml | 7 +++ controllerconfig/debian/rules | 9 ---- 12 files changed, 165 insertions(+), 40 deletions(-) delete mode 100644 controllerconfig/debian/control create mode 100644 controllerconfig/debian/deb_folder/changelog create mode 100644 controllerconfig/debian/deb_folder/control create mode 100644 controllerconfig/debian/deb_folder/controllerconfig.dirs create mode 100644 controllerconfig/debian/deb_folder/controllerconfig.install create mode 100644 controllerconfig/debian/deb_folder/controllerconfig.lintian-overrides create mode 100644 controllerconfig/debian/deb_folder/copyright create mode 100755 controllerconfig/debian/deb_folder/rules create mode 100644 controllerconfig/debian/deb_folder/source/format create mode 100644 controllerconfig/debian/deb_folder/source/options create mode 100644 controllerconfig/debian/meta_data.yaml delete mode 100644 controllerconfig/debian/rules diff --git a/controllerconfig/debian/control b/controllerconfig/debian/control deleted file mode 100644 index 090ca1d788..0000000000 --- a/controllerconfig/debian/control +++ /dev/null @@ -1,31 +0,0 @@ -Source: controllerconfig -Priority: optional -Maintainer: StarlingX team -Build-Depends: python-setuptools, - python-all, - debhelper, - dh-python, - python-pip, - python-wheel -Standards-Version: 3.9.6 - -Package: controllerconfig -Architecture: all -Depends: ${misc:Depends}, - ${python:Depends}, - python-pyudev, - psmisc, - systemd, - python-cryptography, - python-keyring, - python-netifaces, - python-iso8601, - python-pysnmp4, - python-netaddr, - python-six, - python-yaml, - python-oslo-utils, - tsconfig, - sysinv, - fm-api -Description: This package contains the controllerconfig project. diff --git a/controllerconfig/debian/deb_folder/changelog b/controllerconfig/debian/deb_folder/changelog new file mode 100644 index 0000000000..bd6f6ef3cb --- /dev/null +++ b/controllerconfig/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +controllerconfig (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Chuck Short Sun, 08 Aug 2021 16:22:25 -0400 diff --git a/controllerconfig/debian/deb_folder/control b/controllerconfig/debian/deb_folder/control new file mode 100644 index 0000000000..4714ee383b --- /dev/null +++ b/controllerconfig/debian/deb_folder/control @@ -0,0 +1,50 @@ +Source: controllerconfig +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-setuptools, + python3-all, + python3-wheel +Build-Depends-Indep: + python3-netaddr, + python3-keyring, + python3-pyudev, + python3-psycopg2, + python3-six, + python3-iso8601, + python3-netifaces, + python3-cryptography, + python3-oslo.utils, + python3-oslo.log, + python3-yaml, + tsconfig +Standards-Version: 4.4.1 +Homepage: https://www.starlingx.io + +Package: controllerconfig +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, + python3-netaddr, + python3-keyring, + python3-pyudev, + python3-psycopg2, + python3-six, + python3-iso8601, + python3-netifaces, + python3-cryptography, + python3-oslo.utils, + python3-yaml, + python3-oslo.log, + tsconfig +Description: Controller node configuration + Support scripts for controller node upgrade and configuration + +Package: controllerconfig-wheels +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, python3-wheel +Description: Controller node configuration - python wheel + Support scripts for controller node upgrade and configuration + . + This package contains the python wheel. diff --git a/controllerconfig/debian/deb_folder/controllerconfig.dirs b/controllerconfig/debian/deb_folder/controllerconfig.dirs new file mode 100644 index 0000000000..9e912df501 --- /dev/null +++ b/controllerconfig/debian/deb_folder/controllerconfig.dirs @@ -0,0 +1,6 @@ +etc/upgrade.d +etc/init.d +etc/goenabled.d +usr/sbin +lib/systemd/system + diff --git a/controllerconfig/debian/deb_folder/controllerconfig.install b/controllerconfig/debian/deb_folder/controllerconfig.install new file mode 100644 index 0000000000..18df32b448 --- /dev/null +++ b/controllerconfig/debian/deb_folder/controllerconfig.install @@ -0,0 +1,6 @@ +usr/bin/* +etc/goenabled.d/* +usr/lib/python*/dist-packages/* +etc/init.d/* +etc/upgrade.d/* +lib/systemd/system/* diff --git a/controllerconfig/debian/deb_folder/controllerconfig.lintian-overrides b/controllerconfig/debian/deb_folder/controllerconfig.lintian-overrides new file mode 100644 index 0000000000..b856c6a153 --- /dev/null +++ b/controllerconfig/debian/deb_folder/controllerconfig.lintian-overrides @@ -0,0 +1,3 @@ +init.d-script-does-not-implement-required-option +init.d-script-missing-dependency-on-local_fs +omitted-systemd-service-for-init.d-script diff --git a/controllerconfig/debian/deb_folder/copyright b/controllerconfig/debian/deb_folder/copyright new file mode 100644 index 0000000000..a573bcfd0d --- /dev/null +++ b/controllerconfig/debian/deb_folder/copyright @@ -0,0 +1,42 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: controllerconfig +Source: https://opendev.org/starlingx/nova + +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/controllerconfig/debian/deb_folder/rules b/controllerconfig/debian/deb_folder/rules new file mode 100755 index 0000000000..e6ff38dee8 --- /dev/null +++ b/controllerconfig/debian/deb_folder/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export PYBUILD_NAME=controllerconfig + +ROOT := $(CURDIR)/debian/tmp + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_install: + python3 setup.py install -f --install-layout=deb --root=$(ROOT) + python3 setup.py bdist_wheel --universal -d $(CURDIR)/debian/controllerconfig-wheels/usr/share/python-wheels + install -d -m 755 $(ROOT)/usr/bin + install -p -D -m 700 scripts/openstack_update_admin_password $(ROOT)/usr/bin/openstack_update_admin_password + install -p -D -m 700 scripts/upgrade_swact_migration.py $(ROOT)/usr/bin/upgrade_swact_migration.py + install -p -D -m 755 scripts/image-backup.sh $(ROOT)/usr/bin/image-backup.sh + install -d -m 755 $(ROOT)/etc/goenabled.d/ + install -p -D -m 700 scripts/config_goenabled_check.sh $(ROOT)/etc/goenabled.d/config_goenabled_check.sh + install -d -m 755 $(ROOT)/etc/init.d + install -p -D -m 755 scripts/controller_config $(ROOT)/etc/init.d/controller_config + install -d -m 755 $(ROOT)/etc/upgrade.d + install -p -D -m 755 upgrade-scripts/* $(ROOT)/etc/upgrade.d + install -d -m 755 $(ROOT)/lib/systemd/system + install -p -D -m 664 scripts/controllerconfig.service $(ROOT)/lib/systemd/system/controllerconfig.service + dh_install + +override_dh_fixperms: + dh_fixperms \ + -X/usr/bin/openstack_update_admin_password \ + -X/usr/bin/image-backup.sh \ + -Xupgrade_swact_migration.py \ + -Xconfig_goenabled_check.sh \ + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + stestr run || true +endif + +override_dh_installsystemd: + dh_installsystemd --name controllerconfig + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 diff --git a/controllerconfig/debian/deb_folder/source/format b/controllerconfig/debian/deb_folder/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/controllerconfig/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/controllerconfig/debian/deb_folder/source/options b/controllerconfig/debian/deb_folder/source/options new file mode 100644 index 0000000000..cb61fa5267 --- /dev/null +++ b/controllerconfig/debian/deb_folder/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/controllerconfig/debian/meta_data.yaml b/controllerconfig/debian/meta_data.yaml new file mode 100644 index 0000000000..abce750ee9 --- /dev/null +++ b/controllerconfig/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: controllerconfig +debver: 1.0 +src_path: controllerconfig +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/controllerconfig/debian/rules b/controllerconfig/debian/rules deleted file mode 100644 index 66f762614b..0000000000 --- a/controllerconfig/debian/rules +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/make -f - -export PYBUILD_INSTALL_ARGS=--install-data=/usr/share --prefix=/usr --single-version-externally-managed - -%: - dh $@ --with python2 --buildsystem=pybuild - -override_dh_auto_test: - echo "skipping test"