From ff397ac841110cb95b7c354a2ef13c4889e29036 Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 14 Jan 2025 12:24:56 +0300 Subject: [PATCH] import screen-5.0.0-1.el10 --- .gitignore | 17 +--- .screen.metadata | 1 + .../screen-5.0.0-screenrc.patch | 36 ++++---- SOURCES/screen-5.0.0-suppress_remap.patch | 17 ++++ SOURCES/screen.pam | 2 + screen.spec => SPECS/screen.spec | 51 +++++++++--- screen-4.3.1-crypt.patch | 15 ---- screen-4.3.1-libs.patch | 52 ------------ screen-4.3.1-suppress_remap.patch | 18 ---- screen-4.8.0-CVE-2021-26937.patch | 82 ------------------- screen-4.8.0-expand-d_xtermosc.patch | 37 --------- screen-E3.patch | 58 ------------- sources | 1 - 13 files changed, 76 insertions(+), 311 deletions(-) create mode 100644 .screen.metadata rename screen-4.3.1-screenrc.patch => SOURCES/screen-5.0.0-screenrc.patch (82%) create mode 100644 SOURCES/screen-5.0.0-suppress_remap.patch create mode 100644 SOURCES/screen.pam rename screen.spec => SPECS/screen.spec (93%) delete mode 100644 screen-4.3.1-crypt.patch delete mode 100644 screen-4.3.1-libs.patch delete mode 100644 screen-4.3.1-suppress_remap.patch delete mode 100644 screen-4.8.0-CVE-2021-26937.patch delete mode 100644 screen-4.8.0-expand-d_xtermosc.patch delete mode 100644 screen-E3.patch delete mode 100644 sources diff --git a/.gitignore b/.gitignore index 81178df..ad8a551 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1 @@ -screen-4.0.3.tar.gz -/screen-20101110git066b098.tar.bz2 -/screen-20110328git8cf5ef.tar.bz2 -/screen-20110819git450e8f.tar.bz2 -/screen-20120314git3c2946.tar.bz2 -/screen-4.2.1.tar.gz -/screen-4.3.1.tar.gz -/screen-4.4.0.tar.gz -/screen-4.5.0.tar.gz -/screen-4.5.1.tar.gz -/screen.pam -/screen-4.6.0.tar.gz -/screen-4.6.1.tar.gz -/screen-4.6.2.tar.gz -/screen-4.7.0.tar.gz -/screen-4.8.0.tar.gz +SOURCES/screen-5.0.0.tar.gz diff --git a/.screen.metadata b/.screen.metadata new file mode 100644 index 0000000..4b67a99 --- /dev/null +++ b/.screen.metadata @@ -0,0 +1 @@ +caedbcda3bb61d4e5d38526fd1f484b25a6420a0 SOURCES/screen-5.0.0.tar.gz diff --git a/screen-4.3.1-screenrc.patch b/SOURCES/screen-5.0.0-screenrc.patch similarity index 82% rename from screen-4.3.1-screenrc.patch rename to SOURCES/screen-5.0.0-screenrc.patch index 67e3698..a3dde6e 100644 --- a/screen-4.3.1-screenrc.patch +++ b/SOURCES/screen-5.0.0-screenrc.patch @@ -1,6 +1,6 @@ -diff -up screen-4.0.3/etc/etcscreenrc.screenrc screen-4.0.3/etc/etcscreenrc ---- screen-4.0.3/etc/etcscreenrc.screenrc 2003-12-05 14:46:13.000000000 +0100 -+++ screen-4.0.3/etc/etcscreenrc 2009-09-25 14:20:31.000000000 +0200 +diff -urNp a/etc/etcscreenrc b/etc/etcscreenrc +--- a/etc/etcscreenrc 2024-08-29 13:19:43.338081707 +0200 ++++ b/etc/etcscreenrc 2024-08-29 13:30:53.317879889 +0200 @@ -36,8 +36,8 @@ vbell_msg " Wuff ---- Wuff!! " # IC insert multiple chars # nx terminal uses xon/xoff @@ -32,33 +32,25 @@ diff -up screen-4.0.3/etc/etcscreenrc.screenrc screen-4.0.3/etc/etcscreenrc # # Do not use xterms alternate window buffer. -diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc ---- screen-4.0.3/etc/screenrc.screenrc 2006-10-23 15:06:32.000000000 +0200 -+++ screen-4.0.3/etc/screenrc 2009-09-25 14:31:30.000000000 +0200 -@@ -1,21 +1,11 @@ +diff -urNp a/etc/screenrc b/etc/screenrc +--- a/etc/screenrc 2024-08-29 13:19:43.338081707 +0200 ++++ b/etc/screenrc 2024-08-29 13:37:24.825930374 +0200 +@@ -1,12 +1,5 @@ -# -# Example of a user's .screenrc file -# - - # This is how one can set a reattach password: - # password ODSJQf.4IJN7E # "1234" - -# no annoying audible bell, please -vbell on - -# detach on hangup -autodetach on -- ++# This is how one can set a reattach password: ++# password ODSJQf.4IJN7E # "1234" + # don't display the copyright page startup_message off - - # emulate .logout message --pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." -+pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." - - # advertise hardstatus support to $TERMCAP - # termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' -@@ -40,18 +30,12 @@ defscrollback 1000 +@@ -40,18 +33,12 @@ defscrollback 1000 ################ # @@ -79,7 +71,7 @@ diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc # Make the output buffer large for (fast) xterms. #termcapinfo xterm* OL=10000 -@@ -59,18 +43,18 @@ termcapinfo xterm* OL=100 +@@ -59,18 +46,18 @@ termcapinfo xterm* OL=100 # tell screen that xterm can switch to dark background and has function # keys. @@ -104,7 +96,7 @@ diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc # xterm-52 tweaks: # - uses background color for delete operations -@@ -103,32 +87,12 @@ termcapinfo linux C8 +@@ -103,32 +90,12 @@ termcapinfo linux C8 # old rxvt versions also need this # termcapinfo rxvt C8 @@ -140,7 +132,7 @@ diff -up screen-4.0.3/etc/screenrc.screenrc screen-4.0.3/etc/screenrc ################ # -@@ -140,9 +104,14 @@ bind ^] paste [.] +@@ -140,9 +107,14 @@ bind ^] paste [.] # screen -t 40 2 rlogin server # caption always "%3n %t%? @%u%?%? [%h]%?%=%c" diff --git a/SOURCES/screen-5.0.0-suppress_remap.patch b/SOURCES/screen-5.0.0-suppress_remap.patch new file mode 100644 index 0000000..96cd437 --- /dev/null +++ b/SOURCES/screen-5.0.0-suppress_remap.patch @@ -0,0 +1,17 @@ +Author: Loic Minier +Description: Unbreak several useful keybindings. + +fix for nonworking ^a backspace (rhbz#708698) + +diff -urNp a/termcap.c b/termcap.c +--- a/termcap.c 2024-08-29 13:12:18.219574842 +0200 ++++ b/termcap.c 2024-08-29 13:17:59.212026846 +0200 +@@ -449,8 +449,6 @@ int remap(int n, int map) + } else + break; + } +- if (n < KMAP_KEYS) +- domap = 1; + if (map == 0 && domap) + return 0; + if (map && !domap) diff --git a/SOURCES/screen.pam b/SOURCES/screen.pam new file mode 100644 index 0000000..143c372 --- /dev/null +++ b/SOURCES/screen.pam @@ -0,0 +1,2 @@ +#%PAM-1.0 +auth include system-auth diff --git a/screen.spec b/SPECS/screen.spec similarity index 93% rename from screen.spec rename to SPECS/screen.spec index 86eda82..79cd9f8 100644 --- a/screen.spec +++ b/SPECS/screen.spec @@ -3,9 +3,9 @@ Summary: A screen manager that supports multiple logins on one terminal Name: screen -Version: 4.8.0 -Release: 6%{?dist} -License: GPLv3+ +Version: 5.0.0 +Release: 1%{?dist} +License: GPL-3.0-or-later URL: http://www.gnu.org/software/screen Requires(pre): /usr/sbin/groupadd BuildRequires: make @@ -17,13 +17,8 @@ BuildRequires: systemd Source0: https://ftp.gnu.org/gnu/screen/screen-%{version}.tar.gz Source1: screen.pam -Patch1: screen-4.3.1-libs.patch -Patch2: screen-4.3.1-screenrc.patch -Patch3: screen-E3.patch -Patch4: screen-4.3.1-suppress_remap.patch -Patch5: screen-4.3.1-crypt.patch -Patch6: screen-4.8.0-expand-d_xtermosc.patch -Patch7: screen-4.8.0-CVE-2021-26937.patch +Patch1: screen-5.0.0-screenrc.patch +Patch2: screen-5.0.0-suppress_remap.patch %description The screen utility allows you to have multiple logins on just one @@ -117,6 +112,42 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %endif %changelog +* Tue Jan 14 2025 Arkady L. Shane - 5.0.0-1 +- Rebuilt for MSVSphere 10 + +* Thu Aug 29 2024 Josef Ridky - 5.0.0-1 +- New upsream release 5.0.0 (#2308450) + +* Sat Jul 20 2024 Fedora Release Engineering - 4.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Feb 27 2024 Josef Ridky - 4.9.1-1 +- New upstream release 4.9.1 (#2232623) + +* Sat Jan 27 2024 Fedora Release Engineering - 4.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 4.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jul 19 2023 Josef Ridky - 4.9.0-5 +- Migrate to SPDX license format + +* Wed Mar 08 2023 Arjun Shankar - 4.9.0-4 +- Port configure script to C99 + +* Sat Jan 21 2023 Fedora Release Engineering - 4.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 4.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Mar 08 2022 Josef Ridky - 4.9.0-1 +- New upstream release 4.9.0 (#2049170) + +* Sat Jan 22 2022 Fedora Release Engineering - 4.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 4.8.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/screen-4.3.1-crypt.patch b/screen-4.3.1-crypt.patch deleted file mode 100644 index ed05049..0000000 --- a/screen-4.3.1-crypt.patch +++ /dev/null @@ -1,15 +0,0 @@ -check crypt output (rhbz#815605) - -diff --git a/misc.c b/misc.c -index 2022a06..235c82f 100644 ---- a/misc.c -+++ b/misc.c -@@ -57,6 +57,8 @@ register const char *str; - { - register char *cp; - -+ if(str == NULL) -+ Panic(0, "SaveStr() received NULL - possibly failed crypt()"); - if ((cp = malloc(strlen(str) + 1)) == NULL) - Panic(0, "%s", strnomem); - else diff --git a/screen-4.3.1-libs.patch b/screen-4.3.1-libs.patch deleted file mode 100644 index 47a4ac6..0000000 --- a/screen-4.3.1-libs.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index c0f02df..b76c8f5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -188,7 +188,8 @@ AC_EGREP_CPP(yes, - ], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1) - if test -n "$svr4" ; then - oldlibs="$LIBS" --LIBS="$LIBS -lelf" -+# Humm we don't actually need to link against libelf for Linux -+LIBS="$LIBS" - AC_CHECKING(SVR4) - AC_TRY_LINK([#include - ],, -@@ -626,14 +627,10 @@ dnl - AC_CHECKING(for tgetent) - AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, - olibs="$LIBS" --LIBS="-lcurses $olibs" --AC_CHECKING(libcurses) -+LIBS="-ltinfo $olibs" -+AC_CHECKING(libtinfo) - AC_TRY_LINK(,[ --#ifdef __hpux --__sorry_hpux_libcurses_is_totally_broken_in_10_10(); --#else - tgetent((char *)0, (char *)0); --#endif - ],, - LIBS="-ltermcap $olibs" - AC_CHECKING(libtermcap) -@@ -658,7 +655,7 @@ AC_MSG_ERROR(!!! no tgetent - no screen))))))))) - AC_TRY_RUN([ - main() - { -- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); -+ return 1; - }], AC_NOTE(- you use the termcap database), - AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO), - AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO)) -@@ -864,11 +861,6 @@ fi - dnl - dnl **** loadav **** - dnl --if test "$cross_compiling" = no ; then --AC_CHECKING(for libutil(s)) --test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" --test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" --fi - - AC_CHECKING(getloadavg) - AC_TRY_LINK(,[getloadavg((double *)0, 0);], diff --git a/screen-4.3.1-suppress_remap.patch b/screen-4.3.1-suppress_remap.patch deleted file mode 100644 index a827199..0000000 --- a/screen-4.3.1-suppress_remap.patch +++ /dev/null @@ -1,18 +0,0 @@ -Author: Loic Minier -Description: Unbreak several useful keybindings. - -fix for nonworking ^a backspace (rhbz#708698) - -diff --git a/termcap.c b/termcap.c -index 26cba62..ed9e838 100644 ---- a/termcap.c -+++ b/termcap.c -@@ -553,8 +553,6 @@ int map; - else - break; - } -- if (n < KMAP_KEYS) -- domap = 1; - if (map == 0 && domap) - return 0; - if (map && !domap) diff --git a/screen-4.8.0-CVE-2021-26937.patch b/screen-4.8.0-CVE-2021-26937.patch deleted file mode 100644 index 1e84938..0000000 --- a/screen-4.8.0-CVE-2021-26937.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -urNp a/ansi.c b/ansi.c ---- a/ansi.c 2021-02-18 07:56:55.954674224 +0100 -+++ b/ansi.c 2021-02-18 08:04:25.005929307 +0100 -@@ -692,10 +692,6 @@ register int len; - } - curr->w_rend.font = 0; - } --# ifdef DW_CHARS -- if (curr->w_encoding == UTF8 && utf8_isdouble(c)) -- curr->w_mbcs = 0xff; --# endif - if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) - { - int ox, oy; -@@ -730,6 +726,10 @@ register int len; - } - break; - } -+# ifdef DW_CHARS -+ if (curr->w_encoding == UTF8 && utf8_isdouble(c)) -+ curr->w_mbcs = 0xff; -+# endif - font = curr->w_rend.font; - # endif - # ifdef DW_CHARS -diff -urNp a/encoding.c b/encoding.c ---- a/encoding.c 2021-02-18 07:56:55.949674177 +0100 -+++ b/encoding.c 2021-02-18 08:02:21.187750152 +0100 -@@ -43,7 +43,7 @@ static int encmatch __P((char *, char * - # ifdef UTF8 - static int recode_char __P((int, int, int)); - static int recode_char_to_encoding __P((int, int)); --static void comb_tofront __P((int, int)); -+static void comb_tofront __P((int)); - # ifdef DW_CHARS - static int recode_char_dw __P((int, int *, int, int)); - static int recode_char_dw_to_encoding __P((int, int *, int)); -@@ -1263,6 +1263,8 @@ int c; - {0x30000, 0x3FFFD}, - }; - -+ if (c >= 0xdf00 && c <= 0xdfff) -+ return 1; /* dw combining sequence */ - return ((bisearch(c, wide, sizeof(wide) / sizeof(struct interval) - 1)) || - (cjkwidth && - bisearch(c, ambiguous, -@@ -1330,11 +1332,12 @@ int c; - } - - static void --comb_tofront(root, i) --int root, i; -+comb_tofront(i) -+int i; - { - for (;;) - { -+ int root = i >= 0x700 ? 0x801 : 0x800; - debug1("bring to front: %x\n", i); - combchars[combchars[i]->prev]->next = combchars[i]->next; - combchars[combchars[i]->next]->prev = combchars[i]->prev; -@@ -1396,9 +1399,9 @@ struct mchar *mc; - { - /* full, recycle old entry */ - if (c1 >= 0xd800 && c1 < 0xe000) -- comb_tofront(root, c1 - 0xd800); -+ comb_tofront(c1 - 0xd800); - i = combchars[root]->prev; -- if (c1 == i + 0xd800) -+ if (i == 0x800 || i == 0x801 || c1 == i + 0xd800) - { - /* completely full, can't recycle */ - debug("utf8_handle_comp: completely full!\n"); -@@ -1422,7 +1425,7 @@ struct mchar *mc; - mc->font = (i >> 8) + 0xd8; - mc->fontx = 0; - debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800); -- comb_tofront(root, i); -+ comb_tofront(i); - } - - #else /* !UTF8 */ diff --git a/screen-4.8.0-expand-d_xtermosc.patch b/screen-4.8.0-expand-d_xtermosc.patch deleted file mode 100644 index bb64a2a..0000000 --- a/screen-4.8.0-expand-d_xtermosc.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a96e68a70e362597c2ab49d3f9a60f4586a1ae5b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=A1clav=20Dole=C5=BEal?= -Date: Fri, 21 Feb 2020 13:49:08 +0100 -Subject: [PATCH] Expand d_xtermosc array in struct display -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit c5db181 expands index range of "typ2" by one without expanding -affected arrays. d_xtermosc in struct display is one of these. - -Related: c5db181b6e017cfccb8d7842ce140e59294d9f62 - (ansi: add support for xterm OSC 11) -Related: 68386dfb1fa33471372a8cd2e74686758a2f527b - (Fix out of bounds access when setting w_xtermosc after OSC 49) - -Signed-off-by: Václav Doležal ---- - display.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/display.h b/display.h -index 459cc5d..4fc2061 100644 ---- a/display.h -+++ b/display.h -@@ -112,7 +112,7 @@ struct display - int d_mousetrack; /* set when user wants to use mouse even when the window - does not */ - #ifdef RXVT_OSC -- int d_xtermosc[4]; /* osc used */ -+ int d_xtermosc[5]; /* osc used */ - #endif - struct mchar d_lpchar; /* missing char */ - struct timeval d_status_time; /* time of status display */ --- -2.20.1 - diff --git a/screen-E3.patch b/screen-E3.patch deleted file mode 100644 index c8e0ecd..0000000 --- a/screen-E3.patch +++ /dev/null @@ -1,58 +0,0 @@ -Clear scrollback buffer when locking terminal - -Linux kernel 3.0 adds a new command to clear the scrollback buffer in -the linux console. It's available in the ncurses terminfo entry as -extended capability E3. This is useful to prevent an attacker to read -content of a locked terminal via Shift-PgUp key. - -diff --git a/display.c b/display.c -index d0ed6a4..7b534c0 100644 ---- a/display.c -+++ b/display.c -@@ -4079,4 +4079,10 @@ char **cmdv; - - #endif /* BLANKER_PRG */ - -+void -+ClearScrollbackBuffer() -+{ -+ if (D_CE3) -+ AddCStr(D_CE3); -+} - -diff --git a/extern.h b/extern.h -index d4e57df..4564581 100644 ---- a/extern.h -+++ b/extern.h -@@ -320,6 +320,7 @@ extern int color256to88 __P((int)); - extern void ResetIdle __P((void)); - extern void KillBlanker __P((void)); - extern void DisplaySleep1000 __P((int, int)); -+extern void ClearScrollbackBuffer __P((void)); - - /* resize.c */ - extern int ChangeWindowSize __P((struct win *, int, int, int)); -diff --git a/screen.c b/screen.c -index 7dcb9af..c934d75 100644 ---- a/screen.c -+++ b/screen.c -@@ -1952,6 +1952,7 @@ void Detach(int mode) - - case D_LOCK: - ClearAll(); -+ ClearScrollbackBuffer(); - sign = SIG_LOCK; - /* tell attacher to lock terminal with a lockprg. */ - break; -diff --git a/term.c b/term.c -index c7a13c9..f49b3a7 100644 ---- a/term.c -+++ b/term.c -@@ -83,6 +83,7 @@ struct term term[T_N] = - { "CD", T_STR }, - { "ce", T_STR }, - { "cb", T_STR }, -+ { "E3", T_STR }, - - /* initialise */ - { "is", T_STR }, diff --git a/sources b/sources deleted file mode 100644 index da3863f..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (screen-4.8.0.tar.gz) = 770ebaf6ee9be711bcb8a6104b3294f2bf4523dae6683fdc5eac4b3aff7e511be2d922b6b2ad28ec241113c2e4fe0d80f9a482ae1658adc19c8c3a3680caa25c