aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-02-15 11:07:27 +0100
committerDaniel Lange <DLange@git.local>2021-02-15 11:09:35 +0100
commita0746c81eb538ba011cdfcca1a535e2bd41dc044 (patch)
treeb664ccca444b578c17d643da9417c4cfe2ecf2ab
parent3e4e13c5845b7e145c4c74d72e4c010ddb0620cd (diff)
downloaddebian_htop-a0746c81eb538ba011cdfcca1a535e2bd41dc044.tar.gz
debian_htop-a0746c81eb538ba011cdfcca1a535e2bd41dc044.tar.bz2
debian_htop-a0746c81eb538ba011cdfcca1a535e2bd41dc044.zip
Add patches for btime=0 on embedded systems and ZFS meter coloringdebian/3.0.5-5
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/0013-fix-btime-zero.patch33
-rw-r--r--debian/patches/0014-fix-zfs-coloring.patch37
-rw-r--r--debian/patches/series2
4 files changed, 76 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 3c6538a..d5c21ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-htop (3.0.5-5) UNRELEASED; urgency=medium
+htop (3.0.5-5) unstable; urgency=medium
* Fix forced sort order when switching to tree mode
+ * Allow btime=0 on some embedded systems (i.e. no RTC)
+ * Fix ZFS coloring to match other meters
- -- Daniel Lange <DLange@debian.org> Tue, 09 Feb 2021 09:10:36 +0100
+ -- Daniel Lange <DLange@debian.org> Mon, 15 Feb 2021 11:11:11 +0100
htop (3.0.5-4) unstable; urgency=medium
diff --git a/debian/patches/0013-fix-btime-zero.patch b/debian/patches/0013-fix-btime-zero.patch
new file mode 100644
index 0000000..451a058
--- /dev/null
+++ b/debian/patches/0013-fix-btime-zero.patch
@@ -0,0 +1,33 @@
+From 7433bf4b18278080fb2ac22c5828490883066570 Mon Sep 17 00:00:00 2001
+From: Nathan Scott <nathans@redhat.com>
+Date: Mon, 15 Feb 2021 19:32:55 +1100
+Subject: [PATCH] Correctly detect failure to initialize boottime
+
+A zero value for btime (boottime) in /proc/stat is a
+real situation that happens, so deal with this case.
+
+Resolves https://github.com/htop-dev/htop/issues/527
+---
+ linux/LinuxProcessList.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/linux/LinuxProcessList.c
++++ b/linux/LinuxProcessList.c
+@@ -64,7 +64,7 @@
+ # define O_PATH 010000000
+ #endif
+
+-static long long btime;
++static long long btime = -1;
+
+ static long jiffy;
+
+@@ -240,7 +240,7 @@
+ }
+ fclose(statfile);
+
+- if (!btime)
++ if (btime == -1)
+ CRT_fatalError("No btime in " PROCSTATFILE);
+ }
+
diff --git a/debian/patches/0014-fix-zfs-coloring.patch b/debian/patches/0014-fix-zfs-coloring.patch
new file mode 100644
index 0000000..df913c9
--- /dev/null
+++ b/debian/patches/0014-fix-zfs-coloring.patch
@@ -0,0 +1,37 @@
+Author: Daniel Lange <DLange@git.local>
+Date: Tue Feb 9 20:25:57 2021 +0100
+
+ Make ZFS Meter "Unavailable" text match others -> FAILED_READ coloring
+
+Author: Ross Williams <ross@ross-williams.net>
+Date: Tue Feb 9 16:59:03 2021 +0000
+
+ [..] correctly color ZFS ARC ratio
+
+--- a/zfs/ZfsArcMeter.c
++++ b/zfs/ZfsArcMeter.c
+@@ -72,7 +72,7 @@
+ RichString_appendAscii(out, CRT_colors[ZFS_OTHER], buffer);
+ } else {
+ RichString_writeAscii(out, CRT_colors[METER_TEXT], " ");
+- RichString_appendAscii(out, CRT_colors[FAILED_SEARCH], "Unavailable");
++ RichString_appendAscii(out, CRT_colors[FAILED_READ], "Unavailable");
+ }
+ }
+
+--- a/zfs/ZfsCompressedArcMeter.c
++++ b/zfs/ZfsCompressedArcMeter.c
+@@ -54,11 +54,11 @@
+ RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer);
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " Compressed, ");
+ ZfsCompressedArcMeter_printRatioString(this, buffer, sizeof(buffer));
+- RichString_appendAscii(out, CRT_colors[METER_VALUE], buffer);
++ RichString_appendAscii(out, CRT_colors[ZFS_RATIO], buffer);
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " Ratio");
+ } else {
+ RichString_writeAscii(out, CRT_colors[METER_TEXT], " ");
+- RichString_appendAscii(out, CRT_colors[FAILED_SEARCH], "Compression Unavailable");
++ RichString_appendAscii(out, CRT_colors[FAILED_READ], "Compression Unavailable");
+ }
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index 5403fbc..b60958a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,5 @@
0010-fix-sort-timeout.patch
0011-improve-setup-for-many-cpu-systems.patch
0012-fix-forced-sort-order.patch
+0013-fix-btime-zero.patch
+0014-fix-zfs-coloring.patch

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