pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/libpciaccess Revert upstream Oracle patch whi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d5044e980db7
branches: trunk
changeset: 364940:d5044e980db7
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Fri Jul 07 10:13:57 2017 +0000
description:
Revert upstream Oracle patch which breaks illumos and probably older SunOS
releases. Bump PKGREVISION.
diffstat:
sysutils/libpciaccess/Makefile | 3 +-
sysutils/libpciaccess/distinfo | 3 +-
sysutils/libpciaccess/patches/patch-src_solx__devfs.c | 92 +++++++++++++++++++
3 files changed, 96 insertions(+), 2 deletions(-)
diffs (121 lines):
diff -r 6982e4fcfed0 -r d5044e980db7 sysutils/libpciaccess/Makefile
--- a/sysutils/libpciaccess/Makefile Fri Jul 07 10:08:48 2017 +0000
+++ b/sysutils/libpciaccess/Makefile Fri Jul 07 10:13:57 2017 +0000
@@ -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 -r 6982e4fcfed0 -r d5044e980db7 sysutils/libpciaccess/distinfo
--- a/sysutils/libpciaccess/distinfo Fri Jul 07 10:08:48 2017 +0000
+++ b/sysutils/libpciaccess/distinfo Fri Jul 07 10:13:57 2017 +0000
@@ -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 -r 6982e4fcfed0 -r d5044e980db7 sysutils/libpciaccess/patches/patch-src_solx__devfs.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libpciaccess/patches/patch-src_solx__devfs.c Fri Jul 07 10:13:57 2017 +0000
@@ -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));
Home |
Main Index |
Thread Index |
Old Index