Hello community,

here is the log from the commit of package opensm for openSUSE:Factory checked 
in at 2017-06-26 15:51:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opensm (Old)
 and      /work/SRC/openSUSE:Factory/.opensm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opensm"

Mon Jun 26 15:51:15 2017 rev:8 rq:505931 version:3.3.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/opensm/opensm.changes    2017-06-12 
15:36:36.097073162 +0200
+++ /work/SRC/openSUSE:Factory/.opensm.new/opensm.changes       2017-06-26 
15:51:16.687996013 +0200
@@ -1,0 +2,13 @@
+Fri Jun 23 12:23:04 UTC 2017 - nmoreychaisemar...@suse.com
+
+- Have new libs packages obsolete the old opensm-libs3
+
+-------------------------------------------------------------------
+Mon Jun 19 18:53:39 UTC 2017 - jeng...@inai.de
+
+- Implement shared library packaging guideline
+- Rectify opensm-type_punning.patch:
+  a union does not fix type punning problems (let alone
+  misalignmened pointers), one must use memcpy.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ opensm.spec ++++++
--- /var/tmp/diff_new_pack.F7fQer/_old  2017-06-26 15:51:17.459887170 +0200
+++ /var/tmp/diff_new_pack.F7fQer/_new  2017-06-26 15:51:17.463886606 +0200
@@ -43,34 +43,50 @@
 Requires:       logrotate
 %{?systemd_requires}
 
-%define so_major 3
-%define opensm_libname libs%{so_major}
-
 %description
 OpenSM provides an implementation for an InfiniBand Subnet Manager and
 Administration. Such a software entity is required to run for in order
 to initialize the InfiniBand hardware (at least one per each InfiniBand
 subnet).
 
-%package        %{opensm_libname}
-Summary:        Opensm runtime libraries
+%package -n libopensm5
+Summary:        Opensm runtime library
+Group:          System/Libraries
+Obsoletes:      opensm-libs3
+
+%description -n libopensm5
+This package contains one of the opensm runtime libraries.
+
+%package -n libosmcomp3
+Summary:        Opensm runtime library
+Group:          System/Libraries
+Obsoletes:      opensm-libs3
+
+%description -n libosmcomp3
+This package contains one of the opensm runtime libraries.
+
+%package -n libosmvendor4
+Summary:        Opensm runtime library
 Group:          System/Libraries
+Obsoletes:      opensm-libs3
 
-%description  %{opensm_libname}
-This package contains the opensm runtime libraries.
+%description -n libosmvendor4
+This package contains one of the opensm runtime libraries.
 
 %package        devel
 Summary:        Development files for OpenSM
 Group:          Development/Libraries/C and C++
-Requires:       %{name}-%{opensm_libname} = %{version}
 Requires:       libibumad-devel
+Requires:       libopensm5 = %{version}
+Requires:       libosmcomp3 = %{version}
+Requires:       libosmvendor4 = %{version}
 
 %description devel
 Symlinks for the dynamic libraries and header files for OpenSM.
 
 %prep
 %setup -q
-%patch1
+%patch1 -p1
 %patch2
 
 cp %{S:1} %{S:2} %{S:3} .
@@ -111,15 +127,18 @@
 %{fillup_only}
 %service_add_post opensm.service
 
-%post %{opensm_libname} -p /sbin/ldconfig
-
 %preun
 %service_del_preun opensm.service
 
 %postun
 %service_del_postun opensm.service
 
-%postun %{opensm_libname} -p /sbin/ldconfig
+%post   -n libopensm5 -p /sbin/ldconfig
+%postun -n libopensm5 -p /sbin/ldconfig
+%post   -n libosmcomp3 -p /sbin/ldconfig
+%postun -n libosmcomp3 -p /sbin/ldconfig
+%post   -n libosmvendor4 -p /sbin/ldconfig
+%postun -n libosmvendor4 -p /sbin/ldconfig
 
 %files
 %defattr(-, root, root)
@@ -135,11 +154,17 @@
 %_mandir/man8/osmtest.8.gz
 /var/adm/fillup-templates/sysconfig.%name
 
-%files %{opensm_libname}
+%files -n libopensm5
 %defattr(-, root, root)
-%_libdir/libopensm.so.*
-%_libdir/libosmcomp.so.*
-%_libdir/libosmvendor.so.*
+%_libdir/libopensm.so.5*
+
+%files -n libosmcomp3
+%defattr(-,root,root)
+%_libdir/libosmcomp.so.3*
+
+%files -n libosmvendor4
+%defattr(-,root,root)
+%_libdir/libosmvendor.so.4*
 
 %files devel
 %defattr(-,root,root)

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.F7fQer/_old  2017-06-26 15:51:17.495882095 +0200
+++ /var/tmp/diff_new_pack.F7fQer/_new  2017-06-26 15:51:17.499881530 +0200
@@ -1,4 +1,8 @@
-opensm-libs3
-    obsoletes "opensm-<targettype> < <version>"
-    provides "opensm-<targettype> = <version>"
+libopensm5
+libosmcomp3
+libosmvendor4
 opensm-devel
+       requires -opensm-<targettype>
+       requires "libopensm5-<targettype> = <version>"
+       requires "libosmcomp3-<targettype> = <version>"
+       requires "libosmvendor4-<targettype> = <version>"

++++++ opensm-type_punning.patch ++++++
--- /var/tmp/diff_new_pack.F7fQer/_old  2017-06-26 15:51:17.531877019 +0200
+++ /var/tmp/diff_new_pack.F7fQer/_new  2017-06-26 15:51:17.531877019 +0200
@@ -1,15 +1,19 @@
-diff --git opensm/osm_prtn_config.c opensm/osm_prtn_config.c
-index b08da02d..3da8b867 100644
---- opensm/osm_prtn_config.c
-+++ opensm/osm_prtn_config.c
-@@ -120,16 +120,18 @@ static inline boolean_t mgid_is_broadcast(const ib_gid_t 
*mgid)
+---
+ opensm/osm_prtn_config.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+Index: opensm-3.3.20/opensm/osm_prtn_config.c
+===================================================================
+--- opensm-3.3.20.orig/opensm/osm_prtn_config.c
++++ opensm-3.3.20/opensm/osm_prtn_config.c
+@@ -120,14 +120,16 @@ static inline boolean_t mgid_is_broadcas
  
  static inline boolean_t mgid_is_ip(const ib_gid_t *mgid)
  {
 -      ib_net16_t ipsig = *(ib_net16_t *)&mgid->raw[2];
--      return (ipsig == cl_hton16(0x401b) || ipsig == cl_hton16(0x601b));
-+      union{uint8_t *ibg; ib_net16_t *ibn; }pun = { &mgid->raw[2]};
-+      return (*pun.ibn == cl_hton16(0x401b) || *pun.ibn == cl_hton16(0x601b));
++      ib_net16_t ipsig;
++      memcpy(&ipsig, &mgid->raw[2], sizeof(ipsig));
+       return (ipsig == cl_hton16(0x401b) || ipsig == cl_hton16(0x601b));
  }
  
  static inline boolean_t ip_mgroup_pkey_ok(struct part_conf *conf,
@@ -17,10 +21,7 @@
  {
 -      ib_net16_t mpkey = *(ib_net16_t *)&group->mgid.raw[4];
 +      ib_net16_t mpkey;
-+      union{uint8_t *uip; ib_net16_t *ibn} pun = { &group->mgid.raw[4]};
++      memcpy(&mpkey, &group->mgid.raw[4], sizeof(mpkey));
        char gid_str[INET6_ADDRSTRLEN];
  
-+      mpkey = *pun.ibn;
        if (mgid_is_broadcast(&group->mgid)
-           /* user requested "wild card" of pkey */
-           || mpkey == 0x0000


Reply via email to