03b3f990ea
Resolve runtime dependencies for the following service manager components: - sm-client - sm-tools - sm-api High availability OBS workspace has been moved to xe1gyq home project [0], adding repository Cloud_StarlingX_2.0_openSUSE_Leap_15.1 [1] in order to: - allow all succesfull packages appear under xe1gyq repository [2]. - automatically include other flock dependencies (e.g. mtce-devel). Refer to the following OBS workspaces to verify all service management packages have built successfully under repository Cloud_StarlingX_2.0_openSUSE_Leap_15.1: - https://build.opensuse.org/package/show/home:xe1gyq/sm-db - https://build.opensuse.org/package/show/home:xe1gyq/sm-common - https://build.opensuse.org/package/show/home:xe1gyq/sm - https://build.opensuse.org/package/show/home:xe1gyq/sm-client - https://build.opensuse.org/package/show/home:xe1gyq/sm-tools - https://build.opensuse.org/package/show/home:xe1gyq/sm-api [0] https://build.opensuse.org/project/show/home:xe1gyq [1] https://build.opensuse.org/repositories/home:xe1gyq [2] https://download.opensuse.org/repositories/home:/xe1gyq/ Depends-On: https://review.opendev.org/#/c/679686 Story: 2006684 Task: 36968 Task: 36969 Task: 36970 Change-Id: I0a21652fff83b5da8acdfb0191df87165b88389e Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
76 lines
2.3 KiB
RPMSpec
76 lines
2.3 KiB
RPMSpec
Summary: Service Management API
|
|
Name: sm-api
|
|
Version: 1.0.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: System/Packages
|
|
URL: https://opendev.org/starlingx/ha/
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
%define debug_package %{nil}
|
|
|
|
BuildRequires: python
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: python2-pip
|
|
BuildRequires: util-linux
|
|
# BuildRequires systemd is to get %%_unitdir I think
|
|
BuildRequires: systemd
|
|
BuildRequires: systemd-devel
|
|
%if 0%{?suse_version}
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: systemd-sysvinit
|
|
BuildRequires: insserv-compat
|
|
%endif
|
|
Requires: python2-six
|
|
Requires: python-eventlet
|
|
Requires: python-pecan
|
|
Requires: python-keystonemiddleware
|
|
# Needed for %%{_sysconfdir}/init.d, can be removed when we go fully systemd
|
|
Requires: aaa_base
|
|
# Needed for %%{_sysconfdir}/pmon.d
|
|
Requires: libamon1
|
|
|
|
%description
|
|
The Service Management API
|
|
|
|
%prep
|
|
%setup -n %{name}-%{version}/%{name}
|
|
|
|
%build
|
|
%{__python2} setup.py build
|
|
|
|
%install
|
|
%global _buildsubdir %{_builddir}/%{name}-%{version}/%{name}
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
install -d %{buildroot}%{_sysconfdir}/sm
|
|
install -d %{buildroot}%{_sysconfdir}/init.d
|
|
install -d %{buildroot}%{_sysconfdir}/pmon.d
|
|
install -d %{buildroot}%{_sysconfdir}/sm-api
|
|
install -d %{buildroot}%{_unitdir}
|
|
install -m 644 %{_buildsubdir}/scripts/sm_api.ini %{buildroot}%{_sysconfdir}/sm
|
|
install -m 755 %{_buildsubdir}/scripts/sm-api %{buildroot}%{_sysconfdir}/init.d
|
|
install -m 644 %{_buildsubdir}/scripts/sm-api.service %{buildroot}%{_unitdir}
|
|
install -m 644 %{_buildsubdir}/scripts/sm-api.conf %{buildroot}%{_sysconfdir}/pmon.d
|
|
install -m 644 %{_buildsubdir}%{_sysconfdir}/sm-api/policy.json %{buildroot}%{_sysconfdir}/sm-api
|
|
|
|
%post
|
|
%{_bindir}/systemctl enable sm-api.service >/dev/null 2>&1
|
|
|
|
%files
|
|
%dir %{_sysconfdir}/pmon.d
|
|
%dir %{_sysconfdir}/sm-api
|
|
%defattr(-,root,root,-)
|
|
%dir "%{_prefix}/lib/python2.7/site-packages/sm_api"
|
|
%{_prefix}/lib/python2.7/site-packages/sm_api/*
|
|
%dir "%{_prefix}/lib/python2.7/site-packages/sm_api-1.0.0-py2.7.egg-info"
|
|
%{_prefix}/lib/python2.7/site-packages/sm_api-1.0.0-py2.7.egg-info/*
|
|
"%{_bindir}/sm-api"
|
|
%dir "%{_sysconfdir}/sm"
|
|
"%{_sysconfdir}/init.d/sm-api"
|
|
"%{_sysconfdir}/pmon.d/sm-api.conf"
|
|
"%{_sysconfdir}/sm-api/policy.json"
|
|
"%{_sysconfdir}/sm/sm_api.ini"
|
|
%{_unitdir}/*
|
|
|
|
%changelog
|