commit smemstat for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package smemstat for openSUSE:Factory checked in at 2021-07-31 18:51:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/smemstat (Old) and /work/SRC/openSUSE:Factory/.smemstat.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "smemstat" Sat Jul 31 18:51:35 2021 rev:10 rq:909525 version:0.02.10 Changes: -------- --- /work/SRC/openSUSE:Factory/smemstat/smemstat.changes 2020-08-24 15:13:43.982704858 +0200 +++ /work/SRC/openSUSE:Factory/.smemstat.new.1899/smemstat.changes 2021-07-31 18:52:32.674447664 +0200 @@ -1,0 +2,8 @@ +Sat Jul 10 10:14:18 UTC 2021 - Martin Hauke <mardnh@gmx.de> + +- Update to version 0.02.10 + * Fix lost newline characters due to truncation on wide consoles. +- Update to version 0.02.09 + * smemstat: fix alignment of Total: columns in oneshot and dump + modes +------------------------------------------------------------------- Old: ---- smemstat-0.02.08.tar.xz New: ---- smemstat-0.02.10.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smemstat.spec ++++++ --- /var/tmp/diff_new_pack.yzWe31/_old 2021-07-31 18:52:33.026447243 +0200 +++ /var/tmp/diff_new_pack.yzWe31/_new 2021-07-31 18:52:33.030447238 +0200 @@ -1,8 +1,8 @@ # # spec file for package smemstat # -# Copyright (c) 2020 SUSE LLC -# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de> +# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2017-2021, Martin Hauke <mardnh@gmx.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: smemstat -Version: 0.02.08 +Version: 0.02.10 Release: 0 Summary: Memory usage monitoring tool License: GPL-2.0-or-later ++++++ smemstat-0.02.08.tar.xz -> smemstat-0.02.10.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smemstat-0.02.08/Makefile new/smemstat-0.02.10/Makefile --- old/smemstat-0.02.08/Makefile 2020-07-04 22:51:40.000000000 +0200 +++ new/smemstat-0.02.10/Makefile 2021-07-06 21:08:23.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (C) 2014-2020 Canonical, Ltd. +# Copyright (C) 2014-2021 Canonical, Ltd. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.02.08 +VERSION=0.02.10 # CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smemstat-0.02.08/bash-completion/smemstat new/smemstat-0.02.10/bash-completion/smemstat --- old/smemstat-0.02.08/bash-completion/smemstat 2020-07-04 22:51:40.000000000 +0200 +++ new/smemstat-0.02.10/bash-completion/smemstat 2021-07-06 21:08:23.000000000 +0200 @@ -1,6 +1,6 @@ # smemstat tab completion for bash. # -# Copyright (C) 2020 Canonical +# Copyright (C) 2020-2021 Canonical # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smemstat-0.02.08/smemstat.8 new/smemstat-0.02.10/smemstat.8 --- old/smemstat-0.02.08/smemstat.8 2020-07-04 22:51:40.000000000 +0200 +++ new/smemstat-0.02.10/smemstat.8 2021-07-06 21:08:23.000000000 +0200 @@ -104,7 +104,7 @@ This manual page was written by Colin King <colin.king@canonical.com>, for the Ubuntu project (but may be used by others). .SH COPYRIGHT -Copyright \(co 2014-2020 Canonical Ltd. +Copyright \(co 2014-2021 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/smemstat-0.02.08/smemstat.c new/smemstat-0.02.10/smemstat.c --- old/smemstat-0.02.08/smemstat.c 2020-07-04 22:51:40.000000000 +0200 +++ new/smemstat-0.02.10/smemstat.c 2021-07-06 21:08:23.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2020 Canonical, Ltd. + * Copyright (C) 2014-2021 Canonical, Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -325,18 +325,26 @@ static void smemstat_top_printf(const char *fmt, ...) { va_list ap; - char buf[256]; - int sz = sizeof(buf) - 1; + char buf[4096]; + size_t n, sz = sizeof(buf) - 1; + + smemstat_top_winsize(true); if (cury >= rows) return; - if (cols < sz) - sz = cols; + move(cury, 0); + if ((size_t)cols < sz) + sz = (size_t)cols; + memset(buf, 0, sizeof(buf)); va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - buf[sz] = '\0'; + n = vsnprintf(buf, sizeof(buf), fmt, ap); + if (n > sizeof(buf)) + n = sizeof(buf) - 1; + if (n > sz) + n = sz; + buf[n] = '\0'; (void)mvprintw(cury, 0, buf); va_end(ap); cury++; @@ -349,11 +357,10 @@ static void smemstat_normal_printf(const char *fmt, ...) { va_list ap; - char buf[256]; va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - (void)fputs(buf, stdout); + (void)vfprintf(stdout, fmt, ap); + (void)fflush(stdout); va_end(ap); } @@ -1131,6 +1138,9 @@ char s_swap[12], s_uss[12], s_pss[12], s_rss[12]; const int pid_size = pid_max_digits(); + if (one_shot) + opt_flags &= ~OPT_ARROW; + for (m = mem_info_new; m; m = m->next) { mem_delta(m, mem_info_old); for (l = &sorted; *l; l = &(*l)->s_next) { @@ -1192,7 +1202,7 @@ } if (!(opt_flags & OPT_QUIET)) - df.df_printf(" %*.*s Swap USS PSS RSS %sUser Command\n", + df.df_printf("%*.*s Swap USS PSS RSS %sUser Command\n", pid_size, pid_size, "PID", opt_flags & OPT_ARROW ? "D " : ""); @@ -1209,9 +1219,8 @@ const char * const arrow = (delta < 0) ? "\u2193 " : ((delta > 0) ? "\u2191 " : " "); - df.df_printf(" %*d %9s %9s %9s %9s %s%-10.10s %s\n", + df.df_printf("%*d %9s %9s %9s %9s %s%-10.10s %s\n", pid_size, m->pid, s_swap, s_uss, s_pss, s_rss, - one_shot ? " " : opt_flags & OPT_ARROW ? arrow : "", uname_name(m->uname), cmd); } @@ -1237,7 +1246,7 @@ mem_to_str((double)t_rss, s_rss, sizeof(s_rss)); if (!(opt_flags & OPT_QUIET)) - df.df_printf(" %-*.*s %9s %9s %9s %9s\n\n", + df.df_printf("%-*.*s %9s %9s %9s %9s\n\n", pid_size, pid_size, "Total:", s_swap, s_uss, s_pss, s_rss); @@ -1342,7 +1351,7 @@ } if (!(opt_flags & OPT_QUIET)) - df.df_printf(" %*.*s Swap USS PSS RSS User Command\n", + df.df_printf("%*.*s Swap USS PSS RSS User Command\n", pid_size, pid_size, "PID"); for (m = sorted_deltas; m; ) { const char *cmd = mem_cmdline(m); @@ -1354,7 +1363,7 @@ mem_to_str((double)m->d_rss / duration, s_rss, sizeof(s_rss)); if (!(opt_flags & OPT_QUIET)) { - df.df_printf(" %*d %9s %9s %9s %9s %-10.10s %s\n", + df.df_printf("%*d %9s %9s %9s %9s %-10.10s %s\n", pid_size, m->pid, s_swap, s_uss, s_pss, s_rss, uname_name(m->uname), cmd); } @@ -1386,7 +1395,7 @@ mem_to_str((double)t_d_rss / duration, s_rss, sizeof(s_rss)); if (!(opt_flags & OPT_QUIET)) - df.df_printf("Total: %9s %9s %9s %9s\n\n", s_swap, s_uss, s_pss, s_rss); + df.df_printf("%-*.*s %9s %9s %9s %9s\n\n", pid_size, pid_size, "Total:", s_swap, s_uss, s_pss, s_rss); if (json) { (void)fprintf(json, " ],\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smemstat-0.02.08/snap/snapcraft.yaml new/smemstat-0.02.10/snap/snapcraft.yaml --- old/smemstat-0.02.08/snap/snapcraft.yaml 2020-07-04 22:51:40.000000000 +0200 +++ new/smemstat-0.02.10/snap/snapcraft.yaml 2021-07-06 21:08:23.000000000 +0200 @@ -1,17 +1,38 @@ name: smemstat -version: git -version-script: | - echo $(git describe --tags) summary: memory usage monitoring tool description: smemstat reports the physical memory usage taking into consideration shared memory. The tool can either report a current snapshot of memory usage or periodically dump out any changes in memory. confinement: strict -type: app grade: stable +assumes: [snapd2.45] +base: core18 +adopt-info: smemstat + +architectures: + - build-on: s390x + - build-on: ppc64el + - build-on: arm64 + - build-on: armhf + - build-on: amd64 + - build-on: i386 parts: smemstat: plugin: make source: git://kernel.ubuntu.com/cking/smemstat + override-pull: | + snapcraftctl pull + description="$(git describe HEAD --tags)" + sha=$(echo $description | tr '-' ' ' | awk '{print $NF}') + version=${description%$sha} + commits=$(git log --oneline | wc -l) + date=$(date +'%Y%m%d') + if test "$description" = "$sha" + then + version="$description" + else + version=$(echo $version$date-$commits-$sha | cut -c1-32) + fi + snapcraftctl set-version "$version" build-packages: - gcc - make @@ -20,6 +41,7 @@ stage-packages: - libncurses-dev - libncursesw5-dev + apps: smemstat: command: usr/bin/smemstat
participants (1)
-
Source-Sync