FreeBSD Bugzilla – Attachment 106150 Details for
Bug 146709
Update port: sysutils/psmisc Upgrade to 22.11
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
psmisc.patch
psmisc.patch (text/plain), 4.87 KB, created by
Douglas Thrift
on 2010-05-18 17:30:04 UTC
(
hide
)
Description:
psmisc.patch
Filename:
MIME Type:
Creator:
Douglas Thrift
Created:
2010-05-18 17:30:04 UTC
Size:
4.87 KB
patch
obsolete
>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 <term.h> > #include <termios.h> > #include <langinfo.h> >++#ifdef __FreeBSD__ >++#include <locale.h> > +#include <limits.h> >++#endif > #include <assert.h> > #include <sys/types.h> > #include <sys/stat.h> >-@@ -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/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 146709
: 106150 |
106151
|
106152
|
106153
|
106154
|
106155
|
106156
|
106157
|
106158
|
106159
|
106160