rpms/pciutils/devel pciutils-3.0.0-multilib.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 pciutils-dir-d.patch, 1.2, 1.3 pciutils.spec, 1.59, 1.60 sources, 1.15, 1.16 pciutils-strip.patch, 1.8, NONE

Harald Hoyer (harald) fedora-extras-commits at redhat.com
Mon Jun 2 05:48:36 UTC 2008


Author: harald

Update of /cvs/pkgs/rpms/pciutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31839

Modified Files:
	.cvsignore pciutils-dir-d.patch pciutils.spec sources 
Added Files:
	pciutils-3.0.0-multilib.patch 
Removed Files:
	pciutils-strip.patch 
Log Message:
* Mon Jun 02 2008 Harald Hoyer <harald at redhat.com> 3.0.0-1
- version 3.0.0


pciutils-3.0.0-multilib.patch:

--- NEW FILE pciutils-3.0.0-multilib.patch ---
diff -up pciutils-3.0.0/lib/configure.multilib pciutils-3.0.0/lib/configure
--- pciutils-3.0.0/lib/configure.multilib	2008-04-10 21:15:47.000000000 +0200
+++ pciutils-3.0.0/lib/configure	2008-06-02 06:46:35.000000000 +0200
@@ -41,28 +41,61 @@ sys=`echo $host | sed 's/^\([^-]*\)-\([^
 echo " $host $rel"
 
 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]'`"
 echo >$m 'WITH_LIBS='
+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
+#elif defined(__alpha__)
+#define PCI_ARCH_ALPHA
+#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
+
+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"'
+		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|x86_64)	echo_n " i386-ports"
-						echo >>$c '#define PCI_HAVE_PM_INTEL_CONF'
+						echo >>$cm '#define PCI_HAVE_PM_INTEL_CONF'
 						;;
 		esac
-		echo >>$c '#define PCI_HAVE_64BIT_ADDRESS'
-		echo >>$c '#define PCI_USE_DNS'
+		echo >>$cm '#define PCI_HAVE_64BIT_ADDRESS'
+		echo >>$cm '#define PCI_USE_DNS'
 		;;
 	sunos)
 		case $cpu in
@@ -110,7 +143,7 @@ case $sys in
 		;;
 esac
 
-echo >>$c '#define PCI_HAVE_PM_DUMP'
+echo >>$cm '#define PCI_HAVE_PM_DUMP'
 echo " dump"
 
 echo_n "Checking for zlib support... "
@@ -133,6 +166,7 @@ else
 	echo >>$c '#define PCI_IDS "pci.ids"'
 fi
 echo >>$c "#define PCI_PATH_IDS_DIR \"$IDSDIR\""
+echo >>$cm "#define PCI_PATH_IDS_DIR \"$IDSDIR\""
 
 echo_n "Checking for DNS support... "
 if [ "$DNS" = yes -o "$DNS" = no ] ; then
@@ -168,4 +202,5 @@ fi
 echo >>$m 'PCILIBPC=$(LIBNAME).pc'
 
 echo >>$c "#define PCILIB_VERSION \"$VERSION\""
-sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$c >>$m
+echo >>$cm "#define PCILIB_VERSION \"$VERSION\""
+sed '/"/{s/^#define \([^ ]*\) "\(.*\)"$/\1=\2/;p;d;};s/^#define \(.*\)/\1=1/' <$cm >>$m
\ No newline at end of file


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/.cvsignore,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- .cvsignore	20 Feb 2008 10:07:58 -0000	1.15
+++ .cvsignore	2 Jun 2008 05:47:56 -0000	1.16
@@ -1 +1 @@
-pciutils-2.2.10.tar.gz
+pciutils-3.0.0.tar.gz

pciutils-dir-d.patch:

Index: pciutils-dir-d.patch
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/pciutils-dir-d.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pciutils-dir-d.patch	21 Jan 2008 13:31:25 -0000	1.2
+++ pciutils-dir-d.patch	2 Jun 2008 05:47:56 -0000	1.3
@@ -1,64 +1,56 @@
-diff -up pciutils-2.2.9/lib/pci.h.dird pciutils-2.2.9/lib/pci.h
---- pciutils-2.2.9/lib/pci.h.dird	2006-09-09 14:46:06.000000000 +0200
-+++ pciutils-2.2.9/lib/pci.h	2008-01-21 14:27:27.000000000 +0100
-@@ -162,6 +162,7 @@ char *pci_lookup_name(struct pci_access 
- int pci_load_name_list(struct pci_access *a);	/* Called automatically by pci_lookup_*() when needed; returns success */
- void pci_free_name_list(struct pci_access *a);	/* Called automatically by pci_cleanup() */
- void pci_set_name_list_path(struct pci_access *a, char *name, int to_be_freed);
-+int pci_new_load_name_list(struct pci_access *a);
+diff -up pciutils-3.0.0/lib/names-parse.c.dird pciutils-3.0.0/lib/names-parse.c
+--- pciutils-3.0.0/lib/names-parse.c.dird	2008-04-10 21:15:47.000000000 +0200
++++ pciutils-3.0.0/lib/names-parse.c	2008-06-02 07:39:59.000000000 +0200
+@@ -6,10 +6,13 @@
+  *	Can be freely distributed and used under the terms of the GNU GPL.
+  */
  
- enum pci_lookup_mode {
-   PCI_LOOKUP_VENDOR = 1,		/* Vendor name (args: vendorID) */
-diff -up pciutils-2.2.9/lib/names.c.dird pciutils-2.2.9/lib/names.c
---- pciutils-2.2.9/lib/names.c.dird	2008-01-21 14:27:27.000000000 +0100
-+++ pciutils-2.2.9/lib/names.c	2008-01-21 14:29:55.000000000 +0100
-@@ -11,6 +11,8 @@
- #include <stdarg.h>
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
  #include <string.h>
  #include <errno.h>
 +#include <dirent.h>
 +#include <libgen.h>
  
  #include "internal.h"
- 
-@@ -183,7 +185,7 @@ static inline int id_white_p(int c)
-   return (c == ' ') || (c == '\t');
+ #include "names.h"
+@@ -82,7 +85,7 @@ static inline int id_white_p(int c)
  }
  
+ 
 -static const char *id_parse_list(struct pci_access *a, pci_file f, int *lino)
 +static const char *id_parse_list(struct pci_access *a, pci_file f, int *lino, int flags)
  {
    char line[MAX_LINE];
    char *p;
-@@ -308,7 +310,7 @@ static const char *id_parse_list(struct 
+@@ -207,7 +210,7 @@ static const char *id_parse_list(struct 
  	p++;
        if (!*p)
  	return parse_error;
--      if (id_insert(a, cat, id1, id2, id3, id4, p))
-+      if (id_insert(a, cat, id1, id2, id3, id4, p) && flags)
+-      if (pci_id_insert(a, cat, id1, id2, id3, id4, p, SRC_LOCAL))
++      if (pci_id_insert(a, cat, id1, id2, id3, id4, p, SRC_LOCAL) && flags)
  	return "Duplicate entry";
      }
    return NULL;
-@@ -324,15 +326,15 @@ pci_load_name_list(struct pci_access *a)
+@@ -223,13 +226,14 @@ pci_load_name_list(struct pci_access *a)
    pci_free_name_list(a);
-   a->hash_load_failed = 1;
+   a->id_load_failed = 1;
    if (!(f = pci_open(a)))
 -    return 0;
-+    pci_new_load_name_list(a);
-   a->id_hash = pci_malloc(a, sizeof(struct id_entry *) * HASH_SIZE);
-   memset(a->id_hash, 0, sizeof(struct id_entry *) * HASH_SIZE);
 -  err = id_parse_list(a, f, &lino);
++    pci_new_load_name_list(a);
 +  err = id_parse_list(a, f, &lino, 0);
    PCI_ERROR(f, err);
    pci_close(f);
    if (err)
      a->error("%s at %s, line %d\n", err, a->id_file_name, lino);
--  a->hash_load_failed = 0;
+   a->id_load_failed = 0;
 +  pci_new_load_name_list(a);
    return 1;
  }
  
-@@ -548,3 +550,49 @@ void pci_set_name_list_path(struct pci_a
+@@ -249,3 +253,48 @@ pci_set_name_list_path(struct pci_access
    a->id_file_name = name;
    a->free_id_name = to_be_freed;
  }
@@ -91,7 +83,7 @@
 +             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() */ 
 +             memset(temp, 0, tempsize);
-+             strncpy(temp, new_id_path, (strnlen(new_id_path, temp))+1);
++             strncpy(temp, new_id_path, (strnlen(new_id_path, PATH_MAX))+1);
 +             strncat(temp, dp->d_name, PATH_MAX - strnlen(temp, PATH_MAX));
 +             /* printf("Found file %s, processing it\n", temp); */
 +             pci_set_name_list_path(a, temp, 1);
@@ -102,9 +94,19 @@
 +             pci_close(f);
 +             if (err)
 +               a->error("%s at %s, line %d\n", err, a->id_file_name, lino);
-+             a->hash_load_failed = 0;
 +            }
 +       }
 +    }while (dp != NULL);
 +  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-06-02 07:39:41.000000000 +0200
+@@ -194,6 +194,7 @@ int pci_load_name_list(struct pci_access
+ void pci_free_name_list(struct pci_access *a) PCI_ABI;	/* Called automatically by pci_cleanup() */
+ void pci_set_name_list_path(struct pci_access *a, char *name, int to_be_freed) PCI_ABI;
+ void pci_id_cache_flush(struct pci_access *a) PCI_ABI;
++int pci_new_load_name_list(struct pci_access *a);
+ 
+ enum pci_lookup_mode {
+   PCI_LOOKUP_VENDOR = 1,		/* Vendor name (args: vendorID) */


Index: pciutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/pciutils.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- pciutils.spec	27 May 2008 00:07:16 -0000	1.59
+++ pciutils.spec	2 Jun 2008 05:47:56 -0000	1.60
@@ -1,14 +1,13 @@
 Name:		pciutils
-Version:	2.2.10
-Release: 	2%{?dist}
+Version:	3.0.0
+Release: 	1%{?dist}
 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
 Patch6: 	pciutils-2.2.1-idpath.patch
 Patch7:		pciutils-2.1.99-gcc4.patch
-Patch8: 	pciutils-2.2.10-multilib.patch
+Patch8: 	pciutils-3.0.0-multilib.patch
 Patch9: 	pciutils-dir-d.patch
 Patch10:	pciutils-2.2.10-sparc-support.patch
 License:	GPLv2+
@@ -16,7 +15,7 @@
 BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExclusiveOS: 	Linux
 Requires:	hwdata
-BuildRequires:	zlib-devel sed
+BuildRequires:	sed
 Summary: PCI bus related utilities
 Group: Applications/System
 
@@ -35,9 +34,16 @@
 This package contains a library for inspecting and setting
 devices connected to the PCI bus.
 
+%package libs
+Summary: Linux PCI library
+Group: System Environment/Libraries
+
+%description libs
+This package contains a library for inspecting and setting
+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
@@ -49,38 +55,59 @@
 sed -i -e 's/^SRC=.*/SRC="http:\/\/pciids.sourceforge.net\/pci.ids"/' update-pciids.sh
 
 %build
-make OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE=1" PREFIX="/usr" IDSDIR="/usr/share/hwdata" PCI_IDS="pci.ids" %{?_smp_mflags}
+make SHARED="no" ZLIB="no" STRIP="" OPT="$RPM_OPT_FLAGS" PREFIX="/usr" IDSDIR="/usr/share/hwdata" PCI_IDS="pci.ids" %{?_smp_mflags}
+mv lib/libpci.a lib/libpci.a.toinstall
+
+make clean
 
+make SHARED="yes" ZLIB="no" STRIP="" OPT="$RPM_OPT_FLAGS" PREFIX="/usr" IDSDIR="/usr/share/hwdata" PCI_IDS="pci.ids" %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 install -d $RPM_BUILD_ROOT/{sbin,%{_mandir}/man8,%{_libdir},%{_libdir}/pkgconfig,%{_includedir}/pci}
 
 install -p lspci setpci update-pciids $RPM_BUILD_ROOT/sbin
 install -p lspci.8 setpci.8 update-pciids.8 $RPM_BUILD_ROOT%{_mandir}/man8
+install -p  lib/libpci.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
+ln -s $(basename $RPM_BUILD_ROOT%{_libdir}/*.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libpci.so
+
+mv lib/libpci.a.toinstall lib/libpci.a
 install -p lib/libpci.a $RPM_BUILD_ROOT%{_libdir}
+/sbin/ldconfig -N $RPM_BUILD_ROOT%{_libdir}
 install -p lib/pci.h $RPM_BUILD_ROOT%{_includedir}/pci
 install -p lib/header.h $RPM_BUILD_ROOT%{_includedir}/pci
 install -p lib/config.h $RPM_BUILD_ROOT%{_includedir}/pci
 install -p lib/types.h $RPM_BUILD_ROOT%{_includedir}/pci
 install -p lib/libpci.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig
 
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
 %files
 %defattr(0644, root, root, 0755)
 %{_mandir}/man8/*
 %attr(0755, root, root) /sbin/*
 %doc README ChangeLog pciutils.lsm
 
+%files libs
+%{_libdir}/libpci.so.*
+
 %files devel
 %defattr(0644, root, root, 0755)
 %{_libdir}/pkgconfig/libpci.pc
 %{_libdir}/libpci.a
+%{_libdir}/libpci.so
 %{_includedir}/pci
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Mon Jun 02 2008 Harald Hoyer <harald at redhat.com> 3.0.0-1
+- version 3.0.0
+
 * Mon May 26 2008 Tom "spot" Callaway <tcallawa at redhat.com> 2.2.10-2
 - add sparc support
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/pciutils/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sources	20 Feb 2008 10:07:58 -0000	1.15
+++ sources	2 Jun 2008 05:47:56 -0000	1.16
@@ -1 +1 @@
-808e1356ea7a288237371fdecba3f689  pciutils-2.2.10.tar.gz
+ba7dd55e568e2ea27b8b8cc2e3d46597  pciutils-3.0.0.tar.gz


--- pciutils-strip.patch DELETED ---




More information about the fedora-extras-commits mailing list