[gentoo-commits] proj/musl:master commit in: sys-apps/pciutils/files/

2018-07-02 Thread Jory Pratt
commit: 3c40cf0049ff686bc61aec0b548ef04ca9e6a04f
Author: Jory A. Pratt  gentoo  org>
AuthorDate: Mon Jul  2 23:41:16 2018 +
Commit: Jory Pratt  gentoo  org>
CommitDate: Mon Jul  2 23:41:16 2018 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=3c40cf00

Use proper patch which includes a description of the change

 .../pciutils/files/pciutils-3.6.0-realpath.patch| 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/sys-apps/pciutils/files/pciutils-3.6.0-realpath.patch 
b/sys-apps/pciutils/files/pciutils-3.6.0-realpath.patch
index b8c64b7..d65f719 100644
--- a/sys-apps/pciutils/files/pciutils-3.6.0-realpath.patch
+++ b/sys-apps/pciutils/files/pciutils-3.6.0-realpath.patch
@@ -1,7 +1,17 @@
-diff -Naur pciutils-3.6.0.orig/lib/sysfs.c pciutils-3.6.0/lib/sysfs.c
 pciutils-3.6.0.orig/lib/sysfs.c2018-07-02 11:24:47.874595946 -0700
-+++ pciutils-3.6.0/lib/sysfs.c 2018-07-02 11:25:30.453595183 -0700
-@@ -133,7 +133,7 @@
+From 64716d37e2bed00e06fb3463214d979ca6b3e9c0 Mon Sep 17 00:00:00 2001
+From: 
+Date: Mon, 2 Jul 2018 18:22:29 -0500
+Subject: [PATCH] canonicalize_file_name only avaliable on glibc systems
+
+---
+ lib/sysfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/sysfs.c b/lib/sysfs.c
+index 1adb50f..c909d0c 100644
+--- a/lib/sysfs.c
 b/lib/sysfs.c
+@@ -133,7 +133,7 @@ sysfs_deref_link(struct pci_dev *d, char *link_name)
sysfs_obj_name(d, "", path);
strcat(path, rel_path);
  
@@ -10,3 +20,6 @@ diff -Naur pciutils-3.6.0.orig/lib/sysfs.c 
pciutils-3.6.0/lib/sysfs.c
  }
  
  static int
+-- 
+2.18.0
+



[gentoo-commits] proj/musl:master commit in: sys-apps/pciutils/files/, sys-apps/pciutils/

2018-07-02 Thread Aric Belsito
commit: fc162ea0dc49426a8a3db756b8f0183435d20c1c
Author: Aric Belsito  gmail  com>
AuthorDate: Mon Jul  2 18:27:30 2018 +
Commit: Aric Belsito  gmail  com>
CommitDate: Mon Jul  2 18:27:30 2018 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=fc162ea0

sys-apps/pciutils: add latest version

needs a patch for canonicalize_file_name

 sys-apps/pciutils/Manifest |   1 +
 sys-apps/pciutils/files/conf.d-pciparm |  28 +
 sys-apps/pciutils/files/init.d-pciparm |  79 ++
 .../pciutils/files/pciutils-3.1.9-static-pc.patch  |  13 +++
 .../pciutils/files/pciutils-3.6.0-realpath.patch   |  12 ++
 sys-apps/pciutils/metadata.xml |  13 +++
 sys-apps/pciutils/pciutils-3.6.0.ebuild| 121 +
 7 files changed, 267 insertions(+)

diff --git a/sys-apps/pciutils/Manifest b/sys-apps/pciutils/Manifest
new file mode 100644
index 000..7dc8d96
--- /dev/null
+++ b/sys-apps/pciutils/Manifest
@@ -0,0 +1 @@
+DIST pciutils-3.6.0.tar.gz 454912 BLAKE2B 
1f37307ba21085d5f49dd908781ce34dff98a1e4d818158800a1fbdc1fc689e1b868ee9c762378a8cd28ab17cbaaf1e9255da94c44029bfa2f4a8b5d9fd4b273
 SHA512 
e59cb5685f1dee2673368c90fdf1f5b7689de9fa45f249ce472258f278288da7a81644c76d1ecb7cc857f8029d3d70c367fe62190caf55328143b51017cc5c6f

diff --git a/sys-apps/pciutils/files/conf.d-pciparm 
b/sys-apps/pciutils/files/conf.d-pciparm
new file mode 100644
index 000..f036b15
--- /dev/null
+++ b/sys-apps/pciutils/files/conf.d-pciparm
@@ -0,0 +1,28 @@
+# PCI tweaking article:
+# http://www.gentoo.org/doc/en/articles/hardware-stability-p2.xml
+#
+# Apply to all devices:
+# PCIPARM_ALL=""
+# Cards also can be addressed by vid:pid or by bus:slot.func
+# (see setpci man page relative to -d and -s options)
+# PCIPARM_(BUS|VENDOR)_#=""
+# Where # is sequentially numbered from zero.
+
+# Examples:
+# "open up" the PCI bus by allowing fairly long bursts
+# for all devices, increasing performance
+# (equivalent to: setpci -v -d *:* latency_timer=b0)
+#PCIPARM_ALL="latency_timer=b0"
+
+# maximize latency timers for network and audio,
+# allowing them to transmit more data per burst,
+# preventing buffer over/under-run conditions
+#PCIPARM_BUS_0="00:04.0 latency_timer=ff"
+#PCIPARM_BUS_1="01:04.0 latency_timer=ff"
+#PCIPARM_VENDOR_0="1057:3410 latency_timer=ff"
+
+# -v : whether to be verbose about changes
+# -D : dry-run, no commit
+# -f : do not warn if the change is already set
+# (see the setpci manpage for more advanced options)
+SETPCI_OPT="-f"

diff --git a/sys-apps/pciutils/files/init.d-pciparm 
b/sys-apps/pciutils/files/init.d-pciparm
new file mode 100644
index 000..734ca99
--- /dev/null
+++ b/sys-apps/pciutils/files/init.d-pciparm
@@ -0,0 +1,79 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+   before bootmisc hdparm
+   after localmount
+}
+
+checkconfig() {
+   if [ ! -f /etc/conf.d/pciparm ]; then
+   ewarn "/etc/conf.d/pciparm does not exist, skipping"
+   return 1
+   fi
+
+   if [ -z "${PCIPARM_ALL}" -a -z "${PCIPARM_BUS_0}" -a  -z 
"${PCIPARM_VENDOR_0}" ]; then
+   ewarn "None of PCIPARM_ALL, PCIPARM_BUS_* or PCIPARM_VENDOR_* 
set in /etc/conf.d/pciparm"
+   return 1
+   fi
+}
+
+do_setpci() {
+   #ewarn "do_setpci: /usr/sbin/setpci $SETPCI_OPT $@"
+   SWITCH=$1
+   SPEC_ID=$2
+   shift 2
+   case "$SWITCH" in
+   -d) DESC=vendor ;;
+   -s) DESC=bus ;;
+   *) eerror "Unknown setpci type: $SWITCH" ; return 1 ;;
+   esac
+
+   if [ -z "$SPEC_ID" ]; then
+   eerror "Missing device specifier!"
+   return 1
+   fi
+   if [ -z "$*" ]; then
+   eerror "Missing configuration to set for ($DESC) $SPEC_ID!"
+   return 1
+   fi
+
+   ebegin "Setting PCI params for ($DESC) $SPEC_ID to $@"
+   /usr/sbin/setpci $SETPCI_OPT $SWITCH $SPEC_ID "$@"
+   rc=$?
+   eend $rc
+   return $rc
+}
+
+do_setpci_array() {
+   name=$1
+   shift
+   i=0
+   while true; do
+   eval opt="\$${name}_$i"
+   # End of loop
+   [ -z "${opt}" ] && break
+   # Pass in all other parameters here, in case we want to use 
multiple
+   # arguments later.
+   do_setpci "$@" $opt #|| return 1
+   i=$(($i+1))
+   done
+}
+
+start() {
+   if get_bootparam "nopciparm" ; then
+   ewarn "Skipping pciparm init as requested in kernel cmdline"
+   return 0
+   fi
+
+   checkconfig || return 1
+   
+   # We do not exit after any errors presently, because it might be a
+   # stability-related fix after a failure.
+   [ -n "$PCIPARM_ALL" ] && \
+   do_setpci -d '*:*' $PCIPARM_ALL