pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/htop sysutils/htop: Updates to 3.1.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7e66db98bb4b
branches:  trunk
changeset: 459030:7e66db98bb4b
user:      fox <fox%pkgsrc.org@localhost>
date:      Tue Sep 28 17:57:38 2021 +0000

description:
sysutils/htop: Updates to 3.1.0

- Removes the linux patches, since htop has native NetBSD support.

Changes since 3.0.5:

What's new in version 3.1.0

* Updated COPYING file to remove the PLPA exemption (appendix 2)
  With this change the license is now GPLv2 without any additional wording.
* Improved default sort ordering
  Note for users: This may lead to an inverted sort order on startup of
  htop 3.1.0 compared to previous versions.
  This is due to what is stored in your htoprc file. Solution: Press I
  (to invert sort order).
  This changed setting will be saved by htop on exit as long as it can
  write to your htoprc file.
* The compile-time option to cater specifically for running htop as
  setuid has been removed
* Add read-only option
  This allows htop to be run in an non-intrusive fashion where it acts only
  as a process viewer disabling all functions to manipulate system state.
  Note: This is not a security feature!
* Move the code for handling the command line formatting related tasks
  to be shared across all platforms
  This means important features like stale binary/library highlighting
  can now be available on all supported platforms.
* Make the EXE and COMM columns available on all platforms
  All supported platforms have the name of the executable (EXE) and a
  self-chosen thread/command name (COMM) available one way or the other.
  Moving this column to be handled as a platform-independently available
  information simplifies the markup of the command line.
* Introduce configuration file versioning and config_reader_min_version
  Starting with this version the configuration file contains a version
  identifying the minimum version of the configuration parser needed to
  fully understand the configuration file format.
  Old configuration file formats are automatically upgraded when
  saving the config file (htoprc).
* Make the configuration parser friendlier to users (thanks to Bart Bakker)
  With this change only settings that cannot be parsed properly are
  reset to their defaults.
* Improve default display for systems with many CPUs
* Add the process ELAPSED time column
* Improve the process STATE column sorting
* Reworked handling resize and redrawing of the UI
* Fixed an issue where the LED meter mode could overflow allotted space
* Allow text mode Meters to span empty neighbors to the right
* Rescale graph meters when value of total changes
  (thanks to Michael Schönitzer)
* Update generic process field display
  Usually "uninteresting" values in columns like 1 thread, nice value
  of 0, CPU and memory of 0%, idle/sleeping state, etc. are shown with
  reduced intensity (dark grey)
* Option and key ("*") to collapse / expand all branches under PID 1
  (and PID 2 if kernel threads are shown) (thanks to Krishna Chaitanya)
* Keep following a process when inverting the sort order, displaying
  the help screen or hiding/unhiding userland threads.
  If a thread is currently selected the selection is updated to point
  to the thread's parent process. (thanks to Gonzalo, et.al.)
* Reorder process scanning to be performed before updating the display
  of the meters in the header
* Always check the user for a process for any changes.
  This affects multiple platforms that previously didn't correctly handle
  the user field for a process to change at runtime (e.g. due to seteuid
  or similar syscalls).
* Disable mouse option when support is unavailable
* Support curses libraries without ncurses mouse support
  (thanks to Santhosh Raju)
* Support offline and hot-swapping of CPUs on all platforms
* Fix the CPU Meter for machines with more than 256 CPUs
* Supplemented the "show updated/deleted executables" feature (red basename)
  to indicate when linked libraries were updated (yellow basename)
* Apply the stale binary highlighting for the EXE column in addition to
  the command line field
* Add new combined Memory and Swap meter
* Implement bar and graph mode for NetworkIO Meter
  (thanks to Michael F. Schönitzer)
* Rework TTY column to be more consistent across platforms
* Make the CWD column generally available on all platforms
  (thanks to Santhosh Raju et. al.)
* Add Performance Co-Pilot (PCP) platform support
  This is added via a separate pcp-htop(1) binary which provides remote host
  analysis, new Meters for any PCP metric and new Columns for any PCP process
  metric - see the pcp-htop(5) man page for further details.
  (thanks to Sohaib Mohamed)
* Add Linux columns and key bindings for process autogroup identifier
  and nice value
* Change available and used memory reporting on Linux to be based on
  MemAvailable (Kernel 3.14+) (thanks to Chris Cheney and Tomas Wido)
* Add a new SysArchMeter showing kernel and platform information
  (thanks to ahgamut)
* Linux memory usage explicitly treats tmpfs memory usage as shared memory
  This is to make memory used by tmpfs visible as this cannot be freed
  unlike normal filesystem cache data.
* Exclude zram devices when calculating DiskIO on Linux
* Use PATH lookup for systemctl in systemd meter (thanks to Scott Olson)
* Add native platform support for NetBSD
  This allows htop to run on NetBSD without the need for active Linux
  emulation of the procfs filesystem.
  (thanks to Santhosh Raju and Nia Alarie)
* Add NetworkIO, DiskIO, CPU frequency, and battery meter support on NetBSD
  (thanks to Nia Alarie)
* Fix NetBSD display of in-use and cached memory (thanks to Nia Alarie)
* Rework NetBSD CPU and memory accounting (thanks to Santhosh Raju)
* Fix NetBSD accounting of user and kernel threads (thanks to Santhosh Raju)
* Initial work to allow building with default libcurses on NetBSD
  (thanks to Santhosh Raju)
* FreeBSD updates - implement process majflt and processor column values
* Add FreeBSD support for CPU frequency and temperature
* Fixes and cleanups for ZFS Meters and metrics
* Correctly color the ZFS ARC ratio (thanks to Ross Williams)
* Bugfixes related to CPU time display/calculations for darwin on M1 systems
  (thanks to Alexander Momchilov)
* Harmonize the handling of multiple batteries across different platforms.
  The system is now considered to run on AC if at least one power supply
  marked as AC is found in the system.
  Battery capacity is summed up over all batteries found.
  This also changes the old behavior that batteries reported by the
  system after the first AC adapter where sometimes ignored.
* Correctly handle multiple batteries on Darwin.
  Resolves a possible memory leak on systems with multiple batteries.
* Handle Linux Shmem being part of Cached in the MemoryMeter
* Add SwapCached to the Linux swap meter (thanks to David Zarzycki)
* Convert process time to days if applicable (thanks to David Zarzycki)
* Always show the number of threads in the TaskMeter, even when threads
  are not shown in the process list
* Fix Linux --drop-capabilities option handling
* Correctly detect failure to initialize Linux boottime
* Overhaul the Linux memory fields to partition them like free(1) now does
* Improve the Linux process I/O column values
* Rework the libsensors parsing on Linux
* Update the MemoryMeter to display shared memory
* Update OpenBSD platform - implement additional columns, scan LWP,
  proper markup for STATE, show CPU frequency
* Fix the tree view on OpenBSD when hiding kernel threads
* Remove old InfoScreen lines before re-scanning (thanks to Øystein Hiåsen)
* Document historic naming of Light-Weight Processes column aka threads
* Improve user interaction when the last process entry is selected
* Draw the panel header on the TraceScreen (thanks to Youngjae Lee)
* Add mouse wheel scroll and fix mouse selection on the InfoScreen
  (thanks to Youngjae Lee)
* Add a HugepageMeter and subtract hugepages from normal memory
* Display wide characters in LED meters and restore non-wide ncurses support
* Add command line option to drop Linux capabilities
* Support scheduler affinity on platforms beyond Linux
* Report on any failure to write the configuration file
* Cache stderr to be able to print assert messages.
  These messages are shown in case htop terminates unexpectedly.
* Print current settings on crash
* Reset signal handlers on program exit
* Add configure script option to create a static htop binary
* Resolved longer-standing compilation issues on Solaris/Illumos
* Check for availability of set_escdelay in configure
  (thanks to Stefan Polluks)
* Build system updates for autotools 2.70

diffstat:

 sysutils/htop/Makefile                           |  16 ++++---
 sysutils/htop/distinfo                           |  15 +++----
 sysutils/htop/patches/patch-MainPanel.c          |  25 +++++++++++++
 sysutils/htop/patches/patch-configure.ac         |  15 --------
 sysutils/htop/patches/patch-linux_LinuxProcess.c |  14 -------
 sysutils/htop/patches/patch-linux_Platform.c     |  18 ---------
 sysutils/htop/patches/patch-linux_SELinuxMeter.c |  45 ------------------------
 7 files changed, 40 insertions(+), 108 deletions(-)

diffs (194 lines):

diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/Makefile
--- a/sysutils/htop/Makefile    Tue Sep 28 16:22:46 2021 +0000
+++ b/sysutils/htop/Makefile    Tue Sep 28 17:57:38 2021 +0000
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.21 2021/03/15 22:23:58 fox Exp $
+# $NetBSD: Makefile,v 1.22 2021/09/28 17:57:38 fox Exp $
 
-DISTNAME=      htop-3.0.5
+DISTNAME=      htop-3.1.0
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=htop-dev/}
-GITHUB_TAG=    3.0.5
-EXTRACT_USING= bsdtar
+GITHUB_TAG=    3.1.0
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://htop.dev/
@@ -16,13 +15,16 @@
 USE_TOOLS+=    autoreconf automake
 USE_NCURSES=   yes # uses ncurses mouse definitions
 
-CONFIGURE_ENV+=        ac_cv_file__proc_meminfo=yes
-CONFIGURE_ENV+=        ac_cv_file__proc_stat=yes
+.include "../../mk/curses.buildlink3.mk"
+
+.if ${CURSES_TYPE} != "ncursesw"
+# See netbsd/README.md
+CONFIGURE_ARGS+=       --disable-unicode
+.endif
 
 pre-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./autogen.sh
 
-.include "../../devel/ncursesw/buildlink3.mk"
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/distinfo
--- a/sysutils/htop/distinfo    Tue Sep 28 16:22:46 2021 +0000
+++ b/sysutils/htop/distinfo    Tue Sep 28 17:57:38 2021 +0000
@@ -1,10 +1,7 @@
-$NetBSD: distinfo,v 1.13 2021/03/15 22:23:58 fox Exp $
+$NetBSD: distinfo,v 1.14 2021/09/28 17:57:38 fox Exp $
 
-SHA1 (htop-3.0.5.tar.gz) = de974e38e2c8d5900a4ab363111cb0544d391547
-RMD160 (htop-3.0.5.tar.gz) = 0963f4f94abaae2b2fa949c6a84b872415321421
-SHA512 (htop-3.0.5.tar.gz) = 7dae83ceff6b3f30e69c30c9559dbb3bf69281df006c6a26e4e2c49dd5a147e05ed7bafeeac8ec5bedc8ba670470100cc128209a92654858f98df09a9394594f
-Size (htop-3.0.5.tar.gz) = 297931 bytes
-SHA1 (patch-configure.ac) = c85ea20944869c910f65893f909729dfd4d7cf7f
-SHA1 (patch-linux_LinuxProcess.c) = 8fcf67c3f8b9ae05f61b5cac8a7dac103610fc5b
-SHA1 (patch-linux_Platform.c) = d37f4f5116023fa8d8f58f6b925e4f86e9748cea
-SHA1 (patch-linux_SELinuxMeter.c) = d5b479565f816e68e2d58ef535a3009f7da5262c
+SHA1 (htop-3.1.0.tar.gz) = f8cf08d61a707a961b0cbb0c98bd4352d5c88de7
+RMD160 (htop-3.1.0.tar.gz) = eb64c52e19df747bfe5b03ebc607b950e5084bf3
+SHA512 (htop-3.1.0.tar.gz) = bb4422591a61978d1cc5b423413820c14cc571c4660087387949f1071609da38e42be2be8485863cb19b0b957d1fdeb5b2df46212d9ddd3891871b1c9d276c6e
+Size (htop-3.1.0.tar.gz) = 378838 bytes
+SHA1 (patch-MainPanel.c) = da63da783a1df784ec31ac4cbdacb0fbbfeb9ef6
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/patches/patch-MainPanel.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/htop/patches/patch-MainPanel.c   Tue Sep 28 17:57:38 2021 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-MainPanel.c,v 1.1 2021/09/28 17:57:39 fox Exp $
+
+Check for mouse events only if HAVE_GETMOUSE is defined.
+
+NOTE: This has been fixed upstream and the patch will be removed in the next release.
+https://github.com/htop-dev/htop/pull/820
+
+--- MainPanel.c.orig   2021-09-28 02:18:18.760961460 +0000
++++ MainPanel.c
+@@ -61,9 +61,15 @@ static HandlerResult MainPanel_eventHand
+    if (ch == KEY_RESIZE)
+       return IGNORED;
+ 
++   #ifdef HAVE_GETMOUSE
+    /* reset on every normal key, except mouse events while mouse support is disabled */
+    if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
+       this->state->hideProcessSelection = false;
++   #else
++   /* reset on every normal key */
++   if (ch != ERR)
++      this->state->hideProcessSelection = false;
++   #endif
+ 
+    if (EVENT_IS_HEADER_CLICK(ch)) {
+       int x = EVENT_HEADER_CLICK_GET_X(ch);
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/patches/patch-configure.ac
--- a/sysutils/htop/patches/patch-configure.ac  Tue Sep 28 16:22:46 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-configure.ac,v 1.7 2021/03/15 22:23:59 fox Exp $
-
-Pretend NetBSD is Linux.
-
---- configure.ac.orig  2021-03-15 09:16:35.302343088 +0000
-+++ configure.ac
-@@ -24,7 +24,7 @@ AC_USE_SYSTEM_EXTENSIONS
- # Checks for platform.
- # ----------------------------------------------------------------------
- case "$target_os" in
--linux*|gnu*)
-+linux*|gnu*|netbsd*)
-    my_htop_platform=linux
-    AC_DEFINE([HTOP_LINUX], [], [Building for Linux])
-    ;;
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/patches/patch-linux_LinuxProcess.c
--- a/sysutils/htop/patches/patch-linux_LinuxProcess.c  Tue Sep 28 16:22:46 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-$NetBSD: patch-linux_LinuxProcess.c,v 1.1 2021/03/15 22:23:59 fox Exp $
-
-Remove Linux only headers.
-
---- linux/LinuxProcess.c.orig  2021-03-15 09:16:51.679521216 +0000
-+++ linux/LinuxProcess.c
-@@ -12,7 +12,6 @@ in the source distribution for its full 
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <syscall.h>
- #include <unistd.h>
- 
- #include "CRT.h"
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/patches/patch-linux_Platform.c
--- a/sysutils/htop/patches/patch-linux_Platform.c      Tue Sep 28 16:22:46 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-$NetBSD: patch-linux_Platform.c,v 1.1 2017/11/24 02:06:13 maya Exp $
-
-Workaround differences in counting memory netbsd vs. linux.
-PR 52669 - a bogus value is displayed for used memory because this
-quantity becomes negative.
-
---- linux/Platform.c.orig      2016-02-02 14:58:45.000000000 +0000
-+++ linux/Platform.c
-@@ -200,7 +200,9 @@ void Platform_setMemoryValues(Meter* thi
-    long int usedMem = pl->usedMem;
-    long int buffersMem = pl->buffersMem;
-    long int cachedMem = pl->cachedMem;
-+#ifndef __NetBSD__
-    usedMem -= buffersMem + cachedMem;
-+#endif
-    this->total = pl->totalMem;
-    this->values[0] = usedMem;
-    this->values[1] = buffersMem;
diff -r f78759612388 -r 7e66db98bb4b sysutils/htop/patches/patch-linux_SELinuxMeter.c
--- a/sysutils/htop/patches/patch-linux_SELinuxMeter.c  Tue Sep 28 16:22:46 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-$NetBSD: patch-linux_SELinuxMeter.c,v 1.1 2021/03/15 22:23:59 fox Exp $
-
-Disable SELinux stuff in NetBSD.
-
---- linux/SELinuxMeter.c.orig  2021-03-15 09:17:05.893787771 +0000
-+++ linux/SELinuxMeter.c
-@@ -12,8 +12,6 @@ in the source distribution for its full 
- #include <stdbool.h>
- #include <stdio.h>
- #include <unistd.h>
--#include <linux/magic.h>
--#include <sys/statfs.h>
- #include <sys/statvfs.h>
- 
- #include "Macros.h"
-@@ -29,27 +27,11 @@ static bool enabled = false;
- static bool enforcing = false;
- 
- static bool hasSELinuxMount(void) {
--   struct statfs sfbuf;
--   int r = statfs("/sys/fs/selinux", &sfbuf);
--   if (r != 0) {
--      return false;
--   }
--
--   if ((uint32_t)sfbuf.f_type != (uint32_t)SELINUX_MAGIC) {
--      return false;
--   }
--
--   struct statvfs vfsbuf;
--   r = statvfs("/sys/fs/selinux", &vfsbuf);
--   if (r != 0 || (vfsbuf.f_flag & ST_RDONLY)) {
--      return false;
--   }
--
--   return true;
-+   return false;
- }
- 
- static bool isSelinuxEnabled(void) {
--   return hasSELinuxMount() && (0 == access("/etc/selinux/config", F_OK));
-+   return false;
- }
- 
- static bool isSelinuxEnforcing(void) {



Home | Main Index | Thread Index | Old Index