Hello community, here is the log from the commit of package cpulimit for openSUSE:Factory checked in at 2020-09-01 20:10:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpulimit (Old) and /work/SRC/openSUSE:Factory/.cpulimit.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpulimit" Tue Sep 1 20:10:25 2020 rev:3 rq:830988 version:2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/cpulimit/cpulimit.changes 2018-02-19 13:04:10.759128089 +0100 +++ /work/SRC/openSUSE:Factory/.cpulimit.new.3399/cpulimit.changes 2020-09-01 20:10:41.972685891 +0200 @@ -1,0 +2,7 @@ +Tue Aug 25 21:26:56 UTC 2020 - Dirk Mueller <[email protected]> + +- update to 2.6: + * Fixed indentation to avoid compiler warnings. No functional change. + * Updated manual page to warn against using -m on a script. + +------------------------------------------------------------------- Old: ---- cpulimit-2.5.tar.gz New: ---- cpulimit-2.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpulimit.spec ++++++ --- /var/tmp/diff_new_pack.ZzrA9E/_old 2020-09-01 20:10:42.808686282 +0200 +++ /var/tmp/diff_new_pack.ZzrA9E/_new 2020-09-01 20:10:42.812686284 +0200 @@ -2,7 +2,7 @@ # # spec file for package cpulimit # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,17 +13,17 @@ # 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: cpulimit -Version: 2.5 +Version: 2.6 Release: 0 Summary: Limit the CPU Usage of a Process -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring -Url: http://limitcpu.sourceforge.net/ +URL: http://limitcpu.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/limitcpu/%{name}-%{version}.tar.gz Patch0: %{name}-2.2-do_not_forget_version.patch BuildRequires: gcc @@ -46,15 +46,16 @@ %patch0 -p1 %build -make %{?_smp_mflags} \ +%make_build \ CFLAGS="%{optflags}" %install %make_install PREFIX=%{buildroot}/%{_prefix} %files -%doc LICENSE CHANGELOG README TODO +%license LICENSE +%doc CHANGELOG README %{_bindir}/%{name} -%{_mandir}/man1/%{name}.1%{ext_man} +%{_mandir}/man1/%{name}.1%{?ext_man} %changelog ++++++ cpulimit-2.5.tar.gz -> cpulimit-2.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/CHANGELOG new/cpulimit-2.6/CHANGELOG --- old/cpulimit-2.5/CHANGELOG 2017-03-27 19:03:18.000000000 +0200 +++ new/cpulimit-2.6/CHANGELOG 2019-04-07 23:26:53.000000000 +0200 @@ -1,3 +1,9 @@ +========== Changes in 2.6 (unreleased) ==== + +* Fixed indentation to avoid compiler warnings. No functional change. + +* Updated manual page to warn against using -m on a script. + ========== Changes in 2.5 ================= * Added some protection against causing a fork bomb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/Makefile new/cpulimit-2.6/Makefile --- old/cpulimit-2.5/Makefile 2017-03-27 19:01:48.000000000 +0200 +++ new/cpulimit-2.6/Makefile 2019-04-07 23:53:59.000000000 +0200 @@ -1,4 +1,4 @@ -VERSION?=2.5 +VERSION?=2.6 PREFIX?=/usr CFLAGS?=-Wall -O2 -DVERSION=$(VERSION) CC?=gcc @@ -35,5 +35,5 @@ $(MAKE) -C test clean tarball: clean - cd .. && tar czf cpulimit-$(VERSION).tar.gz cpulimit-$(VERSION) --exclude=.svn + cd .. && tar czf cpulimit-$(VERSION).tar.gz --exclude=.svn cpulimit-$(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/README new/cpulimit-2.6/README --- old/cpulimit-2.5/README 2016-11-19 23:23:20.000000000 +0100 +++ new/cpulimit-2.6/README 2019-04-07 23:27:05.000000000 +0200 @@ -42,11 +42,11 @@ Once you have downloaded a copy of LimitCPU building should be fairly straight forward. First we unpack the source code -tar zxf cpulimit-2.2.tar.gz +tar zxf cpulimit-2.6.tar.gz Then we run the makefile. -cd cpulimit-2.2 +cd cpulimit-2.6 make This should produce the executable file "cpulimit". If you would like diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/TODO new/cpulimit-2.6/TODO --- old/cpulimit-2.5/TODO 2016-11-19 23:23:20.000000000 +0100 +++ new/cpulimit-2.6/TODO 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/cpulimit.1 new/cpulimit-2.6/cpulimit.1 --- old/cpulimit-2.5/cpulimit.1 2016-11-19 23:23:20.000000000 +0100 +++ new/cpulimit-2.6/cpulimit.1 2019-04-07 23:26:30.000000000 +0200 @@ -39,6 +39,9 @@ .TP \fB\-m\fR, \fB\-\-monitor\-forks\fR watch and throttle child processes of the target process +Warning: It is usually a bad idea to use this flag on a shell script. The commands +in the script will each spawn a process which will, in turn, spawn more copies of +this program to throttle them, bogging down the system. .TP \fB\-r\fR, \fB\-\-restore\fR restore a process killed using the \-k flag. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpulimit-2.5/cpulimit.c new/cpulimit-2.6/cpulimit.c --- old/cpulimit-2.5/cpulimit.c 2017-03-27 18:59:11.000000000 +0200 +++ new/cpulimit-2.6/cpulimit.c 2019-04-07 23:19:25.000000000 +0200 @@ -232,15 +232,16 @@ done: if (!quiet) printf("Process %d detected\n",pid); - //now set high priority, if possible - // if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) { - /* - if ( (nice_lim < INT_MAX) && - (setpriority(PRIO_PROCESS, my_pid, nice_lim) != 0) ) { - printf("Warning: cannot renice.\nTo work better you should run this program as root.\n"); - } - */ - return 0; + + //now set high priority, if possible + // if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) { + /* + if ( (nice_lim < INT_MAX) && + (setpriority(PRIO_PROCESS, my_pid, nice_lim) != 0) ) { + printf("Warning: cannot renice.\nTo work better you should run this program as root.\n"); + } + */ + return 0; } @@ -337,16 +338,16 @@ done: if (!quiet) printf("Process %d detected\n",pid); - //now set high priority, if possible - // if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) { - /* - if ( (nice_lim < INT_MAX) && - (setpriority(PRIO_PROCESS, my_pid, nice_lim) != 0) ) { - printf("Warning: cannot renice.\nTo work better you should run this program as root.\n"); - } - */ - return pid; + //now set high priority, if possible + // if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) { + /* + if ( (nice_lim < INT_MAX) && + (setpriority(PRIO_PROCESS, my_pid, nice_lim) != 0) ) { + printf("Warning: cannot renice.\nTo work better you should run this program as root.\n"); + } + */ + return pid; } //SIGINT and SIGTERM signal handler @@ -1193,11 +1194,12 @@ //estimate how much the controlled process is using the cpu in its working interval struct cpu_usage cu; if (compute_cpu_usage(pid,workingtime,&cu)==-1) { - if (!quiet) + if (!quiet) fprintf(stderr,"Process %d dead!\n",pid); - if (lazy) exit(2); - //wait until our process appears - goto wait_for_process; + if (lazy) + exit(2); + //wait until our process appears + goto wait_for_process; } //cpu actual usage of process (range 0-1)
