- remove all patches (applied upstream), remove quilt framework
authorgregor herrmann <gregoa@debian.org>
Sun, 8 May 2011 13:07:06 +0000 (13:07 -0000)
committergregor herrmann <gregoa@debian.org>
Sun, 8 May 2011 13:07:06 +0000 (13:07 -0000)
  - remove manpage from debian/ directory, shipped upstream
* Set Standards-Version to 3.9.2 (no changes).
* Bump debhelper compatibility level to 8.

13 files changed:
debian/README.source [deleted file]
debian/changelog
debian/compat
debian/control
debian/cpulimit.1 [deleted file]
debian/cpulimit.install [deleted file]
debian/cpulimit.manpages [deleted file]
debian/patches/01_priority.patch [deleted file]
debian/patches/02_segfault_longoptions.patch [deleted file]
debian/patches/03_Makefile.patch [deleted file]
debian/patches/04_opendir_leak.patch [deleted file]
debian/patches/series [deleted file]
debian/rules

diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644 (file)
index 0ea6b75..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-This package uses quilt to manage patches.
-
-Please refer to /usr/share/doc/quilt/README.source if you need help with
-using quilt for Debian packages.
index 6bea9c0..3af2db5 100644 (file)
@@ -5,6 +5,10 @@ cpulimit (1.3-1) UNRELEASED; urgency=low
     - debian/watch: update URL
     - debian/control: update Homepage
     - debian/copyright: update upstream copyright and license
+    - remove all patches (applied upstream), remove quilt framework
+    - remove manpage from debian/ directory, shipped upstream
+  * Set Standards-Version to 3.9.2 (no changes).
+  * Bump debhelper compatibility level to 8.
 
  -- gregor herrmann <gregoa@debian.org>  Sun, 08 May 2011 14:58:46 +0200
 
index 1e8b314..45a4fb7 100644 (file)
@@ -1 +1 @@
-6
+8
index 305a0bb..213c8af 100644 (file)
@@ -3,8 +3,8 @@ Section: admin
 Priority: optional
 Maintainer: gregor herrmann <gregoa@debian.org>
 Uploaders: tony mancill <tmancill@debian.org>
-Build-Depends: debhelper (>= 7.0.8), quilt (>= 0.46-7)
-Standards-Version: 3.8.3
+Build-Depends: debhelper (>= 8)
+Standards-Version: 3.9.2
 Homepage: http://limitcpu.sourceforge.net/
 Vcs-Svn: http://svn.toastfreeware.priv.at/debian/cpulimit/trunk/
 Vcs-Browser: http://svn.toastfreeware.priv.at/wsvn/ToastfreewareDebian/cpulimit/trunk/
diff --git a/debian/cpulimit.1 b/debian/cpulimit.1
deleted file mode 100644 (file)
index 78710bf..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-.TH CPULIMIT "1" "December 2009" "cpulimit" "User commands"
-.SH NAME
-cpulimit -- limits the CPU usage of a process
-.SH SYNOPSIS
-.B cpulimit
-\fITARGET \fR[\fIOPTIONS\fR...]
-.SH DESCRIPTION
-.P
-\fITARGET \fRmust be exactly one of these:
-.TP
-\fB\-p\fR, \fB\-\-pid\fR=\fIN\fR
-pid of the process
-.TP
-\fB\-e\fR, \fB\-\-exe\fR=\fIFILE\fR
-name of the executable program file
-.TP
-\fB\-P\fR, \fB\-\-path\fR=\fIPATH\fR
-absolute path name of the executable program file
-.P
-\fIOPTIONS\fR
-.TP
-\fB\-l\fR, \fB\-\-limit\fR=\fIN\fR
-percentage of CPU allowed from 0 to 100 (mandatory)
-.TP
-\fB\-v\fR, \fB\-\-verbose\fR
-show control statistics
-.TP
-\fB\-z\fR, \fB\-\-lazy\fR
-exit if there is no suitable target process, or if it dies
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-display this help and exit
-.SH EXAMPLES
-Assuming you have started \fB`foo \-\-bar`\fR and you find out with \fItop\fR(1) or
-\fIps\fR(1) that this process uses all your CPU time you can either
-.TP
-\[sh] \fBcpulimit \-e foo \-l 50\fR
-limits the CPU usage of the process by acting on the executable program file
-(note: the argument "\-\-bar" is omitted)
-.TP
-\[sh] \fBcpulimit \-p 1234 \-l 50\fR
-limits the CPU usage of the process by acting on its PID, as shown by
-\fIps\fR(1)
-.TP
-\[sh] \fBcpulimit \-P /usr/bin/foo \-l 50\fR
-same as \fI\-e\fR but uses the absolute path name
-.SH NOTES
-.IP \(bu 4
-cpulimit always sends the SIGSTOP and SIGCONT signals to a process, 
-both to verify
-that it can control it and 
-to limit the average amount of CPU it consumes.  This can result in
-misleading (annoying) job control messages that indicate that the job 
-has been stopped (when actually it was, but immediately restarted).  
-This can also cause issues with interactive shells that detect or otherwise
-depend on SIGSTOP/SIGCONT.   For example,
-you may place a job in the foreground, only to see it immediately stopped
-and restarted in the background.  (See also <http://bugs.debian.org/558763>.)
-.IP \(bu 4
-When invoked with the \fI\-e\fR or \fI\-P\fR options, cpulimit looks for 
-any process under /proc with a name that matches the process name argument 
-given.  Furthermore, it uses the first instance of the process found.  
-To control a specific instance of a process, use the \fI\-p\fR option 
-and provide a PID.
-.IP \(bu 4
-The current version of cpulimit assumes the kernel HZ value 100.
-
-.SH AUTHOR
-This manpage was written for the Debian project by gregor herrmann 
-<gregoa@debian.org> but may be used by others.
diff --git a/debian/cpulimit.install b/debian/cpulimit.install
deleted file mode 100644 (file)
index acc4f26..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cpulimit usr/bin
diff --git a/debian/cpulimit.manpages b/debian/cpulimit.manpages
deleted file mode 100644 (file)
index 4f10d92..0000000
+++ /dev/null
@@ -1 +0,0 @@
-debian/cpulimit.1
diff --git a/debian/patches/01_priority.patch b/debian/patches/01_priority.patch
deleted file mode 100644 (file)
index 5effb2b..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-Author: Ariel <asdebian@dsgml.com>
-Description: only drop priority if it can be raised too
-             and implement RLIMIT_NICE option.
-Bugs: #412421
-
---- cpulimit-1.1.orig/cpulimit.c
-+++ cpulimit-1.1/cpulimit.c
-@@ -42,6 +42,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <string.h>
-+#include <limits.h> //for INT_MAX, could also hardcode some large number
- //kernel time resolution (inverse of one jiffy interval) in Hertz
- //i don't know how to detect it, then define to the default (not very clean!)
-@@ -59,6 +60,8 @@
- int verbose=0;
- //lazy mode
- int lazy=0;
-+//is higher priority nice possible?
-+int nice_lim;
- //reverse byte search
- void *memrchr(const void *s, int c, size_t n);
-@@ -71,7 +74,7 @@
- int waitforpid(int pid) {
-       //switch to low priority
--      if (setpriority(PRIO_PROCESS,getpid(),19)!=0) {
-+      if (nice_lim < INT_MAX && setpriority(PRIO_PROCESS,getpid(),19)!=0) {
-               printf("Warning: cannot renice\n");
-       }
-@@ -127,8 +130,8 @@
- done:
-       printf("Process %d detected\n",pid);
-       //now set high priority, if possible
--      if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) {
--              printf("Warning: cannot renice.\nTo work better you should run this program as root.\n");
-+      if (nice_lim < INT_MAX && setpriority(PRIO_PROCESS,getpid(),nice_lim)!=0) {
-+              printf("Warning: cannot renice.\n");
-       }
-       return 0;
-@@ -143,7 +146,7 @@
- int getpidof(const char *process) {
-       //set low priority
--      if (setpriority(PRIO_PROCESS,getpid(),19)!=0) {
-+      if (nice_lim < INT_MAX && setpriority(PRIO_PROCESS,getpid(),19)!=0) {
-               printf("Warning: cannot renice\n");
-       }
-@@ -219,8 +222,8 @@
- done:
-       printf("Process %d detected\n",pid);
-       //now set high priority, if possible
--      if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) {
--              printf("Warning: cannot renice.\nTo work better you should run this program as root.\n");
-+      if (nice_lim < INT_MAX && setpriority(PRIO_PROCESS,getpid(),nice_lim)!=0) {
-+              printf("Warning: cannot renice.\n");
-       }
-       return pid;
-@@ -373,6 +376,7 @@
-       int pid_ok=0;
-       int process_ok=0;
-       int limit_ok=0;
-+      struct rlimit maxlimit;
-       do {
-               next_option = getopt_long (argc, argv, short_options,long_options, NULL);
-@@ -437,6 +441,35 @@
-       signal(SIGINT,quit);
-       signal(SIGTERM,quit);
-+      //now test high priority
-+      if (setpriority(PRIO_PROCESS,getpid(),-20)!=0) {
-+              //if that failed, check if we have a limit by how much we can raise the priority
-+#ifdef RLIMIT_NICE //check if non-root can even make changes (ifdef because it's only available in linux >= 2.6.13)
-+              nice_lim=getpriority(PRIO_PROCESS,getpid());
-+              getrlimit(RLIMIT_NICE, &maxlimit);
-+
-+              if( (20 - (signed)maxlimit.rlim_cur) < nice_lim &&  //if we can do better then current
-+                  setpriority(PRIO_PROCESS,getpid(),20 - (signed)maxlimit.rlim_cur)==0 //and it actually works
-+                ) {
-+
-+                      //if we can do better, but not by much, warn about it
-+                      if( (nice_lim - (20 - (signed)maxlimit.rlim_cur)) < 9) {
-+                              printf("Warning, can only increase priority by %d.\n", nice_lim - (20 - (signed)maxlimit.rlim_cur));
-+                      }
-+
-+                      nice_lim = 20 - (signed)maxlimit.rlim_cur; //our new limit
-+
-+              } else //otherwise don't try to change priority. The below will also run if it's not possible for non-root to change priority
-+#endif
-+              {
-+                      printf("Warning: cannot renice.\nTo work better you should run this program as root, or adjust RLIMIT_NICE.\nFor example in /etc/security/limits.conf add a line with: * - nice -10\n\n");
-+                      nice_lim=INT_MAX;
-+              }
-+      } else {
-+              nice_lim=-20;
-+      }
-+      //don't bother putting setpriority back down, since getpidof and waitforpid twiddle it anyway
-+
-       //time quantum in microseconds. it's splitted in a working period and a sleeping one
-       int period=100000;
-       struct timespec twork,tsleep;   //working and sleeping intervals
diff --git a/debian/patches/02_segfault_longoptions.patch b/debian/patches/02_segfault_longoptions.patch
deleted file mode 100644 (file)
index ee21484..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-Author: Cesare Tirabassi <norsetto@ubuntu.com>
-Description: Fix long options list of arguments.
-Bugs: #487233, #487236, LP #241538
-
---- cpulimit-1.1.orig/cpulimit.c
-+++ cpulimit-1.1/cpulimit.c
-@@ -360,13 +360,13 @@
-       const char* short_options="p:e:P:l:vzh";
-       /* An array describing valid long options. */
-       const struct option long_options[] = {
--              { "pid", 0, NULL, 'p' },
--              { "exe", 1, NULL, 'e' },
--              { "path", 0, NULL, 'P' },
--              { "limit", 0, NULL, 'l' },
--              { "verbose", 0, NULL, 'v' },
--              { "lazy", 0, NULL, 'z' },
--              { "help", 0, NULL, 'h' },
-+              { "pid", required_argument, NULL, 'p' },
-+              { "exe", required_argument, NULL, 'e' },
-+              { "path", required_argument, NULL, 'P' },
-+              { "limit", required_argument, NULL, 'l' },
-+              { "verbose", no_argument, NULL, 'v' },
-+              { "lazy", no_argument, NULL, 'z' },
-+              { "help", no_argument, NULL, 'h' },
-               { NULL, 0, NULL, 0 }
-       };
-       //argument variables
diff --git a/debian/patches/03_Makefile.patch b/debian/patches/03_Makefile.patch
deleted file mode 100644 (file)
index 0e2c9a5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Author: Cesare Tirabassi <norsetto@ubuntu.com>
-Description: allow to pass CFLAGS from debian/rules
-
---- cpulimit-1.1.orig/Makefile
-+++ cpulimit-1.1/Makefile
-@@ -1,7 +1,9 @@
-+CFLAGS?=-Wall -O2
-+
- all:: cpulimit
- cpulimit:     cpulimit.c
--      gcc -o cpulimit cpulimit.c -lrt -Wall -O2
-+      gcc -o cpulimit cpulimit.c -lrt $(CFLAGS)
- clean:
-       rm -f *~ cpulimit
diff --git a/debian/patches/04_opendir_leak.patch b/debian/patches/04_opendir_leak.patch
deleted file mode 100644 (file)
index 2c6b098..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Author: Johan Walles <johan.walles@gmail.com>
-Bug-Debian: http://bugs.debian.org/564517
-Description: Each time cpulimit finds a process to limit, it does a goto
- past the call to closedir(). Plug that leak.
-Forwarded: yes
-Origin: vendor, cf. bug
-Reviewed-By: gregor herrmann <gregoa@debian.org>
-Last-Update: 2010-01-11
-
---- a/cpulimit.c
-+++ b/cpulimit.c
-@@ -98,6 +98,10 @@
-                               //pid detected
-                               if (kill(pid,SIGSTOP)==0 &&  kill(pid,SIGCONT)==0) {
-                                       //process is ok!
-+                                      if (closedir(dip) == -1) {
-+                                              perror("closedir");
-+                                              return -1;
-+                                      }
-                                       goto done;
-                               }
-                               else {
-@@ -188,6 +192,10 @@
-                                       if (found==1) {
-                                               if (kill(pid,SIGSTOP)==0 &&  kill(pid,SIGCONT)==0) {
-                                                       //process is ok!
-+                                                      if (closedir(dip) == -1) {
-+                                                              perror("closedir");
-+                                                              return -1;
-+                                                      }
-                                                       goto done;
-                                               }
-                                               else {
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644 (file)
index a8afbb7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-01_priority.patch
-02_segfault_longoptions.patch
-03_Makefile.patch
-04_opendir_leak.patch
index 749e624..2d33f6a 100755 (executable)
@@ -1,4 +1,4 @@
 #!/usr/bin/make -f
 
 %:
-       dh --with quilt $@
+       dh $@