Refactor on nova-api-proxy.spec for opensuse
There were some issues in the nova-api-proxy specfile for opensuse, like unneeded variable definitions and missing configuration lines. This patch address those problems. Story: 2006508 Task: 36908 Change-Id: Ia82f7ce8ba2f975aafb544100a037e3451dde124 Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
parent
6578b7a3b1
commit
3c88b33763
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 3 17:24:23 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> 1.0.0-1
|
||||
|
||||
- Refactor on spec file to remove unneeded lines.
|
||||
- The %pre/%post sections were added.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 17 06:45:00 UTC 2019 - Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net>
|
||||
|
||||
|
@ -9,18 +9,17 @@ Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-pip
|
||||
Requires: python-eventlet
|
||||
Requires: python2-Routes
|
||||
Requires: python-webob
|
||||
Requires: python-paste
|
||||
BuildRequires: fdupes
|
||||
|
||||
%description
|
||||
The Nova Compute API Proxy
|
||||
|
||||
%define local_bindir %{_bindir}
|
||||
%define local_initddir %{_sysconfdir}/rc.d/init.d
|
||||
%define pythonroot %{_libdir}/python2.7/site-packages
|
||||
%define local_etc_systemd %{_sysconfdir}/systemd/system/
|
||||
@ -33,44 +32,60 @@ The Nova Compute API Proxy
|
||||
%{__python} setup.py build
|
||||
|
||||
%install
|
||||
%{__python} setup.py install --root=$RPM_BUILD_ROOT \
|
||||
%{__python} setup.py install --root=%{buildroot} \
|
||||
--install-lib=%{pythonroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--install-data=%{_prefix}/share \
|
||||
--single-version-externally-managed
|
||||
|
||||
install -d -m 755 %{buildroot}%{local_etc_systemd}
|
||||
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service %{buildroot}%{local_etc_systemd}/api-proxy.service
|
||||
install -d -m 755 %{buildroot}%{local_initddir}
|
||||
install -p -D -m 755 nova_api_proxy/scripts/api-proxy %{buildroot}%{local_initddir}/api-proxy
|
||||
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||
install -d -m 755 %{buildroot}%{local_proxy_conf}
|
||||
install -p -D -m 600 nova_api_proxy/nova-api-proxy.conf %{buildroot}%{local_proxy_conf}/nova-api-proxy.conf
|
||||
install -p -D -m 600 nova_api_proxy/api-proxy-paste.ini %{buildroot}%{local_proxy_conf}/api-proxy-paste.ini
|
||||
|
||||
install -p -D -m 644 nova_api_proxy/scripts/api-proxy.service \
|
||||
%{buildroot}%{_unitdir}/api-proxy.service
|
||||
install -p -D -m 755 nova_api_proxy/scripts/api-proxy \
|
||||
%{buildroot}%{_sysconfdir}/rc.d/init.d/api-proxy
|
||||
install -p -D -m 600 nova_api_proxy/nova-api-proxy.conf \
|
||||
%{buildroot}%{local_proxy_conf}/nova-api-proxy.conf
|
||||
install -p -D -m 600 nova_api_proxy/api-proxy-paste.ini \
|
||||
%{buildroot}%{local_proxy_conf}/api-proxy-paste.ini
|
||||
|
||||
%fdupes %{buildroot}%{pythonroot}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
%service_add_pre api-proxy.service
|
||||
|
||||
%preun
|
||||
%service_del_preun api-proxy.service
|
||||
|
||||
%post
|
||||
%service_add_post api-proxy.service
|
||||
%set_permissions %{pythonroot}/nova_api_proxy/api_proxy.py
|
||||
|
||||
%postun
|
||||
%service_del_postun api-proxy.service
|
||||
|
||||
# Note: Package name is nova-api-proxy but import is nova_api_proxy so can't
|
||||
# use '%%{name}'.
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sysconfdir}/proxy
|
||||
%dir %{_sysconfdir}/rc.d
|
||||
%dir %{_sysconfdir}/rc.d/init.d
|
||||
%dir %{_sysconfdir}/systemd
|
||||
%dir %{_sysconfdir}/systemd/system
|
||||
%dir %{_libdir}/python2.7/site-packages/api_proxy-1.0.0-py2.7.egg-info
|
||||
%doc LICENSE
|
||||
%{local_bindir}/*
|
||||
%{local_initddir}/*
|
||||
%{local_etc_systemd}/*
|
||||
%config(noreplace) %{local_proxy_conf}/nova-api-proxy.conf
|
||||
%{local_proxy_conf}/api-proxy-paste.ini
|
||||
%dir %{_sysconfdir}/proxy
|
||||
%dir %{pythonroot}/api_proxy-%{version}-py2.7.egg-info
|
||||
%dir %{pythonroot}/nova_api_proxy
|
||||
|
||||
%{_bindir}/nova-api-proxy
|
||||
%{_unitdir}/api-proxy.service
|
||||
%{_sysconfdir}/rc.d/init.d/api-proxy
|
||||
%{pythonroot}/nova_api_proxy/*
|
||||
%{pythonroot}/api_proxy-%{version}-py2.7.egg-info/*
|
||||
%config(noreplace) %{_sysconfdir}/proxy/nova-api-proxy.conf
|
||||
%config %{_sysconfdir}/proxy/api-proxy-paste.ini
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user