NetBSD Problem Report #50106

From www@NetBSD.org  Fri Jul 31 04:54:53 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 52B89A5864
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 31 Jul 2015 04:54:53 +0000 (UTC)
Message-Id: <20150731045451.D7E38A6551@mollari.NetBSD.org>
Date: Fri, 31 Jul 2015 04:54:51 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: misc/pciids update and use by x11/libpciaccess
X-Send-Pr-Version: www-1.0

>Number:         50106
>Category:       pkg
>Synopsis:       misc/pciids update and use by x11/libpciaccess
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wiz
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 31 04:55:00 +0000 2015
>Closed-Date:    Mon Sep 07 09:07:36 +0000 2015
>Last-Modified:  Thu Sep 10 13:20:00 +0000 2015
>Originator:     David Shao
>Release:        pkgsrc current
>Organization:
>Environment:
DragonFly  4.3-DEVELOPMENT DragonFly v4.2.2.180.gd30865-DEVELOPMENT #1: Thu Jul 30 17:24:45 PDT 2015     xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

>Description:
misc/pciids does not seem to have been updated since 2009.  Looking at the DragonFly dports / FreeBSD ports version of libpciaccess, theirs at devel/libpciaccess, there is a CONFIGURE_ARGS to allow to hard-code into libpciaccess the path where the pci.ids file can be found, presumably at /usr/pkg/share/pciids/pci.ids.  There is also a new site where the updated pci.ids can be found, not at Sourceforge, the new site being in the Czech Republic since the maintainer is currently an assistant professor there.

I have tested that for misc/pciids at least /usr/pkg/share/pciids is created and the file pci.ids is installed there.  I have also verified that during the build of sysutils/libpciaccess PCIIDS_PATH is set to /usr/pkg/share/pciids.  As for whether anything actually happens in the running of libdrm, modular-xorg-server, or MesaLib with the new libpciaccess, I have no idea.

pciids with these changes would no longer be frozen at a date in 2009.  The file's date might change, but how does one know whether the contents change?  Apparently the dports / ports Makefile for libpciaccess has some logic to test whether contents changed, but I did not try to translate that.  It is not like there is some pressing need to keep up with the very latest pci.ids, it is just that it might be nice to have the option to update it every year or so and not just leave it at 2009's.
>How-To-Repeat:

>Fix:
For misc/pciids:

Common subdirectories: pciids.orig/CVS and pciids/CVS
diff -bu pciids.orig/Makefile pciids/Makefile
--- pciids.orig/Makefile	2015-07-30 19:22:56.421791000 -0700
+++ pciids/Makefile	2015-07-30 20:33:31.698610000 -0700
@@ -1,12 +1,13 @@
 # $NetBSD: Makefile,v 1.9 2012/10/08 09:57:34 asau Exp $
 #

-DISTNAME=	pciids-20091229
+DISTNAME=	pciids-20150731
 CATEGORIES=	misc
-MASTER_SITES=	http://people.freebsd.org/~ahze/distfiles/
-EXTRACT_SUFX=	.tar.bz2
+DISTFILES=	pci.ids.bz2
+MASTER_SITES=	http://pci-ids.ucw.cz/v2.2/
+EXTRACT_SUFX=	.bz2

-MAINTAINER=	mark%coris.org.uk@localhost
+MAINTAINER=	mj%ucw.cz@localhost
 HOMEPAGE=	http://pciids.sourceforge.net/
 COMMENT=	Repository of PCI IDs (pci.ids database)
 LICENSE=	modified-bsd OR gnu-gpl-v2
@@ -15,6 +16,6 @@

 do-install:
 	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pciids
-	${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids
+	${INSTALL_DATA} ${WRKDIR}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

 .include "../../mk/bsd.pkg.mk"
diff -bu pciids.orig/buildlink3.mk pciids/buildlink3.mk
--- pciids.orig/buildlink3.mk	2015-07-30 19:22:56.421791000 -0700
+++ pciids/buildlink3.mk	2015-07-30 20:34:00.818314000 -0700
@@ -5,7 +5,7 @@
 .if !defined(PCIIDS_BUILDLINK3_MK)
 PCIIDS_BUILDLINK3_MK:=

-BUILDLINK_API_DEPENDS.pciids+=	pciids>=20061026
+BUILDLINK_API_DEPENDS.pciids+=	pciids>=20150731
 BUILDLINK_PKGSRCDIR.pciids?=	../../misc/pciids
 .endif # PCIIDS_BUILDLINK3_MK

diff -bu pciids.orig/distinfo pciids/distinfo
--- pciids.orig/distinfo	2015-07-30 19:22:56.421791000 -0700
+++ pciids/distinfo	2015-07-30 19:41:52.310763000 -0700
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.6 2010/02/05 12:59:46 wiz Exp $

-SHA1 (pciids-20091229.tar.bz2) = 6de623563a5e13f0f191b404dcd736cf56776181
-RMD160 (pciids-20091229.tar.bz2) = 3c7256739c4bdd4e5d5312764b21071ca8ae17ba
-Size (pciids-20091229.tar.bz2) = 156325 bytes
+SHA1 (pci.ids.bz2) = 203733da8cfb79d8225a1618f44697335e7e6026
+RMD160 (pci.ids.bz2) = c90168d403f93f8b48d6348daeb92c4aead94994
+Size (pci.ids.bz2) = 217786 bytes

For sysutils/libpciaccess:

diff -bu libpciaccess.orig/Makefile libpciaccess/Makefile
--- libpciaccess.orig/Makefile	2015-07-06 13:29:45.000000000 -0700
+++ libpciaccess/Makefile	2015-07-30 19:56:23.792953000 -0700
@@ -21,10 +21,12 @@

 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--with-zlib
+CONFIGURE_ARGS+=	--with-pciids-path=${PREFIX}/share/pciids
 USE_LIBTOOL=		yes
 USE_TOOLS+=		pkg-config

 PKGCONFIG_OVERRIDE+=	pciaccess.pc.in

+.include "../../misc/pciids/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/50106: misc/pciids update and use by x11/libpciaccess
Date: Fri, 31 Jul 2015 10:45:38 +0200

 On Fri, Jul 31, 2015 at 04:55:00AM +0000, davshao@gmail.com wrote:
 > -DISTNAME=	pciids-20091229
 > +DISTNAME=	pciids-20150731
 >  CATEGORIES=	misc
 > -MASTER_SITES=	http://people.freebsd.org/~ahze/distfiles/
 > -EXTRACT_SUFX=	.tar.bz2
 > +DISTFILES=	pci.ids.bz2
 > +MASTER_SITES=	http://pci-ids.ucw.cz/v2.2/
 > +EXTRACT_SUFX=	.bz2

 If the file name is not unique enough, we usually set DIST_SUBDIR.
 Also, this version is more usual:

 DISTNAME=	pci.ids
 PKGNAME=	pciids-20150731
 EXTRACT_SUFX=	.bz2
 DIST_SUBDIR=	 ${PKGNAME_NOREV}

 (then distinfo needs to be regen'd)

 > -MAINTAINER=	mark%coris.org.uk@localhost
 > +MAINTAINER=	mj%ucw.cz@localhost

 Why did you change the MAINTAINER this way?

  Thomas

Responsible-Changed-From-To: pkg-manager->wiz
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 01 Aug 2015 15:43:08 +0000
Responsible-Changed-Why:
wiz, may I assign this to you?


From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50106: misc/pciids update and use by x11/libpciaccess
Date: Sun, 6 Sep 2015 21:03:16 -0700

 Thank you for the helpful feedback.  The reason why I made the
 inexplicable MAINTAINER change is I didn't know what I was doing. :-)

 Also in my new proposed set of patches, I removed the change to
 buildlink3.mk because that isn't desired as well.

 There is a 2015-09-07 version of pci.ids.  I don't know if the actual
 pci data differs from that of the previous one(s).  I did check a
 pci.ids file with embedded date of 2015-09-07 is installed at
 /usr/pkg/share/pciids/


 diff -Nurb pciids.orig/Makefile pciids/Makefile
 --- pciids.orig/Makefile    2012-10-08 02:57:34.000000000 -0700
 +++ pciids/Makefile    2015-09-06 20:51:30.385700000 -0700
 @@ -1,10 +1,12 @@
  # $NetBSD: Makefile,v 1.9 2012/10/08 09:57:34 asau Exp $
  #

 -DISTNAME=    pciids-20091229
 +DISTNAME=    pci.ids
  CATEGORIES=    misc
 -MASTER_SITES=    http://people.freebsd.org/~ahze/distfiles/
 -EXTRACT_SUFX=    .tar.bz2
 +PKGNAME=    pciids-20150907
 +EXTRACT_SUFX=    .bz2
 +DIST_SUBDIR=    ${PKGNAME_NOREV}
 +MASTER_SITES=    http://pci-ids.ucw.cz/v2.2/

  MAINTAINER=    mark%coris.org.uk@localhost
  HOMEPAGE=    http://pciids.sourceforge.net/
 @@ -15,6 +17,6 @@

  do-install:
      ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pciids
 -    ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids
 +    ${INSTALL_DATA} ${WRKDIR}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

  .include "../../mk/bsd.pkg.mk"
 diff -Nurb pciids.orig/distinfo pciids/distinfo
 --- pciids.orig/distinfo    2010-02-05 04:59:46.000000000 -0800
 +++ pciids/distinfo    2015-09-06 20:36:44.696056000 -0700
 @@ -1,5 +1,5 @@
 -$NetBSD: distinfo,v 1.6 2010/02/05 12:59:46 wiz Exp $
 +$NetBSD$

 -SHA1 (pciids-20091229.tar.bz2) = 6de623563a5e13f0f191b404dcd736cf56776181
 -RMD160 (pciids-20091229.tar.bz2) = 3c7256739c4bdd4e5d5312764b21071ca8ae17ba
 -Size (pciids-20091229.tar.bz2) = 156325 bytes
 +SHA1 (pciids-20150907/pci.ids.bz2) = d725f7bf3c868e2d9a133d0c6ee55c5185575f28
 +RMD160 (pciids-20150907/pci.ids.bz2) = bbf85850096ea5909ce16a1ca1dbbdc73924d1c0
 +Size (pciids-20150907/pci.ids.bz2) = 219031 bytes

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 07 Sep 2015 09:07:36 +0000
State-Changed-Why:
Fixed, thanks!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50106 CVS commit: pkgsrc/sysutils/libpciaccess
Date: Mon, 7 Sep 2015 09:07:18 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon Sep  7 09:07:18 UTC 2015

 Modified Files:
 	pkgsrc/sysutils/libpciaccess: Makefile

 Log Message:
 Use pci.ids file from pciids package.

 From David Shao in PR 50106.
 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.23 -r1.24 pkgsrc/sysutils/libpciaccess/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50106 CVS commit: pkgsrc/misc/pciids
Date: Mon, 7 Sep 2015 08:55:57 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Mon Sep  7 08:55:57 UTC 2015

 Modified Files:
 	pkgsrc/misc/pciids: Makefile distinfo

 Log Message:
 Update to 20150907, from David Shao in PR 50106.

 Hand-applied (due to gnats vs. whitespace) and pkglinted.

 Changes: more ids, what else :)


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/misc/pciids/Makefile
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/misc/pciids/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50106: misc/pciids update and use by x11/libpciaccess
Date: Mon, 7 Sep 2015 14:57:36 -0700

 The updates to misc/pciids and sysutils/libpciaccess, as well as
 (bmake) replace package clean for x11/libdrm, graphics/MesaLib
 (10.6.5), and x11/modular-xorg-server, seemed to go without incident
 for DragonFly 4.3-DEVELOPMENT, FreeBSD 10.2 release, FreeBSD 11
 current, and NetBSD 7.99.21 amd64 X11_TYPE=modular systems.

 Thanks for the updates!

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50106: misc/pciids update and use by x11/libpciaccess
Date: Wed, 9 Sep 2015 23:59:30 -0700

 Sorry for the blunder about the constantly changing versions of pci.ids.

 Below is a patch that will match what FreeBSD ports does.
 Unfortunately the version for pciids is now 20150901 previous to
 20150907.  Fortunately I believe that since the only effect of pciids
 is to install a data file at /usr/pkg/share/pciids/pci.ids, something
 similar to what I have tested:

 pkg_delete -f pciids-20150907
 cd /usr/pkgsrc/misc/pciids
 make clean && make install package clean

 should replace pci.ids with something replicable.

 As an aside, is the

 INSTALLATION_DIRS=    share/pciids
 ...

 do-install:
 ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

 equivalent to the previous

 do-install:
 ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pciids
 ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

 Finally here is the patch.

 diff -Nurb pciids.orig/Makefile pciids/Makefile
 --- pciids.orig/Makefile    2015-09-07 06:15:39.804229000 -0700
 +++ pciids/Makefile    2015-09-09 23:35:49.949445000 -0700
 @@ -1,22 +1,19 @@
  # $NetBSD: Makefile,v 1.10 2015/09/07 08:55:57 wiz Exp $

 -DISTNAME=    pci.ids
 -PKGNAME=    pciids-20150907
 +DISTNAME=    pciids-20150901
  CATEGORIES=    misc
 -MASTER_SITES=    http://pci-ids.ucw.cz/v2.2/
 -EXTRACT_SUFX=    .bz2
 +MASTER_SITES=    ${MASTER_SITE_FREEBSD_LOCAL:=sunpoet/}
 +EXTRACT_SUFX=    .tar.xz

  MAINTAINER=    mark@coris.org.uk
  HOMEPAGE=    http://pciids.sourceforge.net/
  COMMENT=    Repository of PCI IDs (pci.ids database)
  LICENSE=    modified-bsd OR gnu-gpl-v2

 -DIST_SUBDIR=    ${PKGNAME_NOREV}
 -
  INSTALLATION_DIRS=    share/pciids
  NO_BUILD=        yes

  do-install:
 -    ${INSTALL_DATA} ${WRKDIR}/pci.ids ${DESTDIR}${PREFIX}/share/pciids
 +    ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

  .include "../../mk/bsd.pkg.mk"
 diff -Nurb pciids.orig/distinfo pciids/distinfo
 --- pciids.orig/distinfo    2015-09-07 06:15:39.804229000 -0700
 +++ pciids/distinfo    2015-09-09 23:18:35.841779000 -0700
 @@ -1,5 +1,5 @@
 -$NetBSD: distinfo,v 1.7 2015/09/07 08:55:57 wiz Exp $
 +$NetBSD$

 -SHA1 (pciids-20150907/pci.ids.bz2) = d725f7bf3c868e2d9a133d0c6ee55c5185575f28
 -RMD160 (pciids-20150907/pci.ids.bz2) = bbf85850096ea5909ce16a1ca1dbbdc73924d1c0
 -Size (pciids-20150907/pci.ids.bz2) = 219031 bytes
 +SHA1 (pciids-20150901.tar.xz) = caf0b54346d356fb2abc9dc1fc7daaf3df13847c
 +RMD160 (pciids-20150901.tar.xz) = a63d748c7f6cc01839261adb244ce12e10b028fa
 +Size (pciids-20150901.tar.xz) = 178960 bytes

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50106: misc/pciids update and use by x11/libpciaccess
Date: Thu, 10 Sep 2015 15:18:30 +0200

 On Thu, Sep 10, 2015 at 07:00:01AM +0000, David Shao wrote:
 >  Sorry for the blunder about the constantly changing versions of pci.ids.

 No, that's fine. DIST_SUBDIR handles this.

 >  Below is a patch that will match what FreeBSD ports does.

 They make their own separate copy of the distfile under a new name.

 >  As an aside, is the
 >  
 >  INSTALLATION_DIRS=    share/pciids
 >  ...
 >  
 >  do-install:
 >  ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids
 >  
 >  equivalent to the previous
 >  
 >  do-install:
 >  ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pciids
 >  ${INSTALL_DATA} ${WRKSRC}/pci.ids ${DESTDIR}${PREFIX}/share/pciids

 Yes. pkglint suggests the upper version of the two.

 >  Finally here is the patch.

 I'd actually prefer to leave it alone for now. The distfile is on
 nbftp, so everyone can install it correctly.
  Thomas

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.