ff802a37ab
During an upgrade script it is observed an error:
Error: fork/exec /root/.local/share/helm/plugins/2to3/bin/2to3:
no such file or directory
'helm 2to3' fails because it is expected to be in bin directory ([1]).
We provide this structure in the package itself instead of downloading
from github ([2] + [3])
[1]: https://github.com/helm/helm-2to3/blob/v0.10.0/plugin.yaml#L5
[2]: 8ccf1c235a/controllerconfig/controllerconfig/upgrade-scripts/63-helm-v2-to-v3-rel_migration.sh (L35)
[3]: https://github.com/helm/helm-2to3/blob/v0.10.0/scripts/install_plugin.sh#L5
Test:
PASS: Call script 63-helm-v2-to-v3-rel_migration.sh and observe
no error
Story: 2009138
Task: 45584
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I7ea76407d57f162f51058bc2ecf143147dafbde8
45 lines
1.4 KiB
Makefile
Executable File
45 lines
1.4 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# vim: set expandtab!
|
|
# 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
|
|
|
|
export HELM_2TO3_VERSION = 0.10.0
|
|
export HELM_2TO3_PKG = helm-2to3_$(HELM_2TO3_VERSION).tar.gz
|
|
|
|
export HELM_MAPKUBEAPIS_VERSION = 0.3.0
|
|
export HELM_MAPKUBEAPIS_PKG = helm-mapkubeapis_$(HELM_MAPKUBEAPIS_VERSION).tar.gz
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
# Extract the third party helm package downloaded in dl_hook.
|
|
tar xfz $(HELM_PKG)
|
|
tar xfz $(HELM_2TO3_PKG)
|
|
tar xfz $(HELM_MAPKUBEAPIS_PKG)
|
|
|
|
override_dh_auto_install:
|
|
install -d -m 755 $(SBINDIR)
|
|
install -d -m 755 $(ROOT)/usr/local/sbin
|
|
install -p -D -m 755 $(HELM_EXECUTABLE) $(SBINDIR)
|
|
install -p -D -m 755 helm-upload $(ROOT)/usr/local/sbin
|
|
install -p -D -m 755 helmv2-cli.sh $(ROOT)/usr/local/sbin/helmv2-cli
|
|
install -d -m 755 $(SUDOERDIR)
|
|
install -p -D -m 440 helm.sudo $(SUDOERDIR)/helm
|
|
install -d -m 755 $(ROOT)/usr/local/share/helm
|
|
install -d -m 755 $(ROOT)/usr/local/share/helm/plugins
|
|
cp -R 2to3 $(ROOT)/usr/local/share/helm/plugins/
|
|
install -d -m 755 $(ROOT)/usr/local/share/helm/plugins/2to3/bin
|
|
mv $(ROOT)/usr/local/share/helm/plugins/2to3/2to3 $(ROOT)/usr/local/share/helm/plugins/2to3/bin
|
|
cp -R mapkubeapis $(ROOT)/usr/local/share/helm/plugins/
|
|
|
|
override_dh_usrlocal:
|
|
# Do Nothing
|