commit
f8b485c07d
@ -1,32 +0,0 @@
|
||||
From 9c64788d897d300dbd05239b04855c2cd0196316 Mon Sep 17 00:00:00 2001
|
||||
From: Chandni Verma <chandni@linux.vnet.ibm.com>
|
||||
Date: Wed, 21 Jun 2017 17:06:17 +0530
|
||||
Subject: [PATCH] Ensure /var/lib/hardware/udi exists and with 755 permissions
|
||||
|
||||
We make this fix in Makefile at installation time so that the
|
||||
directory gets removed upon purging the package and doesn't
|
||||
linger on.
|
||||
|
||||
This fixes any save-config issues one may see on Linux
|
||||
distributions where the directory doesn't exist by default.
|
||||
|
||||
Signed-off-by: Chandni Verma <chandni@linux.vnet.ibm.com>
|
||||
---
|
||||
Makefile | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ba7df1c..da5f124 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -119,6 +119,7 @@ install:
|
||||
install -m 755 getsysinfo $(DESTDIR)/usr/sbin
|
||||
install -m 755 src/isdn/cdb/mk_isdnhwdb $(DESTDIR)/usr/sbin
|
||||
install -d -m 755 $(DESTDIR)/usr/share/hwinfo
|
||||
+ install -d -m 755 $(DESTDIR)/var/lib/hardware/udi
|
||||
install -m 644 src/isdn/cdb/ISDN.CDB.txt $(DESTDIR)/usr/share/hwinfo
|
||||
install -m 644 src/isdn/cdb/ISDN.CDB.hwdb $(DESTDIR)/usr/share/hwinfo
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
From 1f1354fc1e5098a61bcc62d556db2b9549056d3f Mon Sep 17 00:00:00 2001
|
||||
From: Chris Lamb <chris@chris-lamb.co.uk>
|
||||
Date: Thu, 11 Jan 2018 22:45:24 +0530
|
||||
Subject: [PATCH 19/39] Please make CDBISDN_DATE ignore timezone.
|
||||
|
||||
Whilst working on the Reproducible Builds effort [0], we noticed
|
||||
that hwinfo could not be built reproducibly.
|
||||
|
||||
Whilst it uses SOURCE_DATE_EPOCH, it varies depending on the timezone
|
||||
via ctime(&t) instead of asctime(gmtime(&t)).
|
||||
|
||||
[0] https://reproducible-builds.org/
|
||||
|
||||
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
|
||||
---
|
||||
src/isdn/cdb/isdn_cdb.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/isdn/cdb/isdn_cdb.c b/src/isdn/cdb/isdn_cdb.c
|
||||
index 53c3c75..95a239c 100644
|
||||
--- a/src/isdn/cdb/isdn_cdb.c
|
||||
+++ b/src/isdn/cdb/isdn_cdb.c
|
||||
@@ -222,7 +222,7 @@ char **argv;
|
||||
fprintf(stdout, "/* CDBISDN database */\n");
|
||||
fprintf(stdout,"const int CDBISDN_DBVERSION = 0x%x;\n", CDB_DATAVERSION);
|
||||
time(&tim);
|
||||
- strcpy(line,ctime(&tim));
|
||||
+ strcpy(line,asctime(gmtime(&tim)));
|
||||
l = strlen(line);
|
||||
if (l)
|
||||
line[l-1] = 0;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From 576beaa671c735b99745ee8fa9741d635ad952b9 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Winterfeldt <wfeldt@opensuse.org>
|
||||
Date: Thu, 29 Mar 2018 14:56:21 +0200
|
||||
Subject: [PATCH 21/39] ensure udev device links are unique (bsc #1084700)
|
||||
|
||||
It sometimes happens that udev generates the same by-* links for different
|
||||
devices. Mainly in strange virtualized environments.
|
||||
|
||||
This patch ensures that the udev symlinks libhd gathers point to the correct
|
||||
kernel device (only one of the duplicates can, obviously).
|
||||
---
|
||||
src/hd/hd.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/src/hd/hd.c b/src/hd/hd.c
|
||||
index 528ef40..5321050 100644
|
||||
--- a/src/hd/hd.c
|
||||
+++ b/src/hd/hd.c
|
||||
@@ -5634,6 +5634,7 @@ void read_udevinfo(hd_data_t *hd_data)
|
||||
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);
|
||||
@@ -5675,6 +5676,33 @@ void read_udevinfo(hd_data_t *hd_data)
|
||||
|
||||
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);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
Binary file not shown.
BIN
hwinfo-21.70.tar.gz
Normal file
BIN
hwinfo-21.70.tar.gz
Normal file
Binary file not shown.
13
hwinfo.spec
13
hwinfo.spec
@ -1,16 +1,12 @@
|
||||
Name: hwinfo
|
||||
Version: 21.47
|
||||
Release: 5
|
||||
Version: 21.70
|
||||
Release: 1
|
||||
Summary: Probe for hardware
|
||||
License: GPL+
|
||||
URL: https://github.com/openSUSE/hwinfo
|
||||
Source0: https://github.com/openSUSE/hwinfo/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch6000: Please-make-CDBISDN_DATE-ignore-timezone.patch
|
||||
Patch6001: ensure-udev-device-links-are-unique.patch
|
||||
Patch6002: Ensure-var-lib-hardware-udi-exists-and-with-755-perm.patch
|
||||
|
||||
BuildRequires: libx86emu-devel doxygen flex perl-XML-Parser pkgconfig udev
|
||||
BuildRequires: libx86emu-devel doxygen flex perl-XML-Parser pkgconfig udev util-linux-devel
|
||||
|
||||
%description
|
||||
hwinfo is used to report the present hardware information in the system.
|
||||
@ -53,6 +49,9 @@ make LDFLAGS="%{__global_ldflags} -Lsrc" LIBDIR=%{_libdir} HWINFO_VERSION=%{vers
|
||||
%{_datadir}/hwinfo
|
||||
|
||||
%changelog
|
||||
* Thu Jul 23 2020 jinzhimin<jinzhimin2@huawei.com> - 21.70-1
|
||||
- update to 21.70
|
||||
|
||||
* Sat Apr 20 2019 liusirui<liusirui@huawei.com> - 21.47-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user