Update to 3.8.0
This commit is contained in:
parent
0ea9573fd2
commit
b0b5e5741f
@ -2,7 +2,7 @@ diff -up pciutils-3.0.0/Makefile.idpath pciutils-3.0.0/Makefile
|
|||||||
--- pciutils-3.0.0/Makefile.idpath 2008-04-10 21:19:43.000000000 +0200
|
--- pciutils-3.0.0/Makefile.idpath 2008-04-10 21:19:43.000000000 +0200
|
||||||
+++ pciutils-3.0.0/Makefile 2008-09-01 15:16:19.000000000 +0200
|
+++ pciutils-3.0.0/Makefile 2008-09-01 15:16:19.000000000 +0200
|
||||||
@@ -27,7 +27,7 @@ ABI_VERSION=.3
|
@@ -27,7 +27,7 @@ ABI_VERSION=.3
|
||||||
PREFIX=/usr/local
|
BINDIR=$(PREFIX)/bin
|
||||||
SBINDIR=$(PREFIX)/sbin
|
SBINDIR=$(PREFIX)/sbin
|
||||||
SHAREDIR=$(PREFIX)/share
|
SHAREDIR=$(PREFIX)/share
|
||||||
-IDSDIR=$(SHAREDIR)
|
-IDSDIR=$(SHAREDIR)
|
||||||
@ -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 @@
|
@@ -6,10 +6,13 @@
|
||||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
+#define _GNU_SOURCE
|
+#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -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,};
|
+ char new_id_path[PATH_MAX+1] = {0,};
|
||||||
+ DIR *pci_ids_dir;
|
+ DIR *pci_ids_dir;
|
||||||
+ struct dirent *dp;
|
+ struct dirent *dp;
|
||||||
+
|
+
|
||||||
+ strncpy(new_id_path, a->id_file_name, PATH_MAX);
|
+ strncpy(new_id_path, a->id_file_name, PATH_MAX);
|
||||||
+ new_id_path[PATH_MAX] = 0;
|
+ new_id_path[PATH_MAX] = 0;
|
||||||
+ strncat(new_id_path, ".d/", PATH_MAX - strnlen(new_id_path, PATH_MAX));
|
+ strncat(new_id_path, ".d/", PATH_MAX - strnlen(new_id_path, PATH_MAX));
|
||||||
+ /* printf("new_id_path is %s\n", new_id_path); */
|
+ /* 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)
|
+ if (pci_ids_dir == NULL)
|
||||||
+ return 0;
|
+ 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, "."))
|
+ if (! strcmp(dp->d_name, "..") || ! strcmp(dp->d_name, "."))
|
||||||
+ continue;
|
+ continue;
|
||||||
+ if (strstr(dp->d_name, ".ids"))
|
+ if (strstr(dp->d_name, ".ids"))
|
||||||
+ {
|
+ {
|
||||||
+ tempsize = strnlen(new_id_path, PATH_MAX) + dp->d_reclen + 1;
|
+ 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);
|
+ memset(temp, 0, tempsize);
|
||||||
+ strncpy(temp, new_id_path, (strnlen(new_id_path, PATH_MAX))+1);
|
+ strncpy(temp, new_id_path, (strnlen(new_id_path, PATH_MAX))+1);
|
||||||
+ strncat(temp, dp->d_name, PATH_MAX - strnlen(temp, PATH_MAX));
|
+ 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);
|
+ }while (dp != NULL);
|
||||||
+ closedir(pci_ids_dir);
|
+ closedir(pci_ids_dir);
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
diff -up pciutils-3.0.0/lib/pci.h.dird pciutils-3.0.0/lib/pci.h
|
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.dird 2008-04-10 21:23:05.000000000 +0200
|
||||||
+++ pciutils-3.0.0/lib/pci.h 2008-09-01 15:17:23.000000000 +0200
|
+++ pciutils-3.0.0/lib/pci.h 2008-09-01 15:17:23.000000000 +0200
|
||||||
42
0002-avoid-addng-multiple-version-tags.patch
Normal file
42
0002-avoid-addng-multiple-version-tags.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 0478e1f3928bfaa34eb910ba2cbaf1dda8f84aab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Mares <mj@ucw.cz>
|
||||||
|
Date: Wed, 10 Aug 2022 13:34:28 +0700
|
||||||
|
Subject: [PATCH] Avoid adding multiple version tags to the same symbol
|
||||||
|
|
||||||
|
This is apparently forbidden in most versions of binutils.
|
||||||
|
---
|
||||||
|
lib/filter.c | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/filter.c
|
||||||
|
+++ b/lib/filter.c
|
||||||
|
@@ -303,21 +303,25 @@ pci_filter_match_v30(struct pci_filter_v
|
||||||
|
// (their positions in struct pci_filter were declared as RFU).
|
||||||
|
|
||||||
|
STATIC_ALIAS(void pci_filter_init(struct pci_access *a, struct pci_filter *f), pci_filter_init_v38(a, f));
|
||||||
|
+DEFINE_ALIAS(void pci_filter_init_v33(struct pci_access *a, struct pci_filter *f), pci_filter_init_v38);
|
||||||
|
SYMBOL_VERSION(pci_filter_init_v30, pci_filter_init@LIBPCI_3.0);
|
||||||
|
-SYMBOL_VERSION(pci_filter_init_v38, pci_filter_init@LIBPCI_3.3);
|
||||||
|
+SYMBOL_VERSION(pci_filter_init_v33, pci_filter_init@LIBPCI_3.3);
|
||||||
|
SYMBOL_VERSION(pci_filter_init_v38, pci_filter_init@@LIBPCI_3.8);
|
||||||
|
|
||||||
|
STATIC_ALIAS(char *pci_filter_parse_slot(struct pci_filter *f, char *str), pci_filter_parse_slot_v38(f, str));
|
||||||
|
+DEFINE_ALIAS(char *pci_filter_parse_slot_v33(struct pci_filter *f, char *str), pci_filter_parse_slot_v38);
|
||||||
|
SYMBOL_VERSION(pci_filter_parse_slot_v30, pci_filter_parse_slot@LIBPCI_3.0);
|
||||||
|
-SYMBOL_VERSION(pci_filter_parse_slot_v38, pci_filter_parse_slot@LIBPCI_3.3);
|
||||||
|
+SYMBOL_VERSION(pci_filter_parse_slot_v33, pci_filter_parse_slot@LIBPCI_3.3);
|
||||||
|
SYMBOL_VERSION(pci_filter_parse_slot_v38, pci_filter_parse_slot@@LIBPCI_3.8);
|
||||||
|
|
||||||
|
STATIC_ALIAS(char *pci_filter_parse_id(struct pci_filter *f, char *str), pci_filter_parse_id_v38(f, str));
|
||||||
|
+DEFINE_ALIAS(char *pci_filter_parse_id_v33(struct pci_filter *f, char *str), pci_filter_parse_id_v38);
|
||||||
|
SYMBOL_VERSION(pci_filter_parse_id_v30, pci_filter_parse_id@LIBPCI_3.0);
|
||||||
|
-SYMBOL_VERSION(pci_filter_parse_id_v38, pci_filter_parse_id@LIBPCI_3.3);
|
||||||
|
+SYMBOL_VERSION(pci_filter_parse_id_v33, pci_filter_parse_id@LIBPCI_3.3);
|
||||||
|
SYMBOL_VERSION(pci_filter_parse_id_v38, pci_filter_parse_id@@LIBPCI_3.8);
|
||||||
|
|
||||||
|
STATIC_ALIAS(int pci_filter_match(struct pci_filter *f, struct pci_dev *d), pci_filter_match_v38(f, d));
|
||||||
|
+DEFINE_ALIAS(int pci_filter_match_v33(struct pci_filter *f, struct pci_dev *d), pci_filter_match_v38);
|
||||||
|
SYMBOL_VERSION(pci_filter_match_v30, pci_filter_match@LIBPCI_3.0);
|
||||||
|
-SYMBOL_VERSION(pci_filter_match_v38, pci_filter_match@LIBPCI_3.3);
|
||||||
|
+SYMBOL_VERSION(pci_filter_match_v33, pci_filter_match@LIBPCI_3.3);
|
||||||
|
SYMBOL_VERSION(pci_filter_match_v38, pci_filter_match@@LIBPCI_3.8);
|
||||||
Binary file not shown.
BIN
pciutils-3.8.0.tar.gz
Normal file
BIN
pciutils-3.8.0.tar.gz
Normal file
Binary file not shown.
@ -1,14 +1,20 @@
|
|||||||
Name: pciutils
|
Name: pciutils
|
||||||
Version: 3.6.4
|
Version: 3.8.0
|
||||||
Release: 4
|
Release: 1
|
||||||
Summary: PCI bus related utilities
|
Summary: PCI bus related utilities
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
|
URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
|
||||||
Source0: https://mirrors.edge.kernel.org/pub/software/utils/pciutils/%{name}-%{version}.tar.gz
|
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
|
||||||
|
#https://github.com/openwrt/packages/pull/19215
|
||||||
|
Patch2: 0002-avoid-addng-multiple-version-tags.patch
|
||||||
|
|
||||||
ExclusiveOS: Linux
|
ExclusiveOS: Linux
|
||||||
BuildRequires: gcc git sed kmod-devel pkgconfig zlib-devel
|
BuildRequires: gcc sed kmod-devel pkgconfig zlib-devel
|
||||||
|
|
||||||
%ifarch i686
|
%ifarch i686
|
||||||
BuildRequires: which kmod-libs
|
BuildRequires: which kmod-libs
|
||||||
@ -20,12 +26,6 @@ Obsoletes: %{name}-libs
|
|||||||
Provides: %{name}-libs-debuginfo
|
Provides: %{name}-libs-debuginfo
|
||||||
Obsoletes: %{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
|
%description
|
||||||
The PCI Utilities are a collection of programs for inspecting and manipulating configuration
|
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
|
of PCI devices, all based on a common portable library libpci which offers access to the PCI
|
||||||
@ -56,7 +56,7 @@ Requires: man
|
|||||||
This contains man files for the using of pciutils.
|
This contains man files for the using of pciutils.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -Sgit -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make SHARED="no" ZLIB="no" LIBKMOD=yes STRIP="" OPT="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" PREFIX="/usr" %{?_smp_mflags}
|
make SHARED="no" ZLIB="no" LIBKMOD=yes STRIP="" OPT="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" PREFIX="/usr" %{?_smp_mflags}
|
||||||
@ -91,7 +91,7 @@ rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids*
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc README ChangeLog pciutils.lsm COPYING
|
%doc README ChangeLog pciutils.lsm COPYING
|
||||||
/sbin/lspci
|
/usr/bin/lspci
|
||||||
/sbin/setpci
|
/sbin/setpci
|
||||||
/sbin/update-pciids
|
/sbin/update-pciids
|
||||||
/%{_lib}/libpci.so.*
|
/%{_lib}/libpci.so.*
|
||||||
@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT/usr/share/hwdata/pci.ids*
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 7 2023 liyanan <liyanan61@h-partners.com> - 3.8.0-1
|
||||||
|
- update to v3.8.0
|
||||||
|
|
||||||
* Tue Feb 9 2021 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 3.6.4-4
|
* Tue Feb 9 2021 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 3.6.4-4
|
||||||
- solve i686 dependency problem and set release num to 4 for CI
|
- solve i686 dependency problem and set release num to 4 for CI
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user