commit cpustat for openSUSE:Factory

2020-09-11 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2020-09-12 00:12:07

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new.4249 (New)


Package is "cpustat"

Sat Sep 12 00:12:07 2020 rev:8 rq:833738 version:0.02.12

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2020-03-08 
22:24:23.276086737 +0100
+++ /work/SRC/openSUSE:Factory/.cpustat.new.4249/cpustat.changes
2020-09-12 00:13:02.433244453 +0200
@@ -1,0 +2,8 @@
+Thu Sep 10 18:50:58 UTC 2020 - Martin Hauke 
+
+- Update to version 0.02.12
+  * cpustat: fix truncated output, allow CPU % stats > 100%
+- Update to version 0.02.11
+  * cpustat: zero ws struct to clear static analysis warnings
+
+---

Old:

  cpustat-0.02.10.tar.xz

New:

  cpustat-0.02.12.tar.xz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.QGuLyI/_old  2020-09-12 00:13:04.221246164 +0200
+++ /var/tmp/diff_new_pack.QGuLyI/_new  2020-09-12 00:13:04.225246168 +0200
@@ -18,7 +18,7 @@
 
 
 Name:   cpustat
-Version:0.02.10
+Version:0.02.12
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0-or-later

++ cpustat-0.02.10.tar.xz -> cpustat-0.02.12.tar.xz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.10/Makefile new/cpustat-0.02.12/Makefile
--- old/cpustat-0.02.10/Makefile2020-02-24 00:30:57.0 +0100
+++ new/cpustat-0.02.12/Makefile2020-09-10 14:15:01.0 +0200
@@ -18,7 +18,7 @@
 # Author: Colin Ian King 
 #
 
-VERSION=0.02.10
+VERSION=0.02.12
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.10/cpustat.c 
new/cpustat-0.02.12/cpustat.c
--- old/cpustat-0.02.10/cpustat.c   2020-02-24 00:30:57.0 +0100
+++ new/cpustat-0.02.12/cpustat.c   2020-09-10 14:15:01.0 +0200
@@ -315,6 +315,11 @@
-1,
 };
 
+static inline int intmax(const int a, const int b)
+{
+   return (a > b) ? a : b;
+}
+
 /*
  *  get_pid_max_digits()
  * determine (or guess) maximum digits of pids
@@ -428,23 +433,26 @@
 
 /*
  *  putdouble()
- * put a double in %6.2 with trailing space
+ * put a double in %n.2 with trailing space, where n = width
  */
 static int OPTIMIZE3 HOT putdouble(
char *str,
const double val,
-   const int base)
+   const int base,
+   const int width)
 {
const double v = val + 0.005; /* Round up */
+   int n = width - 3;
+
+   if (n < 1)
+   n = 1;
 
-   (void)putint(str, 3, (int)v, false);
-   str[3] = '.';
-   (void)putint(str + 4, 2, v * (double)base - (double)((int)v * base), 
true);
-   str[2] = (str[2] == ' ') ? '0' : str[2];
-   str[6] = ' ';
-   str[7] = '\0';
+   (void)putint(str, n, (int)v, false);
+   str[n] = '.';
+   (void)putint(str + n + 1, 2, v * (double)base - (double)((int)v * 
base), true);
+   str[width + 1] = '\0';
 
-   return 6;
+   return width;
 }
 
 /*
@@ -515,6 +523,7 @@
if (redo) {
struct winsize ws;
 
+   (void)memset(, 0, sizeof(ws));
if (LIKELY(ioctl(fileno(stdin), TIOCGWINSZ, ) != -1)) {
rows = ws.ws_row;
cols = ws.ws_col;
@@ -724,7 +733,7 @@
}
s /= second_scales[i].scale;
 
-   (void)putdouble(buf, s, second_scales[i].base);
+   (void)putdouble(buf, s, second_scales[i].base, 6);
buf[6] = second_scales[i].ch;
 
return buf;
@@ -1055,25 +1064,33 @@
  *  info_banner_dump()
  * dump banner for per_info stats
  */
-static void info_banner_dump(const double time_now)
+static void info_banner_dump(
+   const double time_now,
+   int umax_w,
+   int smax_w,
+   int usmax_w)
 {
static char str[256];
-   static char *hdrptr;
-   char *ptr;
-
-   if (!hdrptr) {
-   int i;
-
-   hdrptr = str;
-   (void)strncpy(hdrptr, "  %CPU   %USR   %SYS   ", sizeof(str));
-   hdrptr += 23;
-   for (i = 0; i < pid_max_digits - 5; i++, hdrptr++)
-   *hdrptr = ' ';
-   (void)strncpy(hdrptr, "PID S  CPUTime Task",
-   sizeof(str) - (3 + pid_max_digits));
-   hdrptr += 23;
-   }
-   ptr = hdrptr;
+   char *ptr = str;
+   int i;
+   char tmp[256];
+   size_t n, sz = sizeof(str);
+
+   

commit cpustat for openSUSE:Factory

2020-03-08 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2020-03-08 22:24:05

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new.26092 (New)


Package is "cpustat"

Sun Mar  8 22:24:05 2020 rev:7 rq:782679 version:0.02.10

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2019-08-09 
16:55:01.281445154 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new.26092/cpustat.changes   
2020-03-08 22:24:23.276086737 +0100
@@ -1,0 +2,18 @@
+Sun Mar  8 12:57:58 UTC 2020 - Martin Hauke 
+
+- Drop SLE12 compat ifdef
+
+---
+Fri Feb 28 09:54:10 UTC 2020 - Martin Hauke 
+
+- Supplement against bash-completion, not bash
+
+---
+Wed Feb 26 12:20:54 UTC 2020 - Martin Hauke 
+
+- Update to version 0.02.10
+  * Makefile: add bash-completion to make dist rule
+  * Add bash completion script
+- Add subpackage for bash-completion
+
+---

Old:

  cpustat-0.02.09.tar.xz

New:

  cpustat-0.02.10.tar.xz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.WnM39R/_old  2020-03-08 22:24:24.044087211 +0100
+++ /var/tmp/diff_new_pack.WnM39R/_new  2020-03-08 22:24:24.048087213 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cpustat
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2017, Martin Hauke 
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:   cpustat
-Version:0.02.09
+Version:0.02.10
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0-or-later
@@ -35,12 +35,23 @@
 to monitor a system hence it is a light weight alternative to traditional
 process monitoring tools such as top.
 
+%package bash-completion
+Summary:Bash Completion for %{name}
+Group:  System/Benchmark
+Requires:   %{name} = %{version}
+Requires:   bash-completion
+Supplements:(cpustat and bash-completion)
+BuildArch:  noarch
+
+%description bash-completion
+Bash completion script for %{name}.
+
 %prep
 %setup -q
 
 %build
 export CFLAGS="%{optflags}"
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install
@@ -51,4 +62,7 @@
 %{_sbindir}/cpustat
 %{_mandir}/man8/cpustat.8%{?ext_man}
 
+%files bash-completion
+%{_datadir}/bash-completion/completions/%{name}
+
 %changelog

++ cpustat-0.02.09.tar.xz -> cpustat-0.02.10.tar.xz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.09/Makefile new/cpustat-0.02.10/Makefile
--- old/cpustat-0.02.09/Makefile2019-07-30 14:18:48.0 +0200
+++ new/cpustat-0.02.10/Makefile2020-02-24 00:30:57.0 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2019 Canonical
+# Copyright (C) 2011-2020 Canonical
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
 # Author: Colin Ian King 
 #
 
-VERSION=0.02.09
+VERSION=0.02.10
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
@@ -41,6 +41,7 @@
 #
 BINDIR=/usr/sbin
 MANDIR=/usr/share/man/man8
+BASHDIR=/usr/share/bash-completion/completions
 
 cpustat: cpustat.o Makefile
$(CC) $(CPPFLAGS) $(CFLAGS)  $< -lm -lncurses -o $@ $(LDFLAGS)
@@ -54,7 +55,7 @@
rm -rf cpustat-$(VERSION)
mkdir cpustat-$(VERSION)
cp -rp README Makefile cpustat.c cpustat.8 COPYING mascot \
-   .travis.yml snap cpustat-$(VERSION)
+   .travis.yml snap bash-completion cpustat-$(VERSION)
tar -Jcf cpustat-$(VERSION).tar.xz cpustat-$(VERSION)
rm -rf cpustat-$(VERSION)
 
@@ -68,3 +69,5 @@
cp cpustat ${DESTDIR}${BINDIR}
mkdir -p ${DESTDIR}${MANDIR}
cp cpustat.8.gz ${DESTDIR}${MANDIR}
+   mkdir -p ${DESTDIR}${BASHDIR}
+   cp bash-completion/cpustat ${DESTDIR}${BASHDIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.09/bash-completion/cpustat 
new/cpustat-0.02.10/bash-completion/cpustat
--- old/cpustat-0.02.09/bash-completion/cpustat 1970-01-01 01:00:00.0 
+0100
+++ new/cpustat-0.02.10/bash-completion/cpustat 2020-02-24 00:30:57.0 
+0100
@@ -0,0 +1,57 @@
+# cpustat tab completion for bash.
+#
+# Copyright (C) 2020 Canonical
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free 

commit cpustat for openSUSE:Factory

2019-08-09 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2019-08-09 16:54:56

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new.9556 (New)


Package is "cpustat"

Fri Aug  9 16:54:56 2019 rev:6 rq:721969 version:0.02.09

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2019-01-21 
10:58:23.531428182 +0100
+++ /work/SRC/openSUSE:Factory/.cpustat.new.9556/cpustat.changes
2019-08-09 16:55:01.281445154 +0200
@@ -1,0 +2,17 @@
+Tue Jul 30 19:11:01 UTC 2019 - Martin Hauke 
+
+- Update to version 0.02.09
+  * Makefile: bump version
+  * Makefile: remove -g flag
+  * Avoid division by zero if total is zero
+
+---
+Fri Jul 12 18:30:28 UTC 2019 - Martin Hauke 
+
+- Update to version 0.02.08
+  * Makefile: bump version
+  * Fix strncpy string size
+  * Reduce scope of variable i
+  * Update copyright year
+
+---

Old:

  cpustat-0.02.07.tar.xz

New:

  cpustat-0.02.09.tar.xz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.nGbRpY/_old  2019-08-09 16:55:01.737445045 +0200
+++ /var/tmp/diff_new_pack.nGbRpY/_new  2019-08-09 16:55:01.741445044 +0200
@@ -13,12 +13,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:   cpustat
-Version:0.02.07
+Version:0.02.09
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0-or-later

++ cpustat-0.02.07.tar.xz -> cpustat-0.02.09.tar.xz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.07/Makefile new/cpustat-0.02.09/Makefile
--- old/cpustat-0.02.07/Makefile2018-10-24 10:23:23.0 +0200
+++ new/cpustat-0.02.09/Makefile2019-07-30 14:18:48.0 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2018 Canonical
+# Copyright (C) 2011-2019 Canonical
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -18,9 +18,9 @@
 # Author: Colin Ian King 
 #
 
-VERSION=0.02.07
+VERSION=0.02.09
 
-CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 -g
+CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
 #
 # Pedantic flags
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.07/cpustat.c 
new/cpustat-0.02.09/cpustat.c
--- old/cpustat-0.02.07/cpustat.c   2018-10-24 10:23:23.0 +0200
+++ new/cpustat-0.02.09/cpustat.c   2019-07-30 14:18:48.0 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Canonical
+ * Copyright (C) 2011-2019 Canonical
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -1060,9 +1060,10 @@
static char str[256];
static char *hdrptr;
char *ptr;
-   int i;
 
if (!hdrptr) {
+   int i;
+
hdrptr = str;
(void)strncpy(hdrptr, "  %CPU   %USR   %SYS   ", sizeof(str));
hdrptr += 23;
@@ -1078,7 +1079,7 @@
struct tm tm;
 
get_tm(time_now, );
-   (void)strncpy(ptr, "  (", 3);
+   (void)strncpy(ptr, "  (", 4);
ptr += 3;
ptr += putint(ptr, 2, tm.tm_hour, true);
*ptr = ':';
@@ -1379,7 +1380,7 @@
(void)printf("%6.2f - %6.2f  %8u %6.2f\n",
prev, prev + division - 0.001,
bucket[i],
-   100.0 * (double)bucket[i] / (double)total);
+   total ?  100.0 * (double)bucket[i] / (double)total : 
0.0);
}
putc('\n', stdout);
 }




commit cpustat for openSUSE:Factory

2019-01-21 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2019-01-21 10:57:54

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new.28833 (New)


Package is "cpustat"

Mon Jan 21 10:57:54 2019 rev:5 rq:666477 version:0.02.07

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2018-09-05 
13:50:03.406408770 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new.28833/cpustat.changes   
2019-01-21 10:58:23.531428182 +0100
@@ -1,0 +2,8 @@
+Sat Jan 12 12:26:16 UTC 2019 - mar...@gmx.de
+
+- Update to version 0.02.07
+  * Re-arrange fields in structs to pack data more efficiently
+- Update to version 0.02.06
+  * Don't show CPU frequency if it cannot be read
+
+---

Old:

  cpustat-0.02.05.tar.gz

New:

  cpustat-0.02.07.tar.xz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.d4X0wM/_old  2019-01-21 10:58:24.879426424 +0100
+++ /var/tmp/diff_new_pack.d4X0wM/_new  2019-01-21 10:58:24.879426424 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cpustat
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2017, Martin Hauke 
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,15 +18,14 @@
 
 
 Name:   cpustat
-Version:0.02.05
+Version:0.02.07
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0-or-later
 Group:  System/Monitoring
-Url:http://kernel.ubuntu.com/~cking/cpustat/
-Source: 
http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz
+URL:https://kernel.ubuntu.com/~cking/cpustat/
+Source: 
https://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.xz
 BuildRequires:  ncurses-devel
-BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 
 %description
 cpustat periodically reports the current CPU utilization of running tasks and
@@ -47,9 +46,9 @@
 %make_install
 
 %files
-%defattr(-,root,root)
-%doc COPYING README
+%license COPYING
+%doc README
 %{_sbindir}/cpustat
-%{_mandir}/man8/cpustat.8%{ext_man}
+%{_mandir}/man8/cpustat.8%{?ext_man}
 
 %changelog




commit cpustat for openSUSE:Factory

2018-09-05 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2018-09-05 13:49:59

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new (New)


Package is "cpustat"

Wed Sep  5 13:49:59 2018 rev:4 rq:633277 version:0.02.05

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2018-02-06 
16:51:29.661494825 +0100
+++ /work/SRC/openSUSE:Factory/.cpustat.new/cpustat.changes 2018-09-05 
13:50:03.406408770 +0200
@@ -1,0 +2,16 @@
+Wed Sep  5 06:17:28 UTC 2018 - lie...@rz.uni-mannheim.de
+
+- update to version 0.02.05
+  * Fix leading zeros on time data
+  * Fix the time scaling, use base 60 where necessary
+  * Add more constifcations to functions and arrays
+  * Minor code clean ups
+  * constify cpu_freq_scale
+  * voidify function returns
+  * debian/control: set debhelper version >= 11
+  * debian/compat: set to 11
+  * debian/control: remove empty line at end of file
+  * debian/copyright: use secure URI
+  * Makefile: bump version
+
+---

Old:

  cpustat-0.02.04.tar.gz

New:

  cpustat-0.02.05.tar.gz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.62lHEa/_old  2018-09-05 13:50:03.930409649 +0200
+++ /var/tmp/diff_new_pack.62lHEa/_new  2018-09-05 13:50:03.934409656 +0200
@@ -18,10 +18,10 @@
 
 
 Name:   cpustat
-Version:0.02.04
+Version:0.02.05
 Release:0
 Summary:Periodic cpu utilization statistics
-License:GPL-2.0+
+License:GPL-2.0-or-later
 Group:  System/Monitoring
 Url:http://kernel.ubuntu.com/~cking/cpustat/
 Source: 
http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz

++ cpustat-0.02.04.tar.gz -> cpustat-0.02.05.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.04/Makefile new/cpustat-0.02.05/Makefile
--- old/cpustat-0.02.04/Makefile2018-01-31 11:52:34.0 +0100
+++ new/cpustat-0.02.05/Makefile2018-06-14 20:17:06.0 +0200
@@ -18,7 +18,7 @@
 # Author: Colin Ian King 
 #
 
-VERSION=0.02.04
+VERSION=0.02.05
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.04/cpustat.c 
new/cpustat-0.02.05/cpustat.c
--- old/cpustat-0.02.04/cpustat.c   2018-01-31 11:52:34.0 +0100
+++ new/cpustat-0.02.05/cpustat.c   2018-06-14 20:17:06.0 +0200
@@ -187,8 +187,9 @@
 /* scaling factor */
 typedef struct {
const char ch;  /* Scaling suffix */
+   const uint32_t base;/* Base of part following . point */
const uint64_t scale;   /* Amount to scale by */
-} scale_t;
+} time_scale_t;
 
 typedef struct {
uint32_t hash;  /* Hash of /proc/stat field tag */
@@ -206,8 +207,8 @@
void (*df_linebreak)(void);
 } display_funcs_t;
 
-/* CPU frequency scale suffixes */
-static cpu_freq_scale_t cpu_freq_scale[] = {
+/* CPU frequency  scale suffixes */
+static const cpu_freq_scale_t cpu_freq_scale[] = {
{ 1e1,  1e0,  "Hz" },
{ 1e4,  1e3,  "KHz" },
{ 1e7,  1e6,  "MHz" },
@@ -217,14 +218,14 @@
 };
 
 /* seconds scale suffixes, secs, mins, hours, etc */
-static const scale_t second_scales[] = {
-   { 's',  1 },
-   { 'm',  60 },
-   { 'h',  3600 },
-   { 'd',  24 * 3600 },
-   { 'w',  7 * 24 * 3600 },
-   { 'y',  365 * 24 * 3600 },
-   { ' ',  INT64_MAX },
+static const time_scale_t second_scales[] = {
+   { 's',  100, 1 },
+   { 'm',   60, 60 },
+   { 'h',   60, 3600 },
+   { 'd',  100, 24 * 3600 },
+   { 'w',  100, 7 * 24 * 3600 },
+   { 'y',  100, 365 * 24 * 3600 },
+   { ' ',  100,  INT64_MAX },
 };
 
 static const proc_stat_fields_t fields[] = {
@@ -370,7 +371,11 @@
  * put a decimal value v into string str with max
  * length of nbytes
  */
-static int OPTIMIZE3 HOT putint(char *str, int nbytes, int v, bool zeropad)
+static int OPTIMIZE3 HOT putint(
+   char * const str,
+   int nbytes,
+   int v,
+   const bool zeropad)
 {
 register char *ptr = str + nbytes;
int ret = nbytes;
@@ -397,7 +402,7 @@
  * put unsigned decimal value v into str
  *  with no leading spaces.
  */
-static int OPTIMIZE3 HOT putuint(char *str, unsigned int v)
+static int OPTIMIZE3 HOT putuint(char *const str, unsigned int v)
 {
register char *ptr = str;
register char *p1, *p2, *mid;
@@ -425,13 +430,16 @@
  *  putdouble()
  * put a double in %6.2 with 

commit cpustat for openSUSE:Factory

2018-02-06 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2018-02-06 16:51:19

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new (New)


Package is "cpustat"

Tue Feb  6 16:51:19 2018 rev:3 rq:573311 version:0.02.04

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2017-05-18 
20:50:23.937657928 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new/cpustat.changes 2018-02-06 
16:51:29.661494825 +0100
@@ -1,0 +2,9 @@
+Wed Jan 31 19:30:20 UTC 2018 - mar...@gmx.de
+
+- update to version 0.02.04
+  * Makefile: bump version
+  * Manual: update copyright year and manual date
+  * Add variable pid size handling.
+  * Voidify close/fclose calls
+
+---

Old:

  cpustat-0.02.03.tar.gz

New:

  cpustat-0.02.04.tar.gz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.rU8C7j/_old  2018-02-06 16:51:30.173470850 +0100
+++ /var/tmp/diff_new_pack.rU8C7j/_new  2018-02-06 16:51:30.177470663 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cpustat
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2017, Martin Hauke 
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:   cpustat
-Version:0.02.03
+Version:0.02.04
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0+

++ cpustat-0.02.03.tar.gz -> cpustat-0.02.04.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/Makefile new/cpustat-0.02.04/Makefile
--- old/cpustat-0.02.03/Makefile2017-04-15 08:18:13.0 +0200
+++ new/cpustat-0.02.04/Makefile2018-01-31 11:52:34.0 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2017 Canonical
+# Copyright (C) 2011-2018 Canonical
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
 # Author: Colin Ian King 
 #
 
-VERSION=0.02.03
+VERSION=0.02.04
 
 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/cpustat.8 
new/cpustat-0.02.04/cpustat.8
--- old/cpustat-0.02.03/cpustat.8   2017-04-15 08:18:13.0 +0200
+++ new/cpustat-0.02.04/cpustat.8   2018-01-31 11:52:34.0 +0100
@@ -188,7 +188,7 @@
 This manual page was written by Colin King ,
 for the Ubuntu project (but may be used by others).
 .SH COPYRIGHT
-Copyright \(co 2011-2017 Canonical Ltd.
+Copyright \(co 2011-2018 Canonical Ltd.
 .br
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpustat-0.02.03/cpustat.c 
new/cpustat-0.02.04/cpustat.c
--- old/cpustat-0.02.03/cpustat.c   2017-04-15 08:18:13.0 +0200
+++ new/cpustat-0.02.04/cpustat.c   2018-01-31 11:52:34.0 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Canonical
+ * Copyright (C) 2011-2018 Canonical
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -214,7 +214,6 @@
{ 1e10, 1e9,  "GHz" },
{ 1e13, 1e12, "THz" },
{ 1e16, 1e15, "PHz" },
-   { -1.0, -1.0,  NULL }
 };
 
 /* seconds scale suffixes, secs, mins, hours, etc */
@@ -706,7 +705,7 @@
 static char *secs_to_str(const double secs)
 {
static char buf[16];
-   int i;
+   size_t i;
 
for (i = 0; i < 5; i++) {
if (secs <= second_scales[i + 1].scale)
@@ -727,7 +726,7 @@
time_t now = (time_t)time_now;
 
if (UNLIKELY((now == ((time_t) -1 {
-   memset(tm, 0, sizeof(struct tm));
+   memset(tm, 0, sizeof(*tm));
} else {
(void)localtime_r(, tm);
}
@@ -886,7 +885,7 @@
 * a new info struct
 */
if (!info) {
-   info = malloc(sizeof(pid_info_t));
+   info = malloc(sizeof(*info));
new_info = true;
}
 
@@ -978,7 +977,7 @@
 * list since time is assumed to be increasing
 */
if (!found) {
-   if (UNLIKELY((sdl = malloc(sizeof(sample_delta_list_t))) == 

commit cpustat for openSUSE:Factory

2017-05-18 Thread root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2017-05-18 20:50:19

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new (New)


Package is "cpustat"

Thu May 18 20:50:19 2017 rev:2 rq:495696 version:0.02.03

Changes:

--- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes  2016-09-21 
18:46:38.0 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new/cpustat.changes 2017-05-18 
20:50:23.937657928 +0200
@@ -1,0 +2,65 @@
+Wed May 10 14:45:20 UTC 2017 - mar...@gmx.de
+
+- update to version 0.02.03
+  * Makefile: bump version
+  * Manual: update copyright year and manual date
+  * Add variable pid size handling.
+  * Voidify close/fclose calls
+
+- update to version 0.02.02
+  * Makefile: bump version
+  * Remove some redundant pointer increments
+  * Update copyright year
+  * Add libncursesw5-dev to snapcraft yaml
+  * Don't do a resize() in SIGWINCH signal handler
+
+- update to version 0.02.01
+  * Makefile: bump version
+  * Remove df_putc, we don't use it now
+  * Minor cleanup, add more comments
+  * Remove another slow snprintf in cpu_freq_format
+  * Generalise putdouble_point1 to n decimal places, rename putdec to putint
+  * Remove another snprintf from proc_stat_dump
+  * Add command and spacing before Freq Avg text
+  * Remove another use of expensive sprintf
+  * Add putuint helper and remove another overly used snprintf
+  * Fix incorrect closing square bracket around kernel thread
+  * Remove another snprintf and replace with more optimal code
+  * Add some minor optimisations
+  * Optimise printing so we don't use printf which is expensive
+  * Add comments to putdec function
+  * Generalise putdec function to handle any decimal sized string
+  * Use inline popcount to count bits
+  * Ensure in top mode we don't fall off bottom of terminal
+
+- update to version 0.02.00
+  * Makefile: bump version to 0.02.00
+  * Debian control: add libncurses5-dev to Build-Depends
+  * Fix timestamp output
+  * Retry select sleep if we have some pending sleep time
+  * Minor reworking to handle optimal refreshing and size refetching
+  * Default winsize if we can't fetch it, and fetch size on setup
+  * Handle display modes using display_function_t handlers
+  * Add -X top like mode
+  * Ensure large integer constant is ULL
+
+- update to version 0.01.29
+  * Makefile: bump version
+  * Fix variable shadowing on variable duration
+  * Use FLOAT_CMP helper macro to perform slop on float compares
+  * Constify variables in sort compare helper
+  * Makefile: add PEDANTIC build flags
+
+- update to version 0.01.28
+  * Makefile: bump version
+  * Makefile: add mascot and snapcraft directories to make dist rule
+  * cpustat: only add pid info to hash table if it is new (LP: #1631050)
+  * snapcraft: Makefile: fix removal errors of snap files
+  * snapcraft: Makefile: add auto versioning
+  * snapcraft.yaml: add build-packages
+  * Add snapcraft Makefile
+  * Add cpustat pngs
+  * mascot: small resize to ensure it scales perfectly to 128x128
+  * Add cpustat mascot
+
+---

Old:

  cpustat-0.01.27.tar.gz

New:

  cpustat-0.02.03.tar.gz



Other differences:
--
++ cpustat.spec ++
--- /var/tmp/diff_new_pack.kUnQrR/_old  2017-05-18 20:50:24.649557460 +0200
+++ /var/tmp/diff_new_pack.kUnQrR/_new  2017-05-18 20:50:24.653556895 +0200
@@ -1,7 +1,8 @@
 #
 # spec file for package cpustat
 #
-# Copyright (c) 2016, Martin Hauke 
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017, Martin Hauke 
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +18,14 @@
 
 
 Name:   cpustat
-Version:0.01.27
+Version:0.02.03
 Release:0
 Summary:Periodic cpu utilization statistics
 License:GPL-2.0+
 Group:  System/Monitoring
 Url:http://kernel.ubuntu.com/~cking/cpustat/
 Source: 
http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz
+BuildRequires:  ncurses-devel
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -48,6 +50,6 @@
 %defattr(-,root,root)
 %doc COPYING README
 %{_sbindir}/cpustat
-%{_mandir}/man8/*
+%{_mandir}/man8/cpustat.8%{ext_man}
 
 %changelog

++ cpustat-0.01.27.tar.gz -> cpustat-0.02.03.tar.gz ++
 5567 lines of diff (skipped)




commit cpustat for openSUSE:Factory

2016-09-21 Thread h_root
Hello community,

here is the log from the commit of package cpustat for openSUSE:Factory checked 
in at 2016-09-21 18:46:38

Comparing /work/SRC/openSUSE:Factory/cpustat (Old)
 and  /work/SRC/openSUSE:Factory/.cpustat.new (New)


Package is "cpustat"

Changes:

New Changes file:

--- /dev/null   2016-09-15 12:42:18.240042505 +0200
+++ /work/SRC/openSUSE:Factory/.cpustat.new/cpustat.changes 2016-09-21 
18:46:38.0 +0200
@@ -0,0 +1,19 @@
+---
+Sat Jul 30 13:35:39 UTC 2016 - mar...@gmx.de
+
+- update to version 0.01.27
+  * Makefile: bump version
+  * debian/control: update standards version to 3.9.8
+
+- update to version 0.01.26
+  * Makefile: bump version
+  * Update date in manual
+  * debian/control: update standards version to 3.9.7
+  * Fix spelling mistake in manual, onlt -> only
+  * Update copyright year to 2016
+
+---
+Wed Nov 11 21:24:22 UTC 2015 - mar...@gmx.de
+
+- initial package
+

New:

  cpustat-0.01.27.tar.gz
  cpustat.changes
  cpustat.spec



Other differences:
--
++ cpustat.spec ++
#
# spec file for package cpustat
#
# Copyright (c) 2016, Martin Hauke 
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:   cpustat
Version:0.01.27
Release:0
Summary:Periodic cpu utilization statistics
License:GPL-2.0+
Group:  System/Monitoring
Url:http://kernel.ubuntu.com/~cking/cpustat/
Source: 
http://kernel.ubuntu.com/~cking/tarballs/%{name}/%{name}-%{version}.tar.gz
BuildRoot:  %{_tmppath}/%{name}-%{version}-build

%description
cpustat periodically reports the current CPU utilization of running tasks and
can optionally report per CPU and per task utilization statistics at the end
of a run.
cpustat has been designed and optimized to use a minimal amount of CPU cycles
to monitor a system hence it is a light weight alternative to traditional
process monitoring tools such as top. 

%prep
%setup -q

%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags}

%install
%make_install

%files
%defattr(-,root,root)
%doc COPYING README
%{_sbindir}/cpustat
%{_mandir}/man8/*

%changelog