helm: uprev to 3.2.2 for stx 5.0

* uprev to 3.2.1

* inherit stx-metadata to help install updated
  files from stx 'integ' repo.

* remove the local copy of stx files.

* remove useless commented lines.

* update the do_install according to updated
  spec file.

Story: 2008952
Task: 42576

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Ief8355fd617252f4c2eea8b48ae5cfba98321d1d
This commit is contained in:
Jackie Huang 2021-06-23 14:55:10 +08:00
parent b69e9b2873
commit a347c0d434
3 changed files with 13 additions and 84 deletions

View File

@ -1,67 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# This script takes the names of packaged helm charts as arguments.
# It installs them in the on-node helm chart repository and regenerates
# the repository index.
# We want to run as the "www" user and scripts can't be setuid. The
# sudoers permissions are set up to allow wrsroot to run this script
# as the "www" user without a password.
if [ $USER != "www" ]; then
exec sudo -u www $0 $@
fi
RETVAL=0
REINDEX=0
REPO_BASE='/www/pages/helm_charts'
# First argument is always the repo where the charts need to be placed
if [ $# -lt 2 ]; then
echo "Usage: helm-upload <repo name> <chart 1> .. <chart N>"
exit 1
fi
# Make sure the repo directory exists
REPO_DIR="${REPO_BASE}/$1"
if [ ! -e $REPO_DIR ]; then
echo "$REPO_DIR doesn't exist."
exit 1
fi
shift 1
for FILE in "$@"; do
if [ -r $FILE ]; then
# QUESTION: should we disallow overwriting an existing file?
# The versions are embedded in the filename, so it shouldn't
# cause problems.
cp $FILE $REPO_DIR
if [ $? -ne 0 ]; then
echo Problem adding $FILE to helm chart registry.
RETVAL=1
else
REINDEX=1
fi
else
echo Cannot read file ${FILE}.
RETVAL=1
fi
done
# Now re-index the helm repository if we successfully copied in
# any new charts.
if [ $REINDEX -eq 1 ]; then
/usr/sbin/helm repo index $REPO_DIR
fi
exit $RETVAL

View File

@ -1,3 +0,0 @@
wrsroot ALL=(www) NOPASSWD: /usr/local/sbin/helm-upload
Defaults lecture=never, secure_path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

View File

@ -3,23 +3,20 @@ SUMMARY = "The Kubernetes Package Manager"
HOMEPAGE = "https://github.com/kubernetes/helm/releases "
SECTION = "devel"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0c7bcb474e766c7d92924a18cd9d3878"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6a18660411af65e17f370bdbb50e6957"
#SRCREV = "618447cbf203d147601b4b9bd7f8c37a5d39fbb4"
SRCNAME = "helm"
#PROTOCOL = "https"
#BRANCH = "release-2.13"
S = "${WORKDIR}/linux-amd64"
PV = "2.13.1"
inherit stx-metadata
STX_REPO = "integ"
STX_SUBPATH = "kubernetes/helm/centos/files"
SRC_URI = " \
https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz \
file://helm-upload \
file://helm.sudo \
https://get.helm.sh/helm-v${PV}-linux-amd64.tar.gz \
"
# Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
SRC_URI[md5sum] = "ffbe37fe328d99156d14a950bbd8107c"
SRC_URI[sha256sum] = "c1967c1dfcd6c921694b80ededdb9bd1beb27cb076864e58957b1568bc98925a"
SRC_URI[md5sum] = "98764c2c0175bd306223cc985700d619"
SRC_URI[sha256sum] = "018f9908cb950701a5d59e757653a790c66d8eda288625dbb185354ca6f41f6b"
INSANE_SKIP_${PN} = "ldflags"
INHIBIT_PACKAGE_STRIP = "1"
@ -42,8 +39,9 @@ do_install() {
install -m 0750 -d ${D}/${sysconfdir}/sudoers.d
install -m 0755 ${S}/helm ${D}/${sbindir}/
install -m 0755 ${S}/../helm.sudo ${D}/${sysconfdir}/sudoers.d/helm
install -m 0755 ${S}/../helm-upload ${D}/${sbindir}/
install -m 0755 ${STX_METADATA_PATH}/helm.sudo ${D}/${sysconfdir}/sudoers.d/helm
install -m 0755 ${STX_METADATA_PATH}/helm-upload ${D}/${sbindir}/
install -m 0755 ${STX_METADATA_PATH}/helmv2-cli.sh ${D}/${sbindir}/helmv2-cli
}
BBCLASSEXTEND = "native nativesdk"
@ -51,6 +49,7 @@ BBCLASSEXTEND = "native nativesdk"
FILES_${PN} = " \
${sbindir}/helm \
${sbindir}/helm-upload \
${sbindir}/helmv2-cli \
${sysconfdir}/sudoers.d \
${sysconfdir}/sudoers.d/helm \
"