diff --git a/debian_pkg_dirs b/debian_pkg_dirs new file mode 100644 index 0000000..98a6123 --- /dev/null +++ b/debian_pkg_dirs @@ -0,0 +1,3 @@ +python-k8sapp-auditd +stx-audit-helm + diff --git a/python-k8sapp-auditd/debian/deb_folder/changelog b/python-k8sapp-auditd/debian/deb_folder/changelog new file mode 100644 index 0000000..3a88d3a --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +python3-k8sapp-auditd (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Fri, 5 Nov 2021 11:05:42 +0000 diff --git a/python-k8sapp-auditd/debian/deb_folder/control b/python-k8sapp-auditd/debian/deb_folder/control new file mode 100644 index 0000000..fb27976 --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/control @@ -0,0 +1,26 @@ +Source: python3-k8sapp-auditd +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + python3-all, + python3-pbr, + python3-setuptools, + python3-wheel +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: python3-k8sapp-auditd +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends} +Description: StarlingX Sysinv Audit Extensions + This package contains sysinv plugins for the audit K8S app. + +Package: python3-k8sapp-auditd-wheels +Section: libs +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends}, python3-wheel +Description: StarlingX Sysinv Audit Extension Wheels + This package contains python wheels for the audit K8S app plugins. diff --git a/python-k8sapp-auditd/debian/deb_folder/copyright b/python-k8sapp-auditd/debian/deb_folder/copyright new file mode 100644 index 0000000..d68490a --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python3-k8sapp-auditd +Source: https://opendev.org/starlingx/audit-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd-wheels.install b/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd-wheels.install new file mode 100644 index 0000000..c9c6f74 --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd-wheels.install @@ -0,0 +1 @@ +plugins/auditd/*.whl diff --git a/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd.install b/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd.install new file mode 100644 index 0000000..7ac83d3 --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/python3-k8sapp-auditd.install @@ -0,0 +1,2 @@ +usr/lib/python3/dist-packages/k8sapp_auditd-1.0.0.egg-info/* +usr/lib/python3/dist-packages/k8sapp_auditd/* diff --git a/python-k8sapp-auditd/debian/deb_folder/rules b/python-k8sapp-auditd/debian/deb_folder/rules new file mode 100755 index 0000000..ba6bf36 --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME=auditd +export PBR_VERSION=1.0.0 +export PYBUILD_NAME=k8sapp-auditd +export ROOT=$(CURDIR)/debian/tmp +export SKIP_PIP_INSTALL=1 + +%: + dh $@ --with=python3 --buildsystem=pybuild + +override_dh_auto_build: + python3 setup.py build + +override_dh_auto_install: + python3 setup.py install --install-layout=deb --skip-build --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-auditd/debian/deb_folder/source/format b/python-k8sapp-auditd/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/python-k8sapp-auditd/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/python-k8sapp-auditd/debian/meta_data.yaml b/python-k8sapp-auditd/debian/meta_data.yaml new file mode 100644 index 0000000..af3aab8 --- /dev/null +++ b/python-k8sapp-auditd/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: python3-k8sapp-auditd +debver: 1.0-1 +src_path: k8sapp_auditd +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/stx-audit-helm/debian/deb_folder/changelog b/stx-audit-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..bbc5f0a --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +stx-audit-helm (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Tracey Bogue Fri, 5 Nov 2021 11:13:42 +0000 diff --git a/stx-audit-helm/debian/deb_folder/control b/stx-audit-helm/debian/deb_folder/control new file mode 100644 index 0000000..6c308b8 --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/control @@ -0,0 +1,17 @@ +Source: stx-audit-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + helm, + python3-k8sapp-auditd, + python3-k8sapp-auditd-wheels +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: stx-audit-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Audit Armada Helm Charts + This package contains Armada Helm charts for the audit application. diff --git a/stx-audit-helm/debian/deb_folder/copyright b/stx-audit-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..da64b02 --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stx-audit-helm +Source: https://opendev.org/starlingx/audit-armada-app/ + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/stx-audit-helm/debian/deb_folder/rules b/stx-audit-helm/debian/deb_folder/rules new file mode 100755 index 0000000..072daf2 --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm +export LOGROTATE_FOLDER = $(ROOT)/etc/logrotate.d + +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 2 -d '.') + +export APP_NAME = auditd +export APP_VERSION = $(MAJOR).$(MINOR_PATCH) +export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz +export HELM_REPO = stx-platform +export STAGING = staging + +%: + dh $@ + +override_dh_auto_build: + # Create the TGZ file. + cd helm-charts && make + # Setup the staging directory. + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp manifests/*.yaml $(STAGING) + mkdir -p $(STAGING)/charts + cp helm-charts/*.tgz $(STAGING)/charts + # Populate metadata. + sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING)/metadata.yaml + sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING)/metadata.yaml + 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 + # Create the app package. + cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar cfz $(APP_TARBALL) -C $(STAGING)/ . + # Cleanup staging. + rm -rf $(STAGING) + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) + install -d -m 755 $(LOGROTATE_FOLDER) + install -m 644 -p -D files/auditd.logrotate $(LOGROTATE_FOLDER) + +override_dh_usrlocal: diff --git a/stx-audit-helm/debian/deb_folder/source/format b/stx-audit-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/stx-audit-helm/debian/deb_folder/stx-audit-helm.install b/stx-audit-helm/debian/deb_folder/stx-audit-helm.install new file mode 100644 index 0000000..f7d30bd --- /dev/null +++ b/stx-audit-helm/debian/deb_folder/stx-audit-helm.install @@ -0,0 +1,2 @@ +etc/logrotate.d/auditd.logrotate +usr/local/share/applications/helm/* diff --git a/stx-audit-helm/debian/meta_data.yaml b/stx-audit-helm/debian/meta_data.yaml new file mode 100644 index 0000000..fba5265 --- /dev/null +++ b/stx-audit-helm/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: stx-audit-helm +debver: 1.0-1 +src_path: stx-audit-helm +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true