summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <fox@pkgsrc.org>2021-03-15 22:23:58 +0000
committerfox <fox@pkgsrc.org>2021-03-15 22:23:58 +0000
commit70dfde3848d01aced8a3934f1d61c1727b585e5e (patch)
tree15f0d22df2af666137e01a27890409b55d2e4f4e
parentd29e7c6ce483848773d8ef22ba80f75dbcac6abf (diff)
downloadpkgsrc-70dfde3848d01aced8a3934f1d61c1727b585e5e.tar.gz
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)
-rw-r--r--sysutils/htop/Makefile22
-rw-r--r--sysutils/htop/PLIST3
-rw-r--r--sysutils/htop/distinfo14
-rw-r--r--sysutils/htop/patches/patch-configure15
-rw-r--r--sysutils/htop/patches/patch-configure.ac15
-rw-r--r--sysutils/htop/patches/patch-linux_LinuxProcess.c14
-rw-r--r--sysutils/htop/patches/patch-linux_SELinuxMeter.c45
7 files changed, 97 insertions, 31 deletions
diff --git a/sysutils/htop/Makefile b/sysutils/htop/Makefile
index 32932ea1f7e..5504c18f157 100644
--- a/sysutils/htop/Makefile
+++ b/sysutils/htop/Makefile
@@ -1,24 +1,28 @@
-# $NetBSD: Makefile,v 1.20 2020/12/04 20:45:41 nia Exp $
+# $NetBSD: Makefile,v 1.21 2021/03/15 22:23:58 fox Exp $
-DISTNAME= htop-2.2.0
-PKGREVISION= 2
+DISTNAME= htop-3.0.5
CATEGORIES= sysutils
-MASTER_SITES= http://hisham.hm/htop/releases/${PKGVERSION_NOREV}/
+MASTER_SITES= ${MASTER_SITE_GITHUB:=htop-dev/}
+GITHUB_TAG= 3.0.5
+EXTRACT_USING= bsdtar
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= https://hisham.hm/htop/
+HOMEPAGE= https://htop.dev/
COMMENT= Enhanced version of top utility
LICENSE= gnu-gpl-v2
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
+USE_TOOLS+= autoreconf automake
USE_NCURSES= yes # uses ncurses mouse definitions
-REPLACE_PYTHON+= scripts/MakeHeader.py
-CONFIGURE_ENV+= ac_cv_file__proc_meminfo=yes
-CONFIGURE_ENV+= ac_cv_file__proc_stat=yes
+CONFIGURE_ENV+= ac_cv_file__proc_meminfo=yes
+CONFIGURE_ENV+= ac_cv_file__proc_stat=yes
+
+pre-configure:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./autogen.sh
-.include "../../lang/python/application.mk"
.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 --git a/sysutils/htop/PLIST b/sysutils/htop/PLIST
index 752d881a99c..c4c10874bdf 100644
--- a/sysutils/htop/PLIST
+++ b/sysutils/htop/PLIST
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/25 19:30:21 agc Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/03/15 22:23:58 fox Exp $
bin/htop
man/man1/htop.1
share/applications/htop.desktop
+share/icons/hicolor/scalable/apps/htop.svg
share/pixmaps/htop.png
diff --git a/sysutils/htop/distinfo b/sysutils/htop/distinfo
index 8cc7136d039..66d37afa56f 100644
--- a/sysutils/htop/distinfo
+++ b/sysutils/htop/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.12 2018/11/05 12:19:23 jperkin Exp $
+$NetBSD: distinfo,v 1.13 2021/03/15 22:23:58 fox Exp $
-SHA1 (htop-2.2.0.tar.gz) = 5da790e6addf495edc4d8ed7d69d1f0de085c7ad
-RMD160 (htop-2.2.0.tar.gz) = 4d89c35c22c5e6377d374af0e0ff68610b22c79f
-SHA512 (htop-2.2.0.tar.gz) = ec1335bf0e3e0387e5e50acbc508d0effad19c4bc1ac312419dc97b82901f4819600d6f87a91668f39d429536d17304d4b14634426a06bec2ecd09df24adc62e
-Size (htop-2.2.0.tar.gz) = 308109 bytes
-SHA1 (patch-configure) = b7205e0d3466d89be4ab4fb29676091c05b599b1
+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
diff --git a/sysutils/htop/patches/patch-configure b/sysutils/htop/patches/patch-configure
deleted file mode 100644
index 162474496c5..00000000000
--- a/sysutils/htop/patches/patch-configure
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2018/11/05 12:19:23 jperkin Exp $
-
-Pretend NetBSD is Linux.
-
---- configure.orig 2018-04-10 13:43:15.000000000 +0000
-+++ configure
-@@ -4523,7 +4523,7 @@ $as_echo "$ac_cv_safe_to_define___extens
- # Checks for platform.
- # ----------------------------------------------------------------------
- case "$target_os" in
--linux*|gnu*)
-+linux*|gnu*|*netbsd*)
- my_htop_platform=linux
- ;;
- freebsd*|kfreebsd*)
diff --git a/sysutils/htop/patches/patch-configure.ac b/sysutils/htop/patches/patch-configure.ac
new file mode 100644
index 00000000000..79a9f9d170b
--- /dev/null
+++ b/sysutils/htop/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$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 --git a/sysutils/htop/patches/patch-linux_LinuxProcess.c b/sysutils/htop/patches/patch-linux_LinuxProcess.c
new file mode 100644
index 00000000000..c1309dca945
--- /dev/null
+++ b/sysutils/htop/patches/patch-linux_LinuxProcess.c
@@ -0,0 +1,14 @@
+$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 --git a/sysutils/htop/patches/patch-linux_SELinuxMeter.c b/sysutils/htop/patches/patch-linux_SELinuxMeter.c
new file mode 100644
index 00000000000..0f205bdb1a6
--- /dev/null
+++ b/sysutils/htop/patches/patch-linux_SELinuxMeter.c
@@ -0,0 +1,45 @@
+$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) {