Sync from SUSE:SLFO:Main opa-fm revision 5522972e13c64b40d5355e00b5c6b2f6

This commit is contained in:
Adrian Schröter 2024-05-03 17:25:13 +02:00
commit 31f7d04047
10 changed files with 537 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

18
_service Normal file
View File

@ -0,0 +1,18 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/01org/opa-fm.git</param>
<param name="package-meta">no</param>
<param name="exclude">.git</param>
<param name="filename">opa-fm</param>
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.%h</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="revision">6f1eb4579fc975a1e9e7f669a8afbf6569d09dd3</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">opa-fm*.tar</param>
<param name="compression">gz</param>
</service>
</services>

BIN
opa-fm-10.12.1.0.6.0.6f1eb4579fc9.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,32 @@
commit 59fad9979cb0a07959f1eb2b5302c5c1748481c0
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Fri Sep 30 15:34:28 2022 +0200
opa-fm Fallback to custom vendor if os_vendor fails
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git MakeTools/funcs-ext.sh MakeTools/funcs-ext.sh
index 16683d80bfa9..5cdd9021bc2d 100755
--- MakeTools/funcs-ext.sh
+++ MakeTools/funcs-ext.sh
@@ -716,6 +716,9 @@ function os_vendor()
rhel)
rval=redhat
;;
+ opensuse-*)
+ rval=SuSE
+ ;;
sles)
rval=SuSE
;;
@@ -745,6 +748,9 @@ function os_vendor()
if [ ${#filelist[@]} -eq 0 ] && [ -f /etc/lsb-release ]; then
rval=$(cat /etc/lsb-release | egrep DISTRIB_ID | cut -d'=' -f2 | tr '[:upper:]' '[:lower:]')
fi
+ if [ "$rval" == "" ]; then
+ rval="custom"
+ fi
for file in $filelist
do
if [ -f $file ]

View File

@ -0,0 +1,42 @@
commit b869788ff034572e7059192ec1378cb567817827
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Fri Sep 6 15:36:15 2019 +0200
opa-fm: force code symbols to be loaded
When compiling with LTO, function like GetCodeInternalVersion might be dropped
from the binary causing patch_version and the whole build to fail.
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git CodeVersion/code_version.c CodeVersion/code_version.c
index c8b77b41e86b..5cb90edd484a 100644
--- CodeVersion/code_version.c
+++ CodeVersion/code_version.c
@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// or the internal whatversion tool
//
#define ICS_BUILD_VERSION "THIS_IS_THE_ICS_VERSION_NUMBER:@(#)000.000.000.000B000"
-const char* GetCodeVersion(void)
+const char* __attribute__((used)) GetCodeVersion(void)
{
static const char* BuildVersion=ICS_BUILD_VERSION;
static char* version;
@@ -83,7 +83,7 @@ const char* GetCodeVersion(void)
// or the internal whatversion tool
//
#define ICS_BUILD_INTERNAL_VERSION "THIS_IS_THE_ICS_INTERNAL_VERSION_NUMBER:@(#)000.000.000.000B000I0000"
-const char* GetCodeInternalVersion(void)
+const char* __attribute__((used)) GetCodeInternalVersion(void)
{
static const char* BuildVersion=ICS_BUILD_INTERNAL_VERSION;
static char* version;
@@ -112,7 +112,7 @@ const char* GetCodeInternalVersion(void)
// or the internal whatversion tool
//
#define ICS_BUILD_BRAND "THIS_IS_THE_ICS_BRAND:Intel\000 "
-const char* GetCodeBrand(void)
+const char* __attribute__((used)) GetCodeBrand(void)
{
static const char* BuildBrand=ICS_BUILD_BRAND;
static char* brand;

View File

@ -0,0 +1,31 @@
commit 9ee6db9866c42c00cd1f15c0a1f68f5d1a6c933d
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Tue Nov 2 16:20:47 2021 +0100
opa-fm: harden systemd service
Fixes: bsc#1181400
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
diff --git Esm/ib/src/linux/startup/opafm.service Esm/ib/src/linux/startup/opafm.service
index d4c40b0675e1..3bf5568f9ebf 100755
--- Esm/ib/src/linux/startup/opafm.service
+++ Esm/ib/src/linux/startup/opafm.service
@@ -34,6 +34,17 @@ Description=OPA Fabric Manager
After=rdma.service network.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+ProtectHostname=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
User=root
Type=forking
ExecStart=/usr/lib/opa-fm/bin/opafmd -D

1
opa-fm-rpmlintrc Normal file
View File

@ -0,0 +1 @@
addFilter("suse-filelist-forbidden-sysconfig")

View File

@ -0,0 +1,33 @@
commit 925cdfe3fa7d06d7264782cc44fdf718170a47e7
Author: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
Date: Mon Aug 28 14:06:36 2017 +0200
opa-fm use RPM_OPT_FLAGS
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
diff --git Esm/Makerules.project Esm/Makerules.project
index c3883708f1e0..58d74651b557 100755
--- Esm/Makerules.project
+++ Esm/Makerules.project
@@ -124,6 +124,7 @@ BSCPROJ =
CPROJ = -DPRODUCT=$(PRODUCT) -DPRODUCT_$(PRODUCT) -DMODULEVERSION=$(MODULEVERSION)
# include buildFeatureDefs to let inplace build work for stream consistency
CPROJ += -include $(TL_DIR)/Fd/buildFeatureDefs
+CPROJ += $(RPM_OPT_FLAGS)
ifeq ($(IB_STACK),OPENIB)
CPROJ += -DIB_STACK_OPENIB
else
diff --git MakeTools/patch_version/Makefile MakeTools/patch_version/Makefile
index de6338cb2210..2b7abdeeabfe 100755
--- MakeTools/patch_version/Makefile
+++ MakeTools/patch_version/Makefile
@@ -126,7 +126,7 @@ include $(TL_DIR)/$(PROJ_FILE_DIR)/Makerules.project
# (Windows Only)
#=============================================================================#
# override use of patch_engineer_version to avoid error
-CPROJ=
+CPROJ= $(RPM_OPT_FLAGS)
#=============================================================================#
# Rules:

206
opa-fm.changes Normal file
View File

@ -0,0 +1,206 @@
-------------------------------------------------------------------
Tue Jul 25 13:00:25 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>
- Update to 10.12.1.0.6
- No changelog available
-------------------------------------------------------------------
Fri Sep 30 13:28:47 UTC 2022 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to 10.11.2.0.3
- No changelog available
- Refresh opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch against latest sources
- Add opa-fm-force-code-symbols-to-be-loaded.patch to fix issues with LTO
-------------------------------------------------------------------
Mon Nov 15 19:07:26 UTC 2021 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to 10.11.0.2.1 (jsc#SLE-20578)
- gcc11 fixes
- Drop patches merged upstream:
- opa-fm-force-code-symbols-to-be-loaded.patch
- opa-fm-fix-multiple-definitions.patch
-------------------------------------------------------------------
Fri Oct 15 07:25:35 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
- Added hardening to systemd service(s) (bsc#1181400). Added patch(es):
* opa-fm-harden-systemd-service.patch
-------------------------------------------------------------------
Wed Apr 28 10:30:16 UTC 2021 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to v10.11.0.0.574
- No changelog available
-------------------------------------------------------------------
Wed Jul 22 15:39:54 UTC 2020 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to v10.10.3.0.11
- No changelog available
-------------------------------------------------------------------
Sun Jun 7 14:48:12 UTC 2020 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to v10.10.1
- No changelog available
- Add opa-fm-fix-multiple-definitions.patch to fix compatibility with GCC10
-------------------------------------------------------------------
Thu Sep 26 11:07:49 UTC 2019 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to v10.9.3.1.1
- No changelog available
-------------------------------------------------------------------
Thu Sep 5 11:55:47 UTC 2019 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Update to v10.9.2.2.1
* No changelog available
- Drop reproducible.patch as it was fixed upstream
- Mark LICENSE with %license
- Remove infiniband-diags-devel dependency as it is now provided by rdma-core-devel
- Add opa-fm-force-code-symbols-to-be-loaded.patch to fix around missing
symbol for version patching when LTO is enabled
-------------------------------------------------------------------
Mon Oct 15 07:39:46 UTC 2018 - nmoreychaisemartin@suse.com
- Update to v10.8.0.0.202 (fate#325858)
* No changelog available
-------------------------------------------------------------------
Sat Jul 14 06:14:17 UTC 2018 - bwiedemann@suse.com
- Add reproducible.patch to fix build date (boo#1047218)
-------------------------------------------------------------------
Tue Jun 12 07:16:45 UTC 2018 - nmoreychaisemartin@suse.com
- Update to v10.7.0.0.145 (fate#325046)
* No changelog available
- Rebase opa-fm-use-RPM_OPT_FLAGS.patch and
opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch to the
latest sources.
-------------------------------------------------------------------
Mon Dec 18 10:06:04 UTC 2017 - nmoreychaisemartin@suse.com
- Move /etc/sysconfig/opa* tyo /etc/opa-fm (bsc#1071525)
-------------------------------------------------------------------
Mon Nov 20 16:49:19 UTC 2017 - nmoreychaisemartin@suse.com
- Update to v10.6.0.0.132
* No changelog available
- Remove opa-fm-sigset-was-removed.patch as it was fixed upstream.
- Rebase opa-fm-use-RPM_OPT_FLAGS.patch and
opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch to the
latest sources.
-------------------------------------------------------------------
Tue Sep 19 11:53:01 UTC 2017 - nmoreychaisemartin@suse.com
- Update to v10.5.1.0.1
* No changelog available
- Update opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch
to the latest sources
-------------------------------------------------------------------
Tue Sep 5 14:29:16 UTC 2017 - nmoreychaisemartin@suse.com
- Update _service to allow auto updates from github
-------------------------------------------------------------------
Mon Aug 28 12:08:54 UTC 2017 - nmoreychaisemartin@suse.com
- Update patches to latest sources:
* opa-fm-use-RPM_OPT_FLAGS.patch
* 0001-Fall-back-to-custom-vendor-if-os_vendor-fails.patch was renamed
to opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch
- Add opa-fm-sigset-was-removed.patch to build with the latest glibc
which does not expose <bits/sigset.h> anymore
-------------------------------------------------------------------
Wed Aug 9 14:59:35 UTC 2017 - nmoreychaisemartin@suse.com
- Update to v10.4.1.0.2
* No changelog available
-------------------------------------------------------------------
Fri Jun 23 15:40:51 UTC 2017 - nmoreychaisemartin@suse.com
- Replace dependency from libibmad-devel to infiniband-diags-devel
-------------------------------------------------------------------
Thu Jun 8 09:58:59 UTC 2017 - nmoreychaisemartin@suse.com
- Update to v10.4.0.0.197
* No changelog available
-------------------------------------------------------------------
Fri May 5 06:44:34 UTC 2017 - nmoreychaisemartin@suse.com
- Unify spec with SLE12.
- Reenable /opt directory (bsc#1036678).
-------------------------------------------------------------------
Fri Apr 28 12:34:05 UTC 2017 - nmoreychaisemartin@suse.com
- Update path in /opt (bsc#1036678).
-------------------------------------------------------------------
Mon Apr 3 13:42:15 UTC 2017 - josef.moellers@suse.com
- Removed a few unneeded dependencies to make rpmlint happy.
Removed references to /var/usr/lib as it is not FHS.
-------------------------------------------------------------------
Wed Mar 29 08:14:20 CEST 2017 - pth@suse.de
- Make dependencies on libs now coming from rdma-core versioned.
- Where feasable depend on rdma-core-devel.
-------------------------------------------------------------------
Thu Mar 16 10:27:15 CET 2017 - ndas@suse.de
- Add required package dependencies (bsc#1019151).
-------------------------------------------------------------------
Thu Mar 16 08:45:25 UTC 2017 - josef.moellers@suse.com
- Modified spec file:
* Removed some redudant code from %post and %preun
* changed opa-fm.rpmlintrc to %{name}.rpmlintrc
* removed references to "/opt".
* renamed opa-fm.rpmlintrc to opa-fm-rpmlintrc
-------------------------------------------------------------------
Tue Feb 28 14:54:57 UTC 2017 - josef.moellers@suse.com
- Update to v10.3.1
Unfortunately Intel has not shared any
information related to the changes
(fate#321479)
-------------------------------------------------------------------
Thu Jun 2 17:48:46 CEST 2016 - ndas@suse.de
- Fixed misplaced opafm.info and opafm.xml to their peroper location
(bsc#982810). This generates suse-filelist-forbidden-sysconfig error
which requires a rpmlint file to suppress.
[+opa-fm.rpmlintrc]
-------------------------------------------------------------------
Fri May 27 17:09:34 CEST 2016 - ndas@suse.de
- Changed package directory(/opt/opafm) to /usr/lib/opafm and
created a softlink /opt/opafm for the same, this partially fix
osc warning suse-filelist-forbidden-opt(bsc#982045).
-------------------------------------------------------------------
Wed Mar 9 14:23:04 UTC 2016 - ndas@suse.de
- Initial package, version: 10.0.0.0.697 (fate#319230)

148
opa-fm.spec Normal file
View File

@ -0,0 +1,148 @@
#
# spec file for package opa-fm
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define git_ver .0.6f1eb4579fc9
%define pseudo_opt %{_prefix}/lib/opa-fm
%define opasysconfdir %{_sysconfdir}/opa-fm/
%define opavarlibdir %{_localstatedir}/usr/lib/opa-fm/
Name: opa-fm
Version: 10.12.1.0.6
Release: 0
Summary: Intel Omni-Path Fabric Management Software
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: http://www.intel.com/
Source0: %{name}-%{version}%{git_ver}.tar.gz
Source1: %{name}-rpmlintrc
Patch1: opa-fm-Fallback-to-custom-vendor-if-os_vendor-fails.patch
Patch2: opa-fm-use-RPM_OPT_FLAGS.patch
Patch3: opa-fm-force-code-symbols-to-be-loaded.patch
Patch5: opa-fm-harden-systemd-service.patch
BuildRequires: gcc-c++
BuildRequires: infiniband-diags-devel
BuildRequires: libexpat-devel
BuildRequires: libopenssl-devel
BuildRequires: ncurses-devel
BuildRequires: rdma-core-devel
BuildRequires: tcl-devel
BuildRequires: zlib-devel
Requires: infiniband-diags
Requires: rdma >= 12
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#Currently ONLY builds on x86_64
ExclusiveArch: x86_64
%description
The %{name} contains Intel Omni-Path fabric management applications. This
includes: the Subnet Manager, Baseboard Manager, Performance Manager,
Fabric Executive, and some fabric management tools.
%prep
%setup -q -n %{name}-%{version}%{git_ver}
%patch1
%patch2
%patch3
%patch5
%build
export RPM_OPT_FLAGS
if [ -d Esm ]; then
cd Esm
fi
./fmbuild -r -C
%install
# directories
install -d -m0755 %{buildroot}%{opasysconfdir}
install -D -m 644 stage.rpm/opafm.service %{buildroot}%{_prefix}/lib/systemd/system/opafm.service
install -D -m 755 stage.rpm/opafmctrl %{buildroot}/%{pseudo_opt}/bin/opafmctrl
install -D -m 755 stage.rpm/opafmd %{buildroot}/%{pseudo_opt}/bin/opafmd
%if 0%{?rhel} && 0%{?rhel} < 7
install -D -m 755 stage.rpm/opafm %{buildroot}%{_sysconfdir}/init.d/opafm
%endif
install -D -m 644 stage.rpm/opafm.xml %{buildroot}%{opasysconfdir}/opafm.xml
install -D stage.rpm/fm_capture %{buildroot}/%{pseudo_opt}/bin/fm_capture
install -D stage.rpm/fm_cmd %{buildroot}/%{pseudo_opt}/bin/fm_cmd
install -D stage.rpm/fm_cmdall %{buildroot}/%{pseudo_opt}/bin/fm_cmdall
install -D stage.rpm/smpoolsize %{buildroot}/%{pseudo_opt}/bin/smpoolsize
install -D stage.rpm/sm %{buildroot}/%{pseudo_opt}/runtime/sm
install -D stage.rpm/fe %{buildroot}/%{pseudo_opt}/runtime/fe
install -D stage.rpm/config_check %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/config_check
install -D stage.rpm/config_convert %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/config_convert
install -D stage.rpm/config_diff %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/config_diff
install -D stage.rpm/config_generate %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/config_generate
install -D stage.rpm/opafm %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/opafm
if [ -d Esm ]; then
sub_dir=Esm/
else
sub_dir=
fi
install -D -m 644 ${sub_dir}ib/src/linux/startup/opafm_src.xml %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/opafm_src.xml
install -D -m 644 stage.rpm/opafm.xml %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/opafm.xml
install -D stage.rpm/opaxmlextract %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/opaxmlextract
install -D stage.rpm/opaxmlfilter %{buildroot}/%{pseudo_opt}/%{_sysconfdir}/opaxmlfilter
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}/opt
mkdir -p %{buildroot}%{opavarlibdir}
ln -s /%{pseudo_opt}/bin/fm_cmd %{buildroot}%{_sbindir}/opafmcmd
ln -s /%{pseudo_opt}/bin/fm_cmdall %{buildroot}%{_sbindir}/opafmcmdall
ln -s %{pseudo_opt} %{buildroot}/opt/
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcopafm
%pre
%service_add_pre opafm.service
%post
%service_add_post opafm.service
%preun
%service_del_preun opafm.service
%postun
%service_del_postun opafm.service
%files
%defattr(-,root,root,-)
%dir %{opasysconfdir}
%dir %{pseudo_opt}/
%dir %{pseudo_opt}/bin
%dir %{pseudo_opt}/etc
%dir %{pseudo_opt}/runtime
/opt/opa-fm
%config(noreplace) %{opasysconfdir}/opafm.xml
%doc README
%license LICENSE
%{_prefix}/lib/systemd/system/opafm.service
%{pseudo_opt}/bin/*
%{pseudo_opt}%{_sysconfdir}/*
%{pseudo_opt}/runtime/*
%{_sbindir}/opafmcmd
%{_sbindir}/opafmcmdall
%{_sbindir}/rcopafm
%changelog