diff --git a/0000-pciutils-2.2.1-idpath.patch b/6000-pciutils-2.2.1-idpath.patch similarity index 100% rename from 0000-pciutils-2.2.1-idpath.patch rename to 6000-pciutils-2.2.1-idpath.patch diff --git a/0001-pciutils-dir-d.patch b/6001-pciutils-dir-d.patch similarity index 96% rename from 0001-pciutils-dir-d.patch rename to 6001-pciutils-dir-d.patch index 2fae8f18a93a5f83043a3e07226d438e0f2c2b53..27333ffdafca66dbe5c0bc432018e39b25d06e24 100644 --- a/0001-pciutils-dir-d.patch +++ b/6001-pciutils-dir-d.patch @@ -4,7 +4,7 @@ diff -up pciutils-3.0.0/lib/names-parse.c.dird pciutils-3.0.0/lib/names-parse.c @@ -6,10 +6,13 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ - + +#define _GNU_SOURCE #include #include @@ -63,12 +63,12 @@ diff -up pciutils-3.0.0/lib/names-parse.c.dird pciutils-3.0.0/lib/names-parse.c + char new_id_path[PATH_MAX+1] = {0,}; + DIR *pci_ids_dir; + struct dirent *dp; -+ ++ + strncpy(new_id_path, a->id_file_name, PATH_MAX); + new_id_path[PATH_MAX] = 0; + strncat(new_id_path, ".d/", PATH_MAX - strnlen(new_id_path, PATH_MAX)); + /* printf("new_id_path is %s\n", new_id_path); */ -+ pci_ids_dir = opendir(new_id_path); ++ pci_ids_dir = opendir(new_id_path); + if (pci_ids_dir == NULL) + return 0; + @@ -78,10 +78,10 @@ diff -up pciutils-3.0.0/lib/names-parse.c.dird pciutils-3.0.0/lib/names-parse.c + { + if (! strcmp(dp->d_name, "..") || ! strcmp(dp->d_name, ".")) + continue; -+ if (strstr(dp->d_name, ".ids")) ++ if (strstr(dp->d_name, ".ids")) + { + tempsize = strnlen(new_id_path, PATH_MAX) + dp->d_reclen + 1; -+ temp = malloc(tempsize); /* This malloced memory is freed in the function pci_set_name_list_path() */ ++ temp = malloc(tempsize); /* This malloced memory is freed in the function pci_set_name_list_path() */ + memset(temp, 0, tempsize); + strncpy(temp, new_id_path, (strnlen(new_id_path, PATH_MAX))+1); + strncat(temp, dp->d_name, PATH_MAX - strnlen(temp, PATH_MAX)); @@ -99,7 +99,7 @@ diff -up pciutils-3.0.0/lib/names-parse.c.dird pciutils-3.0.0/lib/names-parse.c + }while (dp != NULL); + closedir(pci_ids_dir); + return 1; -+} ++} diff -up pciutils-3.0.0/lib/pci.h.dird pciutils-3.0.0/lib/pci.h --- pciutils-3.0.0/lib/pci.h.dird 2008-04-10 21:23:05.000000000 +0200 +++ pciutils-3.0.0/lib/pci.h 2008-09-01 15:17:23.000000000 +0200 diff --git a/pciutils-3.6.2.tar.gz b/pciutils-3.6.2.tar.gz deleted file mode 100644 index 07fbfd5d1f94c33541d7287cd1fe273764f8c20b..0000000000000000000000000000000000000000 Binary files a/pciutils-3.6.2.tar.gz and /dev/null differ diff --git a/pciutils-3.6.4.tar.gz b/pciutils-3.6.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d2a539c8be0466aa88c8279e290eae3e9ebedcb5 Binary files /dev/null and b/pciutils-3.6.4.tar.gz differ diff --git a/pciutils.spec b/pciutils.spec index cffc2c90b4d50206f4a7db3a3969d6125b56b550..4e26bc45ee0d82d76f1d8f4351cc005c690b7969 100644 --- a/pciutils.spec +++ b/pciutils.spec @@ -1,15 +1,11 @@ Name: pciutils -Version: 3.6.2 -Release: 5 +Version: 3.6.4 +Release: 1 Summary: PCI bus related utilities License: GPLv2+ URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml Source0: https://mirrors.edge.kernel.org/pub/software/utils/pciutils/%{name}-%{version}.tar.gz -# patch0 is from fedora, change pci.ids directory from /usr/share to /usr/share/hwdata -Patch0: 0000-pciutils-2.2.1-idpath.patch -# patch1 is from fedora, rhbz#195327 -Patch1: 0001-pciutils-dir-d.patch ExclusiveOS: Linux BuildRequires: gcc git sed kmod-devel pkgconfig zlib-devel @@ -19,6 +15,12 @@ Obsoletes: %{name}-libs Provides: %{name}-libs-debuginfo Obsoletes: %{name}-libs-debuginfo +#change pci.ids directory to hwdata, fedora/rhel specific +Patch6000: 6000-pciutils-2.2.1-idpath.patch + +#add support for directory with another pci.ids, rejected by upstream, rhbz#195327 +Patch6001: 6001-pciutils-dir-d.patch + %description The PCI Utilities are a collection of programs for inspecting and manipulating configuration of PCI devices, all based on a common portable library libpci which offers access to the PCI @@ -97,6 +99,7 @@ rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids* %{_libdir}/libpci.a %files help +%{_mandir}/man5/* %{_mandir}/man7/* %{_mandir}/man8/* @@ -104,6 +107,12 @@ rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids* rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 14 2020 linfeilong - 3.6.4-1 +- Type:enhancemnet +- ID:NA +- SUG:NA +- DESC:update to 3.6.4 + * Tue Mar 17 2020 hy-euler - 3.6.2-5 - Type:enhancemnet - ID:NA