aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2018-04-26 18:32:53 +0200
committerDaniel Lange <DLange@git.local>2018-04-26 19:09:41 +0200
commite65f30245af3e878c81687efffa83029dbaa2a7a (patch)
treecb02a9f720763183d7582b5dd55097daffc466d5
parent3d996de8464c052383de7aab5e4836882ce8762c (diff)
downloaddebian_htop-e65f30245af3e878c81687efffa83029dbaa2a7a.tar.gz
debian_htop-e65f30245af3e878c81687efffa83029dbaa2a7a.tar.bz2
debian_htop-e65f30245af3e878c81687efffa83029dbaa2a7a.zip
Updated patches for htop 2.2.0
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/601-openvz-new-ctid-vpid.patch106
-rw-r--r--debian/patches/780-fix-option-string.patch23
-rw-r--r--debian/patches/fix-isalnum-crash.patch18
-rw-r--r--debian/patches/fix-ldflags.patch17
-rw-r--r--debian/patches/fix-linux-process.patch13
-rw-r--r--debian/patches/fix-small-terminals.patch18
-rw-r--r--debian/patches/series6
8 files changed, 43 insertions, 163 deletions
diff --git a/debian/changelog b/debian/changelog
index 0aa0e26..b188827 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ htop (2.2.0-1) UNRELEASED; urgency=medium
* New upstream release 2.2.0
* update uscan to v4 and add gpg verification of upstream tarball
+ * drop patches that were merged upstream
+ * remove OpenVZ patch that wasn't merged upstream
+ (for now, upstream issue 464)
+ * add upstream issue 780 patch
+ * fix compile issue with regenerated header files (patch)
-- Daniel Lange <DLange@debian.org> Wed, 11 Apr 2018 01:46:14 +0200
diff --git a/debian/patches/601-openvz-new-ctid-vpid.patch b/debian/patches/601-openvz-new-ctid-vpid.patch
deleted file mode 100644
index 40ffbd2..0000000
--- a/debian/patches/601-openvz-new-ctid-vpid.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-This replaces the old 600-openvz-veid-on-kernels-gt-2.6.18.patch
-Source: https://patch-diff.githubusercontent.com/raw/hishamhm/htop/pull/464.patch
-From: Alexander Pisarev <apisarev@virtuozzo.com>
-Date: Wed, 6 Apr 2016 14:47:28 +0300
-Subject: [PATCH] Add support of UUID CTID used in the new version of OpenVZ
-
-In the new version of OpenVZ (Virtuozzo 7), containers could be identified by UUIDs and integer numbers like before (so called legacy CTID). Existing support of OpenVZ can't work with UUIDs. This patch fix it.
-
-CTIDs and VPIDs are now read from /proc/[id]/status instead of /proc/[id]/stat because of the following reasons:
-* the /proc/[id]/status has named fields and OpenVZ kernel writes either CTID or UUID to envID field (depending on which type is used);
-* OpenVZ kernel appends own data to /proc/[id]/stat file, a change in parameters reported by vanilla kernel would also shift the position of OpenVZ data so it would not be read correctly.
-
-As UUIDs are much longer than old numerical CTIDs, the UUID strings will get truncated in output (although sorting is still done using complete UUIDs).
-
---- a/linux/LinuxProcess.c
-+++ b/linux/LinuxProcess.c
-@@ -119,7 +119,7 @@
- double io_rate_write_bps;
- #endif
- #ifdef HAVE_OPENVZ
-- unsigned int ctid;
-+ char* ctid;
- unsigned int vpid;
- #endif
- #ifdef HAVE_VSERVER
-@@ -271,6 +271,9 @@
- void Process_delete(Object* cast) {
- LinuxProcess* this = (LinuxProcess*) cast;
- Process_done((Process*)cast);
-+#ifdef HAVE_OPENVZ
-+ free(this->ctid);
-+#endif
- #ifdef HAVE_CGROUP
- free(this->cgroup);
- #endif
-@@ -361,7 +364,7 @@
- }
- #endif
- #ifdef HAVE_OPENVZ
-- case CTID: xSnprintf(buffer, n, "%7u ", lp->ctid); break;
-+ case CTID: xSnprintf(buffer, n, "%8.8s ", lp->ctid); break;
- case VPID: xSnprintf(buffer, n, Process_pidFormat, lp->vpid); break;
- #endif
- #ifdef HAVE_VSERVER
-@@ -441,7 +444,7 @@
- #endif
- #ifdef HAVE_OPENVZ
- case CTID:
-- return (p2->ctid - p1->ctid);
-+ return strcmp(p1->ctid ?: "", p2->ctid ?: "");
- case VPID:
- return (p2->vpid - p1->vpid);
- #endif
---- a/linux/LinuxProcessList.c
-+++ b/linux/LinuxProcessList.c
-@@ -480,27 +480,35 @@
- #ifdef HAVE_OPENVZ
-
- static void LinuxProcessList_readOpenVZData(LinuxProcess* process, const char* dirname, const char* name) {
-- if ( (access("/proc/vz", R_OK) != 0)) {
-- process->vpid = process->super.pid;
-- process->ctid = 0;
-+ process->vpid = process->super.pid;
-+ free(process->ctid);
-+ process->ctid = xStrdup("0");
-+ if ( (access("/proc/vz", R_OK) != 0))
- return;
-- }
- char filename[MAX_NAME+1];
-- xSnprintf(filename, MAX_NAME, "%s/%s/stat", dirname, name);
-+ xSnprintf(filename, MAX_NAME, "%s/%s/status", dirname, name);
- FILE* file = fopen(filename, "r");
- if (!file)
- return;
-- (void) fscanf(file,
-- "%*32u %*32s %*1c %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %*32u %*32u %*32u %*32u %*32u "
-- "%*32u %*32u %32u %32u",
-- &process->vpid, &process->ctid);
-+ char buffer[PROC_LINE_LENGTH + 1];
-+ while (fgets(buffer, PROC_LINE_LENGTH, file)) {
-+ if (String_startsWith(buffer, "envID:")) {
-+ char ctid[PROC_LINE_LENGTH + 1];
-+ int ok = sscanf(buffer, "envID:\t%36s", ctid);
-+ if (ok == 1) {
-+ free(process->ctid);
-+ process->ctid = xStrdup(ctid);
-+ }
-+ }
-+ else if (String_startsWith(buffer, "VPid:")) {
-+ unsigned int vpid;
-+ int ok = sscanf(buffer, "VPid:\t%32u", &vpid);
-+ if (ok == 1) {
-+ process->vpid = vpid;
-+ }
-+ }
-+ }
- fclose(file);
-- return;
- }
-
- #endif
diff --git a/debian/patches/780-fix-option-string.patch b/debian/patches/780-fix-option-string.patch
new file mode 100644
index 0000000..a827389
--- /dev/null
+++ b/debian/patches/780-fix-option-string.patch
@@ -0,0 +1,23 @@
+From 731acc8bced18c90fbe0e18381c32f007f71e0d9 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Tue, 10 Apr 2018 16:21:46 +0200
+Subject: [PATCH] fix option string
+
+This broke with commit db05ba61065f64b59d0014518be0786b5439e54c.
+---
+ htop.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/htop.c b/htop.c
+index 6db81dd7..678a3b8a 100644
+--- a/htop.c
++++ b/htop.c
+@@ -93,7 +93,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
+
+ int opt, opti=0;
+ /* Parse arguments */
+- while ((opt = getopt_long(argc, argv, "hvCst::d:u:p:i", long_opts, &opti))) {
++ while ((opt = getopt_long(argc, argv, "hvCs:td:u:p:i", long_opts, &opti))) {
+ if (opt == EOF) break;
+ switch (opt) {
+ case 'h':
diff --git a/debian/patches/fix-isalnum-crash.patch b/debian/patches/fix-isalnum-crash.patch
deleted file mode 100644
index c74cab7..0000000
--- a/debian/patches/fix-isalnum-crash.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Handle unexpected values for character passed to isalnum
-Bug: https://github.com/hishamhm/htop/issues/711
-Origin: upstream,https://github.com/hishamhm/htop/commit/03f17688ada3800bdd344ec4397f81289977b153
-Author: Hisham Muhammad <hisham@gobolinux.org>
-Last-Update: 2018-02-05
-
---- a/Panel.c
-+++ b/Panel.c
-@@ -469,7 +469,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
- this->eventHandlerState = xCalloc(100, sizeof(char));
- char* buffer = this->eventHandlerState;
-
-- if (ch < 255 && isalnum(ch)) {
-+ if (ch > 0 && ch < 255 && isalnum(ch)) {
- int len = strlen(buffer);
- if (len < 99) {
- buffer[len] = ch;
-
diff --git a/debian/patches/fix-ldflags.patch b/debian/patches/fix-ldflags.patch
deleted file mode 100644
index 5e27815..0000000
--- a/debian/patches/fix-ldflags.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Fix preservation of LDFLAGS value during configure script
-Bug: https://github.com/hishamhm/htop/issues/738
-Origin: upstream,https://github.com/hishamhm/htop/commit/df9922a67eb8e02ab4cf1ff8f24b40f14094e699
-Author: Hisham Muhammad <hisham@gobolinux.org>
-Last-Update: 2018-02-17
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -167,7 +167,7 @@
- LIBS="$htop_config_script $LIBS "
- htop_script_success=yes
- ], [])
-- LDFLAGS="$save_LDFLAGS"
-+ LDFLAGS="$htop_save_LDFLAGS"
- fi
- if test "x$htop_script_success" = xno; then
- [$5]
diff --git a/debian/patches/fix-linux-process.patch b/debian/patches/fix-linux-process.patch
new file mode 100644
index 0000000..3caef04
--- /dev/null
+++ b/debian/patches/fix-linux-process.patch
@@ -0,0 +1,13 @@
+Make sure the auto-regenerated headers (after scripts/MakeHeader.py) actually compile.
+
+--- a/linux/LinuxProcess.c 2018-04-26 18:17:31.349248819 +0200
++++ b/linux/LinuxProcess.c 2018-04-11 02:58:46.994360617 +0200
+@@ -143,7 +143,7 @@
+ } LinuxProcess;
+
+ #ifndef Process_isKernelThread
+-#define Process_isKernelThread(_process) ((LinuxProcess*)(_process)->isKernelThread)
++#define Process_isKernelThread(_process) (((LinuxProcess*)(_process))->isKernelThread)
+ #endif
+
+ #ifndef Process_isUserlandThread
diff --git a/debian/patches/fix-small-terminals.patch b/debian/patches/fix-small-terminals.patch
deleted file mode 100644
index 4f03732..0000000
--- a/debian/patches/fix-small-terminals.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Fix issue with small terminals
-Bug: https://github.com/hishamhm/htop/issues/733
-Bug-Debian: https://bugs.debian.org/889693
-Origin: upstream,https://github.com/hishamhm/htop/commit/b544c22c72613d561180738d8c31c97712b3c0ef
-Author: Hisham Muhammad <hisham@gobolinux.org>
-Last-Update: 2018-02-13
-
---- a/Meter.c
-+++ b/Meter.c
-@@ -287,7 +287,7 @@
-
- int blockSizes[10];
-
-- xSnprintf(bar, w + 1, "%*s", w, buffer);
-+ xSnprintf(bar, w + 1, "%*.*s", w, w, buffer);
-
- // First draw in the bar[] buffer...
- int offset = 0;
diff --git a/debian/patches/series b/debian/patches/series
index a9f7fd9..0f31862 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
-601-openvz-new-ctid-vpid.patch
-fix-small-terminals.patch
-fix-ldflags.patch
-fix-isalnum-crash.patch
+780-fix-option-string.patch
+fix-linux-process.patch

© 2014-2024 Faster IT GmbH | imprint | privacy policy