aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Osorio <rodrigo@FreeBSD.org>2026-03-04 13:00:44 +0000
committerRodrigo Osorio <rodrigo@FreeBSD.org>2026-03-05 14:09:47 +0000
commite49d8ae4238f7402cfc9d9cc61c033c85ceaa818 (patch)
tree9bad4f2b8d33d1d00c24328d496f175fd64c8246
parentdac5730f959228681b61afcc51f7a7d5d9c2ab74 (diff)
sysutils/Makefile: Remove sysutils/whowatch
Whowatch was designed as a Linux application that relies on /var/log/wtmp and /var/run/utmp, which are now legacy on FreeBSD. Fixing the application for FreeBSD requires rewriting a large part of it.
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/whowatch/Makefile25
-rw-r--r--sysutils/whowatch/distinfo2
-rw-r--r--sysutils/whowatch/files/patch-Makefile.in13
-rw-r--r--sysutils/whowatch/files/patch-process.c11
-rw-r--r--sysutils/whowatch/files/patch-procinfo.c31
-rw-r--r--sysutils/whowatch/files/patch-whowatch.c105
-rw-r--r--sysutils/whowatch/files/patch-whowatch.h27
-rw-r--r--sysutils/whowatch/pkg-descr5
9 files changed, 0 insertions, 220 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 27e3cf6116b9..89e1cad2f6eb 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1597,7 +1597,6 @@
SUBDIR += weedit
SUBDIR += wemux
SUBDIR += whatpix
- SUBDIR += whowatch
SUBDIR += wiper
SUBDIR += witr
SUBDIR += wmapmload
diff --git a/sysutils/whowatch/Makefile b/sysutils/whowatch/Makefile
deleted file mode 100644
index f1ccc7bad7e0..000000000000
--- a/sysutils/whowatch/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-PORTNAME= whowatch
-PORTVERSION= 1.4
-PORTREVISION= 2
-CATEGORIES= sysutils
-MASTER_SITES= http://wizard.ae.krakow.pl/~mike/download/ \
- PACKETSTORM/UNIX/IDS
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Displays information in real time about users currently logged on
-WWW= http://wizard.ae.krakow.pl/~mike/
-
-LICENSE= GPLv2
-LICENSE_FILE= ${WRKSRC}/COPYING
-
-USES= ncurses
-GNU_CONFIGURE= yes
-GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
-
-PLIST_FILES= bin/whowatch share/man/man1/${PORTNAME}.1.gz
-
-pre-patch:
- @${FIND} ${WRKSRC} -name 'proc????.c' | ${XARGS} ${REINPLACE_CMD} -E \
- -e 's/kp_.?proc\.._/ki_/ ; s/pcred\.p_//'
-
-.include <bsd.port.mk>
diff --git a/sysutils/whowatch/distinfo b/sysutils/whowatch/distinfo
deleted file mode 100644
index 5a652d9df725..000000000000
--- a/sysutils/whowatch/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (whowatch-1.4.tar.gz) = 221564dbdf503990e6e14803a1df0c735c61fa6069ebc56a57a8fba9ac22e4f4
-SIZE (whowatch-1.4.tar.gz) = 43084
diff --git a/sysutils/whowatch/files/patch-Makefile.in b/sysutils/whowatch/files/patch-Makefile.in
deleted file mode 100644
index 28e3c6ec6e86..000000000000
--- a/sysutils/whowatch/files/patch-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.in.orig 2000-06-06 18:42:04.000000000 +0800
-+++ Makefile.in 2013-11-16 21:39:43.000000000 +0800
-@@ -70,8 +70,8 @@ clean:
- rm -rf ./*.o
- rm -f whowatch
- install: whowatch
-- $(INSTALL) -m 755 whowatch $(bindir)/whowatch
-- $(INSTALL) -m 644 whowatch.1 $(mandir)/man1/whowatch.1
-+ $(BSD_INSTALL_PROGRAM) whowatch $(DESTDIR)$(bindir)/whowatch
-+ $(BSD_INSTALL_MAN) whowatch.1 $(DESTDIR)$(mandir)/man1/whowatch.1
-
- distclean:
- make clean
diff --git a/sysutils/whowatch/files/patch-process.c b/sysutils/whowatch/files/patch-process.c
deleted file mode 100644
index 8ab666024a78..000000000000
--- a/sysutils/whowatch/files/patch-process.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- process.c.orig Wed Apr 4 16:25:29 2007
-+++ process.c Wed Apr 4 16:26:49 2007
-@@ -74,7 +74,7 @@
- memset(z, 0, sizeof *z);
- check_line(l);
- z->line = l++;
-- (struct process *) p->priv = z;
-+ p->priv = z;
- z->proc = p;
- if (*current){
- z->next = *current;
diff --git a/sysutils/whowatch/files/patch-procinfo.c b/sysutils/whowatch/files/patch-procinfo.c
deleted file mode 100644
index 2f46a20b2fa5..000000000000
--- a/sysutils/whowatch/files/patch-procinfo.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- procinfo.c.orig
-+++ procinfo.c
-@@ -65,7 +65,7 @@
- int fill_kinfo(struct kinfo_proc *info, int pid)
- {
- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };
-- int len = sizeof *info;
-+ size_t len = sizeof *info;
- if(sysctl(mib, 4, info, &len, 0, 0) == -1)
- return -1;
- return len?0:-1;
-@@ -124,7 +124,8 @@
- int get_login_pid(char *tty)
- {
- int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_TTY, 0};
-- int len, t, el, i, pid, cndt = -1, l;
-+ int t, el, i, pid, cndt = -1, l;
-+ size_t len;
- struct kinfo_proc *info;
- struct procinfo p;
-
-@@ -169,7 +170,8 @@
- int get_all_info(struct kinfo_proc **info)
- {
- int mib[3] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL };
-- int len, el;
-+ int el;
-+ size_t len;
-
- if(sysctl(mib, 3, 0, &len, 0, 0) == -1)
- return 0;
diff --git a/sysutils/whowatch/files/patch-whowatch.c b/sysutils/whowatch/files/patch-whowatch.c
deleted file mode 100644
index 9a0b00848f83..000000000000
--- a/sysutils/whowatch/files/patch-whowatch.c
+++ /dev/null
@@ -1,105 +0,0 @@
---- whowatch.c.orig 2000-06-06 03:21:44.000000000 -0700
-+++ whowatch.c 2010-02-02 19:56:37.081269004 -0800
-@@ -119,21 +119,17 @@
- /*
- * Create new user structure and fill it
- */
--struct user_t *allocate_user(struct utmp *entry)
-+struct user_t *allocate_user(struct utmpx *entry)
- {
- struct user_t *u;
- int ppid;
- u = calloc(1, sizeof *u);
- if(!u) errx(1, "Cannot allocate memory.");
-- strncpy(u->name, entry->ut_user, UT_NAMESIZE);
-- strncpy(u->tty, entry->ut_line, UT_LINESIZE);
-- strncpy(u->host, entry->ut_host, UT_HOSTSIZE);
-+ strncpy(u->name, entry->ut_user, sizeof(entry->ut_user));
-+ strncpy(u->tty, entry->ut_line, sizeof(entry->ut_line));
-+ strncpy(u->host, entry->ut_host, sizeof(entry->ut_host));
-
--#ifdef HAVE_UTPID
- u->pid = entry->ut_pid;
--#else
-- u->pid = get_login_pid(u->tty);
--#endif
-
- if((ppid = get_ppid(u->pid)) == -1)
- strncpy(u->parent, "can't access", sizeof u->parent);
-@@ -192,34 +188,24 @@
- */
- void read_utmp()
- {
-- int fd, i;
-- static struct utmp entry;
-+ static struct utmpx *entry;
- struct user_t *u;
-+
-+ while ((entry = getutxent()) != NULL) {
-
-- if ((fd = open(UTMP_FILE ,O_RDONLY)) == -1){
-- curses_end();
-- errx(1, "Cannot open " UTMP_FILE);
-- }
-- while((i = read(fd, &entry,sizeof entry)) > 0) {
-- if(i != sizeof entry) errx(1, "Error reading " UTMP_FILE );
--#ifdef HAVE_USER_PROCESS
-- if(entry.ut_type != USER_PROCESS) continue;
--#else
-- if(!entry.ut_name[0]) continue;
--#endif
-- u = allocate_user(&entry);
-+ if(entry->ut_type != USER_PROCESS) continue;
-+ u = allocate_user(entry);
- print_user(u);
- update_nr_users(u->parent, &u->prot, LOGIN);
- how_many ++;
- users_list.d_lines = how_many;
- addto_list(u, users);
- }
-- close(fd);
- wnoutrefresh(users_list.wd);
- return;
- }
-
--struct user_t* new_user(struct utmp *newone)
-+struct user_t* new_user(struct utmpx *newone)
- {
- struct user_t *u;
- u = allocate_user(newone);
-@@ -246,7 +232,7 @@
- void check_wtmp()
- {
- struct user_t *u;
-- struct utmp entry;
-+ struct utmpx entry;
- int i;
-
- while((i = read(wtmp_fd, &entry, sizeof entry)) > 0){
-@@ -256,25 +242,17 @@
- errx(1, "Error reading " WTMP_FILE );
- }
- /* user just logged in */
--#ifdef HAVE_USER_PROCESS
- if(entry.ut_type == USER_PROCESS) {
--#else
-- if(entry.ut_user[0]) {
--#endif
- u = new_user(&entry);
- print_user(u);
- wrefresh(users_list.wd);
- print_info();
- continue;
- }
--#ifdef HAVE_DEAD_PROCESS
- if(entry.ut_type != DEAD_PROCESS) continue;
--#else
--// if(entry.ut_line[0]) continue;
--#endif
- /* user just logged out */
- for_each(u, users) {
-- if(strncmp(u->tty, entry.ut_line, UT_LINESIZE))
-+ if(strncmp(u->tty, entry.ut_line, sizeof(entry.ut_line)))
- continue;
- if (state == USERS_LIST)
- delete_line(&users_list, u->line);
diff --git a/sysutils/whowatch/files/patch-whowatch.h b/sysutils/whowatch/files/patch-whowatch.h
deleted file mode 100644
index b0e051737708..000000000000
--- a/sysutils/whowatch/files/patch-whowatch.h
+++ /dev/null
@@ -1,27 +0,0 @@
---- whowatch.h.orig 2010-02-02 19:18:34.763514932 -0800
-+++ whowatch.h 2010-02-02 19:20:44.905393020 -0800
-@@ -2,7 +2,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
--#include <utmp.h>
-+#include <utmpx.h>
- #include <string.h>
- #include <signal.h>
- #include <sys/stat.h>
-@@ -75,12 +75,12 @@
- {
- struct user_t *next;
- struct user_t *prev;
-- char name[UT_NAMESIZE + 1]; /* login name */
-- char tty[UT_LINESIZE + 1]; /* tty */
-+ char name[sizeof(((struct utmpx *)0)->ut_user)]; /* login name */
-+ char tty[sizeof(((struct utmpx *)0)->ut_line)]; /* tty */
- int prot;
- int pid; /* pid of login shell */
- char parent[16];
-- char host[UT_HOSTSIZE + 1];
-+ char host[sizeof(((struct utmpx *)0)->ut_host)];
- int line;
- };
-
diff --git a/sysutils/whowatch/pkg-descr b/sysutils/whowatch/pkg-descr
deleted file mode 100644
index c7367b9a311b..000000000000
--- a/sysutils/whowatch/pkg-descr
+++ /dev/null
@@ -1,5 +0,0 @@
-Whowatch is an interactive who-like program that displays information about the
-users currently logged on to the machine. In addition to standard information
-(login name, tty, host, user's process), the type of the connection (telnet or
-ssh) is shown. You can toggle display between the users' commands or idle times.
-You can watch the process tree, navigate in it, and send INT and KILL signals.