Add Debian packaging for helm and chartmuseum

These packages require the following files in a local mirror:
* chartmuseum-0.12.0.tar.gz
* chartmuseum-v0.12.0-amd64
* helm-v3.2.1-linux-amd64.tar.gz

Story: 2009101
Task: 43715

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: I85c854f1fb62efa993a030fe06105bb2c0751165
This commit is contained in:
Tracey Bogue 2021-10-21 06:46:03 -05:00
parent a33039e3da
commit f98b1a5b40
20 changed files with 206 additions and 0 deletions

View File

@ -6,4 +6,6 @@ config/puppet-modules/puppet-rabbitmq-8.5.0
config/puppet-modules/puppet-staging
filesystem/drbd/drbd-tools
filesystem/parted
kubernetes/chartmuseum
kubernetes/helm
storage-drivers/trident-installer

View File

@ -0,0 +1,5 @@
chartmuseum (0.12.0-1) unstable; urgency=medium
* Initial release
-- Tracey Bogue <tracey.bogue@windriver.com> Tue, 19 Oct 2021 13:14:42 +0000

View File

@ -0,0 +1 @@
usr/bin/chartmuseum

View File

@ -0,0 +1 @@
statically-linked-binary

View File

@ -0,0 +1,14 @@
Source: chartmuseum
Section: admin
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Package: chartmuseum
Architecture: any
Depends: ${misc:Depends}
Description: StarlingX Helm Chartmuseum
Chartmuseum is a Helm chart repository with support for Amazon S3
and Google Cloud Storage.

View File

@ -0,0 +1,31 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: chartmuseum
Upstream-Contact: https://slack.k8s.io/
Source: https://github.com/helm/chartmuseum/
Files: *
Copyright: (C) Copyright 2020 The Helm Authors All Rights Reserved
License: Apache-2
Upstream-Name: chartmuseum
Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Source: https://opendev.org/starlingx/integ/src/branch/master/kubernetes/chartmuseum
Files: debian/*
Copyright: (c) 2021 Wind River Systems, Inc.
License: Apache-2
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'.

View File

@ -0,0 +1,20 @@
#!/usr/bin/make -f
# export DH_VERBOSE = 1
export CHARTMUSEUM_VERSION = 0.12.0
export ROOT = debian/tmp
export BINDIR = $(ROOT)/usr/bin
%:
dh $@
override_dh_auto_build:
tar xfz chartmuseum-$(CHARTMUSEUM_VERSION).tar.gz
override_dh_auto_clean:
override_dh_auto_install:
install -d -m 755 $(BINDIR)
install -p -D -m 755 chartmuseum-v$(CHARTMUSEUM_VERSION)-amd64 $(BINDIR)/chartmuseum
override_dh_auto_test:

View File

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

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
PKG_BUILD_NAME=$1
PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME})
mkdir ${PKG_BUILD_ROOT}
pushd ${PKG_BUILD_ROOT}
# Local mirror workaround until CGCS_BASE mirror is supported.
STX_MIRROR=$(realpath "/import/mirrors/starlingx")
# Download and extract helm source package.
CM_SOURCE=$(realpath ${STX_MIRROR}/downloads/chartmuseum-0.12.0.tar.gz)
CM_EXEC=$(realpath ${STX_MIRROR}/downloads/chartmuseum-v0.12.0-amd64)
cp ${CM_SOURCE} ${PKG_BUILD_ROOT}
cp ${CM_EXEC} ${PKG_BUILD_ROOT}

View File

@ -0,0 +1,7 @@
---
debname: chartmuseum
debver: 0.12.0-1
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -0,0 +1,5 @@
helm (3.2.1-1) unstable; urgency=medium
* Initial release
-- Tracey Bogue <tracey.bogue@windriver.com> Tue, 19 Oct 2021 07:46:42 +0000

View File

@ -0,0 +1,14 @@
Source: helm
Section: admin
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Package: helm
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Helm Kubernetes Package Manager
Helm is a tool for managing charts, which are packages of pre-configured
Kubernetes resources.

View File

@ -0,0 +1,31 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: helm
Upstream-Contact: cncf-helm@lists.cncf.io
Source: https://github.com/helm
Files: *
Copyright: (C) Copyright 2016 The Kubernetes Authors All Rights Reserved
License: Apache-2
Upstream-Name: helm
Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Source: https://opendev.org/starlingx/integ/src/branch/master/kubernetes/helm
Files: debian/*
Copyright: (c) 2021 Wind River Systems, Inc.
License: Apache-2
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'.

View File

@ -0,0 +1,4 @@
etc/sudoers.d/helm
usr/sbin/helm
usr/sbin/helm-upload
usr/sbin/helmv2-cli

View File

@ -0,0 +1,2 @@
description-starts-with-package-name
statically-linked-binary

View File

@ -0,0 +1,25 @@
#!/usr/bin/make -f
# export DH_VERBOSE = 1
export ROOT = debian/tmp
export SBINDIR = $(ROOT)/usr/sbin
export SUDOERDIR = $(ROOT)/etc/sudoers.d
export HELM_VERSION = 3.2.1
export HELM_EXECUTABLE = linux-amd64/helm
export HELM_PKG = helm-v$(HELM_VERSION)-linux-amd64.tar.gz
%:
dh $@
override_dh_auto_build:
# Extract the third party helm package downloaded in dl_hook.
tar xfz $(HELM_PKG)
override_dh_auto_install:
install -d -m 755 $(SBINDIR)
install -p -D -m 755 $(HELM_EXECUTABLE) $(SBINDIR)
install -p -D -m 755 helm-upload $(SBINDIR)
install -p -D -m 755 helmv2-cli.sh $(SBINDIR)/helmv2-cli
install -d -m 755 $(SUDOERDIR)
install -p -D -m 440 helm.sudo $(SUDOERDIR)/helm

View File

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

18
kubernetes/helm/debian/dl_hook Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -x
PKG_BUILD_NAME=$1
PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME})
STX_BASE=$(realpath ${MY_REPO}/stx)
SRC=$(realpath ${STX_BASE}/integ/kubernetes/helm/centos/files)
mkdir ${PKG_BUILD_ROOT}
pushd ${PKG_BUILD_ROOT}
cp -pr ${SRC}/* ${PKG_BUILD_ROOT}/
# Local mirror workaround until CGCS_BASE mirror is supported.
STX_MIRROR=$(realpath "/import/mirrors/starlingx")
# Download and extract helm source package.
HELM_SOURCE=$(realpath ${STX_MIRROR}/downloads/helm-v3.2.1-linux-amd64.tar.gz)
cp ${HELM_SOURCE} ${PKG_BUILD_ROOT}

View File

@ -0,0 +1,7 @@
---
debname: helm
debver: 3.2.1-1
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true