summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin>2017-07-07 10:13:57 +0000
committerjperkin <jperkin>2017-07-07 10:13:57 +0000
commit2144f0c1e3a2c90de51c31addf96d70a68fed682 (patch)
tree15b2deaecc9c0e1d82899bbf3af2724426500949
parent78d76920f83f55fafe017399101d5500bbdd9049 (diff)
downloadpkgsrc-2144f0c1e3a2c90de51c31addf96d70a68fed682.tar.gz
Revert upstream Oracle patch which breaks illumos and probably older SunOS
releases. Bump PKGREVISION.
-rw-r--r--sysutils/libpciaccess/Makefile3
-rw-r--r--sysutils/libpciaccess/distinfo3
-rw-r--r--sysutils/libpciaccess/patches/patch-src_solx__devfs.c92
3 files changed, 96 insertions, 2 deletions
diff --git a/sysutils/libpciaccess/Makefile b/sysutils/libpciaccess/Makefile
index fe64a6c6707..cf954f646c1 100644
--- a/sysutils/libpciaccess/Makefile
+++ b/sysutils/libpciaccess/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.27 2017/04/07 08:53:28 wiz Exp $
+# $NetBSD: Makefile,v 1.28 2017/07/07 10:13:57 jperkin Exp $
DISTNAME= libpciaccess-0.13.5
+PKGREVISION= 1
CATEGORIES= sysutils x11
MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
EXTRACT_SUFX= .tar.bz2
diff --git a/sysutils/libpciaccess/distinfo b/sysutils/libpciaccess/distinfo
index 9bf6a40b52f..547d1d51116 100644
--- a/sysutils/libpciaccess/distinfo
+++ b/sysutils/libpciaccess/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.33 2017/04/07 08:53:28 wiz Exp $
+$NetBSD: distinfo,v 1.34 2017/07/07 10:13:57 jperkin Exp $
SHA1 (libpciaccess-0.13.5.tar.bz2) = ea98c13623e218359ca6d9af9ab9aa4780201a5b
RMD160 (libpciaccess-0.13.5.tar.bz2) = a691b7213132d4e50a49b650524937f2a7271d0b
SHA512 (libpciaccess-0.13.5.tar.bz2) = 4b77aa66b3429fd5f9bff0408b0624305e766bf209f3fa2a0a9024df55bf87ca68f9a5aa34f97ffe131997e0669c65cf542210cf308c0de09842424968c5a159
Size (libpciaccess-0.13.5.tar.bz2) = 381729 bytes
SHA1 (patch-src_common__interface.c) = cac11689864531fa4721e09374ead730bd1691a6
+SHA1 (patch-src_solx__devfs.c) = 18bfd9899da30061199232ae2ebc5ead8d4d7a47
diff --git a/sysutils/libpciaccess/patches/patch-src_solx__devfs.c b/sysutils/libpciaccess/patches/patch-src_solx__devfs.c
new file mode 100644
index 00000000000..bd04bac870c
--- /dev/null
+++ b/sysutils/libpciaccess/patches/patch-src_solx__devfs.c
@@ -0,0 +1,92 @@
+$NetBSD: patch-src_solx__devfs.c,v 1.5 2017/07/07 10:13:57 jperkin Exp $
+
+Revert upstream commit fe556c48dad96717b0ba71d489575c6b90b46448 which breaks
+device lookup completely on illumos.
+
+--- src/solx_devfs.c.orig 2017-04-04 13:46:41.000000000 +0000
++++ src/solx_devfs.c
+@@ -1,6 +1,6 @@
+ /*
+ * (C) Copyright IBM Corporation 2006
+- * Copyright (c) 2007, 2009, 2011, 2012, 2016 Oracle and/or its affiliates.
++ * Copyright (c) 2007, 2009, 2011, 2012, 2015 Oracle and/or its affiliates.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+@@ -65,7 +65,7 @@ typedef struct nexus {
+ int first_bus;
+ int last_bus;
+ int domain;
+- char *path; /* for open */
++ char *path; /* for errors/debugging; fd is all we need */
+ char *dev_path;
+ struct nexus *next;
+ } nexus_t;
+@@ -297,6 +297,7 @@ probe_nexus_node(di_node_t di_node, di_m
+ int pci_node = 0;
+ int first_bus = 0, last_bus = PCI_REG_BUS_G(PCI_REG_BUS_M);
+ int domain = 0;
++ di_node_t rnode = DI_NODE_NIL;
+ #ifdef __sparc
+ int bus_range_found = 0;
+ int device_type_found = 0;
+@@ -422,12 +423,21 @@ probe_nexus_node(di_node_t di_node, di_m
+ nexus->dev_path = strdup(nexus_dev_path);
+ di_devfs_path_free(nexus_dev_path);
+
++ if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
++ (void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
++ close(fd);
++ free(nexus->path);
++ free(nexus->dev_path);
++ free(nexus);
++ return (DI_WALK_TERMINATE);
++ }
++
+ /* Walk through devices under the rnode */
+ args.pinfo = pinfo;
+ args.nexus = nexus;
+ args.ret = 0;
+
+- (void) di_walk_node(di_node, DI_WALK_CLDFIRST, (void *)&args, probe_device_node);
++ (void) di_walk_node(rnode, DI_WALK_CLDFIRST, (void *)&args, probe_device_node);
+
+ close(fd);
+
+@@ -435,6 +445,7 @@ probe_nexus_node(di_node_t di_node, di_m
+ free(nexus->path);
+ free(nexus->dev_path);
+ free(nexus);
++ di_fini(rnode);
+ return (DI_WALK_TERMINATE);
+ }
+
+@@ -446,6 +457,10 @@ probe_nexus_node(di_node_t di_node, di_m
+ free(nexus);
+ }
+
++ if (rnode != DI_NODE_NIL) {
++ di_fini(rnode);
++ }
++
+ return DI_WALK_CONTINUE;
+ }
+
+@@ -538,7 +553,7 @@ pci_device_solx_devfs_probe( struct pci_
+ * starting to find if it is MEM/MEM64/IO
+ * using libdevinfo
+ */
+- if ((rnode = di_init(nexus->dev_path, DINFOCACHE)) == DI_NODE_NIL) {
++ if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
+ err = errno;
+ (void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
+ } else {
+@@ -1070,7 +1085,7 @@ pci_system_solx_devfs_create( void )
+ return 0;
+ }
+
+- if ((di_node = di_init("/", DINFOCACHE)) == DI_NODE_NIL) {
++ if ((di_node = di_init("/", DINFOCPYALL)) == DI_NODE_NIL) {
+ err = errno;
+ (void) fprintf(stderr, "di_init() failed: %s\n",
+ strerror(errno));