Package openbao-monitor into a deb package
Packaging openbao-monitor into a debian package. Baomon executable can now be installed with the packaged deb file. The build dockerfile used for testing is also adjusted to account for the lint config changes. Test Plan: PASS Package build succeeded with no issues PASS Baomon executable installed by installing the built deb pacakge PASS Installed baomon executable can initialize a simple openbao server, unseal it, and periodically watch its status using the run command PASS Package build successful on bullseye PASS Package build successful on trixie Story: 2011244 Task: 52919 Change-Id: Iaa35eaf2f73cef83b0e941d08a988e42132b1b23 Signed-off-by: Tae Park <tae.park@windriver.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
ceph/ceph-manager
|
||||
ceph/python-cephclient
|
||||
security/openbao-monitor
|
||||
tools/collector
|
||||
tools/engtools/hostdata-collectors
|
||||
tools/accel-config
|
||||
1
debian_trixie_pkg_dirs_std
Normal file
1
debian_trixie_pkg_dirs_std
Normal file
@@ -0,0 +1 @@
|
||||
security/openbao-monitor
|
||||
5
security/openbao-monitor/debian/all/deb_folder/changelog
Normal file
5
security/openbao-monitor/debian/all/deb_folder/changelog
Normal file
@@ -0,0 +1,5 @@
|
||||
openbao-monitor (1.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Tae Park <tae.park@windriver.com> Wed, 08 Oct 2025 11:21:34 -0400
|
||||
18
security/openbao-monitor/debian/all/deb_folder/control
Normal file
18
security/openbao-monitor/debian/all/deb_folder/control
Normal file
@@ -0,0 +1,18 @@
|
||||
Source: openbao-monitor
|
||||
Section: golang
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
golang-any,
|
||||
golang-github-spf13-cobra-dev,
|
||||
golang-k8s-sigs-yaml-dev,
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
Package: openbao-monitor
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Static-Built-Using: ${misc:Static-Built-Using},
|
||||
Description: Openbao monitor
|
||||
CLI interface for openbao API calls
|
||||
22
security/openbao-monitor/debian/all/deb_folder/copyright
Normal file
22
security/openbao-monitor/debian/all/deb_folder/copyright
Normal file
@@ -0,0 +1,22 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: openbao-monitor
|
||||
Source: https://opendev.org/starlingx/utilities/
|
||||
|
||||
Files: *
|
||||
Copyright:
|
||||
(c) 2025 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'.
|
||||
@@ -0,0 +1 @@
|
||||
baomon usr/bin
|
||||
10
security/openbao-monitor/debian/all/deb_folder/rules
Normal file
10
security/openbao-monitor/debian/all/deb_folder/rules
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_dwz:
|
||||
dh_dwz -X baomon
|
||||
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
9
security/openbao-monitor/debian/all/meta_data.yaml
Normal file
9
security/openbao-monitor/debian/all/meta_data.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
debname: openbao-monitor
|
||||
debver: 1.0-1
|
||||
src_path: source
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
||||
SRC_GITREVCOUNT:
|
||||
SRC_BASE_SRCREV: b3a8abf24ac5ab59b44a2112d2c483b0a12eade6
|
||||
37
security/openbao-monitor/source/.golangci.yml
Normal file
37
security/openbao-monitor/source/.golangci.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: "2"
|
||||
linters:
|
||||
default: all
|
||||
disable:
|
||||
- depguard
|
||||
- dupl
|
||||
- prealloc
|
||||
settings:
|
||||
goconst:
|
||||
min-occurrences: 2
|
||||
gocyclo:
|
||||
min-complexity: 7
|
||||
gomoddirectives:
|
||||
replace-local: true
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
enable:
|
||||
- gci
|
||||
- gofmt
|
||||
- gofumpt
|
||||
- goimports
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
20
security/openbao-monitor/source/Makefile
Normal file
20
security/openbao-monitor/source/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
SHELL := /bin/bash
|
||||
TASK := build
|
||||
EXCLUDES := build test all
|
||||
|
||||
.PHONY: $(EXCLUDES)
|
||||
|
||||
BAOMON_NAME ?= baomon
|
||||
|
||||
all: $(TASK)
|
||||
|
||||
build:
|
||||
@if [ -d $* ]; then \
|
||||
go mod download; \
|
||||
go mod tidy; \
|
||||
go build -o $(BAOMON_NAME) .; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
@echo "Clean all build artifacts"
|
||||
rm -f $(BAOMON_NAME)
|
||||
@@ -4,7 +4,8 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Simple environment image to build the go openbao monitor
|
||||
# Simple environment image to build the go openbao monitor. Used to build
|
||||
# baomon for the test image in test/Dockerfile
|
||||
# The build result should be in the output folder
|
||||
# Example: docker build --target bin --output bin/ -f ./build/Dockerfile .
|
||||
|
||||
@@ -23,11 +24,10 @@ RUN go mod tidy
|
||||
|
||||
# run linting
|
||||
|
||||
ADD ./build/lintConfig.yaml /src/.golangci.yaml
|
||||
ADD ./.golangci.yml /src/.golangci.yml
|
||||
|
||||
RUN if [ "$WITH_LINTERS" ]; then \
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s v2.1.6 \
|
||||
&& ./bin/golangci-lint migrate -c /src/.golangci.yaml \
|
||||
&& ./bin/golangci-lint run; fi
|
||||
|
||||
RUN go build -o /out/baomon .
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
linters-settings:
|
||||
gocyclo:
|
||||
min-complexity: 7
|
||||
goconst:
|
||||
min-occurrences: 2
|
||||
gomoddirectives:
|
||||
replace-local: true
|
||||
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
- interfacer
|
||||
- dupl
|
||||
- depguard
|
||||
- prealloc
|
||||
Reference in New Issue
Block a user