Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2018-10-02 19:41:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hwinfo (Old) and /work/SRC/openSUSE:Factory/.hwinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "hwinfo" Tue Oct 2 19:41:14 2018 rev:163 rq:638786 version:21.58 Changes: -------- --- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes 2018-09-20 11:38:39.564955245 +0200 +++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes 2018-10-02 19:41:19.250218613 +0200 @@ -1,0 +2,7 @@ +Thu Sep 27 12:37:03 UTC 2018 - snwint@suse.de + +- merge gh#openSUSE/hwinfo#59 +- ensure udev device links are unique (bsc#1084700) +- 21.58 + +-------------------------------------------------------------------- Old: ---- hwinfo-21.57.tar.xz New: ---- hwinfo-21.58.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.jq28J2/_old 2018-10-02 19:41:20.170217247 +0200 +++ /var/tmp/diff_new_pack.jq28J2/_new 2018-10-02 19:41:20.190217216 +0200 @@ -36,7 +36,7 @@ License: GPL-2.0+ Group: Hardware/Other Url: http://gitorious.org/opensuse/hwinfo -Version: 21.57 +Version: 21.58 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ hwinfo-21.57.tar.xz -> hwinfo-21.58.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.57/VERSION new/hwinfo-21.58/VERSION --- old/hwinfo-21.57/VERSION 2018-09-17 13:59:38.000000000 +0200 +++ new/hwinfo-21.58/VERSION 2018-09-27 14:37:03.000000000 +0200 @@ -1 +1 @@ -21.57 +21.58 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.57/changelog new/hwinfo-21.58/changelog --- old/hwinfo-21.57/changelog 2018-09-17 13:59:38.000000000 +0200 +++ new/hwinfo-21.58/changelog 2018-09-27 14:37:03.000000000 +0200 @@ -1,3 +1,6 @@ +2018-03-29: 21.58 + - ensure udev device links are unique (bsc #1084700) + 2018-09-17: 21.57 - check for vmware only when running in a vm (bsc #1105003) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.57/src/hd/hd.c new/hwinfo-21.58/src/hd/hd.c --- old/hwinfo-21.57/src/hd/hd.c 2018-09-17 13:59:38.000000000 +0200 +++ new/hwinfo-21.58/src/hd/hd.c 2018-09-27 14:37:03.000000000 +0200 @@ -5640,6 +5640,7 @@ str_list_t *sl, *udevinfo; hd_udevinfo_t **uip, *ui; char *s = NULL, buf[256]; + struct stat sbuf; udevinfo = read_file("| " PROG_UDEVADM " info -e 2>/dev/null", 0, 0); if(!udevinfo) udevinfo = read_file("| " PROG_UDEVINFO " -e 2>/dev/null", 0, 0); @@ -5681,6 +5682,33 @@ s = free_mem(s); + /* + * It sometimes happens that udev generates the same link for different + * kernel devices. To catch this we check here that udev device symlinks + * actually point to the kernel device name. + * + * If it does not match the link is replaced by the kernel device name. + */ + for(ui = hd_data->udevinfo; ui; ui = ui->next) { + if(!ui->name || stat(ui->name, &sbuf)) continue; + + for(sl = ui->links; sl; sl = sl->next) { + char *real_path = realpath(sl->str, NULL); + + if(real_path) { + if(strcmp(real_path, ui->name)) { + ADD2LOG( + "udev link %s points to %s (expected %s) - removed\n", + sl->str, real_path, ui->name + ); + str_printf(&sl->str, 0, "%s", ui->name); + } + + free(real_path); + } + } + } + for(ui = hd_data->udevinfo; ui; ui = ui->next) { ADD2LOG("%s\n", ui->sysfs); if(ui->name) ADD2LOG(" name: %s\n", ui->name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.57/src/hd/hd.h new/hwinfo-21.58/src/hd/hd.h --- old/hwinfo-21.57/src/hd/hd.h 2018-09-17 13:59:38.000000000 +0200 +++ new/hwinfo-21.58/src/hd/hd.h 2018-09-27 14:37:03.000000000 +0200 @@ -20,7 +20,7 @@ /** Interface version */ #define HD_VERSION 21 -#define HD_MINOR_VERSION 57 +#define HD_MINOR_VERSION 58 #define HD_FULL_VERSION (HD_VERSION * 1000 + HD_MINOR_VERSION) /**