From 45fd0a6b2cd2dbaaf7ff21ef989824377c5b17dc Mon Sep 17 00:00:00 2001 From: Robert Church Date: Thu, 18 Mar 2021 11:43:21 -0400 Subject: [PATCH] Build: Isolate platform plugins to an app specific directory When building the stx-platform-helm RPM for platform-integ-apps the helm plugins are installed in a location that could be populated with other app plugins if their spec files are not properly set up. Adjust the spec to provide an app specific location for the plugins to ensure that no other app plugins are included in the application tarball Closes-Bug: #1920066 Change-Id: Id24227cd100a3c29809f1dd01f61ea7174e9d779 Signed-off-by: Robert Church --- python-k8sapp-platform/centos/python-k8sapp-platform.spec | 5 +++-- stx-platform-helm/centos/stx-platform-helm.spec | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python-k8sapp-platform/centos/python-k8sapp-platform.spec b/python-k8sapp-platform/centos/python-k8sapp-platform.spec index a43e790..5bc8fae 100644 --- a/python-k8sapp-platform/centos/python-k8sapp-platform.spec +++ b/python-k8sapp-platform/centos/python-k8sapp-platform.spec @@ -1,3 +1,4 @@ +%global app_name platform-integ-apps %global pypi_name k8sapp-platform %global sname k8sapp_platform @@ -34,8 +35,8 @@ export PBR_VERSION=%{version} export PBR_VERSION=%{version}.%{tis_patch_ver} export SKIP_PIP_INSTALL=1 %{__python2} setup.py install --skip-build --root %{buildroot} -mkdir -p ${RPM_BUILD_ROOT}/plugins -install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/ +mkdir -p ${RPM_BUILD_ROOT}/plugins/%{app_name} +install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/ %files %{python2_sitelib}/%{sname} diff --git a/stx-platform-helm/centos/stx-platform-helm.spec b/stx-platform-helm/centos/stx-platform-helm.spec index 38f0f48..f3f29a3 100644 --- a/stx-platform-helm/centos/stx-platform-helm.spec +++ b/stx-platform-helm/centos/stx-platform-helm.spec @@ -74,7 +74,7 @@ sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml # Copy the plugins: installed in the buildroot mkdir -p %{app_staging}/plugins -cp /plugins/*.whl %{app_staging}/plugins +cp /plugins/%{app_name}/*.whl %{app_staging}/plugins # package it up find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5