aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/README4
-rw-r--r--debian/README.source58
-rw-r--r--debian/changelog354
-rw-r--r--debian/compat1
-rw-r--r--debian/control19
-rw-r--r--debian/copyright21
-rw-r--r--debian/dirs1
-rw-r--r--debian/docs2
-rw-r--r--debian/menu2
-rw-r--r--debian/patches/100-fix-cgroups-crash.patch18
-rw-r--r--debian/patches/600-openvz-veid-on-kernels-gt-2.6.18.patch42
-rw-r--r--debian/patches/700-ltrace-support.patch195
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules65
-rw-r--r--debian/watch4
15 files changed, 789 insertions, 0 deletions
diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..de72689
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,4 @@
+The Debian package for htop contains an additional feature to view output of
+ltrace(1) utility for selected process, like the same of strace(1). This
+feature is not accepted by upstream, so one shouldn't rely on its existence.
+The current hotkey ('L') is also subject to change in newer versions.
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..5dde0bf
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,58 @@
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+ for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+ if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+ export QUILT_PATCHES=debian/patches
+ break
+ fi
+ done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+ quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+ quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches. Then, for every file that will be modified by this patch,
+run:
+
+ quilt add <file>
+
+before editing those files. You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly. After editing the files, run:
+
+ quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+ quilt import -P <patch> /path/to/patch
+ quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches. The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+ quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..edf4fab
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,354 @@
+htop (0.9-4) unstable; urgency=low
+
+ * debian/rules:
+ - Added 'build-arch' and 'build-indep' targets as suggested by Lintian.
+ * debian/patches:
+ - New patch 100-fix-cgroups-crash.patch fixing a crash when htop receives
+ an unexpected input from a cgroups file. (Closes: #628040)
+
+ -- Eugene V. Lyubimkin <jackyf@debian.org> Wed, 21 Sep 2011 21:17:17 +0300
+
+htop (0.9-3) unstable; urgency=low
+
+ * debian/rules:
+ - Enable cgroups support. (Closes: #627545)
+ * debian/README.source:
+ - added with standard instructions how to use quilt.
+ * debian/control:
+ - Fixed spelling as suggested by lintian.
+ - Bumped Standards-Version to 3.9.2, no changes needed.
+
+ -- Eugene V. Lyubimkin <jackyf@debian.org> Sun, 22 May 2011 12:05:09 +0300
+
+htop (0.9-2) unstable; urgency=low
+
+ * Upload to unstable.
+
+ -- Eugene V. Lyubimkin <jackyf@debian.org> Sun, 13 Feb 2011 10:41:53 +0200
+
+htop (0.9-1) experimental; urgency=low
+
+ * New upstream release. (Closes: #610229)
+ - Fixed by-process IO stats in some cases. (Closes: #526070)
+ - Do not display nan% as CPU load sometimes. (Closes: #590535)
+ * debian/patches:
+ - 600-openvz-veid-on-kernels-gt-2.6.18.patch: ported to new upstream
+ version.
+ - 700-ltrace-support.patch: refreshed.
+ * debian/control:
+ - Bumped Standards-Version to 3.9.1, no changes needed.
+ - Updated my mail address.
+ - Removed 'DM-Upload-Allowed' flag as not needed anymore.
+ * debian/copyright:
+ - Updated author copyright years.
+ * debian/watch:
+ - Removed 'uupdate' option, not needed for my workflow.
+
+ -- Eugene V. Lyubimkin <jackyf@debian.org> Sun, 16 Jan 2011 19:36:07 +0200
+
+htop (0.8.3-1) unstable; urgency=low
+
+ * New upstream release:
+ - 0.8.2 (LP: #385862):
+ - Integrated lsof output. (Closes: #426003)
+ - Handling of absend CPU should work now. (Closes: #494057, #476273)
+ - Fixed a crash when sorting by USER column. (Closes: #526362)
+ - Fixed display of gigabyte-sized values.
+ - Fixed incremental search. (Closes: #521376)
+ - Option to display hostname in the meters area.
+ - 0.8.3
+ * debian/control:
+ - Suggested strace and ltrace. (Closes: #530449)
+ - Bumped Standards-Version to 3.8.2, no changes needed.
+ * debian/patches:
+ - 700-ltrace-support.patch: modified to not contradict with new upstream
+ release, the hotkey for ltrace output changed from 'l' to 'L'.
+ * debian/README:
+ - Added with note about ltrace support.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Mon, 29 Jun 2009 13:08:39 +0300
+
+htop (0.8.1+svn149-2) unstable; urgency=low
+
+ * debian/rules:
+ - Build with VServer support. (Closes: #522905)
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Fri, 17 Apr 2009 21:54:45 +0300
+
+htop (0.8.1+svn149-1) unstable; urgency=low
+
+ * New upstream development snapshot:
+ - Allow building without PLPA support. (Closes: #521861)
+ * debian/patches:
+ - 010-make-desktop-file-valid.patch: deleted, merged upstream.
+ - 100-upstream-sort-by-processor-and-session.patch: deleted, merged
+ upstream.
+ - 110-upstream-fix-page-size-on-BSD.patch: deleted, merged upstream.
+ - 120-upstream-explain-cpu-bars-in-monochrome-mode.patch: deleted, merged
+ upstream.
+ - 200-filter-non-printable-characters.patch: deleted, upstream has own
+ version of this patch.
+ - 610-rename-veid-to-ctid.patch: deleted, merged upstream.
+ - 600-openvz-veid-on-kernels-gt-2.6.18.patch: refreshed.
+ - 800-tree-view-without-userland-threads.patch: deleted, merged upstream.
+ - 700-ltrace-support.patch: refreshed, added the description.
+ * debian/rules:
+ - Deal more robustly with config.{sub,guess} files, thanks to Roger Leigh.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sun, 05 Apr 2009 11:51:34 +0300
+
+htop (0.8.1-6) unstable; urgency=low
+
+ * debian/patches:
+ - debian/patches/110-upstream-fix-page-size-on-BSD.patch was accidentally
+ incorrectly applied, causing zeroes in memory columns. Fixed.
+ * debian/rules:
+ - File Process.c somewhy is not regenerated during normal build process.
+ Regenerate it by hand.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sun, 29 Mar 2009 22:37:49 +0300
+
+htop (0.8.1-5) unstable; urgency=low
+
+ * debian/patches:
+ - New 100-upstream-sort-by-processor-and-session.patch, cherry-picked from
+ upstream svn: allow sorting by 'processor' and 'session' columns.
+ (Closes: #501317)
+ - New debian/patches/110-upstream-fix-page-size-on-BSD.patch,
+ cherry-picked from upstream svn: fix page size on BSD systems.
+ (Closes: #485277)
+ - New debian/patches/120-upstream-explain-cpu-bars-in-monochrome-mode.patch,
+ cherry-picked from upstream svn: document meanings of chars in CPU bars
+ in monochrome mode. (Closes: #477222)
+ - 600-openvz-veid-on-kernels-gt-2.6.18.patch: added a description.
+ - 610-rename-veid-to-ctid.patch: added a description.
+ - 800-tree-view-without-userland-threads.patch: added a description.
+ * debian/control:
+ - Bump 'Standards-Version' to 3.8.1, no changes needed.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sun, 29 Mar 2009 19:49:53 +0300
+
+htop (0.8.1-4) unstable; urgency=low
+
+ * debian/patches:
+ - New 600-openvz-veid-on-kernels-gt-2.6.18.patch: fix determining veid on
+ openvz-enabled kernels greater than 2.6.18. Patch by
+ Thorsten Schifferdecker <tsd@debian.systs.org>. (Closes: #516846)
+ - New 610-rename-veid-to-ctid.patch: openvz: renames 'veid' -> 'ctid' since
+ it's now a preferred term. Patch by
+ Thorsten Schifferdecker <tsd@debian.systs.org>. (Closes: #516847)
+ - New 700-ltrace-support.patch: add ltrace(1) support in addition to strace
+ support. Patch by <knotor@users.sourceforge.net>.
+ - New 800-tree-view-with-userland-threads.patch: patch to fix tree view when
+ userland threads are hidden, taken from Ubuntu.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Mon, 02 Mar 2009 23:17:04 +0200
+
+htop (0.8.1-3) unstable; urgency=low
+
+ * debian/rules:
+ - Don't ship empty directories in the package.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sun, 15 Feb 2009 13:56:41 +0200
+
+htop (0.8.1-2) experimental; urgency=low
+
+ * Disabled unicode support, it has both build and work problems yet.
+ (Closes: #507423)
+ * debian/patches:
+ - New patch 200-filter-non-printable-characters.patch to filter
+ non-printable characters in process names. Thanks to Josh Triplett
+ and Andrew O. Shadoura. (Closes: #504144)
+ - 010-make-desktop-file-valid.patch: comment added.
+ * debian/control:
+ - Added '${misc:Depends}' to 'Depends', fixes lintian warning.
+ - Added 'python-minimal' to 'Build-Depends' for MakeHeader.py.
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sat, 06 Dec 2008 11:03:18 +0200
+
+htop (0.8.1-1) experimental; urgency=low
+
+ * New maintainer. Thanks for work, Bartosz Fenski!
+ * New upstream release:
+ - Changes in 0.8.1 (Closes: #499928):
+ - Linux-VServer support.
+ - Battery meter (Closes: #484771).
+ - Fixed collection of IO stats in multithreaded processes.
+ - Removed assertion that fails on hardened kernels.
+ - Changes in 0.8.0 (Closes: #494646, #486213):
+ - Ability to change sort column with the mouse by
+ clicking column titles.
+ - Added support for Linux per-process IO statistics.
+ - Added Unicode support.
+ - Fixed display of CPU count for threaded processes.
+ - Avoid crashing when using many meters.
+ - Other fixes:
+ - Significantly increased line length limit (to 65535).
+ (Closes: #470280)
+ * debian/control:
+ - Bumped 'Standards-Version' to 3.8.0, no changes needed.
+ - Changed Build-Depends on debhelper to (>= 7) and 'libncurses5-dev' ->
+ 'libncursesw5-dev'. Added dependency on quilt (>= 0.40).
+ * debian/rules:
+ - Some cleanup, used debhelper v7 commands.
+ - Pass '--enable-taskstats' and '--enable-unicode' options to configure.
+ - Pass '--enable-openvz' to configure. (Closes: #480541)
+ * debian/patches:
+ - New 010-make-desktop-file-valid.patch: makes desktop file valid.
+ Thanks to Nathan Handler <nathan.handler@gmail.com> (Closes: #488912)
+ * debian/copyright:
+ - Fixed path for GPLv2 license.
+ * debian/menu:
+ - Set proper section, removed hint (now useless).
+
+ -- Eugene V. Lyubimkin <jackyf.devel@gmail.com> Sun, 16 Nov 2008 20:36:18 +0200
+
+htop (0.7-1) unstable; urgency=low
+
+ * New upstrem version. (Closes: #452634)
+ * Move URL to homepage header.
+ * Bumped Standards-Version (no changes needed).
+ * Fixed watch file. (Closes: #449631)
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 26 Apr 2008 13:57:14 +0200
+
+htop (0.6.6+svn20070915-1) unstable; urgency=low
+
+ * New upstream snapshot with dedication to Nico Golde
+ (Closes: #410398, #410391, #427127)
+ - fixes problems with trailing newline in confi (Closes: #420856)
+ - fixes segfault on missing command line args (Closes: #435651)
+ - fixes FTBS with GCC 4.3 branch (Closes: #416852)
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 15 Sep 2007 14:37:41 +0200
+
+htop (0.6.3-1) unstable; urgency=low
+
+ * New upstream version.
+ - allows to rekill tagged group of processes (Closes: #375219)
+ * Bumped Standards-Version to 3.7.2 (no changes needed).
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 14 Aug 2006 13:03:15 +0200
+
+htop (0.6.2-1) unstable; urgency=low
+
+ * New upstream version.
+ - doesn't segfault running as root. (Closes: #354258)
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 4 Jul 2006 07:53:58 +0200
+
+htop (0.6-1) unstable; urgency=low
+
+ * New upstream version.
+ - doesn't show pipe when some value is equal to zero. (Closes: #325058)
+ - allows renicing group of processes. (Closes: #317391)
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 29 Dec 2005 13:22:07 +0100
+
+htop (0.5.4-1) unstable; urgency=low
+
+ * New upstream version.
+ - does not leave cruft on console on exit. (Closes: #334657)
+
+ -- Bartosz Fenski <fenio@debian.org> Fri, 4 Nov 2005 17:25:27 +0100
+
+htop (0.5.3-1) unstable; urgency=low
+
+ * New upstream version.
+ * Bumped Standards-Version to 3.6.2 (no changes needed).
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 20 Sep 2005 10:49:52 +0200
+
+htop (0.5.2-1) unstable; urgency=low
+
+ * New upstream bugfix release.
+
+ -- Bartosz Fenski <fenio@debian.org> Wed, 8 Jun 2005 20:02:19 +0200
+
+htop (0.5.1-1) unstable; urgency=low
+
+ * New upstream version.
+ - correctly honors limits for nice values (Closes: #291502)
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 10 Apr 2005 17:49:12 +0200
+
+htop (0.5-2) unstable; urgency=low
+
+ * watch file changed a little to handle weird upstream versions
+ * s/fenio@o2.pl/fenio@debian.org/
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 7 Apr 2005 12:00:11 +0200
+
+htop (0.5-1) unstable; urgency=low
+
+ * New upstream version.
+ - fixes problem with wrongly displayed CPU bar (Closes: #283212)
+
+ -- Bartosz Fenski <fenio@o2.pl> Sat, 27 Nov 2004 10:10:17 +0100
+
+htop (0.4.1-3) unstable; urgency=low
+
+ * Fixed handling of non-alphanumeric chars during search.
+ Thanks to Gian Piero Carrubba for noticing it (Closes: #269060)
+ * Added description of recursive search of processes to the manpage.
+ Should be now clear how does it work so (Closes: #269061)
+
+ -- Bartosz Fenski <fenio@o2.pl> Tue, 31 Aug 2004 21:40:15 +0200
+
+htop (0.4.1-2) unstable; urgency=low
+
+ * Included updated manpage. (Closes: #269064)
+ Thanks to Gian Piero Carrubba for provided patch.
+
+ -- Bartosz Fenski <fenio@o2.pl> Tue, 31 Aug 2004 21:08:13 +0200
+
+htop (0.4.1-1) unstable; urgency=low
+
+ * New upstream version.
+ - fixes FTBFS on some archs (Closes: #268373)
+
+ -- Bartosz Fenski <fenio@o2.pl> Fri, 27 Aug 2004 14:01:11 +0200
+
+htop (0.4-1) unstable; urgency=low
+
+ * New upstream version.
+ * Added debian/menu file.
+
+ -- Bartosz Fenski <fenio@o2.pl> Sun, 22 Aug 2004 13:09:12 +0200
+
+htop (0.3.3-1) unstable; urgency=low
+
+ * New upstream version.
+ * Added debian/watch file.
+
+ -- Bartosz Fenski <fenio@o2.pl> Sun, 20 Jun 2004 10:33:13 +0200
+
+htop (0.3.1-1) unstable; urgency=low
+
+ * New upstream version.
+ * Hopefully first official Debian release. (Closes: #248939)
+ Thanks for sponsoring goes to Cedric Delfosse.
+ * debian/rules:
+ - removed dh_installman, cause it's now included by upstream.
+
+ -- Bartosz Fenski <fenio@o2.pl> Mon, 31 May 2004 05:37:15 +0200
+
+htop (0.3-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- Bartosz Fenski <fenio@o2.pl> Thu, 20 May 2004 01:15:05 +0200
+
+htop (0.2.1-1) unstable; urgency=low
+
+ * New upstream version.
+ * Some updates to manual page.
+
+ -- Bartosz Fenski <fenio@o2.pl> Sat, 15 May 2004 10:15:03 +0200
+
+htop (0.2-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Bartosz Fenski <fenio@o2.pl> Fri, 14 May 2004 10:37:04 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..fe77342
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: htop
+Section: utils
+Priority: optional
+Maintainer: Eugene V. Lyubimkin <jackyf@debian.org>
+Build-Depends: debhelper (>= 7), libncurses5-dev, autotools-dev, quilt (>= 0.40), python-minimal
+Standards-Version: 3.9.2
+Homepage: http://htop.sourceforge.net
+
+Package: htop
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: strace, ltrace
+Description: interactive processes viewer
+ Htop is an ncursed-based process viewer similar to top, but it
+ allows one to scroll the list vertically and horizontally to see
+ all processes and their full command lines.
+ .
+ Tasks related to processes (killing, renicing) can be done without
+ entering their PIDs.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..4866fff
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,21 @@
+This package was debianized by Bartosz Fenski <fenio@debian.org> on
+Fri, 14 May 2004 10:37:04 +0200.
+
+It was downloaded from http://htop.sourceforge.net
+
+Upstream Author: Hisham Muhammad <lode@gobolinux.org>
+
+Copyright:
+
+Copyright (C) 2004-2010 Hisham Muhammad <lode@gobolinux.org>
+
+License:
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file `/usr/share/common-licenses/GPL-2'.
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..6f12db5
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+AUTHORS
+README
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..9689b1f
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,2 @@
+?package(htop):needs="text" section="Applications/System/Monitoring"\
+ title="htop" command="/usr/bin/htop"
diff --git a/debian/patches/100-fix-cgroups-crash.patch b/debian/patches/100-fix-cgroups-crash.patch
new file mode 100644
index 0000000..4ba95cb
--- /dev/null
+++ b/debian/patches/100-fix-cgroups-crash.patch
@@ -0,0 +1,18 @@
+diff --git a/ProcessList.c b/ProcessList.c
+index c234357..3bb1b81 100644
+--- a/ProcessList.c
++++ b/ProcessList.c
+@@ -473,7 +473,12 @@ static void ProcessList_readCGroupFile(Process* process, const char* dirname, co
+ char** fields = String_split(trimmed, ':');
+ free(trimmed);
+
+- process->cgroup = strndup(fields[2] + 1, 10);
++ if (!fields[1] || !fields[2]) {
++ process->cgroup = strdup(""); // cgroups do not work
++ }
++ else {
++ process->cgroup = strndup(fields[2] + 1, 10);
++ }
+ String_freeArray(fields);
+ }
+ fclose(file);
diff --git a/debian/patches/600-openvz-veid-on-kernels-gt-2.6.18.patch b/debian/patches/600-openvz-veid-on-kernels-gt-2.6.18.patch
new file mode 100644
index 0000000..57e687e
--- /dev/null
+++ b/debian/patches/600-openvz-veid-on-kernels-gt-2.6.18.patch
@@ -0,0 +1,42 @@
+Fix determining OpenVZ VEID on Linux kernels >= 2.6.18.
+Index: htop/ProcessList.c
+===================================================================
+--- htop.orig/ProcessList.c 2011-01-16 17:02:59.000000000 +0200
++++ htop/ProcessList.c 2011-01-16 18:05:01.000000000 +0200
+@@ -438,19 +438,26 @@
+ return;
+ }
+ char filename[MAX_NAME+1];
+- snprintf(filename, MAX_NAME, "%s/%s/stat", dirname, name);
++ snprintf(filename, MAX_NAME, "%s/%s/status", dirname, name);
+ FILE* file = fopen(filename, "r");
+ if (!file)
+ return;
+- fscanf(file,
+- "%*u %*s %*c %*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %*u %*u %*u %*u %*u "
+- "%*u %*u %u %u",
+- &process->vpid, &process->ctid);
++
++ char buffer[256];
++ process->ctid = 0;
++ while (!feof(file)) {
++ char* ok = fgets(buffer, 255, file);
++ if (!ok)
++ break;
++
++ if (String_startsWith(buffer, "envID:")) {
++ int ctid;
++ int ok = sscanf(buffer, "envID:\t%d", &ctid);
++ if (ok >= 1) {
++ process->ctid = ctid;
++ }
++ }
++ }
+ fclose(file);
+ }
+
diff --git a/debian/patches/700-ltrace-support.patch b/debian/patches/700-ltrace-support.patch
new file mode 100644
index 0000000..b44b025
--- /dev/null
+++ b/debian/patches/700-ltrace-support.patch
@@ -0,0 +1,195 @@
+Add support for 'ltrace' in addition to 'strace' support.
+Index: htop/TraceScreen.c
+===================================================================
+--- htop.orig/TraceScreen.c 2011-01-16 17:02:59.000000000 +0200
++++ htop/TraceScreen.c 2011-01-16 18:15:07.000000000 +0200
+@@ -23,11 +23,17 @@
+
+ /*{
+
++typedef enum TraceType_ {
++ STRACE,
++ LTRACE
++} TraceType;
++
+ typedef struct TraceScreen_ {
+ Process* process;
+ Panel* display;
+ FunctionBar* bar;
+ bool tracing;
++ TraceType type;
+ } TraceScreen;
+
+ }*/
+@@ -38,9 +44,10 @@
+
+ static int tsEvents[] = {KEY_F(4), KEY_F(5), 27};
+
+-TraceScreen* TraceScreen_new(Process* process) {
++TraceScreen* TraceScreen_new(Process* process, TraceType type) {
+ TraceScreen* this = (TraceScreen*) malloc(sizeof(TraceScreen));
+ this->process = process;
++ this->type = type;
+ this->display = Panel_new(0, 1, COLS, LINES-2, LISTITEM_CLASS, true, ListItem_compare);
+ this->bar = FunctionBar_new(tsFunctions, tsKeys, tsEvents);
+ this->tracing = true;
+@@ -56,7 +63,14 @@
+ static void TraceScreen_draw(TraceScreen* this) {
+ attrset(CRT_colors[PANEL_HEADER_FOCUS]);
+ mvhline(0, 0, ' ', COLS);
+- mvprintw(0, 0, "Trace of process %d - %s", this->process->pid, this->process->comm);
++ switch(this->type) {
++ case STRACE:
++ mvprintw(0, 0, "Trace of process %d - %s (STRACE)", this->process->pid, this->process->comm);
++ break;
++ case LTRACE:
++ mvprintw(0, 0, "Trace of process %d - %s (LTRACE)", this->process->pid, this->process->comm);
++ break;
++ }
+ attrset(CRT_colors[DEFAULT_COLOR]);
+ FunctionBar_draw(this->bar, NULL);
+ }
+@@ -73,15 +87,24 @@
+ dup2(fdpair[1], STDERR_FILENO);
+ fcntl(fdpair[1], F_SETFL, O_NONBLOCK);
+ sprintf(buffer, "%d", this->process->pid);
+- execlp("strace", "strace", "-p", buffer, NULL);
+- const char* message = "Could not execute 'strace'. Please make sure it is available in your $PATH.";
++ const char* message;
++ switch(this->type) {
++ case STRACE:
++ execlp("strace", "strace", "-p", buffer, NULL);
++ message = "Could not execute 'strace'. Please make sure it is available in your $PATH.";
++ break;
++ case LTRACE:
++ execlp("ltrace", "ltrace", "-p", buffer, NULL);
++ message = "Could not execute 'ltrace'. Please make sure it is available in your $PATH.";
++ break;
++ }
+ write(fdpair[1], message, strlen(message));
+ exit(1);
+ }
+ fcntl(fdpair[0], F_SETFL, O_NONBLOCK);
+- FILE* strace = fdopen(fdpair[0], "r");
++ FILE* trace = fdopen(fdpair[0], "r");
+ Panel* panel = this->display;
+- int fd_strace = fileno(strace);
++ int fd_trace = fileno(trace);
+ TraceScreen_draw(this);
+ CRT_disableDelay();
+ bool contLine = false;
+@@ -90,13 +113,13 @@
+ while (looping) {
+ fd_set fds;
+ FD_ZERO(&fds);
+- FD_SET(fd_strace, &fds);
++ FD_SET(fd_trace, &fds);
+ struct timeval tv;
+ tv.tv_sec = 0; tv.tv_usec = 500;
+- int ready = select(fd_strace+1, &fds, NULL, NULL, &tv);
++ int ready = select(fd_trace+1, &fds, NULL, NULL, &tv);
+ int nread = 0;
+ if (ready > 0)
+- nread = fread(buffer, 1, 1000, strace);
++ nread = fread(buffer, 1, 1000, trace);
+ if (nread && this->tracing) {
+ char* line = buffer;
+ buffer[nread] = '\0';
+@@ -171,6 +194,6 @@
+ }
+ kill(child, SIGTERM);
+ waitpid(child, NULL, 0);
+- fclose(strace);
++ fclose(trace);
+ CRT_enableDelay();
+ }
+Index: htop/TraceScreen.h
+===================================================================
+--- htop.orig/TraceScreen.h 2009-06-29 13:18:40.000000000 +0300
++++ htop/TraceScreen.h 2011-01-16 18:15:07.000000000 +0200
+@@ -25,15 +25,21 @@
+ #include "FunctionBar.h"
+
+
++typedef enum TraceType_ {
++ STRACE,
++ LTRACE
++} TraceType;
++
+ typedef struct TraceScreen_ {
+ Process* process;
+ Panel* display;
+ FunctionBar* bar;
+ bool tracing;
++ TraceType type;
+ } TraceScreen;
+
+
+-TraceScreen* TraceScreen_new(Process* process);
++TraceScreen* TraceScreen_new(Process* process, TraceType type);
+
+ void TraceScreen_delete(TraceScreen* this);
+
+Index: htop/htop.1
+===================================================================
+--- htop.orig/htop.1 2011-01-16 17:02:59.000000000 +0200
++++ htop/htop.1 2011-01-16 18:15:07.000000000 +0200
+@@ -54,6 +54,11 @@
+ Display open files for a process: if lsof(1) is installed, pressing this key
+ will display the list of file descriptors opened by the process.
+ .TP
++.B l
++Trace process library calls: if ltrace(1) is installed, pressing this key
++will attach it to the currently selected process, presenting a live
++update of library calls issued by the process.
++.TP
+ .B F1, h
+ Help screen
+ .TP
+Index: htop/htop.c
+===================================================================
+--- htop.orig/htop.c 2011-01-16 17:02:59.000000000 +0200
++++ htop/htop.c 2011-01-16 18:15:07.000000000 +0200
+@@ -133,6 +133,7 @@
+ mvaddstr(19, 0, " F2 S: setup F6 >: select sort column");
+ mvaddstr(20, 0, " F1 h: show this help screen l: list open files with lsof");
+ mvaddstr(21, 0, " F10 q: quit s: trace syscalls with strace");
++ mvaddstr(22, 0, " L: trace library calls with ltrace");
+
+ attrset(CRT_colors[HELP_BOLD]);
+ mvaddstr( 9, 0, " Arrows"); mvaddstr( 9,40, " F5 t");
+@@ -152,10 +153,11 @@
+ mvaddstr(19, 0, " F2 S"); mvaddstr(19,40, " F6 >");
+ mvaddstr(20, 0, " ? F1 h"); mvaddstr(20,40, " l");
+ mvaddstr(21, 0, " F10 q"); mvaddstr(21,40, " s");
++ mvaddstr(22,40, " L");
+ attrset(CRT_colors[DEFAULT_COLOR]);
+
+ attrset(CRT_colors[HELP_BOLD]);
+- mvaddstr(23,0, "Press any key to return.");
++ mvaddstr(24,0, "Press any key to return.");
+ attrset(CRT_colors[DEFAULT_COLOR]);
+ refresh();
+ CRT_readKey();
+@@ -580,9 +582,20 @@
+ Panel_onKey(panel, KEY_DOWN);
+ break;
+ }
++ case 'L':
++ {
++ TraceScreen* ts = TraceScreen_new((Process*) Panel_getSelected(panel), LTRACE);
++ TraceScreen_run(ts);
++ TraceScreen_delete(ts);
++ clear();
++ FunctionBar_draw(defaultBar, NULL);
++ refreshTimeout = 0;
++ CRT_enableDelay();
++ break;
++ }
+ case 's':
+ {
+- TraceScreen* ts = TraceScreen_new((Process*) Panel_getSelected(panel));
++ TraceScreen* ts = TraceScreen_new((Process*) Panel_getSelected(panel), STRACE);
+ TraceScreen_run(ts);
+ TraceScreen_delete(ts);
+ clear();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7204157
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+100-fix-cgroups-crash.patch
+600-openvz-veid-on-kernels-gt-2.6.18.patch
+700-ltrace-support.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..6c67a3b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+config.status: configure $(QUILT_STAMPFN)
+ dh_testdir
+
+ [ -r config.sub.orig ] || \
+ cp -f config.sub config.sub.orig
+ [ -r config.guess.orig ] || \
+ cp -f config.guess config.guess.orig
+
+ [ ! -r /usr/share/misc/config.sub ] || \
+ cp -f /usr/share/misc/config.sub config.sub
+ [ ! -r /usr/share/misc/config.guess ] || \
+ cp -f /usr/share/misc/config.guess config.guess
+
+ CFLAGS="$(CFLAGS)" LDFLAGS="$(INSTALL_PROGRAM)" ./configure \
+ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info \
+ --enable-taskstats --enable-openvz --enable-vserver \
+ --enable-cgroup
+
+build: build-stamp
+build-arch: build
+build-indep: build
+build-stamp: config.status
+ scripts/MakeHeader.py Process.c
+ dh build --before dh_auto_configure
+ dh build --after dh_auto_configure
+ touch build-stamp
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ ([ -f Makefile ] && $(MAKE) distclean) || true
+ [ ! -r config.guess.orig ] || \
+ mv -f config.guess.orig config.guess || :
+ [ ! -r config.sub.orig ] || \
+ mv -f config.sub.orig config.sub || :
+
+ dh_clean
+
+install: build
+ dh install --before dh_auto_install
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/htop
+ find $(CURDIR)/debian/htop -type d -empty -delete
+ dh install --after dh_auto_install
+
+binary-indep:
+binary-arch: install
+ dh binary-arch
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..6c07c59
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts=dversionmangle=s/\+svn(.*)// \
+http://sf.net/htop/htop-(\d\.\d|\d\.\d\.\d)\.tar\.gz
+