simple fixes to incorrect variable lookups
Details
Details
this is all deployment related, so no new unit tests. tested in local env
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
simple fixes to incorrect variable lookups
this is all deployment related, so no new unit tests. tested in local env
| Lint Skipped |
| Unit Tests Skipped |
| Path | |||
|---|---|---|---|
| M | conf/resultsdb_frontend.wsgi (2 lines) | ||
| M | resultsdb_frontend.spec (22 lines) | ||
| M | resultsdb_frontend/__init__.py (4 lines) |
| Commit | Tree | Parents | Author | Summary | Date |
|---|---|---|---|---|---|
| 3e5a25c0c775 | 41f76ac1c0e6 | 4e48908645a3 | Tim Flink | fixing references to resultsdb conf and env var, updating specfile for new… (Show More…) | Apr 25 2014, 4:45 PM |
| 1 | # This is required for running on EL6 | 1 | # This is required for running on EL6 | ||
|---|---|---|---|---|---|
| 2 | import __main__ | 2 | import __main__ | ||
| 3 | __main__.__requires__ = ['Flask >= 0.9', 'jinja2 >= 2.6'] | 3 | __main__.__requires__ = ['Flask >= 0.9', 'jinja2 >= 2.6'] | ||
| 4 | import pkg_resources | 4 | import pkg_resources | ||
| 5 | 5 | | |||
| 6 | #activate_this = '/var/www/resultsdb_frontend/env/bin/activate_this.py' | 6 | #activate_this = '/var/www/resultsdb_frontend/env/bin/activate_this.py' | ||
| 7 | #execfile(activate_this, dict(__file__=activate_this)) | 7 | #execfile(activate_this, dict(__file__=activate_this)) | ||
| 8 | 8 | | |||
| 9 | #import sys | 9 | #import sys | ||
| 10 | #sys.path.insert(0,"/var/www/resultsdb_frontend/") | 10 | #sys.path.insert(0,"/var/www/resultsdb_frontend/") | ||
| 11 | 11 | | |||
| 12 | import os | 12 | import os | ||
| 13 | os.environ['RESULTSDB_FRONTEND_CONFIG'] = '/etc/resultsdb/settings.py' | 13 | os.environ['RESULTSDB_FRONTEND_CONFIG'] = '/etc/resultsdb_frontend/settings.py' | ||
| 14 | 14 | | |||
| 15 | from resultsdb_frontend import app as application | 15 | from resultsdb_frontend import app as application | ||
| 1 | %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) | 1 | %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) | ||
|---|---|---|---|---|---|
| 2 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} | 2 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} | ||
| 3 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} | 3 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} | ||
| 4 | %endif | 4 | %endif | ||
| 5 | 5 | | |||
| 6 | %global pkgname resultsdb_frontend | | |||
| 7 | %global tarball_name resultsdb_frontend | | |||
| 8 | %global commitname 1de5b340e4c6 | | |||
| 9 | %global bitbucket_username rajcze | | |||
| 10 | | ||||
| 11 | Name: resultsdb_frontend | 6 | Name: resultsdb_frontend | ||
| 12 | Version: 1.0.0 | 7 | Version: 1.0.2 | ||
| 13 | Release: 1%{?dist} | 8 | Release: 1%{?dist} | ||
| 14 | Summary: Frontend for the ResultsDB | 9 | Summary: Frontend for the ResultsDB | ||
| 15 | 10 | | |||
| 16 | License: GPLv2+ | 11 | License: GPLv2+ | ||
| 17 | URL: https://bitbucket.org/rajcze/resultsdb_frontend | 12 | URL: https://bitbucket.org/fedoraqa/resultsdb_frontend | ||
| 18 | Source0: https://bitbucket.org/rajcze/%{pkgname}/get/v1.0.tar.gz | 13 | Source0: https://qadevel.cloud.fedoraproject.org/releases/%{name}/%{name}-%{version}.tar.gz | ||
| 19 | 14 | | |||
| 20 | BuildArch: noarch | 15 | BuildArch: noarch | ||
| 21 | 16 | | |||
| 22 | Requires: python-flask | 17 | Requires: python-flask | ||
| 23 | Requires: python-flask-wtf | 18 | Requires: python-flask-wtf | ||
| 24 | Requires: python-flask-restful | 19 | Requires: python-flask-restful | ||
| 25 | Requires: python-six | 20 | Requires: python-six | ||
| 26 | Requires: python-iso8601 | 21 | Requires: python-iso8601 | ||
| 27 | Requires: python-resultsdb_api | 22 | Requires: resultsdb_api | ||
| 28 | BuildRequires: python2-devel python-setuptools | 23 | BuildRequires: python2-devel python-setuptools | ||
| 29 | 24 | | |||
| 30 | %description | 25 | %description | ||
| 31 | ResultsDB fronted is a simple application that | 26 | ResultsDB fronted is a simple application that | ||
| 32 | allows browsing the data stored inside ResultsDB. | 27 | allows browsing the data stored inside ResultsDB. | ||
| 33 | 28 | | |||
| 34 | %prep | 29 | %prep | ||
| 35 | %setup -qn %{bitbucket_username}-%{pkgname}-%{commitname} | 30 | %setup -q | ||
| 36 | 31 | | |||
| 37 | %build | 32 | %build | ||
| 38 | %{__python2} setup.py build | 33 | %{__python2} setup.py build | ||
| 39 | 34 | | |||
| 40 | %install | 35 | %install | ||
| 41 | %{__python2} setup.py install --skip-build --root %{buildroot} | 36 | %{__python2} setup.py install --skip-build --root %{buildroot} | ||
| 42 | 37 | | |||
| 43 | # apache and wsgi settings | 38 | # apache and wsgi settings | ||
| 44 | mkdir -p %{buildroot}%{_datadir}/resultsdb_frontend/conf | 39 | mkdir -p %{buildroot}%{_datadir}/resultsdb_frontend/conf | ||
| 45 | cp conf/resultsdb_frontend.conf %{buildroot}%{_datadir}/resultsdb_frontend/conf/. | 40 | cp conf/resultsdb_frontend.conf %{buildroot}%{_datadir}/resultsdb_frontend/conf/. | ||
| 46 | cp conf/resultsdb_frontend.wsgi %{buildroot}%{_datadir}/resultsdb_frontend/. | 41 | cp conf/resultsdb_frontend.wsgi %{buildroot}%{_datadir}/resultsdb_frontend/. | ||
| 47 | 42 | | |||
| 48 | mkdir -p %{buildroot}%{_sysconfdir}/resultsdb_frontend | 43 | mkdir -p %{buildroot}%{_sysconfdir}/resultsdb_frontend | ||
| 49 | install conf/settings.py.example %{buildroot}%{_sysconfdir}/resultsdb_frontend/settings.py.example | 44 | install conf/settings.py.example %{buildroot}%{_sysconfdir}/resultsdb_frontend/settings.py.example | ||
| 50 | 45 | | |||
| 51 | %files | 46 | %files | ||
| 52 | %doc README.md conf/* | 47 | %doc README.md conf/* | ||
| 53 | %{python_sitelib}/resultsdb_frontend | 48 | %{python_sitelib}/resultsdb_frontend | ||
| 54 | %{python_sitelib}/*.egg-info | 49 | %{python_sitelib}/*.egg-info | ||
| 55 | 50 | | |||
| 56 | %attr(755,root,root) %{_bindir}/resultsdb_frontend | | |||
| 57 | %dir %{_sysconfdir}/resultsdb_frontend | 51 | %dir %{_sysconfdir}/resultsdb_frontend | ||
| 58 | %{_sysconfdir}/resultsdb_frontend/* | 52 | %{_sysconfdir}/resultsdb_frontend/* | ||
| 59 | %dir %{_datadir}/resultsdb_frontend | 53 | %dir %{_datadir}/resultsdb_frontend | ||
| 60 | %{_datadir}/resultsdb_frontend/* | 54 | %{_datadir}/resultsdb_frontend/* | ||
| 61 | 55 | | |||
| 62 | %changelog | 56 | %changelog | ||
| 57 | * Fri Apr 25 2014 Tim Flink <tflink@fedoraproject.org> - 1.0.2-1 | ||||
| 58 | - updating to new upstream, fixing some variable name errors | ||||
| 59 | | ||||
| 60 | * Fri Apr 25 2014 Tim Flink <tflink@fedoraproject.org> - 1.0.1-2 | ||||
| 61 | - updating to new upstream, fixing resultsdb_api dep, removing resultsdb_frontend binary | ||||
| 62 | | ||||
| 63 | * Thu Feb 6 2014 Jan Sedlak <jsedlak@redhat.com> - 1.0.0-1 | 63 | * Thu Feb 6 2014 Jan Sedlak <jsedlak@redhat.com> - 1.0.0-1 | ||
| 64 | - initial packaging | 64 | - initial packaging | ||
| Show All 20 Lines | |||||
| 21 | 21 | | |||
| 22 | 22 | | |||
| 23 | from flask import Flask, render_template | 23 | from flask import Flask, render_template | ||
| 24 | 24 | | |||
| 25 | import logging | 25 | import logging | ||
| 26 | import os | 26 | import os | ||
| 27 | 27 | | |||
| 28 | # the version as used in setup.py | 28 | # the version as used in setup.py | ||
| 29 | __version__ = "1.0.1" | 29 | __version__ = "1.0.2" | ||
| 30 | 30 | | |||
| 31 | # Flask App | 31 | # Flask App | ||
| 32 | app = Flask(__name__) | 32 | app = Flask(__name__) | ||
| 33 | app.secret_key = 'not-really-a-secret' | 33 | app.secret_key = 'not-really-a-secret' | ||
| 34 | 34 | | |||
| 35 | # Load default config, then override that with a config file | 35 | # Load default config, then override that with a config file | ||
| 36 | if os.getenv('PROD') == 'true': | 36 | if os.getenv('PROD') == 'true': | ||
| 37 | default_config_obj = 'resultsdb_frontend.config.ProductionConfig' | 37 | default_config_obj = 'resultsdb_frontend.config.ProductionConfig' | ||
| 38 | default_config_file = '/etc/resultsdb/settings.py' | 38 | default_config_file = '/etc/resultsdb/settings.py' | ||
| 39 | elif os.getenv('TEST') == 'true': | 39 | elif os.getenv('TEST') == 'true': | ||
| 40 | default_config_obj = 'resultsdb_frontend.config.TestingConfig' | 40 | default_config_obj = 'resultsdb_frontend.config.TestingConfig' | ||
| 41 | default_config_file = os.getcwd() + '/conf/settings.py' | 41 | default_config_file = os.getcwd() + '/conf/settings.py' | ||
| 42 | else: | 42 | else: | ||
| 43 | default_config_obj = 'resultsdb_frontend.config.DevelopmentConfig' | 43 | default_config_obj = 'resultsdb_frontend.config.DevelopmentConfig' | ||
| 44 | default_config_file = os.getcwd() + '/conf/settings.py' | 44 | default_config_file = os.getcwd() + '/conf/settings.py' | ||
| 45 | 45 | | |||
| 46 | config_file = os.environ.get('RESULTSDB_CONFIG', default_config_file) | 46 | config_file = os.environ.get('RESULTSDB_FRONTEND_CONFIG', default_config_file) | ||
| 47 | 47 | | |||
| 48 | if not os.path.exists(config_file): | 48 | if not os.path.exists(config_file): | ||
| 49 | raise RuntimeError("config file %r does not exist" % config_file) | 49 | raise RuntimeError("config file %r does not exist" % config_file) | ||
| 50 | 50 | | |||
| 51 | app.config.from_object(default_config_obj) | 51 | app.config.from_object(default_config_obj) | ||
| 52 | app.config.from_pyfile(config_file) | 52 | app.config.from_pyfile(config_file) | ||
| 53 | 53 | | |||
| 54 | if app.secret_key == 'not-really-a-secret': | 54 | if app.secret_key == 'not-really-a-secret': | ||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||