aboutsummaryrefslogtreecommitdiff
path: root/sysutils/psmisc
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-11-16 16:46:19 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-11-16 16:46:19 +0000
commitc607af3f472057c07b994b85d9fe63c26fcce82d (patch)
treec2a7f5d4051878ff9b60b331d0bb31bd49bc911a /sysutils/psmisc
parentb73497debe35cb2bc9a576365ea33950fe0b54ff (diff)
downloadports-c607af3f472057c07b994b85d9fe63c26fcce82d.tar.gz
ports-c607af3f472057c07b994b85d9fe63c26fcce82d.zip
- Update to 21.8
Notes
Notes: svn path=/head/; revision=148492
Diffstat (limited to 'sysutils/psmisc')
-rw-r--r--sysutils/psmisc/Makefile2
-rw-r--r--sysutils/psmisc/distinfo5
-rw-r--r--sysutils/psmisc/files/patch-src-Makefile.in34
-rw-r--r--sysutils/psmisc/files/patch-src-killall.c73
-rw-r--r--sysutils/psmisc/files/patch-src-pstree.c68
5 files changed, 106 insertions, 76 deletions
diff --git a/sysutils/psmisc/Makefile b/sysutils/psmisc/Makefile
index 193a27dd8540..d654bb4e1b73 100644
--- a/sysutils/psmisc/Makefile
+++ b/sysutils/psmisc/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= psmisc
-PORTVERSION= 21.6
+PORTVERSION= 21.8
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= psmisc
diff --git a/sysutils/psmisc/distinfo b/sysutils/psmisc/distinfo
index 22ce508d306d..d429de3aa141 100644
--- a/sysutils/psmisc/distinfo
+++ b/sysutils/psmisc/distinfo
@@ -1,2 +1,3 @@
-MD5 (psmisc-21.6.tar.gz) = 6994f227b38b09cb3f3bdd3bc5fc65fe
-SIZE (psmisc-21.6.tar.gz) = 222454
+MD5 (psmisc-21.8.tar.gz) = d6276e071c10ddf4b0d98856e5573e1a
+SHA256 (psmisc-21.8.tar.gz) = 495463860415171d9019798ed4fdf5848ffe93f8a380662a39dd2690a04717ed
+SIZE (psmisc-21.8.tar.gz) = 227997
diff --git a/sysutils/psmisc/files/patch-src-Makefile.in b/sysutils/psmisc/files/patch-src-Makefile.in
index 49c7113575a5..f52c0aa937a9 100644
--- a/sysutils/psmisc/files/patch-src-Makefile.in
+++ b/sysutils/psmisc/files/patch-src-Makefile.in
@@ -1,47 +1,49 @@
---- src/Makefile.in.orig Wed Oct 5 08:53:13 2005
-+++ src/Makefile.in Wed Oct 5 08:59:34 2005
+--- src/Makefile.in.orig Sat Nov 5 05:18:47 2005
++++ src/Makefile.in Wed Nov 16 17:34:55 2005
@@ -14,7 +14,7 @@
@SET_MAKE@
--SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(pstree_SOURCES)
+-SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(oldfuser_SOURCES) $(pstree_SOURCES)
+SOURCES = $(killall_SOURCES) $(pstree_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-@@ -38,7 +38,7 @@
+@@ -38,8 +38,7 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
--bin_PROGRAMS = fuser$(EXEEXT) killall$(EXEEXT) pstree$(EXEEXT)
+-bin_PROGRAMS = fuser$(EXEEXT) killall$(EXEEXT) pstree$(EXEEXT) \
+- oldfuser$(EXEEXT)
+bin_PROGRAMS = killall$(EXEEXT) pstree$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-@@ -71,8 +71,8 @@
+@@ -75,10 +74,8 @@
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
--SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(pstree_SOURCES)
--DIST_SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(pstree_SOURCES)
+-SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(oldfuser_SOURCES) \
+- $(pstree_SOURCES)
+-DIST_SOURCES = $(fuser_SOURCES) $(killall_SOURCES) $(oldfuser_SOURCES) \
+- $(pstree_SOURCES)
+SOURCES = $(killall_SOURCES) $(pstree_SOURCES)
+DIST_SOURCES = $(killall_SOURCES) $(pstree_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-@@ -174,9 +174,9 @@
- AM_CFLAGS = -Wall -DLOCALEDIR=\"/usr/share/locale\"
- fuser_SOURCES = fuser.c comm.h signals.c signals.h loop.h i18n.h
+@@ -181,9 +178,8 @@
+ oldfuser_SOURCES = oldfuser.c comm.h signals.c signals.h loop.h i18n.h
+ fuser_SOURCES = fuser.c comm.h signals.c signals.h i18n.h fuser.h
killall_SOURCES = killall.c comm.h signals.c signals.h i18n.h
--killall_LDADD = @FLASK_LIB@
-+killall_LDADD = @FLASK_LIB@ $(LIBINTL)
+-killall_LDADD = @SELINUX_LIB@
pstree_SOURCES = pstree.c comm.h i18n.h
--pstree_LDADD = @TERMCAP_LIB@ @FLASK_LIB@
-+pstree_LDADD = @TERMCAP_LIB@ @FLASK_LIB@ $(LIBINTL)
+-pstree_LDADD = @TERMCAP_LIB@ @SELINUX_LIB@
++pstree_LDADD = @TERMCAP_LIB@
BUILT_SOURCES = signames.h
EXTRA_DIST = signames.c
CLEANFILES = signames.h
-@@ -449,12 +449,11 @@
+@@ -460,12 +456,11 @@
signames.h: signames.c Makefile
@CPP@ -dM $< |\
diff --git a/sysutils/psmisc/files/patch-src-killall.c b/sysutils/psmisc/files/patch-src-killall.c
index 31cf7da73519..1ea03692c3c7 100644
--- a/sysutils/psmisc/files/patch-src-killall.c
+++ b/sysutils/psmisc/files/patch-src-killall.c
@@ -1,11 +1,11 @@
---- src/killall.c.orig Fri Dec 10 13:31:29 2004
-+++ src/killall.c Wed Oct 5 09:16:10 2005
-@@ -39,35 +39,31 @@
+--- src/killall.c.orig Tue Sep 20 05:31:38 2005
++++ src/killall.c Wed Nov 16 17:40:13 2005
+@@ -59,35 +59,31 @@
quiet = 0, wait_until_dead = 0, process_group = 0,
ignore_case = 0, pidof;
+/*
-+ * This is the implementation from 21.5, as the one in 21.6 uses
++ * This is the implementation from 21.5, as the one in 21.6 and newer uses
+ * Linux specific functions getline() and rpmatch()
+ */
static int
@@ -14,8 +14,7 @@
- int res;
- size_t len;
- char *line;
-+ int ch, c;
-
+-
- line = NULL;
- len = 0;
-
@@ -35,6 +34,8 @@
- if (res >= 0) {
- free(line);
- return res;
++ int ch, c;
++
+ do
+ {
+ printf (_("Kill %s(%s%d) ? (y/n) "), name, process_group ? "pgid " : "",
@@ -55,29 +56,20 @@
+ return ch == 'y' || ch == 'Y';
}
- #ifdef FLASK_LINUX
-@@ -82,7 +78,7 @@
- struct dirent *de;
- FILE *file;
- struct stat st, sts[MAX_NAMES];
-- int *name_len;
-+ int *name_len = 0;
- char *path, comm[COMM_LEN];
- char *command_buf;
- char *command;
-@@ -173,7 +169,7 @@
- }
- for (i = 0; i < pids; i++)
- {
+ static int
+@@ -267,7 +263,7 @@
+ }
+ #endif /*WITH_SELINUX*/
+ /* load process name */
- if (asprintf (&path, PROC_BASE "/%d/stat", pid_table[i]) < 0)
+ if (asprintf (&path, PROC_BASE "/%d/status", pid_table[i]) < 0)
continue;
if (!(file = fopen (path, "r")))
{
-@@ -182,72 +178,13 @@
+@@ -275,72 +271,13 @@
+ continue;
}
free (path);
- empty = 0;
- okay = fscanf (file, "%*d (%[^)]", comm) == 1;
+ okay = fscanf (file, "%s", comm) == 1;
(void) fclose (file);
@@ -145,23 +137,24 @@
- }
- got_long = okay;
- }
+ /* mach by process name */
for (j = 0; j < names; j++)
{
- pid_t id;
-@@ -281,7 +218,7 @@
- }
- else
- {
-- if (asprintf (&path, PROC_BASE "/%d/exe", pid_table[i]) < 0)
-+ if (asprintf (&path, PROC_BASE "/%d/file", pid_table[i]) < 0)
- continue;
- #ifdef FLASK_LINUX
- if (stat_secure(path,&st,&lsid) < 0) {
-@@ -357,6 +294,7 @@
- fprintf (stderr, _("%s: no process killed\n"), namelist[i]);
- if (pidof)
- putchar ('\n');
-+ return 0;
- error = found == ((1 << (names - 1)) | ((1 << (names - 1)) - 1)) ? 0 : 1;
- /*
- * We scan all (supposedly) killed processes every second to detect dead
+@@ -372,7 +309,7 @@
+ }
+ else
+ {
+- if (asprintf (&path, PROC_BASE "/%d/exe", pid_table[i]) < 0)
++ if (asprintf (&path, PROC_BASE "/%d/file", pid_table[i]) < 0)
+ continue;
+
+ if (stat (path, &st) < 0)
+@@ -697,7 +634,7 @@
+ fprintf (stderr, _("Maximum number of names is %d\n"), MAX_NAMES);
+ exit (1);
+ }
+- if (stat("/proc/self/stat", &isproc)==-1)
++ if (stat("/proc/curproc/status", &isproc)==-1)
+ {
+ fprintf (stderr, _("%s is empty (not mounted ?)\n"), PROC_BASE);
+ exit (1);
diff --git a/sysutils/psmisc/files/patch-src-pstree.c b/sysutils/psmisc/files/patch-src-pstree.c
index 41e8b79dbcbb..c53d04bff1c2 100644
--- a/sysutils/psmisc/files/patch-src-pstree.c
+++ b/sysutils/psmisc/files/patch-src-pstree.c
@@ -1,6 +1,6 @@
---- src/pstree.c.orig Sat Apr 24 14:44:27 2004
-+++ src/pstree.c Sat Sep 10 03:02:07 2005
-@@ -604,7 +604,7 @@
+--- src/pstree.c.orig Tue Oct 11 05:18:48 2005
++++ src/pstree.c Wed Nov 16 17:31:59 2005
+@@ -590,7 +590,7 @@
{
if (!(path = malloc (strlen (PROC_BASE) + strlen (de->d_name) + 10)))
exit (2);
@@ -9,7 +9,7 @@
if ((file = fopen (path, "r")) != NULL)
{
empty = 0;
-@@ -618,57 +618,9 @@
+@@ -608,90 +608,10 @@
perror (path);
exit (1);
}
@@ -18,11 +18,10 @@
- {
- memset(comm, '\0', COMM_LEN+1);
- tmpptr = strrchr(readbuf, ')'); /* find last ) */
-- *tmpptr = '\0';
- /* We now have readbuf with pid and cmd, and tmpptr+2
- * with the rest */
- /*printf("readbuf: %s\n", readbuf);*/
-- if (sscanf(readbuf, "%*d (%15c", comm) == 1)
+- if (sscanf(readbuf, "%*d (%15[^)]", comm) == 1)
- {
- /*printf("tmpptr: %s\n", tmpptr+2);*/
- if (sscanf(tmpptr+2, "%*c %d", &ppid) == 1)
@@ -32,12 +31,47 @@
- (file, "%d (%s) %c %d", &dummy, comm, (char *) &dummy,
- &ppid) == 4)
- */
+- {
+- DIR *taskdir;
+- struct dirent *dt;
+- char *taskpath;
+- char *threadname;
+- int thread;
+-
+- if (!(taskpath = malloc(strlen(path) + 10))) {
+- exit (2);
+- }
+- sprintf (taskpath, "%s/task", path);
+-
+- if ((taskdir=opendir(taskpath))!=0) {
+- /* if we have this dir, we're on 2.6 */
+- if (!(threadname = malloc(strlen(comm) + 3))) {
+- exit (2);
+- }
+- sprintf(threadname,"{%s}",comm);
+- while ((dt = readdir(taskdir)) != NULL) {
+- if ((thread=atoi(dt->d_name)) !=0) {
+- if (thread != pid) {
+-#ifdef WITH_SELINUX
+- add_proc(threadname, thread, pid, st.st_uid, NULL, 0, scontext);
+-#else /*WITH_SELINUX*/
+- add_proc(threadname, thread, pid, st.st_uid, NULL, 0);
+-#endif /*WITH_SELINUX*/
+- }
+- }
+- }
+- free(threadname);
+- (void) closedir(taskdir);
+- }
+- free(taskpath);
+- }
+-
- if (!print_args)
--#ifdef FLASK_LINUX
-- add_proc(comm, pid, ppid, st.st_uid, NULL, 0, sid);
--#else /*FLASK_LINUX*/
+-#ifdef WITH_SELINUX
+- add_proc(comm, pid, ppid, st.st_uid, NULL, 0, scontext);
+-#else /*WITH_SELINUX*/
- add_proc (comm, pid, ppid, st.st_uid, NULL, 0);
--#endif /*FLASK_LINUX*/
+-#endif /*WITH_SELINUX*/
- else
- {
- sprintf (path, "%s/%d/cmdline", PROC_BASE, pid);
@@ -54,18 +88,18 @@
- (void) close (fd);
- if (size)
- buffer[size++] = 0;
--#ifdef FLASK_LINUX
-- add_proc(comm, pid, ppid, st.st_uid, buffer, size, sid);
--#else /*FLASK_LINUX*/
+-#ifdef WITH_SELINUX
+- add_proc(comm, pid, ppid, st.st_uid, buffer, size, scontext);
+-#else /*WITH_SELINUX*/
- add_proc (comm, pid, ppid, st.st_uid, buffer, size);
--#endif /*FLASK_LINUX*/
+-#endif /*WITH_SELINUX*/
- }
- }
- }
+ if (fscanf(file, "%s %*d %d", comm, &ppid) == 2) {
-+ add_proc(comm,pid,ppid,st.st_uid,NULL,0);
++ add_proc(comm,pid,ppid,st.st_uid,NULL,0);
}
-- (void) fclose (file);
++
+ (void) fclose (file);
}
free (path);
- }