Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2019-05-25 13:34:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hwinfo (Old)
 and      /work/SRC/openSUSE:Factory/.hwinfo.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hwinfo"

Sat May 25 13:34:27 2019 rev:168 rq:705024 version:21.66

Changes:
--------
--- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes    2019-03-19 
11:08:22.626094628 +0100
+++ /work/SRC/openSUSE:Factory/.hwinfo.new.5148/hwinfo.changes  2019-05-25 
13:34:28.788009907 +0200
@@ -1,0 +2,14 @@
+Thu May 23 13:32:53 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/hwinfo#80
+- fix Makefile and allow building for old distros
+- 21.66
+
+--------------------------------------------------------------------
+Thu May 23 12:03:24 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/hwinfo#79
+- return BIOS UUID in decoded (with '-'s) form (bsc#1135819)
+- 21.65
+
+--------------------------------------------------------------------

Old:
----
  hwinfo-21.64.tar.xz

New:
----
  hwinfo-21.66.tar.xz

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

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.CZOivs/_old  2019-05-25 13:34:29.640009299 +0200
+++ /var/tmp/diff_new_pack.CZOivs/_new  2019-05-25 13:34:29.644009296 +0200
@@ -22,6 +22,7 @@
 BuildRequires:  perl-XML-Parser
 BuildRequires:  pkg-config
 BuildRequires:  udev
+BuildRequires:  pkgconfig(uuid)
 %if 0%{?rhel_version} == 0
 BuildRequires:  perl-XML-Writer
 %endif
@@ -33,10 +34,10 @@
 PreReq:         /sbin/ldconfig
 Summary:        Hardware Library
 # Until migration to github this should be correct url
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Hardware/Other
 Url:            http://gitorious.org/opensuse/hwinfo
-Version:        21.64
+Version:        21.66
 Release:        0
 Source:         %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ hwinfo-21.64.tar.xz -> hwinfo-21.66.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.64/Makefile new/hwinfo-21.66/Makefile
--- old/hwinfo-21.64/Makefile   2019-03-14 15:25:20.000000000 +0100
+++ new/hwinfo-21.66/Makefile   2019-05-23 15:32:53.000000000 +0200
@@ -3,9 +3,9 @@
 TARGETS                = hwinfo hwinfo.pc changelog
 CLEANFILES     = hwinfo hwinfo.pc hwinfo.static hwscan hwscan.static hwscand 
hwscanqueue doc/libhd doc/*~
 LIBS           = -lhd
-SLIBS          = -lhd
+SLIBS          = -lhd -luuid
 TLIBS          = -lhd_tiny
-SO_LIBS                =
+SO_LIBS                = -luuid
 TSO_LIBS       =
 
 export SO_LIBS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.64/VERSION new/hwinfo-21.66/VERSION
--- old/hwinfo-21.64/VERSION    2019-03-14 15:25:20.000000000 +0100
+++ new/hwinfo-21.66/VERSION    2019-05-23 15:32:53.000000000 +0200
@@ -1 +1 @@
-21.64
+21.66
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.64/changelog new/hwinfo-21.66/changelog
--- old/hwinfo-21.64/changelog  2019-03-14 15:25:20.000000000 +0100
+++ new/hwinfo-21.66/changelog  2019-05-23 15:32:53.000000000 +0200
@@ -1,3 +1,11 @@
+2019-05-23:    21.66
+       - merge gh#openSUSE/hwinfo#80
+       - fix Makefile and allow building for old distros
+
+2019-05-23:    21.65
+       - merge gh#openSUSE/hwinfo#79
+       - return BIOS UUID in decoded (with '-'s) form (bsc#1135819)
+
 2019-03-14:    21.64
        - Update of pci and usb ids (bsc#1127840) (#77)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.64/src/hd/smbios.c 
new/hwinfo-21.66/src/hd/smbios.c
--- old/hwinfo-21.64/src/hd/smbios.c    2019-03-14 15:25:20.000000000 +0100
+++ new/hwinfo-21.66/src/hd/smbios.c    2019-05-23 15:32:53.000000000 +0200
@@ -1,10 +1,16 @@
 #include <stdio.h>
 #include <string.h>
+#include <uuid/uuid.h>
 
 #include "hd.h"
 #include "hd_int.h"
 #include "smbios.h"
 
+// not in old uuid.h versions
+#ifndef UUID_STR_LEN
+#define UUID_STR_LEN 37
+#endif
+
 /**
  * @defgroup SMBIOSint System Management BIOS (SMBIOS)
  * @ingroup libhdINFOint
@@ -35,6 +41,7 @@
 static void smbios_str_print(FILE *f, char *str, char *label);
 static void smbios_id2str(hd_id_t *hid, sm_str_map_t *map, unsigned def);
 static void smbios_bitmap2str(hd_bitmap_t *hbm, sm_str_map_t *map);
+static char *smbios_decode_uuid(uuid_t uuid);
 
 
 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@@ -1287,7 +1294,7 @@
   hd_smbios_t *sm;
   str_list_t *sl;
   char c, *s;
-  unsigned u;
+  unsigned u, u_and, u_or;
   int i;
 
   if(!hd_data->smbios) return;
@@ -1310,18 +1317,17 @@
         if(sm->sysinfo.product) fprintf(f, "    Product: \"%s\"\n", 
sm->sysinfo.product);
         if(sm->sysinfo.version) fprintf(f, "    Version: \"%s\"\n", 
sm->sysinfo.version);
         if(sm->sysinfo.serial) fprintf(f, "    Serial: \"%s\"\n", 
sm->sysinfo.serial);
-        for(i = u = 0; (unsigned) i < sizeof sm->sysinfo.uuid / sizeof 
*sm->sysinfo.uuid; i++) {
-          u |= sm->sysinfo.uuid[i];
+        for(i = u_or = 0, u_and = 0xff; (unsigned) i < sizeof sm->sysinfo.uuid 
/ sizeof *sm->sysinfo.uuid; i++) {
+          u_or |= sm->sysinfo.uuid[i];
+          u_and &= sm->sysinfo.uuid[i];
         }
         fprintf(f, "    UUID: ");
-        if(u == 0 || u == 0xff) {
+        if(u_or == 0 || u_and == 0xff) {
           fprintf(f, "undefined");
-          if(u == 0xff) fprintf(f, ", but settable");
+          if(u_and == 0xff) fprintf(f, ", but settable");
         }
         else {
-          for(i = sizeof sm->sysinfo.uuid / sizeof *sm->sysinfo.uuid - 1; i >= 
0; i--) {
-            fprintf(f, "%02x", sm->sysinfo.uuid[i]);
-          }
+          fprintf(f, "%s", smbios_decode_uuid(sm->sysinfo.uuid));
         }
         fprintf(f, "\n");
         SMBIOS_PRINT_ID(sysinfo.wake_up, "Wake-up");
@@ -1668,5 +1674,31 @@
   }
 }
 
+
+/*
+ * Convert UUID from binary form to string.
+ *
+ * Return string in a static buffer.
+ */
+char *smbios_decode_uuid(uuid_t uuid)
+{
+  uuid_t uuid_mixed;
+  static char buf[UUID_STR_LEN];
+  static unsigned char idx[sizeof (uuid_t)] = {3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 
10, 11, 12, 13, 14, 15};
+  int i;
+  unsigned char *s, *d;
+
+  s = (unsigned char *) uuid;
+  d = (unsigned char *) uuid_mixed;
+
+  for(i = 0; i < sizeof uuid_mixed; i++) {
+    d[i] = s[idx[i]];
+  }
+
+  uuid_unparse_lower(uuid_mixed, buf);
+
+  return buf;
+}
+
 /** @} */
 


Reply via email to