From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 18 16:30:04 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E871065672 for ; Tue, 18 May 2010 16:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A84848FC1D for ; Tue, 18 May 2010 16:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4IGU4oQ057918 for ; Tue, 18 May 2010 16:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4IGU4RT057914; Tue, 18 May 2010 16:30:04 GMT (envelope-from gnats) Resent-Date: Tue, 18 May 2010 16:30:04 GMT Resent-Message-Id: <201005181630.o4IGU4RT057914@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Douglas William Thrift Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBB951065673 for ; Tue, 18 May 2010 16:21:00 +0000 (UTC) (envelope-from douglas@douglasthrift.net) Received: from slowhand.douglasthrift.net (slowhand.douglasthrift.net [69.55.236.40]) by mx1.freebsd.org (Postfix) with ESMTP id 8920B8FC18 for ; Tue, 18 May 2010 16:20:57 +0000 (UTC) Received: from localhost (ellwoodbeach.douglasthrift.net [98.185.242.144]) (authenticated bits=0) by slowhand.douglasthrift.net (8.14.4/8.14.4) with ESMTP id o4IGKqMv088805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 18 May 2010 09:20:56 -0700 (PDT) (envelope-from douglas@douglasthrift.net) Message-Id: <201005181620.o4IGKqMv088805@slowhand.douglasthrift.net> Date: Tue, 18 May 2010 09:20:56 -0700 (PDT) From: Douglas William Thrift To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/146709: Update port: sysutils/psmisc Upgrade to 22.11 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Douglas William Thrift List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 16:30:05 -0000 >Number: 146709 >Category: ports >Synopsis: Update port: sysutils/psmisc Upgrade to 22.11 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue May 18 16:30:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Douglas William Thrift >Release: FreeBSD 7.3-RELEASE amd64 >Organization: >Environment: System: FreeBSD justonenight.douglasthrift.net 7.3-RELEASE FreeBSD 7.3-RELEASE #25: Tue Mar 23 21:24:09 PDT 2010 root@justonenight.douglasthrift.net:/usr/obj/usr/src/sys/FURTHERONUPTHEROAD amd64 >Description: Upgraded to psmisc to 22.11. Took maintainership. Fixed pstree so it actually outputs arguments when the -a (or --arguments) option is specified and fixed its UTF-8 detection. >How-To-Repeat: >Fix: --- psmisc.patch begins here --- diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/Makefile psmisc/Makefile --- /usr/ports/sysutils/psmisc/Makefile 2010-01-02 08:40:09.000000000 -0800 +++ psmisc/Makefile 2010-05-18 08:37:45.668699414 -0700 @@ -6,12 +6,12 @@ # PORTNAME= psmisc -PORTVERSION= 22.9 +PORTVERSION= 22.11 CATEGORIES= sysutils MASTER_SITES= SF MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= douglas@douglasthrift.net COMMENT= A port of the Linux pstree, killall and pidof commands GNU_CONFIGURE= yes @@ -19,7 +19,7 @@ USE_GMAKE= yes CONFLICTS= pstree-2.* \ - pidof-* + pidof-[0-9]* PLIST_FILES= bin/killall \ bin/pidof \ diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/distinfo psmisc/distinfo --- /usr/ports/sysutils/psmisc/distinfo 2010-01-02 08:40:09.000000000 -0800 +++ psmisc/distinfo 2010-05-18 04:02:47.141686600 -0700 @@ -1,3 +1,3 @@ -MD5 (psmisc-22.9.tar.gz) = c242530de46b951ab10a2237a6048a9c -SHA256 (psmisc-22.9.tar.gz) = c98aef4bc379790229c54c8e7d97b1d1ab898346bfffcde54fcf585a3e353edd -SIZE (psmisc-22.9.tar.gz) = 316530 +MD5 (psmisc-22.11.tar.gz) = b5d32aa285b75c59dee96d3ea26a4881 +SHA256 (psmisc-22.11.tar.gz) = 8fff37557f5150d89ef9afc03133731da3eaa2bad1a94f64355218a68b884536 +SIZE (psmisc-22.11.tar.gz) = 375038 diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/files/patch-src-pstree.c psmisc/files/patch-src-pstree.c --- /usr/ports/sysutils/psmisc/files/patch-src-pstree.c 2010-01-02 08:40:10.000000000 -0800 +++ psmisc/files/patch-src-pstree.c 2010-05-18 07:21:54.752390269 -0700 @@ -1,14 +1,17 @@ ---- src/pstree.c.orig 2009-12-27 15:46:47.000000000 +0900 -+++ src/pstree.c 2010-01-03 00:52:21.437862505 +0900 -@@ -37,6 +37,7 @@ +--- src/pstree.c.orig 2010-04-08 05:20:10.000000000 -0700 ++++ src/pstree.c 2010-05-18 07:20:57.583839746 -0700 +@@ -37,6 +37,10 @@ #include #include #include ++#ifdef __FreeBSD__ ++#include +#include ++#endif #include #include #include -@@ -590,7 +591,11 @@ +@@ -590,7 +594,11 @@ struct dirent *de; FILE *file; struct stat st; @@ -20,31 +23,64 @@ char *buffer; size_t buffer_size; char readbuf[BUFSIZ + 1]; -@@ -623,7 +628,7 @@ +@@ -623,7 +631,11 @@ if ((pid = (pid_t) atoi(de->d_name)) != 0) { if (! (path = malloc(strlen(PROC_BASE) + strlen(de->d_name) + 10))) exit(2); -- sprintf(path, "%s/%d/stat", PROC_BASE, pid); -+ sprintf (path, "%s/%d/status", PROC_BASE, pid); ++#ifdef __FreeBSD__ ++ sprintf(path, "%s/%d/status", PROC_BASE, pid); ++#else + sprintf(path, "%s/%d/stat", PROC_BASE, pid); ++#endif if ((file = fopen(path, "r")) != NULL) { empty = 0; sprintf(path, "%s/%d", PROC_BASE, pid); -@@ -638,6 +643,10 @@ +@@ -638,6 +650,29 @@ perror(path); exit(1); } +#ifdef __FreeBSD__ -+ if (fscanf(file, "%s %*d %d", comm, &ppid) == 2) -+ add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0); ++ /* Read comm and ppid */ ++ if (fscanf(file, "%s %*d %d", readbuf, &ppid) == 2) { ++ tmpptr = readbuf; ++ size = 0; ++ /* Unescape comm */ ++ do { ++ if (*tmpptr == '\\') ++ { ++ char tmp = tmpptr[4]; ++ tmpptr[4] = 0; ++ comm[size++] = strtol(++tmpptr, NULL, 8); ++ tmpptr += 2; ++ tmpptr[1] = tmp; ++ } ++ else ++ comm[size++] = *tmpptr; ++ } while (*++tmpptr); ++ comm[size] = 0; ++ /* Balance braces */ ++ { ++ { +#else size = fread(readbuf, 1, BUFSIZ, file); if (ferror(file) == 0) { readbuf[size] = 0; -@@ -725,6 +734,7 @@ - } - } - } +@@ -692,6 +727,7 @@ + (void) closedir(taskdir); + } + free(taskpath); +#endif /*__FreeBSD__*/ - (void) fclose(file); - } - free(path); + if (!print_args) + #ifdef WITH_SELINUX + add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0, scontext); +@@ -860,6 +896,10 @@ + * command-line options, if given. + */ + ++#ifdef __FreeBSD__ ++ /* Actually set the locale because nl_langinfo won't do it. */ ++ setlocale(LC_CTYPE, ""); ++#endif + if (isatty(1) && !strcmp(nl_langinfo(CODESET), "UTF-8")) { + /* Use UTF-8 symbols if the locale's character set is UTF-8. */ + sym = &sym_utf; diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/pkg-descr psmisc/pkg-descr --- /usr/ports/sysutils/psmisc/pkg-descr 2005-10-05 00:49:45.000000000 -0700 +++ psmisc/pkg-descr 2010-05-18 07:57:55.280442813 -0700 @@ -1,4 +1,4 @@ A port of the Linux pstree, killall and pidof commands. Does not include the 'fuser' command. -WWW: http://psmisc.sourceforge.net +WWW: http://psmisc.sourceforge.net/ --- psmisc.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: