Hello community, here is the log from the commit of package cpustat for openSUSE:Leap:15.2 checked in at 2020-03-10 17:14:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/cpustat (Old) and /work/SRC/openSUSE:Leap:15.2/.cpustat.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpustat" Tue Mar 10 17:14:17 2020 rev:16 rq:783217 version:0.02.10 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/cpustat/cpustat.changes 2020-01-17 12:01:20.440501420 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.cpustat.new.26092/cpustat.changes 2020-03-10 17:14:22.481434329 +0100 @@ -1,0 +2,18 @@ +Sun Mar 8 12:57:58 UTC 2020 - Martin Hauke <[email protected]> + +- Drop SLE12 compat ifdef + +------------------------------------------------------------------- +Fri Feb 28 09:54:10 UTC 2020 - Martin Hauke <[email protected]> + +- Supplement against bash-completion, not bash + +------------------------------------------------------------------- +Wed Feb 26 12:20:54 UTC 2020 - Martin Hauke <[email protected]> + +- 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.HvtIP4/_old 2020-03-10 17:14:23.161434541 +0100 +++ /var/tmp/diff_new_pack.HvtIP4/_new 2020-03-10 17:14:23.165434542 +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 <[email protected]> # # 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/Makefile 2019-07-30 14:18:48.000000000 +0200 +++ new/cpustat-0.02.10/Makefile 2020-02-24 00:30:57.000000000 +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 <[email protected]> # -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.000000000 +0100 +++ new/cpustat-0.02.10/bash-completion/cpustat 2020-02-24 00:30:57.000000000 +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 Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +_cpustat() +{ + local cur prev words cword + _init_completion || return + + #cur=${COMP_WORDS[COMP_CWORD]} + #prev=${COMP_WORDS[COMP_CWORD-1]} + #COMREPLY=() + + case $prev in + '-n') + COMPREPLY=( $(compgen -W "maxtasks" -- $cur) ) + return 0 + ;; + '-p') COMPREPLY=( $(compgen -W '$(command ps axo pid | sed 1d) ' $cur ) ) + return 0 + ;; + '-r') + _filedir + return 0 + ;; + '-t') + COMPREPLY=( $(compgen -W "threshold" -- $cur) ) + return 0 + ;; + esac + + case "$cur" in + -*) + OPTS="-h -a -c -d -D -g -i -l -q -s -S -T -x -X" + COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) + return 0 + ;; + esac + return 0 +} + +# load the completion +complete -F _cpustat cpustat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.09/cpustat.c new/cpustat-0.02.10/cpustat.c --- old/cpustat-0.02.09/cpustat.c 2019-07-30 14:18:48.000000000 +0200 +++ new/cpustat-0.02.10/cpustat.c 2020-02-24 00:30:57.000000000 +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 @@ -2227,7 +2227,7 @@ if (optind < argc) { duration_secs = atof(argv[optind++]); if (duration_secs < 0.333) { - (void)fprintf(stderr, "Duration must 0.333 or more\n"); + (void)fprintf(stderr, "Delay duration must 0.333 or more\n"); exit(EXIT_FAILURE); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.09/snap/Makefile new/cpustat-0.02.10/snap/Makefile --- old/cpustat-0.02.09/snap/Makefile 2019-07-30 14:18:48.000000000 +0200 +++ new/cpustat-0.02.10/snap/Makefile 2020-02-24 00:30:57.000000000 +0100 @@ -1,26 +1,6 @@ -VERSION=$(shell git tag | tail -1 | cut -c2-) -COMMITS=$(shell git log --oneline | wc -l) -SHA=$(shell git log -1 --oneline | cut -d' ' -f1) -DATE=$(shell date +'%Y%m%d') -V=$(VERSION)-$(DATE)-$(COMMITS)-$(SHA) - -all: get_icon set_version +all: snapcraft -set_version: - cat snapcraft.yaml | sed 's/version: .*/version: $(V)/' > snapcraft-tmp.yaml - mv snapcraft-tmp.yaml snapcraft.yaml - -get_icon: - @if [ ! -e setup/gui/icon.svg ]; \ - then \ - echo copying icon.svg; \ - mkdir -p setup/gui; \ - cp ../mascot/cpustat.svg setup/gui/icon.svg; \ - fi; - clean: rm -rf setup *.snap snapcraft clean - cat snapcraft.yaml | sed 's/version: .*/version: 0/' > snapcraft-tmp.yaml - mv snapcraft-tmp.yaml snapcraft.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.09/snap/snapcraft.yaml new/cpustat-0.02.10/snap/snapcraft.yaml --- old/cpustat-0.02.09/snap/snapcraft.yaml 2019-07-30 14:18:48.000000000 +0200 +++ new/cpustat-0.02.10/snap/snapcraft.yaml 2020-02-24 00:30:57.000000000 +0100 @@ -1,5 +1,7 @@ name: cpustat -version: 0.02.01-20161206-266-79b8e01 +version: git +version-script: | + echo $(git describe --tags) summary: periodic cpu utilization statistics 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. confinement: strict
