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 <robert.church@windriver.com>
This commit is contained in:
Robert Church 2021-03-18 11:43:21 -04:00
parent 88570d9f05
commit 45fd0a6b2c
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
%global app_name platform-integ-apps
%global pypi_name k8sapp-platform %global pypi_name k8sapp-platform
%global sname k8sapp_platform %global sname k8sapp_platform
@ -34,8 +35,8 @@ export PBR_VERSION=%{version}
export PBR_VERSION=%{version}.%{tis_patch_ver} export PBR_VERSION=%{version}.%{tis_patch_ver}
export SKIP_PIP_INSTALL=1 export SKIP_PIP_INSTALL=1
%{__python2} setup.py install --skip-build --root %{buildroot} %{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p ${RPM_BUILD_ROOT}/plugins mkdir -p ${RPM_BUILD_ROOT}/plugins/%{app_name}
install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/ install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/
%files %files
%{python2_sitelib}/%{sname} %{python2_sitelib}/%{sname}

View File

@ -74,7 +74,7 @@ sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml
# Copy the plugins: installed in the buildroot # Copy the plugins: installed in the buildroot
mkdir -p %{app_staging}/plugins mkdir -p %{app_staging}/plugins
cp /plugins/*.whl %{app_staging}/plugins cp /plugins/%{app_name}/*.whl %{app_staging}/plugins
# package it up # package it up
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5