Browse Source

Add debian packaging for cgcs-patch

Add debian packaging infrastructure for cgcs-patch.

Story: 2009101
Task: 43076

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I6becf1c9cae10af78a4c4e75a2da3afa8b8420dd
changes/46/805846/10
Charles Short 5 months ago
parent
commit
e60858b9a7
  1. 4
      cgcs-patch/debian/deb_folder/cgcs-patch-agent.dirs
  2. 5
      cgcs-patch/debian/deb_folder/cgcs-patch-agent.install
  3. 1
      cgcs-patch/debian/deb_folder/cgcs-patch-agent.lintian-overrides
  4. 5
      cgcs-patch/debian/deb_folder/cgcs-patch-controller.dirs
  5. 10
      cgcs-patch/debian/deb_folder/cgcs-patch-controller.install
  6. 2
      cgcs-patch/debian/deb_folder/cgcs-patch-controller.lintian-overrides
  7. 4
      cgcs-patch/debian/deb_folder/cgcs-patch.dirs
  8. 10
      cgcs-patch/debian/deb_folder/cgcs-patch.install
  9. 4
      cgcs-patch/debian/deb_folder/cgcs-patch.lintian-overrides
  10. 5
      cgcs-patch/debian/deb_folder/changelog
  11. 50
      cgcs-patch/debian/deb_folder/control
  12. 23
      cgcs-patch/debian/deb_folder/copyright
  13. 1
      cgcs-patch/debian/deb_folder/python3-cgcs-patch.install
  14. 78
      cgcs-patch/debian/deb_folder/rules
  15. 1
      cgcs-patch/debian/deb_folder/source/format
  16. 1
      cgcs-patch/debian/deb_folder/source/options
  17. 7
      cgcs-patch/debian/dl_hook
  18. 7
      cgcs-patch/debian/meta_data.yaml
  19. 1
      debian_pkg_dirs

4
cgcs-patch/debian/deb_folder/cgcs-patch-agent.dirs

@ -0,0 +1,4 @@
usr/sbin
etc/pmon.d
etc/init.d
lib/systemd/system

5
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

1
cgcs-patch/debian/deb_folder/cgcs-patch-agent.lintian-overrides

@ -0,0 +1 @@
init.d-script-missing-dependency-on-local_fs

5
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

10
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

2
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

4
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

10
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

4
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

5
cgcs-patch/debian/deb_folder/changelog

@ -0,0 +1,5 @@
cgcs-patch (1.0) unstable; urgency=medium
* Initial release.
-- Charles Short <charles.short@windriver.com> Sat, 21 Aug 2021 15:18:20 -0400

50
cgcs-patch/debian/deb_folder/control

@ -0,0 +1,50 @@
Source: cgcs-patch
Section: admin
Priority: optional
Maintainer: StarlingX Developers <StarlingX-discuss@lists.StarlingX.io>
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

23
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'.

1
cgcs-patch/debian/deb_folder/python3-cgcs-patch.install

@ -0,0 +1 @@
/usr/lib/python*/dist-packages/*

78
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

1
cgcs-patch/debian/deb_folder/source/format

@ -0,0 +1 @@
3.0 (quilt)

1
cgcs-patch/debian/deb_folder/source/options

@ -0,0 +1 @@
extend-diff-ignore = "^[^/]*[.]egg-info/"

7
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

7
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

1
debian_pkg_dirs

@ -0,0 +1 @@
cgcs-patch
Loading…
Cancel
Save