Add Horizon 19.2.0 for OpenStack Wallaby support
This commit is contained in:
parent
7f31553a6e
commit
b155e6deb4
@ -1,36 +0,0 @@
|
|||||||
From 63a568a42073647218dab3766fa88a73ecb8899e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sumit Jamgade <sjamgade@suse.com>
|
|
||||||
Date: Wed, 6 Feb 2019 14:55:10 +0100
|
|
||||||
Subject: [PATCH] Do not set COMPRESS_ENABLED explicitly
|
|
||||||
|
|
||||||
it is always opposite of DEBUG[1].
|
|
||||||
this also helps keep compressor OFF during test as test do not need
|
|
||||||
static files
|
|
||||||
|
|
||||||
Any plugins needing compression can explicitly enable in its own
|
|
||||||
local_settings
|
|
||||||
|
|
||||||
1-
|
|
||||||
https://django-compressor.readthedocs.io/en/stable/settings/#django.conf.settings.COMPRESS_ENABLED
|
|
||||||
|
|
||||||
Change-Id: I9f3979da38cca677256799be8eb215a4ea32cf12
|
|
||||||
---
|
|
||||||
horizon/test/settings.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/horizon/test/settings.py b/horizon/test/settings.py
|
|
||||||
index 5834cdd87..d93ba37ee 100644
|
|
||||||
--- a/horizon/test/settings.py
|
|
||||||
+++ b/horizon/test/settings.py
|
|
||||||
@@ -126,7 +126,7 @@ STATICFILES_DIRS = settings_utils.get_xstatic_dirs(
|
|
||||||
settings_utils.BASE_XSTATIC_MODULES, HORIZON_CONFIG
|
|
||||||
)
|
|
||||||
|
|
||||||
-COMPRESS_ENABLED = True
|
|
||||||
+COMPRESS_ENABLED = False
|
|
||||||
COMPRESS_OFFLINE = False
|
|
||||||
COMPRESS_ROOT = "/tmp/"
|
|
||||||
COMPRESS_PARSER = 'compressor.parser.HtmlParser'
|
|
||||||
--
|
|
||||||
2.16.4
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
horizon-19.2.0.tar.gz
Normal file
BIN
horizon-19.2.0.tar.gz
Normal file
Binary file not shown.
19
openstack-dashboard-httpd-2.4.conf
Normal file
19
openstack-dashboard-httpd-2.4.conf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
WSGIDaemonProcess dashboard
|
||||||
|
WSGIProcessGroup dashboard
|
||||||
|
WSGISocketPrefix run/wsgi
|
||||||
|
|
||||||
|
WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
|
||||||
|
Alias /dashboard/static /usr/share/openstack-dashboard/static
|
||||||
|
|
||||||
|
<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
|
||||||
|
Options All
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /usr/share/openstack-dashboard/static>
|
||||||
|
Options All
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
8
openstack-dashboard-logrotate.conf
Normal file
8
openstack-dashboard-logrotate.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/var/log/horizon/*.log {
|
||||||
|
weekly
|
||||||
|
rotate 4
|
||||||
|
missingok
|
||||||
|
compress
|
||||||
|
minsize 100k
|
||||||
|
}
|
||||||
|
|
||||||
7
openstack-dashboard-systemd.conf
Normal file
7
openstack-dashboard-systemd.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Service]
|
||||||
|
ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear -v0
|
||||||
|
ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py compress --force -v0
|
||||||
|
TimeoutStartSec=5min
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
After=memcached.service
|
||||||
@ -1,40 +0,0 @@
|
|||||||
<VirtualHost *:80>
|
|
||||||
WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
|
|
||||||
WSGIDaemonProcess horizon user=apache group=apache processes=3 threads=10 home=/usr/share/openstack-dashboard/ display-name=%{GROUP}
|
|
||||||
WSGIApplicationGroup %{GLOBAL}
|
|
||||||
|
|
||||||
SetEnv APACHE_RUN_USER horizon
|
|
||||||
SetEnv APACHE_RUN_GROUP horizon
|
|
||||||
WSGIProcessGroup horizon
|
|
||||||
|
|
||||||
Alias /dashboard/static /usr/share/openstack-dashboard/static
|
|
||||||
|
|
||||||
RedirectMatch "^/$" "/dashboard/"
|
|
||||||
|
|
||||||
<Directory />
|
|
||||||
Options FollowSymLinks
|
|
||||||
AllowOverride None
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory /usr/share/openstack-dashboard/>
|
|
||||||
Options Indexes FollowSymLinks MultiViews
|
|
||||||
AllowOverride None
|
|
||||||
# Apache 2.4 uses mod_authz_host for access control now (instead of
|
|
||||||
# "Allow")
|
|
||||||
<IfVersion < 2.4>
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</IfVersion>
|
|
||||||
<IfVersion >= 2.4>
|
|
||||||
Require all granted
|
|
||||||
</IfVersion>
|
|
||||||
</Directory>
|
|
||||||
<IfVersion >= 2.4>
|
|
||||||
ErrorLogFormat "%{cu}t %M"
|
|
||||||
</IfVersion>
|
|
||||||
ErrorLog /var/log/httpd/horizon_error.log
|
|
||||||
LogLevel warn
|
|
||||||
CustomLog /var/log/httpd/horizon_access.log combined
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
WSGISocketPrefix /var/run/httpd
|
|
||||||
358
openstack-dashboard.spec
Normal file
358
openstack-dashboard.spec
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||||
|
Name: openstack-dashboard
|
||||||
|
Version: 19.2.0
|
||||||
|
Release: 1
|
||||||
|
Summary: OpenStack Dashboard (Horizon)
|
||||||
|
License: Apache-2.0 and BSD
|
||||||
|
URL: http://horizon.openstack.org/
|
||||||
|
Source0: https://tarballs.openstack.org/horizon/horizon-%{upstream_version}.tar.gz
|
||||||
|
Source1: openstack-dashboard-httpd-2.4.conf
|
||||||
|
Source2: openstack-dashboard-systemd.conf
|
||||||
|
Source3: openstack-dashboard-logrotate.conf
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-pbr >= 2.0.0
|
||||||
|
BuildRequires: git-core
|
||||||
|
BuildRequires: gettext
|
||||||
|
# for checks:
|
||||||
|
BuildRequires: python3-nose
|
||||||
|
BuildRequires: python3-osprofiler
|
||||||
|
BuildRequires: python3-iso8601
|
||||||
|
BuildRequires: python3-pycodestyle
|
||||||
|
BuildRequires: python3-mock
|
||||||
|
BuildRequires: python3-netaddr
|
||||||
|
BuildRequires: python3-anyjson
|
||||||
|
|
||||||
|
Requires: python3-horizon
|
||||||
|
Requires: python3-openstack_auth
|
||||||
|
Provides: openstack-horizon
|
||||||
|
%description
|
||||||
|
The OpenStack dashboard provides administrators and users a graphical
|
||||||
|
interface to access, provision and automate cloud-based resources. The
|
||||||
|
extensible design makes it easy to plug in and expose third party
|
||||||
|
products and services, such as billing, monitoring and additional
|
||||||
|
management tools.
|
||||||
|
|
||||||
|
%package -n python3-openstack_auth
|
||||||
|
Summary: OpenStack Auth (Horizon) - Python Module
|
||||||
|
Provides: python-openstack_auth
|
||||||
|
%description -n python3-openstack_auth
|
||||||
|
The Python module OpenStack Auth provides Authentication mechanism
|
||||||
|
for the OpenStack Dashboard (Horizon).
|
||||||
|
|
||||||
|
%package -n python3-horizon
|
||||||
|
Summary: Openstack web user interface reference implementation
|
||||||
|
|
||||||
|
BuildRequires: python3-django-debreach
|
||||||
|
BuildRequires: python3-django-compressor >= 2.0
|
||||||
|
BuildRequires: python3-django-pyscss >= 2.0.2
|
||||||
|
BuildRequires: python3-XStatic
|
||||||
|
BuildRequires: python3-XStatic-Angular >= 1.5.8.0
|
||||||
|
BuildRequires: python3-XStatic-Angular-Bootstrap
|
||||||
|
BuildRequires: python3-XStatic-Angular-Schema-Form
|
||||||
|
BuildRequires: python3-XStatic-D3
|
||||||
|
BuildRequires: python3-XStatic-Font-Awesome
|
||||||
|
BuildRequires: python3-XStatic-JSEncrypt
|
||||||
|
BuildRequires: python3-XStatic-Jasmine
|
||||||
|
BuildRequires: python3-XStatic-Bootstrap-SCSS
|
||||||
|
BuildRequires: python3-XStatic-termjs
|
||||||
|
BuildRequires: python3-XStatic-smart-table
|
||||||
|
BuildRequires: python3-XStatic-Angular-FileUpload
|
||||||
|
BuildRequires: python3-XStatic-Angular-Gettext
|
||||||
|
BuildRequires: python3-XStatic-bootswatch
|
||||||
|
BuildRequires: python3-XStatic-roboto-fontface
|
||||||
|
BuildRequires: python3-XStatic-mdi
|
||||||
|
BuildRequires: python3-XStatic-objectpath
|
||||||
|
BuildRequires: python3-XStatic-tv4
|
||||||
|
# bootstrap-scss requires at least python-scss >= 1.2.1
|
||||||
|
BuildRequires: python3-scss >= 1.3.5
|
||||||
|
BuildRequires: fontawesome-fonts-web >= 4.1.0
|
||||||
|
BuildRequires: python3-oslo-concurrency
|
||||||
|
BuildRequires: python3-oslo-config
|
||||||
|
BuildRequires: python3-oslo-i18n
|
||||||
|
BuildRequires: python3-oslo-serialization
|
||||||
|
BuildRequires: python3-oslo-utils
|
||||||
|
BuildRequires: python3-oslo-policy
|
||||||
|
BuildRequires: python3-babel
|
||||||
|
BuildRequires: python3-pytz
|
||||||
|
BuildRequires: systemd
|
||||||
|
BuildRequires: python3-django-appconf
|
||||||
|
BuildRequires: python3-semantic_version
|
||||||
|
BuildRequires: python3-XStatic-jQuery
|
||||||
|
BuildRequires: python3-XStatic-Hogan
|
||||||
|
BuildRequires: python3-XStatic-JQuery-Migrate
|
||||||
|
BuildRequires: python3-XStatic-JQuery-TableSorter
|
||||||
|
BuildRequires: python3-XStatic-JQuery-quicksearch
|
||||||
|
BuildRequires: python3-XStatic-Rickshaw
|
||||||
|
BuildRequires: python3-XStatic-Spin
|
||||||
|
BuildRequires: python3-XStatic-jquery-ui
|
||||||
|
BuildRequires: python3-XStatic-Bootstrap-Datepicker
|
||||||
|
BuildRequires: python3-XStatic-Angular-lrdragndrop
|
||||||
|
BuildRequires: python3-pint
|
||||||
|
BuildRequires: python3-memcached
|
||||||
|
BuildRequires: python3-glanceclient
|
||||||
|
BuildRequires: python3-keystoneclient
|
||||||
|
BuildRequires: python3-novaclient >= 9.1.0
|
||||||
|
BuildRequires: python3-neutronclient
|
||||||
|
BuildRequires: python3-cinderclient
|
||||||
|
BuildRequires: python3-swiftclient
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
|
||||||
|
Requires: python3-iso8601
|
||||||
|
Requires: python3-glanceclient >= 2.8.0
|
||||||
|
Requires: python3-keystoneclient >= 3.22.0
|
||||||
|
Requires: python3-keystoneauth1 >= 3.4.0
|
||||||
|
Requires: python3-novaclient >= 9.1.0
|
||||||
|
Requires: python3-neutronclient >= 6.7.0
|
||||||
|
Requires: python3-cinderclient >= 5.0.0
|
||||||
|
Requires: python3-swiftclient >= 3.2.0
|
||||||
|
Requires: python3-netaddr
|
||||||
|
Requires: python3-osprofiler >= 2.3.0
|
||||||
|
Requires: python3-django-pyscss >= 2.0.2
|
||||||
|
Requires: python3-XStatic
|
||||||
|
Requires: python3-XStatic-Angular >= 1.5.8.0
|
||||||
|
Requires: python3-XStatic-Angular-Bootstrap
|
||||||
|
Requires: python3-XStatic-Angular-Schema-Form
|
||||||
|
Requires: python3-XStatic-D3
|
||||||
|
Requires: python3-XStatic-Font-Awesome
|
||||||
|
Requires: python3-XStatic-JSEncrypt
|
||||||
|
Requires: python3-XStatic-Jasmine
|
||||||
|
Requires: python3-XStatic-Bootstrap-SCSS >= 3.3.7.1
|
||||||
|
Requires: python3-XStatic-termjs
|
||||||
|
Requires: python3-XStatic-smart-table
|
||||||
|
Requires: python3-XStatic-Angular-Gettext
|
||||||
|
Requires: python3-XStatic-Angular-FileUpload
|
||||||
|
Requires: python3-XStatic-bootswatch
|
||||||
|
Requires: python3-XStatic-roboto-fontface >= 0.5.0.0
|
||||||
|
Requires: python3-XStatic-mdi
|
||||||
|
Requires: python3-XStatic-objectpath
|
||||||
|
Requires: python3-XStatic-tv4
|
||||||
|
Requires: python3-django-debreach
|
||||||
|
Requires: python3-scss >= 1.3.7
|
||||||
|
Requires: fontawesome-fonts-web >= 4.1.0
|
||||||
|
Requires: python3-oslo-concurrency >= 3.26.0
|
||||||
|
Requires: python3-oslo-config >= 2:5.2.0
|
||||||
|
Requires: python3-oslo-i18n >= 3.15.3
|
||||||
|
Requires: python3-oslo-serialization >= 2.18.0
|
||||||
|
Requires: python3-oslo-utils >= 3.40.0
|
||||||
|
Requires: python3-oslo-upgradecheck >= 0.1.1
|
||||||
|
Requires: python3-requests >= 2.14.2
|
||||||
|
Requires: python3-oslo-policy >= 3.2.0
|
||||||
|
Requires: python3-babel
|
||||||
|
Requires: python3-futurist
|
||||||
|
Requires: openssl
|
||||||
|
Requires: logrotate
|
||||||
|
Requires: python3-mod_wsgi
|
||||||
|
Requires: python3-django-appconf
|
||||||
|
Requires: python3-pymongo >= 3.0.2
|
||||||
|
Requires: python3-semantic_version >= 2.3.1
|
||||||
|
Requires: python3-XStatic-jQuery
|
||||||
|
Requires: python3-XStatic-Hogan
|
||||||
|
Requires: python3-XStatic-JQuery-Migrate
|
||||||
|
Requires: python3-XStatic-JQuery-TableSorter
|
||||||
|
Requires: python3-XStatic-JQuery-quicksearch
|
||||||
|
Requires: python3-XStatic-Rickshaw
|
||||||
|
Requires: python3-XStatic-Spin
|
||||||
|
Requires: python3-XStatic-jquery-ui
|
||||||
|
Requires: python3-XStatic-Bootstrap-Datepicker
|
||||||
|
Requires: python3-XStatic-Angular-lrdragndrop
|
||||||
|
Requires: python3-yaml >= 3.12
|
||||||
|
Requires: python3-memcached
|
||||||
|
Requires: python3-debtcollector >= 1.2.0
|
||||||
|
|
||||||
|
Provides: python-horizon
|
||||||
|
%description -n python3-horizon
|
||||||
|
Openstack Dashboard is a web user interface for Openstack. The package
|
||||||
|
provides a reference implementation using the Django Horizon project,
|
||||||
|
mostly consisting of JavaScript and CSS to tie it altogether as a standalone
|
||||||
|
site.
|
||||||
|
This package contains the python library.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n horizon-%{upstream_version} -S git
|
||||||
|
|
||||||
|
# customize default settings
|
||||||
|
# WAS [PATCH] disable debug, move web root
|
||||||
|
sed -i "/^DEBUG =.*/c\DEBUG = False" openstack_dashboard/local/local_settings.py.example
|
||||||
|
sed -i "/^WEBROOT =.*/c\WEBROOT = '/dashboard/'" openstack_dashboard/local/local_settings.py.example
|
||||||
|
sed -i "/^.*ALLOWED_HOSTS =.*/c\ALLOWED_HOSTS = ['horizon.example.com', 'localhost']" openstack_dashboard/local/local_settings.py.example
|
||||||
|
sed -i "/^.*LOCAL_PATH =.*/c\LOCAL_PATH = '/tmp'" openstack_dashboard/local/local_settings.py.example
|
||||||
|
sed -i "/^.*POLICY_FILES_PATH =.*/c\POLICY_FILES_PATH = '/etc/openstack-dashboard'" openstack_dashboard/local/local_settings.py.example
|
||||||
|
|
||||||
|
sed -i "/^BIN_DIR = .*/c\BIN_DIR = '/usr/bin'" openstack_dashboard/settings.py
|
||||||
|
sed -i "/^COMPRESS_PARSER = .*/a COMPRESS_OFFLINE = True" openstack_dashboard/settings.py
|
||||||
|
|
||||||
|
# set COMPRESS_OFFLINE=True
|
||||||
|
sed -i 's:COMPRESS_OFFLINE.=.False:COMPRESS_OFFLINE = True:' openstack_dashboard/settings.py
|
||||||
|
|
||||||
|
# Fix manage.py shebang
|
||||||
|
sed -i 's/\/usr\/bin\/env python/\/usr\/bin\/env python3/' manage.py
|
||||||
|
|
||||||
|
%build
|
||||||
|
# compile message strings
|
||||||
|
cd horizon && django-admin compilemessages && cd ..
|
||||||
|
cd openstack_dashboard && django-admin compilemessages && cd ..
|
||||||
|
# Dist tarball is missing .mo files so they're not listed in distributed egg metadata.
|
||||||
|
# Removing egg-info and letting PBR regenerate it was working around that issue
|
||||||
|
# but PBR cannot regenerate complete SOURCES.txt so some other files wont't get installed.
|
||||||
|
# Further reading why not remove upstream egg metadata:
|
||||||
|
# https://github.com/emonty/python-oslo-messaging/commit/f632684eb2d582253601e8da7ffdb8e55396e924
|
||||||
|
# https://fedorahosted.org/fpc/ticket/488
|
||||||
|
echo >> horizon.egg-info/SOURCES.txt
|
||||||
|
ls */locale/*/LC_MESSAGES/django*mo >> horizon.egg-info/SOURCES.txt
|
||||||
|
%{py3_build}
|
||||||
|
|
||||||
|
# compress css, js etc.
|
||||||
|
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
|
||||||
|
# get it ready for compressing later in puppet-horizon
|
||||||
|
%{__python3} manage.py collectstatic --noinput --clear
|
||||||
|
%{__python3} manage.py compress --force
|
||||||
|
|
||||||
|
# undo hack
|
||||||
|
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{py3_install}
|
||||||
|
# drop httpd-conf snippet
|
||||||
|
install -m 0644 -D -p %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/openstack-dashboard.conf
|
||||||
|
install -d -m 755 %{buildroot}%{_datadir}/openstack-dashboard
|
||||||
|
install -d -m 755 %{buildroot}%{_sharedstatedir}/openstack-dashboard
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/openstack-dashboard
|
||||||
|
|
||||||
|
# create directory for systemd snippet
|
||||||
|
mkdir -p %{buildroot}%{_unitdir}/httpd.service.d/
|
||||||
|
cp %{SOURCE2} %{buildroot}%{_unitdir}/httpd.service.d/openstack-dashboard.conf
|
||||||
|
|
||||||
|
|
||||||
|
# Copy everything to /usr/share
|
||||||
|
mv %{buildroot}%{python3_sitelib}/openstack_dashboard \
|
||||||
|
%{buildroot}%{_datadir}/openstack-dashboard
|
||||||
|
cp manage.py %{buildroot}%{_datadir}/openstack-dashboard
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/openstack_dashboard
|
||||||
|
|
||||||
|
# remove unnecessary .po files
|
||||||
|
find %{buildroot} -name django.po -exec rm '{}' \;
|
||||||
|
find %{buildroot} -name djangojs.po -exec rm '{}' \;
|
||||||
|
|
||||||
|
# Move config to /etc, symlink it back to /usr/share
|
||||||
|
mv %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.py.example %{buildroot}%{_sysconfdir}/openstack-dashboard/local_settings
|
||||||
|
ln -s ../../../../..%{_sysconfdir}/openstack-dashboard/local_settings %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.py
|
||||||
|
|
||||||
|
mv %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/conf/default_policies %{buildroot}%{_sysconfdir}/openstack-dashboard
|
||||||
|
mv %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/conf/*.yaml %{buildroot}%{_sysconfdir}/openstack-dashboard
|
||||||
|
mv %{buildroot}%{_datadir}/openstack-dashboard/openstack_dashboard/conf/nova_policy.d %{buildroot}%{_sysconfdir}/openstack-dashboard
|
||||||
|
|
||||||
|
%find_lang django --all-name
|
||||||
|
|
||||||
|
grep "\/usr\/share\/openstack-dashboard" django.lang > dashboard.lang
|
||||||
|
grep "\/site-packages\/horizon" django.lang > horizon.lang
|
||||||
|
|
||||||
|
# copy static files to %{_datadir}/openstack-dashboard/static
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/openstack-dashboard/static
|
||||||
|
cp -a openstack_dashboard/static/* %{buildroot}%{_datadir}/openstack-dashboard/static
|
||||||
|
cp -a horizon/static/* %{buildroot}%{_datadir}/openstack-dashboard/static
|
||||||
|
cp -a static/* %{buildroot}%{_datadir}/openstack-dashboard/static
|
||||||
|
|
||||||
|
# create /var/run/openstack-dashboard/ and own it
|
||||||
|
mkdir -p %{buildroot}%{_sharedstatedir}/openstack-dashboard
|
||||||
|
|
||||||
|
# create /var/log/horizon and own it
|
||||||
|
mkdir -p %{buildroot}%{_var}/log/horizon
|
||||||
|
|
||||||
|
# place logrotate config:
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||||
|
cp -a %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-dashboard
|
||||||
|
|
||||||
|
%check
|
||||||
|
# NOTE(jpena): we do not want to run hacking tests in check
|
||||||
|
rm horizon/test/unit/hacking/test_checks.py
|
||||||
|
%{__python3} manage.py test horizon --settings=horizon.test.settings
|
||||||
|
|
||||||
|
%post -n openstack-dashboard
|
||||||
|
# ugly hack to set a unique SECRET_KEY
|
||||||
|
sed -i "/^from horizon.utils import secret_key$/d" /etc/openstack-dashboard/local_settings
|
||||||
|
sed -i "/^SECRET_KEY.*$/{N;s/^.*$/SECRET_KEY='`openssl rand -hex 10`'/}" /etc/openstack-dashboard/local_settings
|
||||||
|
# reload systemd unit files
|
||||||
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
%postun
|
||||||
|
# update systemd unit files
|
||||||
|
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
|
||||||
|
%files -f dashboard.lang
|
||||||
|
%license LICENSE
|
||||||
|
%dir %{_datadir}/openstack-dashboard/
|
||||||
|
%{_datadir}/openstack-dashboard/*.py*
|
||||||
|
%{_datadir}/openstack-dashboard/static
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/*.py*
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/api
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/contrib
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/admin
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/identity
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/project
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/settings
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/__init__.py*
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/django_pyscss_fix
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/enabled
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/karma.conf.js
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/local
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/management
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/static
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/templates
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/templatetags
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/themes
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/test
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/usage
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/utils
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??_??
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??/LC_MESSAGES
|
||||||
|
%dir %{_datadir}/openstack-dashboard/openstack_dashboard/locale/??_??/LC_MESSAGES
|
||||||
|
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/.eslintrc
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/__pycache__
|
||||||
|
%{_datadir}/openstack-dashboard/openstack_dashboard/dashboards/__pycache__
|
||||||
|
|
||||||
|
%dir %attr(0750, root, apache) %{_sysconfdir}/openstack-dashboard
|
||||||
|
%dir %attr(0750, apache, apache) %{_sharedstatedir}/openstack-dashboard
|
||||||
|
%dir %attr(0750, apache, apache) %{_var}/log/horizon
|
||||||
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/openstack-dashboard.conf
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/local_settings
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/default_policies/*.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/default_policies/README.txt
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/cinder_policy.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/keystone_policy.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/nova_policy.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/glance_policy.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/neutron_policy.yaml
|
||||||
|
%config(noreplace) %attr(0640, root, apache) %{_sysconfdir}/openstack-dashboard/nova_policy.d/api-extensions.yaml
|
||||||
|
%config(noreplace) %attr(0644, root, root) %{_sysconfdir}/logrotate.d/openstack-dashboard
|
||||||
|
%attr(755,root,root) %dir %{_unitdir}/httpd.service.d
|
||||||
|
%config(noreplace) %{_unitdir}/httpd.service.d/openstack-dashboard.conf
|
||||||
|
|
||||||
|
%files -n python3-horizon
|
||||||
|
%license LICENSE
|
||||||
|
%{python3_sitelib}/horizon
|
||||||
|
%{python3_sitelib}/horizon-*.egg-info
|
||||||
|
|
||||||
|
%files -n python3-openstack_auth
|
||||||
|
%license LICENSE
|
||||||
|
%{python3_sitelib}/openstack_auth
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 12 2021 liusheng <liusheng2048@gmail.com> 19.2.0-1
|
||||||
|
- Upgrade to version 19.2.0 (OpenStack Wallaby)
|
||||||
|
|
||||||
|
* Thu Feb 25 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||||
|
- Fix httpd config error
|
||||||
|
|
||||||
|
* Sat Feb 20 2021 huangtianhua <huangtianhua223@gmail.com>
|
||||||
|
- Change to use python-enmerkar instead of django-babel
|
||||||
|
|
||||||
|
* Tus Feb 09 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||||
|
- Init the first openstack victoria release
|
||||||
@ -1,226 +0,0 @@
|
|||||||
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
|
|
||||||
|
|
||||||
Name: openstack-horizon
|
|
||||||
Version: 18.6.1
|
|
||||||
Release: 3
|
|
||||||
Summary: OpenStack Dashboard (Horizon)
|
|
||||||
License: ASL 2.0
|
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://wiki.openstack.org/OpenStackDashboard
|
|
||||||
Source0: horizon-18.6.1.tar.gz
|
|
||||||
Source1: openstack-dashboard.conf
|
|
||||||
# https://review.openstack.org/#/c/635159/
|
|
||||||
Patch0: 0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
|
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildRequires: gettext
|
|
||||||
BuildRequires: openstack-macros
|
|
||||||
BuildRequires: python3-Django
|
|
||||||
BuildRequires: python3-pint
|
|
||||||
BuildRequires: python3-XStatic
|
|
||||||
BuildRequires: python3-XStatic-Angular
|
|
||||||
BuildRequires: python3-XStatic-Angular-Bootstrap
|
|
||||||
BuildRequires: python3-XStatic-Angular-FileUpload
|
|
||||||
BuildRequires: python3-XStatic-Angular-Gettext
|
|
||||||
BuildRequires: python3-XStatic-Angular-Schema-Form
|
|
||||||
BuildRequires: python3-XStatic-Angular-lrdragndrop
|
|
||||||
BuildRequires: python3-XStatic-Bootstrap-Datepicker
|
|
||||||
BuildRequires: python3-XStatic-Bootstrap-SCSS
|
|
||||||
BuildRequires: python3-XStatic-D3
|
|
||||||
BuildRequires: python3-XStatic-Font-Awesome
|
|
||||||
BuildRequires: python3-XStatic-Hogan
|
|
||||||
BuildRequires: python3-XStatic-JQuery-Migrate
|
|
||||||
BuildRequires: python3-XStatic-JQuery-TableSorter
|
|
||||||
BuildRequires: python3-XStatic-JQuery-quicksearch
|
|
||||||
BuildRequires: python3-XStatic-JSEncrypt
|
|
||||||
BuildRequires: python3-XStatic-Jasmine
|
|
||||||
BuildRequires: python3-XStatic-Rickshaw
|
|
||||||
BuildRequires: python3-XStatic-Spin
|
|
||||||
BuildRequires: python3-XStatic-bootswatch
|
|
||||||
BuildRequires: python3-XStatic-jQuery
|
|
||||||
BuildRequires: python3-XStatic-jquery-ui
|
|
||||||
BuildRequires: python3-XStatic-mdi
|
|
||||||
BuildRequires: python3-XStatic-objectpath
|
|
||||||
BuildRequires: python3-XStatic-roboto-fontface
|
|
||||||
BuildRequires: python3-XStatic-smart-table
|
|
||||||
BuildRequires: python3-XStatic-termjs
|
|
||||||
BuildRequires: python3-XStatic-tv4
|
|
||||||
BuildRequires: python3-cinderclient
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-django-compressor
|
|
||||||
BuildRequires: python3-django-debreach
|
|
||||||
BuildRequires: python3-django-pyscss
|
|
||||||
BuildRequires: python3-glanceclient
|
|
||||||
BuildRequires: python3-keystoneclient
|
|
||||||
BuildRequires: python3-mock
|
|
||||||
BuildRequires: python3-netaddr
|
|
||||||
BuildRequires: python3-neutronclient
|
|
||||||
BuildRequires: python3-novaclient
|
|
||||||
BuildRequires: python3-oslo-concurrency
|
|
||||||
BuildRequires: python3-oslo-policy
|
|
||||||
BuildRequires: python3-osprofiler
|
|
||||||
BuildRequires: python3-pbr
|
|
||||||
BuildRequires: python3-pytest
|
|
||||||
BuildRequires: python3-swiftclient
|
|
||||||
BuildRequires: python3-testtools
|
|
||||||
|
|
||||||
Requires: python3-horizon
|
|
||||||
Requires: python3-openstack_auth
|
|
||||||
Requires: httpd
|
|
||||||
Requires: python3-mod_wsgi
|
|
||||||
Requires(post): httpd-tools
|
|
||||||
|
|
||||||
Provides: openstack-horizon = %{version}-%{release}
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description
|
|
||||||
The OpenStack dashboard provides administrators and users a graphical
|
|
||||||
interface to access, provision and automate cloud-based resources. The
|
|
||||||
extensible design makes it easy to plug in and expose third party
|
|
||||||
products and services, such as billing, monitoring and additional
|
|
||||||
management tools.
|
|
||||||
|
|
||||||
The dashboard is just one way to interact with OpenStack resources.
|
|
||||||
Developers can automate access or build tools to manage their resources
|
|
||||||
using the native OpenStack API or the EC2 compatibility API.
|
|
||||||
|
|
||||||
%package -n python3-horizon
|
|
||||||
Summary: OpenStack Dashboard (Horizon) - Python Module
|
|
||||||
Requires: python3-babel
|
|
||||||
Requires: python3-django
|
|
||||||
Requires: python3-pint
|
|
||||||
Requires: python3-PyYAML
|
|
||||||
Requires: python3-XStatic
|
|
||||||
Requires: python3-XStatic-Angular
|
|
||||||
Requires: python3-XStatic-Angular-Bootstrap
|
|
||||||
Requires: python3-XStatic-Angular-FileUpload
|
|
||||||
Requires: python3-XStatic-Angular-Gettext
|
|
||||||
Requires: python3-XStatic-Angular-Schema-Form
|
|
||||||
Requires: python3-XStatic-Angular-lrdragndrop
|
|
||||||
Requires: python3-XStatic-Bootstrap-Datepicker
|
|
||||||
Requires: python3-XStatic-Bootstrap-SCSS
|
|
||||||
Requires: python3-XStatic-D3
|
|
||||||
Requires: python3-XStatic-Font-Awesome
|
|
||||||
Requires: python3-XStatic-Hogan
|
|
||||||
Requires: python3-XStatic-JQuery-Migrate
|
|
||||||
Requires: python3-XStatic-JQuery-TableSorter
|
|
||||||
Requires: python3-XStatic-JQuery-quicksearch
|
|
||||||
Requires: python3-XStatic-JSEncrypt
|
|
||||||
Requires: python3-XStatic-Jasmine
|
|
||||||
Requires: python3-XStatic-Rickshaw
|
|
||||||
Requires: python3-XStatic-Spin
|
|
||||||
Requires: python3-XStatic-bootswatch
|
|
||||||
Requires: python3-XStatic-jQuery
|
|
||||||
Requires: python3-XStatic-jquery-ui
|
|
||||||
Requires: python3-XStatic-mdi
|
|
||||||
Requires: python3-XStatic-objectpath
|
|
||||||
Requires: python3-XStatic-roboto-fontface
|
|
||||||
Requires: python3-XStatic-smart-table
|
|
||||||
Requires: python3-XStatic-termjs
|
|
||||||
Requires: python3-XStatic-tv4
|
|
||||||
Requires: python3-cinderclient
|
|
||||||
Requires: python3-enmerkar
|
|
||||||
Requires: python3-django-compressor
|
|
||||||
Requires: python3-django-debreach
|
|
||||||
Requires: python3-django-pyscss
|
|
||||||
Requires: python3-futurist
|
|
||||||
Requires: python3-glanceclient
|
|
||||||
Requires: python3-heatclient
|
|
||||||
Requires: python3-httplib2
|
|
||||||
Requires: python3-iso8601
|
|
||||||
Requires: python3-keystoneclient
|
|
||||||
Requires: python3-netaddr
|
|
||||||
Requires: python3-neutronclient
|
|
||||||
Requires: python3-novaclient
|
|
||||||
Requires: python3-oslo-concurrency
|
|
||||||
Requires: python3-oslo-config
|
|
||||||
Requires: python3-oslo-i18n
|
|
||||||
Requires: python3-oslo-policy
|
|
||||||
Requires: python3-oslo-serialization
|
|
||||||
Requires: python3-oslo-utils
|
|
||||||
Requires: python3-osprofiler
|
|
||||||
Requires: python3-pbr
|
|
||||||
Requires: python3-scss
|
|
||||||
Requires: python3-pytz
|
|
||||||
Requires: python3-semantic_version
|
|
||||||
Requires: python3-six
|
|
||||||
Requires: python3-swiftclient
|
|
||||||
|
|
||||||
%description -n python3-horizon
|
|
||||||
The Python module horizon is the core component of the OpenStack
|
|
||||||
dashboard.
|
|
||||||
|
|
||||||
%package -n python3-openstack_auth
|
|
||||||
Summary: OpenStack Auth (Horizon) - Python Module
|
|
||||||
|
|
||||||
%description -n python3-openstack_auth
|
|
||||||
The Python module OpenStack Auth provides Authentication mechanism
|
|
||||||
for the OpenStack Dashboard (Horizon).
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -p1 -n horizon-18.6.1
|
|
||||||
%py_req_cleanup
|
|
||||||
|
|
||||||
# Fix manage.py python3 support
|
|
||||||
sed -i 's#%{_bindir}/env python#%{_bindir}/python3#' manage.py
|
|
||||||
|
|
||||||
%build
|
|
||||||
# compile mo files before build
|
|
||||||
pushd horizon
|
|
||||||
python3 ../manage.py compilemessages
|
|
||||||
popd
|
|
||||||
pushd openstack_dashboard
|
|
||||||
python3 ../manage.py compilemessages
|
|
||||||
popd
|
|
||||||
%{py3_build}
|
|
||||||
|
|
||||||
%install
|
|
||||||
%{py3_install}
|
|
||||||
|
|
||||||
# Move openstack_dashboard files
|
|
||||||
install -d -m 755 %{buildroot}%{http_dashboard_dir}
|
|
||||||
mv %{buildroot}%{python3_sitelib}/openstack_dashboard/ %{buildroot}%{http_dashboard_dir}
|
|
||||||
install -m 755 manage.py %{buildroot}%{http_dashboard_dir}/manage.py
|
|
||||||
|
|
||||||
# Create a local_settings.py
|
|
||||||
mv %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.py{.example,}
|
|
||||||
|
|
||||||
# create root and static files
|
|
||||||
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/static
|
|
||||||
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/media
|
|
||||||
pushd %{buildroot}%{http_dashboard_dir}
|
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} python3 manage.py collectstatic --noinput
|
|
||||||
popd
|
|
||||||
|
|
||||||
# cleanup after manage.py run
|
|
||||||
rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/.secret_key_store
|
|
||||||
rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/*secret_key_store*
|
|
||||||
|
|
||||||
# Remove duplicate files
|
|
||||||
rm -f %{buildroot}%{http_dashboard_dir}/openstack_dashboard/.eslintrc
|
|
||||||
|
|
||||||
install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.conf
|
|
||||||
|
|
||||||
%files
|
|
||||||
%doc README.rst
|
|
||||||
%{http_dashboard_dir}
|
|
||||||
%attr(0755, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/
|
|
||||||
%{apache_conf_dir}/openstack-dashboard.conf
|
|
||||||
|
|
||||||
%files -n python3-horizon
|
|
||||||
%license LICENSE
|
|
||||||
%{python3_sitelib}/horizon
|
|
||||||
%{python3_sitelib}/horizon-*.egg-info
|
|
||||||
|
|
||||||
%files -n python3-openstack_auth
|
|
||||||
%license LICENSE
|
|
||||||
%{python3_sitelib}/openstack_auth
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Thu Feb 25 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
|
||||||
- Fix httpd config error
|
|
||||||
|
|
||||||
* Sat Feb 20 2021 huangtianhua <huangtianhua223@gmail.com>
|
|
||||||
- Change to use python-enmerkar instead of django-babel
|
|
||||||
|
|
||||||
* Tus Feb 09 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
|
||||||
- Init the first openstack victoria release
|
|
||||||
Loading…
x
Reference in New Issue
Block a user