pkgsrc-WIP-changes archive

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

Import htop-2.0.0 as wip/htop



Module Name:	pkgsrc-wip
Committed By:	coypu <coypu%sdf.org@localhost>
Pushed By:	coypu
Date:		Sun Feb 14 02:08:09 2016 +0000
Changeset:	536e584a06e102695036cc6bc2279d8575ad1e68

Added Files:
	htop/DESCR
	htop/Makefile
	htop/PLIST
	htop/TODO
	htop/distinfo
	htop/patches/patch-Makefile.am
	htop/patches/patch-configure.ac
	htop/patches/patch-linux_LinuxProcess.c

Log Message:
Import htop-2.0.0 as wip/htop

What's new in version 2.0.0

* Platform abstraction layer
* Initial FreeBSD support
* Initial Mac OS X support
  (thanks to David Hunt)
* Swap meter for Mac OSX
  (thanks to Ștefan Rusu)
* OpenBSD port
  (thanks to Michael McConville)
* FreeBSD support improvements
  (thanks to Martin Misuth)
* Support for NCurses 6 ABI, including mouse wheel support
* Much improved mouse responsiveness
* Process environment variables screen
  (thanks to Michael Klein)
* Higher-resolution UTF-8 based Graph mode
  (Thanks to James Hall from vtop for the idea!)
* Show program path settings
  (thanks to Tobias Geerinckx-Rice)
* BUGFIX: Fix crash when scrolling an empty filtered list.
* Use dynamic units for text display, and several fixes
  (thanks to Christian Hesse)
* BUGFIX: fix error caused by overflow in usertime calculation.
  (thanks to Patrick Marlier)
* Catch all memory allocation errors
  (thanks to Michael McConville for the push)
* Several tweaks and bugfixes
  (See the Git log for details and contributors!)

What's new in version 1.0.3

* Tag all children ('c' key)
* Fixes in accounting of guest time when using virtualization
  (thanks to Patrick Marlier)
* Performance improvements
  (thanks to Jann Horn)
* Further performance improvements due to conditional parsing
  of IO data depending on selected fields.
* Better consistency in coloring.
* Increase limit of buffer when tracing a deep nested process tree.
* Display pagefault stats.
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.
  (thanks to Dawid Gajownik)
* Add column to track the OOM-killer score of processes
  (thanks to Leigh Simpson)

What's new in version 1.0.2

* Add IO priority support ('i' key)
* Avoid deleting .htoprc if it is a symlink
* Fail gracefully when /proc is not mounted
  (thanks to Philipp Hagemeister)
* Option to update process names on every refresh
  (thanks to Rob Hoelz)
* BUGFIX: Fix crashes when process list is empty

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=536e584a06e102695036cc6bc2279d8575ad1e68

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 htop/DESCR                              | 18 +++++++++++++++
 htop/Makefile                           | 39 +++++++++++++++++++++++++++++++++
 htop/PLIST                              |  5 +++++
 htop/TODO                               |  5 +++++
 htop/distinfo                           |  9 ++++++++
 htop/patches/patch-Makefile.am          | 28 +++++++++++++++++++++++
 htop/patches/patch-configure.ac         | 33 ++++++++++++++++++++++++++++
 htop/patches/patch-linux_LinuxProcess.c | 34 ++++++++++++++++++++++++++++
 8 files changed, 171 insertions(+)

diffs:
diff --git a/htop/DESCR b/htop/DESCR
new file mode 100644
index 0000000..e9e4d80
--- /dev/null
+++ b/htop/DESCR
@@ -0,0 +1,18 @@
+This is htop, an interactive process viewer.
+
+Comparison between 'htop' and 'top'
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ * In 'htop' you can scroll the list vertically and horizontally
+   to see all processes and full command lines.
+ * In 'top' you are subject to a delay for each unassigned
+   key you press (especially annoying when multi-key escape
+   sequences are triggered by accident).
+ * 'htop' starts faster ('top' seems to collect data for a while
+   before displaying anything).
+ * In 'htop' you don't need to type the process number to
+   kill a process, in 'top' you do.
+ * In 'htop' you don't need to type the process number or
+   the priority value to renice a process, in 'top' you do.
+ * In 'htop' you can kill multiple processes at once.
+ * 'top' is older, hence, more tested.
diff --git a/htop/Makefile b/htop/Makefile
new file mode 100644
index 0000000..c111768
--- /dev/null
+++ b/htop/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD: Makefile,v 1.10 2015/08/20 13:38:25 jperkin Exp $
+#
+
+DISTNAME=	htop-2.0.0
+CATEGORIES=	sysutils
+MASTER_SITES=	http://hisham.hm/htop/releases/2.0.0/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://hisham.hm/htop/
+COMMENT=	Enhanced version of top utility
+LICENSE=	gnu-gpl-v2
+
+USE_TOOLS+=	automake aclocal autoheader autoconf
+GNU_CONFIGURE=	yes
+USE_NCURSES=	yes # uses ncurses mouse definitions
+
+USE_LIBTOOL=	yes
+
+#ONLY_FOR_PLATFORM=     Linux-*-* FreeBSD-*-* NetBSD-*-*
+
+pre-configure:
+	set -e; cd ${WRKSRC}; \
+	aclocal; \
+	autoconf; \
+	automake
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS" && exists(/system/lxproc)
+ONLY_FOR_PLATFORM+=	SunOS-*-*
+CONFIGURE_ARGS+=	--with-proc=/system/lxproc
+.endif
+
+REPLACE_PYTHON+=	scripts/MakeHeader.py
+CONFIGURE_ENV+=		ac_cv_file__proc_stat=yes ac_cv_file__proc_meminfo=yes
+
+.include "../../devel/ncursesw/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/htop/PLIST b/htop/PLIST
new file mode 100644
index 0000000..752d881
--- /dev/null
+++ b/htop/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/05/25 19:30:21 agc Exp $
+bin/htop
+man/man1/htop.1
+share/applications/htop.desktop
+share/pixmaps/htop.png
diff --git a/htop/TODO b/htop/TODO
new file mode 100644
index 0000000..e9d468d
--- /dev/null
+++ b/htop/TODO
@@ -0,0 +1,5 @@
+resident and shared memory still broken as in prev versions.
+figure out why, it merely reads /proc/<pid>/statm etc.
+in function LinuxProcessList_readStatmFile in file linux/LinuxProcessList.c
+
+some patches are redundant, most pre-configure stage stuff too
diff --git a/htop/distinfo b/htop/distinfo
new file mode 100644
index 0000000..992a3ea
--- /dev/null
+++ b/htop/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.6 2015/11/04 01:32:17 agc Exp $
+
+SHA1 (htop-2.0.0.tar.gz) = 73bf8b97d4ee74066c75c0f9e0c1eacbaff11ba0
+RMD160 (htop-2.0.0.tar.gz) = 2d5e812fcabde1922b9fdd35413795200f306eb8
+SHA512 (htop-2.0.0.tar.gz) = 2df1b96e4c07a1de360dc7b7b20db0e663d7fa2c9a8a9dcc3d7dc1ce5e5b59f72d927e8e7ae919631cf0e950a82450b45116a1f8d788f63c5762bd73332ec32c
+Size (htop-2.0.0.tar.gz) = 473765 bytes
+SHA1 (patch-Makefile.am) = 5139fca6858abcba7db51d6a1345936a6e1d17a6
+SHA1 (patch-configure.ac) = 7f76263003cd0ec76aa40fa47131122e38f254b4
+SHA1 (patch-linux_LinuxProcess.c) = bf20e9afbd795ae3c6f99403828ff9c05713a89f
diff --git a/htop/patches/patch-Makefile.am b/htop/patches/patch-Makefile.am
new file mode 100644
index 0000000..b72136d
--- /dev/null
+++ b/htop/patches/patch-Makefile.am
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- Makefile.am.orig	2016-02-02 14:58:45.000000000 +0000
++++ Makefile.am
+@@ -70,6 +70,14 @@ myhtopplatheaders = darwin/Platform.h da
+ darwin/DarwinProcessList.h darwin/DarwinCRT.h darwin/Battery.h
+ endif
+ 
++if HTOP_NETBSD
++myhtopplatsources = linux/Platform.c linux/IOPriorityPanel.c linux/IOPriority.c \
++linux/LinuxProcess.c linux/LinuxProcessList.c linux/LinuxCRT.c linux/Battery.c
++
++myhtopplatheaders = linux/Platform.h linux/IOPriorityPanel.h linux/IOPriority.h \
++linux/LinuxProcess.h linux/LinuxProcessList.h linux/LinuxCRT.h linux/Battery.h
++endif
++
+ if HTOP_UNSUPPORTED
+ myhtopplatsources = unsupported/Platform.c \
+ unsupported/UnsupportedProcess.c unsupported/UnsupportedProcessList.c \
+@@ -98,7 +106,7 @@ coverage:
+ 	$(MAKE) all CFLAGS="" AM_CPPFLAGS="-fprofile-arcs -ftest-coverage -DDEBUG" AM_LDFLAGS="-lgcov"
+ 
+ .c.h:
+-	@srcdir@/scripts/MakeHeader.py $<
++#	@srcdir@/scripts/MakeHeader.py $<
+ 
+ cppcheck:
+ 	cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS
diff --git a/htop/patches/patch-configure.ac b/htop/patches/patch-configure.ac
new file mode 100644
index 0000000..0e17015
--- /dev/null
+++ b/htop/patches/patch-configure.ac
@@ -0,0 +1,33 @@
+$NetBSD$
+
+--- configure.ac.orig	2016-02-02 14:59:55.000000000 +0000
++++ configure.ac
+@@ -39,6 +39,9 @@ case "$target" in
+ *darwin*)
+    my_htop_platform=darwin
+    ;;
++*netbsd*)
++   my_htop_platform=linux
++   ;;
+ *)
+    my_htop_platform=unsupported
+    ;;
+@@ -211,6 +214,10 @@ if test "$my_htop_platform" = "openbsd";
+    AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"])
+ fi
+ 
++if test "$my_htop_platform" = "netbsd"; then
++   AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"])
++fi
++
+ AC_ARG_ENABLE(native_affinity, [AC_HELP_STRING([--enable-native-affinity], [enable native sched_setaffinity and sched_getaffinity for affinity support, disables hwloc])], ,enable_native_affinity="yes")
+ if test "x$enable_native_affinity" = xyes -a "x$cross_compiling" = xno; then
+    AC_MSG_CHECKING([for usable sched_setaffinity])
+@@ -256,6 +263,7 @@ AM_CONDITIONAL([HTOP_LINUX], [test "$my_
+ AM_CONDITIONAL([HTOP_FREEBSD], [test "$my_htop_platform" = freebsd])
+ AM_CONDITIONAL([HTOP_OPENBSD], [test "$my_htop_platform" = openbsd])
+ AM_CONDITIONAL([HTOP_DARWIN], [test "$my_htop_platform" = darwin])
++AM_CONDITIONAL([HTOP_NETBSD], [test "$my_htop_platform" = netbsd])
+ AM_CONDITIONAL([HTOP_UNSUPPORTED], [test "$my_htop_platform" = unsupported])
+ AC_SUBST(my_htop_platform)
+ AC_CONFIG_FILES([Makefile htop.1])
diff --git a/htop/patches/patch-linux_LinuxProcess.c b/htop/patches/patch-linux_LinuxProcess.c
new file mode 100644
index 0000000..c0da33e
--- /dev/null
+++ b/htop/patches/patch-linux_LinuxProcess.c
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- linux/LinuxProcess.c.orig	2016-02-02 15:30:44.000000000 +0000
++++ linux/LinuxProcess.c
+@@ -14,6 +14,7 @@ in the source distribution for its full 
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <sys/resource.h>
+ #include <sys/syscall.h>
+ 
+ /*{
+@@ -268,13 +269,21 @@ io_priority = (cpu_nice + 20) / 5. -- Fr
+ #define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority)
+ 
+ IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this) {
++#if defined(__NetBSD__)
++   IOPriority ioprio = getpriority(this->super.pid, IOPRIO_WHO_PROCESS);
++#else
+    IOPriority ioprio = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, this->super.pid);
++#endif
+    this->ioPriority = ioprio;
+    return ioprio;
+ }
+ 
+ bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio) {
++#if defined(__NetBSD__)
++   setpriority(this->super.pid, IOPRIO_WHO_PROCESS, ioprio);
++#else
+    syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, this->super.pid, ioprio);
++#endif
+    return (LinuxProcess_updateIOPriority(this) == ioprio);
+ }
+ 


Home | Main Index | Thread Index | Old Index