Merge "Add helm-2to3 package"

This commit is contained in:
Zuul 2022-06-10 20:55:23 +00:00 committed by Gerrit Code Review
commit bee6b23e0b
3 changed files with 20 additions and 1 deletions

View File

@ -32,6 +32,7 @@ googletest-fdb850479284e2aae047b87df6beae84236d0135.tar.gz#googletest#https://ap
# gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#gorilla-context#https://github.com/gorilla/context/archive/08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#http##
# gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http##
helm-v3.2.1-linux-amd64.tar.gz#linux-amd64#https://get.helm.sh/helm-v3.2.1-linux-amd64.tar.gz#http##
!helm-2to3-0.10.0.tar.gz#helm-2to3-0.10.0#https://github.com/helm/helm-2to3/releases/download/v0.10.0/helm-2to3_0.10.0_linux_amd64.tar.gz#https##
intel-ipsec-mb-134c90c912ea9376460e9d949bb1319a83a9d839.tar.gz#intel-ipsec-mb#https://api.github.com/repos/spdk/intel-ipsec-mb/tarball/134c90c912ea9376460e9d949bb1319a83a9d839#https##
isa-l-7e1a337433a340bc0974ed0f04301bdaca374af6.tar.gz#isa-l#https://api.github.com/repos/ceph/isa-l/tarball/7e1a337433a340bc0974ed0f04301bdaca374af6#https##
isa-l_crypto-603529a4e06ac8a1662c13d6b31f122e21830352.tar.gz#isa-l_crypto#https://api.github.com/repos/01org/isa-l_crypto/tarball/603529a4e06ac8a1662c13d6b31f122e21830352#https##

View File

@ -1,7 +1,8 @@
VERSION=3.2.1
TAR_NAME=helm
TAR="$TAR_NAME-v$VERSION-linux-amd64.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/*"
HELM2TO3_TAR="helm-2to3-0.10.0.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/* ${CGCS_BASE}/downloads/${HELM2TO3_TAR}"
TIS_PATCH_VER=PKG_GITREVCOUNT

View File

@ -10,6 +10,7 @@ Source0: %{name}-v%{version}-linux-amd64.tar.gz
Source1: helm-upload
Source2: helm.sudo
Source3: helmv2-cli.sh
Source4: helm-2to3-0.10.0.tar.gz
Requires: /bin/bash
@ -19,6 +20,14 @@ Requires: /bin/bash
%prep
%setup -n linux-amd64
# Extract helm plugins
mkdir -p ./2to3
tar zxvf %{SOURCE4} -C ./2to3
# The plugin needs to be slightly adjusted
mkdir -p ./2to3/bin
mv ./2to3/2to3 ./2to3/bin
%install
install -d %{buildroot}%{_sbindir}
install -m 755 ${RPM_BUILD_DIR}/linux-amd64/helm %{buildroot}%{_sbindir}/helm
@ -28,9 +37,17 @@ install -m 755 %{SOURCE3} %{buildroot}/usr/local/sbin/helmv2-cli
install -d %{buildroot}%{_sysconfdir}/sudoers.d
install -m 440 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudoers.d/helm
# Install helm plugins
install -d %{buildroot}/usr/local/share/helm
install -d %{buildroot}/usr/local/share/helm/plugins
# Install helm plugin 2to3
cp -R 2to3 %{buildroot}/usr/local/share/helm/plugins/
%files
%defattr(-,root,root,-)
%{_sbindir}/helm
/usr/local/sbin/helm-upload
/usr/local/sbin/helmv2-cli
%{_sysconfdir}/sudoers.d/helm
/usr/local/share/helm/plugins/2to3/*