summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBigfootACA2021-03-23 22:19:53 +0800
committerBigfootACA2021-03-23 22:19:53 +0800
commitdd33d749cb39f9e7203b5945c0d856861caf4bac (patch)
tree94118089cc5a5f2b9204de664df151f2bd2193af
downloadaur-dd33d749cb39f9e7203b5945c0d856861caf4bac.tar.gz
upload to github
-rw-r--r--.SRCINFO126
-rw-r--r--.gitignore10
-rw-r--r--0000-fix-removed-available_attrs.patch67
-rw-r--r--0001-fix-removed-curry.patch24
-rw-r--r--0002-set-default-not-debug.patch13
-rw-r--r--PKGBUILD194
-rw-r--r--sysusers.conf1
-rw-r--r--tmpfiles.conf3
-rw-r--r--wsgi-horizon.conf27
9 files changed, 465 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5bfba0b5be49
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,126 @@
+pkgbase = openstack-horizon
+ pkgdesc = OpenStack Dashboard
+ pkgver = 19.1.0
+ pkgrel = 1
+ url = https://docs.openstack.org/horizon/latest/
+ arch = any
+ license = Apache
+ checkdepends = ffmpeg
+ checkdepends = firefox
+ checkdepends = xorg-server-xvfb
+ checkdepends = bandit
+ checkdepends = python-hacking
+ checkdepends = python-coverage
+ checkdepends = python-flake8-import-order
+ checkdepends = python-nodeenv
+ checkdepends = python-pytest
+ checkdepends = python-pytest-django
+ checkdepends = python-pytest-html
+ checkdepends = python-memcached
+ checkdepends = python-pylint
+ checkdepends = python-selenium
+ checkdepends = python-testscenarios
+ checkdepends = python-testtools
+ checkdepends = python-xvfbwrapper
+ makedepends = python-setuptools
+ makedepends = python-openstackdocstheme
+ makedepends = python-reno
+ makedepends = python-sphinx
+ makedepends = python-doc8
+ makedepends = python-mock
+ makedepends = python-pytest
+ depends = gettext
+ depends = python
+ depends = python-pbr
+ depends = python-babel
+ depends = python-debtcollector
+ depends = python-django
+ depends = python-django-compressor
+ depends = python-django-debreach
+ depends = python-django-pyscss
+ depends = python-futurist
+ depends = python-iso8601
+ depends = python-keystoneauth1
+ depends = python-netaddr
+ depends = python-oslo-concurrency
+ depends = python-oslo-config
+ depends = python-oslo-i18n
+ depends = python-oslo-policy
+ depends = python-oslo-serialization
+ depends = python-oslo-upgradecheck
+ depends = python-oslo-utils
+ depends = python-osprofiler
+ depends = python-pymongo
+ depends = python-pyscss
+ depends = python-cinderclient
+ depends = python-glanceclient
+ depends = python-keystoneclient
+ depends = python-neutronclient
+ depends = python-novaclient
+ depends = python-swiftclient
+ depends = python-pytz
+ depends = python-pyaml
+ depends = python-requests
+ depends = python-semantic-version
+ depends = python-xstatic
+ depends = python-xstatic-angular
+ depends = python-xstatic-angular-bootstrap
+ depends = python-xstatic-angular-fileupload
+ depends = python-xstatic-angular-gettext
+ depends = python-xstatic-angular-lrdragndrop
+ depends = python-xstatic-angular-schema-form
+ depends = python-xstatic-bootstrap-datepicker
+ depends = python-xstatic-bootstrap-scss
+ depends = python-xstatic-bootswatch
+ depends = python-xstatic-d3
+ depends = python-xstatic-hogan
+ depends = python-xstatic-font-awesome
+ depends = python-xstatic-jasmine
+ depends = python-xstatic-jquery
+ depends = python-xstatic-jquery-migrate
+ depends = python-xstatic-jquery-quicksearch
+ depends = python-xstatic-jquery-tablesorter
+ depends = python-xstatic-jquery-ui
+ depends = python-xstatic-jsencrypt
+ depends = python-xstatic-mdi
+ depends = python-xstatic-objectpath
+ depends = python-xstatic-rickshaw
+ depends = python-xstatic-roboto-fontface
+ depends = python-xstatic-smart-table
+ depends = python-xstatic-spin
+ depends = python-xstatic-termjs
+ depends = python-xstatic-tv4
+ depends = python-enmerkar
+ source = https://pypi.io/packages/source/h/horizon/horizon-19.1.0.tar.gz
+ source = 0000-fix-removed-available_attrs.patch
+ source = 0001-fix-removed-curry.patch
+ source = 0002-set-default-not-debug.patch
+ source = wsgi-horizon.conf
+ source = tmpfiles.conf
+ source = sysusers.conf
+ md5sums = b4c87f5fbf870e4459a3047e629b6a90
+ md5sums = 8bf40e8faa9a7bfc60ba1a65f5f64fb6
+ md5sums = bd6347e135ed9117221dfe676eec3e34
+ md5sums = 1a6b8d9735574f2a73ac6f8866a37d2b
+ md5sums = 94282686c3903ff4a15e75c519186541
+ md5sums = ca5311dc0f58af1e2f5a306038128ce7
+ md5sums = c656448ba05ca49ffc6897d4e92e64d8
+ sha256sums = b789efa026f3af7f2cef71ff70c6393cfbfc88bd88ba1ea1eb4c7186b8c5c801
+ sha256sums = 6546c140ad4b28e8f91583dfa0df3804794747e18cad373e51f5bc31ad779c29
+ sha256sums = f5a1d5fd707b5e8ef43960553a2eb7a47f0ef293588d90a772d2f3605277f81b
+ sha256sums = 659d28b7d0be1ebc3439d35e0d1ec948cc37d2f4284804037fe8fdc33c03c04f
+ sha256sums = be5b591bde6abef4b445170a2cef4325106e516c5adf15d3de6cd7f34753dc6f
+ sha256sums = fab8d2aaf442c5e7760808a72a1e3209f3099377a7ae9fa7eb1d446effdcdee3
+ sha256sums = bef6fe090baba05e6a72fb118ba709eb945133ae8094ad5aa932bbf76a9ffe23
+ sha512sums = 2fbf520f4e0f973e3c636fddf54b9b4eb0ec728f1e3a4aac42172bf820aeb269887e625045a8cdbccd065e3d5c80ccb5dfd347b96355eabde4a865c94479b8a6
+ sha512sums = 737bbe91d0b4a2ada993e15265116a3521e222fb1c7a344b51f8172e3ae04329a12457c22173411eb9ea4f89a8c43a175821ef6f63b67b1172408e6d3ab0ce83
+ sha512sums = 4d9969425204263aa8711f16c24ff6f630bd30147cc5d612194c82fafad88887af01f79f145cd402b74921ee34a2fb10d89890d33ee06a2663e2b42212e1ec12
+ sha512sums = 51d423568dba81b2d90c81ec4e0d0e7ebb7be0c64994591c02021d1a56a41715c6db30e4e285a7fb44007d73f9eb06aa2f24ab5429c9da68e70d6eb9e6bd78a5
+ sha512sums = d2fc3f55fcd224127c18b904be724da6eaeaf1ac7841b1415df038e192a91d6b18421ab17aae817bbbba5a8492e98f96e73539dd1f356c9c844abe141ef31a50
+ sha512sums = 127e9a9eb8ee19773ee579d86cf19bf8d41be1d222a7a241a3f36b4091d965249f96afba44cded8c79eeb10733f79b7b78bc8beb2c9446e43774a31bd5a04bf4
+ sha512sums = 58567414da7c38c5987158f2206e7b13617565944b233381faf3576b7124e4e2dc4244c55c791b104d047f2450ce55379c935e259af4f387b1415e60a972f29d
+
+pkgname = openstack-horizon
+
+pkgname = openstack-horizon-doc
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fcaabd513b1a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+pkg
+src
+*.tar
+*.gz
+*.xz
+*.zst
+*.zip
+*.lz4
+*.lzo
+*.bz
diff --git a/0000-fix-removed-available_attrs.patch b/0000-fix-removed-available_attrs.patch
new file mode 100644
index 000000000000..900432a9be92
--- /dev/null
+++ b/0000-fix-removed-available_attrs.patch
@@ -0,0 +1,67 @@
+diff --git a/horizon-19.1.0-old/horizon/decorators.py b/horizon-19.1.0/horizon/decorators.py
+index fa67761..38cca3f 100644
+--- a/horizon-19.1.0-old/horizon/decorators.py
++++ b/horizon-19.1.0/horizon/decorators.py
+@@ -21,13 +21,12 @@ General-purpose decorators for use with Horizon.
+ """
+ import functools
+
+-from django.utils.decorators import available_attrs
+ from django.utils.translation import ugettext_lazy as _
+
+
+ def _current_component(view_func, dashboard=None, panel=None):
+ """Sets the currently-active dashboard and/or panel on the request."""
+- @functools.wraps(view_func, assigned=available_attrs(view_func))
++ @functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS)
+ def dec(request, *args, **kwargs):
+ if dashboard:
+ request.horizon['dashboard'] = dashboard
+@@ -46,7 +45,7 @@ def require_auth(view_func):
+ """
+ from horizon.exceptions import NotAuthenticated
+
+- @functools.wraps(view_func, assigned=available_attrs(view_func))
++ @functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS)
+ def dec(request, *args, **kwargs):
+ if request.user.is_authenticated:
+ return view_func(request, *args, **kwargs)
+@@ -77,7 +76,7 @@ def require_perms(view_func, required):
+ current_perms = getattr(view_func, '_required_perms', set([]))
+ view_func._required_perms = current_perms | set(required)
+
+- @functools.wraps(view_func, assigned=available_attrs(view_func))
++ @functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS)
+ def dec(request, *args, **kwargs):
+ if request.user.is_authenticated:
+ if request.user.has_perms(view_func._required_perms):
+@@ -103,7 +102,7 @@ def require_component_access(view_func, component):
+ """
+ from horizon.exceptions import NotAuthorized
+
+- @functools.wraps(view_func, assigned=available_attrs(view_func))
++ @functools.wraps(view_func, assigned=functools.WRAPPER_ASSIGNMENTS)
+ def dec(request, *args, **kwargs):
+ if not component.can_access({'request': request}):
+ raise NotAuthorized(_("You are not authorized to access %s")
+diff --git a/horizon-19.1.0-old/openstack_dashboard/api/rest/utils.py b/horizon-19.1.0/openstack_dashboard/api/rest/utils.py
+index a9bc3ea..8073ffa 100644
+--- a/horizon-19.1.0-old/openstack_dashboard/api/rest/utils.py
++++ b/horizon-19.1.0/openstack_dashboard/api/rest/utils.py
+@@ -17,7 +17,6 @@ import logging
+
+ from django.conf import settings
+ from django import http
+-from django.utils import decorators
+
+ from oslo_serialization import jsonutils
+
+@@ -104,7 +103,7 @@ def ajax(authenticated=True, data_required=False,
+ def decorator(function, authenticated=authenticated,
+ data_required=data_required):
+ @functools.wraps(function,
+- assigned=decorators.available_attrs(function))
++ assigned=functools.WRAPPER_ASSIGNMENTS)
+ def _wrapped(self, request, *args, **kw):
+ if authenticated and not request.user.is_authenticated:
+ return JSONResponse('not logged in', 401)
diff --git a/0001-fix-removed-curry.patch b/0001-fix-removed-curry.patch
new file mode 100644
index 000000000000..acb0dcf68d90
--- /dev/null
+++ b/0001-fix-removed-curry.patch
@@ -0,0 +1,24 @@
+diff --git a/horizon-19.1.0-old/openstack_auth/views.py b/horizon-19.1.0/openstack_auth/views.py
+index 353dc99..b7e5b7c 100644
+--- a/horizon-19.1.0-old/openstack_auth/views.py
++++ b/horizon-19.1.0/openstack_auth/views.py
+@@ -12,6 +12,7 @@
+ # limitations under the License.
+ import datetime
+ import logging
++import functools
+
+ from django.conf import settings
+ from django.contrib import auth
+@@ -116,9 +117,9 @@ def login(request):
+ initial.update({'region': requested_region})
+
+ if request.method == "POST":
+- form = functional.curry(forms.Login)
++ form = functools.partial(forms.Login)
+ else:
+- form = functional.curry(forms.Login, initial=initial)
++ form = functools.partial(forms.Login, initial=initial)
+
+ choices = settings.WEBSSO_CHOICES
+ reason = get_csrf_reason(request.GET.get('csrf_failure'))
diff --git a/0002-set-default-not-debug.patch b/0002-set-default-not-debug.patch
new file mode 100644
index 000000000000..72f337244ab1
--- /dev/null
+++ b/0002-set-default-not-debug.patch
@@ -0,0 +1,13 @@
+diff --git a/horizon-19.1.0-old/openstack_dashboard/local/local_settings.py.example b/horizon-19.1.0/openstack_dashboard/local/local_settings.py.example
+index 2b084bf..b588971 100644
+--- a/horizon-19.1.0-old/openstack_dashboard/local/local_settings.py.example
++++ b/horizon-19.1.0/openstack_dashboard/local/local_settings.py.example
+@@ -20,7 +20,7 @@ from horizon.utils import secret_key
+
+ from openstack_dashboard.settings import HORIZON_CONFIG
+
+-DEBUG = True
++DEBUG = False
+
+ # This setting controls whether or not compression is enabled. Disabling
+ # compression makes Horizon considerably slower, but makes it much easier
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ecb87a5b6311
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,194 @@
+# Maintainer: BigfootACA <bigfoot@classfun.cn>
+
+_pyname=horizon
+pkgbase=openstack-$_pyname
+pkgname=(openstack-$_pyname{,-doc})
+pkgver=19.1.0
+pkgrel=1
+pkgdesc="OpenStack Dashboard"
+arch=('any')
+url="https://docs.openstack.org/horizon/latest/"
+license=('Apache')
+depends=(
+ gettext
+ python
+ python-pbr
+ python-babel
+ python-debtcollector
+ python-django
+ python-django-compressor
+ python-django-debreach
+ python-django-pyscss
+ python-futurist
+ python-iso8601
+ python-keystoneauth1
+ python-netaddr
+ python-oslo-concurrency
+ python-oslo-config
+ python-oslo-i18n
+ python-oslo-policy
+ python-oslo-serialization
+ python-oslo-upgradecheck
+ python-oslo-utils
+ python-osprofiler
+ python-pymongo
+ python-pyscss
+ python-cinderclient
+ python-glanceclient
+ python-keystoneclient
+ python-neutronclient
+ python-novaclient
+ python-swiftclient
+ python-pytz
+ python-pyaml
+ python-requests
+ python-semantic-version
+ python-xstatic
+ python-xstatic-angular
+ python-xstatic-angular-bootstrap
+ python-xstatic-angular-fileupload
+ python-xstatic-angular-gettext
+ python-xstatic-angular-lrdragndrop
+ python-xstatic-angular-schema-form
+ python-xstatic-bootstrap-datepicker
+ python-xstatic-bootstrap-scss
+ python-xstatic-bootswatch
+ python-xstatic-d3
+ python-xstatic-hogan
+ python-xstatic-font-awesome
+ python-xstatic-jasmine
+ python-xstatic-jquery
+ python-xstatic-jquery-migrate
+ python-xstatic-jquery-quicksearch
+ python-xstatic-jquery-tablesorter
+ python-xstatic-jquery-ui
+ python-xstatic-jsencrypt
+ python-xstatic-mdi
+ python-xstatic-objectpath
+ python-xstatic-rickshaw
+ python-xstatic-roboto-fontface
+ python-xstatic-smart-table
+ python-xstatic-spin
+ python-xstatic-termjs
+ python-xstatic-tv4
+ python-enmerkar
+)
+makedepends=(
+ python-setuptools
+ python-openstackdocstheme
+ python-reno
+ python-sphinx
+ python-doc8
+ python-mock
+ python-pytest
+)
+checkdepends=(
+ ffmpeg
+ firefox
+ xorg-server-xvfb
+ bandit
+ python-hacking
+ python-coverage
+ python-flake8-import-order
+ python-nodeenv
+ python-pytest
+ python-pytest-django
+ python-pytest-html
+ python-memcached
+ python-pylint
+ python-selenium
+ python-testscenarios
+ python-testtools
+ python-xvfbwrapper
+)
+source=(
+ "https://pypi.io/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz"
+ 0000-fix-removed-available_attrs.patch
+ 0001-fix-removed-curry.patch
+ 0002-set-default-not-debug.patch
+ wsgi-horizon.conf
+ tmpfiles.conf
+ sysusers.conf
+)
+md5sums=('b4c87f5fbf870e4459a3047e629b6a90'
+ '8bf40e8faa9a7bfc60ba1a65f5f64fb6'
+ 'bd6347e135ed9117221dfe676eec3e34'
+ '1a6b8d9735574f2a73ac6f8866a37d2b'
+ '94282686c3903ff4a15e75c519186541'
+ 'ca5311dc0f58af1e2f5a306038128ce7'
+ 'c656448ba05ca49ffc6897d4e92e64d8')
+sha256sums=('b789efa026f3af7f2cef71ff70c6393cfbfc88bd88ba1ea1eb4c7186b8c5c801'
+ '6546c140ad4b28e8f91583dfa0df3804794747e18cad373e51f5bc31ad779c29'
+ 'f5a1d5fd707b5e8ef43960553a2eb7a47f0ef293588d90a772d2f3605277f81b'
+ '659d28b7d0be1ebc3439d35e0d1ec948cc37d2f4284804037fe8fdc33c03c04f'
+ 'be5b591bde6abef4b445170a2cef4325106e516c5adf15d3de6cd7f34753dc6f'
+ 'fab8d2aaf442c5e7760808a72a1e3209f3099377a7ae9fa7eb1d446effdcdee3'
+ 'bef6fe090baba05e6a72fb118ba709eb945133ae8094ad5aa932bbf76a9ffe23')
+sha512sums=('2fbf520f4e0f973e3c636fddf54b9b4eb0ec728f1e3a4aac42172bf820aeb269887e625045a8cdbccd065e3d5c80ccb5dfd347b96355eabde4a865c94479b8a6'
+ '737bbe91d0b4a2ada993e15265116a3521e222fb1c7a344b51f8172e3ae04329a12457c22173411eb9ea4f89a8c43a175821ef6f63b67b1172408e6d3ab0ce83'
+ '4d9969425204263aa8711f16c24ff6f630bd30147cc5d612194c82fafad88887af01f79f145cd402b74921ee34a2fb10d89890d33ee06a2663e2b42212e1ec12'
+ '51d423568dba81b2d90c81ec4e0d0e7ebb7be0c64994591c02021d1a56a41715c6db30e4e285a7fb44007d73f9eb06aa2f24ab5429c9da68e70d6eb9e6bd78a5'
+ 'd2fc3f55fcd224127c18b904be724da6eaeaf1ac7841b1415df038e192a91d6b18421ab17aae817bbbba5a8492e98f96e73539dd1f356c9c844abe141ef31a50'
+ '127e9a9eb8ee19773ee579d86cf19bf8d41be1d222a7a241a3f36b4091d965249f96afba44cded8c79eeb10733f79b7b78bc8beb2c9446e43774a31bd5a04bf4'
+ '58567414da7c38c5987158f2206e7b13617565944b233381faf3576b7124e4e2dc4244c55c791b104d047f2450ce55379c935e259af4f387b1415e60a972f29d')
+
+export PBR_VERSION=$pkgver
+
+prepare(){
+ for i in "${source[@]}"
+ do case "${i}" in
+ ?*.patch)
+ msg2 "Apply patch ${i}"
+ patch -Np1 <"${i}"
+ ;;
+ esac
+ done
+}
+
+build(){
+ cd $_pyname-$pkgver
+ python setup.py build
+ #sphinx-build -b html doc/source doc/build/html
+}
+
+#check(){
+# cd $_pyname-$pkgver
+# PYTHONPATH=${PWD} stestr run
+#}
+
+_package_pkg(){
+ optdepends=(
+ "apache: wsgi api support"
+ "mod_wsgi: apache wsgi support"
+ "python-openstackclient: OpenStack CLI Client"
+ "${pkgbase}-doc: Documents for ${pkgdesc}"
+ )
+ backup=(
+ etc/httpd/conf/extra/wsgi-horizon.conf
+ etc/openstack-dashboard/local_settings
+ )
+ cd $_pyname-$pkgver
+ export PYTHONPATH=${PWD}
+ _DATADIR="$pkgdir/usr/share"
+ DATADIR="$_DATADIR/$pkgname"
+ python setup.py install --root "$pkgdir" --optimize=1
+ install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir"/usr/lib/tmpfiles.d/$_pyname.conf
+ install -Dm644 "$srcdir/sysusers.conf" "$pkgdir"/usr/lib/sysusers.d/$_pyname.conf
+ install -Dm644 "$srcdir/wsgi-horizon.conf" -t "$pkgdir/etc/httpd/conf/extra"
+ install -Dm644 "$srcdir/wsgi-horizon.conf" -t "$DATADIR"
+ install -Dm644 openstack_dashboard/local/local_settings.py.example "$pkgdir/etc/openstack-dashboard/local_settings"
+ install -Dm755 manage.py -t "${DATADIR}"
+ mv ${pkgdir}/usr/lib/python3.*/site-packages/openstack_dashboard "${DATADIR}/"
+ ln -s /etc/openstack-dashboard/local_settings "${DATADIR}/openstack_dashboard/local/local_settings.py"
+}
+
+_package_doc(){
+ pkgdesc="OpenStack Image Service Documents"
+ depends=()
+ cd $_pyname-$pkgver
+ mkdir -p "${pkgdir}/usr/share/doc"
+ #cp -r doc/build/html "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+eval "package_${pkgbase}(){ _package_pkg; }"
+eval "package_${pkgbase}-doc(){ _package_doc; }"
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 000000000000..8a85b743abc3
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u horizon - "OpenStack Dashboard" /var/lib/horizon
diff --git a/tmpfiles.conf b/tmpfiles.conf
new file mode 100644
index 000000000000..6134c9cfe80b
--- /dev/null
+++ b/tmpfiles.conf
@@ -0,0 +1,3 @@
+d /var/lib/horizon 0750 horizon horizon -
+d /var/log/horizon 0750 horizon horizon -
+Z /usr/share/openstack-horizon - horizon horizon -
diff --git a/wsgi-horizon.conf b/wsgi-horizon.conf
new file mode 100644
index 000000000000..a565ca92788b
--- /dev/null
+++ b/wsgi-horizon.conf
@@ -0,0 +1,27 @@
+<IfModule wsgi_module>
+ <VirtualHost *:80>
+ DocumentRoot /usr/share/openstack-horizon
+ WSGIDaemonProcess dashboard processes=3 threads=1 user=horizon group=horizon display-name=%{GROUP}
+ WSGIProcessGroup dashboard
+ WSGIScriptAlias / /usr/share/openstack-horizon/openstack_dashboard/wsgi.py
+ WSGIPassAuthorization On
+ WSGIPassAuthorization On
+ Alias /static /usr/share/openstack-horizon/static
+ ErrorLogFormat "%M"
+ ErrorLog /var/log/horizon/error.log
+ CustomLog /var/log/horizon/access.log combined
+ <Directory /usr/share/openstack-horizon/openstack_dashboard>
+ Options All
+ AllowOverride All
+ Require all granted
+ </Directory>
+ <Directory /usr/share/openstack-horizon/static>
+ Options All
+ AllowOverride All
+ Require all granted
+ </Directory>
+ <Location "/static">
+ SetHandler None
+ </Location>
+ </VirtualHost>
+</IfModule> \ No newline at end of file