[arch-commits] Commit in time/trunk (3 files)
Dave Reisner
dreisner at archlinux.org
Thu Nov 9 17:05:47 UTC 2017
Date: Thursday, November 9, 2017 @ 17:05:45
Author: dreisner
Revision: 309317
upgpkg: time 1.8-1
- upstream build procedure for 1.8, needing gnulib
- drop fedora patches (anyone interested in these should talk to upstream)
Modified:
time/trunk/PKGBUILD
Deleted:
time/trunk/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
time/trunk/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
---------------------------------------------------------+
PKGBUILD | 26 +----
time-1.7-Recompute-CPU-usage-at-microsecond-level.patch | 72 --------------
time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch | 32 ------
3 files changed, 9 insertions(+), 121 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-11-09 16:13:29 UTC (rev 309316)
+++ PKGBUILD 2017-11-09 17:05:45 UTC (rev 309317)
@@ -5,7 +5,7 @@
# Contributor: damir <damir at archlinux.org>
pkgname=time
-pkgver=1.7.2
+pkgver=1.8
pkgrel=1
pkgdesc="Utility for monitoring a program's use of system resources"
arch=('i686' 'x86_64')
@@ -12,27 +12,19 @@
url="https://directory.fsf.org/wiki/Time"
license=('GPL')
depends=('glibc')
-source=(http://git.savannah.gnu.org/cgit/time.git/snapshot/time-$pkgver.tar.gz
- time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
- time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch)
-sha1sums=('d1c00075edf3d9ab422b5e8119cf7c865d1e91e6'
- 'fff80e05dd41f0a59bb1f49d1c6e581d5e8e92e5'
- 'b2a909e1d92f7af1bc99a4524ad84d467ed79a06')
+makedepends=('git')
+source=(
+ http://git.savannah.gnu.org/cgit/time.git/snapshot/time-$pkgver.tar.gz
+ git://git.savannah.gnu.org/gnulib.git#commit=7df04f9b8a0adb1575ca0555775ec10860143cbf)
+sha1sums=('5d09ac1b69ae5c7346be1bbcad67b6ac40a5cd25'
+ 'SKIP')
prepare() {
cd "$pkgname-$pkgver"
- # cf https://bugzilla.redhat.com/show_bug.cgi?id=527276
- patch -Np1 < "$srcdir"/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
+ ./bootstrap --no-git --gnulib-srcdir="$srcdir/gnulib"
+}
- # cf https://bugzilla.redhat.com/show_bug.cgi?id=702826
- patch -Np1 < "$srcdir"/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
-
- # rebuild the ancient autoconf setup to fix a variety of build issues
- # surrounding missing/incorrect includes.
- autoreconf -fisv
-}
-
build() {
cd "$pkgname-$pkgver"
Deleted: time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
===================================================================
--- time-1.7-Recompute-CPU-usage-at-microsecond-level.patch 2017-11-09 16:13:29 UTC (rev 309316)
+++ time-1.7-Recompute-CPU-usage-at-microsecond-level.patch 2017-11-09 17:05:45 UTC (rev 309317)
@@ -1,72 +0,0 @@
-From 0d743a7d946fe176a07baf2586a6af0e867fd89c Mon Sep 17 00:00:00 2001
-From: H.J. Lu <hongjiu.lu at intel.com>
-Date: Wed, 11 May 2011 16:19:55 +0200
-Subject: [PATCH] Recompute CPU usage at microsecond level
-
-If job finishes quickly, miliseconds arithmetic rounds to zero. If
-that happens, recalculate CPU usage ratio with microsecond accuracy
-to raise chance to get non-zero values.
----
- resuse.h | 2 ++
- time.c | 15 +++++++++++++++
- 2 files changed, 17 insertions(+), 0 deletions(-)
-
-diff --git a/resuse.h b/resuse.h
-index 992143f..7a3ee66 100644
---- a/resuse.h
-+++ b/resuse.h
-@@ -33,9 +33,11 @@ struct timeval
- #if HAVE_SYS_RUSAGE_H
- /* This rusage structure measures nanoseconds instead of microseconds. */
- # define TV_MSEC tv_nsec / 1000000
-+# define TV_USEC tv_nsec / 1000
- # include <sys/rusage.h>
- #else
- # define TV_MSEC tv_usec / 1000
-+# define TV_USEC tv_usec
- # if HAVE_WAIT3
- # include <sys/resource.h>
- # else
-diff --git a/time.c b/time.c
-index 43aec0b..96cfdde 100644
---- a/time.c
-+++ b/time.c
-@@ -326,6 +326,8 @@ summarize (fp, fmt, command, resp)
- {
- unsigned long r; /* Elapsed real milliseconds. */
- unsigned long v; /* Elapsed virtual (CPU) milliseconds. */
-+ unsigned long ru; /* Elapsed real microseconds. */
-+ unsigned long vu; /* Elapsed virtual (CPU) microseconds. */
-
- if (verbose)
- {
-@@ -350,6 +352,17 @@ summarize (fp, fmt, command, resp)
- v = resp->ru.ru_utime.tv_sec * 1000 + resp->ru.ru_utime.TV_MSEC +
- resp->ru.ru_stime.tv_sec * 1000 + resp->ru.ru_stime.TV_MSEC;
-
-+ if (r == 0 && v == 0)
-+ {
-+ ru = resp->elapsed.tv_usec;
-+ vu = resp->ru.ru_utime.TV_USEC + resp->ru.ru_stime.TV_USEC;
-+ }
-+ else
-+ {
-+ ru = 0;
-+ vu = 0;
-+ }
-+
- while (*fmt)
- {
- switch (*fmt)
-@@ -408,6 +421,8 @@ summarize (fp, fmt, command, resp)
- /* % cpu is (total cpu time)/(elapsed time). */
- if (r > 0)
- fprintf (fp, "%lu%%", (v * 100 / r));
-+ else if (ru > 0)
-+ fprintf (fp, "%lu%%", (vu * 100 / ru));
- else
- fprintf (fp, "?%%");
- break;
---
-1.7.4.4
-
Deleted: time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
===================================================================
--- time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch 2017-11-09 16:13:29 UTC (rev 309316)
+++ time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch 2017-11-09 17:05:45 UTC (rev 309317)
@@ -1,32 +0,0 @@
-From ad24a929bdcc15abae14a64ea21b821bcd8cb030 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
-Date: Wed, 11 May 2011 15:19:11 +0200
-Subject: [PATCH] ru_maxrss is in kilobytes on Linux
-
-Since 2.6.32 Linux returns ru_maxrss in kilobytes. Not in pages.
-
-See http://lists.gnu.org/archive/html/bug-gnu-utils/2008-12/msg00047.html
-for discussion.
----
- time.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/time.c b/time.c
-index d15fee4..43aec0b 100644
---- a/time.c
-+++ b/time.c
-@@ -395,7 +395,11 @@ summarize (fp, fmt, command, resp)
- ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
- break;
- case 'M': /* Maximum resident set size. */
-+#ifdef __linux__
-+ fprintf (fp, "%ld", resp->ru.ru_maxrss);
-+#else
- fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
-+#endif
- break;
- case 'O': /* Outputs. */
- fprintf (fp, "%ld", resp->ru.ru_oublock);
---
-1.7.4.4
-
More information about the arch-commits
mailing list