From a02fc9a62ece209ec8077c7aaf8c083fad1e5a30 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Mon, 22 Apr 2024 18:58:38 +0000 Subject: [PATCH] Add new redfishtool package to the Debian build system StarlingX is moving from Bullseye to Bookworm and intends to use leading edge opensource redfishtool. However, at this time, there is no publicly available version of the latest redfishtool (version 1.1.8) in Bookworm or otherwise. This update introduces a new package ; redfishtool version 1.1.8 This update also includes a github patch for a versioning update that was released after version 1.1.8 was tagged. Without this patch the installed version of redfishtool incorrectly reads 1.1.7. Test Plan: PASS: Verify build command 'build-pkgs -c -p redfishtool' PASS: Verify build after manually removing the already downloaded version of redfishtool 1.1.5 PASS: Verify build of newly created build env after manually cherry-picking this update following the repo init/sync PASS: Verify new redfishtool version is installed and reads as 1.1.8 PASS: Verify this new version passes acceptance testing across a wide variety of servers manufacturers and models. PASS: - provisioning with mtcAgent and hwmond processes. PASS: - mtcAgent for power control PASS: - hwmond for sensor monitoring Story: 2010533 Task: 49991 Change-Id: I7bf2469033d2be3f0b693153b3b8ee86a63cc3b5 Signed-off-by: Eric MacDonald --- bmc/redfishtool/debian/deb_folder/changelog | 5 ++ bmc/redfishtool/debian/deb_folder/control | 19 +++++++ bmc/redfishtool/debian/deb_folder/copyright | 34 +++++++++++ .../debian/deb_folder/redfishtool.install | 3 + bmc/redfishtool/debian/deb_folder/rules | 12 ++++ .../debian/deb_folder/source/format | 1 + bmc/redfishtool/debian/meta_data.yaml | 11 ++++ .../patches/0001-1.1.8-versioning.patch | 56 +++++++++++++++++++ bmc/redfishtool/debian/patches/series | 1 + debian_iso_image.inc | 3 + debian_pkg_dirs | 1 + 11 files changed, 146 insertions(+) create mode 100644 bmc/redfishtool/debian/deb_folder/changelog create mode 100644 bmc/redfishtool/debian/deb_folder/control create mode 100644 bmc/redfishtool/debian/deb_folder/copyright create mode 100644 bmc/redfishtool/debian/deb_folder/redfishtool.install create mode 100755 bmc/redfishtool/debian/deb_folder/rules create mode 100644 bmc/redfishtool/debian/deb_folder/source/format create mode 100644 bmc/redfishtool/debian/meta_data.yaml create mode 100644 bmc/redfishtool/debian/patches/0001-1.1.8-versioning.patch create mode 100644 bmc/redfishtool/debian/patches/series diff --git a/bmc/redfishtool/debian/deb_folder/changelog b/bmc/redfishtool/debian/deb_folder/changelog new file mode 100644 index 000000000..66893a486 --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +redfishtool (1.1.8-1) unstable; urgency=medium + + * Initial release. + + -- Eric Macdonald Wed, 10 Apr 2024 16:12:19 +0000 diff --git a/bmc/redfishtool/debian/deb_folder/control b/bmc/redfishtool/debian/deb_folder/control new file mode 100644 index 000000000..2d0e7fc9c --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/control @@ -0,0 +1,19 @@ +Source: redfishtool +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-all, + python3-setuptools, + python3-wheel, +Standards-Version: 4.1.2 +Homepage: https://www.starlingx.io + +Package: redfishtool +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, +Description: Access BMC Redfish service + Provides command line interface to Board Management Controllers + that support the Redfish protocol. + This is the python3 version of the package. diff --git a/bmc/redfishtool/debian/deb_folder/copyright b/bmc/redfishtool/debian/deb_folder/copyright new file mode 100644 index 000000000..2ba8386a5 --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/copyright @@ -0,0 +1,34 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: + (c) 2024 Wind River Systems, Inc + (c) Copyright (c) 2016, Contributing Member(s) of Distributed Management Task Force, Inc.. All rights reserved. +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + * Neither the name of Kitware, Inc. nor the names of Contributors + may be used to endorse or promote products derived from this + software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/bmc/redfishtool/debian/deb_folder/redfishtool.install b/bmc/redfishtool/debian/deb_folder/redfishtool.install new file mode 100644 index 000000000..9bc926013 --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/redfishtool.install @@ -0,0 +1,3 @@ +usr/bin/redfishtool +usr/bin/redfishtool.py +usr/lib/python3/dist-packages/redfishtoollib/* diff --git a/bmc/redfishtool/debian/deb_folder/rules b/bmc/redfishtool/debian/deb_folder/rules new file mode 100755 index 000000000..59a65e845 --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + +export PYBUILD_NAME=redfishtool + +export PBR_VERSION=1.0.0 + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_install: + # nothing to do here diff --git a/bmc/redfishtool/debian/deb_folder/source/format b/bmc/redfishtool/debian/deb_folder/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/bmc/redfishtool/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/bmc/redfishtool/debian/meta_data.yaml b/bmc/redfishtool/debian/meta_data.yaml new file mode 100644 index 000000000..5f6b89bcf --- /dev/null +++ b/bmc/redfishtool/debian/meta_data.yaml @@ -0,0 +1,11 @@ +--- +debname: redfishtool +debver: 1.1.8 +dl_path: + name: 1.1.8.tar.gz + url: https://github.com/DMTF/Redfishtool/archive/refs/tags/1.1.8.tar.gz + md5sum: bb2769e2c0aaff1d006a97b55b40dcd9 + sha256sum: 8289dc4368f5406d9fd15dba1f7a849e994dd1e77faa7ec8b94f7defc221f8f9 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/bmc/redfishtool/debian/patches/0001-1.1.8-versioning.patch b/bmc/redfishtool/debian/patches/0001-1.1.8-versioning.patch new file mode 100644 index 000000000..35306abb8 --- /dev/null +++ b/bmc/redfishtool/debian/patches/0001-1.1.8-versioning.patch @@ -0,0 +1,56 @@ +From ff18b735189bcab5d7c86186fa36baabebe55971 Mon Sep 17 00:00:00 2001 +From: GitHub Release Workflow <> +Date: Wed, 16 Aug 2023 20:28:08 +0000 +Subject: [PATCH] 1.1.8 versioning + +Signed-off-by: GitHub Release Workflow <> +--- + CHANGELOG.md | 3 +++ + redfishtoollib/redfishtoolTransport.py | 4 ++-- + setup.py | 2 +- + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index b81e357..29e6b23 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -1,5 +1,8 @@ + # Change Log + ++## [1.1.8] - 2023-08-16 ++- Corrected matching logic to return the matched resource if found ++ + ## [1.1.7] - 2023-06-30 + - Added workaround to specify the 'BootSourceOverrideMode' property when modifying the boot override properties even if the mode is not changing + +diff --git a/redfishtoollib/redfishtoolTransport.py b/redfishtoollib/redfishtoolTransport.py +index be7b83d..3eee1c7 100644 +--- a/redfishtoollib/redfishtoolTransport.py ++++ b/redfishtoollib/redfishtoolTransport.py +@@ -60,8 +60,8 @@ class RfTransport(): + def __init__(self): + # constant parameters-- these dont change and are not updated + self.program="redfishtool" # program name (in case we want to change it) +- self.version="1.1.7" # this redfishtool version +- self.releaseDate="06/30/2023" # release date for this version of redfishtool ++ self.version="1.1.8" # this redfishtool version ++ self.releaseDate="08/16/2023" # release date for this version of redfishtool + self.downloadFrom="https://github.com/DMTF/Redfishtool" # where to find redfishtool + self.magic="12345" # used for debug to test for a known parameter in this object + self.UNAUTHENTICATED_API=1 # unauthenticated API that doesn't send credentials in body data +diff --git a/setup.py b/setup.py +index 907c25f..c21fbbe 100644 +--- a/setup.py ++++ b/setup.py +@@ -6,7 +6,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + + setup(name='redfishtool', +- version='1.1.7', ++ version='1.1.8', + description='Redfishtool package and command-line client', + long_description=long_description, + long_description_content_type='text/markdown', +-- +2.25.1 + diff --git a/bmc/redfishtool/debian/patches/series b/bmc/redfishtool/debian/patches/series new file mode 100644 index 000000000..92818d1c3 --- /dev/null +++ b/bmc/redfishtool/debian/patches/series @@ -0,0 +1 @@ +0001-1.1.8-versioning.patch diff --git a/debian_iso_image.inc b/debian_iso_image.inc index 00e88f8ec..7a009747b 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -387,6 +387,9 @@ openvswitch-common openvswitch-switch-dpdk openvswitch-switch +#redfishtool 1.1.8 +redfishtool + #runc #golang-github-opencontainers-runc-dev # not used runc diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 36c5335f6..b132d8cb3 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -13,6 +13,7 @@ base/synce4l base/systemd base/systemd-presets base/watchdog +bmc/redfishtool centos-debian-compat ceph/ceph config/facter