move wsgi app/scriplets from stx-keystone to stx-upstream

In an effort to reduce the number of stx specific code
changes in the openstack core repos, this modification
moves a small python scriplet into stx-upstream and
adjusts the spec file to pick the file from the new
location.

Another scriptlet (admin.py) is no longer necessary
and has been removed from the spec file.

This commit does not include modification to the repo
that contains the original sources, and does not require
the original sources to be modified or removed.
Removal of the original sources will be done
separately and can only be done once this commit gets
merged.

Story: 2003112
Task: 23231

Change-Id: I3e86e8e952adb447e76cf970d71b5b37fccc210d
Signed-off-by: Paul-Emile Element <Paul-Emile.Element@windriver.com>
This commit is contained in:
Paul-Emile Element 2018-09-21 09:50:12 -04:00
parent e7a3144e01
commit f76a273227
2 changed files with 26 additions and 6 deletions

View File

@ -0,0 +1,21 @@
# Copyright (c) 2013-2017 Wind River Systems, Inc.
#
# 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
#
# http://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.
from keystone.server import wsgi as wsgi_server
import sys
sys.argv = sys.argv[:1]
application = wsgi_server.initialize_public_application()

View File

@ -21,7 +21,8 @@ Source4: openstack-keystone.defaultconf
Source99: openstack-keystone.service
Source100: keystone-all
Source101: keystone-fernet-keys-rotate-active
Source102: password-rules.conf
Source102: password-rules.conf
Source103: public.py
BuildArch: noarch
BuildRequires: openstack-macros
@ -54,7 +55,7 @@ BuildRequires: python-testresources
BuildRequires: python-babel
#WRS: Need these for build_sphinx
BuildRequires: tsconfig
BuildRequires: tsconfig
BuildRequires: python2-pycodestyle
Requires: python-keystone = %{epoch}:%{version}-%{release}
@ -218,9 +219,8 @@ install -p -D -m 755 %{SOURCE101} %{buildroot}%{_bindir}/keystone-fernet-keys-ro
# WRS: install password rules(readable only)
install -p -D -m 440 %{SOURCE102} %{buildroot}%{_sysconfdir}/keystone/password-rules.conf
# WRS: install keystone public and admin gunicorn apps
install -p -D -m 755 etc/admin.py %{buildroot}/%{_datarootdir}/keystone/admin.py
install -p -D -m 755 etc/public.py %{buildroot}/%{_datarootdir}/keystone/public.py
# WRS: install keystone public gunicorn app
install -p -D -m 755 %{SOURCE103} %{buildroot}/%{_datarootdir}/keystone/public.py
# WRS: install openstack-keystone service script
install -p -D -m 644 %{SOURCE99} %{buildroot}%{_unitdir}/openstack-keystone.service
@ -292,7 +292,6 @@ exit 0
%files -n python-keystone
%{_datarootdir}/keystone/public*.py*
%{_datarootdir}/keystone/admin*.py*
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE