From 02cbe8403b51440757d241b233fd7d7342b99da2 Mon Sep 17 00:00:00 2001 From: Leonardo Fagundes Luz Serrano Date: Fri, 24 Feb 2023 17:14:15 -0300 Subject: [PATCH] Standardize app configs (re-submission) This is a re-submission of [1], which was reverted due to issues with centos builds. This change can merge now that centos is no longer supported. Fixed versioning and adjusted some build files to bring them as close to a standard as possible. - Remove centos files - Fix mismatch in plugin name, set to python3-k8sapp-APP - Standardize plugin debian files (rules, *.install) - plugin wheels saved to /plugin instead of /plugin/ Note: - Version tracking changes made in [1] were not added here as they are addressed in a different commit [1] https://review.opendev.org/c/starlingx/oidc-auth-armada-app/+/868293 Test Plan: PASS build-pkgs PASS wheel version updated PASS app tarball contains wheel file Story: 2010542 Task: 47516 Signed-off-by: Leonardo Fagundes Luz Serrano Change-Id: I18b99c9e68270b5dd5607ddaffb229904ac61c65 --- .zuul.yaml | 16 +-- centos_build_layer.cfg | 1 - centos_iso_image.inc | 2 - centos_pkg_dirs | 3 - centos_pkg_dirs_containers | 2 - centos_stable_wheels.inc | 1 - centos_tarball-dl.lst | 1 - debian_pkg_dirs | 4 +- oidc-auth-tools/centos/build_srpm.data | 2 - oidc-auth-tools/centos/oidc-auth-tools.spec | 74 ------------ oidc-auth-tools/oidcauthtools/setup.cfg | 2 +- python-k8sapp-oidc/centos/build_srpm.data | 6 - .../centos/python-k8sapp-oidc.spec | 52 -------- .../python3-k8sapp-oidc-wheels.install | 1 - .../deb_folder/python3-k8sapp-oidc.install | 2 - python-k8sapp-oidc/debian/deb_folder/rules | 22 ---- .../debian/deb_folder/changelog | 0 .../debian/deb_folder/control | 0 .../debian/deb_folder/copyright | 0 .../python3-k8sapp-oidc-wheels.install | 1 + .../deb_folder/python3-k8sapp-oidc.install | 1 + python3-k8sapp-oidc/debian/deb_folder/rules | 33 ++++++ .../debian/deb_folder/source/format | 0 .../debian/meta_data.yaml | 0 .../k8sapp_oidc/.gitignore | 0 .../k8sapp_oidc/.stestr.conf | 0 .../k8sapp_oidc/LICENSE | 0 .../k8sapp_oidc/README.rst | 0 .../k8sapp_oidc/k8sapp_oidc/__init__.py | 0 .../k8sapp_oidc/common/__init__.py | 0 .../k8sapp_oidc/common/constants.py | 0 .../k8sapp_oidc/k8sapp_oidc/helm/__init__.py | 0 .../k8sapp_oidc/k8sapp_oidc/helm/dex.py | 0 .../k8sapp_oidc/k8sapp_oidc/helm/dex_base.py | 0 .../k8sapp_oidc/helm/oidc_client.py | 0 .../k8sapp_oidc/helm/secret_observer.py | 0 .../k8sapp_oidc/k8sapp_oidc/tests/__init__.py | 0 .../k8sapp_oidc/k8sapp_oidc/tests/test_dex.py | 0 .../k8sapp_oidc/tests/test_oidc_client.py | 0 .../k8sapp_oidc/tests/test_plugins.py | 0 .../k8sapp_oidc/pylint.rc | 0 .../k8sapp_oidc/requirements.txt | 0 .../k8sapp_oidc/setup.cfg | 2 +- .../k8sapp_oidc/setup.py | 0 .../k8sapp_oidc/test-requirements.txt | 0 .../k8sapp_oidc/tox.ini | 0 .../k8sapp_oidc/upper-constraints.txt | 0 stx-oidc-auth-helm/centos/build_srpm.data | 13 -- .../centos/stx-oidc-auth-helm.spec | 111 ------------------ stx-oidc-auth-helm/debian/deb_folder/rules | 2 +- 50 files changed, 48 insertions(+), 306 deletions(-) delete mode 100644 centos_build_layer.cfg delete mode 100644 centos_iso_image.inc delete mode 100644 centos_pkg_dirs delete mode 100644 centos_pkg_dirs_containers delete mode 100644 centos_stable_wheels.inc delete mode 100644 centos_tarball-dl.lst delete mode 100644 oidc-auth-tools/centos/build_srpm.data delete mode 100644 oidc-auth-tools/centos/oidc-auth-tools.spec delete mode 100644 python-k8sapp-oidc/centos/build_srpm.data delete mode 100644 python-k8sapp-oidc/centos/python-k8sapp-oidc.spec delete mode 100644 python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install delete mode 100644 python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install delete mode 100755 python-k8sapp-oidc/debian/deb_folder/rules rename {python-k8sapp-oidc => python3-k8sapp-oidc}/debian/deb_folder/changelog (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/debian/deb_folder/control (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/debian/deb_folder/copyright (100%) create mode 100644 python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install create mode 100644 python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install create mode 100755 python3-k8sapp-oidc/debian/deb_folder/rules rename {python-k8sapp-oidc => python3-k8sapp-oidc}/debian/deb_folder/source/format (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/debian/meta_data.yaml (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/.gitignore (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/.stestr.conf (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/LICENSE (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/README.rst (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/__init__.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/common/__init__.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/common/constants.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/helm/__init__.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/helm/dex.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/helm/dex_base.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/helm/oidc_client.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/helm/secret_observer.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/tests/__init__.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/tests/test_dex.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/tests/test_oidc_client.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/k8sapp_oidc/tests/test_plugins.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/pylint.rc (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/requirements.txt (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/setup.cfg (98%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/setup.py (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/test-requirements.txt (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/tox.ini (100%) rename {python-k8sapp-oidc => python3-k8sapp-oidc}/k8sapp_oidc/upper-constraints.txt (100%) delete mode 100644 stx-oidc-auth-helm/centos/build_srpm.data delete mode 100644 stx-oidc-auth-helm/centos/stx-oidc-auth-helm.spec diff --git a/.zuul.yaml b/.zuul.yaml index 6d3470f..55092ff 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -32,11 +32,11 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-oidc/* + - python3-k8sapp-oidc/* vars: tox_envlist: py39 python_version: 3.9 - tox_extra_args: -c python-k8sapp-oidc/k8sapp_oidc/tox.ini + tox_extra_args: -c python3-k8sapp-oidc/k8sapp_oidc/tox.ini - job: @@ -46,10 +46,10 @@ Run flake8 test for k8sapp_oidc nodeset: debian-bullseye files: - - python-k8sapp-oidc/* + - python3-k8sapp-oidc/* vars: tox_envlist: flake8 - tox_extra_args: -c python-k8sapp-oidc/k8sapp_oidc/tox.ini + tox_extra_args: -c python3-k8sapp-oidc/k8sapp_oidc/tox.ini - job: name: k8sapp-oidc-tox-pylint @@ -63,10 +63,10 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-oidc/* + - python3-k8sapp-oidc/* vars: tox_envlist: pylint - tox_extra_args: -c python-k8sapp-oidc/k8sapp_oidc/tox.ini + tox_extra_args: -c python3-k8sapp-oidc/k8sapp_oidc/tox.ini - job: name: k8sapp-oidc-tox-bandit @@ -75,10 +75,10 @@ Run bandit test for k8sapp_oidc nodeset: debian-bullseye files: - - python-k8sapp-oidc/* + - python3-k8sapp-oidc/* vars: tox_envlist: bandit - tox_extra_args: -c python-k8sapp-oidc/k8sapp_oidc/tox.ini + tox_extra_args: -c python3-k8sapp-oidc/k8sapp_oidc/tox.ini - job: name: stx-oidc-auth-armada-app-upload-git-mirror diff --git a/centos_build_layer.cfg b/centos_build_layer.cfg deleted file mode 100644 index c581999..0000000 --- a/centos_build_layer.cfg +++ /dev/null @@ -1 +0,0 @@ -flock diff --git a/centos_iso_image.inc b/centos_iso_image.inc deleted file mode 100644 index 279f569..0000000 --- a/centos_iso_image.inc +++ /dev/null @@ -1,2 +0,0 @@ -stx-oidc-auth-helm -oidcauthtools diff --git a/centos_pkg_dirs b/centos_pkg_dirs deleted file mode 100644 index 86dd28f..0000000 --- a/centos_pkg_dirs +++ /dev/null @@ -1,3 +0,0 @@ -stx-oidc-auth-helm -oidc-auth-tools -python-k8sapp-oidc diff --git a/centos_pkg_dirs_containers b/centos_pkg_dirs_containers deleted file mode 100644 index 18d3d2e..0000000 --- a/centos_pkg_dirs_containers +++ /dev/null @@ -1,2 +0,0 @@ -stx-oidc-auth-helm -python-k8sapp-oidc diff --git a/centos_stable_wheels.inc b/centos_stable_wheels.inc deleted file mode 100644 index 05863f0..0000000 --- a/centos_stable_wheels.inc +++ /dev/null @@ -1 +0,0 @@ -oidcauthtools-wheels diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst deleted file mode 100644 index 0781874..0000000 --- a/centos_tarball-dl.lst +++ /dev/null @@ -1 +0,0 @@ -dex-0.8.2.tgz#dex#https://github.com/dexidp/helm-charts/releases/download/dex-0.8.2/dex-0.8.2.tgz#https## diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 86dd28f..321d869 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,3 +1,3 @@ -stx-oidc-auth-helm oidc-auth-tools -python-k8sapp-oidc +python3-k8sapp-oidc +stx-oidc-auth-helm diff --git a/oidc-auth-tools/centos/build_srpm.data b/oidc-auth-tools/centos/build_srpm.data deleted file mode 100644 index 03b3eae..0000000 --- a/oidc-auth-tools/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR="oidcauthtools" -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/oidc-auth-tools/centos/oidc-auth-tools.spec b/oidc-auth-tools/centos/oidc-auth-tools.spec deleted file mode 100644 index 0f3d19a..0000000 --- a/oidc-auth-tools/centos/oidc-auth-tools.spec +++ /dev/null @@ -1,74 +0,0 @@ -%global pypi_name oidcauthtools - -Summary: OIDC authentication tool package -Name: %{pypi_name} -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown -BuildArch: noarch -Source: %name-%version.tar.gz - -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-setuptools -BuildRequires: python2-wheel - -Requires: python2-mechanize -Requires: python2-html5lib -Requires: python2-webencodings -Requires: python-pbr >= 2.0.0 - - -%description -This package contains OIDC authentication tools to obtain token -from DEX and setup kubernetes credential for a user. - -%define local_bindir /usr/bin/ -%define pythonroot /usr/lib/python2.7/site-packages - - -%prep -%setup - -# Remove bundled egg-info -rm -rf *.egg-info - -%build -export PBR_VERSION=%{version} -%{__python2} setup.py build -%py2_build_wheel - -%install -export PBR_VERSION=%{version} -%{__python} setup.py install --root=$RPM_BUILD_ROOT \ - --install-lib=%{pythonroot} \ - --prefix=/usr \ - --install-data=/usr/share \ - --single-version-externally-managed -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -%global _buildsubdir %{_builddir}/%{name}-%{version} -install -d 755 %{buildroot}%{local_bindir} - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%license LICENSE -%defattr(-,root,root,-) -/usr/bin/* -%{python2_sitelib}/oidcauthtools -%{python2_sitelib}/*.egg-info - - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/wheels/* diff --git a/oidc-auth-tools/oidcauthtools/setup.cfg b/oidc-auth-tools/oidcauthtools/setup.cfg index 84de9d9..b15a0eb 100644 --- a/oidc-auth-tools/oidcauthtools/setup.cfg +++ b/oidc-auth-tools/oidcauthtools/setup.cfg @@ -29,5 +29,5 @@ console_scripts = cover-erase = true verbosity = 2 -[wheel] +[bdist_wheel] universal = 1 diff --git a/python-k8sapp-oidc/centos/build_srpm.data b/python-k8sapp-oidc/centos/build_srpm.data deleted file mode 100644 index 711a49c..0000000 --- a/python-k8sapp-oidc/centos/build_srpm.data +++ /dev/null @@ -1,6 +0,0 @@ -SRC_DIR="k8sapp_oidc" - -# Keep the SRCREV in sync with stx-oidc-auth-helm so the app version is the same -# as the plugin version -TIS_BASE_SRCREV=860834c14ba54eb047ef02bde7a1f2407ce700ad -TIS_PATCH_VER=GITREVCOUNT diff --git a/python-k8sapp-oidc/centos/python-k8sapp-oidc.spec b/python-k8sapp-oidc/centos/python-k8sapp-oidc.spec deleted file mode 100644 index d78cb8e..0000000 --- a/python-k8sapp-oidc/centos/python-k8sapp-oidc.spec +++ /dev/null @@ -1,52 +0,0 @@ -%global app_name oidc-auth-apps -%global pypi_name k8sapp-oidc -%global sname k8sapp_oidc - -Name: python-%{pypi_name} -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: StarlingX sysinv extensions: OIDC authorization K8S app - -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: python-setuptools -BuildRequires: python-pbr -BuildRequires: python2-pip -BuildRequires: python2-wheel - -%description -StarlingX sysinv extensions: OIDC authorization K8S app - -%prep -%setup -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info - -%build -export PBR_VERSION=%{version} -%{__python2} setup.py build - -%py2_build_wheel - -%install -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/%{app_name} -install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/ - -%files -%{python2_sitelib}/%{sname} -%{python2_sitelib}/%{sname}-*.egg-info - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/plugins/* diff --git a/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install b/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install deleted file mode 100644 index c1c1cec..0000000 --- a/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install +++ /dev/null @@ -1 +0,0 @@ -plugins/oidc-auth-apps/*.whl diff --git a/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install b/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install deleted file mode 100644 index 8c75558..0000000 --- a/python-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/python3/dist-packages/k8sapp_oidc-1.0.0.egg-info/* -usr/lib/python3/dist-packages/k8sapp_oidc/* diff --git a/python-k8sapp-oidc/debian/deb_folder/rules b/python-k8sapp-oidc/debian/deb_folder/rules deleted file mode 100755 index 6592963..0000000 --- a/python-k8sapp-oidc/debian/deb_folder/rules +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/make -f -# export DH_VERBOSE = 1 - -export APP_NAME=oidc-auth-apps -export PBR_VERSION=1.0.0 -export PYBUILD_NAME=k8sapp_oidc -export ROOT=debian/tmp - -%: - dh $@ --with=python3 --buildsystem=pybuild - -override_dh_auto_install: - python3 setup.py install --install-layout=deb --root $(ROOT) - python3 setup.py bdist_wheel \ - --universal \ - -d $(ROOT)/plugins/$(APP_NAME) - -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) -override_dh_auto_test: - # (tbogue) FIXME - PYTHONDIR=$(CURDIR) stestr run || true -endif diff --git a/python-k8sapp-oidc/debian/deb_folder/changelog b/python3-k8sapp-oidc/debian/deb_folder/changelog similarity index 100% rename from python-k8sapp-oidc/debian/deb_folder/changelog rename to python3-k8sapp-oidc/debian/deb_folder/changelog diff --git a/python-k8sapp-oidc/debian/deb_folder/control b/python3-k8sapp-oidc/debian/deb_folder/control similarity index 100% rename from python-k8sapp-oidc/debian/deb_folder/control rename to python3-k8sapp-oidc/debian/deb_folder/control diff --git a/python-k8sapp-oidc/debian/deb_folder/copyright b/python3-k8sapp-oidc/debian/deb_folder/copyright similarity index 100% rename from python-k8sapp-oidc/debian/deb_folder/copyright rename to python3-k8sapp-oidc/debian/deb_folder/copyright diff --git a/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install b/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install new file mode 100644 index 0000000..19a9e4c --- /dev/null +++ b/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc-wheels.install @@ -0,0 +1 @@ +plugins/*.whl diff --git a/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install b/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install new file mode 100644 index 0000000..91d1d9d --- /dev/null +++ b/python3-k8sapp-oidc/debian/deb_folder/python3-k8sapp-oidc.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/k8sapp_* diff --git a/python3-k8sapp-oidc/debian/deb_folder/rules b/python3-k8sapp-oidc/debian/deb_folder/rules new file mode 100755 index 0000000..c896064 --- /dev/null +++ b/python3-k8sapp-oidc/debian/deb_folder/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME = oidc-auth-apps +export PYBUILD_NAME = k8sapp_oidc + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-') +export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export PBR_VERSION = $(MAJOR).$(MINOR_PATCH) + +export ROOT = $(CURDIR)/debian/tmp +export SKIP_PIP_INSTALL = 1 + +%: + dh $@ --with=python3 --buildsystem=pybuild + +override_dh_auto_install: + env | sort + + python3 setup.py install \ + --install-layout=deb \ + --root $(ROOT) + + python3 setup.py bdist_wheel \ + --universal \ + -d $(ROOT)/plugins + +override_dh_python3: + dh_python3 --shebang=/usr/bin/python3 + +override_dh_auto_test: + PYTHONDIR=$(CURDIR) stestr run diff --git a/python-k8sapp-oidc/debian/deb_folder/source/format b/python3-k8sapp-oidc/debian/deb_folder/source/format similarity index 100% rename from python-k8sapp-oidc/debian/deb_folder/source/format rename to python3-k8sapp-oidc/debian/deb_folder/source/format diff --git a/python-k8sapp-oidc/debian/meta_data.yaml b/python3-k8sapp-oidc/debian/meta_data.yaml similarity index 100% rename from python-k8sapp-oidc/debian/meta_data.yaml rename to python3-k8sapp-oidc/debian/meta_data.yaml diff --git a/python-k8sapp-oidc/k8sapp_oidc/.gitignore b/python3-k8sapp-oidc/k8sapp_oidc/.gitignore similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/.gitignore rename to python3-k8sapp-oidc/k8sapp_oidc/.gitignore diff --git a/python-k8sapp-oidc/k8sapp_oidc/.stestr.conf b/python3-k8sapp-oidc/k8sapp_oidc/.stestr.conf similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/.stestr.conf rename to python3-k8sapp-oidc/k8sapp_oidc/.stestr.conf diff --git a/python-k8sapp-oidc/k8sapp_oidc/LICENSE b/python3-k8sapp-oidc/k8sapp_oidc/LICENSE similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/LICENSE rename to python3-k8sapp-oidc/k8sapp_oidc/LICENSE diff --git a/python-k8sapp-oidc/k8sapp_oidc/README.rst b/python3-k8sapp-oidc/k8sapp_oidc/README.rst similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/README.rst rename to python3-k8sapp-oidc/k8sapp_oidc/README.rst diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/__init__.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/__init__.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/__init__.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/__init__.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/__init__.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/__init__.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/__init__.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/__init__.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/constants.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/constants.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/constants.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/common/constants.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/__init__.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/__init__.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/__init__.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/__init__.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex_base.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex_base.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex_base.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/dex_base.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/oidc_client.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/oidc_client.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/oidc_client.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/oidc_client.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/secret_observer.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/secret_observer.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/secret_observer.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/helm/secret_observer.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/__init__.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/__init__.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/__init__.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/__init__.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_dex.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_dex.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_dex.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_dex.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_oidc_client.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_oidc_client.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_oidc_client.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_oidc_client.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_plugins.py b/python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_plugins.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_plugins.py rename to python3-k8sapp-oidc/k8sapp_oidc/k8sapp_oidc/tests/test_plugins.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/pylint.rc b/python3-k8sapp-oidc/k8sapp_oidc/pylint.rc similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/pylint.rc rename to python3-k8sapp-oidc/k8sapp_oidc/pylint.rc diff --git a/python-k8sapp-oidc/k8sapp_oidc/requirements.txt b/python3-k8sapp-oidc/k8sapp_oidc/requirements.txt similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/requirements.txt rename to python3-k8sapp-oidc/k8sapp_oidc/requirements.txt diff --git a/python-k8sapp-oidc/k8sapp_oidc/setup.cfg b/python3-k8sapp-oidc/k8sapp_oidc/setup.cfg similarity index 98% rename from python-k8sapp-oidc/k8sapp_oidc/setup.cfg rename to python3-k8sapp-oidc/k8sapp_oidc/setup.cfg index 319afbd..0f6a4bb 100644 --- a/python-k8sapp-oidc/k8sapp_oidc/setup.cfg +++ b/python3-k8sapp-oidc/k8sapp_oidc/setup.cfg @@ -35,5 +35,5 @@ systemconfig.helm_plugins.oidc_auth_apps = 002_oidc-client = k8sapp_oidc.helm.oidc_client:OidcClientHelm 003_secret-observer = k8sapp_oidc.helm.secret_observer:SecretObserverHelm -[wheel] +[bdist_wheel] universal = 1 diff --git a/python-k8sapp-oidc/k8sapp_oidc/setup.py b/python3-k8sapp-oidc/k8sapp_oidc/setup.py similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/setup.py rename to python3-k8sapp-oidc/k8sapp_oidc/setup.py diff --git a/python-k8sapp-oidc/k8sapp_oidc/test-requirements.txt b/python3-k8sapp-oidc/k8sapp_oidc/test-requirements.txt similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/test-requirements.txt rename to python3-k8sapp-oidc/k8sapp_oidc/test-requirements.txt diff --git a/python-k8sapp-oidc/k8sapp_oidc/tox.ini b/python3-k8sapp-oidc/k8sapp_oidc/tox.ini similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/tox.ini rename to python3-k8sapp-oidc/k8sapp_oidc/tox.ini diff --git a/python-k8sapp-oidc/k8sapp_oidc/upper-constraints.txt b/python3-k8sapp-oidc/k8sapp_oidc/upper-constraints.txt similarity index 100% rename from python-k8sapp-oidc/k8sapp_oidc/upper-constraints.txt rename to python3-k8sapp-oidc/k8sapp_oidc/upper-constraints.txt diff --git a/stx-oidc-auth-helm/centos/build_srpm.data b/stx-oidc-auth-helm/centos/build_srpm.data deleted file mode 100644 index dd3e888..0000000 --- a/stx-oidc-auth-helm/centos/build_srpm.data +++ /dev/null @@ -1,13 +0,0 @@ -SRC_DIR="stx-oidc-auth-helm" - -# Keep the SRCREV in sync with python-k8sapp-oidc so the app version is the same -# as the plugin version -TIS_BASE_SRCREV=860834c14ba54eb047ef02bde7a1f2407ce700ad -TIS_PATCH_VER=GITREVCOUNT - -COPY_LIST="$PKG_BASE/$SRC_DIR/files/*" - -COPY_LIST_TO_TAR="\ - $STX_BASE/downloads/dex-0.8.2.tgz - $STX_BASE/helm-charts/secret-observer/secret-observer/helm-charts \ -" diff --git a/stx-oidc-auth-helm/centos/stx-oidc-auth-helm.spec b/stx-oidc-auth-helm/centos/stx-oidc-auth-helm.spec deleted file mode 100644 index 319f51a..0000000 --- a/stx-oidc-auth-helm/centos/stx-oidc-auth-helm.spec +++ /dev/null @@ -1,111 +0,0 @@ -# Application tunables (maps to metadata) -%global app_name oidc-auth-apps -%global helm_repo stx-platform - -# Install location -%global app_folder /usr/local/share/applications/helm - -# backup location of dex overrides -%global override_backup /opt/oidc-auth-apps - -# Build variables -%global helm_folder /usr/lib/helm - -# the dex chart tar name -%global dex_tar_name dex-0.8.2.tgz - -Summary: The StarlingX K8S application for OIDC authorization -Name: stx-oidc-auth-helm -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: %{name}-%{version}.tar.gz - -# a patch for secret observer -Patch01: 0001-move-metadata-release-for-helmv3.patch - -# secret-observer source from stx/helm-charts/secret-observer -# plugin source from stx/oidc-auth-armada-app/python-k8sapp-oidc -# dex-helm source from stx/downloads/dex-0.8.2.tgz - -BuildArch: noarch - -BuildRequires: helm -BuildRequires: python-k8sapp-oidc -BuildRequires: python-k8sapp-oidc-wheels - -%description -The StarlingX K8S application for OIDC authorization - -%prep -%setup - -%patch01 -p1 - -%build - -# This chart does not require chartmuseum server since -# it has no dependency on local or stable repos. -# Make the charts. These produce a tgz file -cd helm-charts -make oidc-client -make secret-observer - -# switch back to source root -cd - - -# patch the dex chart -tar xf %{dex_tar_name} -rm %{dex_tar_name} -patch -p1 < files/0001-Create-new-config-value-extraStaticClients.patch -find dex -type f -print0 | xargs -0 tar zcf %{dex_tar_name} -rm -r dex - -# Create a chart tarball compliant with sysinv kube-app.py -%define app_staging %{_builddir}/staging -%define app_tarball %{app_name}-%{version}-%{tis_patch_ver}.tgz -%define app_path %{_builddir}/%{app_tarball} - -# Setup staging -mkdir -p %{app_staging} -cp files/metadata.yaml %{app_staging} -mkdir -p %{app_staging}/charts -cp helm-charts/*.tgz %{app_staging}/charts -cp dex*.tgz %{app_staging}/charts -cp -R fluxcd-manifests %{app_staging}/ - -# Copy the plugins: installed in the buildroot -mkdir -p %{app_staging}/plugins -cp /plugins/%{app_name}/*.whl %{app_staging}/plugins - -cd %{app_staging} - -# Populate metadata -sed -i 's/@APP_NAME@/%{app_name}/g' %{app_staging}/metadata.yaml -sed -i 's/@APP_VERSION@/%{version}-%{tis_patch_ver}/g' %{app_staging}/metadata.yaml -sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml - -# calculate checksum of all files in app_staging -find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 -# package the app -tar -zcf %app_path -C %{app_staging}/ . - -# switch back to source root -cd - - -# Cleanup staging -rm -fr %{app_staging} - -%install -install -d -m 755 %{buildroot}/%{app_folder} -install -p -D -m 755 %app_path %{buildroot}/%{app_folder} -install -d -m 750 %{buildroot}/%{override_backup} - -%files -%defattr(-,root,root,-) -%{app_folder}/%{app_tarball} -%dir %attr(750, postgres, postgres) %{override_backup} diff --git a/stx-oidc-auth-helm/debian/deb_folder/rules b/stx-oidc-auth-helm/debian/deb_folder/rules index 2921617..68d8bf6 100755 --- a/stx-oidc-auth-helm/debian/deb_folder/rules +++ b/stx-oidc-auth-helm/debian/deb_folder/rules @@ -45,7 +45,7 @@ override_dh_auto_build: sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING)/metadata.yaml # Copy the plugins: installed in the buildroot mkdir -p $(STAGING)/plugins - cp /plugins/$(APP_NAME)/*.whl $(STAGING)/plugins + cp /plugins/*.whl $(STAGING)/plugins # Create the app package. cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 tar cfz $(APP_TARBALL) -C $(STAGING)/ .