summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Villavicencio <the_paya@gentoo.org>2006-09-25 20:17:35 +0000
committerJavier Villavicencio <the_paya@gentoo.org>2006-09-25 20:17:35 +0000
commit7578894187cad0a194ee76469f9889671b4d0225 (patch)
tree444b3369d83908752c2e70ed97d816d2904d9443 /sys-process
parentfix deps (bug #149100) with patch from James Rowe (diff)
downloadgentoo-2-7578894187cad0a194ee76469f9889671b4d0225.tar.gz
gentoo-2-7578894187cad0a194ee76469f9889671b4d0225.tar.bz2
gentoo-2-7578894187cad0a194ee76469f9889671b4d0225.zip
Added patch from Roy Marples, fixes for new baselayout.
(Portage version: 2.1.2_pre1-r2)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/pidof-bsd/ChangeLog8
-rw-r--r--sys-process/pidof-bsd/files/digest-pidof-bsd-20050501-r33
-rw-r--r--sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch46
-rw-r--r--sys-process/pidof-bsd/pidof-bsd-20050501-r3.ebuild29
4 files changed, 85 insertions, 1 deletions
diff --git a/sys-process/pidof-bsd/ChangeLog b/sys-process/pidof-bsd/ChangeLog
index 10a4ce26ad4f..c1eecf6b1252 100644
--- a/sys-process/pidof-bsd/ChangeLog
+++ b/sys-process/pidof-bsd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-process/pidof-bsd
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/pidof-bsd/ChangeLog,v 1.2 2006/04/13 19:34:15 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/pidof-bsd/ChangeLog,v 1.3 2006/09/25 20:17:35 the_paya Exp $
+
+*pidof-bsd-20050501-r3 (25 Sep 2006)
+
+ 25 Sep 2006; Javier Villavicencio <the_paya@gentoo.org>
+ +files/pidof-bsd-20050501-pname.patch, +pidof-bsd-20050501-r3.ebuild:
+ Added patch from Roy Marples, fixes for new baselayout.
*pidof-bsd-20050501-r2 (13 Apr 2006)
diff --git a/sys-process/pidof-bsd/files/digest-pidof-bsd-20050501-r3 b/sys-process/pidof-bsd/files/digest-pidof-bsd-20050501-r3
new file mode 100644
index 000000000000..a225f6856ac3
--- /dev/null
+++ b/sys-process/pidof-bsd/files/digest-pidof-bsd-20050501-r3
@@ -0,0 +1,3 @@
+MD5 58bcaf9a6e325ef6e5fd175175788e56 pidof-bsd-20050501.tar.gz 1769
+RMD160 1306e7f4b2d6231358d10b45705a16c925bb1d51 pidof-bsd-20050501.tar.gz 1769
+SHA256 c3ed8826178debe872f7717b8810d477d4611ab19af73bed97c5af1c552d20e6 pidof-bsd-20050501.tar.gz 1769
diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch
new file mode 100644
index 000000000000..688a3cc659c4
--- /dev/null
+++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch
@@ -0,0 +1,46 @@
+--- pidof.c 2006-09-21 15:14:03 +0100
++++ /tmp/pidof.c 2006-09-21 15:13:47 +0100
+@@ -53,14 +53,22 @@
+ struct kinfo_proc *p;
+ int i, n_processes,
+ processes_found = 0;
++ char *pname = NULL;
++
++ if (process_name == NULL)
++ return;
++
++ if ((pname = strdup(basename(process_name))) == NULL)
++ return;
+
+- if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open")) == NULL)
+- (void)errx(1, "%s", kvm_geterr(kd));
+- else {
++ if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, NULL)) == NULL) {
++ free(pname);
++ (void)errx(1, "%s", kvm_geterr(kd));
++ } else {
+ p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes);
+ for (i = 0; i<n_processes; i++) {
+ if (p[i].ki_pid != own_pid)
+- if (strncmp(process_name, p[i].ki_comm, COMMLEN+1) == 0) {
++ if (strncmp(pname, p[i].ki_comm, COMMLEN+1) == 0) {
+ (void)printf("%d ", (int)p[i].ki_pid);
+ processes_found++;
+ } else if (match_argv == 1) {
+@@ -68,7 +76,7 @@
+
+ if ((p_argv = kvm_getargv(kd, p+i, 0)) != NULL)
+ if ( *p_argv != NULL )
+- if (strcmp(process_name, basename(*p_argv)) == 0) {
++ if (strcmp(pname, basename(*p_argv)) == 0) {
+ (void)printf("%d ", (int)p[i].ki_pid);
+ processes_found++;
+ break;
+@@ -77,6 +85,7 @@
+ }
+
+ kvm_close(kd);
++ free(pname);
+ }
+
+ return (processes_found);
diff --git a/sys-process/pidof-bsd/pidof-bsd-20050501-r3.ebuild b/sys-process/pidof-bsd/pidof-bsd-20050501-r3.ebuild
new file mode 100644
index 000000000000..1d74880fb870
--- /dev/null
+++ b/sys-process/pidof-bsd/pidof-bsd-20050501-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/pidof-bsd/pidof-bsd-20050501-r3.ebuild,v 1.1 2006/09/25 20:17:35 the_paya Exp $
+
+inherit base bsdmk
+
+DESCRIPTION="pidof(1) utility for *BSD"
+HOMEPAGE="http://people.freebsd.org/~novel/pidof.html"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND="!sys-process/psmisc"
+
+S="${WORKDIR}/pidof"
+
+PATCHES="${FILESDIR}/${P}-gfbsd.patch
+ ${FILESDIR}/${P}-firstarg.patch
+ ${FILESDIR}/${P}-pname.patch"
+
+src_install() {
+ into /
+ dobin pidof
+}
+