From 39121ea596ec8137f2d56b8a35ebba73feb6b5c8 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Fri, 20 Oct 2017 10:07:03 -0400 Subject: [PATCH 1/1] panko config --- SOURCES/panko-dist.conf | 2 +- SPECS/openstack-panko.spec | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 SOURCES/panko-expirer-active diff --git a/SOURCES/panko-dist.conf b/SOURCES/panko-dist.conf index c33a2ee..ac6f79f 100644 --- a/SOURCES/panko-dist.conf +++ b/SOURCES/panko-dist.conf @@ -1,4 +1,4 @@ [DEFAULT] -log_dir = /var/log/panko +#log_dir = /var/log/panko use_stderr = False diff --git a/SPECS/openstack-panko.spec b/SPECS/openstack-panko.spec index d12da57..90471d9 100644 --- a/SPECS/openstack-panko.spec +++ b/SPECS/openstack-panko.spec @@ -4,20 +4,27 @@ Name: openstack-panko Version: 3.0.0 -Release: 1%{?dist} +Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Panko provides Event storage and REST API License: ASL 2.0 URL: http://github.com/openstack/panko Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz Source1: %{pypi_name}-dist.conf Source2: %{pypi_name}.logrotate + +# WRS: Include patches here +Patch1: 0001-modify-panko-api.patch +Patch2: 0002-Change-event-list-descending.patch +Patch3: 0003-Fix-event-query-to-sqlalchemy-with-non-admin-user.patch + BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python-pbr BuildRequires: python2-devel BuildRequires: openstack-macros +BuildRequires: python-tenacity >= 3.1.0 %description HTTP API to store events. @@ -116,6 +123,11 @@ This package contains documentation files for panko. %prep %setup -q -n %{pypi_name}-%{upstream_version} +# WRS: Apply patches here +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + find . \( -name .gitignore -o -name .placeholder \) -delete find panko -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} + @@ -158,6 +170,8 @@ mkdir -p %{buildroot}/%{_var}/log/%{name} install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/panko/panko-dist.conf install -p -D -m 640 etc/panko/panko.conf %{buildroot}%{_sysconfdir}/panko/panko.conf install -p -D -m 640 etc/panko/api_paste.ini %{buildroot}%{_sysconfdir}/panko/api_paste.ini +# WRS +install -p -D -m 640 panko/api/panko-api.py %{buildroot}%{_datadir}/panko/panko-api.py #TODO(prad): build the docs at run time, once the we get rid of postgres setup dependency @@ -201,14 +215,15 @@ exit 0 %{_bindir}/panko-api %{_bindir}/panko-dbsync %{_bindir}/panko-expirer %files common %dir %{_sysconfdir}/panko +%{_datadir}/panko/panko-api.* %attr(-, root, panko) %{_datadir}/panko/panko-dist.conf %config(noreplace) %attr(-, root, panko) %{_sysconfdir}/panko/policy.json %config(noreplace) %attr(-, root, panko) %{_sysconfdir}/panko/panko.conf %config(noreplace) %attr(-, root, panko) %{_sysconfdir}/panko/api_paste.ini %config(noreplace) %attr(-, root, panko) %{_sysconfdir}/logrotate.d/%{name} %dir %attr(0755, panko, root) %{_localstatedir}/log/panko %defattr(-, panko, panko, -) -- 1.8.3.1