- version 2.2.4
- truncate long device names (#205948) - Resolves: rhbz#205948
This commit is contained in:
parent
2535a62c55
commit
8944082ae9
@ -1 +1 @@
|
||||
pciutils-2.2.3.tar.gz
|
||||
pciutils-2.2.4.tar.gz
|
||||
|
58
pciutils-2.2.4-buf.patch
Normal file
58
pciutils-2.2.4-buf.patch
Normal file
@ -0,0 +1,58 @@
|
||||
--- pciutils-2.2.4/lib/names.c.buf 2006-09-09 12:46:39.000000000 +0200
|
||||
+++ pciutils-2.2.4/lib/names.c 2007-01-26 13:47:01.000000000 +0100
|
||||
@@ -372,12 +372,27 @@
|
||||
res = snprintf(buf, size, "%s", num);
|
||||
else if (!name)
|
||||
res = snprintf(buf, size, ((flags & PCI_LOOKUP_MIXED) ? "%s [%s]" : "%s %s"), unknown, num);
|
||||
- else if (!(flags & PCI_LOOKUP_MIXED))
|
||||
+ else if (!(flags & PCI_LOOKUP_MIXED))
|
||||
res = snprintf(buf, size, "%s", name);
|
||||
else
|
||||
res = snprintf(buf, size, "%s [%s]", name, num);
|
||||
- if (res < 0 || res >= size)
|
||||
+ if (res < 0 || res >= size) {
|
||||
+ if (name && res >= size) {
|
||||
+ int nlen = strlen(name);
|
||||
+ if (nlen > (res - size) + 5) {
|
||||
+ char *nname = strdup(name);
|
||||
+ int off = nlen - (res - size) - 5;
|
||||
+ if (nname) {
|
||||
+ nname[off] = '.';
|
||||
+ nname[off+1] = '.';
|
||||
+ nname[off+2] = '.';
|
||||
+ nname[off+3] = 0;
|
||||
+ return format_name(buf, size, flags, nname, num, unknown);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return "<pci_lookup_name: buffer too small>";
|
||||
+ }
|
||||
else
|
||||
return buf;
|
||||
}
|
||||
@@ -408,8 +423,24 @@
|
||||
else /* v && !d */
|
||||
res = snprintf(buf, size, "%s Unknown device %s", v, num+5);
|
||||
}
|
||||
- if (res < 0 || res >= size)
|
||||
+ if (res < 0 || res >= size) {
|
||||
+ if (d && res >= size) {
|
||||
+ int nlen = strlen(d);
|
||||
+ if (nlen > (res - size) + 5) {
|
||||
+ char *nname = strdup(d);
|
||||
+ int off = nlen - (res - size) - 5;
|
||||
+ if (nname) {
|
||||
+ nname[off] = '.';
|
||||
+ nname[off+1] = '.';
|
||||
+ nname[off+2] = '.';
|
||||
+ nname[off+3] = 0;
|
||||
+ return format_name_pair(buf, size, flags, v, nname, num);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return "<pci_lookup_name: buffer too small>";
|
||||
+ }
|
||||
else
|
||||
return buf;
|
||||
}
|
135
pciutils-2.2.4-multilib.patch
Normal file
135
pciutils-2.2.4-multilib.patch
Normal file
@ -0,0 +1,135 @@
|
||||
--- pciutils-2.2.4/lib/configure.multilib 2006-09-09 13:06:10.000000000 +0200
|
||||
+++ pciutils-2.2.4/lib/configure 2007-01-26 13:09:31.000000000 +0100
|
||||
@@ -35,74 +35,60 @@
|
||||
zlib=$5
|
||||
|
||||
c=config.h
|
||||
+cm=config.h.mk
|
||||
m=config.mk
|
||||
-echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
-echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
-rm -f $m
|
||||
+cat >$c <<EOF
|
||||
+#if defined(__x86_64__)
|
||||
+#define PCI_ARCH_X86_64
|
||||
+#elif defined(__ia64__)
|
||||
+#define PCI_ARCH_IA64
|
||||
+#elif defined(__i386__)
|
||||
+#define PCI_ARCH_I386
|
||||
+#define PCI_HAVE_PM_INTEL_CONF
|
||||
+#elif defined(__ppc64__) || defined(__powerpc64__)
|
||||
+#define PCI_ARCH_PPC64
|
||||
+#elif defined(__ppc__) || defined(__powerpc__)
|
||||
+#define PCI_ARCH_PPC
|
||||
+#elif defined(__s390x__)
|
||||
+#define PCI_ARCH_S390X
|
||||
+#elif defined(__s390__)
|
||||
+#define PCI_ARCH_S390
|
||||
+#else
|
||||
+#error Unknown Arch
|
||||
+#endif
|
||||
+#define PCI_OS_LINUX
|
||||
+#define PCI_HAVE_PM_LINUX_SYSFS
|
||||
+#define PCI_HAVE_PM_LINUX_PROC
|
||||
+#define PCI_HAVE_LINUX_BYTEORDER_H
|
||||
+#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
|
||||
+#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
|
||||
+#define PCI_HAVE_64BIT_ADDRESS
|
||||
+EOF
|
||||
+
|
||||
+#echo >$c "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
+#echo >>$c "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
+rm -f $cm
|
||||
+echo >$cm "#define PCI_ARCH_`echo $cpu | tr 'a-z' 'A-Z'`"
|
||||
+echo >>$cm "#define PCI_OS_`echo $sys | tr 'a-z' 'A-Z'`"
|
||||
|
||||
echo_n "Looking for access methods..."
|
||||
+echo_n " sysfs proc"
|
||||
|
||||
-case $sys in
|
||||
- linux*)
|
||||
- echo_n " sysfs proc"
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
- echo >>$c '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
- echo >>$c '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
- echo >>$c '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
- echo >>$c '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
- case $cpu in
|
||||
- i386) echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
- ;;
|
||||
- esac
|
||||
- echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
- ;;
|
||||
- sunos)
|
||||
- case $cpu in
|
||||
- i386) echo_n " i386-ports"
|
||||
- echo >>$c "#define PCI_HAVE_PM_INTEL_CONF"
|
||||
- ;;
|
||||
- *)
|
||||
- echo " The PCI library is does not support Solaris for this architecture: $cpu"
|
||||
- exit 1
|
||||
- ;;
|
||||
- esac
|
||||
- ;;
|
||||
- freebsd)
|
||||
- echo_n " fbsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_FBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_FBSD_DEVICE "/dev/pci"'
|
||||
- ;;
|
||||
- openbsd)
|
||||
- echo_n " obsd-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_OBSD_DEVICE'
|
||||
- echo >>$c '#define PCI_PATH_OBSD_DEVICE "/dev/pci"'
|
||||
- ;;
|
||||
- aix)
|
||||
- echo_n " aix-device"
|
||||
- echo >>$c '#define PCI_HAVE_PM_AIX_DEVICE'
|
||||
- echo >>$m 'CFLAGS=-g'
|
||||
- echo >>$m 'INSTALL=installbsd'
|
||||
- echo >>$m 'DIRINSTALL=mkdir -p'
|
||||
- ;;
|
||||
- netbsd)
|
||||
- echo_n " nbsd-libpci"
|
||||
- echo >>$c '#define PCI_HAVE_PM_NBSD_LIBPCI'
|
||||
- echo >>$c '#define PCI_PATH_NBSD_DEVICE "/dev/pci0"'
|
||||
- echo >>$m 'PCILIB=lib/libpciutils.a'
|
||||
- echo >>$m 'LDFLAGS+=-lpci'
|
||||
- ;;
|
||||
- gnu)
|
||||
- echo_n " i386-ports"
|
||||
- echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
- ;;
|
||||
- *)
|
||||
- echo " Unfortunately, your OS is not supported by the PCI Library"
|
||||
- exit 1
|
||||
- ;;
|
||||
+echo >>$cm '#define PCI_HAVE_PM_LINUX_SYSFS'
|
||||
+echo >>$cm '#define PCI_HAVE_PM_LINUX_PROC'
|
||||
+echo >>$cm '#define PCI_HAVE_LINUX_BYTEORDER_H'
|
||||
+echo >>$cm '#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"'
|
||||
+echo >>$cm '#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"'
|
||||
+case $cpu in
|
||||
+ i386) echo_n " i386-ports"
|
||||
+ echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
|
||||
+ ;;
|
||||
esac
|
||||
+echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
|
||||
+
|
||||
|
||||
echo >>$c '#define PCI_HAVE_PM_DUMP'
|
||||
+echo >>$cm '#define PCI_HAVE_PM_DUMP'
|
||||
echo " dump"
|
||||
|
||||
echo_n "Checking for zlib support... "
|
||||
@@ -124,6 +110,8 @@
|
||||
echo >>$c '#define PCI_IDS "pci.ids"'
|
||||
fi
|
||||
echo >>$c "#define PCI_PATH_IDS_DIR \"$idsdir\""
|
||||
-
|
||||
echo >>$c "#define PCILIB_VERSION \"$version\""
|
||||
-sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m
|
||||
+echo >>$cm "#define PCI_PATH_IDS_DIR \"$idsdir\""
|
||||
+echo >>$cm "#define PCILIB_VERSION \"$version\""
|
||||
+#sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m
|
||||
+sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$cm >>$m
|
@ -1,7 +1,7 @@
|
||||
--- pciutils-2.1.99-test3/Makefile.strip 2004-02-25 01:46:14.315787866 -0500
|
||||
+++ pciutils-2.1.99-test3/Makefile 2004-02-25 01:47:45.478046260 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
|
||||
--- pciutils-2.2.4/Makefile.strip 2007-01-26 12:44:56.000000000 +0100
|
||||
+++ pciutils-2.2.4/Makefile 2007-01-26 12:43:45.000000000 +0100
|
||||
@@ -27,7 +27,7 @@
|
||||
all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 $(PCI_IDS)
|
||||
|
||||
$(PCILIB): $(PCIINC) force
|
||||
- $(MAKE) -C lib all
|
||||
@ -9,14 +9,12 @@
|
||||
|
||||
force:
|
||||
|
||||
--- pciutils-2.1.99-test8/Makefile.foo 2005-05-10 15:24:45.000000000 -0400
|
||||
+++ pciutils-2.1.99-test8/Makefile 2005-05-10 15:24:50.000000000 -0400
|
||||
@@ -65,7 +65,7 @@
|
||||
@@ -58,7 +58,7 @@
|
||||
install: all
|
||||
# -c is ignored on Linux, but required on FreeBSD
|
||||
$(DIRINSTALL) -m 755 $(SBINDIR) $(IDSDIR) $(MANDIR)/man8
|
||||
- $(INSTALL) -c -m 755 -s lspci setpci $(SBINDIR)
|
||||
+ $(INSTALL) -c -m 755 lspci setpci $(SBINDIR)
|
||||
$(INSTALL) -c -m 755 update-pciids $(SBINDIR)
|
||||
$(INSTALL) -c -m 644 pci.ids $(IDSDIR)
|
||||
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(MANDIR)/man8
|
||||
$(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8
|
||||
- $(INSTALL) -c -m 755 -s lspci setpci $(DESTDIR)$(SBINDIR)
|
||||
+ $(INSTALL) -c -m 755 lspci setpci $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
|
||||
$(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
|
||||
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
|
||||
|
@ -1,15 +1,14 @@
|
||||
Name: pciutils
|
||||
Version: 2.2.3
|
||||
Release: 4
|
||||
Version: 2.2.4
|
||||
Release: 1
|
||||
Source: ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/%{name}-%{version}.tar.gz
|
||||
Patch0: pciutils-strip.patch
|
||||
Patch1: pciutils-2.2.4-buf.patch
|
||||
Patch2: pciutils-2.1.10-scan.patch
|
||||
Patch3: pciutils-havepread.patch
|
||||
Patch5: pciutils-devicetype.patch
|
||||
Patch6: pciutils-2.2.1-idpath.patch
|
||||
Patch7: pciutils-2.1.99-gcc4.patch
|
||||
Patch8: pciutils-2.2.3-multilib.patch
|
||||
Patch9: pciutils-2.2.3-sata.patch
|
||||
Patch8: pciutils-2.2.4-multilib.patch
|
||||
License: GPL
|
||||
URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
@ -35,13 +34,12 @@ devices connected to the PCI bus.
|
||||
%prep
|
||||
%setup -q -n pciutils-%{version}
|
||||
%patch0 -p1 -b .strip
|
||||
%patch1 -p1 -b .buf
|
||||
%patch2 -p1 -b .scan
|
||||
%patch3 -p1 -b .pread
|
||||
%patch5 -p1 -b .devicetype
|
||||
%patch6 -p1 -b .idpath
|
||||
%patch7 -p1 -b .glibcmacros
|
||||
%patch8 -p1 -b .multilib
|
||||
%patch9 -p1 -b .sata
|
||||
|
||||
%build
|
||||
make OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE=1" PREFIX="/usr" IDSDIR="/usr/share/hwdata"
|
||||
@ -74,6 +72,11 @@ install lib/types.h $RPM_BUILD_ROOT%{_includedir}/pci
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%changelog
|
||||
* Fri Jan 26 2007 Harald Hoyer <harald@redhat.com> - 2.2.4-1
|
||||
- version 2.2.4
|
||||
- truncate long device names (#205948)
|
||||
- Resolves: rhbz#205948
|
||||
|
||||
* Wed Aug 9 2006 Peter Jones <pjones@redhat.com> - 2.2.3-4
|
||||
- Add definitions for more pci storage classes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user