openSUSE: Open Build Service Artifacts
OBS is a generic system to build and distribute binary packages from sources [0], StarlingX OBS Project: - Cloud:StarlingX:2.0 [1] Build Service Management uses Open Build Service (OBS) with the following base artifacts under Service Management repository: - Specfiles - Changelogs - Rpmlintrcs The following components are included and succesfully building, (with their source OBS repository): - sm [2] - sm-common [3] - sm-db [4] - sm-api [5] - sm-client [6] - sm-tools [7] The following considerations are taken for Gerrit files: - Added %changelog directive to all specfiles The following considerations are taken for OBS _service files: - Added parameter "extract" to get spec, changes and rpmlintrc files. - All component version standardized to 1.0.0 [0] openbuildservice.org [1] https://build.opensuse.org/project/show/Cloud:StarlingX:2.0 [2] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm [3] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-common [4] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-db [5] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-api [6] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-client [7] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-tools Story: 2006508 Task: 36495 Task: 36496 Task: 36497 Task: 36498 Task: 36534 Task: 36794 Change-Id: I06a7e132de4892b846d99977ff1bfc5bf240ade4 Co-authored-by: Erich Cordoba <erich.cordoba.malibran@intel.com> Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
This commit is contained in:
parent
fc0828238f
commit
f38de3f45f
14
service-mgmt-api/opensuse/sm-api.changes
Normal file
14
service-mgmt-api/opensuse/sm-api.changes
Normal file
@ -0,0 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 05:22:50 UTC 2019 - Abraham Arce <abraham.arce.moreno@intel.com> - 3
|
||||
|
||||
- Move to _service to get source from git repo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 20 17:00:16 UTC 2019 - Marcela Rosales <marcelarosalesj@gmail.com> - 2
|
||||
|
||||
- Modify Requires: chkconfig is in aaa_base openSUSE package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 5 09:44:11 UTC 2019 - Marcela Rosales <marcelarosalesj@gmail.com> - 1
|
||||
|
||||
- Initial Commit.
|
1
service-mgmt-api/opensuse/sm-api.rpmlintrc
Normal file
1
service-mgmt-api/opensuse/sm-api.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
72
service-mgmt-api/opensuse/sm-api.spec
Normal file
72
service-mgmt-api/opensuse/sm-api.spec
Normal file
@ -0,0 +1,72 @@
|
||||
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
|
||||
# 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
|
9
service-mgmt-client/opensuse/sm-client.changes
Normal file
9
service-mgmt-client/opensuse/sm-client.changes
Normal file
@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 05:22:50 UTC 2019 - Abraham Arce <abraham.arce.moreno@intel.com> - 2
|
||||
|
||||
- Move to _service to get source from git repo
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 21 21:29:56 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 1
|
||||
|
||||
- First version of sm-client
|
1
service-mgmt-client/opensuse/sm-client.rpmlintrc
Normal file
1
service-mgmt-client/opensuse/sm-client.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
43
service-mgmt-client/opensuse/sm-client.spec
Normal file
43
service-mgmt-client/opensuse/sm-client.spec
Normal file
@ -0,0 +1,43 @@
|
||||
Summary: Service Management Client and CLI
|
||||
Name: sm-client
|
||||
Version: 1.0.0
|
||||
Release: 4
|
||||
BuildArch: noarch
|
||||
License: Apache-2.0
|
||||
Group: System/Base
|
||||
URL: https://www.starlingx.io
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
%define debug_package %{nil}
|
||||
|
||||
BuildRequires: python
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: fdupes
|
||||
Requires: python-six
|
||||
|
||||
%description
|
||||
Service Management Client and command line interface.
|
||||
|
||||
%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}/usr/bin
|
||||
ls %{_builddir}/
|
||||
install -m 755 %{_buildsubdir}/usr/bin/smc %{buildroot}/usr/bin
|
||||
%fdupes %{buildroot}/usr/lib/python2.7/site-packages/sm_client/
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir /usr/lib/python2.7/site-packages/sm_client
|
||||
/usr/lib/python2.7/site-packages/sm_client/*
|
||||
/usr/bin/smc
|
||||
%dir /usr/lib/python2.7/site-packages/sm_client-1.0.0-py2.7.egg-info
|
||||
/usr/lib/python2.7/site-packages/sm_client-1.0.0-py2.7.egg-info/*
|
||||
|
||||
%changelog
|
4
service-mgmt-tools/opensuse/sm-tools.changes
Normal file
4
service-mgmt-tools/opensuse/sm-tools.changes
Normal file
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 11 13:00:38 UTC 2019 - Abraham Arce <abraham.arce.moreno@intel.com> - 1
|
||||
|
||||
- Initial commit
|
1
service-mgmt-tools/opensuse/sm-tools.rpmlintrc
Normal file
1
service-mgmt-tools/opensuse/sm-tools.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
36
service-mgmt-tools/opensuse/sm-tools.spec
Normal file
36
service-mgmt-tools/opensuse/sm-tools.spec
Normal file
@ -0,0 +1,36 @@
|
||||
Summary: Service Management Tools
|
||||
Name: sm-tools
|
||||
Version: 1.0.0
|
||||
Release: 0
|
||||
License: Apache-2.0
|
||||
Group: Development/Tools/Other
|
||||
URL: https://opendev.org/starlingx/metal
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: python
|
||||
BuildRequires: python-pip
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
StarlingX Service Management Tools
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}/%{name}
|
||||
|
||||
%build
|
||||
python2 setup.py build
|
||||
|
||||
%install
|
||||
python2 setup.py install -O1 --skip-build --root %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%dir "%{_prefix}/lib/python2.7/site-packages/sm_tools"
|
||||
%{_prefix}/lib/python2.7/site-packages/sm_tools/*
|
||||
%dir "%{_prefix}/lib/python2.7/site-packages/sm_tools-1.0.0-py2.7.egg-info"
|
||||
%{_prefix}/lib/python2.7/site-packages/sm_tools-1.0.0-py2.7.egg-info/*
|
||||
%{_bindir}/*
|
||||
|
||||
%changelog
|
9
service-mgmt/sm-common/opensuse/sm-common.changes
Normal file
9
service-mgmt/sm-common/opensuse/sm-common.changes
Normal file
@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 22:03:54 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 2
|
||||
|
||||
- Adding _service and removing source code tarball.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 17 22:17:32 UTC 2019 - Erich Cordoba <erich.cm@gmail.com> - 1
|
||||
|
||||
- Adding first version of sm-common.
|
1
service-mgmt/sm-common/opensuse/sm-common.rpmlintrc
Normal file
1
service-mgmt/sm-common/opensuse/sm-common.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
139
service-mgmt/sm-common/opensuse/sm-common.spec
Normal file
139
service-mgmt/sm-common/opensuse/sm-common.spec
Normal file
@ -0,0 +1,139 @@
|
||||
Summary: Service Management Common
|
||||
Name: sm-common
|
||||
Version: 1.0.0
|
||||
Release: 1
|
||||
License: Apache-2.0
|
||||
Group: System/Base
|
||||
URL: https://www.starlingx.io
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: sqlite-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: util-linux
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: systemd-sysvinit
|
||||
BuildRequires: insserv-compat
|
||||
|
||||
Requires: libamon1
|
||||
Requires: /bin/sh
|
||||
Requires: sqlite
|
||||
Requires: util-linux
|
||||
Requires: systemd
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-devel
|
||||
Requires(post): systemd
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Service Managment Common
|
||||
|
||||
%package libs
|
||||
Summary: Service Management Common - shared library fles
|
||||
Group: System/Base
|
||||
|
||||
%description libs
|
||||
Service Managment Common This package contains shared libraries.
|
||||
|
||||
%package devel
|
||||
Summary: Service Management Common - Development files
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Service Managment Common This package contains symbolic links, header
|
||||
files, and related items necessary for software development.
|
||||
|
||||
%package -n sm-eru
|
||||
Summary: Service Management ERU
|
||||
Group: System/Base
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description -n sm-eru
|
||||
Service Managment ERU.
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
VER=%{version}
|
||||
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
MINOR=`echo $VER | awk -F . '{print $2}'`
|
||||
make VER=${VER} VER_MJR=$MAJOR %{?_smp_mflags}
|
||||
|
||||
%global _buildsubdir %{_builddir}/%{name}-%{version}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
VER=%{version}
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
MINOR=`echo $VER | awk -F . '{print $2}'`
|
||||
make DEST_DIR=%{buildroot} BIN_DIR=%{_bindir} UNIT_DIR=%{_unitdir} LIB_DIR=%{_libdir} INC_DIR=%{_includedir} BUILDSUBDIR=%{_buildsubdir} VER=$VER VER_MJR=$MAJOR install
|
||||
|
||||
%pre
|
||||
%service_add_pre sm-watchdog.service sm-watchdog.target
|
||||
|
||||
%preun
|
||||
%service_del_preun sm-watchdog.service sm-watchdog.target
|
||||
|
||||
%post
|
||||
%service_add_post sm-watchdog.service sm-watchdog.target
|
||||
/usr/bin/systemctl enable sm-watchdog.service
|
||||
|
||||
%postun
|
||||
%service_del_postun sm-watchdog.service sm-watchdog.target
|
||||
|
||||
%pre -n sm-eru
|
||||
%service_add_pre sm-eru.service sm-eru.target
|
||||
|
||||
%preun -n sm-eru
|
||||
%service_del_preun sm-eru.service sm-eru.target
|
||||
|
||||
%post -n sm-eru
|
||||
%service_add_post sm-eru.service sm-eru.target
|
||||
/usr/bin/systemctl enable sm-eru.service
|
||||
|
||||
%postun -n sm-eru
|
||||
%service_del_postun sm-eru.service sm-eru.target
|
||||
/usr/bin/systemctl disable sm-eru.service
|
||||
|
||||
%post -n sm-common-libs
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun -n sm-common-libs
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%defattr(-,root,root,-)
|
||||
%{_sysconfdir}/init.d/sm-watchdog
|
||||
%config %{_sysconfdir}/pmon.d/sm-watchdog.conf
|
||||
%{_bindir}/sm-watchdog
|
||||
%{_unitdir}/sm-watchdog.service
|
||||
|
||||
%files libs
|
||||
%{_libdir}/*.so.*
|
||||
%dir %{_sharedstatedir}/sm
|
||||
%dir %{_sharedstatedir}/sm/watchdog
|
||||
%dir %{_sharedstatedir}/sm/watchdog/modules
|
||||
%{_sharedstatedir}/sm/watchdog/modules/*.so.*
|
||||
|
||||
%files -n sm-eru
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sysconfdir}/init.d
|
||||
%dir %{_sysconfdir}/pmon.d
|
||||
%{_sysconfdir}/init.d/sm-eru
|
||||
%config %{_sysconfdir}/pmon.d/sm-eru.conf
|
||||
%{_bindir}/sm-eru
|
||||
%{_bindir}/sm-eru-dump
|
||||
%{_unitdir}/sm-eru.service
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/*
|
||||
%{_libdir}/*.so
|
||||
%{_sharedstatedir}/sm/watchdog/modules/libsm_watchdog_nfs.so
|
||||
|
||||
%changelog
|
9
service-mgmt/sm-db/opensuse/libsm_db1.changes
Normal file
9
service-mgmt/sm-db/opensuse/libsm_db1.changes
Normal file
@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 17:33:07 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 2
|
||||
|
||||
- Update tarball to match other ha/sm projects.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 21 20:02:52 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 1
|
||||
|
||||
- Adding first version for sm-db.
|
1
service-mgmt/sm-db/opensuse/libsm_db1.rpmlintrc
Normal file
1
service-mgmt/sm-db/opensuse/libsm_db1.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
70
service-mgmt/sm-db/opensuse/libsm_db1.spec
Normal file
70
service-mgmt/sm-db/opensuse/libsm_db1.spec
Normal file
@ -0,0 +1,70 @@
|
||||
Summary: Service Management Databases
|
||||
Name: libsm_db1
|
||||
Version: 1.0.0
|
||||
Release: 5
|
||||
License: Apache-2.0
|
||||
Group: System/Base
|
||||
URL: https://www.starlingx.io
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: sm-common-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: glibc
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libsqlite3-0
|
||||
BuildRequires: sqlite3
|
||||
|
||||
Requires: sqlite3
|
||||
|
||||
%description
|
||||
The StarlingX Service Managment Databases
|
||||
|
||||
%package devel
|
||||
Summary: Service Management Databases - Development files
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Service Managment Databases This package contains symbolic links, header
|
||||
files, and related items necessary for software development.
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
sqlite3 database/sm.db < database/create_sm_db.sql
|
||||
sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
|
||||
VER=%{version}
|
||||
export SUSE_ASNEEDED=0
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
make VER=${VER} VER_MJR=$MAJOR
|
||||
|
||||
%install
|
||||
VER=%{version}
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
make DEST_DIR=$RPM_BUILD_ROOT VER=$VER VER_MJR=$MAJOR install
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sharedstatedir}/sm/patches
|
||||
%{_libdir}/libsm_db.so.1
|
||||
%{_libdir}/libsm_db.so.1.0.0
|
||||
%config(noreplace) %{_sharedstatedir}/sm/sm.hb.db
|
||||
%config(noreplace) %{_sharedstatedir}/sm/sm.db
|
||||
%{_sharedstatedir}/sm/patches/sm-patch.sql
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libsm_db.so
|
||||
%{_includedir}/*.h
|
||||
|
||||
%changelog
|
19
service-mgmt/sm/opensuse/sm.changes
Normal file
19
service-mgmt/sm/opensuse/sm.changes
Normal file
@ -0,0 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 22:17:37 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 4
|
||||
|
||||
- Removing patches that were merged in source code.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 16 15:45:00 UTC 2019 - Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net> - 3
|
||||
|
||||
- move to _service to get source from git repo.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 03:23:14 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 2
|
||||
|
||||
- Add unmodified tarball and upstream packages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 17 17:35:48 UTC 2019 - Erich Cordoba <erich.cordoba.malibran@intel.com> - 1
|
||||
|
||||
- Initial commit for building sm in openSUSE.
|
1
service-mgmt/sm/opensuse/sm.rpmlintrc
Normal file
1
service-mgmt/sm/opensuse/sm.rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
setBadness('script-without-shebang', 2)
|
92
service-mgmt/sm/opensuse/sm.spec
Normal file
92
service-mgmt/sm/opensuse/sm.spec
Normal file
@ -0,0 +1,92 @@
|
||||
Summary: Service Management
|
||||
Name: sm
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
License: Apache-2.0
|
||||
Group: System/Base
|
||||
URL: https://www.starlingx.io
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
# Patches no applied to upstream yet.
|
||||
Patch0: 0001-Change-shebang-to-help-rpm-runtime-dependency-detect.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: fm-common-dev
|
||||
BuildRequires: libsm_db1-devel
|
||||
BuildRequires: sm-common-devel
|
||||
BuildRequires: mtce-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: glibc
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libjson-c3
|
||||
BuildRequires: libjson-c-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: systemd-sysvinit
|
||||
BuildRequires: insserv-compat
|
||||
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-devel
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
|
||||
# Needed for /etc/init.d, can be removed when we go fully systemd
|
||||
Requires: aaa_base
|
||||
# Needed for /etc/logrotate.d
|
||||
Requires: logrotate
|
||||
# for collect stuff
|
||||
Requires: time
|
||||
|
||||
|
||||
%description
|
||||
The StarlingX Service Managment system.
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
%patch0 -p3
|
||||
|
||||
%build
|
||||
VER=%{version}
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
make -j"%(nproc)"
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
VER=%{version}
|
||||
MAJOR=`echo $VER | awk -F . '{print $1}'`
|
||||
make DEST_DIR=%{buildroot} UNIT_DIR=%{_unitdir} install
|
||||
|
||||
%pre
|
||||
%service_add_pre sm.service
|
||||
%service_add_pre sm-shutdown.service
|
||||
|
||||
%preun
|
||||
%service_del_preun sm.service
|
||||
%service_del_preun sm-shutdown.service
|
||||
|
||||
%post
|
||||
%service_add_post sm.service
|
||||
%service_add_post sm-shutdown.service
|
||||
/usr/bin/systemctl enable sm.service >/dev/null 2>&1
|
||||
/usr/bin/systemctl enable sm-shutdown.service >/dev/null 2>&1
|
||||
|
||||
%postun
|
||||
%service_del_postun sm.service
|
||||
%service_del_postun sm-shutdown.service
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sysconfdir}/pmon.d
|
||||
%{_unitdir}/*
|
||||
%{_bindir}/sm
|
||||
/usr/local/sbin/sm-notify
|
||||
/usr/local/sbin/sm-troubleshoot
|
||||
/usr/local/sbin/sm-notification
|
||||
%{_sysconfdir}/init.d/sm
|
||||
%{_sysconfdir}/init.d/sm-shutdown
|
||||
%config %{_sysconfdir}/pmon.d/sm.conf
|
||||
%config %{_sysconfdir}/logrotate.d/sm.logrotate
|
||||
|
||||
%changelog
|
Loading…
x
Reference in New Issue
Block a user