diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-agent.dirs b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.dirs new file mode 100644 index 00000000..3f32d5c5 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.dirs @@ -0,0 +1,4 @@ +usr/sbin +etc/pmon.d +etc/init.d +lib/systemd/system diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-agent.install b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.install new file mode 100644 index 00000000..792c0314 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.install @@ -0,0 +1,5 @@ +usr/sbin/sw-patch-agent +usr/sbin/sw-patch-agent-restart +etc/pmon.d/sw-patch-agent.conf +etc/init.d/sw-patch-agent +lib/systemd/system/sw-patch-agent.service diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-agent.lintian-overrides b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.lintian-overrides new file mode 100644 index 00000000..b6977c62 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-agent.lintian-overrides @@ -0,0 +1 @@ +init.d-script-missing-dependency-on-local_fs diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-controller.dirs b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.dirs new file mode 100644 index 00000000..fb26066f --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.dirs @@ -0,0 +1,5 @@ +usr/sbin +etc/pmon.d +etc/init.d +lib/systemd/system +etc/bash_completion.d diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-controller.install b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.install new file mode 100644 index 00000000..d634f16c --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.install @@ -0,0 +1,10 @@ +usr/sbin/sw-patch +usr/sbin/sw-patch-controller-daemon +usr/sbin/sw-patch-controller-daemon-restart +usr/sbin/upgrade-start-pkg-extract +etc/pmon.d/sw-patch-controller-daemon.conf +etc/init.d/sw-patch-controller-daemon +etc/init.d/sw-patch-controller +lib/systemd/system/sw-patch-controller-daemon.service +etc/bash_completion.d/sw-patch +lib/systemd/system/sw-patch-controller.service diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch-controller.lintian-overrides b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.lintian-overrides new file mode 100644 index 00000000..1f1a30f3 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch-controller.lintian-overrides @@ -0,0 +1,2 @@ +init.d-script-does-not-implement-required-option +init.d-script-missing-dependency-on-local_fs diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch.dirs b/cgcs-patch/debian/deb_folder/cgcs-patch.dirs new file mode 100644 index 00000000..7a550c37 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch.dirs @@ -0,0 +1,4 @@ +etc/patching/patch-scripts +etc/init.d +lib/systemd/system +etc/logrotate.d diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch.install b/cgcs-patch/debian/deb_folder/cgcs-patch.install new file mode 100644 index 00000000..8a0968f3 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch.install @@ -0,0 +1,10 @@ +usr/sbin/rpm-audit +etc/patching/policy.json +etc/patching/patching.conf +etc/patching/patch-functions +run/patch-tmpdirs.conf +usr/sbin/run-patch-scripts +etc/init.d/sw-patch +lib/systemd/system/sw-patch.service +etc/goenabled.d/patch_check_goenabled.sh +etc/logrotate.d/patching diff --git a/cgcs-patch/debian/deb_folder/cgcs-patch.lintian-overrides b/cgcs-patch/debian/deb_folder/cgcs-patch.lintian-overrides new file mode 100644 index 00000000..bd9a4082 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/cgcs-patch.lintian-overrides @@ -0,0 +1,4 @@ +dir-or-file-in-run +init.d-script-does-not-implement-required-option +init.d-script-missing-dependency-on-local_fs + diff --git a/cgcs-patch/debian/deb_folder/changelog b/cgcs-patch/debian/deb_folder/changelog new file mode 100644 index 00000000..b8bae8e2 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +cgcs-patch (1.0) unstable; urgency=medium + + * Initial release. + + -- Charles Short Sat, 21 Aug 2021 15:18:20 -0400 diff --git a/cgcs-patch/debian/deb_folder/control b/cgcs-patch/debian/deb_folder/control new file mode 100644 index 00000000..2df4dd79 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/control @@ -0,0 +1,50 @@ +Source: cgcs-patch +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), dh-python, python3-setuptools, python3-all +Build-Depends-Indep: python3-keystonemiddleware, + python3-oslo.config, + python3-pecan, + python3-pycryptodome, + python3-lxml, + python3-requests-toolbelt, + python3-mock, + python3-stestr, + python3-testtools, + python3-six, + tsconfig +Standards-Version: 4.4.1 + +Package: cgcs-patch +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends}, python3-cgcs-patch +Description: Starlingx platform patching + Starlingx platform patching system + +Package: cgcs-patch-controller +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends}, python3-cgcs-patch, cgcs-patch +Description: Starlingx platform patching + Starlingx platform patching system + +Package: cgcs-patch-agent +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends}, python3-cgcs-patch, cgcs-patch +Description: Starlingx platform patching + Starlingx platform patching system + +Package: python3-cgcs-patch +Architecture: all +Depends: ${python3:Depends}, +${misc:Depends}, + python3-keystonemiddleware, + python3-oslo.config, + python3-pecan, + python3-pycryptodome, + python3-lxml, + python3-requests-toolbelt, + python3-six + tsconfig +Description: Starlingx platfom patching (python3) + Starlingx platform patching system python libraries diff --git a/cgcs-patch/debian/deb_folder/copyright b/cgcs-patch/debian/deb_folder/copyright new file mode 100644 index 00000000..4a0166b8 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cgcs-patch +Source: http://opendev.org/starlingx/update + +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 + . + http://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/cgcs-patch/debian/deb_folder/python3-cgcs-patch.install b/cgcs-patch/debian/deb_folder/python3-cgcs-patch.install new file mode 100644 index 00000000..ec7458ec --- /dev/null +++ b/cgcs-patch/debian/deb_folder/python3-cgcs-patch.install @@ -0,0 +1 @@ +/usr/lib/python*/dist-packages/* diff --git a/cgcs-patch/debian/deb_folder/rules b/cgcs-patch/debian/deb_folder/rules new file mode 100755 index 00000000..e8a5df00 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/rules @@ -0,0 +1,78 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export PYBUILD_NAME=cgcs-patch +DEBIAN_DESTDIR := $(CURDIR)/debian/tmp + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_auto_test: + echo + +override_dh_auto_install: + echo + +override_dh_install: + python3 setup.py install -f --install-layout=deb --root=${DEBIAN_DESTDIR} + + install -m 755 -d ${DEBIAN_DESTDIR}/usr/sbin + install -m 755 -d ${DEBIAN_DESTDIR}/etc/bash_completion.d + install -m 755 -d ${DEBIAN_DESTDIR}/etc/goenabled.d + install -m 755 -d ${DEBIAN_DESTDIR}/etc/init.d + install -m 755 -d ${DEBIAN_DESTDIR}/etc/logrotate.d + install -m 755 -d ${DEBIAN_DESTDIR}/etc/patching + install -m 700 -d ${DEBIAN_DESTDIR}/etc/patching/patch-scripts + install -m 755 -d ${DEBIAN_DESTDIR}/etc/pmon.d + install -m 755 -d ${DEBIAN_DESTDIR}/lib/systemd/system + install -m 500 bin/sw-patch-agent \ + ${DEBIAN_DESTDIR}/usr/sbin/sw-patch-agent + install -m 500 bin/sw-patch-controller-daemon \ + ${DEBIAN_DESTDIR}/usr/sbin/sw-patch-controller-daemon + install -m 555 bin/sw-patch \ + ${DEBIAN_DESTDIR}/usr/sbin/sw-patch + install -m 555 bin/rpm-audit \ + ${DEBIAN_DESTDIR}/usr/sbin/rpm-audit + install -m 500 bin/sw-patch-controller-daemon-init.sh \ + ${DEBIAN_DESTDIR}/etc/init.d/sw-patch-controller-daemon + install -m 500 bin/sw-patch-agent-init.sh \ + ${DEBIAN_DESTDIR}/etc/init.d/sw-patch-agent + install -m 600 bin/patching.conf \ + ${DEBIAN_DESTDIR}/etc/patching/patching.conf + install -m 644 bin/policy.json \ + ${DEBIAN_DESTDIR}/etc/patching/policy.json + install -m 444 bin/pmon-sw-patch-controller-daemon.conf \ + ${DEBIAN_DESTDIR}/etc//pmon.d/sw-patch-controller-daemon.conf + install -m 444 bin/pmon-sw-patch-agent.conf \ + ${DEBIAN_DESTDIR}/etc/pmon.d/sw-patch-agent.conf + install -m 444 bin/*.service ${DEBIAN_DESTDIR}/lib/systemd/system + install -m 444 bin/sw-patch.completion ${DEBIAN_DESTDIR}/etc/bash_completion.d/sw-patch + install -m 400 bin/patch-functions \ + ${DEBIAN_DESTDIR}/etc/patching/patch-functions + install -D -m 444 bin/patch-tmpdirs.conf \ + ${DEBIAN_DESTDIR}/run/patch-tmpdirs.conf + install -m 500 bin/run-patch-scripts \ + ${DEBIAN_DESTDIR}/usr/sbin/run-patch-scripts + install -m 500 bin/sw-patch-controller-daemon-restart \ + ${DEBIAN_DESTDIR}/usr/sbin/sw-patch-controller-daemon-restart + install -m 500 bin/sw-patch-agent-restart \ + ${DEBIAN_DESTDIR}/usr/sbin/sw-patch-agent-restart + install -m 500 bin/sw-patch-init.sh \ + ${DEBIAN_DESTDIR}/etc/init.d/sw-patch + install -m 500 bin/sw-patch-controller-init.sh \ + ${DEBIAN_DESTDIR}/etc/init.d/sw-patch-controller + install -m 555 bin/patch_check_goenabled.sh \ + ${DEBIAN_DESTDIR}/etc/goenabled.d/patch_check_goenabled.sh + install -m 444 bin/patching.logrotate \ + ${DEBIAN_DESTDIR}/etc/logrotate.d/patching + install -m 500 bin/upgrade-start-pkg-extract \ + ${DEBIAN_DESTDIR}/usr/sbin/upgrade-start-pkg-extract + dh_install + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 + +override_dh_fixperms: + dh_fixperms -Xsw-patch-* -Xrpm-audit -Xpatching.conf -Xpolicy.json \ + -Xpatch-functions -Xpatch-tmpdirs.conf -Xrun-patch-scripts \ + -Xpatch_check_goenabled.sh -Xpatching -Xupgrade-start-pkg-extract diff --git a/cgcs-patch/debian/deb_folder/source/format b/cgcs-patch/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/cgcs-patch/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/cgcs-patch/debian/deb_folder/source/options b/cgcs-patch/debian/deb_folder/source/options new file mode 100644 index 00000000..cb61fa52 --- /dev/null +++ b/cgcs-patch/debian/deb_folder/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/" diff --git a/cgcs-patch/debian/dl_hook b/cgcs-patch/debian/dl_hook new file mode 100755 index 00000000..ea5d7d07 --- /dev/null +++ b/cgcs-patch/debian/dl_hook @@ -0,0 +1,7 @@ +#!/bin/bash +set -x +LOCAL_DIR=$1 +PACKAGE_NAME=cgcs-patch +BASE_DIR=$MY_REPO/stx/update/cgcs-patch +cp -aL $BASE_DIR/cgcs-patch $LOCAL_DIR +cp -aL $BASE_DIR/bin $LOCAL_DIR diff --git a/cgcs-patch/debian/meta_data.yaml b/cgcs-patch/debian/meta_data.yaml new file mode 100644 index 00000000..d78ba762 --- /dev/null +++ b/cgcs-patch/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: cgcs-patch +debver: 1.0 +dl_hook: dl_hook +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 00000000..de8743c4 --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1 @@ +cgcs-patch