Merge "Add debian package for python-horizon"

This commit is contained in:
Zuul 2021-11-17 14:22:00 +00:00 committed by Gerrit Code Review
commit 05f51308a8
4 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,58 @@
From 4807825b3505825fe1d5b5a65113b8b2ec29f244 Mon Sep 17 00:00:00 2001
From: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com>
Date: Fri, 22 Oct 2021 14:11:23 -0300
Subject: [PATCH] install extra files
---
debian/openstack-dashboard.install | 8 ++++++++
debian/python3-django-horizon.install | 1 +
debian/rules | 10 ++++++++++
3 files changed, 19 insertions(+)
diff --git a/debian/openstack-dashboard.install b/debian/openstack-dashboard.install
index 2be73b980..12f33b9eb 100644
--- a/debian/openstack-dashboard.install
+++ b/debian/openstack-dashboard.install
@@ -1,3 +1,11 @@
debian/local_settings.d/* usr/share/openstack-dashboard-debian-settings.d
etc/openstack-dashboard
+etc/httpd/conf.d/openstack-dashboard.conf
+etc/logrotate.d/openstack-dashboard
+etc/rc.d/init.d/horizon
usr/share/openstack-dashboard
+usr/share/openstack-dashboard/guni_config.py
+usr/bin/horizon-clearsessions
+usr/bin/horizon-patching-restart
+usr/bin/horizon-assets-compress
+usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf
diff --git a/debian/python3-django-horizon.install b/debian/python3-django-horizon.install
index 47e0ed436..a113003f0 100644
--- a/debian/python3-django-horizon.install
+++ b/debian/python3-django-horizon.install
@@ -1 +1,2 @@
/usr/lib/python*
+usr/share/doc/python3-django-horizon/openstack-dashboard-httpd-logging.conf
diff --git a/debian/rules b/debian/rules
index 53181a6a6..40e32724c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -95,6 +95,16 @@ override_dh_auto_install:
## Delete not needed files
rm -f $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/openstack_dashboard/local/_build*.lock
+ install -D -p -m 644 $(CURDIR)/files/openstack-dashboard-httpd-2.4.conf $(CURDIR)/debian/tmp/etc/httpd/conf.d/openstack-dashboard.conf
+ install -D -p -m 644 $(CURDIR)/files/python-django-horizon-systemd.conf $(CURDIR)/debian/tmp/usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf
+ install -D -p $(CURDIR)/files/openstack-dashboard-httpd-logging.conf $(CURDIR)/debian/tmp/usr/share/doc/python3-django-horizon/openstack-dashboard-httpd-logging.conf
+ install -D -p $(CURDIR)/files/python-django-horizon-logrotate.conf $(CURDIR)/debian/tmp/etc/logrotate.d/openstack-dashboard
+ install -D -p -m 755 $(CURDIR)/files/horizon.init $(CURDIR)/debian/tmp/etc/rc.d/init.d/horizon
+ install -D -p -m 755 $(CURDIR)/files/horizon-clearsessions $(CURDIR)/debian/tmp/usr/bin/horizon-clearsessions
+ install -D -p -m 755 $(CURDIR)/files/horizon-patching-restart $(CURDIR)/debian/tmp/usr/bin/horizon-patching-restart
+ install -D -p $(CURDIR)/files/guni_config.py $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/guni_config.py
+ install -D -p -m 755 $(CURDIR)/files/horizon-assets-compress $(CURDIR)/debian/tmp/usr/bin/horizon-assets-compress
+
dh_install
dh_missing --fail-missing
find $(CURDIR)/debian -iname .eslintrc -delete
--
2.17.1

View File

@ -0,0 +1 @@
0001-install-extra-files.patch

View File

@ -0,0 +1,38 @@
#!/bin/bash
set -x
PKG_BUILD_NAME=$1
PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME})
STX_BASE=$(realpath ${MY_REPO}/stx)
PKG_BASE=$(realpath ${STX_BASE}/upstream/openstack/python-horizon)
PKG_EXTRA_FILES_DIR=$(realpath ${PKG_BASE}/centos/files)
mkdir ${PKG_BUILD_NAME}
# UPSTREAM HORIZON
HORIZON_UPSTREAM_URL='https://salsa.debian.org/openstack-team/services/horizon/-/archive/debian/18.6.2-5/horizon-debian-18.6.2-5.tar.gz'
HORIZON_TAR_BALL='horizon-18.6.2-5.tar.gz'
HORIZON_MD5_SUM='9c41bd3d52c5d5466e622ef8014da0fa'
curl --location --output ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} $HORIZON_UPSTREAM_URL
MD5_SUM=$(md5sum ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} | cut -d" " -f1)
if [ $MD5_SUM != $HORIZON_MD5_SUM ] ; then
exit 1;
fi
tar xvvf ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} --directory ${PKG_BUILD_DIR} --strip-components 1
rm ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL}
# FILES
mkdir -p ${PKG_BUILD_DIR}/files
cp ${PKG_EXTRA_FILES_DIR}/guni_config.py ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-assets-compress ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-clearsessions ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon.init ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon.logrotate ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-patching-restart ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/openstack-dashboard-httpd-2.4.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/openstack-dashboard-httpd-logging.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/python-django-horizon-logrotate.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/python-django-horizon-systemd.conf ${PKG_BUILD_DIR}/files/

View File

@ -0,0 +1,7 @@
---
debname: horizon
debver: 18.6.2-5
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true