diff -Nru htop-3.0.5/debian/changelog htop-3.0.5/debian/changelog --- htop-3.0.5/debian/changelog 2021-03-01 10:00:00.000000000 +0200 +++ htop-3.0.5/debian/changelog 2021-05-02 12:58:30.000000000 +0200 @@ -1,3 +1,10 @@ +htop (3.0.5-7) unstable; urgency=medium + + * Fix division by 0 on ZfsCompressedArcMeter (when no ZFS volume is mounted) + * Update watch file to match Github URL schema change + + -- Daniel Lange Sun, 02 May 2021 13:00:00 +0200 + htop (3.0.5-6) unstable; urgency=medium * Fix cleaning the infoscreen before a next scan diff -Nru htop-3.0.5/debian/patches/0016-fix-div-by-zero-zfscompressedarcmeter.patch htop-3.0.5/debian/patches/0016-fix-div-by-zero-zfscompressedarcmeter.patch --- htop-3.0.5/debian/patches/0016-fix-div-by-zero-zfscompressedarcmeter.patch 1970-01-01 02:00:00.000000000 +0200 +++ htop-3.0.5/debian/patches/0016-fix-div-by-zero-zfscompressedarcmeter.patch 2021-04-23 09:08:36.000000000 +0200 @@ -0,0 +1,25 @@ +From 099dab88be5a7a1c9207e7bc7116618b7108f851 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= +Date: Thu, 22 Apr 2021 17:12:02 +0200 +Subject: [PATCH] ZfsCompressedArcMeter: avoid division by 0 + +On systems not using ZFS `this->values[0]` is zero. +--- + zfs/ZfsCompressedArcMeter.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/zfs/ZfsCompressedArcMeter.c ++++ b/zfs/ZfsCompressedArcMeter.c +@@ -33,7 +33,11 @@ + } + + static void ZfsCompressedArcMeter_printRatioString(const Meter* this, char* buffer, size_t size) { +- xSnprintf(buffer, size, "%.2f:1", this->total / this->values[0]); ++ if (this->values[0] > 0) { ++ xSnprintf(buffer, size, "%.2f:1", this->total / this->values[0]); ++ } else { ++ xSnprintf(buffer, size, "N/A"); ++ } + } + + static void ZfsCompressedArcMeter_updateValues(Meter* this, char* buffer, size_t size) { diff -Nru htop-3.0.5/debian/patches/series htop-3.0.5/debian/patches/series --- htop-3.0.5/debian/patches/series 2021-02-21 20:16:16.000000000 +0200 +++ htop-3.0.5/debian/patches/series 2021-04-23 09:05:21.000000000 +0200 @@ -13,3 +13,4 @@ 0013-fix-btime-zero.patch 0014-fix-zfs-coloring.patch 0015-clean-infoscreen-before-new-scan.patch +0016-fix-div-by-zero-zfscompressedarcmeter.patch diff -Nru htop-3.0.5/debian/watch htop-3.0.5/debian/watch --- htop-3.0.5/debian/watch 2020-12-07 11:21:13.000000000 +0200 +++ htop-3.0.5/debian/watch 2021-04-24 18:54:32.000000000 +0200 @@ -1,3 +1,3 @@ version=4 opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/htop-$1\.tar\.gz/ \ - https://github.com/htop-dev/htop/tags .*/archive/(\d{1,2}\.\d.\d)\.tar\.gz + https://github.com/htop-dev/htop/tags .*/(\d{1,2}\.\d.\d)\.tar\.gz