Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2015-08-10 09:09:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hwinfo (Old)
 and      /work/SRC/openSUSE:Factory/.hwinfo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hwinfo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes    2015-07-14 
17:20:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2015-08-10 
09:09:30.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Aug  6 16:11:04 CEST 2015 - snw...@suse.com
+
+- update git2log script to create nicer logs
+- 21.19
+
+-------------------------------------------------------------------
+Thu Aug  6 11:41:07 CEST 2015 - snw...@suse.com
+
+- Expose more properties to all devices in /proc/device-tree/vpd
+- 21.18
+
+-------------------------------------------------------------------

Old:
----
  hwinfo-21.17.tar.xz

New:
----
  hwinfo-21.19.tar.xz

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

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.cp6yw6/_old  2015-08-10 09:09:31.000000000 +0200
+++ /var/tmp/diff_new_pack.cp6yw6/_new  2015-08-10 09:09:31.000000000 +0200
@@ -36,7 +36,7 @@
 Group:          Hardware/Other
 # Until migration to github this should be correct url
 Url:            http://gitorious.org/opensuse/hwinfo
-Version:        21.17
+Version:        21.19
 Release:        0
 Source:         %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ hwinfo-21.17.tar.xz -> hwinfo-21.19.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/VERSION new/hwinfo-21.19/VERSION
--- old/hwinfo-21.17/VERSION    2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/VERSION    2015-08-06 16:06:46.000000000 +0200
@@ -1 +1 @@
-21.17
+21.19
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/changelog new/hwinfo-21.19/changelog
--- old/hwinfo-21.17/changelog  2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/changelog  2015-08-06 16:06:46.000000000 +0200
@@ -1,3 +1,9 @@
+2015-08-06:    21.19
+       - update git2log script to create nicer logs
+
+2015-08-06:    21.18
+       - Expose more properties to all devices in /proc/device-tree/vpd
+
 2015-06-23:    21.17
        - hd: Use <linux/pci.h> instead of <sys/pci.h>
        - hd/hd.c: canonicalize_file_name(s) is equivalent to the more portable 
realpath(s,NULL)
@@ -81,7 +87,7 @@
        - VMWare -> VMware (bnc #536888)
 
 2013-11-27:    21.0
-       - read and add ethtool private flags (bnc 841170)
+       - read and add ethtool private flags (bnc #841170)
        - update pci id list (bnc #813172)
        - Add support for m68k
 
@@ -111,8 +117,6 @@
        - fix network detection if several interfaces are attached to a single 
pci function (bnc #693090)
        - fixed typo
        - USB joystick fixes
-       - replace USB details by joystick details
-       - set unix_dev_name2 to /dev/input/jsX
        - added Gameport bus, detect gameport joysticks
        - cleanup - removed unused variables
        - added NULL checks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/git2log new/hwinfo-21.19/git2log
--- old/hwinfo-21.17/git2log    2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/git2log    2015-08-06 16:06:46.000000000 +0200
@@ -1,5 +1,7 @@
 #! /usr/bin/perl
 
+use strict;
+
 use Getopt::Long;
 
 use Data::Dumper;
@@ -8,27 +10,43 @@
 $Data::Dumper::Indent = 1;
 
 sub usage;
+sub get_branch_tags;
+sub get_branch;
+sub get_parent_branch;
+sub get_version;
 
 usage 0 if !@ARGV;
 
-@deps = qw ( .git/HEAD .git/refs/heads .git/refs/tags );
+my @deps = qw ( .git/HEAD .git/refs/heads .git/refs/tags );
+
+my $branch;
+my $current_version;
+my @tags;
+my @all_tags;
+
+my $opt_log;
+my $opt_version;
+my $opt_branch;
+my $opt_update;
+my $opt_file;
 
 GetOptions(
   'help'          => sub { usage 0 },
   'version'       => \$opt_version,
+  'branch'        => \$opt_branch,
   'update'        => \$opt_update,
   'log|changelog' => \$opt_log,
 ) || usage 1;
 
-usage 1 if @ARGV > 1 || !($opt_log || $opt_version);
+usage 1 if @ARGV > 1 || !($opt_log || $opt_version || $opt_branch);
 $opt_file = @ARGV ? shift : '-';
 
 die "no git repo\n" unless -d ".git";
 
 if($opt_update && $opt_file ne '-' && -f($opt_file)) {
-  $ok = 1;
+  my $ok = 1;
 
-  $t = (stat $opt_file)[9];
+  my $t = (stat $opt_file)[9];
 
   for (@deps) {
     $ok = 0 if (stat)[9] > $t;
@@ -37,57 +55,51 @@
   exit 0 if $ok;
 }
 
-for (`git branch`) {
-  if(/^\*\s+(\S+)/) {
-    $branch = $1;
-    last;
-  }
-}
-
-$branch = "master" if $branch eq '(no';
+@all_tags = `git tag`;
+chomp @all_tags;
 
+$branch = get_branch;
 die "no branch?\n" unless $branch;
 
-# print STDERR "writing log for branch $branch\n";
-
-@tags = `git tag`;
+@tags = get_branch_tags;
+die "no tags at all?\n" unless @tags;
 
-chomp @tags;
+if($branch ne 'master') {
+  if(!grep { /^$branch\-/ } @tags) {
+    $branch = get_parent_branch;
+    die "sorry, can't determine branch\n" unless $branch;
 
-for (@tags) {
-  if(/^\d/) {
-    s/(\d+)/sprintf "%04d", $1/eg;
-    push @ntags, $_;
-  }
-  elsif(s/^$branch\-//) {
-    s/(\d+)/sprintf "%04d", $1/eg;
-    push @ntags, "$branch-$_";
+    @tags = get_branch_tags;
+    die "no tags at all?\n" unless @tags;
   }
 }
+else {
+  @tags = get_branch_tags;
+  die "no tags at all?\n" unless @tags;
+}
 
-@tags = sort @ntags;
-
-die "no tags at all?\n" unless @tags;
-
-$current_version = $tags[-1];
-$current_version =~ s/(\d+)/$1 + 0/eg;
+if($opt_branch) {
+  open my $f, ">$opt_file";
+  print $f "$branch\n";
+  close $f;
 
-if(`git log --pretty=medium --date=iso '$current_version..HEAD'`) {
-  $current_version =~ s/(\d+)$/$1 + 1/e;
+  exit 0;
 }
 
-$current_version =~ s/^$branch\-//;
+$current_version = get_version;
 
 if($opt_version) {
-  open F, ">$opt_file";
-  print F "$current_version\n";
-  close F;
+  open my $f, ">$opt_file";
+  print $f "$current_version\n";
+  close $f;
 
   exit 0;
 }
 
 if($branch ne 'master') {
-  for ($i = 0; $i < @tags; $i++) {
+  my ($i1, $i2, $bi);
+
+  for (my $i = 0; $i < @tags; $i++) {
     if($tags[$i] =~ /^$branch\-(\S+)/) {
       $i2 = $i;
       $bi = $1;
@@ -99,7 +111,7 @@
 
   warn "no tags in this branch yet\n" unless $bi;
 
-  for ($i = 0; $i < $i2; $i++) {
+  for (my $i = 0; $i < $i2; $i++) {
     if($tags[$i] ge $bi) {
       if($tags[$i] eq $bi) {
         $i1 = $i;
@@ -122,14 +134,14 @@
 
 open F, ">$opt_file";
 
-for ($i = @tags - 1; $i > 0; $i--) {
-  $date = undef;
-  @t = `git log --pretty=medium --date=iso '$tags[$i-1]..$tags[$i]'`;
+for (my $i = @tags - 1; $i > 0; $i--) {
+  my ($date, @t2);
+
+  my @t = `git log --pretty=medium --date=iso '$tags[$i-1]..$tags[$i]'`;
 
   # print "\n--- $tags[$i-1]..$tags[$i] ---\n", @t, "---\n";
 
-  undef @t2;
-  $merge = 0;
+  my $merge = 0;
   for (@t) {
     $merge = 1 if /^Merge: /;
     $merge = 0 if /^commit /;
@@ -138,15 +150,13 @@
   @t = @t2;
 
   undef @t2;
-  $detail = 0;
+  my $detail = 0;
   for (@t) {
     $detail = 1 if /^    $/;
+    $detail = 2 if /^    Conflicts:$/;
     $detail = 0 if /^commit /;
-    if($detail && /^    [^\-\s]/) {
-      # push @t2, "# $_";
-    }
-    else {
-      push @t2, $_;
+    if(!$detail) {
+      push @t2, $_ if $detail < 2;
     }
   }
   @t = @t2;
@@ -160,10 +170,21 @@
       last;
     }
   }
+
+  # handle white space in every first line once and for all
+  my $empty = 1;
+  for (@t) {
+    $empty = 1, $_ = "", next if $_ =~ /^\s*$/;
+    next if !$empty;
+    s/^\s*//;
+    $empty = 0;
+  }
+
   @t = grep { !/^(commit|Author:|Date:|Merge:|\s*$)|created.*tag/ } @t;
   if(@t) {
     # rewrite a bit to have it look more consistent
-    map { s/(fate|bnc)#/$1 #/g } @t;
+    map { s/(fate|bnc|bsc)#/$1 #/g } @t;
+    map { s/(fate|bnc|bsc)\s*(\d{4})/$1 #$2/g } @t;
     map { s/\(#/(bnc #/g } @t;
     map { s/bug\s*#/bnc #/g } @t;
     map { s/feat(\.|ure)?\s*#?(\d+)/fate #$2/g } @t;
@@ -175,9 +196,9 @@
     map { s/^/\t/ } @t;
     map { s/\\'/'/ } @t;
 
-#    print "\n--- $tags[$i-1]..$tags[$i] ---\n", join("\n", @t);
+    # print "\n--- $tags[$i-1]..$tags[$i] ---\n", join("\n", @t);
 
-    $t = $tags[$i];
+    my $t = $tags[$i];
     $t = "${branch}-$t" if $branch ne 'master' && $t eq "HEAD";
     $t =~ s/HEAD/$current_version/;
     print F "$date:\t$t\n";
@@ -187,6 +208,8 @@
 
 close F;
 
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 sub usage
 {
   my $err = shift;
@@ -196,6 +219,7 @@
 Create changelog and project version from git repo.
   --changelog   Write changelog to FILE.
   --version     Write version number to FILE.
+  --branch      Write current branch to FILE.
   --update      Write changelog or version only if FILE is outdated.
   --help        Print this help text.
   usage
@@ -203,3 +227,72 @@
   exit $err;
 }
 
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+sub get_branch_tags
+{
+  my @ntags;
+
+  for (@all_tags) {
+    if(/^\d/) {
+      s/(\d+)/sprintf "%04d", $1/eg;
+      push @ntags, $_;
+    }
+    elsif(s/^$branch\-//) {
+      s/(\d+)/sprintf "%04d", $1/eg;
+      push @ntags, "$branch-$_";
+    }
+  }
+
+  return sort @ntags;
+}
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+sub get_branch
+{
+  my $b;
+
+  for (`git branch`) {
+    if(/^\*\s+(\S+)/) {
+      $b = $1;
+      last;
+    }
+  }
+
+  $b = "master" if $b eq '(no';
+
+  return $b;
+}
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+sub get_parent_branch
+{
+  my $p;
+
+  for (`git log -g --pretty=oneline`) {
+    $p = $1 if /checkout: moving from (\S+) to $branch/;
+  }
+
+  # print "parent = $p\n";
+
+  return $p || "master";
+}
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+sub get_version
+{
+  my $v = $tags[-1];
+  $v =~ s/(\d+)/$1 + 0/eg;
+
+  if(`git log --pretty=medium --date=iso '$v..HEAD'`) {
+    $v =~ s/(\d+)$/$1 + 1/e;
+  }
+
+  $v =~ s/^$branch\-//;
+
+  return $v;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/src/hd/hd.c new/hwinfo-21.19/src/hd/hd.c
--- old/hwinfo-21.17/src/hd/hd.c        2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/src/hd/hd.c        2015-08-06 16:06:46.000000000 +0200
@@ -4309,6 +4309,12 @@
     free_mem(dt->device_type);
     free_mem(dt->compatible);
     free_mem(dt->edid);
+    free_mem(dt->ccin);
+    free_mem(dt->fru_number);
+    free_mem(dt->loc_code);
+    free_mem(dt->serial_number);
+    free_mem(dt->part_number);
+    free_mem(dt->description);
 
     free_mem(dt);
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/src/hd/hd.h new/hwinfo-21.19/src/hd/hd.h
--- old/hwinfo-21.17/src/hd/hd.h        2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/src/hd/hd.h        2015-08-06 16:06:46.000000000 +0200
@@ -1181,6 +1181,8 @@
   char *path, *filename;
   unsigned pci:1;
   char *name, *model, *device_type, *compatible;
+  char *ccin, *fru_number, *loc_code, *serial_number, *part_number;
+  char *description;
   int class_code;                       /**< class : sub_class : prog-if */
   int vendor_id, device_id, subvendor_id, subdevice_id;
   int revision_id, interrupt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.17/src/hd/prom.c 
new/hwinfo-21.19/src/hd/prom.c
--- old/hwinfo-21.17/src/hd/prom.c      2015-06-25 15:23:11.000000000 +0200
+++ new/hwinfo-21.19/src/hd/prom.c      2015-08-06 16:06:46.000000000 +0200
@@ -506,6 +506,12 @@
   read_str(path, "model", &devtree->model);
   read_str(path, "device_type", &devtree->device_type);
   read_str(path, "compatible", &devtree->compatible);
+  read_str(path, "ccin", &devtree->ccin);
+  read_str(path, "fru-number", &devtree->fru_number);
+  read_str(path, "ibm,loc-code", &devtree->loc_code);
+  read_str(path, "serial-number", &devtree->serial_number);
+  read_str(path, "part-number", &devtree->part_number);
+  read_str(path, "description", &devtree->description);
 
   read_int(path, "interrupts", &devtree->interrupt);
   read_int(path, "AAPL,interrupts", &devtree->interrupt);
@@ -562,6 +568,18 @@
       devtree->compatible ? devtree->compatible : ""
     );
 
+    if (strstr(devtree->path, "vpd") == devtree->path)
+      ADD2LOG(
+        "    ccin \"%s\", fru-number \"%s\", location-code \"%s\", 
serial-number \"%s\", part-number \"%s,\"\n"
+        "    description \"%s\"\n",
+        devtree->ccin ? devtree->ccin : "",
+        devtree->fru_number ? devtree->fru_number : "",
+        devtree->loc_code ? devtree->loc_code : "",
+        devtree->serial_number ? devtree->serial_number : "",
+        devtree->part_number ? devtree->part_number : "",
+        devtree->description ? devtree->description : ""
+    );
+
     if(
       devtree->class_code != -1 || devtree->vendor_id != -1 ||
       devtree->device_id != -1 || devtree->revision_id != -1 ||


Reply via email to