helm2to3: add missing bin directory

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
This commit is contained in:
Dan Voiculeasa 2023-01-09 15:05:44 +02:00
parent 9c14e562e2
commit ff802a37ab

View File

@ -36,6 +36,8 @@ override_dh_auto_install:
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: