From 59aa18cf5704529abbf3dd17700a8c6291eb09cd Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Tue, 11 Jun 2019 14:23:43 -0700 Subject: [PATCH] Add openSUSE spec files This commit adds the RPM specfile that supports openSUSE, these include the _service file which creates the tarball, the changes files and specfile itself. These are all built via the OpenBuildService (OBS) and can be found here: https://build.opensuse.org/project/show/Cloud:StarlingX:2.0 Change-Id: I676aae8cb9554eab2740232fd0dd77e0ed876506 Signed-off-by: Saul Wold --- fm-api/opensuse/_service | 16 +++ fm-api/opensuse/fm-api.changes | 9 ++ fm-api/opensuse/fm-api.spec | 63 ++++++++++ fm-common/opensuse/_service | 16 +++ fm-common/opensuse/fm-common.changes | 9 ++ fm-common/opensuse/fm-common.spec | 91 ++++++++++++++ fm-doc/opensuse/_service | 16 +++ fm-doc/opensuse/fm-doc.changes | 15 +++ fm-doc/opensuse/fm-doc.spec | 48 ++++++++ fm-mgr/opensuse/_service | 16 +++ fm-mgr/opensuse/fm-mgr.changes | 9 ++ fm-mgr/opensuse/fm-mgr.spec | 64 ++++++++++ fm-rest-api/opensuse/_service | 16 +++ fm-rest-api/opensuse/fm-rest-api.changes | 14 +++ fm-rest-api/opensuse/fm-rest-api.spec | 111 ++++++++++++++++++ python-fmclient/opensuse/_service | 16 +++ .../opensuse/python-fmclient.changes | 19 +++ python-fmclient/opensuse/python-fmclient.spec | 63 ++++++++++ snmp-audittrail/opensuse/_service | 16 +++ .../opensuse/snmp-audittrail.changes | 14 +++ snmp-audittrail/opensuse/snmp-audittrail.spec | 61 ++++++++++ snmp-ext/opensuse/_service | 16 +++ snmp-ext/opensuse/snmp-ext.changes | 9 ++ snmp-ext/opensuse/snmp-ext.spec | 67 +++++++++++ 24 files changed, 794 insertions(+) create mode 100644 fm-api/opensuse/_service create mode 100644 fm-api/opensuse/fm-api.changes create mode 100644 fm-api/opensuse/fm-api.spec create mode 100644 fm-common/opensuse/_service create mode 100644 fm-common/opensuse/fm-common.changes create mode 100644 fm-common/opensuse/fm-common.spec create mode 100644 fm-doc/opensuse/_service create mode 100644 fm-doc/opensuse/fm-doc.changes create mode 100644 fm-doc/opensuse/fm-doc.spec create mode 100644 fm-mgr/opensuse/_service create mode 100644 fm-mgr/opensuse/fm-mgr.changes create mode 100644 fm-mgr/opensuse/fm-mgr.spec create mode 100644 fm-rest-api/opensuse/_service create mode 100644 fm-rest-api/opensuse/fm-rest-api.changes create mode 100644 fm-rest-api/opensuse/fm-rest-api.spec create mode 100644 python-fmclient/opensuse/_service create mode 100644 python-fmclient/opensuse/python-fmclient.changes create mode 100644 python-fmclient/opensuse/python-fmclient.spec create mode 100644 snmp-audittrail/opensuse/_service create mode 100644 snmp-audittrail/opensuse/snmp-audittrail.changes create mode 100644 snmp-audittrail/opensuse/snmp-audittrail.spec create mode 100644 snmp-ext/opensuse/_service create mode 100644 snmp-ext/opensuse/snmp-ext.changes create mode 100644 snmp-ext/opensuse/snmp-ext.spec diff --git a/fm-api/opensuse/_service b/fm-api/opensuse/_service new file mode 100644 index 00000000..357a3581 --- /dev/null +++ b/fm-api/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + fm-api + fm-api + disable + + + xz + *.tar + + + + diff --git a/fm-api/opensuse/fm-api.changes b/fm-api/opensuse/fm-api.changes new file mode 100644 index 00000000..9392186e --- /dev/null +++ b/fm-api/opensuse/fm-api.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 10 22:44:40 UTC 2019 - sgw@linux.intel.com + +- Spec-cleaner and rpmlint cleanups + +------------------------------------------------------------------- +Thu May 23 18:44:35 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/fm-api/opensuse/fm-api.spec b/fm-api/opensuse/fm-api.spec new file mode 100644 index 00000000..dc321429 --- /dev/null +++ b/fm-api/opensuse/fm-api.spec @@ -0,0 +1,63 @@ +%define debug_package %{nil} +Name: fm-api +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: StarlingX Platform Fault Management Python API Package +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: python-setuptools +BuildRequires: python2-pip + +%description +StarlingX platform Fault Management Client Library that provides APIs +for applications to raise/clear/update active alarms. + +%package -n fm-api-doc +Summary: StarlingX fm-api deploy doc +Group: Documentation/Other + +%description -n fm-api-doc +Contains constants which is to be used by fm-doc package to validate +the Alarms & Logs Doc Yaml file + +%define pythonroot %{_libdir}/python2.7/site-packages +%define doc_deploy_dir /opt/deploy/cgcs_doc + +%prep +%autosetup + +%build +python setup.py build + +%install +python setup.py install --root=%{buildroot} \ + --install-lib=%{pythonroot} \ + --prefix=%{_prefix} \ + --install-data=%{_datadir} \ + --single-version-externally-managed + +DOC_DEPLOY=%{buildroot}/%{doc_deploy_dir} +install -d $DOC_DEPLOY +# install constants.py in DOC_DEPLOY_DIR +# used by fm-doc package to validate the Alarms & Logs Doc Yaml file +install -m 644 fm_api/constants.py $DOC_DEPLOY + +# Note: RPM package name is fm-api but import package name is fm_api so can't +# use '%%{name}'. +%files +%defattr(-,root,root,-) +%license LICENSE +%dir %{pythonroot}/fm_api +%{pythonroot}/fm_api/* +%dir %{pythonroot}/fm_api-%{version}.0-py2.7.egg-info +%{pythonroot}/fm_api-%{version}.0-py2.7.egg-info/* + +%files -n fm-api-doc +%defattr(-,root,root,-) +%dir /opt/deploy +%dir %{doc_deploy_dir} +%{doc_deploy_dir}/* + +%changelog diff --git a/fm-common/opensuse/_service b/fm-common/opensuse/_service new file mode 100644 index 00000000..bba7c3f7 --- /dev/null +++ b/fm-common/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + fm-common/sources + fm-common + disable + + + xz + *.tar + + + + diff --git a/fm-common/opensuse/fm-common.changes b/fm-common/opensuse/fm-common.changes new file mode 100644 index 00000000..09015e3b --- /dev/null +++ b/fm-common/opensuse/fm-common.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 10 20:57:42 UTC 2019 - sgw@linux.intel.com + +- Spec-cleaner and linted + +------------------------------------------------------------------- +Thu May 23 21:04:31 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/fm-common/opensuse/fm-common.spec b/fm-common/opensuse/fm-common.spec new file mode 100644 index 00000000..b6e70678 --- /dev/null +++ b/fm-common/opensuse/fm-common.spec @@ -0,0 +1,91 @@ +%define local_dir %{_prefix}/local +%define local_bindir %{local_dir}/bin +%define cgcs_doc_deploy_dir /opt/deploy/cgcs_doc +%define pythonroot %{_libdir}/python2.7/site-packages +Name: fm-common +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: StarlingX Platform Fault Management Common Package +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: libuuid-devel +BuildRequires: postgresql-devel +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: util-linux +%if 0%{?suse_version} +BuildRequires: gcc-c++ +%endif + +%package -n fm-common-devel +Summary: StarlingX Platform Fault Management Common Package - Development files +Requires: fm-common = %{version}-%{release} +Provides: fm-common-dev = %{version} +Obsoletes: fm-common-dev < %{version} + +%description +StarlingX Cloud platform Fault Management Client Library that provides APIs for +applications to raise/clear/update active alarms. + +%description -n fm-common-devel +StarlingX Cloud platform Fault Management Client Library that provides APIs for +applications to raise/clear/update active alarms. This package contains +symbolic links, header files, and related items necessary for software +development. + +%package -n fm-common-doc +Summary: StarlingX Fault Management deploy doc for fm-common + +%description -n fm-common-doc +Contains fmAlarm.h which is to be used by fm-doc package to validate +the Alarms & Logs Doc Yaml file + +%prep +%autosetup + +%build +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make MAJOR=$MAJOR MINOR=$MINOR %{?_smp_mflags} +python setup.py build +#%%xpy2_build_wheel + +%install +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make DESTDIR=%{buildroot} \ + BINDIR=%{local_bindir} \ + LIBDIR=%{_libdir} \ + INCDIR=%{_includedir} \ + CGCS_DOC_DEPLOY=%{cgcs_doc_deploy_dir} \ + MAJOR=$MAJOR MINOR=$MINOR install +python setup.py install --root=%{buildroot} \ + --install-lib=%{pythonroot} \ + --prefix=%{_prefix} \ + --install-data=%{_datadir} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%license LICENSE +%{local_bindir}/* +%{_libdir}/*.so.* + +%{pythonroot}/fm_core.so +%{pythonroot}/fm_core-*.egg-info + +%files -n fm-common-devel +%{_includedir}/* +%{_libdir}/*.so + +%files -n fm-common-doc +%dir /opt/deploy +%{cgcs_doc_deploy_dir} + +%changelog diff --git a/fm-doc/opensuse/_service b/fm-doc/opensuse/_service new file mode 100644 index 00000000..6e6efa67 --- /dev/null +++ b/fm-doc/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + fm-doc/fm_doc + fm-doc + disable + + + xz + *.tar + + + + diff --git a/fm-doc/opensuse/fm-doc.changes b/fm-doc/opensuse/fm-doc.changes new file mode 100644 index 00000000..7ef00792 --- /dev/null +++ b/fm-doc/opensuse/fm-doc.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Wed Jun 12 14:20:48 UTC 2019 - sgw@linux.intel.com + +- Tweak the _service file to use subdir + +------------------------------------------------------------------- +Wed Jun 12 00:59:08 UTC 2019 - sgw@linux.intel.com + +- Spec-clean and rpmlint checked + * added _service file to generate tarball automagically + +------------------------------------------------------------------- +Thu May 23 18:48:34 UTC 2019 - sgw@bigsur.com + +- Initial commit diff --git a/fm-doc/opensuse/fm-doc.spec b/fm-doc/opensuse/fm-doc.spec new file mode 100644 index 00000000..2c1dd4f9 --- /dev/null +++ b/fm-doc/opensuse/fm-doc.spec @@ -0,0 +1,48 @@ +%define cgcs_doc_deploy_dir /opt/deploy/cgcs_doc +Name: fm-doc +Version: 1.0 +Release: stx +Summary: StarlingX Platform Fault Management Documentation Package +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: fm-api-doc +BuildRequires: fm-common-doc +BuildRequires: python-yaml +BuildArch: noarch + +%description +A yaml file description of the StarlingX Alarms and Customer Logs generated by +the StarlingX Cloud System. Also included and used at build time is a simple syntax +checker to ensure no duplicate IDs are used, and generally the correct +field values are documented. + +%prep +%autosetup + +%build + +%install +CGCS_DOC_DEPLOY=%{buildroot}/%{cgcs_doc_deploy_dir} +install -d $CGCS_DOC_DEPLOY +install -D -d %{buildroot}/%{_sysconfdir}/fm/ +install -m 644 events.yaml %{buildroot}/%{_sysconfdir}/fm/ +install -m 644 events.yaml $CGCS_DOC_DEPLOY +install -m 755 checkEventYaml $CGCS_DOC_DEPLOY +install -m 644 parseEventYaml.py $CGCS_DOC_DEPLOY +install -m 755 check_missing_alarms.py $CGCS_DOC_DEPLOY +pushd $CGCS_DOC_DEPLOY +cp %{cgcs_doc_deploy_dir}/constants.py %{cgcs_doc_deploy_dir}/fmAlarm.h . +./checkEventYaml +rm constants.py* fmAlarm.h* +popd + +%files +%defattr(-,root,root,-) +%license LICENSE +%{cgcs_doc_deploy_dir}/* +%dir %{_sysconfdir}/fm +%config %{_sysconfdir}/fm/events.yaml + +%changelog diff --git a/fm-mgr/opensuse/_service b/fm-mgr/opensuse/_service new file mode 100644 index 00000000..c9e9a6bd --- /dev/null +++ b/fm-mgr/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + fm-mgr/sources + fm-mgr + disable + + + xz + *.tar + + + + diff --git a/fm-mgr/opensuse/fm-mgr.changes b/fm-mgr/opensuse/fm-mgr.changes new file mode 100644 index 00000000..530dab92 --- /dev/null +++ b/fm-mgr/opensuse/fm-mgr.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 10 22:53:44 UTC 2019 - sgw@linux.intel.com + +- Spec-cleaner and rpm-lint checked + +------------------------------------------------------------------- +Thu May 23 19:38:48 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/fm-mgr/opensuse/fm-mgr.spec b/fm-mgr/opensuse/fm-mgr.spec new file mode 100644 index 00000000..21592202 --- /dev/null +++ b/fm-mgr/opensuse/fm-mgr.spec @@ -0,0 +1,64 @@ +%define local_dir %{_prefix}/local +%define local_bindir %{local_dir}/bin +Name: fm-mgr +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: StarlingX Platform Fault Manager Package +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: fm-common-devel +BuildRequires: libuuid-devel +BuildRequires: systemd-devel +Requires: logrotate +%if 0%{?suse_version} +BuildRequires: gcc-c++ +%endif + +%description +StarlingX platform Fault Manager that serves the client +application fault management requests and raise/clear/update +alarms in the active alarm database. + +%prep +%autosetup + +%build +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make MAJOR=$MAJOR MINOR=$MINOR %{?_smp_mflags} + +%install +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make DESTDIR=%{buildroot} \ + BINDIR=%{local_bindir} \ + SYSCONFDIR=%{_sysconfdir} \ + UNITDIR=%{_unitdir} \ + MAJOR=$MAJOR MINOR=$MINOR \ + install + +%files +%defattr(-,root,root,-) +%license LICENSE +%{local_bindir}/fmManager +%_sysconfdir/init.d/fminit +%{_unitdir}/fminit.service +%config(noreplace) %{_sysconfdir}/logrotate.d/fm.logrotate + +%pre +%service_add_pre fminit.service fminit.target + +%post +%service_add_post fminit.service fminit.target + +%preun +%service_del_preun fminit.service fminit.target + +%postun +%service_del_postun fminit.service fminit.target + +%changelog diff --git a/fm-rest-api/opensuse/_service b/fm-rest-api/opensuse/_service new file mode 100644 index 00000000..7ba3c325 --- /dev/null +++ b/fm-rest-api/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + fm-rest-api/fm + fm-rest-api + disable + + + xz + *.tar + + + + diff --git a/fm-rest-api/opensuse/fm-rest-api.changes b/fm-rest-api/opensuse/fm-rest-api.changes new file mode 100644 index 00000000..f8725e61 --- /dev/null +++ b/fm-rest-api/opensuse/fm-rest-api.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Mon Jun 10 23:08:57 UTC 2019 - sgw@linux.intel.com + +- spec-clean and rpmlint checked + +------------------------------------------------------------------- +Wed May 29 16:31:06 UTC 2019 - sgw@bigsur.com + +- Clean up Spec file + +------------------------------------------------------------------- +Thu May 23 20:07:25 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/fm-rest-api/opensuse/fm-rest-api.spec b/fm-rest-api/opensuse/fm-rest-api.spec new file mode 100644 index 00000000..c4a2120a --- /dev/null +++ b/fm-rest-api/opensuse/fm-rest-api.spec @@ -0,0 +1,111 @@ +Name: fm-rest-api +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: Fault Management Openstack REST API +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: python2-oslo.config +BuildRequires: python-oslo.db +BuildRequires: python2-oslo.log +BuildRequires: python-oslo.messaging +BuildRequires: python-oslo.middleware +BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +BuildRequires: insserv-compat +Requires: python-eventlet +Requires: python-paste +Requires: python-webob +Requires: systemd + +%description +Fault Management Openstack REST API Service + +%define local_bindir %{_bindir} +%define local_initddir %{_sysconfdir}/rc.d/init.d +%define pythonroot %{_libdir}/python2.7/site-packages +%define local_etc_pmond %{_sysconfdir}/pmon.d/ +%define debug_package %{nil} + +%prep +%autosetup + +# Remove bundled egg-info +rm -rf *.egg-info + +%build +echo "Start build" + +export PBR_VERSION=%{version} +python setup.py build +PYTHONPATH=. oslo-config-generator --config-file=fm/config-generator.conf + +%install +echo "Start install" +export PBR_VERSION=%{version} +python setup.py install --root=%{buildroot} \ + --install-lib=%{pythonroot} \ + --prefix=%{_prefix} \ + --install-data=%{_datadir} \ + --single-version-externally-managed + +install -p -D -m 644 scripts/fm-api.service %{buildroot}%{_unitdir}/fm-api.service +install -D -d -m 755 %{buildroot}%{_sbindir} +ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcfm-api + +install -d -m 755 %{buildroot}%{local_initddir} +install -p -D -m 755 scripts/fm-api %{buildroot}%{local_initddir}/fm-rest-apid + +install -d -m 755 %{buildroot}%{local_etc_pmond} +install -p -D -m 644 fm-api-pmond.conf %{buildroot}%{local_etc_pmond}/fm-api.conf + +# Install sql migration stuff that wasn't installed by setup.py +install -m 640 fm/db/sqlalchemy/migrate_repo/migrate.cfg %{buildroot}%{pythonroot}/fm/db/sqlalchemy/migrate_repo/migrate.cfg + +# install default config files +oslo-config-generator --config-file fm/config-generator.conf --output-file %{_builddir}/fm.conf.sample +install -p -D -m 644 %{_builddir}/fm.conf.sample %{buildroot}%{_sysconfdir}/fm/fm.conf + +%files +%defattr(-,root,root,-) +%license LICENSE + +%{local_bindir}/* + +%dir %{_sysconfdir}/rc.d +%dir %{local_initddir} +%{local_initddir}/* + +%dir %{pythonroot}/fm +%{pythonroot}/fm/* + +%{pythonroot}/fm-%{version}*.egg-info + +%dir %{_sysconfdir}/fm +%config(noreplace) %{_sysconfdir}/fm/fm.conf + +# systemctl service files +%{_unitdir}/fm-api.service +%{_sbindir}/rcfm-api + +# pmond config file +%dir %{local_etc_pmond} +%config %{local_etc_pmond}/fm-api.conf + +%pre +%service_add_pre fm-api.service fm-api.target + +%post +/bin/systemctl enable fm-api.service >/dev/null 2>&1 +%service_add_post fm-api.service fm-api.target + +%preun +%service_del_preun fm-api.service fm-api.target + +%postun +%service_del_postun fm-api.service fm-api.target + +%changelog diff --git a/python-fmclient/opensuse/_service b/python-fmclient/opensuse/_service new file mode 100644 index 00000000..609a07f2 --- /dev/null +++ b/python-fmclient/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + python-fmclient/fmclient + python-fmclient + disable + + + xz + *.tar + + + + diff --git a/python-fmclient/opensuse/python-fmclient.changes b/python-fmclient/opensuse/python-fmclient.changes new file mode 100644 index 00000000..94637988 --- /dev/null +++ b/python-fmclient/opensuse/python-fmclient.changes @@ -0,0 +1,19 @@ +------------------------------------------------------------------- +Mon Jun 10 23:19:41 UTC 2019 - sgw@linux.intel.com + +- spec-cleaner and rpmlint checked + +------------------------------------------------------------------- +Mon Jun 10 23:16:47 UTC 2019 - sgw@linux.intel.com + +- spec-cleaner and rpmlint checked + +------------------------------------------------------------------- +Thu May 30 18:07:16 UTC 2019 - sgw@bigsur.com + +- Fix python-oslo package names + +------------------------------------------------------------------- +Thu May 23 20:28:42 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/python-fmclient/opensuse/python-fmclient.spec b/python-fmclient/opensuse/python-fmclient.spec new file mode 100644 index 00000000..d2f9cfd1 --- /dev/null +++ b/python-fmclient/opensuse/python-fmclient.spec @@ -0,0 +1,63 @@ +# +# spec file for package python +# +# + + +%global pypi_name fmclient +Name: python-%{pypi_name} +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: A python client library for Fault Management +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: git +BuildRequires: python-setuptools +BuildRequires: python2-pbr +BuildRequires: python3-pbr +Requires: bash-completion +Requires: python-keystoneauth1 >= 3.1.0 +Requires: python-oslo.i18n >= 2.1.0 +Requires: python-oslo.utils >= 3.20.0 +Requires: python-pbr >= 2.0.0 +Requires: python-requests +Requires: python-six >= 1.9.0 + +%description +A python client library for StarlingX Fault Management service + +%define local_etc_bash_completiond %{_sysconfdir}/bash_completion.d/ +%define pythonroot %{_libdir}/python2.7/site-packages +%define debug_package %{nil} + +%prep +%autosetup + +# Remove bundled egg-info +rm -rf *.egg-info + +%build +export PBR_VERSION=%{version} +python setup.py build + +%install +export PBR_VERSION=%{version} +python setup.py install --root=%{buildroot} \ + --install-lib=%{pythonroot} \ + --prefix=%{_prefix} \ + --install-data=%{_datadir} \ + --single-version-externally-managed + +install -d -m 755 %{buildroot}%{local_etc_bash_completiond} +install -p -D -m 664 tools/fm.bash_completion %{buildroot}%{local_etc_bash_completiond}/fm.bash_completion + +%files +%license LICENSE +%{_bindir}/* +%config %{local_etc_bash_completiond}/* +%{pythonroot}/%{pypi_name} +%{pythonroot}/%{pypi_name}-%{version}*.egg-info + +%changelog diff --git a/snmp-audittrail/opensuse/_service b/snmp-audittrail/opensuse/_service new file mode 100644 index 00000000..c493510f --- /dev/null +++ b/snmp-audittrail/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + snmp-audittrail/sources + snmp-audittrail + disable + + + xz + *.tar + + + + diff --git a/snmp-audittrail/opensuse/snmp-audittrail.changes b/snmp-audittrail/opensuse/snmp-audittrail.changes new file mode 100644 index 00000000..3ebfe4f3 --- /dev/null +++ b/snmp-audittrail/opensuse/snmp-audittrail.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Thu Jun 13 20:56:01 UTC 2019 - sgw@linux.intel.com + +- convert from tarball to _service file + +------------------------------------------------------------------- +Mon Jun 10 23:21:36 UTC 2019 - sgw@linux.intel.com + +- spec-cleaner and rpmlint checked + +------------------------------------------------------------------- +Thu May 23 20:39:25 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/snmp-audittrail/opensuse/snmp-audittrail.spec b/snmp-audittrail/opensuse/snmp-audittrail.spec new file mode 100644 index 00000000..739dbd12 --- /dev/null +++ b/snmp-audittrail/opensuse/snmp-audittrail.spec @@ -0,0 +1,61 @@ +Name: snmp-audittrail +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: StarlingX SNMP Audit Trail +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: fm-common-devel +BuildRequires: libuuid-devel +BuildRequires: net-snmp-devel +BuildRequires: uuid-devel +Requires: net-snmp +Requires: uuid +%if 0%{?suse_version} +BuildRequires: gcc-c++ +%endif + +%description +StarlingX SNMP Audit Trail provides audit trail support for incoming +SNMP requests. + +%package -n snmp-audittrail-devel +Summary: StarlingX SNMP Audit Trail Package - Development files +Group: Development/Tools/Other +Requires: snmp-audittrail = %{version}-%{release} + +%description -n snmp-audittrail-devel +StarlingX SNMP Audit Trail provides audit trail support for incoming SNMP requests. +This package contains symbolic links, header files, and related items necessary +for software development. + +%prep +%autosetup + +%build +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make MAJOR=$MAJOR MINOR=$MINOR PATCH=%{tis_patch_ver} %{?_smp_mflags} + +%install +VER=%{version} +MAJOR=`echo $VER | awk -F . '{print $1}'` +MINOR=`echo $VER | awk -F . '{print $2}'` +make install DESTDIR=%{buildroot} LIB_DIR=%{_libdir} MAJOR=$MAJOR MINOR=$MINOR PATCH=%{tis_patch_ver} + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%license LICENSE +%{_libdir}/*.so.* + +%files -n snmp-audittrail-devel +%defattr(-,root,root,-) +%{_libdir}/*.so + +%changelog diff --git a/snmp-ext/opensuse/_service b/snmp-ext/opensuse/_service new file mode 100644 index 00000000..d8b92713 --- /dev/null +++ b/snmp-ext/opensuse/_service @@ -0,0 +1,16 @@ + + + git + https://opendev.org/starlingx/fault + 1.0 + snmp-ext/sources + snmp-ext + disable + + + xz + *.tar + + + + diff --git a/snmp-ext/opensuse/snmp-ext.changes b/snmp-ext/opensuse/snmp-ext.changes new file mode 100644 index 00000000..2bb92135 --- /dev/null +++ b/snmp-ext/opensuse/snmp-ext.changes @@ -0,0 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 10 23:47:39 UTC 2019 - sgw@linux.intel.com + +- spec-cleaner and rpmlint checked + +------------------------------------------------------------------- +Thu May 23 21:03:10 UTC 2019 - sgw@bigsur.com + +- Initial Commit diff --git a/snmp-ext/opensuse/snmp-ext.spec b/snmp-ext/opensuse/snmp-ext.spec new file mode 100644 index 00000000..6f4d7ac6 --- /dev/null +++ b/snmp-ext/opensuse/snmp-ext.spec @@ -0,0 +1,67 @@ +%define mib_ver 2.0 +Name: snmp-ext +Version: 1.0 +Release: %{tis_patch_ver}%{?_tis_dist} +Summary: StarlingX Platform SNMP extension Package +License: Apache-2.0 +Group: Development/Tools/Other +URL: https://opendev.org/starlingx/fault +Source0: %{name}-%{version}.tar.xz +BuildRequires: fm-common-devel +BuildRequires: libuuid-devel +BuildRequires: net-snmp-devel +Requires: fm-common +Requires: net-snmp +%if 0%{?suse_version} +BuildRequires: gcc-c++ +%endif + +%description +StarlingX Cloud platform SNMP extension provides Wind River enterprise MIBs support +and it serves as SNMP based alarm surveillance module for Network Manager +System. + +%package -n snmp-ext-devel +Summary: StarlingX Cloud Platform SNMP extension Package - Development files +Group: Development/Tools/Other +Requires: snmp-ext = %{version}-%{release} + +%description -n snmp-ext-devel +StarlingX Cloud platform SNMP extension provides Wind River enterprise MIBs support +and it serves as SNMP based alarm surveillance module for Network Manager +System. This package contains symbolic links, header files, and related +items necessary for software development. + +%prep +%autosetup + +%build +MAJOR=`echo %{version} | awk -F . '{print $1}'` +MINOR=`echo %{version} | awk -F . '{print $2}'` +make MAJOR=$MAJOR MINOR=$MINOR PATCH=%{tis_patch_ver} %{?_smp_mflags} + +%install +MAJOR=`echo %{version} | awk -F . '{print $1}'` +MINOR=`echo %{version} | awk -F . '{print $2}'` +make DEST_DIR=%{buildroot} \ + LIB_DIR=%{_libdir} \ + MAJOR=$MAJOR \ + MINOR=$MINOR \ + MIBVER=%{mib_ver} \ + PATCH=%{tis_patch_ver} install + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%license LICENSE +%{_libdir}/*.so.* +%{_datadir}/snmp/mibs/* + +%files -n snmp-ext-devel +%defattr(-,root,root,-) +%{_libdir}/*.so + +%changelog