From 3afa03a59cc478ff953bfa5ec941e2838c67ec7a Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Wed, 8 Dec 2021 11:04:33 +0800 Subject: [PATCH] python-horizon: update meta_data.yaml to remove dl_hook "dl_path" replaces the ${HORIZON_TAR_BALL} in dl_hook "src_files" replaces the ${PKG_BUILD_DIR}/files in dl_hook derepack copies the "src_files" into build directory, not the sub-directory "files", so update the installing procedure of 0001-install-extra-files.patch. Test Plan: Pass: successfully build test Story: 2009101 Task: 43740 Signed-off-by: Yue Tao Change-Id: I1c73cdd9de2c80973ac6bc8be1eb9a7dd78a5ffa --- .../0001-install-extra-files.patch | 29 +++++++------- openstack/python-horizon/debian/dl_hook | 38 ------------------- .../python-horizon/debian/meta_data.yaml | 16 +++++++- 3 files changed, 30 insertions(+), 53 deletions(-) delete mode 100755 openstack/python-horizon/debian/dl_hook diff --git a/openstack/python-horizon/debian/deb_patches/0001-install-extra-files.patch b/openstack/python-horizon/debian/deb_patches/0001-install-extra-files.patch index 14d409d9..a318fa07 100644 --- a/openstack/python-horizon/debian/deb_patches/0001-install-extra-files.patch +++ b/openstack/python-horizon/debian/deb_patches/0001-install-extra-files.patch @@ -1,8 +1,9 @@ -From 4807825b3505825fe1d5b5a65113b8b2ec29f244 Mon Sep 17 00:00:00 2001 +From 2410e5ae2150100c7a4c01886498935c57076822 Mon Sep 17 00:00:00 2001 From: Fabricio Henrique Ramos Date: Fri, 22 Oct 2021 14:11:23 -0300 Subject: [PATCH] install extra files +Signed-off-by: Yue Tao --- debian/openstack-dashboard.install | 8 ++++++++ debian/python3-django-horizon.install | 1 + @@ -10,7 +11,7 @@ Subject: [PATCH] install extra files 3 files changed, 19 insertions(+) diff --git a/debian/openstack-dashboard.install b/debian/openstack-dashboard.install -index 2be73b980..12f33b9eb 100644 +index 2be73b9..12f33b9 100644 --- a/debian/openstack-dashboard.install +++ b/debian/openstack-dashboard.install @@ -1,3 +1,11 @@ @@ -26,33 +27,33 @@ index 2be73b980..12f33b9eb 100644 +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 +index 47e0ed4..a113003 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 +index 53181a6..4ab08e7 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 ++ install -D -p -m 644 $(CURDIR)/openstack-dashboard-httpd-2.4.conf $(CURDIR)/debian/tmp/etc/httpd/conf.d/openstack-dashboard.conf ++ install -D -p -m 644 $(CURDIR)/python-django-horizon-systemd.conf $(CURDIR)/debian/tmp/usr/lib/systemd/system/httpd.service.d/openstack-dashboard.conf ++ install -D -p $(CURDIR)/openstack-dashboard-httpd-logging.conf $(CURDIR)/debian/tmp/usr/share/doc/python3-django-horizon/openstack-dashboard-httpd-logging.conf ++ install -D -p $(CURDIR)/python-django-horizon-logrotate.conf $(CURDIR)/debian/tmp/etc/logrotate.d/openstack-dashboard ++ install -D -p -m 755 $(CURDIR)/horizon.init $(CURDIR)/debian/tmp/etc/rc.d/init.d/horizon ++ install -D -p -m 755 $(CURDIR)/horizon-clearsessions $(CURDIR)/debian/tmp/usr/bin/horizon-clearsessions ++ install -D -p -m 755 $(CURDIR)/horizon-patching-restart $(CURDIR)/debian/tmp/usr/bin/horizon-patching-restart ++ install -D -p $(CURDIR)/guni_config.py $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/guni_config.py ++ install -D -p -m 755 $(CURDIR)/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 +2.25.1 diff --git a/openstack/python-horizon/debian/dl_hook b/openstack/python-horizon/debian/dl_hook deleted file mode 100755 index 018fdcfc..00000000 --- a/openstack/python-horizon/debian/dl_hook +++ /dev/null @@ -1,38 +0,0 @@ -#!/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/ diff --git a/openstack/python-horizon/debian/meta_data.yaml b/openstack/python-horizon/debian/meta_data.yaml index 56729213..ec649e3a 100644 --- a/openstack/python-horizon/debian/meta_data.yaml +++ b/openstack/python-horizon/debian/meta_data.yaml @@ -1,7 +1,21 @@ --- debname: horizon debver: 18.6.2-5 -dl_hook: dl_hook +dl_path: + name: horizon-debian-18.6.2-5.tar.gz + url: https://salsa.debian.org/openstack-team/services/horizon/-/archive/debian/18.6.2-5/horizon-debian-18.6.2-5.tar.gz + md5sum: 9c41bd3d52c5d5466e622ef8014da0fa +src_files: + - centos/files/guni_config.py + - centos/files/horizon-assets-compress + - centos/files/horizon-clearsessions + - centos/files/horizon.init + - centos/files/horizon.logrotate + - centos/files/horizon-patching-restart + - centos/files/openstack-dashboard-httpd-2.4.conf + - centos/files/openstack-dashboard-httpd-logging.conf + - centos/files/python-django-horizon-logrotate.conf + - centos/files/python-django-horizon-systemd.conf revision: dist: $STX_DIST PKG_GITREVCOUNT: true