ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/pack/freebsd/diff/sysutils/psmisc/psmisc.2011-08-07T053402Z.diff
(Generate patch)

Comparing freebsd/sysutils/psmisc.patch (file contents):
Revision 339 by douglas, 2010-08-12T00:04:19-07:00 vs.
Revision 455 by douglas, 2011-08-06T22:25:30-07:00

# Line 1 | Line 1
1   diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/Makefile psmisc/Makefile
2 < --- /usr/ports/sysutils/psmisc/Makefile 2010-08-01 00:13:14.000000000 -0700
3 < +++ psmisc/Makefile     2010-08-12 00:02:19.087759857 -0700
4 < @@ -7,20 +7,39 @@
2 > --- /usr/ports/sysutils/psmisc/Makefile 2010-10-05 22:58:11.000000000 -0700
3 > +++ psmisc/Makefile     2011-08-06 22:21:50.947211076 -0700
4 > @@ -6,37 +6,34 @@
5 > #
6  
7   PORTNAME=      psmisc
8 < PORTVERSION=   22.12
9 < +PORTREVISION=  1
8 > -PORTVERSION=   22.13
9 > +PORTVERSION=   22.14
10   CATEGORIES=    sysutils
11 < MASTER_SITES=  SF/${PORTNAME}/${PORTNAME}
11 > MASTER_SITES=  SF/${PORTNAME}/${PORTNAME}/
12  
13 < MAINTAINER=    sunpoet@sunpoet.net
13 > MAINTAINER=    douglas@douglasthrift.net
14   COMMENT=       A port of the Linux pstree, killall and pidof commands
15  
16 < +BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
16 > +LICENSE=       GPLv2
17   +
18 + BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
19 +
20   CONFLICTS=     pidof-[0-9]* pstree-2.[0-9]*
21  
22 < -CONFIGURE_ARGS=        --disable-nls
23 < +LICENSE=       GPLv2
21 < +
22 > -LICENSE=       GPLv2
23 > -
24   GNU_CONFIGURE= yes
25   USE_GMAKE=     yes
26  
27 + -OPTIONS=       NLS "Native Language Support via gettext utilities" on
28   +OPTIONS=       NLS "Native Language Support via gettext utilities" On
29 < +
29 >
30 > -.include <bsd.port.options.mk>
31   +.include <bsd.port.pre.mk>
32 < +
32 >
33   MAN1=          killall.1 pstree.1
34 < -PLIST_FILES=   bin/killall bin/pidof bin/pstree bin/pstree.x11
35 < +
36 < +.if defined(WITHOUT_NLS)
34 >
35 > .if defined(WITHOUT_NLS)
36 > -CONFIGURE_ARGS=        --disable-nls
37   +CONFIGURE_ARGS+=--disable-nls
38 < +PLIST_SUB+=    NLS="@comment "
39 < +.else
40 < +USE_GETTEXT=   yes
38 > PLIST_SUB+=    NLS="@comment "
39 > .else
40 > USE_GETTEXT=   yes
41 > -CONFIGURE_ARGS=        --enable-nls
42 > -CPPFLAGS+=     -I${LOCALBASE}/include
43 > -LDFLAGS+=      -L${LOCALBASE}/lib
44 > -CONFIGURE_ENV+=        CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
45   +CONFIGURE_ARGS+=--enable-nls
46 < +CPPFLAGS+=     -I${LOCALBASE}/include
47 < +LDFLAGS+=      -L${LOCALBASE}/lib
48 < +CONFIGURE_ENV+=        CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
49 < +PLIST_SUB+=    NLS=""
42 < +.endif
43 <
44 < post-patch:
45 <        @${REINPLACE_CMD} -e '/^#define COMM_LEN / s|16|254|' ${WRKSRC}/src/comm.h
46 < @@ -28,4 +47,4 @@
46 > PLIST_SUB+=    NLS=""
47 > .endif
48 >
49 > @@ -46,4 +43,4 @@
50   post-install:
51          @${LN} -fs killall ${PREFIX}/bin/pidof
52  
53   -.include <bsd.port.mk>
54   +.include <bsd.port.post.mk>
55 < diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/files/patch-src-Makefile.in psmisc/files/patch-src-Makefile.in
56 < --- /usr/ports/sysutils/psmisc/files/patch-src-Makefile.in      2010-08-01 00:13:14.000000000 -0700
57 < +++ psmisc/files/patch-src-Makefile.in  2010-08-11 23:40:24.404739181 -0700
55 > diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/distinfo psmisc/distinfo
56 > --- /usr/ports/sysutils/psmisc/distinfo 2011-03-19 05:33:10.000000000 -0700
57 > +++ psmisc/distinfo     2011-08-06 20:48:51.620144975 -0700
58 > @@ -1,2 +1,2 @@
59 > -SHA256 (psmisc-22.13.tar.gz) = 06d25e8ebb4722dbcede98a787c39a9ed341f8e58fde10c0b2d6b35990b35daa
60 > -SIZE (psmisc-22.13.tar.gz) = 382389
61 > +SHA256 (psmisc-22.14.tar.gz) = 22bbf4561837af475c0d8d14e3b9cab453998c787212c107fac7faf2f281e26e
62 > +SIZE (psmisc-22.14.tar.gz) = 382024
63 > diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/files/patch-src-killall.c psmisc/files/patch-src-killall.c
64 > --- /usr/ports/sysutils/psmisc/files/patch-src-killall.c        2010-01-02 08:40:10.000000000 -0800
65 > +++ psmisc/files/patch-src-killall.c    2011-08-06 21:51:02.097478158 -0700
66   @@ -1,5 +1,5 @@
67 < ---- src/Makefile.in.orig       2010-07-12 19:38:08.000000000 +0800
68 < -+++ src/Makefile.in    2010-07-31 18:58:38.000000000 +0800
69 < +--- src/Makefile.in.orig       2010-07-12 04:38:08.000000000 -0700
70 < ++++ src/Makefile.in    2010-08-11 23:39:30.652095791 -0700
71 < @@ -34,8 +34,8 @@
72 <  POST_UNINSTALL = :
73 <  build_triplet = @build@
74 < @@ -37,32 +37,37 @@
64 <  prtstat_SOURCES = prtstat.c prtstat.h
65 <  BUILT_SOURCES = signames.h
66 <  EXTRA_DIST = signames.c
67 < -@@ -545,14 +543,20 @@
68 < -
69 < +@@ -299,19 +297,19 @@
70 < +       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
71 < + fuser$(EXEEXT): $(fuser_OBJECTS) $(fuser_DEPENDENCIES)
72 < +       @rm -f fuser$(EXEEXT)
73 < +-      $(LINK) $(fuser_OBJECTS) $(fuser_LDADD) $(LIBS)
74 < ++      $(LINK) $(fuser_OBJECTS) $(fuser_LDADD) $(LIBS) $(INTLLIBS)
75 < + killall$(EXEEXT): $(killall_OBJECTS) $(killall_DEPENDENCIES)
76 < +       @rm -f killall$(EXEEXT)
77 < +-      $(LINK) $(killall_OBJECTS) $(killall_LDADD) $(LIBS)
78 < ++      $(LINK) $(killall_OBJECTS) $(killall_LDADD) $(LIBS) $(INTLLIBS)
79 < + peekfd$(EXEEXT): $(peekfd_OBJECTS) $(peekfd_DEPENDENCIES)
80 < +       @rm -f peekfd$(EXEEXT)
81 < +-      $(LINK) $(peekfd_OBJECTS) $(peekfd_LDADD) $(LIBS)
82 < ++      $(LINK) $(peekfd_OBJECTS) $(peekfd_LDADD) $(LIBS) $(INTLLIBS)
83 < + prtstat$(EXEEXT): $(prtstat_OBJECTS) $(prtstat_DEPENDENCIES)
84 < +       @rm -f prtstat$(EXEEXT)
85 < +-      $(LINK) $(prtstat_OBJECTS) $(prtstat_LDADD) $(LIBS)
86 < ++      $(LINK) $(prtstat_OBJECTS) $(prtstat_LDADD) $(LIBS) $(INTLLIBS)
87 < + pstree$(EXEEXT): $(pstree_OBJECTS) $(pstree_DEPENDENCIES)
88 < +       @rm -f pstree$(EXEEXT)
89 < +-      $(LINK) $(pstree_OBJECTS) $(pstree_LDADD) $(LIBS)
90 < ++      $(LINK) $(pstree_OBJECTS) $(pstree_LDADD) $(LIBS) $(INTLLIBS)
91 <  
92 < + mostlyclean-compile:
93 < +       -rm -f *.$(OBJEXT)
94 < +@@ -547,7 +545,7 @@
95 <  signames.h: signames.c Makefile
96 < --              export LC_ALL=C ; \
97 < --              @CPP@ -dM $< |\
98 < +               export LC_ALL=C ; \
99 < +               @CPP@ -dM $< |\
100 < -              tr -s '\t ' ' ' | sort -n -k 3 | sed \
101 < --      's:#define SIG\([A-Z]\+[0-9]*\) \([0-9]\+\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
102 < --                grep -v '[0-9][0-9][0-9]' >signames.h || \
103 < --                { rm -f signames.h; exit 1; }
104 < --              grep '^{ 1,"HUP" },$$' signames.h >/dev/null || \
105 < --                { rm -f signames.h; exit 1; }
106 < -+              @CPP@ -dM $< | {\
107 < -+                      signames=`kill -l | tr a-z A-Z`; \
108 < -+                      while read define name value; do \
109 < -+                              [ "$$define" = '#define' ] || continue; \
110 < -+                              case "$$value" in \
111 < -+                              *[!0-9]*) continue; \
112 < -+                              esac; \
113 < -+                              for signame in $$signames; do \
114 < -+                                      if [ "$$name" = "SIG$$signame" ]; then \
115 < -+                                              echo "{ $$value, \"$$signame\" },"; \
116 < -+                                      fi; \
117 < -+                              done; \
118 < -+                      done; \
119 < -+              } | sort -n -k 2 > signames.h
120 < -
121 < - install-exec-hook:
122 < -               cd $(DESTDIR)$(bindir) && \
123 < ++              tr -s '\t ' ' ' | sort -n -k 3 | gsed \
124 < +       's:#define SIG\([A-Z]\+[0-9]*\) \([0-9]\+\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
125 < +                 grep -v '[0-9][0-9][0-9]' >signames.h || \
126 < +                 { rm -f signames.h; exit 1; }
127 < diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/files/patch-src-pstree.c psmisc/files/patch-src-pstree.c
128 < --- /usr/ports/sysutils/psmisc/files/patch-src-pstree.c 2010-08-01 00:13:14.000000000 -0700
129 < +++ psmisc/files/patch-src-pstree.c     2010-08-11 23:28:33.395505589 -0700
130 < @@ -1,14 +1,16 @@
131 < --- src/pstree.c.orig  2009-12-27 15:46:47.000000000 +0900
132 < +++ src/pstree.c       2010-01-03 00:52:21.437862505 +0900
133 < -@@ -37,6 +37,7 @@
134 < +@@ -37,6 +37,9 @@
135 <  #include <term.h>
136 <  #include <termios.h>
137 <  #include <langinfo.h>
138 < ++#ifdef __FreeBSD__
139 < +#include <limits.h>
140 < ++#endif
141 <  #include <assert.h>
67 > ---- src/killall.c.orig 2009-12-18 21:45:36.000000000 +0900
68 > -+++ src/killall.c      2010-01-03 00:37:34.818411284 +0900
69 > +--- src/killall.c.orig 2011-06-20 04:43:24.000000000 -0700
70 > ++++ src/killall.c      2011-08-06 21:48:35.014330713 -0700
71 > @@ -36,6 +36,8 @@
72 >  #include <dirent.h>
73 >  #include <signal.h>
74 > @@ -9,7 +9,7 @@
75    #include <sys/types.h>
76    #include <sys/stat.h>
77 < -@@ -590,7 +591,11 @@
78 < +@@ -590,7 +594,11 @@
79 <    struct dirent *de;
80 <    FILE *file;
81 <    struct stat st;
82 < @@ -20,31 +22,53 @@
83 <    char *buffer;
84 <    size_t buffer_size;
85 <    char readbuf[BUFSIZ + 1];
86 < -@@ -623,7 +628,7 @@
87 < +@@ -623,7 +631,11 @@
88 <      if ((pid = (pid_t) atoi(de->d_name)) != 0) {
89 <        if (! (path = malloc(strlen(PROC_BASE) + strlen(de->d_name) + 10)))
90 <          exit(2);
91 < --      sprintf(path, "%s/%d/stat", PROC_BASE, pid);
92 < ++#ifdef __FreeBSD__
93 < +      sprintf(path, "%s/%d/status", PROC_BASE, pid);
94 < ++#else
95 < +       sprintf(path, "%s/%d/stat", PROC_BASE, pid);
96 < ++#endif
97 <        if ((file = fopen(path, "r")) != NULL) {
98 <          empty = 0;
99 <          sprintf(path, "%s/%d", PROC_BASE, pid);
100 < -@@ -638,6 +643,10 @@
101 < +@@ -638,6 +650,29 @@
102 <            perror(path);
103 <            exit(1);
77 >  #include <getopt.h>
78 > -@@ -83,40 +85,35 @@
79 > +@@ -87,40 +89,35 @@
80 >             ignore_case = 0, pidof;
81 >  static long younger_than = 0, older_than = 0;
82 >  
83 > @@ -34,10 +34,10 @@
84 > -    else
85 > -        printf (_("Signal %s(%s%d) ? (y/N) "), name, process_group ? "pgid " : "",
86 > -              pid);
87 > +-
88 > +-    fflush (stdout);
89 > +  int ch, c;
90 >  
91 > --    fflush (stdout);
92 > --
93 > -    if (getline (&line, &len, stdin) < 0)
94 > -      return 0;
95 > -    /* Check for default */
96 > @@ -74,7 +74,16 @@
97 >  }
98 >  
99 >  static double
100 > -@@ -356,7 +353,7 @@
101 > +@@ -197,7 +194,7 @@
102 > +      
103 > +       while (fgets(buf, sizeof buf, f))
104 > +       {
105 > +-              if (sscanf (buf, "Uid:\t%d", &puid))
106 > ++              if (sscanf (buf, "%*s %*d %*d %*d %*d %*s %*s %*s %*s %*s %*s %*s %d", &puid))
107 > +               {
108 > +                       re = uid==puid;
109 > +                       break;
110 > +@@ -360,7 +357,7 @@
111            }
112 < +#ifdef __FreeBSD__
113 < -+        if (fscanf(file, "%s %*d %d", comm, &ppid) == 2)
114 < -+          add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0);
115 < ++        /* Read comm and ppid */
116 < ++        if (fscanf(file, "%s %*d %d", readbuf, &ppid) == 2) {
117 < ++          tmpptr = readbuf;
118 < ++          size = 0;
119 < ++          /* Unescape comm */
120 < ++          do {
121 < ++            if (*tmpptr == '\\')
122 < ++            {
123 < ++              char tmp = tmpptr[4];
124 < ++              tmpptr[4] = 0;
125 < ++              comm[size++] = strtol(++tmpptr, NULL, 8);
126 < ++              tmpptr += 2;
127 < ++              tmpptr[1] = tmp;
128 < ++            }
129 < ++            else
130 < ++              comm[size++] = *tmpptr;
131 < ++          } while (*++tmpptr);
132 < ++          comm[size] = 0;
133 < ++          /* Balance braces */
134 < ++          {
135 < ++            {
136 < +#else
137 <          size = fread(readbuf, 1, BUFSIZ, file);
138 <          if (ferror(file) == 0) {
139 <            readbuf[size] = 0;
140 < -@@ -725,6 +734,7 @@
141 < -             }
142 < -           }
143 < -         }
144 < +@@ -692,6 +727,7 @@
145 < +                   (void) closedir(taskdir);
146 < +                 }
147 < +               free(taskpath);
148 < +#endif /*__FreeBSD__*/
149 < -         (void) fclose(file);
150 < -       }
151 < -       free(path);
152 < +               if (!print_args)
153 < + #ifdef WITH_SELINUX
154 < +                 add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0, scontext);
155 < diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/pkg-plist psmisc/pkg-plist
156 < --- /usr/ports/sysutils/psmisc/pkg-plist        1969-12-31 16:00:00.000000000 -0800
157 < +++ psmisc/pkg-plist    2010-05-18 22:50:42.730462413 -0700
158 < @@ -0,0 +1,26 @@
159 < +bin/killall
160 < +bin/pidof
161 < +bin/pstree
162 < +bin/pstree.x11
163 < +%%NLS%%share/locale/bg/LC_MESSAGES/psmisc.mo
164 < +%%NLS%%share/locale/ca/LC_MESSAGES/psmisc.mo
165 < +%%NLS%%share/locale/cs/LC_MESSAGES/psmisc.mo
166 < +%%NLS%%share/locale/de/LC_MESSAGES/psmisc.mo
167 < +%%NLS%%share/locale/el/LC_MESSAGES/psmisc.mo
168 < +%%NLS%%share/locale/eu/LC_MESSAGES/psmisc.mo
169 < +%%NLS%%share/locale/fi/LC_MESSAGES/psmisc.mo
170 < +%%NLS%%share/locale/fr/LC_MESSAGES/psmisc.mo
171 < +%%NLS%%share/locale/hu/LC_MESSAGES/psmisc.mo
232 < +%%NLS%%share/locale/id/LC_MESSAGES/psmisc.mo
233 < +%%NLS%%share/locale/it/LC_MESSAGES/psmisc.mo
234 < +%%NLS%%share/locale/ja/LC_MESSAGES/psmisc.mo
235 < +%%NLS%%share/locale/nb/LC_MESSAGES/psmisc.mo
236 < +%%NLS%%share/locale/nl/LC_MESSAGES/psmisc.mo
237 < +%%NLS%%share/locale/pl/LC_MESSAGES/psmisc.mo
238 < +%%NLS%%share/locale/pt/LC_MESSAGES/psmisc.mo
239 < +%%NLS%%share/locale/ro/LC_MESSAGES/psmisc.mo
240 < +%%NLS%%share/locale/ru/LC_MESSAGES/psmisc.mo
241 < +%%NLS%%share/locale/sv/LC_MESSAGES/psmisc.mo
242 < +%%NLS%%share/locale/vi/LC_MESSAGES/psmisc.mo
243 < +%%NLS%%share/locale/zh_CN/LC_MESSAGES/psmisc.mo
244 < +%%NLS%%share/locale/zh_TW/LC_MESSAGES/psmisc.mo
112 >  #endif /*WITH_SELINUX*/
113 >        /* load process name */
114 > @@ -83,7 +92,7 @@
115 >        continue;
116 >        if (!(file = fopen (path, "r")))
117 >        {
118 > -@@ -364,7 +361,7 @@
119 > +@@ -368,7 +365,7 @@
120 >          continue;
121 >        }
122 >        free (path);
123 > @@ -92,7 +101,7 @@
124 >        if (!okay) {
125 >        fclose(file);
126 >        continue;
127 > -@@ -386,65 +383,6 @@
128 > +@@ -390,65 +387,6 @@
129 >        got_long = 0;
130 >        command = NULL;         /* make gcc happy */
131 >        length = strlen (comm);
132 > @@ -158,7 +167,7 @@
133 >        /* mach by process name */
134 >        for (j = 0; j < names; j++)
135 >        {
136 > -@@ -495,7 +433,7 @@
137 > +@@ -499,7 +437,7 @@
138 >                {
139 >                  int ok = 1;
140 >  
141 > @@ -167,12 +176,12 @@
142 >                    continue;
143 >  
144 >                  if (stat (path, &st) < 0)
145 > -@@ -842,7 +780,7 @@
146 > -     fprintf (stderr, _("Maximum number of names is %d\n"), MAX_NAMES);
147 > -     exit (1);
148 > -   }
149 > --  if (stat("/proc/self/stat", &isproc)==-1) {
150 > -+  if (stat("/proc/curproc/status", &isproc)==-1) {
151 > -     fprintf (stderr, _("%s is empty (not mounted ?)\n"), PROC_BASE);
152 > -     exit (1);
153 > -   }
154 > +@@ -693,7 +631,7 @@
155 > +   struct stat isproc;
156 > +   pid_t pid = getpid();
157 > +
158 > +-  snprintf(filename, sizeof(filename), PROC_BASE"/%d/stat", (int) pid);
159 > ++  snprintf(filename, sizeof(filename), PROC_BASE"/%d/status", (int) pid);
160 > +   return stat(filename, &isproc) == 0;
161 > + }
162 > +
163 > diff -Nrux .svn -x work /usr/ports/sysutils/psmisc/pkg-descr psmisc/pkg-descr
164 > --- /usr/ports/sysutils/psmisc/pkg-descr        2005-10-05 00:49:45.000000000 -0700
165 > +++ psmisc/pkg-descr    2010-10-05 23:40:48.818176312 -0700
166 > @@ -1,4 +1,4 @@
167 > A port of the Linux pstree, killall and pidof commands.
168 > Does not include the 'fuser' command.
169 >
170 > -WWW: http://psmisc.sourceforge.net
171 > +WWW: http://psmisc.sourceforge.net/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines