From 1b989b481a383002f2185a9eb9dde4a130fa2f5d Mon Sep 17 00:00:00 2001 From: Dan Voiculeasa Date: Thu, 2 Jun 2022 20:31:44 +0300 Subject: [PATCH] debian: Allow runtime openstack completion This work affects only Debian. This is part of a fix for a bootstrap issue. Contents of bash-completion generated at build time vs runtime differ. Allow puppet code to generate bash-completion at runtime as on CentOS. Ostree doesn't allow changes /usr, instead ensure /etc/bash_completion.d is created, as the completion will be generated there. Tests on AIO-SX: PASS: build-pkgs, build-image, install PASS: bootstrap without ostree unlock goes past the issue Story: 2009964 Task: 45530 Signed-off-by: Dan Voiculeasa Change-Id: Ib941deb5bb1817b6c32a90bbd7ef0a1f3c7dd276 --- .../0002-Allow-external-bash-completion.patch | 40 +++++++++++++++++++ .../debian/deb_patches/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 openstack/python-openstackclient/debian/deb_patches/0002-Allow-external-bash-completion.patch diff --git a/openstack/python-openstackclient/debian/deb_patches/0002-Allow-external-bash-completion.patch b/openstack/python-openstackclient/debian/deb_patches/0002-Allow-external-bash-completion.patch new file mode 100644 index 00000000..efcb45cb --- /dev/null +++ b/openstack/python-openstackclient/debian/deb_patches/0002-Allow-external-bash-completion.patch @@ -0,0 +1,40 @@ +From 7c189ae05ef789bf030ddf224934dc804669d256 Mon Sep 17 00:00:00 2001 +From: Dan Voiculeasa +Date: Thu, 2 Jun 2022 20:20:50 +0300 +Subject: [PATCH 2/2] Allow external bash completion + +Don't generate the bash completion at build time, as it is different +than the one generated at runtime. Allow bash completion to be +generated at /etc/bash_completion.d . + +Signed-off-by: Dan Voiculeasa +--- + debian/python3-openstackclient.dirs | 1 + + debian/rules | 3 --- + 2 files changed, 1 insertion(+), 3 deletions(-) + create mode 100644 debian/python3-openstackclient.dirs + +diff --git a/debian/python3-openstackclient.dirs b/debian/python3-openstackclient.dirs +new file mode 100644 +index 0000000..bc3b680 +--- /dev/null ++++ b/debian/python3-openstackclient.dirs +@@ -0,0 +1 @@ ++etc/bash_completion.d/ +diff --git a/debian/rules b/debian/rules +index 490e439..1472e19 100755 +--- a/debian/rules ++++ b/debian/rules +@@ -14,9 +14,6 @@ override_dh_auto_build: + override_dh_auto_install: + pkgos-dh_auto_install --no-py2 --wheel + +- # Generate bash completion +- pkgos-gen-completion --py3 openstack +- + override_dh_auto_test: + ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + pkgos-dh_auto_test --no-py2 'openstackclient\.tests\.(?!(.*test_shell\.TestShellCli\.test_shell_args_precedence.*|.*test_shell\.TestShellCliEnv\.test_shell_args_precedence_.*))' +-- +2.34.1 + diff --git a/openstack/python-openstackclient/debian/deb_patches/series b/openstack/python-openstackclient/debian/deb_patches/series index c200b057..683d5321 100644 --- a/openstack/python-openstackclient/debian/deb_patches/series +++ b/openstack/python-openstackclient/debian/deb_patches/series @@ -1 +1,2 @@ 0001-Add-wheel-package.patch +0002-Allow-external-bash-completion.patch