diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index 75a4b756814e..b59760a77970 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -1,100 +1,99 @@ PORTNAME= screen -DISTVERSION= 5.0.1 -PORTREVISION= 6 +DISTVERSION= 5.0.2 CATEGORIES= sysutils MASTER_SITES= GNU \ ftp://ftp.gnu.org/gnu/screen/ \ ftp://gnu.mirror.iweb.com/screen/ \ http://gnu.mirror.iweb.com/screen/ \ http://mirror.sdunix.com/gnu/ \ ftp://mirrors.kernel.org/gnu/screen/ \ http://cschubert.com/distfiles/ \ LOCAL/cy MAINTAINER= cy@FreeBSD.org COMMENT= Multi-screen window manager WWW= https://www.gnu.org/software/screen/ CONFLICTS+= screen-devel LICENSE= GPLv3 OPTIONS_DEFINE= INFO SYSTEM_SCREENRC MULTIUSER \ NOSOCKETDIR OPTIONS_DEFAULT= INFO SYSTEM_SCREENRC \ NCURSES_DEFAULT MULTIUSER OPTIONS_SINGLE= NCURSES OPTIONS_SINGLE_NCURSES= NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT SYSTEM_SCREENRC_DESC= Install system screenrc with helpful status line MULTIUSER_DESC= Install setuid-root screen to support multiuser MULTIUSER_PLIST_SUB= MULTISUID="@(,,4555) " MULTIUSER_PLIST_SUB_OFF=MULTISUID="@(,,0555) " NCURSES_DEFAULT_DESC= Depend on ncurses (ports if installed, otherwise base) NCURSES_BASE_DESC= Depend on ncurses in base NCURSES_PORT_DESC= Depend on devel/ncurses in ports NOSOCKETDIR_DESC= Use ~/.screen instead of socketdir NCURSES_DEFAULT_USES= ncurses NCURSES_BASE_USES= ncurses:base NCURSES_PORT_USES= ncurses:port OPTIONS_SUB= USES= autoreconf:build gmake cpe CONFIGURE_ARGS= --with-system_screenrc=${ETCDIR}/screenrc MAKE_ARGS+= WITH_MAN=1 CPE_VENDOR= gnu .include GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share CFLAGS+= -I${NCURSESINC} -DSVR4 -DGETUTENT LDFLAGS+= -L${NCURSESLIB} .if ${PORT_OPTIONS:MINFO} INFO= screen MAKE_ARGS+= WITH_INFO=1 USES+= makeinfo .endif # Enables support for 256 colour xterm. Note that you may need to # set up a custom termcap entry or .screenrc which modifies termcap # to contain the following: Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm # .if ${PORT_OPTIONS:MNOSOCKETDIR} CONFIGURE_ARGS+= --disable-socket-dir .endif .if defined(SCREEN_SOCKET_DIR) CONFIGURE_ARGS+= --enable-socket-dir=${SCREEN_SOCKET_DIR} .endif # Bug 191029: Users can choose whether to use sockets or named pipes. # Choose sockets if you don't know what the difference is. # Choose named pipes if your environment is heterogeneous, # using both screen 4.0.3 and 4.2.1. # Bug 191017 pre-configure: cd ${WRKSRC} && ./autogen.sh ETCDIR?= ${PREFIX}/etc post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \ ${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-1 ${INSTALL_DATA} ${FILESDIR}/screenrc.sample \ ${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-2 @${MKDIR} ${STAGEDIR}${ETCDIR} .if ${PORT_OPTIONS:MSYSTEM_SCREENRC} ${INSTALL_DATA} ${FILESDIR}/screenrc.sample \ ${STAGEDIR}${ETCDIR}/screenrc.sample .else ${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \ ${STAGEDIR}${ETCDIR}/screenrc.sample .endif .include diff --git a/sysutils/screen/distinfo b/sysutils/screen/distinfo index ab41c246dddf..75f0fe287460 100644 --- a/sysutils/screen/distinfo +++ b/sysutils/screen/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1747935093 -SHA256 (screen-5.0.1.tar.gz) = 2dae36f4db379ffcd14b691596ba6ec18ac3a9e22bc47ac239789ab58409869d -SIZE (screen-5.0.1.tar.gz) = 897507 +TIMESTAMP = 1783946832 +SHA256 (screen-5.0.2.tar.gz) = ca9a2c7e240919bc7ac12124593ae4529bb4eb5f7349d8857829b7e3f0b3b332 +SIZE (screen-5.0.2.tar.gz) = 892441 diff --git a/sysutils/screen/files/patch-misc.h b/sysutils/screen/files/patch-misc.h new file mode 100644 index 000000000000..818c716ad6cf --- /dev/null +++ b/sysutils/screen/files/patch-misc.h @@ -0,0 +1,12 @@ +--- misc.h.orig 2024-03-26 16:41:57.000000000 -0700 ++++ misc.h 2024-04-03 11:30:19.350562000 -0700 +@@ -28,6 +28,9 @@ + int AddXChar (char *, int); + int AddXChars (char *, int, char *); + ++time_t SessionCreationTime(const char *fifo); ++ ++ + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + + #endif /* SCREEN_MISC_H */ diff --git a/sysutils/screen/files/patch-src_attacher.c b/sysutils/screen/files/patch-src_attacher.c deleted file mode 100644 index 3dd7d179b3c4..000000000000 --- a/sysutils/screen/files/patch-src_attacher.c +++ /dev/null @@ -1,108 +0,0 @@ -diff --git attacher.c attacher.c -index f2b60f0..9138176 100644 ---- attacher.c -+++ attacher.c -@@ -431,53 +431,62 @@ void SendCmdMessage(char *sty, char *match, char **av, int query) - sty[FILENAME_MAX] = 0; - if (strlen(sty) > 2 * MAXSTR - 1) - sty[2 * MAXSTR - 1] = 0; -- sprintf(SocketPath + strlen(SocketPath), "/%s", sty); -+ -+ snprintf(SocketPath + strlen(SocketPath), -+ sizeof(SocketPath) - strlen(SocketPath), "/%s", sty); -+ - if ((s = MakeClientSocket(1)) == -1) - exit(1); - } -- memset((char *)&m, 0, sizeof(Message)); -+ -+ memset(&m, 0, sizeof(Message)); - m.type = query ? MSG_QUERY : MSG_COMMAND; -+ - if (attach_tty) { -- strncpy(m.m_tty, attach_tty_is_in_new_ns ? attach_tty_name_in_ns : attach_tty, ARRAY_SIZE(m.m_tty) - 1); -- m.m_tty[ARRAY_SIZE(m.m_tty) - 1] = 0; -+ snprintf(m.m_tty, sizeof(m.m_tty), "%s", -+ attach_tty_is_in_new_ns ? attach_tty_name_in_ns : attach_tty); - } -+ - p = m.m.command.cmd; - n = 0; -- size_t space_left = ARRAY_SIZE(m.m.command.cmd); -+ size_t space_left = sizeof(m.m.command.cmd); - - for (; *av && n < MAXARGS - 1; ++av, ++n) { -- int printed = snprintf(p, space_left, "%s", *av); -- if (printed < 0 || (size_t)printed >= space_left) -- Panic(0, "Total length of the command to send too large.\n"); -+ int printed = snprintf(p, space_left, "%s", *av); -+ if (printed < 0 || (size_t)printed >= space_left) -+ Panic(0, "Total length of the command to send too large.\n"); - -- printed += 1; // add null terminator -- p += printed; -- space_left -= printed; -+ /* move past string and null terminator */ -+ p += printed + 1; -+ space_left -= printed + 1; - } -- *p = 0; -+ -+ *p = '\0'; - m.m.command.nargs = n; -- strncpy(m.m.attach.auser, LoginName, ARRAY_SIZE(m.m.attach.auser) - 1); -- m.m.command.auser[ARRAY_SIZE(m.m.command.auser) - 1] = 0; -+ -+ snprintf(m.m.command.auser, sizeof(m.m.command.auser), "%s", LoginName); - m.protocol_revision = MSG_REVISION; -- strncpy(m.m.command.preselect, preselect ? preselect : "", ARRAY_SIZE(m.m.command.preselect) - 1); -- m.m.command.preselect[ARRAY_SIZE(m.m.command.preselect) - 1] = 0; -+ snprintf(m.m.command.preselect, sizeof(m.m.command.preselect), "%s", -+ preselect ? preselect : ""); - m.m.command.apid = getpid(); -+ - if (query) { - /* Create a server socket so we can get back the result */ - char *sp = SocketPath + strlen(SocketPath); -- char query[] = "-queryX"; - char c; - int r = -1; -+ - for (c = 'A'; c <= 'Z'; c++) { -- query[6] = c; -- strncpy(sp, query, strlen(SocketPath)); -+ snprintf(sp, sizeof(SocketPath) - strlen(SocketPath), -+ "-query%c", c); - if ((r = MakeServerSocket()) >= 0) - break; - } -+ - if (r < 0) { - for (c = '0'; c <= '9'; c++) { -- query[6] = c; -- strncpy(sp, query, strlen(SocketPath)); -+ snprintf(sp, sizeof(SocketPath) - strlen(SocketPath), -+ "-query%c", c); - if ((r = MakeServerSocket()) >= 0) - break; - } -@@ -486,8 +495,8 @@ void SendCmdMessage(char *sty, char *match, char **av, int query) - if (r < 0) - Panic(0, "Could not create a listening socket to read the results."); - -- strncpy(m.m.command.writeback, SocketPath, ARRAY_SIZE(m.m.command.writeback) - 1); -- m.m.command.writeback[ARRAY_SIZE(m.m.command.writeback) - 1] = '\0'; -+ snprintf(m.m.command.writeback, sizeof(m.m.command.writeback), -+ "%s", SocketPath); - - /* Send the message, then wait for a response */ - xsignal(SIGCONT, QueryResultSuccess); -@@ -504,7 +513,7 @@ void SendCmdMessage(char *sty, char *match, char **av, int query) - ReceiveRaw(r); - close(r); - unlink(SocketPath); -- if (QueryResult == 2) /* An error happened */ -+ if (QueryResult == 2) /* An error happened */ - exit(1); - } else { - if (WriteMessage(s, &m)) diff --git a/sysutils/screen/files/patch-telnet.c b/sysutils/screen/files/patch-telnet.c deleted file mode 100644 index 16caef08be2f..000000000000 --- a/sysutils/screen/files/patch-telnet.c +++ /dev/null @@ -1,11 +0,0 @@ ---- telnet.c.orig 2025-05-15 15:31:27 UTC -+++ telnet.c -@@ -228,7 +228,7 @@ void TelProcessLine(char **bufpp, size_t *lenp) - *lenp = 0; - } - --int DoTelnet(char *buf, size_t *lenp, int f) -+int DoTelnet(char *buf, int *lenp, int f) - { - int echo = !fore->w_telropts[TO_ECHO]; - int cmode = fore->w_telropts[TO_SGA]; diff --git a/sysutils/screen/files/patch-telnet.h b/sysutils/screen/files/patch-telnet.h deleted file mode 100644 index 26863b5dd67d..000000000000 --- a/sysutils/screen/files/patch-telnet.h +++ /dev/null @@ -1,11 +0,0 @@ ---- telnet.h.orig 2025-05-15 15:31:27 UTC -+++ telnet.h -@@ -9,7 +9,7 @@ void TelProcessLine(char **, size_t *); - int TelOpenAndConnect(Window *); - int TelIsline(Window *); - void TelProcessLine(char **, size_t *); --int DoTelnet(char *, size_t *, int); -+int DoTelnet(char *, int *, int); - int TelIn(Window *, char *, size_t, int); - void TelBreak(Window *); - void TelWindowSize(Window *); diff --git a/sysutils/screen/files/patch-window.c b/sysutils/screen/files/patch-window.c deleted file mode 100644 index 6c101e84a901..000000000000 --- a/sysutils/screen/files/patch-window.c +++ /dev/null @@ -1,148 +0,0 @@ ---- window.c.orig 2025-05-15 15:31:27 UTC -+++ window.c -@@ -61,7 +61,7 @@ static void WinRestore(void); - static void WinClearLine(int, int, int, int); - static int WinResize(int, int); - static void WinRestore(void); --static int DoAutolf(char *, size_t *, int); -+static int DoAutolf(char *, int *, int); - static void ZombieProcess(char **, size_t *); - static void win_readev_fn(Event *, void *); - static void win_writeev_fn(Event *, void *); -@@ -74,9 +74,9 @@ static int ForkWindow(Window *, char **, char *); - static void win_destroyev_fn(Event *, void *); - - static int ForkWindow(Window *, char **, char *); --static void zmodem_found(Window *, int, char *, size_t); -+static void zmodem_found(Window *, int, char *, int); - static void zmodemFin(char *, size_t, void *); --static int zmodem_parse(Window *, char *, size_t); -+static int zmodem_parse(Window *, char *, int); - - bool VerboseCreate = false; /* XXX move this to user.h */ - -@@ -191,10 +191,10 @@ const struct LayFuncs WinLf = { - NULL - }; - --static int DoAutolf(char *buf, size_t *lenp, int fr) -+static int DoAutolf(char *buf, int *lenp, int fr) - { - char *p; -- size_t len = *lenp; -+ int len = *lenp; - int trunc = 0; - - for (p = buf; len > 0; p++, len--) { -@@ -215,7 +215,7 @@ static void WinProcess(char **bufpp, size_t *lenp) - - static void WinProcess(char **bufpp, size_t *lenp) - { -- size_t l2 = 0, f, *ilen, l = *lenp, trunc; -+ int l2 = 0, f, *ilen, l = *lenp, trunc; - char *ibuf; - - fore = (Window *)flayer->l_data; -@@ -291,7 +291,7 @@ static void ZombieProcess(char **bufpp, size_t *lenp) - - static void ZombieProcess(char **bufpp, size_t *lenp) - { -- size_t l = *lenp; -+ int l = *lenp; - char *buf = *bufpp, b1[10], b2[10]; - - fore = (Window *)flayer->l_data; -@@ -699,7 +699,7 @@ int MakeWindow(struct NewWindow *newwin) - p->w_readev.data = p->w_writeev.data = (char *)p; - p->w_readev.handler = win_readev_fn; - p->w_writeev.handler = win_writeev_fn; -- p->w_writeev.condpos = (int *)&p->w_inlen; -+ p->w_writeev.condpos = &p->w_inlen; - evenq(&p->w_readev); - evenq(&p->w_writeev); - p->w_paster.pa_slowev.type = EV_TIMEOUT; -@@ -1344,7 +1344,7 @@ int winexec(char **av) - pwin->p_readev.data = pwin->p_writeev.data = (char *)w; - pwin->p_readev.handler = pseu_readev_fn; - pwin->p_writeev.handler = pseu_writeev_fn; -- pwin->p_writeev.condpos = (int *)&pwin->p_inlen; -+ pwin->p_writeev.condpos = &pwin->p_inlen; - if (pwin->p_fdpat & (F_PFRONT << F_PSHIFT * 2 | F_PFRONT << F_PSHIFT)) - evenq(&pwin->p_readev); - evenq(&pwin->p_writeev); -@@ -1378,7 +1378,7 @@ void FreePseudowin(Window *w) - } - evdeq(&pwin->p_readev); - evdeq(&pwin->p_writeev); -- if (w->w_readev.condneg == (int *)&pwin->p_inlen) -+ if (w->w_readev.condneg == &pwin->p_inlen) - w->w_readev.condpos = w->w_readev.condneg = NULL; - evenq(&w->w_readev); - free((char *)pwin); -@@ -1484,7 +1484,7 @@ static void win_readev_fn(Event *event, void *data) - size = IOSIZE - p->w_pwin->p_inlen; - if (size <= 0) { - event->condpos = &const_IOSIZE; -- event->condneg = (int *)&p->w_pwin->p_inlen; -+ event->condneg = &p->w_pwin->p_inlen; - return; - } - } -@@ -1563,7 +1563,7 @@ static void win_writeev_fn(Event *event, void *data) - static void win_writeev_fn(Event *event, void *data) - { - Window *p = (Window *)data; -- size_t len; -+ int len; - if (p->w_inlen) { - if ((len = write(event->fd, p->w_inbuf, p->w_inlen)) <= 0) - len = p->w_inlen; /* dead window */ -@@ -1600,7 +1600,7 @@ static void pseu_readev_fn(Event *event, void *data) - size = IOSIZE - p->w_inlen; - if (size <= 0) { - event->condpos = &const_IOSIZE; -- event->condneg = (int *)&p->w_inlen; -+ event->condneg = &p->w_inlen; - return; - } - } -@@ -1643,7 +1643,7 @@ static void pseu_writeev_fn(Event *event, void *data) - { - Window *p = (Window *)data; - struct pseudowin *pw = p->w_pwin; -- size_t len; -+ int len; - - if (pw->p_inlen == 0) - return; -@@ -1683,10 +1683,10 @@ static void win_destroyev_fn(Event *event, void *data) - WindowDied(p, p->w_exitstatus, 1); - } - --static int zmodem_parse(Window *p, char *bp, size_t len) -+static int zmodem_parse(Window *p, char *bp, int len) - { - char *b2 = bp; -- for (size_t i = 0; i < len; i++, b2++) { -+ for (int i = 0; i < len; i++, b2++) { - if (p->w_zauto == 0) { - for (; i < len; i++, b2++) - if (*b2 == 030) -@@ -1756,7 +1756,7 @@ static void zmodemFin(char *buf, size_t len, void *dat - } - } - --static void zmodem_found(Window *p, int send, char *bp, size_t len) -+static void zmodem_found(Window *p, int send, char *bp, int len) - { - char *s; - size_t n; -@@ -1792,7 +1792,7 @@ static void zmodem_found(Window *p, int send, char *bp - display = d; - evdeq(&D_blockedev); - D_readev.condpos = &const_IOSIZE; -- D_readev.condneg = (int *)&p->w_inlen; -+ D_readev.condneg = &p->w_inlen; - ClearAll(); - GotoPos(0, 0); - SetRendition(&mchar_blank); diff --git a/sysutils/screen/files/patch-window.h b/sysutils/screen/files/patch-window.h deleted file mode 100644 index 348fcc223062..000000000000 --- a/sysutils/screen/files/patch-window.h +++ /dev/null @@ -1,23 +0,0 @@ ---- window.h.orig 2025-05-15 15:31:27 UTC -+++ window.h -@@ -79,7 +79,7 @@ struct pseudowin { - char p_cmd[MAXSTR]; - char p_tty[MAXSTR]; - char p_inbuf[IOSIZE]; /* buffered writing to p_ptyfd */ -- size_t p_inlen; -+ int p_inlen; - }; - - /* bits for fdpat: */ -@@ -157,9 +157,9 @@ struct Window { - int w_poll_zombie_timeout; - int w_ptyfd; /* fd of the master pty */ - char w_inbuf[IOSIZE]; -- size_t w_inlen; -+ int w_inlen; - char w_outbuf[IOSIZE]; -- size_t w_outlen; -+ int w_outlen; - bool w_aflag; /* (-a option) */ - bool w_dynamicaka; /* should we change name */ - char *w_title; /* name of the window */ diff --git a/sysutils/screen/pkg-plist b/sysutils/screen/pkg-plist index aabb61708efd..54acedbafd08 100644 --- a/sysutils/screen/pkg-plist +++ b/sysutils/screen/pkg-plist @@ -1,27 +1,27 @@ bin/screen -%%MULTISUID%%bin/screen-5.0.1 +%%MULTISUID%%bin/screen-5.0.2 share/man/man1/screen.1.gz %%DATADIR%%/utf8encodings/01 %%DATADIR%%/utf8encodings/02 %%DATADIR%%/utf8encodings/03 %%DATADIR%%/utf8encodings/04 %%DATADIR%%/utf8encodings/18 %%DATADIR%%/utf8encodings/19 %%DATADIR%%/utf8encodings/a1 %%DATADIR%%/utf8encodings/a3 %%DATADIR%%/utf8encodings/bf %%DATADIR%%/utf8encodings/c2 %%DATADIR%%/utf8encodings/c3 %%DATADIR%%/utf8encodings/c4 %%DATADIR%%/utf8encodings/c6 %%DATADIR%%/utf8encodings/c7 %%DATADIR%%/utf8encodings/c8 %%DATADIR%%/utf8encodings/cc %%DATADIR%%/utf8encodings/cd %%DATADIR%%/utf8encodings/d6 @comment We always install the same screenrc it just depends on if we @comment are installing the the one bundled with source, or the one from @comment FILESDIR/screenrc.sample @sample %%ETCDIR%%/screenrc.sample %%EXAMPLESDIR%%/screenrc.sample-1 %%EXAMPLESDIR%%/screenrc.sample-2