[Pkg-wmaker-commits] [wmtop] 10/34: debian/patches/01_restore_pristine_code.dpatch: Split into to new quilt patches, comment_strip_of_binary.patch and fix_incorrect_memory_usage.patch.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Wed Aug 26 01:01:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmtop.
commit c3363901cabb30245fee1ff21eb15625f5700aac
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Jul 13 11:35:21 2015 -0600
debian/patches/01_restore_pristine_code.dpatch: Split into to new quilt
patches, comment_strip_of_binary.patch and fix_incorrect_memory_usage.patch.
---
debian/patches/01_restore_pristine_code.dpatch | 52 -------------------------
debian/patches/comment_strip_of_binary.patch | 16 ++++++++
debian/patches/fix_incorrect_memory_usage.patch | 39 +++++++++++++++++++
debian/patches/series | 2 +
4 files changed, 57 insertions(+), 52 deletions(-)
diff --git a/debian/patches/01_restore_pristine_code.dpatch b/debian/patches/01_restore_pristine_code.dpatch
deleted file mode 100644
index c882e3c..0000000
--- a/debian/patches/01_restore_pristine_code.dpatch
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_restore_pristine_code.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: New patch generated from wmtop 0.84-7 diff.gz
-
- at DPATCH@
-diff -urNad wmtop~/Makefile wmtop/Makefile
---- wmtop~/Makefile 2006-08-27 13:44:47.000000000 +0200
-+++ wmtop/Makefile 2008-01-09 19:57:58.915396801 +0100
-@@ -38,7 +38,7 @@
- rm -f *~
-
- install: wmtop
-- strip wmtop
-+ #strip wmtop
- cp -f wmtop $(PREFIX)/bin/
- chmod 755 $(PREFIX)/bin/wmtop
- cp -f wmtop.1 $(PREFIX)/man/man1
-diff -urNad wmtop~/wmtop.c wmtop/wmtop.c
---- wmtop~/wmtop.c 2008-01-05 16:40:08.000000000 +0100
-+++ wmtop/wmtop.c 2008-01-09 19:57:51.618981002 +0100
-@@ -843,7 +843,7 @@
- #if defined(LINUX)
- int calc_mem_total() {
- int ps;
-- char line[512];
-+ char line[1024];
- char *ptr;
- int rc;
-
-@@ -853,13 +853,16 @@
- if (rc<0)
- return 0;
-
-- if ((ptr = strstr(line, "Mem:")) == NULL) {
-- return 0;
-- } else {
-+ if ((ptr = strstr(line, "Mem:")) != NULL) {
- ptr += 4;
- return atoi(ptr);
-+ } else if ((ptr = strstr(line, "MemTotal:")) != NULL) {
-+ /* The "Mem:" line has been removed in Linux 2.6 */
-+ ptr += 9;
-+ return atoi(ptr) << 10; /* MemTotal is given in kiB */
-+ } else {
-+ return 0;
- }
--
- }
- #endif /* defined(LINUX) */
-
diff --git a/debian/patches/comment_strip_of_binary.patch b/debian/patches/comment_strip_of_binary.patch
new file mode 100644
index 0000000..35acf07
--- /dev/null
+++ b/debian/patches/comment_strip_of_binary.patch
@@ -0,0 +1,16 @@
+Description: comment strip of binary from upstream Makefile
+Author: tony mancill <tmancill at debian.org>
+Bug-Debian: http://bugs.debian.org/438278
+Last-Update: 2015-07-13
+
+--- a/Makefile
++++ b/Makefile
+@@ -38,7 +38,7 @@
+ rm -f *~
+
+ install: wmtop
+- strip wmtop
++ #strip wmtop
+ cp -f wmtop $(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/wmtop
+ cp -f wmtop.1 $(PREFIX)/man/man1
diff --git a/debian/patches/fix_incorrect_memory_usage.patch b/debian/patches/fix_incorrect_memory_usage.patch
new file mode 100644
index 0000000..bae1576
--- /dev/null
+++ b/debian/patches/fix_incorrect_memory_usage.patch
@@ -0,0 +1,39 @@
+Description: reports incorrect memory usage on Linux 2.6
+ On Linux 2.6, "wmtop -m" reports incorrect memory usage (it reports every
+ process using infinite memory). This patch fixes the problem:
+Author: Dwayne C. Litzenberger <dlitz at dlitz.net>
+Bug-Debian: http://bugs.debian.org/224732
+Last-Update: 2015-07-13
+
+--- a/wmtop.c
++++ b/wmtop.c
+@@ -843,7 +843,7 @@
+ #if defined(LINUX)
+ int calc_mem_total() {
+ int ps;
+- char line[512];
++ char line[1024];
+ char *ptr;
+ int rc;
+
+@@ -853,13 +853,16 @@
+ if (rc<0)
+ return 0;
+
+- if ((ptr = strstr(line, "Mem:")) == NULL) {
+- return 0;
+- } else {
++ if ((ptr = strstr(line, "Mem:")) != NULL) {
+ ptr += 4;
+ return atoi(ptr);
++ } else if ((ptr = strstr(line, "MemTotal:")) != NULL) {
++ /* The "Mem:" line has been removed in Linux 2.6 */
++ ptr += 9;
++ return atoi(ptr) << 10; /* MemTotal is given in kiB */
++ } else {
++ return 0;
+ }
+-
+ }
+ #endif /* defined(LINUX) */
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b2f7e6e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+fix_incorrect_memory_usage.patch
+comment_strip_of_binary.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtop.git
More information about the Pkg-wmaker-commits
mailing list