Mon Mar 15 22:23:59 2021 UTC ()
sysutils/htop: Updates to 3.0.5

- Updates the MASTER_SITES to point to the new repository.
- Updates the HOMEPAGE.

Changes since 2.2.0:

What's new in version 3.0.5

* BUGFIX / SECURITY: InfoScreen: fix uncontrolled format string
* BUGFIX: Improve white text in the Light Terminal colour scheme
  (both of the above thanks to V)
* Enable the function bar on the main screen to be hidden (see Setup -> Display options)
* BUGFIX: Reduce layout issues esp. around printing wide characters (not complete yet)
* BUGFIX: Make the follow function exit cleanly after followed process died
* Solaris: make Process callbacks static
* Update help and man page for improved -t / -s options
* Drop usage of formatted error messages from <err.h>
* Show arrow indicating order of sorted process column
* Lots of plumbing around the internal Hashtable, hardening and code cleanups
* LibSensors: add support for Ryzen CPUs
  (thanks to Matej Dian)
* BUGFIX: Fix CPU percentage on M1 silicon Macs
  (thanks to Luke Groeninger)
* LoadMeter: dynamically adjust color and total of bar
* Find libsensors.so.4 for Fedora and friends
* Add support to display CPU frequencies on Solarish platforms
  (thanks to Dominik Hassler)
* Enable going back to previous search matches (Shift-F3)
* Added keybind 'N' for sorting by PID (drops 'n'/'N' as not used before much)
  (thanks to Jake Mannens)

What's new in version 3.0.4

* Separate tree and list sort orders
* Invert Process_compare so that superclass matches run first
  (thanks to Hisham Muhammad)
* Unhardcode Mac OS tick-to-milliseconds conversion
  (thanks to Alexander Momchilov)
* Check if clock_gettime needs linking of librt
* Define O_PATH if not already defined
  (thanks to Chris Burr)
* Add column on Mac for processes running under translation
  (thanks to D叩niel Bakai)
* Configure check for additional linker flags for keypad(3)
* PSI Meter: constant width and only print ten-duration as bar
* Sort in paused mode after inverting sort order
* Handle absence of package CPU temperature
* Meter: restore non-wide-character build
* LibSensors: restore temperature for Raspberry Pi
* MainPanel: do not reset hideProcessSelection on KEY_SHUFFLE
* BarMeter: rework text padding
* Panel: rework drawing of FunctionBar
* Meter: fix artifacts with very tiny width
* DragonFlyBSD updates
* BUGFIX: Fix dlopen issue for libsensors5 for some platforms
* BUGFIX: Fix broken tree display on inverted sort order
* BUGFIX: Fix pause mode ("Z") in tree view
* BUGFIX: Correct timebase for non-x86 CPUs on Darwin
* BUGFIX: Avoid NULL dereference on zombie processes
* Document dynamic bindings and assumed external configuration
* Update key mapping documentation for sorting

What's new in version 3.0.3

* Process sorting in 'tree' mode
  (thanks to Maxim Zhiburt)
* Improved command display/sort functionality
  (thanks to Narendran Gopalakrishnan)
* Add screen for active file locks
  (thanks to Fynn J. Wulf)
* Calculate library size (M_LRS column) from maps file
  (thanks to Fynn J. Wulf)
* Add a Zram meter
  (thanks to Murloc Knight)
* Add Linux cwd process column
* Dynamically load libsensors at runtime
* Improve PressureStall Meter display strings
* Hide process selection on ESC
* Fully support non-ascii characters in Meter-Bar
* Add support to change numeric options in settings screen
* Rename virtual memory column from M_SIZE to M_VIRT
* Add process column for normalized CPU usage
* Show CPU temperature in CPU meter
* Drop hideThreads Setting
* Add a systemd meter
* Add a network IO meter
* Add a SELinux meter
* Compress size of default FunctionBar
* Updates to the OpenFiles screen
* Continue updating header data in paused mode
* BUGFIX: Handle data wraparounds in IO meters
* BUGFIX: Update InfoScreen content on resize
* Add security attribute process column
* Add DiskIOMeter for IO read/write usage
* Read CPU frequency from sysfs by default
* Add Linux process column for context switches
* Several FreeBSD and Mac OS X platform updates
  (thanks to Christian G旦ttsche)
* Add process environment for FreeBSD
  (thanks to Ross Williams)
* Parse POWER_SUPPLY_CAPACITY for Linux Battery meter
  (thanks to Jan Palus)
* Add octuple-column CPU meters.
* BUGFIX: On Linux consider ZFS ARC to be cache
  (thanks to @multi)
* BUGFIX: Limit screen title length to window width
* Show selected command wrapped in a separate window
  (thanks to @ryenus)
* Allow to pass '/' for item search
* Document implicit incremental search
* Handle 'q' as quit if first character
* Avoid expensive build of process tree when not using it
* Include documentation for COMM and EXE
* Distinguish display of no permissions for reading M_LRS
* Only calculate M_LRS size every 2 seconds
* Improvements to comm / cmdline display functionality
* Merged view for COMM, EXE and cmdline
  (thanks to Narendran Gopalakrishnan and Benny Baumann)
* Consistent kernel thread display for COMM/EXE columns
* Central fault handling for all platforms
* Handle parsing envID & VPid from process status file
* Use threshold for display of guest/steal/irq meters
* Enhance highlighting of semi-large and large numbers
* Documentation on the repository style guide
  (thanks to Benny Baumann)
* Align processor identifier to the right
  (thanks to Christian Hesse)
* Document M_PSS, M_PSSWP, M_SWAP in man page
* Add Date and DateTime meters
  (thanks to Michael F. Sch旦nitzer)
* BUGFIX: Fix Solaris 11.4 due to missing ZFS ARC kstats
  (thanks to @senjan)
* Code hardening, speedups, fd and memory leak fixes
  (thanks to Christian G旦ttsche and Benny Baumann)
* Number CPUs from zero by default
  (thanks to Zev Weiss)
* Remove residual python checks during the build process
  (thanks to Stephen Gregoratto)

What's new in version 3.0.2

* BUGFIX: Drop 'vim_mode' - several issues, needs rethink
* BUGFIX: fix regression in -u optional-argument handling
* Build system rework to remove python, header generation
  (thanks to Zev Weiss and Hugo Musso Gualandi)
* BUGFIX: report nice level correctly on Solaris
  (thanks to Dominik Hassler)
* CI, code quality improvements
  (thanks to Tobias Kortkamp, Christian Hesse, Benny Baumann)

What's new in version 3.0.1

* Coverity fixes, CI improvements, documentation updates
* BUGFIX: Fix early exit with longer sysfs battery paths
* BUGFIX: Improve OOM output, fix sorting
  (thanks to Christian G旦ttsche)
* Rework check buttons and tree open/closed
  (thanks to Bert Wesarg)
* Add -U/--no-unicode option to disable unicode
  (thanks to Christian Hesse)
* Improvements to the affinity panel
  (thanks to Bert Wesarg)

What's new in version 3.0.0

* New maintainers - after a prolonged period of inactivity
  from Hisham, the creator and original maintainer, a team
  of community maintainers have volunteered to take over a
  fork at https://htop.dev and https://github.com/htop-dev
  to keep the project going.
* Support ZFS ARC statistics
  (thanks to Ross Williams)
* Support more than 2 smaller CPU meter columns
  (thanks to Christoph Budziszewski)
* Support Linux proportional set size metrics
  (thanks to @linvinus, @ntninja and @himikof)
* Support Linux pressure stall information metrics
  (thanks to Ran Benita)
* New display option to show CPU frequency in CPU meters
  (thanks to Arnav Singh)
* Update Linux sysfs battery discovery for recent kernels
  (thanks to @smattie)
* Add hardware topology information in the affinity panel
  (thanks to Bert Wesarg)
* Add timestamp reporting to the strace screen
  (thanks to Mario Harjac)
* Add simple, optional vim key mapping mode
  (thanks to Daniel Flanagan)
* Added an option to disable the mouse
  (thanks to MartinJM)
* Add Solaris11 compatibility
  (thanks to Jan Senolt)
* Without an argument -u uses $USER value automatically
  (thanks to @solanav)
* Support less(1) search navigation shortcuts
  (thanks to @syrrim)
* Update the FreeBSD maximum PID to match FreeBSD change
  (thanks to @multiplexd)
* Report values larger than 100 terabytes
  (thanks to @adrien1018)
* Widen ST_UID (UID) column to allow for UIDs > 9999
  (thanks to DLange)
* BUGFIX: fix makefiles for building with clang
  (thanks to Jorge Pereira)
* BUGFIX: fix <sys/sysmacros.h> major() usage
  (thanks to @wataash and Kang-Che Sung)
* BUGFIX: fix the STARTTIME column on FreeBSD
  (thanks to Rob Crowston)
* BUGFIX: truncate overwide jail names on FreeBSD
  (thanks to Rob Crowston)
* BUGFIX: fix reported memory values on FreeBSD
  (thanks to Tobias Kortkamp)
* BUGFIX: fix reported CPU meter values on OpenBSD
  (thanks to @motet-a)
* BUGFIX: correctly identify other types of zombie process
  (thanks to @joder)
* BUGFIX: improve follow-process handling in some situations
  (thanks to @wangqr)
* BUGFIX: fix custom meters reverting to unexpected setting
  (thanks to @wangqr)
* BUGFIX: close pipe after running lsof(1)
  (thanks to Jesin)
* BUGFIX: meters honour setting of counting CPUs from 0/1
  (thanks to @rnsanchez)


(fox)
diff -r1.20 -r1.21 pkgsrc/sysutils/htop/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/htop/PLIST
diff -r1.12 -r1.13 pkgsrc/sysutils/htop/distinfo
diff -r1.1 -r0 pkgsrc/sysutils/htop/patches/patch-configure
diff -r0 -r1.7 pkgsrc/sysutils/htop/patches/patch-configure.ac
diff -r0 -r1.1 pkgsrc/sysutils/htop/patches/patch-linux_LinuxProcess.c
diff -r0 -r1.1 pkgsrc/sysutils/htop/patches/patch-linux_SELinuxMeter.c

cvs diff -r1.20 -r1.21 pkgsrc/sysutils/htop/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/htop/Makefile 2020/12/04 20:45:41 1.20
+++ pkgsrc/sysutils/htop/Makefile 2021/03/15 22:23:58 1.21
@@ -1,24 +1,28 @@ @@ -1,24 +1,28 @@
1# $NetBSD: Makefile,v 1.20 2020/12/04 20:45:41 nia Exp $ 1# $NetBSD: Makefile,v 1.21 2021/03/15 22:23:58 fox Exp $
2 2
3DISTNAME= htop-2.2.0 3DISTNAME= htop-3.0.5
4PKGREVISION= 2 
5CATEGORIES= sysutils 4CATEGORIES= sysutils
6MASTER_SITES= http://hisham.hm/htop/releases/${PKGVERSION_NOREV}/ 5MASTER_SITES= ${MASTER_SITE_GITHUB:=htop-dev/}
 6GITHUB_TAG= 3.0.5
 7EXTRACT_USING= bsdtar
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://hisham.hm/htop/ 10HOMEPAGE= https://htop.dev/
10COMMENT= Enhanced version of top utility 11COMMENT= Enhanced version of top utility
11LICENSE= gnu-gpl-v2 12LICENSE= gnu-gpl-v2
12 13
13GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
14USE_LIBTOOL= yes 15USE_LIBTOOL= yes
 16USE_TOOLS+= autoreconf automake
15USE_NCURSES= yes # uses ncurses mouse definitions 17USE_NCURSES= yes # uses ncurses mouse definitions
16 18
17REPLACE_PYTHON+= scripts/MakeHeader.py 19CONFIGURE_ENV+= ac_cv_file__proc_meminfo=yes
18CONFIGURE_ENV+= ac_cv_file__proc_meminfo=yes 20CONFIGURE_ENV+= ac_cv_file__proc_stat=yes
19CONFIGURE_ENV+= ac_cv_file__proc_stat=yes 21
 22pre-configure:
 23 cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./autogen.sh
20 24
21.include "../../lang/python/application.mk" 
22.include "../../devel/ncursesw/buildlink3.mk" 25.include "../../devel/ncursesw/buildlink3.mk"
 26.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
23.include "../../sysutils/desktop-file-utils/desktopdb.mk" 27.include "../../sysutils/desktop-file-utils/desktopdb.mk"
24.include "../../mk/bsd.pkg.mk" 28.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/sysutils/htop/PLIST (expand / switch to unified diff)

--- pkgsrc/sysutils/htop/PLIST 2007/05/25 19:30:21 1.1.1.1
+++ pkgsrc/sysutils/htop/PLIST 2021/03/15 22:23:58 1.2
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/25 19:30:21 agc Exp $ 1@comment $NetBSD: PLIST,v 1.2 2021/03/15 22:23:58 fox Exp $
2bin/htop 2bin/htop
3man/man1/htop.1 3man/man1/htop.1
4share/applications/htop.desktop 4share/applications/htop.desktop
 5share/icons/hicolor/scalable/apps/htop.svg
5share/pixmaps/htop.png 6share/pixmaps/htop.png

cvs diff -r1.12 -r1.13 pkgsrc/sysutils/htop/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/htop/distinfo 2018/11/05 12:19:23 1.12
+++ pkgsrc/sysutils/htop/distinfo 2021/03/15 22:23:58 1.13
@@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
1$NetBSD: distinfo,v 1.12 2018/11/05 12:19:23 jperkin Exp $ 1$NetBSD: distinfo,v 1.13 2021/03/15 22:23:58 fox Exp $
2 2
3SHA1 (htop-2.2.0.tar.gz) = 5da790e6addf495edc4d8ed7d69d1f0de085c7ad 3SHA1 (htop-3.0.5.tar.gz) = de974e38e2c8d5900a4ab363111cb0544d391547
4RMD160 (htop-2.2.0.tar.gz) = 4d89c35c22c5e6377d374af0e0ff68610b22c79f 4RMD160 (htop-3.0.5.tar.gz) = 0963f4f94abaae2b2fa949c6a84b872415321421
5SHA512 (htop-2.2.0.tar.gz) = ec1335bf0e3e0387e5e50acbc508d0effad19c4bc1ac312419dc97b82901f4819600d6f87a91668f39d429536d17304d4b14634426a06bec2ecd09df24adc62e 5SHA512 (htop-3.0.5.tar.gz) = 7dae83ceff6b3f30e69c30c9559dbb3bf69281df006c6a26e4e2c49dd5a147e05ed7bafeeac8ec5bedc8ba670470100cc128209a92654858f98df09a9394594f
6Size (htop-2.2.0.tar.gz) = 308109 bytes 6Size (htop-3.0.5.tar.gz) = 297931 bytes
7SHA1 (patch-configure) = b7205e0d3466d89be4ab4fb29676091c05b599b1 7SHA1 (patch-configure.ac) = c85ea20944869c910f65893f909729dfd4d7cf7f
 8SHA1 (patch-linux_LinuxProcess.c) = 8fcf67c3f8b9ae05f61b5cac8a7dac103610fc5b
8SHA1 (patch-linux_Platform.c) = d37f4f5116023fa8d8f58f6b925e4f86e9748cea 9SHA1 (patch-linux_Platform.c) = d37f4f5116023fa8d8f58f6b925e4f86e9748cea
 10SHA1 (patch-linux_SELinuxMeter.c) = d5b479565f816e68e2d58ef535a3009f7da5262c

File Deleted: pkgsrc/sysutils/htop/patches/Attic/patch-configure

File Added: pkgsrc/sysutils/htop/patches/Attic/patch-configure.ac
$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])
    ;;

File Added: pkgsrc/sysutils/htop/patches/Attic/patch-linux_LinuxProcess.c
$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"

File Added: pkgsrc/sysutils/htop/patches/Attic/patch-linux_SELinuxMeter.c
$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) {