Compare commits
No commits in common. "c9" and "c8s" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/tmux-3.2a.tar.gz
|
/tmux-2.7.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
519c08880307ef13c799cb6988b4fd11ec5c2b77 SOURCES/tmux-3.2a.tar.gz
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 66a2bbfc0252bc61b214749e3b56f2cfacc652a7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
|
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
|
||||||
|
|
@ -1,122 +0,0 @@
|
|||||||
From 369627faddc1bba283c6afc4d473d7a495edb9a7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 07:38:21 -0400
|
|
||||||
Subject: [PATCH 01/12] Fix memory leaks Backport of upstream commits:
|
|
||||||
4a753dbefc2e67c218cf41141eaa6afab00f774a
|
|
||||||
3c65475561b25073c3b7dcbb0b6498a0535ecd59
|
|
||||||
a9ac61469175e45c8ba58ae0360306aa06c0cd59
|
|
||||||
72d905f32c53ea1304b4b3206383502a23cfc0fd
|
|
||||||
|
|
||||||
---
|
|
||||||
cmd-display-menu.c | 6 +++++-
|
|
||||||
cmd-source-file.c | 4 +++-
|
|
||||||
format.c | 4 ++--
|
|
||||||
key-bindings.c | 5 ++++-
|
|
||||||
popup.c | 1 +
|
|
||||||
5 files changed, 15 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cmd-display-menu.c b/cmd-display-menu.c
|
|
||||||
index de423e68..d61fedbb 100644
|
|
||||||
--- a/cmd-display-menu.c
|
|
||||||
+++ b/cmd-display-menu.c
|
|
||||||
@@ -248,6 +248,7 @@ cmd_display_menu_get_position(struct client *tc, struct cmdq_item *item,
|
|
||||||
log_debug("%s: -y: %s = %s = %u", __func__, yp, p, *py);
|
|
||||||
free(p);
|
|
||||||
|
|
||||||
+ format_free(ft);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -391,7 +392,10 @@ cmd_display_popup_exec(struct cmd *self, struct cmdq_item *item)
|
|
||||||
else if (args_has(args, 'E'))
|
|
||||||
flags |= POPUP_CLOSEEXIT;
|
|
||||||
if (popup_display(flags, item, px, py, w, h, shellcmd, argc, argv, cwd,
|
|
||||||
- tc, s, NULL, NULL) != 0)
|
|
||||||
+ tc, s, NULL, NULL) != 0) {
|
|
||||||
+ free(cwd);
|
|
||||||
return (CMD_RETURN_NORMAL);
|
|
||||||
+ }
|
|
||||||
+ free(cwd);
|
|
||||||
return (CMD_RETURN_WAIT);
|
|
||||||
}
|
|
||||||
diff --git a/cmd-source-file.c b/cmd-source-file.c
|
|
||||||
index c1eeba58..296c31f9 100644
|
|
||||||
--- a/cmd-source-file.c
|
|
||||||
+++ b/cmd-source-file.c
|
|
||||||
@@ -176,15 +176,17 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item)
|
|
||||||
cmdq_error(item, "%s: %s", path, error);
|
|
||||||
retval = CMD_RETURN_ERROR;
|
|
||||||
}
|
|
||||||
+ globfree(&g);
|
|
||||||
free(pattern);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
- free(expand);
|
|
||||||
free(pattern);
|
|
||||||
|
|
||||||
for (j = 0; j < g.gl_pathc; j++)
|
|
||||||
cmd_source_file_add(cdata, g.gl_pathv[j]);
|
|
||||||
+ globfree(&g);
|
|
||||||
}
|
|
||||||
+ free(expand);
|
|
||||||
|
|
||||||
cdata->after = item;
|
|
||||||
cdata->retval = retval;
|
|
||||||
diff --git a/format.c b/format.c
|
|
||||||
index 512df009..673a6085 100644
|
|
||||||
--- a/format.c
|
|
||||||
+++ b/format.c
|
|
||||||
@@ -3382,12 +3382,12 @@ found:
|
|
||||||
}
|
|
||||||
if (modifiers & FORMAT_QUOTE_SHELL) {
|
|
||||||
saved = found;
|
|
||||||
- found = xstrdup(format_quote_shell(saved));
|
|
||||||
+ found = format_quote_shell(saved);
|
|
||||||
free(saved);
|
|
||||||
}
|
|
||||||
if (modifiers & FORMAT_QUOTE_STYLE) {
|
|
||||||
saved = found;
|
|
||||||
- found = xstrdup(format_quote_style(saved));
|
|
||||||
+ found = format_quote_style(saved);
|
|
||||||
free(saved);
|
|
||||||
}
|
|
||||||
return (found);
|
|
||||||
diff --git a/key-bindings.c b/key-bindings.c
|
|
||||||
index 467c7f93..4df0cddc 100644
|
|
||||||
--- a/key-bindings.c
|
|
||||||
+++ b/key-bindings.c
|
|
||||||
@@ -187,6 +187,7 @@ key_bindings_add(const char *name, key_code key, const char *note, int repeat,
|
|
||||||
{
|
|
||||||
struct key_table *table;
|
|
||||||
struct key_binding *bd;
|
|
||||||
+ char *s;
|
|
||||||
|
|
||||||
table = key_bindings_get_table(name, 1);
|
|
||||||
|
|
||||||
@@ -216,8 +217,10 @@ key_bindings_add(const char *name, key_code key, const char *note, int repeat,
|
|
||||||
bd->flags |= KEY_BINDING_REPEAT;
|
|
||||||
bd->cmdlist = cmdlist;
|
|
||||||
|
|
||||||
+ s = cmd_list_print(bd->cmdlist, 0);
|
|
||||||
log_debug("%s: %#llx %s = %s", __func__, bd->key,
|
|
||||||
- key_string_lookup_key(bd->key, 1), cmd_list_print(bd->cmdlist, 0));
|
|
||||||
+ key_string_lookup_key(bd->key, 1), s);
|
|
||||||
+ free(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
diff --git a/popup.c b/popup.c
|
|
||||||
index 509d182d..a98cc42a 100644
|
|
||||||
--- a/popup.c
|
|
||||||
+++ b/popup.c
|
|
||||||
@@ -142,6 +142,7 @@ popup_draw_cb(struct client *c, __unused struct screen_redraw_ctx *ctx0)
|
|
||||||
tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i,
|
|
||||||
&grid_default_cell, NULL);
|
|
||||||
}
|
|
||||||
+ screen_free(&s);
|
|
||||||
c->overlay_check = popup_check_cb;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From b4ae1931b2170d783f9a946e6f1983e3d0976107 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 11:33:56 -0400
|
|
||||||
Subject: [PATCH 02/12] Close file stream on error
|
|
||||||
|
|
||||||
---
|
|
||||||
file.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/file.c b/file.c
|
|
||||||
index 974c8a37..9368b4f4 100644
|
|
||||||
--- a/file.c
|
|
||||||
+++ b/file.c
|
|
||||||
@@ -391,6 +391,7 @@ file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata)
|
|
||||||
size = fread(buffer, 1, sizeof buffer, f);
|
|
||||||
if (evbuffer_add(cf->buffer, buffer, size) != 0) {
|
|
||||||
cf->error = ENOMEM;
|
|
||||||
+ fclose(f);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (size != sizeof buffer)
|
|
||||||
@@ -398,6 +399,7 @@ file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata)
|
|
||||||
}
|
|
||||||
if (ferror(f)) {
|
|
||||||
cf->error = EIO;
|
|
||||||
+ fclose(f);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
fclose(f);
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 5e83beff72bed8f8e96fbfe63b7a814d34205354 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 11:54:51 -0400
|
|
||||||
Subject: [PATCH 03/12] Fix memory leak with time_format
|
|
||||||
|
|
||||||
---
|
|
||||||
format.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/format.c b/format.c
|
|
||||||
index 673a6085..01204b8a 100644
|
|
||||||
--- a/format.c
|
|
||||||
+++ b/format.c
|
|
||||||
@@ -4416,6 +4416,7 @@ done:
|
|
||||||
free(sub);
|
|
||||||
format_free_modifiers(list, count);
|
|
||||||
free(copy0);
|
|
||||||
+ free(time_format);
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
fail:
|
|
||||||
@@ -4424,6 +4425,7 @@ fail:
|
|
||||||
free(sub);
|
|
||||||
format_free_modifiers(list, count);
|
|
||||||
free(copy0);
|
|
||||||
+ free(time_format);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 777edc3d865ac52837072da904748a6f70d36b8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 12:22:06 -0400
|
|
||||||
Subject: [PATCH 04/12] Fix memory leak with condition on error path
|
|
||||||
|
|
||||||
---
|
|
||||||
format.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/format.c b/format.c
|
|
||||||
index 01204b8a..6f057b5e 100644
|
|
||||||
--- a/format.c
|
|
||||||
+++ b/format.c
|
|
||||||
@@ -4019,7 +4019,7 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen,
|
|
||||||
struct window_pane *wp = ft->wp;
|
|
||||||
const char *errstr, *copy, *cp, *marker = NULL;
|
|
||||||
const char *time_format = NULL;
|
|
||||||
- char *copy0, *condition, *found, *new;
|
|
||||||
+ char *copy0, *condition = NULL, *found, *new;
|
|
||||||
char *value, *left, *right, c;
|
|
||||||
size_t valuelen;
|
|
||||||
int modifiers = 0, limit = 0, width = 0;
|
|
||||||
@@ -4425,6 +4425,7 @@ fail:
|
|
||||||
free(sub);
|
|
||||||
format_free_modifiers(list, count);
|
|
||||||
free(copy0);
|
|
||||||
+ free(condition);
|
|
||||||
free(time_format);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 47d2223dd090b365246709f9c20ce8684259590e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 12:36:06 -0400
|
|
||||||
Subject: [PATCH 05/12] Free s even if there is no expanded format
|
|
||||||
|
|
||||||
---
|
|
||||||
menu.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/menu.c b/menu.c
|
|
||||||
index 48c9ed2f..137c8c8d 100644
|
|
||||||
--- a/menu.c
|
|
||||||
+++ b/menu.c
|
|
||||||
@@ -78,6 +78,7 @@ menu_add_item(struct menu *menu, const struct menu_item *item,
|
|
||||||
s = format_single(qitem, item->name, c, NULL, NULL, NULL);
|
|
||||||
if (*s == '\0') { /* no item if empty after format expanded */
|
|
||||||
menu->count--;
|
|
||||||
+ free(s);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (*s != '-' && item->key != KEYC_UNKNOWN && item->key != KEYC_NONE) {
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 8a6f2d39bf883a05145651e04ae1bdb2fbba8c34 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 12:50:51 -0400
|
|
||||||
Subject: [PATCH 06/12] Fix spm memory leak
|
|
||||||
|
|
||||||
---
|
|
||||||
status.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/status.c b/status.c
|
|
||||||
index f4418500..116b28c0 100644
|
|
||||||
--- a/status.c
|
|
||||||
+++ b/status.c
|
|
||||||
@@ -1628,6 +1628,7 @@ status_prompt_complete_window_menu(struct client *c, struct session *s,
|
|
||||||
}
|
|
||||||
if (size == 0) {
|
|
||||||
menu_free(menu);
|
|
||||||
+ free(spm);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
if (size == 1) {
|
|
||||||
@@ -1638,6 +1639,7 @@ status_prompt_complete_window_menu(struct client *c, struct session *s,
|
|
||||||
} else
|
|
||||||
tmp = list[0];
|
|
||||||
free(list);
|
|
||||||
+ free(spm);
|
|
||||||
return (tmp);
|
|
||||||
}
|
|
||||||
if (height > size)
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 43f00a273beaf63778cb34c925489f0f003ebef7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 13:02:37 -0400
|
|
||||||
Subject: [PATCH 07/12] Don't leak the original value memory
|
|
||||||
|
|
||||||
---
|
|
||||||
window-customize.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/window-customize.c b/window-customize.c
|
|
||||||
index 34a13f73..50cfbdf7 100644
|
|
||||||
--- a/window-customize.c
|
|
||||||
+++ b/window-customize.c
|
|
||||||
@@ -806,6 +806,10 @@ window_customize_draw_option(struct window_customize_modedata *data,
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ free(value);
|
|
||||||
+ value = NULL;
|
|
||||||
+
|
|
||||||
if (wo != NULL && options_owner(o) != wo) {
|
|
||||||
parent = options_get_only(wo, name);
|
|
||||||
if (parent != NULL) {
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From c4860205ea28136a75bfbfb5f70a793770c73c82 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 13:05:09 -0400
|
|
||||||
Subject: [PATCH 08/12] Don't leak expanded
|
|
||||||
|
|
||||||
---
|
|
||||||
window-customize.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/window-customize.c b/window-customize.c
|
|
||||||
index 50cfbdf7..7d3cbb18 100644
|
|
||||||
--- a/window-customize.c
|
|
||||||
+++ b/window-customize.c
|
|
||||||
@@ -658,7 +658,7 @@ window_customize_draw_option(struct window_customize_modedata *data,
|
|
||||||
struct grid_cell gc;
|
|
||||||
const char **choice, *text, *name;
|
|
||||||
const char *space = "", *unit = "";
|
|
||||||
- char *value = NULL, *expanded;
|
|
||||||
+ char *value = NULL, *expanded = NULL;
|
|
||||||
char *default_value = NULL;
|
|
||||||
char choices[256] = "";
|
|
||||||
struct cmd_find_state fs;
|
|
||||||
@@ -745,6 +745,7 @@ window_customize_draw_option(struct window_customize_modedata *data,
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
free(expanded);
|
|
||||||
+ expanded = NULL;
|
|
||||||
}
|
|
||||||
if (oe != NULL && oe->type == OPTIONS_TABLE_CHOICE) {
|
|
||||||
for (choice = oe->choices; *choice != NULL; choice++) {
|
|
||||||
@@ -835,6 +836,7 @@ window_customize_draw_option(struct window_customize_modedata *data,
|
|
||||||
out:
|
|
||||||
free(value);
|
|
||||||
free(default_value);
|
|
||||||
+ free(expanded);
|
|
||||||
format_free(ft);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From aea74c289c6000b86964ad0bb9ac1a05bba2456a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josh Boyer <jwboyer@redhat.com>
|
|
||||||
Date: Fri, 7 Apr 2023 16:29:55 -0400
|
|
||||||
Subject: [PATCH 09/12] Fix buf memory leak
|
|
||||||
|
|
||||||
---
|
|
||||||
cmd-capture-pane.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c
|
|
||||||
index 6f37bc8f..341d1048 100644
|
|
||||||
--- a/cmd-capture-pane.c
|
|
||||||
+++ b/cmd-capture-pane.c
|
|
||||||
@@ -226,8 +226,8 @@ cmd_capture_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|
||||||
}
|
|
||||||
file_print_buffer(c, buf, len);
|
|
||||||
file_print(c, "\n");
|
|
||||||
- free(buf);
|
|
||||||
}
|
|
||||||
+ free(buf);
|
|
||||||
} else {
|
|
||||||
bufname = NULL;
|
|
||||||
if (args_has(args, 'b'))
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (tmux-2.7.tar.gz) = 7839ef748ea55df8c02c727047f65bd235b5e3b8ab23157246071e1b9954fa269594da9fbd0fabf6a850e3b5dfda962a0a067c1507411c92a84d1db2666ecf37
|
19
tests/scripts/correct-elf.sh
Executable file
19
tests/scripts/correct-elf.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/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}
|
16
tests/scripts/exists.sh
Executable file
16
tests/scripts/exists.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/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}
|
19
tests/scripts/filename-lowercase.sh
Executable file
19
tests/scripts/filename-lowercase.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/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}
|
21
tests/scripts/help-output.sh
Executable file
21
tests/scripts/help-output.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/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}
|
23
tests/scripts/launch-top.sh
Executable file
23
tests/scripts/launch-top.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/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}
|
25
tests/tests.yml
Normal file
25
tests/tests.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- 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
|
@ -1,10 +1,11 @@
|
|||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
Name: tmux
|
Name: tmux
|
||||||
Version: 3.2a
|
Version: 2.7
|
||||||
Release: 5%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: A terminal multiplexer
|
Summary: A terminal multiplexer
|
||||||
|
|
||||||
|
Group: Applications/System
|
||||||
# Most of the source is ISC licensed; some of the files in compat/ are 2 and
|
# Most of the source is ISC licensed; some of the files in compat/ are 2 and
|
||||||
# 3 clause BSD licensed.
|
# 3 clause BSD licensed.
|
||||||
License: ISC and BSD
|
License: ISC and BSD
|
||||||
@ -12,25 +13,11 @@ URL: https://tmux.github.io/
|
|||||||
Source0: https://github.com/tmux/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/tmux/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
# Examples has been removed - so include the bash_completion here
|
# Examples has been removed - so include the bash_completion here
|
||||||
Source1: bash_completion_tmux.sh
|
Source1: bash_completion_tmux.sh
|
||||||
Patch1: 0001-Fix-memory-leaks.patch
|
Patch1: 0001-Increment-the-lines-counter-when-skipping-a-line-to-.patch
|
||||||
Patch2: 0002-Close-file-stream-on-error.patch
|
|
||||||
Patch3: 0003-Fix-memory-leak-with-time_format.patch
|
|
||||||
Patch4: 0004-Fix-memory-leak-with-condition-on-error-path.patch
|
|
||||||
Patch5: 0005-Free-s-even-if-there-is-no-expanded-format.patch
|
|
||||||
Patch6: 0006-Fix-spm-memory-leak.patch
|
|
||||||
Patch7: 0007-Don-t-leak-the-original-value-memory.patch
|
|
||||||
Patch8: 0008-Don-t-leak-expanded.patch
|
|
||||||
Patch9: 0009-Fix-buf-memory-leak.patch
|
|
||||||
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: bison
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: automake
|
BuildRequires: libevent-devel
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: pkgconfig(libevent)
|
|
||||||
BuildRequires: pkgconfig(tinfo)
|
|
||||||
BuildRequires: pkgconfig(ncurses)
|
|
||||||
BuildRequires: pkgconfig(ncursesw)
|
|
||||||
BuildRequires: libutempter-devel
|
BuildRequires: libutempter-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -40,12 +27,9 @@ intended to be a simple, modern, BSD-licensed alternative to programs such
|
|||||||
as GNU Screen.
|
as GNU Screen.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%autosetup
|
||||||
%autopatch
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -f -i -v
|
|
||||||
%configure
|
%configure
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
@ -75,84 +59,15 @@ if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc CHANGES
|
%doc CHANGES TODO
|
||||||
%doc example_tmux.conf
|
|
||||||
%{_bindir}/tmux
|
%{_bindir}/tmux
|
||||||
%{_mandir}/man1/tmux.1.*
|
%{_mandir}/man1/tmux.1.*
|
||||||
%{_datadir}/bash-completion/completions/tmux
|
%{_datadir}/bash-completion/completions/tmux
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 10 2023 Josh Boyer <jwboyer@redhat.com> - 3.2a-5
|
* Tue Apr 04 2023 Josh Boyer <jwboyer@redhat.com> - 2.7-3
|
||||||
- Backport a number of memory leak fixes
|
- Backport fix for intermittent stalling bug
|
||||||
Resolves: rhbz#1938885
|
Resolves: rhbz 2024339
|
||||||
|
|
||||||
* Fri Dec 03 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-4
|
|
||||||
- Rebuild
|
|
||||||
Resolves: rhbz#2003007
|
|
||||||
|
|
||||||
* Mon Sep 27 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-3
|
|
||||||
- Rebuild
|
|
||||||
Related: rhbz#1910707
|
|
||||||
|
|
||||||
* Wed Sep 22 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-2
|
|
||||||
- Ensure gating test files are present in the source repo
|
|
||||||
Related: rhbz#1910707
|
|
||||||
|
|
||||||
* Wed Sep 01 2021 David Cantrell <dcantrell@redhat.com> - 3.2a-1
|
|
||||||
- Upgrade to tmux-3.2a (CVE-2020-27347)
|
|
||||||
Resolves: rhbz#1910707
|
|
||||||
|
|
||||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.1c-4
|
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
||||||
Related: rhbz#1991688
|
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1c-3
|
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1c-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jan 4 2021 Filipe Rosset <rosset.filipe@gmail.com> - 3.1c-1
|
|
||||||
- Update to 3.1c
|
|
||||||
|
|
||||||
* Wed Sep 16 2020 David Cantrell <dcantrell@redhat.com> - 3.1-3
|
|
||||||
- Rebuild for new libevent
|
|
||||||
|
|
||||||
* Fri Jul 17 2020 Andrew Spiers <andrew@andrewspiers.net> - 3.1-2
|
|
||||||
- Include upstream example config file
|
|
||||||
Resolves: rhbz#1741836
|
|
||||||
|
|
||||||
* Wed Apr 29 2020 Filipe Rosset <rosset.filipe@gmail.com> - 3.1-1
|
|
||||||
- Update to 3.1 fixes rhbz#1715313
|
|
||||||
|
|
||||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0a-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Dec 03 2019 Brian C. Lane <bcl@redhat.com> - 3.0a-1
|
|
||||||
- New upstream release v3.0a
|
|
||||||
Resolves: rhbz#1715313
|
|
||||||
|
|
||||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9a-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun May 12 2019 Filipe Rosset <rosset.filipe@gmail.com> - 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 <releng@fedoraproject.org> - 2.8-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Nov 22 2018 Filipe Rosset <rosset.filipe@gmail.com> - 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 <rosset.filipe@gmail.com> - 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 <releng@fedoraproject.org> - 2.7-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Apr 19 2018 Filipe Rosset <rosset.filipe@gmail.com> - 2.7-1
|
* Thu Apr 19 2018 Filipe Rosset <rosset.filipe@gmail.com> - 2.7-1
|
||||||
- update to version 2.7, fixes rhbz #1486507
|
- update to version 2.7, fixes rhbz #1486507
|
Loading…
Reference in New Issue
Block a user