From 30a6c6710e7f8a1f88f57fd262559603855885e4 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 27 Nov 2024 07:37:42 +0000 Subject: [PATCH] import RHEL 10 Beta tmux-3.3a-10.20230918gitb202a2f.el10 --- .gitignore | 2 +- ...nes-counter-when-skipping-a-line-to-.patch | 39 ----- gating.yaml | 6 - mitigate-character-length-crash.patch | 13 ++ sources | 2 +- tests/scripts/correct-elf.sh | 19 --- tests/scripts/exists.sh | 16 -- tests/scripts/filename-lowercase.sh | 19 --- tests/scripts/help-output.sh | 21 --- tests/scripts/launch-top.sh | 23 --- tests/tests.yml | 25 ---- tmux.spec | 138 ++++++++++++++++-- 12 files changed, 137 insertions(+), 186 deletions(-) delete mode 100644 0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch delete mode 100644 gating.yaml create mode 100644 mitigate-character-length-crash.patch delete mode 100755 tests/scripts/correct-elf.sh delete mode 100755 tests/scripts/exists.sh delete mode 100755 tests/scripts/filename-lowercase.sh delete mode 100755 tests/scripts/help-output.sh delete mode 100755 tests/scripts/launch-top.sh delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index c6e2a8b..b4e7699 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/tmux-2.7.tar.gz +tmux-b202a2f1b517a3de7141fc35fbd9e39ed5ac5284.tar.gz diff --git a/0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch b/0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch deleted file mode 100644 index 12fede0..0000000 --- a/0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 66a2bbfc0252bc61b214749e3b56f2cfacc652a7 Mon Sep 17 00:00:00 2001 -From: Nicholas Marriott -Date: Tue, 4 Apr 2023 13:24:56 -0400 -Subject: [PATCH] Increment the lines counter when skipping a line to avoid an - infinite - -loop, and fix a check to avoid a potential out-of-bounds access. Problem -reported by Yuxiang Qin and tracked down by Karl Beldan; GitHub issue -1352. - -Backport ba31d3a to 2.7 ---- - grid.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/grid.c b/grid.c -index e4ba7df4..4db4c693 100644 ---- a/grid.c -+++ b/grid.c -@@ -1010,7 +1010,7 @@ grid_reflow_join(struct grid *target, struct grid *gd, u_int sx, u_int yy, - * If this is now the last line, there is nothing more to be - * done. - */ -- if (yy + lines == gd->hsize + gd->sy) -+ if (yy + 1 + lines == gd->hsize + gd->sy) - break; - line = yy + 1 + lines; - -@@ -1020,6 +1020,7 @@ grid_reflow_join(struct grid *target, struct grid *gd, u_int sx, u_int yy, - if (gd->linedata[line].cellused == 0) { - if (!wrapped) - break; -+ lines++; - continue; - } - --- -2.31.1 - diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 6985029..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/mitigate-character-length-crash.patch b/mitigate-character-length-crash.patch new file mode 100644 index 0000000..c720037 --- /dev/null +++ b/mitigate-character-length-crash.patch @@ -0,0 +1,13 @@ +--- screen-write.c.orig 2023-12-12 21:17:02.960288969 +0100 ++++ screen-write.c 2023-12-12 21:18:07.498869550 +0100 +@@ -2120,6 +2120,10 @@ + return (0); + } + ++ /* Check if this combined character would be too long. */ ++ if (last.data.size + ud->size > sizeof last.data.data) ++ return (0); ++ + /* Combining; flush any pending output. */ + screen_write_collect_flush(ctx, 0, __func__); + diff --git a/sources b/sources index de40509..d7b7eb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tmux-2.7.tar.gz) = 7839ef748ea55df8c02c727047f65bd235b5e3b8ab23157246071e1b9954fa269594da9fbd0fabf6a850e3b5dfda962a0a067c1507411c92a84d1db2666ecf37 +SHA512 (tmux-b202a2f1b517a3de7141fc35fbd9e39ed5ac5284.tar.gz) = c198961cf5d5520810b235e7db5f4d7345d070e7003609c7efd4c104066b18eb783e91a9788dca69b0266b6998acf89f83f6eb46b9f333e56d688b099a9f9922 diff --git a/tests/scripts/correct-elf.sh b/tests/scripts/correct-elf.sh deleted file mode 100755 index acaef74..0000000 --- a/tests/scripts/correct-elf.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMUX=/usr/bin/tmux - -echo -n "checking to see that ${TMUX} is an ELF executable..." - -case "$(file -b --mime-type "${TMUX}")" in - application/x-executable|application/x-pie-executable|application/x-sharedlib) - echo "ok" - RET=0 - ;; - *) - echo "FAIL" - RET=1 - ;; -esac - -exit ${RET} diff --git a/tests/scripts/exists.sh b/tests/scripts/exists.sh deleted file mode 100755 index c0ef34f..0000000 --- a/tests/scripts/exists.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMUX=/usr/bin/tmux - -echo -n "checking to see that ${TMUX} exists..." - -if [ -f "${TMUX}" ]; then - echo "ok" - RET=0 -else - echo "FAIL" - RET=1 -fi - -exit ${RET} diff --git a/tests/scripts/filename-lowercase.sh b/tests/scripts/filename-lowercase.sh deleted file mode 100755 index 24f9c52..0000000 --- a/tests/scripts/filename-lowercase.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMUX=/usr/bin/tmux - -echo -n "verifying ${TMUX}'s filename contains all lowercase letters..." - -BASETMUX="$(basename $(stat -L -c "%n" ${TMUX}))" -LOWERTMUX="$(echo "${BASETMUX}" | tr [A-Z] [a-z])" - -if [ "${BASETMUX}" = "${LOWERTMUX}" ]; then - echo "ok" - RET=0 -else - echo "FAIL" - RET=1 -fi - -exit ${RET} diff --git a/tests/scripts/help-output.sh b/tests/scripts/help-output.sh deleted file mode 100755 index ff865c6..0000000 --- a/tests/scripts/help-output.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMUX=/usr/bin/tmux - -echo -n "checking for ${TMUX} --help output and exit code..." - -STDOUT="$(${TMUX} --help 2>/dev/null)" -STDERR="$(${TMUX} --help 2>&1 | head -n 1 | cut -c-11)" -${TMUX} --help >/dev/null 2>&1 -EXITCODE=$? - -if [ ${EXITCODE} -eq 1 ] && [ -z "${STDOUT}" ] && [ "${STDERR}" = "usage: tmux" ]; then - echo "ok" - RET=0 -else - echo "FAIL" - RET=1 -fi - -exit ${RET} diff --git a/tests/scripts/launch-top.sh b/tests/scripts/launch-top.sh deleted file mode 100755 index c66dbe1..0000000 --- a/tests/scripts/launch-top.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PATH=/usr/bin -TMUX=/usr/bin/tmux -SESSION_NAME="$(basename $0 .sh)" -RET=0 - -echo -n "checking that ${TMUX} can start a new session with 'top'..." - -${TMUX} new-session -d -s ${SESSION_NAME} 'top' || ( echo "FAIL" ; exit 1 ) - -TOPPID=$(pgrep -x top) -PGREPCODE=$? -if [ -z "${TOPPID}" ] || [ ${PGREPCODE} -ne 0 ]; then - RET=1 -elif [ ! -d /proc/${TOPPID} ]; then - RET=1 -fi - -${TMUX} kill-session -t ${SESSION_NAME} || ( echo "FAIL" ; exit 1 ) - -[ ${RET} -eq 0 ] && echo "ok" || echo "FAIL" -exit ${RET} diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index ba812f7..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- - -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - tmux - tests: - - exists: - dir: scripts/ - run: ./exists.sh - - correct-elf: - dir: scripts/ - run: ./correct-elf.sh - - filename-lowercase: - dir: scripts/ - run: ./filename-lowercase.sh - - help-output: - dir: scripts/ - run: ./help-output.sh - - launch-top: - dir: scripts/ - run: ./launch-top.sh diff --git a/tmux.spec b/tmux.spec index df114f9..4e15b6f 100644 --- a/tmux.spec +++ b/tmux.spec @@ -1,24 +1,40 @@ %global _hardened_build 1 + Name: tmux -Version: 2.7 -Release: 3%{?dist} +%global forgeurl https://github.com/tmux/%{name} +%global commit b202a2f1b517a3de7141fc35fbd9e39ed5ac5284 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%forgemeta + +Version: 3.3a +# forge meta appends commit info +Release: 10%{?dist} Summary: A terminal multiplexer -Group: Applications/System -# Most of the source is ISC licensed; some of the files in compat/ are 2 and -# 3 clause BSD licensed. -License: ISC and BSD +License: ISC AND BSD-2-Clause AND BSD-3-Clause AND SSH-short AND LicenseRef-Fedora-Public-Domain URL: https://tmux.github.io/ -Source0: https://github.com/tmux/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source0: %{forgesource} # Examples has been removed - so include the bash_completion here Source1: bash_completion_tmux.sh -Patch1: 0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch +# don't crash instead of displaying certain glyphs +# https://bugzilla.redhat.com/show_bug.cgi?id=2253441 +# applied by upstream: https://github.com/tmux/tmux/issues/3729 +Patch0: mitigate-character-length-crash.patch + +BuildRequires: byacc BuildRequires: gcc -BuildRequires: ncurses-devel -BuildRequires: libevent-devel +BuildRequires: systemd-devel BuildRequires: libutempter-devel +BuildRequires: make +BuildRequires: pkgconfig(libevent_core) >= 2 +BuildRequires: pkgconfig(tinfo) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(ncursesw) +%if "%0{?commit}" != "0" +BuildRequires: automake +%endif %description tmux is a "terminal multiplexer." It enables a number of terminals (or @@ -27,10 +43,14 @@ intended to be a simple, modern, BSD-licensed alternative to programs such as GNU Screen. %prep -%autosetup +%forgesetup +%patch 0 -p0 %build -%configure +%if "%0{?commit}" != "0" +sh ./autogen.sh +%endif +%configure --enable-systemd %make_build @@ -59,15 +79,101 @@ if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then fi %files -%doc CHANGES TODO +%license COPYING +%doc CHANGES README* example_tmux.conf %{_bindir}/tmux %{_mandir}/man1/tmux.1.* %{_datadir}/bash-completion/completions/tmux %changelog -* Tue Apr 04 2023 Josh Boyer - 2.7-3 -- Backport fix for intermittent stalling bug - Resolves: rhbz 2024339 +* Wed Jun 26 2024 Josef Ridky - 3.3a-10 +- Add gating.yaml file + +* Mon Jun 24 2024 Troy Dawson - 3.3a-9 +- Bump release for June 2024 mass rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 3.3a-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Dec 12 2023 Sven Lankes - 3.3a-7.20230918gitb202a2f +- Don't crash on showing certain glyph + Resolves: rhbz#2253441 + +* Mon Oct 02 2023 David Cantrell - 3.3a-6.20230918gitb202a2f +- Convert License tag to SPDX expression + +* Mon Sep 18 2023 Ankur Sinha - 3.3a-5.20230918gitb202a2f +- update to snapshot +- https://github.com/tmux/tmux/issues/3699#issuecomment-1723095544 + +* Sat Jul 22 2023 Fedora Release Engineering - 3.3a-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sun Feb 12 2023 Filipe Rosset - 3.3a-3 +- Enable support for systemd socket activation fixes rhbz#2158980 + +* Sat Jan 21 2023 Fedora Release Engineering - 3.3a-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Aug 19 2022 Filipe Rosset - 3.3a-1 +- Update to 3.3a + +* Sat Jul 23 2022 Fedora Release Engineering - 3.2a-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 3.2a-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.2a-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jul 02 2021 Igor Raits - 3.2a-1 +- Update to 3.2a + +* Wed Jan 27 2021 Fedora Release Engineering - 3.1c-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 4 2021 Filipe Rosset - 3.1c-1 +- Update to 3.1c + +* Wed Sep 16 2020 David Cantrell - 3.1-3 +- Rebuild for new libevent + +* Fri Jul 17 2020 Andrew Spiers - 3.1-2 +- Include upstream example config file + Resolves: rhbz#1741836 + +* Wed Apr 29 2020 Filipe Rosset - 3.1-1 +- Update to 3.1 fixes rhbz#1715313 + +* Fri Jan 31 2020 Fedora Release Engineering - 3.0a-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Dec 03 2019 Brian C. Lane - 3.0a-1 +- New upstream release v3.0a + Resolves: rhbz#1715313 + +* Sat Jul 27 2019 Fedora Release Engineering - 2.9a-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun May 12 2019 Filipe Rosset - 2.9a-2 +- update to version 2.9a, fixes rhbz #1692933 +- ChangeLog https://raw.githubusercontent.com/tmux/tmux/2.9/CHANGES +- removed upstreamed patch + +* Sun Feb 03 2019 Fedora Release Engineering - 2.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Nov 22 2018 Filipe Rosset - 2.8-2 +- fixes rhbz #1652128 CVE-2018-19387 +- tmux: NULL Pointer Dereference in format_cb_pane_tabs in format.c + +* Fri Oct 19 2018 Filipe Rosset - 2.8-1 +- update to version 2.8 +- ChangeLog https://raw.githubusercontent.com/tmux/tmux/2.8/CHANGES + +* Sat Jul 14 2018 Fedora Release Engineering - 2.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Apr 19 2018 Filipe Rosset - 2.7-1 - update to version 2.7, fixes rhbz #1486507