Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108331319
D32032.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D32032.diff
View Options
diff --git a/MOVED b/MOVED
--- a/MOVED
+++ b/MOVED
@@ -14791,7 +14791,6 @@
sysutils/ptools||2020-05-05|Has expired: Broken for more than 6 months
sysutils/realsync||2020-05-05|Has expired: Broken for more than 6 months
sysutils/rmonitor||2020-05-05|Has expired: Broken for more than 6 months
-sysutils/roottail||2020-05-05|Has expired: Broken for more than 6 months
sysutils/sb16config||2020-05-05|Has expired: Broken for more than 6 months
sysutils/sbase||2020-05-05|Has expired: Broken for more than 6 months
sysutils/setquota||2020-05-05|Has expired: Broken for more than 6 months
@@ -16485,6 +16484,7 @@
net-mgmt/zabbix52-java||2021-09-19|Has expired: Unsupported by upstream
net-mgmt/zabbix52-proxy||2021-09-19|Has expired: Unsupported by upstream
net-mgmt/zabbix52-server||2021-09-19|Has expired: Unsupported by upstream
+sysutils/roottail|sysutils/root-tail|2021-09-26|Renamed to match upstream
devel/py-pyyaml-env-tag|devel/py-pyyaml_env_tag|2021-09-28|Renamed to match upstream naming
mail/opensmtpd-devel|mail/opensmtpd|2021-09-28|Has expired: move to offical releases
devel/erlang-exmpp||2021-09-30|Removed, last upstream patches over 10 years ago
diff --git a/sysutils/Makefile b/sysutils/Makefile
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1127,6 +1127,7 @@
SUBDIR += rmlint
SUBDIR += rocr
SUBDIR += roct
+ SUBDIR += root-tail
SUBDIR += rovclock
SUBDIR += rpi-firmware
SUBDIR += rset
diff --git a/sysutils/root-tail/Makefile b/sysutils/root-tail/Makefile
new file mode 100644
--- /dev/null
+++ b/sysutils/root-tail/Makefile
@@ -0,0 +1,19 @@
+PORTNAME= root-tail
+DISTVERSION= 1.3
+CATEGORIES= sysutils
+MASTER_SITES= http://dist.schmorp.de/${PORTNAME}/
+
+MAINTAINER= drtr0jan@yandex.ru
+COMMENT= Print text directly to X11 root window
+
+LICENSE= GPLv2+
+
+LIB_DEPENDS= libXfixes.so:x11/libXfixes
+
+USES= imake xorg
+USE_XORG= x11 xext
+
+PLIST_FILES= bin/root-tail \
+ man/man1/root-tail.1.gz
+
+.include <bsd.port.mk>
diff --git a/sysutils/root-tail/distinfo b/sysutils/root-tail/distinfo
new file mode 100644
--- /dev/null
+++ b/sysutils/root-tail/distinfo
@@ -0,0 +1,2 @@
+SHA256 (root-tail-1.3.tar.gz) = 460475323404460919ff48c90f7b3ebfdb66f3b9961f54dd73dd172178c07712
+SIZE (root-tail-1.3.tar.gz) = 19068
diff --git a/sysutils/root-tail/files/patch-Makefile b/sysutils/root-tail/files/patch-Makefile
new file mode 100644
--- /dev/null
+++ b/sysutils/root-tail/files/patch-Makefile
@@ -0,0 +1,41 @@
+Sources:
+https://salsa.debian.org/debian/root-tail/-/blob/master/debian/patches/do-not-chown-manually.patch
+https://salsa.debian.org/debian/root-tail/-/blob/master/debian/patches/fix-linker-and-compiler-options.patch
+
+--- Makefile.orig 2019-06-16 00:57:40 UTC
++++ Makefile
+@@ -1,9 +1,5 @@
+-COPTS = -g
++LDFLAGS += -lX11 -lXfixes
+
+-CFLAGS = -Wall $(COPTS)
+-
+-LDFLAGS = -L/usr/X11R6/lib -lX11 -lXfixes
+-
+ PREFIX = $(DESTDIR)/usr
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/share/man/man1
+@@ -14,7 +10,7 @@ SOURCES = root-tail.c
+ all: root-tail man
+
+ root-tail: $(SOURCES) config.h
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SOURCES)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
+
+ man: root-tail.1.gz
+
+@@ -26,10 +22,10 @@ clean:
+ rm -f root-tail root-tail.o root-tail.1.gz
+
+ install: all
+- install -D -o root -g root root-tail $(BINDIR)
+- install -D -m 0644 -o root -g root root-tail.1.gz $(MANDIR)
+- install -D -m 0644 -o root -g root README $(DOCDIR)
+- install -m 0644 -o root -g root Changes $(DOCDIR)
++ install -D root-tail $(BINDIR)
++ install -D -m 0644 root-tail.1.gz $(MANDIR)
++ install -D -m 0644 README $(DOCDIR)
++ install -m 0644 Changes $(DOCDIR)
+
+ uninstall:
+ rm -f $(BINDIR)/root-tail $(MANDIR)/root-tail.1.gz
diff --git a/sysutils/root-tail/files/patch-root-tail.c b/sysutils/root-tail/files/patch-root-tail.c
new file mode 100644
--- /dev/null
+++ b/sysutils/root-tail/files/patch-root-tail.c
@@ -0,0 +1,126 @@
+Sources:
+https://src.fedoraproject.org/rpms/root-tail/blob/rawhide/f/root-tail-1.3-Generate-Expose-events-when-clearing-a-window.patch
+https://src.fedoraproject.org/rpms/root-tail/blob/rawhide/f/root-tail-1.3-Respect-width-and-height-unsigness-in-arithmetics.patch
+
+--- root-tail.c.orig 2019-06-16 00:46:04 UTC
++++ root-tail.c
+@@ -38,6 +38,7 @@
+ #include <locale.h>
+ #include <ctype.h>
+ #include <stdarg.h>
++#include <limits.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+ #include <X11/Xutil.h>
+@@ -118,7 +119,7 @@ static int continuation_length;
+ /* HACK - ideally listlen will start at however many '~'s will fit on
+ * the screen */
+ static unsigned int width = STD_WIDTH, height = STD_HEIGHT;
+-static int listlen = 50;
++static unsigned int listlen = 50;
+ static int win_x = LOC_X, win_y = LOC_Y;
+ static int effect_x_space, effect_y_space; /* how much space does shading / outlining take up */
+ static int effect_x_offset, effect_y_offset; /* and how does it offset the usable space */
+@@ -206,7 +207,7 @@ force_refresh (int dummy)
+ static void
+ blank_window (int dummy)
+ {
+- XClearArea (disp, root, win_x, win_y, width + MARGIN_OF_ERROR, height, False);
++ XClearArea (disp, root, win_x, win_y, width + MARGIN_OF_ERROR, height, True);
+ XFlush (disp);
+ exit (0);
+ }
+@@ -369,7 +370,7 @@ InitWindow (void)
+ {
+ fprintf(stderr, "\n the display isn't tall enough to display a single line in font '%s'\n",
+ e->fontname);
+- fprintf(stderr, "\n the geometry in use is %d pixels tall\n", height);
++ fprintf(stderr, "\n the geometry in use is %u pixels tall\n", height);
+ fprintf(stderr, "\n font '%s' is %d pixels tall\n", e->fontname, e->font_height);
+ if (effect_y_space)
+ fprintf(stderr, "\n the shade or outline options need an extra %d pixel%s of vertical space\n",
+@@ -445,8 +446,8 @@ draw_text (Display *disp, Window root, GC WinGC, int x
+ static void
+ refresh (int miny, int maxy, int clear, int refresh_all)
+ {
+- int lin = 0;
+- int space = height;
++ unsigned int lin = 0;
++ int space = (int)height;
+ int offset;
+ unsigned long black_color = GetColor ("black");
+ struct line_node *line;
+@@ -462,7 +463,7 @@ refresh (int miny, int maxy, int clear, int refresh_al
+ maxy -= win_y;
+
+ if (clear && !opt_noflicker)
+- XClearArea (disp, root, win_x, win_y, width + MARGIN_OF_ERROR, height, False);
++ XClearArea (disp, root, win_x, win_y, width + MARGIN_OF_ERROR, height, True);
+
+ for (line = linelist; line; line = line->next, lin++)
+ {
+@@ -470,7 +471,7 @@ refresh (int miny, int maxy, int clear, int refresh_al
+
+ if (opt_noflicker && lin >= listlen)
+ {
+- int i = listlen;
++ unsigned int i = listlen;
+ listlen *= 1.5;
+ display = xrealloc(display, listlen * sizeof(struct displaymatrix));
+ for (; i < listlen; i++)
+@@ -535,7 +536,7 @@ refresh (int miny, int maxy, int clear, int refresh_al
+ width, step_per_line);
+ #else /* DEBUG */
+ XClearArea (disp, root, win_x, win_y + offset - line->logfile->font_ascent,
+- width + MARGIN_OF_ERROR, step_per_line, False);
++ width + MARGIN_OF_ERROR, step_per_line, True);
+ #endif /* DEBUG */
+ }
+ }
+@@ -584,7 +585,7 @@ refresh (int miny, int maxy, int clear, int refresh_al
+ width, space);
+ #else /* DEBUG */
+ XClearArea (disp, root, win_x, win_y + offset - (opt_reverse ? 0 : space),
+- width + MARGIN_OF_ERROR, space, False);
++ width + MARGIN_OF_ERROR, space, True);
+ #endif
+ }
+
+@@ -1112,7 +1113,7 @@ append_to_existing_line (char *str, struct logfile_ent
+ static void
+ main_loop (void)
+ {
+- int lin;
++ unsigned int lin;
+ time_t lastreload;
+ Region region = XCreateRegion ();
+ XEvent xev;
+@@ -1325,8 +1326,26 @@ main (int argc, char *argv[])
+ else if (!strcmp (arg, "-V"))
+ display_version ();
+ else if (!strcmp (arg, "-g") || !strcmp (arg, "-geometry"))
+- geom_mask =
+- XParseGeometry (argv[++i], &win_x, &win_y, &width, &height);
++ {
++ geom_mask =
++ XParseGeometry (argv[++i], &win_x, &win_y, &width, &height);
++ /* Width and height are used in various expressions assigned to
++ * signed or unsigned integers. The assignments could overflow. */
++ if (width < 1 || width > INT_MAX - MARGIN_OF_ERROR || width > UINT_MAX)
++ {
++ fprintf (stderr,
++ "The geometry width is too small or too large: '%u'.\n",
++ width);
++ exit (1);
++ }
++ if (height < 1 || height > UINT_MAX)
++ {
++ fprintf (stderr,
++ "The geometry height is too small or too large: '%u'.\n",
++ height);
++ exit (1);
++ }
++ }
+ else if (!strcmp (arg, "-display"))
+ dispname = argv[++i];
+ else if (!strcmp (arg, "-cont"))
diff --git a/sysutils/root-tail/pkg-descr b/sysutils/root-tail/pkg-descr
new file mode 100644
--- /dev/null
+++ b/sysutils/root-tail/pkg-descr
@@ -0,0 +1,5 @@
+Simple utility to tail files/logs to a root X window.
+Useful for keeping tabs on log files in X without having
+an additional terminal window open.
+
+WWW: http://software.schmorp.de/pkg/root-tail.html
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 10:33 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16107410
Default Alt Text
D32032.diff (9 KB)
Attached To
Mode
D32032: sysutils/root-tail: Print text directly to X11 root window
Attached
Detach File
Event Timeline
Log In to Comment