[packages/time] Rel 3
arekm
arekm at pld-linux.org
Mon Mar 9 17:34:03 CET 2026
commit 4ddef348e5382f49098f79023dd3f1792cc77f21
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 9 17:33:51 2026 +0100
Rel 3
time-1.9-Close-outfp-before-exec.patch | 33 +++++++++++
time-1.9-Fix-compiling-with-GCC15.patch | 31 ++++++++++
...g-a-trailing-backslash-and-a-percent-sign.patch | 68 ++++++++++++++++++++++
time.spec | 11 +++-
4 files changed, 142 insertions(+), 1 deletion(-)
---
diff --git a/time.spec b/time.spec
index cc73e14..f840208 100644
--- a/time.spec
+++ b/time.spec
@@ -5,13 +5,19 @@ Summary(pl.UTF-8): Narzędzie GNU do pomiaru czasu
Summary(tr.UTF-8): GNU zamanlama aracı
Name: time
Version: 1.9
-Release: 2
+Release: 3
License: GPL v3+
Group: Applications/System
Source0: http://ftp.gnu.org/gnu/time/%{name}-%{version}.tar.gz
# Source0-md5: d2356e0fe1c0b85285d83c6b2ad51b5f
Patch0: %{name}-info.patch
Patch1: %{name}-man.patch
+# https://src.fedoraproject.org/rpms/time/raw/rawhide/f/time-1.9-Close-outfp-before-exec.patch
+Patch2: %{name}-1.9-Close-outfp-before-exec.patch
+# https://src.fedoraproject.org/rpms/time/raw/rawhide/f/time-1.9-Fix-formatting-a-trailing-backslash-and-a-percent-si.patch
+Patch3: %{name}-1.9-Fix-formatting-a-trailing-backslash-and-a-percent-sign.patch
+# https://src.fedoraproject.org/rpms/time/raw/rawhide/f/time-1.9-Fix-compiling-with-GCC15.patch
+Patch4: %{name}-1.9-Fix-compiling-with-GCC15.patch
URL: http://www.gnu.org/software/time/
BuildRequires: autoconf >= 2.69
BuildRequires: automake >= 1:1.11.1
@@ -48,6 +54,9 @@ yararlı olur.
%setup -q
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
%build
%{__aclocal} -I m4
diff --git a/time-1.9-Close-outfp-before-exec.patch b/time-1.9-Close-outfp-before-exec.patch
new file mode 100644
index 0000000..7a98c81
--- /dev/null
+++ b/time-1.9-Close-outfp-before-exec.patch
@@ -0,0 +1,33 @@
+From 6a5c4499aab677d19157c7adcf598d14267283c1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Mon, 16 Nov 2020 17:45:04 +0100
+Subject: [PATCH] Close outfp before exec
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When called with --outfile, we open an output file to which
+we log timing results. Close that descriptor in the child
+fork before exec'ing the process to be timed.
+
+Reported-by: Ed Santiago <santiago at redhat.com>
+Signed-off-by: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+---
+ src/time.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/time.c b/src/time.c
+index f76265a..2f2b702 100644
+--- a/src/time.c
++++ b/src/time.c
+@@ -738,6 +738,8 @@ run_command (cmd, resp)
+ error (EXIT_CANCELED, errno, "cannot fork");
+ else if (pid == 0)
+ { /* If child. */
++ if (outfp != stderr)
++ fclose(outfp);
+ /* Don't cast execvp arguments; that causes errors on some systems,
+ versus merely warnings if the cast is left off. */
+ execvp (cmd[0], cmd);
+--
+2.25.4
diff --git a/time-1.9-Fix-compiling-with-GCC15.patch b/time-1.9-Fix-compiling-with-GCC15.patch
new file mode 100644
index 0000000..9cff44e
--- /dev/null
+++ b/time-1.9-Fix-compiling-with-GCC15.patch
@@ -0,0 +1,31 @@
+From 831194f0be7733c99c7a2c69d9e9695b82e05010 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <opohorel at redhat.com>
+Date: Thu, 30 Jan 2025 08:48:47 +0100
+Subject: [PATCH] time: fix compiling with GCC15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC15 complains about incompatible pointer type in run_command()
+Initialize interrupt_signal and quit_signal with correct type
+
+Signed-off-by: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <opohorel at redhat.com>
+---
+ src/time.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/time.c b/src/time.c
+index 7b401bc..c8d7ab0 100644
+--- a/src/time.c
++++ b/src/time.c
+@@ -803,7 +803,7 @@ run_command (cmd, resp)
+ RESUSE *resp;
+ {
+ pid_t pid; /* Pid of child. */
+- sighandler interrupt_signal, quit_signal;
++ __sighandler_t interrupt_signal, quit_signal;
+ int saved_errno;
+
+ resuse_start (resp);
+--
+2.48.1
diff --git a/time-1.9-Fix-formatting-a-trailing-backslash-and-a-percent-sign.patch b/time-1.9-Fix-formatting-a-trailing-backslash-and-a-percent-sign.patch
new file mode 100644
index 0000000..c61de51
--- /dev/null
+++ b/time-1.9-Fix-formatting-a-trailing-backslash-and-a-percent-sign.patch
@@ -0,0 +1,68 @@
+From f88ec3114dfdb5f284367d7602a06dc021409616 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 26 Jan 2024 10:36:07 +0100
+Subject: [PATCH] Fix formatting a trailing backslash and a percent sign
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There was a bug report that a trailing backslash leads to printing
+a nul byte and an commandline:
+
+$ /usr/bin/time -f 'abc\' sleep 1 2>&1 | hexdump -vC
+00000000 61 62 63 3f 5c 00 73 6c 65 65 70 0a |abc?\.sleep.|
+0000000c
+
+This patch fixes it.
+
+A similar fix was already in place for a trailing percent sign, but it
+was missing printing an implicit newline as mandated by
+the documentation. This patch fixes it either.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ src/time.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/time.c b/src/time.c
+index 2f2b702..2184e4e 100644
+--- a/src/time.c
++++ b/src/time.c
+@@ -585,12 +585,13 @@ summarize (fp, fmt, command, resp)
+ break;
+ case '\0':
+ putc ('?', fp);
+- return;
++ break;
+ default:
+ putc ('?', fp);
+ putc (*fmt, fp);
+ }
+- ++fmt;
++ if (*fmt != '\0')
++ ++fmt;
+ break;
+
+ case '\\': /* Format escape. */
+@@ -605,12 +606,17 @@ summarize (fp, fmt, command, resp)
+ case '\\':
+ putc ('\\', fp);
+ break;
++ case '\0':
++ putc ('?', fp);
++ putc ('\\', fp);
++ break;
+ default:
+ putc ('?', fp);
+ putc ('\\', fp);
+ putc (*fmt, fp);
+ }
+- ++fmt;
++ if (*fmt != '\0')
++ ++fmt;
+ break;
+
+ default:
+--
+2.43.0
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/time.git/commitdiff/4ddef348e5382f49098f79023dd3f1792cc77f21
More information about the pld-cvs-commit
mailing list