From 9b73c60de22938452f5d10e3083ed8361af60866 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 27 Feb 2011 14:53:02 +0100 Subject: [PATCH] Use ncurses-{libs,devel} everywhere and bumprev for ABI change. --- srcpkgs/aspell/aspell-devel.template | 4 +- srcpkgs/aspell/template | 6 +- srcpkgs/bash/template | 1 + srcpkgs/cmake/template | 1 + srcpkgs/dialog/template | 5 +- srcpkgs/gdb/template | 1 + srcpkgs/gettext/gettext-libs.template | 2 + srcpkgs/gettext/template | 2 +- srcpkgs/grub/template | 2 +- srcpkgs/heimdal/heimdal-devel.template | 2 +- srcpkgs/heimdal/template | 2 +- srcpkgs/htop/template | 11 +- srcpkgs/hunspell/hunspell-devel.template | 4 +- srcpkgs/hunspell/template | 6 +- srcpkgs/irssi/irssi-devel.template | 4 +- srcpkgs/irssi/template | 12 +- srcpkgs/lame/lame-devel.template | 2 + srcpkgs/lame/template | 1 + srcpkgs/less/template | 6 +- srcpkgs/lftp/template | 1 + srcpkgs/libcdio/libcdio-devel.template | 2 +- srcpkgs/libcdio/template | 2 +- srcpkgs/mysql/mysql-client.template | 4 +- srcpkgs/mysql/mysql-ndb.template | 4 +- srcpkgs/mysql/template | 2 +- srcpkgs/parted/template | 1 + srcpkgs/powertop/template | 5 +- srcpkgs/procps/patches/10_ps.1.patch | 62 -- .../patches/complain_unmounted_proc.patch | 19 - srcpkgs/procps/patches/free.1.patch | 108 ---- srcpkgs/procps/patches/gnu-kbsd-version.patch | 36 -- .../procps/patches/groff-top-manpage.patch | 39 ++ srcpkgs/procps/patches/kill.1.patch | 147 ----- srcpkgs/procps/patches/kill_warncr.patch | 25 - .../procps/patches/library_map_freeproc.patch | 15 - .../procps/patches/makefile_dev_null.patch | 13 - srcpkgs/procps/patches/module_mk_shared.patch | 15 - srcpkgs/procps/patches/output_sort_time.patch | 93 --- srcpkgs/procps/patches/path_max.patch | 76 --- srcpkgs/procps/patches/pgrep.1.patch | 208 ------- srcpkgs/procps/patches/pgrep_c_option.patch | 85 --- srcpkgs/procps/patches/pgrep_start_time.patch | 16 - .../procps/patches/pgrep_usage_exitcode.patch | 15 - srcpkgs/procps/patches/pmap.1.patch | 48 -- srcpkgs/procps/patches/pmaps_smaps.patch | 141 ----- .../patches/proc_version_constructor.patch | 37 -- .../patches/procps-3.2.7-free-hlmem.patch | 23 + .../procps/patches/procps-3.2.7-longcmd.patch | 22 + .../patches/procps-3.2.7-ps-man-fmt.patch | 12 + .../procps/patches/procps-3.2.7-psman.patch | 22 + .../patches/procps-3.2.7-slabtop-once.patch | 113 ++++ .../patches/procps-3.2.7-top-clrscr.patch | 19 + .../patches/procps-3.2.7-top-cpu0.patch | 20 + .../procps-3.2.7-top-env-cpuloop.patch | 84 +++ .../patches/procps-3.2.7-top-manpage.patch | 32 + .../patches/procps-3.2.7-top-remcpu.patch | 98 ++++ .../patches/procps-3.2.7-top-sorthigh.patch | 37 ++ .../procps/patches/procps-3.2.7-w-best.patch | 16 + .../patches/procps-3.2.7-watch-unicode.patch | 139 +++++ .../patches/procps-3.2.8-linux-ver-init.patch | 23 + .../patches/procps-3.2.8-setlocale.patch | 66 +++ .../procps/patches/procps-3.2.8-threads.patch | 49 ++ srcpkgs/procps/patches/ps_1_flt_output.patch | 30 - srcpkgs/procps/patches/ps_1_options.patch | 548 ------------------ .../procps/patches/ps_cgroup_display.patch | 157 ----- srcpkgs/procps/patches/ps_size_sz.patch | 29 - .../procps/patches/ps_supgid_display.patch | 446 -------------- srcpkgs/procps/patches/readproc_c.patch | 25 - .../procps/patches/readproc_double_free.patch | 21 - srcpkgs/procps/patches/series | 69 --- srcpkgs/procps/patches/skill.1.patch | 116 ---- srcpkgs/procps/patches/skill_multiarg.patch | 18 - srcpkgs/procps/patches/skill_null_argv.patch | 14 - srcpkgs/procps/patches/skill_perror.patch | 16 - srcpkgs/procps/patches/slabtop_1.patch | 97 ---- srcpkgs/procps/patches/slabtop_once.patch | 116 ---- srcpkgs/procps/patches/sysctl.8.patch | 147 ----- srcpkgs/procps/patches/sysctl_options.patch | 46 -- .../procps/patches/sysinfo_7_numbers.patch | 36 -- srcpkgs/procps/patches/sysinfo_elfnote.patch | 23 - .../patches/sysinfo_kfreebsd_hertz.patch | 20 - srcpkgs/procps/patches/tload.1.patch | 15 - srcpkgs/procps/patches/tload_no_optargs.patch | 16 - srcpkgs/procps/patches/top.1.patch | 416 ------------- srcpkgs/procps/patches/top.1_cpustates.patch | 50 -- srcpkgs/procps/patches/top_1_swap.patch | 23 - srcpkgs/procps/patches/top_c_resize.patch | 75 --- srcpkgs/procps/patches/top_highlight.patch | 19 - srcpkgs/procps/patches/top_irix.patch | 44 -- srcpkgs/procps/patches/top_mintime.patch | 16 - srcpkgs/procps/patches/top_no_openproc.patch | 21 - srcpkgs/procps/patches/top_nohz.patch | 14 - srcpkgs/procps/patches/top_numeric_args.patch | 98 ---- srcpkgs/procps/patches/top_stdin_eof.patch | 20 - srcpkgs/procps/patches/top_uid_length.patch | 16 - .../procps/patches/top_username_parse.patch | 15 - srcpkgs/procps/patches/uptime.1.patch | 48 -- srcpkgs/procps/patches/vmstat.8.patch | 109 ---- srcpkgs/procps/patches/vmstat_headers.patch | 148 ----- .../procps/patches/vmstat_part_format.patch | 77 --- srcpkgs/procps/patches/vmstat_units.patch | 52 -- srcpkgs/procps/patches/w-bassman.patch | 88 --- srcpkgs/procps/patches/w.1.patch | 70 --- srcpkgs/procps/patches/w_columns.patch | 30 - srcpkgs/procps/patches/w_envlength.patch | 173 ------ srcpkgs/procps/patches/w_time.patch | 16 - srcpkgs/procps/patches/w_userproc.patch | 15 - srcpkgs/procps/patches/watch.1.patch | 103 ---- srcpkgs/procps/patches/watch_8bitchar.patch | 15 - .../procps/patches/watch_ansi_colour.patch | 180 ------ srcpkgs/procps/patches/watch_exec_beep.patch | 259 --------- .../procps/patches/watch_precision_time.patch | 216 ------- srcpkgs/procps/patches/watch_unicode.patch | 292 ---------- srcpkgs/procps/template | 11 +- srcpkgs/psmisc/template | 1 + srcpkgs/python/python-devel.template | 4 +- srcpkgs/python/template | 2 +- srcpkgs/qemu/template | 1 + srcpkgs/readline/readline-devel.template | 3 +- srcpkgs/readline/template | 1 + srcpkgs/ruby/ruby-devel.template | 3 +- srcpkgs/ruby/template | 17 +- srcpkgs/texinfo/template | 2 +- srcpkgs/tmux/template | 6 +- srcpkgs/uml-utilities/template | 1 + srcpkgs/util-linux/template | 5 +- srcpkgs/vim/template | 5 +- srcpkgs/vte/template | 1 + srcpkgs/vte/vte-devel.template | 2 + srcpkgs/vte/vte-python.template | 2 + srcpkgs/xen/template | 2 +- srcpkgs/xen/xen-devel.template | 2 +- srcpkgs/xterm/template | 1 + 133 files changed, 913 insertions(+), 5950 deletions(-) delete mode 100644 srcpkgs/procps/patches/10_ps.1.patch delete mode 100644 srcpkgs/procps/patches/complain_unmounted_proc.patch delete mode 100644 srcpkgs/procps/patches/free.1.patch delete mode 100644 srcpkgs/procps/patches/gnu-kbsd-version.patch create mode 100644 srcpkgs/procps/patches/groff-top-manpage.patch delete mode 100644 srcpkgs/procps/patches/kill.1.patch delete mode 100644 srcpkgs/procps/patches/kill_warncr.patch delete mode 100644 srcpkgs/procps/patches/library_map_freeproc.patch delete mode 100644 srcpkgs/procps/patches/makefile_dev_null.patch delete mode 100644 srcpkgs/procps/patches/module_mk_shared.patch delete mode 100644 srcpkgs/procps/patches/output_sort_time.patch delete mode 100644 srcpkgs/procps/patches/path_max.patch delete mode 100644 srcpkgs/procps/patches/pgrep.1.patch delete mode 100644 srcpkgs/procps/patches/pgrep_c_option.patch delete mode 100644 srcpkgs/procps/patches/pgrep_start_time.patch delete mode 100644 srcpkgs/procps/patches/pgrep_usage_exitcode.patch delete mode 100644 srcpkgs/procps/patches/pmap.1.patch delete mode 100644 srcpkgs/procps/patches/pmaps_smaps.patch delete mode 100644 srcpkgs/procps/patches/proc_version_constructor.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-free-hlmem.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-longcmd.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-ps-man-fmt.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-psman.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-slabtop-once.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-clrscr.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-cpu0.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-env-cpuloop.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-manpage.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-remcpu.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-top-sorthigh.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-w-best.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.7-watch-unicode.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.8-linux-ver-init.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.8-setlocale.patch create mode 100644 srcpkgs/procps/patches/procps-3.2.8-threads.patch delete mode 100644 srcpkgs/procps/patches/ps_1_flt_output.patch delete mode 100644 srcpkgs/procps/patches/ps_1_options.patch delete mode 100644 srcpkgs/procps/patches/ps_cgroup_display.patch delete mode 100644 srcpkgs/procps/patches/ps_size_sz.patch delete mode 100644 srcpkgs/procps/patches/ps_supgid_display.patch delete mode 100644 srcpkgs/procps/patches/readproc_c.patch delete mode 100644 srcpkgs/procps/patches/readproc_double_free.patch delete mode 100644 srcpkgs/procps/patches/series delete mode 100644 srcpkgs/procps/patches/skill.1.patch delete mode 100644 srcpkgs/procps/patches/skill_multiarg.patch delete mode 100644 srcpkgs/procps/patches/skill_null_argv.patch delete mode 100644 srcpkgs/procps/patches/skill_perror.patch delete mode 100644 srcpkgs/procps/patches/slabtop_1.patch delete mode 100644 srcpkgs/procps/patches/slabtop_once.patch delete mode 100644 srcpkgs/procps/patches/sysctl.8.patch delete mode 100644 srcpkgs/procps/patches/sysctl_options.patch delete mode 100644 srcpkgs/procps/patches/sysinfo_7_numbers.patch delete mode 100644 srcpkgs/procps/patches/sysinfo_elfnote.patch delete mode 100644 srcpkgs/procps/patches/sysinfo_kfreebsd_hertz.patch delete mode 100644 srcpkgs/procps/patches/tload.1.patch delete mode 100644 srcpkgs/procps/patches/tload_no_optargs.patch delete mode 100644 srcpkgs/procps/patches/top.1.patch delete mode 100644 srcpkgs/procps/patches/top.1_cpustates.patch delete mode 100644 srcpkgs/procps/patches/top_1_swap.patch delete mode 100644 srcpkgs/procps/patches/top_c_resize.patch delete mode 100644 srcpkgs/procps/patches/top_highlight.patch delete mode 100644 srcpkgs/procps/patches/top_irix.patch delete mode 100644 srcpkgs/procps/patches/top_mintime.patch delete mode 100644 srcpkgs/procps/patches/top_no_openproc.patch delete mode 100644 srcpkgs/procps/patches/top_nohz.patch delete mode 100644 srcpkgs/procps/patches/top_numeric_args.patch delete mode 100644 srcpkgs/procps/patches/top_stdin_eof.patch delete mode 100644 srcpkgs/procps/patches/top_uid_length.patch delete mode 100644 srcpkgs/procps/patches/top_username_parse.patch delete mode 100644 srcpkgs/procps/patches/uptime.1.patch delete mode 100644 srcpkgs/procps/patches/vmstat.8.patch delete mode 100644 srcpkgs/procps/patches/vmstat_headers.patch delete mode 100644 srcpkgs/procps/patches/vmstat_part_format.patch delete mode 100644 srcpkgs/procps/patches/vmstat_units.patch delete mode 100644 srcpkgs/procps/patches/w-bassman.patch delete mode 100644 srcpkgs/procps/patches/w.1.patch delete mode 100644 srcpkgs/procps/patches/w_columns.patch delete mode 100644 srcpkgs/procps/patches/w_envlength.patch delete mode 100644 srcpkgs/procps/patches/w_time.patch delete mode 100644 srcpkgs/procps/patches/w_userproc.patch delete mode 100644 srcpkgs/procps/patches/watch.1.patch delete mode 100644 srcpkgs/procps/patches/watch_8bitchar.patch delete mode 100644 srcpkgs/procps/patches/watch_ansi_colour.patch delete mode 100644 srcpkgs/procps/patches/watch_exec_beep.patch delete mode 100644 srcpkgs/procps/patches/watch_precision_time.patch delete mode 100644 srcpkgs/procps/patches/watch_unicode.patch diff --git a/srcpkgs/aspell/aspell-devel.template b/srcpkgs/aspell/aspell-devel.template index 836a3e478e..801128c4f4 100644 --- a/srcpkgs/aspell/aspell-devel.template +++ b/srcpkgs/aspell/aspell-devel.template @@ -5,9 +5,9 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -revision=3 +revision=4 -Add_dependency run ncursesw-devel +Add_dependency run ncurses-devel Add_dependency run libstdc++-devel Add_dependency run aspell diff --git a/srcpkgs/aspell/template b/srcpkgs/aspell/template index b992b2397f..d3bbc2eff8 100644 --- a/srcpkgs/aspell/template +++ b/srcpkgs/aspell/template @@ -1,7 +1,7 @@ # Template file for 'aspell' pkgname=aspell version=0.60.6 -revision=3 +revision=4 distfiles="ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${version}.tar.gz" build_style=gnu_configure configure_args="--enable-compile-in-filters" @@ -21,7 +21,7 @@ long_desc=" subpackages="$pkgname-devel" Add_dependency run libgcc Add_dependency run glibc -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run libstdc++ Add_dependency full perl ">=0" -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel diff --git a/srcpkgs/bash/template b/srcpkgs/bash/template index 8181638503..726e24f19a 100644 --- a/srcpkgs/bash/template +++ b/srcpkgs/bash/template @@ -2,6 +2,7 @@ pkgname=bash _bash_patchlevel=000 _bash_distver=4.2 +revision=1 #version=${_bash_distver}.${_bash_patchlevel} version=${_bash_distver} wrksrc=${pkgname}-${_bash_distver} diff --git a/srcpkgs/cmake/template b/srcpkgs/cmake/template index 781396b441..ca30e12916 100644 --- a/srcpkgs/cmake/template +++ b/srcpkgs/cmake/template @@ -1,6 +1,7 @@ # Template file for 'cmake' pkgname=cmake version=2.8.2 +revision=1 distfiles="http://www.cmake.org/files/v2.8/$pkgname-$version.tar.gz" build_style=configure configure_script=./bootstrap diff --git a/srcpkgs/dialog/template b/srcpkgs/dialog/template index 7f1e323e82..3219f2c87c 100644 --- a/srcpkgs/dialog/template +++ b/srcpkgs/dialog/template @@ -2,6 +2,7 @@ pkgname=dialog _distver=1.1 _date=20110118 +revision=1 version=${_distver}.${_date} wrksrc=${pkgname}-${_distver}-${_date} distfiles="ftp://invisible-island.net/${pkgname}/${pkgname}-${_distver}-${_date}.tgz" @@ -18,6 +19,6 @@ long_desc=" guage box, checklist box, and radiolist box." Add_dependency run glibc -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency build gettext -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index 597e1b67ac..8975343ff5 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -1,6 +1,7 @@ # Template file for 'gdb' pkgname=gdb version=7.2 +revision=1 distfiles="http://ftp.gnu.org/gnu/gdb/gdb-$version.tar.bz2" build_style=gnu_configure configure_args="--disable-nls" diff --git a/srcpkgs/gettext/gettext-libs.template b/srcpkgs/gettext/gettext-libs.template index 3b9299b4b6..0e61d97297 100644 --- a/srcpkgs/gettext/gettext-libs.template +++ b/srcpkgs/gettext/gettext-libs.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains the ${sourcepkg} shared libraries." +revision=1 + Add_dependency run glibc Add_dependency run ncurses-libs diff --git a/srcpkgs/gettext/template b/srcpkgs/gettext/template index 72720f29dd..c358b22d42 100644 --- a/srcpkgs/gettext/template +++ b/srcpkgs/gettext/template @@ -1,6 +1,7 @@ # Template build file for 'gettext'. pkgname=gettext version=0.18.1.1 +revision=1 distfiles="http://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--disable-java --disable-native-java --disable-csharp @@ -17,7 +18,6 @@ long_desc=" subpackages="$pkgname-devel $pkgname-libs" Add_dependency run glibc -Add_dependency run ncurses-libs Add_dependency run gettext-libs Add_dependency run libgomp Add_dependency build ncurses-devel diff --git a/srcpkgs/grub/template b/srcpkgs/grub/template index 3a418e37d0..e1e3b525ec 100644 --- a/srcpkgs/grub/template +++ b/srcpkgs/grub/template @@ -1,9 +1,9 @@ # Template file for 'grub' pkgname=grub -revision=1 _distver=1.99 _patchver=rc1 version=${_distver}${_patchver} +revision=2 wrksrc="grub-${_distver}~${_patchver}" distfiles="ftp://alpha.gnu.org/gnu/grub/grub-${_distver}~${_patchver}.tar.gz" build_style=gnu_configure diff --git a/srcpkgs/heimdal/heimdal-devel.template b/srcpkgs/heimdal/heimdal-devel.template index df1584c993..0a459583f4 100644 --- a/srcpkgs/heimdal/heimdal-devel.template +++ b/srcpkgs/heimdal/heimdal-devel.template @@ -5,7 +5,7 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -revision=1 +revision=2 noverifyrdeps=yes Add_dependency run db-devel diff --git a/srcpkgs/heimdal/template b/srcpkgs/heimdal/template index a639a77744..fdafa6f8ab 100644 --- a/srcpkgs/heimdal/template +++ b/srcpkgs/heimdal/template @@ -1,7 +1,7 @@ # Template file for 'heimdal' pkgname=heimdal version=1.3.1 -revision=3 +revision=4 distfiles="http://www.h5l.org/dist/src/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--enable-shared=yes --without-x --datadir=/var/lib/heimdal diff --git a/srcpkgs/htop/template b/srcpkgs/htop/template index d9e1dbbd2e..f8f383ab78 100644 --- a/srcpkgs/htop/template +++ b/srcpkgs/htop/template @@ -1,6 +1,7 @@ # Template file for 'htop' pkgname=htop version=0.9 +revision=1 distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--enable-unicode --enable-openvz --enable-vserver" @@ -12,5 +13,11 @@ long_desc=" application (for console or X terminals) and requires ncurses." Add_dependency run glibc -Add_dependency run ncursesw -Add_dependency build ncursesw-devel +Add_dependency run ncurses-libs +Add_dependency build bison +Add_dependency build ncurses-devel + +pre_configure() +{ + sed -i 's|ncursesw/curses.h|curses.h|' RichString.h RichString.c configure +} diff --git a/srcpkgs/hunspell/hunspell-devel.template b/srcpkgs/hunspell/hunspell-devel.template index c1b1373e3e..4fb4c00a16 100644 --- a/srcpkgs/hunspell/hunspell-devel.template +++ b/srcpkgs/hunspell/hunspell-devel.template @@ -5,10 +5,10 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -revision=2 +revision=3 Add_dependency run libstdc++-devel -Add_dependency run ncursesw-devel +Add_dependency run ncurses-devel Add_dependency run hunspelll do_install() diff --git a/srcpkgs/hunspell/template b/srcpkgs/hunspell/template index 478908dfe1..7cbc81a1cb 100644 --- a/srcpkgs/hunspell/template +++ b/srcpkgs/hunspell/template @@ -1,7 +1,7 @@ # Template file for 'hunspell' pkgname=hunspell version=1.2.8 -revision=2 +revision=3 distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--with-ui" @@ -25,8 +25,8 @@ subpackages="$pkgname-devel" Add_dependency run libgcc Add_dependency run glibc Add_dependency run libstdc++ -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency build pkg-config Add_dependency build bison Add_dependency build libstdc++-devel -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel diff --git a/srcpkgs/irssi/irssi-devel.template b/srcpkgs/irssi/irssi-devel.template index 47dc91dfef..772694a159 100644 --- a/srcpkgs/irssi/irssi-devel.template +++ b/srcpkgs/irssi/irssi-devel.template @@ -5,11 +5,13 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." +revision=1 + Add_dependency run perl Add_dependency run pkg-config Add_dependency run glib-devel Add_dependency run openssl-devel -Add_dependency run ncursesw-devel +Add_dependency run ncurses-devel Add_dependency run irssi do_install() diff --git a/srcpkgs/irssi/template b/srcpkgs/irssi/template index 688e1f15df..aa52971d18 100644 --- a/srcpkgs/irssi/template +++ b/srcpkgs/irssi/template @@ -1,7 +1,7 @@ # Template build file for 'irssi' pkgname=irssi version=0.8.15 -revision=1 +revision=2 distfiles="http://www.irssi.org/files/$pkgname-$version.tar.bz2" configure_args="--with-proxy --with-perl=module" build_style=gnu_configure @@ -22,17 +22,11 @@ Add_dependency run glibc Add_dependency run zlib Add_dependency run glib Add_dependency run libssl -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency build perl Add_dependency build pkg-config Add_dependency build zlib-devel Add_dependency build glib-devel Add_dependency build openssl-devel -Add_dependency build ncursesw-devel - -pre_configure() -{ - sed -i -e "s|/usr/include/ncurses|/usr/include/ncursesw|g" \ - -e "s|-lncurses|-lncursesw|g" ${wrksrc}/configure -} +Add_dependency build ncurses-devel diff --git a/srcpkgs/lame/lame-devel.template b/srcpkgs/lame/lame-devel.template index 20400cc81b..69d36a4b4b 100644 --- a/srcpkgs/lame/lame-devel.template +++ b/srcpkgs/lame/lame-devel.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." +revision=1 + Add_dependency run glibc-devel Add_dependency run ncurses-devel Add_dependency run lame diff --git a/srcpkgs/lame/template b/srcpkgs/lame/template index b67b39b638..ba892548a2 100644 --- a/srcpkgs/lame/template +++ b/srcpkgs/lame/template @@ -1,6 +1,7 @@ # Template file for 'lame' pkgname=lame version=3.98.4 +revision=1 distfiles="${SOURCEFORGE_SITE}/lame/lame-${version}.tar.gz" build_style=gnu_configure configure_args="--enable-nasm --enable-shared" diff --git a/srcpkgs/less/template b/srcpkgs/less/template index fd866f4111..018c4a0d28 100644 --- a/srcpkgs/less/template +++ b/srcpkgs/less/template @@ -1,7 +1,7 @@ # Template file for 'less' pkgname=less version=436 -revision=2 +revision=3 distfiles="http://www.greenwoodsoftware.com/less/less-$version.tar.gz" build_style=gnu_configure short_desc="Pager program similar to more(1)" @@ -16,5 +16,5 @@ long_desc=" terminals. There is even limited support for hardcopy terminals." Add_dependency run glibc -Add_dependency run ncursesw -Add_dependency build ncursesw-devel +Add_dependency run ncurses-libs +Add_dependency build ncurses-devel diff --git a/srcpkgs/lftp/template b/srcpkgs/lftp/template index 66a9960a7a..d433facab8 100644 --- a/srcpkgs/lftp/template +++ b/srcpkgs/lftp/template @@ -1,6 +1,7 @@ # Template file for 'lftp' pkgname=lftp version=4.1.3 +revision=1 distfiles="http://ftp.yars.free.net/pub/source/lftp/lftp-$version.tar.bz2" build_style=gnu_configure configure_args="--with-modules --disable-rpath --without-included-regex diff --git a/srcpkgs/libcdio/libcdio-devel.template b/srcpkgs/libcdio/libcdio-devel.template index aa515552e5..ad2be4badd 100644 --- a/srcpkgs/libcdio/libcdio-devel.template +++ b/srcpkgs/libcdio/libcdio-devel.template @@ -5,7 +5,7 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -revision=1 +revision=2 Add_dependency run ncurses-devel Add_dependency run libcddb-devel diff --git a/srcpkgs/libcdio/template b/srcpkgs/libcdio/template index bac2f74b41..1a67f1dc5b 100644 --- a/srcpkgs/libcdio/template +++ b/srcpkgs/libcdio/template @@ -1,7 +1,7 @@ # Template file for 'libcdio' pkgname=libcdio version=0.82 -revision=2 +revision=3 distfiles="http://ftp.gnu.org/gnu/libcdio/$pkgname-$version.tar.gz" build_style=gnu_configure short_desc="CD-ROM access library" diff --git a/srcpkgs/mysql/mysql-client.template b/srcpkgs/mysql/mysql-client.template index 37607e5d00..a6a1376c25 100644 --- a/srcpkgs/mysql/mysql-client.template +++ b/srcpkgs/mysql/mysql-client.template @@ -6,10 +6,12 @@ long_desc="${long_desc} This package includes the client binaries and the additional tools innotop and mysqlreport." +revision=1 + Add_dependency run libgcc Add_dependency run glibc Add_dependency run libstdc++ -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run libmysqlclient Add_dependency run zlib Add_dependency run tcp_wrappers-libs diff --git a/srcpkgs/mysql/mysql-ndb.template b/srcpkgs/mysql/mysql-ndb.template index 76fcf26f46..f93020df23 100644 --- a/srcpkgs/mysql/mysql-ndb.template +++ b/srcpkgs/mysql/mysql-ndb.template @@ -6,10 +6,12 @@ long_desc="${long_desc} This package includes the binaries for the MySQL NDB (Network Database) component." +revision=1 + Add_dependency run libgcc Add_dependency run glibc Add_dependency run libstdc++ -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run zlib Add_dependency run readline diff --git a/srcpkgs/mysql/template b/srcpkgs/mysql/template index eee4e58349..1cbee53864 100644 --- a/srcpkgs/mysql/template +++ b/srcpkgs/mysql/template @@ -50,7 +50,7 @@ Add_dependency run mysql-client Add_dependency build libstdc++-devel Add_dependency build zlib-devel Add_dependency build tcp_wrappers-devel -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel Add_dependency build openssl-devel Add_dependency build readline-devel Add_dependency full perl ">=0" diff --git a/srcpkgs/parted/template b/srcpkgs/parted/template index 847f453aa7..7f144e1bed 100644 --- a/srcpkgs/parted/template +++ b/srcpkgs/parted/template @@ -1,6 +1,7 @@ # Template file for 'parted' pkgname=parted version=2.3 +revision=1 distfiles="http://ftp.gnu.org/gnu/parted/parted-$version.tar.xz" build_style=gnu_configure configure_args="--without-included-regex --with-gnu-ld diff --git a/srcpkgs/powertop/template b/srcpkgs/powertop/template index 5d3bf29c33..550eff2dc7 100644 --- a/srcpkgs/powertop/template +++ b/srcpkgs/powertop/template @@ -1,6 +1,7 @@ # Template file for 'powertop' pkgname=powertop version=1.97 +revision=1 distfiles="http://www.kernel.org/pub/linux/status/$pkgname/$pkgname-$version.tar.bz2" build_style=gnu_makefile short_desc="Linux tool to find out what is using power on a laptop" @@ -24,10 +25,10 @@ Add_dependency run libstdc++ Add_dependency run libnl Add_dependency run pciutils Add_dependency run zlib -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency build libnl-devel Add_dependency build pciutils-devel Add_dependency build zlib-devel Add_dependency build gettext -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel diff --git a/srcpkgs/procps/patches/10_ps.1.patch b/srcpkgs/procps/patches/10_ps.1.patch deleted file mode 100644 index c07203ea24..0000000000 --- a/srcpkgs/procps/patches/10_ps.1.patch +++ /dev/null @@ -1,62 +0,0 @@ -Author: -Description: ps.1 normal indent widths -pri field explained ---no-heading comment is an alias for --no-headers -Removed setproctitle(1) reference -Bug-Debian: http://bugs.debian.org/465761 -Bug-Debian: http://bugs.debian.org/529045 -Index: b/ps/ps.1 -=================================================================== ---- a/ps/ps.1 2009-11-24 20:53:06.000000000 +1100 -+++ b/ps/ps.1 2009-11-24 21:00:31.000000000 +1100 -@@ -18,19 +18,13 @@ - .nh - .if n .ss 12 0 - .\" --.\" See /usr/share/groff/current/tmac/an-old.tmac for what these do. --.\" Setting them to zero provides extra space, but only do that for --.\" plain text output. PostScript and such will remain indented. --.if n .nr IN 0n --.if n .nr an-prevailing-indent 0n --.\" - .\" - .\" ColSize is used for the format spec table. - .\" It's the left margin, minus the right, minus - .\" the space needed for the 1st two columns. - .\" Making it messy: inches, ens, points, scaled points... - .\" --.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n) -+.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-26u)n) - .\" - .\" This is for command options - .nr OptSize (16u) -@@ -499,7 +493,7 @@ - .opt c - Show the true command name. This is derived from the name of the - executable file, rather than from the argv value. Command arguments --and any modifications to them (see\ \fIsetproctitle\fR(3)) are -+and any modifications to them are - thus not shown. This option - effectively turns the \fBargs\fR format keyword into the \fBcomm\fR - format keyword; it is useful with the \fB\-f\fR format option and with -@@ -588,7 +582,8 @@ - repeat header lines, one per page of output - - .opt \-\-no\-headers --print no header line at all -+print no header line at all. \-\-no\-heading is an alias for this -+option. - - .opt \-\-lines \ n - set screen height -@@ -1159,6 +1154,10 @@ - parent process ID. - T} - -+pri PRI T{ -+priority of the process. Higher number means lower priority -+T} -+ - psr PSR T{ - processor that process is currently assigned to. - T} diff --git a/srcpkgs/procps/patches/complain_unmounted_proc.patch b/srcpkgs/procps/patches/complain_unmounted_proc.patch deleted file mode 100644 index 6558a2e217..0000000000 --- a/srcpkgs/procps/patches/complain_unmounted_proc.patch +++ /dev/null @@ -1,19 +0,0 @@ -Author: -Description: Complain when /proc/version cannot be found instead of -exiting silently. -Index: b/proc/version.c -=================================================================== ---- a/proc/version.c 2009-11-24 21:00:44.000000000 +1100 -+++ b/proc/version.c 2009-11-24 21:00:46.000000000 +1100 -@@ -39,8 +39,10 @@ - FILE *fp; - char buf[256]; - -- if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */ -+ if ( (fp=fopen("/proc/version","r")) == NULL) { -+ fprintf(stderr, "Cannot find /proc/version - is /proc mounted?\n"); - exit(1); -+ } - if (fgets(buf, 256, fp) == NULL) { - fprintf(stderr, "Cannot read kernel version from /proc/version\n"); - fclose(fp); diff --git a/srcpkgs/procps/patches/free.1.patch b/srcpkgs/procps/patches/free.1.patch deleted file mode 100644 index 22587a872e..0000000000 --- a/srcpkgs/procps/patches/free.1.patch +++ /dev/null @@ -1,108 +0,0 @@ -Description: Several bugs fixed for the free manpage: - -g flag documented #286900 - hypen escaped #282168 - Reformated completely #534198 - free -o better documented #526604 -Bug-Debian: http://bugs.debian.org/286900 -Bug-Debian: http://bugs.debian.org/282168 -Bug-Debian: http://bugs.debian.org/534198 -Bug-Debian: http://bugs.debian.org/526604 -Author: ---- a/free.1 -+++ b/free.1 -@@ -1,47 +1,67 @@ - .\" -*-Nroff-*- - .\" This page Copyright (C) 1993 Matt Welsh, mdw@sunsite.unc.edu. - .\" Freely distributable under the terms of the GPL --.TH FREE 1 "20 Mar 1993 " "Cohesive Systems" "Linux User's Manual" -+.TH FREE 1 "5 Oct 2009 " "Cohesive Systems" "Linux User's Manual" - .SH NAME - free \- Display amount of free and used memory in the system - .SH SYNOPSIS --.BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s" --.I delay --.RB "] [" "\-t" "] [" "\-V" ] -+.B free -+.RB [ \-b | \-k | \-m | \-g ] -+.RB [ \-c -+.IR count ] -+.RB [ \-l ] -+.RB [ \-o ] -+.RB [ \-t ] -+.RB [ \-s -+.IR delay ] -+.RB [ \-V ] - .SH DESCRIPTION - \fBfree\fP displays the total amount of free and used physical and swap - memory in the system, as well as the buffers used by the kernel. - The shared memory column should be ignored; it is obsolete. --.SS Options --The \fB-b\fP switch displays the amount of memory in bytes; the --\fB-k\fP switch (set by default) displays it in kilobytes; the \fB-m\fP --switch displays it in megabytes. --.PP --The \fB-t\fP switch displays a line containing the totals. --.PP --The \fB-o\fP switch disables the display of a "buffer adjusted" line. --If the -o option is not specified, \fBfree\fP subtracts buffer memory --from the used memory and adds it to the free memory reported. --.PP --The \fB-s\fP switch activates continuous polling \fIdelay\fP seconds apart. You -+.SS OPTIONS -+.TP -+\fB\-b\fR -+Display the amount of memory in bytes. -+.TP -+\fB\-c\fR \fIcount\fR -+Display the result \fIcount\fR times. Requires the \fB\-s\fR option. -+.TP -+\fB\-g\fR -+Display the amount of memory in gigabytes. -+.TP -+\fB\-k\fR -+Display the amount of memory in kilobytes. This is the default. -+.TP -+\fB\-l\fR -+Show detailed low and high memory statistics. -+.TP -+\fB\-m\fR -+Display the amount of memory in megabytes. -+.TP -+\fB\-o\fR -+Display the output in old format, the only difference being this option -+will disable the display of the "buffer adjusted" line. -+.TP -+\fB\-s\fR -+Continuously display the result \fIdelay\fP seconds apart. You - may actually specify any floating point number for \fIdelay\fP, - .BR usleep (3) - is used for microsecond resolution delay times. --.PP --The \fB\-V\fP displays version information. -+.TP -+\fB\-t\fR -+Display a line showing the column totals. -+.TP -+\fB\-V\fR -+Display version information. - .SH FILES --.ta --.IR /proc/meminfo "\-\- memory information" -+.nf -+/proc/meminfo memory information - .fi -- --.SH "SEE ALSO" --.BR ps (1), --.BR slabtop (1), --.BR vmstat (8), --.BR top(1) -- - .SH AUTHORS - Written by Brian Edmonds. - - Send bug reports to -- -+.SH "SEE ALSO" -+.BR ps "(1), " slabtop "(1), " top "(1), " vmstat (8). -+.\"{{{}}} diff --git a/srcpkgs/procps/patches/gnu-kbsd-version.patch b/srcpkgs/procps/patches/gnu-kbsd-version.patch deleted file mode 100644 index 693dc68eb6..0000000000 --- a/srcpkgs/procps/patches/gnu-kbsd-version.patch +++ /dev/null @@ -1,36 +0,0 @@ -Author: -Description: Rework version parsing so its ok with other OSes -Index: b/proc/version.c -=================================================================== ---- a/proc/version.c 2009-11-24 20:53:02.000000000 +1100 -+++ b/proc/version.c 2009-11-24 21:00:44.000000000 +1100 -@@ -35,15 +35,23 @@ - - static void init_Linux_version(void) __attribute__((constructor)); - static void init_Linux_version(void) { -- static struct utsname uts; - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ -+ FILE *fp; -+ char buf[256]; - -- if (uname(&uts) == -1) /* failure implies impending death */ -- exit(1); -- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) -+ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */ -+ exit(1); -+ if (fgets(buf, 256, fp) == NULL) { -+ fprintf(stderr, "Cannot read kernel version from /proc/version\n"); -+ fclose(fp); -+ exit(1); -+ } -+ fclose(fp); -+ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 3) - fprintf(stderr, /* *very* unlikely to happen by accident */ - "Non-standard uts for running kernel:\n" -- "release %s=%d.%d.%d gives version code %d\n", -- uts.release, x, y, z, LINUX_VERSION(x,y,z)); -+ "release %s=%d.%d.%d gives version code %d\n", -+ buf, -+ x, y, z, LINUX_VERSION(x,y,z)); - linux_version_code = LINUX_VERSION(x, y, z); - } diff --git a/srcpkgs/procps/patches/groff-top-manpage.patch b/srcpkgs/procps/patches/groff-top-manpage.patch new file mode 100644 index 0000000000..625053c725 --- /dev/null +++ b/srcpkgs/procps/patches/groff-top-manpage.patch @@ -0,0 +1,39 @@ +diff -Naur procps-3.2.8-orig//top.1 procps-3.2.8/top.1 +--- procps-3.2.8-orig//top.1 2010-11-19 00:43:13.000000000 -0500 ++++ procps-3.2.8/top.1 2010-11-19 00:44:06.000000000 -0500 +@@ -42,7 +42,7 @@ + .ds EM \ \fB\-\-\ \fR + \# - these two are for chuckles, makes great grammar + .ds Me top +-.ds ME \fBtop\fR ++.ds MM \fBtop\fR + \# - other misc strings for consistent usage/emphasis + .ds F \fIOff\fR + .ds O \fIOn\fR +@@ -85,7 +85,7 @@ + .\" ---------------------------------------------------------------------- + .SH SYNOPSIS + .\" ---------------------------------------------------------------------- +-\*(ME \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI ++\*(MM \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI + iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...] + + The traditional switches '-' and whitespace are optional. +@@ -94,7 +94,7 @@ + .\" ---------------------------------------------------------------------- + .SH DESCRIPTION + .\" ---------------------------------------------------------------------- +-The \*(ME program provides a dynamic real-time view of a running system. ++The \*(MM program provides a dynamic real-time view of a running system. + It can display\fB system\fR summary information as well as a list of\fB + tasks\fR currently being managed by the Linux kernel. + The types of system summary information shown and the types, order and +@@ -104,7 +104,7 @@ + The program provides a limited interactive interface for process + manipulation as well as a much more extensive interface for personal + configuration \*(EM encompassing every aspect of its operation. +-And while \*(ME is referred to throughout this document, you are free ++And while \*(MM is referred to throughout this document, you are free + to name the program anything you wish. + That new name, possibly an alias, will then be reflected on \*(Me's display + and used when reading and writing a \*(CF. diff --git a/srcpkgs/procps/patches/kill.1.patch b/srcpkgs/procps/patches/kill.1.patch deleted file mode 100644 index 5a8ae3e453..0000000000 --- a/srcpkgs/procps/patches/kill.1.patch +++ /dev/null @@ -1,147 +0,0 @@ -Author: Craig Small -Description: Fix kill.1 manual page -Changed may to cannot or might -Bug-Debian: http://bugs.debian.org/375739 -Index: b/kill.1 -=================================================================== ---- a/kill.1 2009-11-24 20:53:04.000000000 +1100 -+++ b/kill.1 2009-11-24 21:00:37.000000000 +1100 -@@ -10,23 +10,18 @@ - kill \- send a signal to a process - - .SH SYNOPSIS --.TS --l l. --kill pid ... Send SIGTERM to every process listed. --kill -signal pid ... Send a signal to every process listed. --kill -s signal pid ... Send a signal to every process listed. --kill -l List all signal names. --kill -L List all signal names in a nice table. --kill -l signal Convert a signal number into a name. --kill -V,--version Show version of program --.TE -+\fBkill\fR [ \-\fBsignal\fR | \-s \fBsignal\fR ] \fBpid\fR ... -+.br -+\fBkill\fR [ \-L | -V, \-\-version ] -+.br -+\fBkill\fR \-l [ \fBsignal\fR ] - - .SH DESCRIPTION --The default signal for kill is TERM. Use -l or -L to list available signals. -+The default signal for kill is TERM. Use \-l or \-L to list available signals. - Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. --Alternate signals may be specified in three ways: -9 -SIGKILL -KILL. -+Alternate signals may be specified in three ways: \-9 \-SIGKILL \-KILL. - Negative PID values may be used to choose whole process groups; see the --PGID column in ps command output. A PID of -1 is special; it indicates -+PGID column in ps command output. A PID of \-1 is special; it indicates - all processes except the kill process itself and init. - - .SH SIGNALS -@@ -37,12 +32,11 @@ - lB rB lB lB - lfCW r l l. - Name Num Action Description --.TH - 0 0 n/a exit code indicates if a signal may be sent - ALRM 14 exit - HUP 1 exit - INT 2 exit --KILL 9 exit this signal may not be blocked -+KILL 9 exit cannot be blocked - PIPE 13 exit - POLL exit - PROF exit -@@ -50,15 +44,15 @@ - USR1 exit - USR2 exit - VTALRM exit --STKFLT exit may not be implemented --PWR ignore may exit on some systems -+STKFLT exit might not be implemented -+PWR ignore might exit on some systems - WINCH ignore - CHLD ignore - URG ignore --TSTP stop may interact with the shell --TTIN stop may interact with the shell --TTOU stop may interact with the shell --STOP stop this signal may not be blocked -+TSTP stop might interact with the shell -+TTIN stop might interact with the shell -+TTOU stop might interact with the shell -+STOP stop cannot be blocked - CONT restart continue if stopped, otherwise ignore - ABRT 6 core - FPE 8 core -@@ -66,11 +60,11 @@ - QUIT 3 core - SEGV 11 core - TRAP 5 core --SYS core may not be implemented --EMT core may not be implemented --BUS core core dump may fail --XCPU core core dump may fail --XFSZ core core dump may fail -+SYS core might not be implemented -+EMT core might not be implemented -+BUS core core dump might fail -+XCPU core core dump might fail -+XFSZ core core dump might fail - .TE - - .SH NOTES -@@ -79,36 +73,30 @@ - the conflict. - - .SH EXAMPLES -- --.SS --.B "kill -9 -1" --.nf -+.TP -+.B kill \-9 \-1 - Kill all processes you can kill. --.fi --.PP --.SS --.B "kill -l 11" --.nf -+.TP -+.B kill \-l 11 - Translate number 11 into a signal name. --.fi --.PP --.SS --.B "kill -L" --.nf -+.TP -+.B kill -L - List the available signal choices in a nice table. --.fi --.PP --.SS --.B "kill 123 543 2341 3453" --.nf -+.TP -+.B kill 123 543 2341 3453 - Send the default signal, SIGTERM, to all those processes. --.fi --.PP -+ - .SH "SEE ALSO" --pkill(1) skill(1) kill(2) renice(1) nice(1) signal(7) killall(1) -+.BR pkill (1), -+.BR skill (1), -+.BR kill (2), -+.BR renice (1), -+.BR nice (1), -+.BR signal (7), -+.BR killall (1). - - .SH STANDARDS --This command meets appropriate standards. The -L flag is Linux-specific. -+This command meets appropriate standards. The \-L flag is Linux-specific. - - .SH AUTHOR - Albert Cahalan wrote kill in 1999 to replace a diff --git a/srcpkgs/procps/patches/kill_warncr.patch b/srcpkgs/procps/patches/kill_warncr.patch deleted file mode 100644 index 328dfaa28f..0000000000 --- a/srcpkgs/procps/patches/kill_warncr.patch +++ /dev/null @@ -1,25 +0,0 @@ -Author: -Description: Add CR to warning line -Bug-Debian: http://bugs.debian.org/331419 -Index: b/skill.c -=================================================================== ---- a/skill.c 2009-11-24 21:00:31.000000000 +1100 -+++ b/skill.c 2009-11-24 21:00:37.000000000 +1100 -@@ -128,7 +128,7 @@ - sprintf(buf, "/proc/%d/stat", pid); /* pid (cmd) state ppid pgrp session tty */ - fd = open(buf,O_RDONLY); - if(fd==-1){ /* process exited maybe */ -- if(pids && w_flag) printf("WARNING: process %d could not be found.",pid); -+ if(pids && w_flag) printf("WARNING: process %d could not be found.\n",pid); - return; - } - fstat(fd, &statbuf); -@@ -342,7 +342,7 @@ - }else{ - fprintf(stderr, - "Usage: snice [new priority] [options] process selection criteria\n" -- "Example: snice netscape crack +7\n" -+ "Example: snice +7 netscape crack \n" - "\n" - "The default priority is +4. (snice +4 ...)\n" - "Priority numbers range from +20 (slowest) to -20 (fastest).\n" diff --git a/srcpkgs/procps/patches/library_map_freeproc.patch b/srcpkgs/procps/patches/library_map_freeproc.patch deleted file mode 100644 index b57ae97ca9..0000000000 --- a/srcpkgs/procps/patches/library_map_freeproc.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: Craig Small -Description: Added freeproc to library.map -Index: b/proc/library.map -=================================================================== ---- a/proc/library.map 2009-11-24 20:53:03.000000000 +1100 -+++ b/proc/library.map 2009-11-24 21:00:40.000000000 +1100 -@@ -7,7 +7,7 @@ - - readproc; readtask; readproctab; readproctab2; look_up_our_self; escape_command; - escape_str; escape_strlist; -- openproc; closeproc; -+ openproc; closeproc; freeproc; - tty_to_dev; dev_to_tty; open_psdb_message; open_psdb; lookup_wchan; - display_version; procps_version; linux_version_code; - Hertz; smp_num_cpus; have_privs; diff --git a/srcpkgs/procps/patches/makefile_dev_null.patch b/srcpkgs/procps/patches/makefile_dev_null.patch deleted file mode 100644 index 8790156aec..0000000000 --- a/srcpkgs/procps/patches/makefile_dev_null.patch +++ /dev/null @@ -1,13 +0,0 @@ -Author: -Description: Make sure Makefile doesnt zot random files while checking GCC ---- a/Makefile -+++ b/Makefile -@@ -120,7 +120,7 @@ - # Unlike the kernel one, this check_gcc goes all the way to - # producing an executable. There might be a -m64 that works - # until you go looking for a 64-bit curses library. --check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) $(CURSESW) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) -+check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o will_this_file_really_exist.tmp $(CURSES) $(CURSESW) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ; rm -f will_this_file_really_exist.tmp) - - # Be 64-bit if at all possible. In a cross-compiling situation, one may - # do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT diff --git a/srcpkgs/procps/patches/module_mk_shared.patch b/srcpkgs/procps/patches/module_mk_shared.patch deleted file mode 100644 index 73ce2c7c61..0000000000 --- a/srcpkgs/procps/patches/module_mk_shared.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: Craig Small -Description: Made SHARED variable overwritable -Index: b/proc/module.mk -=================================================================== ---- a/proc/module.mk 2009-11-24 20:53:04.000000000 +1100 -+++ b/proc/module.mk 2009-11-24 21:00:38.000000000 +1100 -@@ -17,7 +17,7 @@ - # numbers for future use, the ELF soname can be set equal to the - # file name until some future date when a stable ABI is declared. - --SHARED := 1 -+SHARED ?= 1 - - # for lib$(NAME).so and /usr/include/($NAME) and such - NAME := proc diff --git a/srcpkgs/procps/patches/output_sort_time.patch b/srcpkgs/procps/patches/output_sort_time.patch deleted file mode 100644 index 32ec134fe8..0000000000 --- a/srcpkgs/procps/patches/output_sort_time.patch +++ /dev/null @@ -1,93 +0,0 @@ -Description: More ps time sorting -Author: Alfredo Esteban -Bug-Debian: http://bugs.debian.org/508435 -Author: -Index: b/ps/output.c -=================================================================== ---- a/ps/output.c 2009-11-24 20:53:06.000000000 +1100 -+++ b/ps/output.c 2009-11-24 21:00:30.000000000 +1100 -@@ -110,6 +110,20 @@ - return (int)(P->NAME) - (int)(Q->NAME); \ - } - -+#define cook_time(P) (P->utime + P->stime) / Hertz -+ -+#define cook_etime(P) seconds_since_boot - (unsigned long)(P->start_time / Hertz) -+ -+#define CMP_COOKED_TIME(NAME) \ -+static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \ -+ unsigned long p_time,q_time; \ -+ p_time=cook_ ##NAME (P); \ -+ q_time=cook_ ##NAME (Q); \ -+ if (p_time < q_time) return -1; \ -+ if (p_time > q_time) return 1; \ -+ return 0; \ -+} -+ - CMP_INT(rtprio) - CMP_SMALL(sched) - CMP_INT(cutime) -@@ -185,6 +199,9 @@ - - CMP_SMALL(state) - -+CMP_COOKED_TIME(time) -+CMP_COOKED_TIME(etime) -+ - /* approximation to: kB of address space that could end up in swap */ - static int sr_swapable(const proc_t* P, const proc_t* Q) { - unsigned long p_swapable = P->vm_data + P->vm_stack; -@@ -408,7 +425,7 @@ - unsigned long t; - unsigned dd,hh,mm,ss; - char *cp = outbuf; -- t = seconds_since_boot - (unsigned long)(pp->start_time / Hertz); -+ t = cook_etime(pp); - ss = t%60; - t /= 60; - mm = t%60; -@@ -476,7 +493,7 @@ - unsigned long t; - unsigned dd,hh,mm,ss; - int c; -- t = (pp->utime + pp->stime) / Hertz; -+ t = cook_time(pp); - ss = t%60; - t /= 60; - mm = t%60; -@@ -1286,7 +1303,7 @@ - {"alarm", "ALARM", pr_alarm, sr_alarm, 5, 0, LNX, AN|RIGHT}, - {"argc", "ARGC", pr_nop, sr_nop, 4, 0, LNX, PO|RIGHT}, - {"args", "COMMAND", pr_args, sr_cmd, 27, ARG, U98, PO|UNLIMITED}, /*command*/ --{"atime", "TIME", pr_time, sr_nop, 8, 0, SOE, ET|RIGHT}, /*cputime*/ /* was 6 wide */ -+{"atime", "TIME", pr_time, sr_time, 8, 0, SOE, ET|RIGHT}, /*cputime*/ /* was 6 wide */ - {"blocked", "BLOCKED", pr_sigmask, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigmask*/ - {"bnd", "BND", pr_nop, sr_nop, 1, 0, AIX, TO|RIGHT}, - {"bsdstart", "START", pr_bsdstart, sr_nop, 6, 0, LNX, ET|RIGHT}, -@@ -1305,7 +1322,7 @@ - {"cp", "CP", pr_cp, sr_pcpu, 3, 0, DEC, ET|RIGHT}, /*cpu*/ - {"cpu", "CPU", pr_nop, sr_nop, 3, 0, BSD, AN|RIGHT}, /* FIXME ... HP-UX wants this as the CPU number for SMP? */ - {"cpuid", "CPUID", pr_psr, sr_nop, 5, 0, BSD, TO|RIGHT}, // OpenBSD: 8 wide! --{"cputime", "TIME", pr_time, sr_nop, 8, 0, DEC, ET|RIGHT}, /*time*/ -+{"cputime", "TIME", pr_time, sr_time, 8, 0, DEC, ET|RIGHT}, /*time*/ - {"cstime", "-", pr_nop, sr_cstime, 1, 0, LNX, AN|RIGHT}, - {"ctid", "CTID", pr_nop, sr_nop, 5, 0, SUN, ET|RIGHT}, // resource contracts? - {"cursig", "CURSIG", pr_nop, sr_nop, 6, 0, DEC, AN|RIGHT}, -@@ -1320,7 +1337,7 @@ - {"end_code", "E_CODE", pr_nop, sr_end_code, 8, 0, LNx, PO|RIGHT}, - {"environ","ENVIRONMENT",pr_nop, sr_nop, 11, ENV, LNx, PO|UNLIMITED}, - {"esp", "ESP", pr_esp, sr_kstk_esp, 8, 0, LNX, TO|RIGHT}, --{"etime", "ELAPSED", pr_etime, sr_nop, 11, 0, U98, ET|RIGHT}, /* was 7 wide */ -+{"etime", "ELAPSED", pr_etime, sr_etime, 11, 0, U98, ET|RIGHT}, /* was 7 wide */ - {"euid", "EUID", pr_euid, sr_euid, 5, 0, LNX, ET|RIGHT}, - {"euser", "EUSER", pr_euser, sr_euser, 8, USR, LNX, ET|USER}, - {"f", "F", pr_flag, sr_flags, 1, 0, XXX, ET|RIGHT}, /*flags*/ -@@ -1463,7 +1480,7 @@ - {"tdev", "TDEV", pr_nop, sr_nop, 4, 0, XXX, AN|RIGHT}, - {"thcount", "THCNT", pr_nlwp, sr_nlwp, 5, 0, AIX, PO|RIGHT}, - {"tid", "TID", pr_thread, sr_tid, 5, 0, AIX, TO|PIDMAX|RIGHT}, --{"time", "TIME", pr_time, sr_nop, 8, 0, U98, ET|RIGHT}, /*cputime*/ /* was 6 wide */ -+{"time", "TIME", pr_time, sr_time, 8, 0, U98, ET|RIGHT}, /*cputime*/ /* was 6 wide */ - {"timeout", "TMOUT", pr_nop, sr_nop, 5, 0, LNX, AN|RIGHT}, // 2.0.xx era - {"tmout", "TMOUT", pr_nop, sr_nop, 5, 0, LNX, AN|RIGHT}, // 2.0.xx era - {"tname", "TTY", pr_tty8, sr_tty, 8, 0, DEC, PO|LEFT}, diff --git a/srcpkgs/procps/patches/path_max.patch b/srcpkgs/procps/patches/path_max.patch deleted file mode 100644 index 3cccc18ee8..0000000000 --- a/srcpkgs/procps/patches/path_max.patch +++ /dev/null @@ -1,76 +0,0 @@ -Author: Madhusudan.C.S -Description: Uses alloc instead of fixed PATH_MAX value -Bug-Debian: http://bugs.debian.org/496274 -Index: b/proc/readproc.c -=================================================================== ---- a/proc/readproc.c 2009-11-24 21:00:41.000000000 +1100 -+++ b/proc/readproc.c 2009-11-24 21:00:44.000000000 +1100 -@@ -1036,7 +1036,7 @@ - * and filled out proc_t structure. - */ - proc_t * get_proc_stats(pid_t pid, proc_t *p) { -- static char path[PATH_MAX], sbuf[1024]; -+ static char path[32], sbuf[1024]; - struct stat statbuf; - - sprintf(path, "/proc/%d", pid); -Index: b/pwdx.c -=================================================================== ---- a/pwdx.c 2009-11-24 20:53:02.000000000 +1100 -+++ b/pwdx.c 2009-11-24 21:00:44.000000000 +1100 -@@ -35,7 +35,6 @@ - - int main(int argc, char* argv[]) - { -- char buf[PATH_MAX+1]; - regex_t re; - int i; - -@@ -59,6 +58,7 @@ - - for (i = 1; i < argc; i++) { - if (regexec(&re, argv[i], 0, NULL, 0) != 0) { -+ char buf[27 + strlen (argv[i]) + 1]; // Constant 27 is the length of the error string "pwdx: ... " - snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]); - die(buf); - } -@@ -68,9 +68,13 @@ - - regfree(&re); - -+ int alloclen = 128; -+ char *pathbuf = malloc(alloclen); -+ - for (i = 1; i < argc; i++) { -- char * s = buf; -+ char * s; - int len; -+ char buf[10 + strlen(argv[i]) + 1]; // Constant 10 is the length of strings "/proc/" + "/cwd" + 1 - - // At this point, all arguments are in the form /proc/nnnn - // or nnnn, so a simple check based on the first char is -@@ -82,14 +86,22 @@ - - // buf contains /proc/nnnn/cwd symlink name on entry, the - // target of that symlink on return -- if ((len = readlink(buf, buf, PATH_MAX)) < 0) { -+ while ((len = readlink(buf, pathbuf, alloclen)) == alloclen) { -+ alloclen *= 2; -+ pathbuf = realloc(pathbuf, alloclen); -+ } -+ -+ if (len < 0) { - s = strerror(errno == ENOENT ? ESRCH : errno); - } else { -- buf[len] = 0; -+ pathbuf[len] = 0; -+ s = pathbuf; - } - - printf("%s: %s\n", argv[i], s); - } - -+ free(pathbuf); -+ - return 0; - } diff --git a/srcpkgs/procps/patches/pgrep.1.patch b/srcpkgs/procps/patches/pgrep.1.patch deleted file mode 100644 index a71e33d482..0000000000 --- a/srcpkgs/procps/patches/pgrep.1.patch +++ /dev/null @@ -1,208 +0,0 @@ -Author: -Description: Cleanup pgrep manual page #282168 -Uses .BR for see also section #437678 -Index: b/pgrep.1 -=================================================================== ---- a/pgrep.1 2009-11-24 21:00:45.000000000 +1100 -+++ b/pgrep.1 2009-11-24 21:00:47.000000000 +1100 -@@ -2,35 +2,39 @@ - .\" Licensed under version 2 of the GNU General Public License. - .\" Copyright 2000 Kjetil Torgrim Homme - .\" --.TH PGREP 1 "June 25, 2000" "Linux" "Linux User's Manual" -+.TH PGREP 1 "October 5, 2007" "Linux" "Linux User's Manual" - .SH NAME - pgrep, pkill \- look up or signal processes based on name and other attributes - - .SH SYNOPSIS --pgrep [\-cflvx] [\-d \fIdelimiter\fP] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...] --.br -- [\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...] --.br -- [\-t \fIterm\fP,...] [\fIpattern\fP] -- --pkill [\-\fIsignal\fP] [\-fvx] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...] --.br -- [\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...] --.br -- [\-t \fIterm\fP,...] [\fIpattern\fP] -+.na -+\fBpgrep\fR [\fB\-cflvx\fR] [\fB\-d\ \fIdelimiter\fR] [\fB\-n\fR|\fB\-o\fR] \ -+[\fB\-P\ \fIppid\fR,...] [\fB\-g\ \fIpgrp\fR,...] [\fB\-s\ \fIsid\fR,...] \ -+[\fB\-u\ \fIeuid\fR,...] [\fB\-U\ \fIuid\fR,...] [\fB\-G\ \fIgid\fR,...] \ -+[\fB\-t\ \fIterm\fR,...] [\fIpattern\fR] -+ -+.HP -+\fBpkill\fR [\fB\-\fIsignal\fR] [\fB\-fvx\fR] [\fB\-n\fR|\fB\-o\fR] \ -+[\fB\-P\ \fIppid\fR,...] [\fB\-g\ \fIpgrp\fR,...] [\fB\-s\ \fIsid\fR,...] \ -+[\fB\-u\ \fIeuid\fR,...] [\fB\-U\ \fIuid\fR,...] [\fB\-G\ \fIgid\fR,...] \ -+[\fB\-t\ \fIterm\fR,...] [\fIpattern\fR] - - .SH DESCRIPTION - \fBpgrep\fP looks through the currently running processes and lists the - process IDs which matches the selection criteria to stdout. All - the criteria have to match. For example, - --pgrep -u root sshd -+.IP -+$ pgrep \-u root sshd - -+.PP - will only list the processes called \fBsshd\fP AND owned by \fBroot\fP. - On the other hand, - --pgrep -u root,daemon -+.IP -+$ pgrep \-u root,daemon - -+.PP - will list the processes owned by \fBroot\fP OR \fBdaemon\fP. - - \fBpkill\fP will send the specified signal (by default \fBSIGTERM\fP) -@@ -38,18 +42,18 @@ - - .SH OPTIONS - .TP --\-c -+\fB\-c\fR - Suppress normal output; instead print a count of matching processes. - .TP --\-d \fIdelimiter\fP -+\fB\-d \fIdelimiter\fP - Sets the string used to delimit each process ID in the output (by - default a newline). (\fBpgrep\fP only.) - .TP --\-f -+\fB\-f\fR - The \fIpattern\fP is normally only matched against the process name. --When \-f is set, the full command line is used. -+When \fB\-f\fR is set, the full command line is used. - .TP --\-g \fIpgrp\fP,... -+\fB\-g \fIpgrp\fP,... - Only match processes in the process group IDs listed. Process group 0 - is translated into \fBpgrep\fP's or \fBpkill\fP's own process group. - .TP -@@ -57,40 +61,40 @@ - Only match processes whose real group ID is listed. Either the - numerical or symbolical value may be used. - .TP --\-l -+\fB\-l\fR - List the process name as well as the process ID. (\fBpgrep\fP only.) - .TP --\-n -+\fB\-n\fR - Select only the newest (most recently started) of the matching - processes. - .TP --\-o -+\fB\-o\fR - Select only the oldest (least recently started) of the matching - processes. - .TP --\-P \fIppid\fP,... -+\fB\-P \fIppid\fP,... - Only match processes whose parent process ID is listed. - .TP --\-s \fIsid\fP,... -+\fB\-s \fIsid\fP,... - Only match processes whose process session ID is listed. Session ID 0 - is translated into \fBpgrep\fP's or \fBpkill\fP's own session ID. - .TP --\-t \fIterm\fP,... -+\fB\-t \fIterm\fP,... - Only match processes whose controlling terminal is listed. The - terminal name should be specified without the "/dev/" prefix. - .TP --\-u \fIeuid\fP,... -+\fB\-u \fIeuid\fP,... - Only match processes whose effective user ID is listed. Either the - numerical or symbolical value may be used. - .TP --\-U \fIuid\fP,... -+\fB\-U \fIuid\fP,... - Only match processes whose real user ID is listed. Either the - numerical or symbolical value may be used. - .TP --\-v -+\fB\-v\fR - Negates the matching. - .TP --\-x -+\fB\-x\fR - Only match processes whose name (or command line if \-f is specified) - \fBexactly\fP match the \fIpattern\fP. - .TP -@@ -107,32 +111,40 @@ - .SH EXAMPLES - Example 1: Find the process ID of the \fBnamed\fP daemon: - --unix$ pgrep \-u root named -+.IP -+$ pgrep \-u root named - -+.PP - Example 2: Make \fBsyslog\fP reread its configuration file: - --unix$ pkill \-HUP syslogd -+.IP -+$ pkill \-HUP syslogd - -+.PP - Example 3: Give detailed information on all \fBxterm\fP processes: - --unix$ ps \-fp $(pgrep \-d, \-x xterm) -+.IP -+$ ps \-fp $(pgrep \-d, \-x xterm) - -+.PP - Example 4: Make all \fBnetscape\fP processes run nicer: - --unix$ renice +4 `pgrep netscape` -+.IP -+$ renice +4 `pgrep netscape` - - .SH "EXIT STATUS" -+.PD 0 - .TP --.I "0" -+.I 0 - One or more processes matched the criteria. - .TP --.I "1" -+.I 1 - No processes matched. - .TP --.I "2" -+.I 2 - Syntax error in the command line. - .TP --.I "3" -+.I 3 - Fatal error: out of memory etc. - - .SH NOTES -@@ -144,13 +156,19 @@ - itself as a match. - - .SH BUGS --The options \-n and \-o and \-v can not be combined. Let me know if --you need to do this. -+The options \fB\-n\fP and \fB\-o\fP and \fB\-v\fP can not be combined. -+Let me know if you need to do this. - - Defunct processes are reported. - - .SH "SEE ALSO" --ps(1) regex(7) signal(7) killall(1) skill(1) kill(1) kill(2) -+.BR ps (1), -+.BR regex (7), -+.BR signal (7), -+.BR killall (1), -+.BR skill (1), -+.BR kill (1), -+.BR kill (2) - - .SH STANDARDS - \fBpkill\fP and \fBpgrep\fP were introduced in Sun's Solaris 7. This diff --git a/srcpkgs/procps/patches/pgrep_c_option.patch b/srcpkgs/procps/patches/pgrep_c_option.patch deleted file mode 100644 index 63502edc69..0000000000 --- a/srcpkgs/procps/patches/pgrep_c_option.patch +++ /dev/null @@ -1,85 +0,0 @@ -Description: c option for pgrep for counting number of matched proceesses -Author: Craig Small -Bug-Debian: http://bugs.debian.org/375791 -Index: b/pgrep.1 -=================================================================== ---- a/pgrep.1 2009-11-24 20:53:02.000000000 +1100 -+++ b/pgrep.1 2009-11-24 21:00:45.000000000 +1100 -@@ -7,7 +7,7 @@ - pgrep, pkill \- look up or signal processes based on name and other attributes - - .SH SYNOPSIS --pgrep [\-flvx] [\-d \fIdelimiter\fP] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...] -+pgrep [\-cflvx] [\-d \fIdelimiter\fP] [\-n|\-o] [\-P \fIppid\fP,...] [\-g \fIpgrp\fP,...] - .br - [\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...] - .br -@@ -38,6 +38,9 @@ - - .SH OPTIONS - .TP -+\-c -+Suppress normal output; instead print a count of matching processes. -+.TP - \-d \fIdelimiter\fP - Sets the string used to delimit each process ID in the output (by - default a newline). (\fBpgrep\fP only.) -Index: b/pgrep.c -=================================================================== ---- a/pgrep.c 2009-11-24 21:00:41.000000000 +1100 -+++ b/pgrep.c 2009-11-24 21:00:45.000000000 +1100 -@@ -54,6 +54,7 @@ - static int opt_newest = 0; - static int opt_negate = 0; - static int opt_exact = 0; -+static int opt_count = 0; - static int opt_signal = SIGTERM; - static int opt_lock = 0; - static int opt_case = 0; -@@ -79,7 +80,7 @@ - if (i_am_pkill) - fprintf (fp, "Usage: pkill [-SIGNAL] [-fvx] "); - else -- fprintf (fp, "Usage: pgrep [-flvx] [-d DELIM] "); -+ fprintf (fp, "Usage: pgrep [-cflvx] [-d DELIM] "); - fprintf (fp, "[-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST]\n" - "\t[-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] " - "[PATTERN]\n"); -@@ -565,7 +566,7 @@ - strcat (opts, "ld:"); - } - -- strcat (opts, "LF:fnovxP:g:s:u:U:G:t:?V"); -+ strcat (opts, "LF:cfnovxP:g:s:u:U:G:t:?V"); - - while ((opt = getopt (argc, argv, opts)) != -1) { - switch (opt) { -@@ -613,6 +614,9 @@ - exit(EXIT_SUCCESS); - // case 'c': // Solaris: match by contract ID - // break; -+ case 'c': -+ opt_count = 1; -+ break; - case 'd': // Solaris: change the delimiter - opt_delim = strdup (optarg); - break; -@@ -724,10 +728,14 @@ - procs[i].num, strerror (errno)); - } - } else { -- if (opt_long) -- output_strlist(procs,num); -- else -- output_numlist(procs,num); -+ if (opt_count) { -+ fprintf(stdout, "%ld\n", num); -+ } else { -+ if (opt_long) -+ output_strlist (procs,num); -+ else -+ output_numlist (procs,num); -+ } - } - return !num; // exit(EXIT_SUCCESS) if match, otherwise exit(EXIT_FAILURE) - } diff --git a/srcpkgs/procps/patches/pgrep_start_time.patch b/srcpkgs/procps/patches/pgrep_start_time.patch deleted file mode 100644 index 68cc0bc09e..0000000000 --- a/srcpkgs/procps/patches/pgrep_start_time.patch +++ /dev/null @@ -1,16 +0,0 @@ -Author: Craig Small -Description: pgrep.c saved_start_time was missed -Index: b/pgrep.c -=================================================================== ---- a/pgrep.c 2009-11-24 20:53:03.000000000 +1100 -+++ b/pgrep.c 2009-11-24 21:00:41.000000000 +1100 -@@ -430,7 +430,8 @@ - preg = do_regcomp(); - - if (opt_newest) saved_start_time = 0ULL; -- if (opt_oldest) saved_start_time = ~0ULL; -+ else -+ saved_start_time = ~0ULL; - if (opt_newest) saved_pid = 0; - if (opt_oldest) saved_pid = INT_MAX; - diff --git a/srcpkgs/procps/patches/pgrep_usage_exitcode.patch b/srcpkgs/procps/patches/pgrep_usage_exitcode.patch deleted file mode 100644 index efe752b353..0000000000 --- a/srcpkgs/procps/patches/pgrep_usage_exitcode.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: -Description: Distinguish between invalid commandline parameters and '-?'. -Index: b/pgrep.c -=================================================================== ---- a/pgrep.c 2009-11-24 21:00:45.000000000 +1100 -+++ b/pgrep.c 2009-11-24 21:00:49.000000000 +1100 -@@ -681,7 +681,7 @@ - // case 'z': // Solaris: match by zone ID - // break; - case '?': -- usage (opt); -+ usage (optopt?optopt:opt); - break; - } - } diff --git a/srcpkgs/procps/patches/pmap.1.patch b/srcpkgs/procps/patches/pmap.1.patch deleted file mode 100644 index 114fe8679f..0000000000 --- a/srcpkgs/procps/patches/pmap.1.patch +++ /dev/null @@ -1,48 +0,0 @@ -Description: Cleanup pmap.1 manual page -Author: Brendan O'Dea -Bug-Debian: http://bugs.debian.org/282168 -Reviewed-by: Craig Small -Index: b/pmap.1 -=================================================================== ---- a/pmap.1 2009-11-24 20:53:06.000000000 +1100 -+++ b/pmap.1 2009-11-24 21:00:30.000000000 +1100 -@@ -10,25 +10,29 @@ - pmap \- report memory map of a process - - .SH SYNOPSIS --.nf --pmap [ -x | -d ] [ -q ] pids... --pmap -V --.fi -+.B pmap -+.RB [ \-x | \-d ] -+.RB [ \-q ] -+.I pid -+\& ... -+.br -+.B pmap \-V - - .SH DESCRIPTION - The pmap command reports the memory map of a process or processes. - - .SH "GENERAL OPTIONS" - .TS --l l l. ---x extended Show the extended format. ---d device Show the device format. ---q quiet Do not display some header/footer lines. ---V show version Displays version of program. -+lB l l. -+\-x extended Show the extended format. -+\-d device Show the device format. -+\-q quiet Do not display some header/footer lines. -+\-V show version Displays version of program. - .TE - - .SH "SEE ALSO" --ps(1) pgrep(1) -+.BR ps(1), -+.BR pgrep(1) - - .SH STANDARDS - No standards apply, but pmap looks an awful lot like a SunOS command. diff --git a/srcpkgs/procps/patches/pmaps_smaps.patch b/srcpkgs/procps/patches/pmaps_smaps.patch deleted file mode 100644 index 02561fde02..0000000000 --- a/srcpkgs/procps/patches/pmaps_smaps.patch +++ /dev/null @@ -1,141 +0,0 @@ -Description: provides information for pmap -x option - Similiar idea to pmap written by Robert Love -Bug-Debian: http://bugs.debian.org/347476 -Bug-Debian: http://bugs.debian.org/505571 -Author: Craig Small ---- a/pmap.c -+++ b/pmap.c -@@ -126,24 +126,37 @@ - char buf[32]; - char mapbuf[9600]; - char cmdbuf[512]; -+ FILE *fp; - unsigned long total_shared = 0ul; - unsigned long total_private_readonly = 0ul; - unsigned long total_private_writeable = 0ul; - -+ char *cp2=NULL; -+ unsigned long long rss = 0ull; -+ unsigned long long private_dirty = 0ull; -+ unsigned long long shared_dirty = 0ull; -+ unsigned long long total_rss = 0ull; -+ unsigned long long total_private_dirty = 0ull; -+ unsigned long long total_shared_dirty = 0ull; -+ - // Overkill, but who knows what is proper? The "w" prog - // uses the tty width to determine this. - int maxcmd = 0xfffff; - - sprintf(buf,"/proc/%u/maps",p->tgid); -- if(!freopen(buf, "r", stdin)) return 1; -+ if ( (fp = fopen(buf, "r")) == NULL) return 1; -+ if (x_option) { -+ sprintf(buf,"/proc/%u/smaps",p->tgid); -+ if ( (fp = freopen(buf, "r", fp)) == NULL) return 1; -+ } - - escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd, ESC_ARGS|ESC_BRACKETS); - printf("%u: %s\n", p->tgid, cmdbuf); - - if(!q_option && (x_option|d_option)){ - if(x_option){ -- if(sizeof(KLONG)==4) printf("Address Kbytes RSS Anon Locked Mode Mapping\n"); -- else printf("Address Kbytes RSS Anon Locked Mode Mapping\n"); -+ if(sizeof(KLONG)==4) printf("Address Kbytes RSS Dirty Mode Mapping\n"); -+ else printf("Address Kbytes RSS Dirty Mode Mapping\n"); - } - if(d_option){ - if(sizeof(KLONG)==4) printf("Address Kbytes Mode Offset Device Mapping\n"); -@@ -151,12 +164,54 @@ - } - } - -- while(fgets(mapbuf,sizeof mapbuf,stdin)){ -+ while(fgets(mapbuf,sizeof mapbuf,fp)){ - char flags[32]; - char *tmp; // to clean up unprintables -- unsigned KLONG start, end, diff; -+ unsigned KLONG start, end, diff=0; - unsigned long long file_offset, inode; - unsigned dev_major, dev_minor; -+ unsigned long long smap_value; -+ char smap_key[20]; -+ -+ /* hex values are lower case or numeric, keys are upper */ -+ if (mapbuf[0] >= 'A' && mapbuf[0] <= 'Z') { -+ /* Its a key */ -+ if (sscanf(mapbuf,"%20[^:]: %llu", smap_key, &smap_value) == 2) { -+ if (strncmp("Rss", smap_key, 3) == 0) { -+ rss = smap_value; -+ total_rss += smap_value; -+ continue; -+ } -+ if (strncmp("Shared_Dirty", smap_key, 12) == 0) { -+ shared_dirty = smap_value; -+ total_shared_dirty += smap_value; -+ continue; -+ } -+ if (strncmp("Private_Dirty", smap_key, 13) == 0) { -+ private_dirty = smap_value; -+ total_private_dirty += smap_value; -+ continue; -+ } -+ if (strncmp("Swap", smap_key, 4) == 0) { /*doesnt matter as long as last*/ -+ printf( -+ (sizeof(KLONG)==8) -+ ? "%016"KLF"x %7lu %7llu %7llu %s %s\n" -+ : "%08lx %7lu %7llu %7llu %s %s\n", -+ start, -+ (unsigned long)(diff>>10), -+ rss, -+ (private_dirty + shared_dirty), -+ flags, -+ cp2 -+ ); -+ /* reset some counters */ -+ rss = shared_dirty = private_dirty = 0ull; -+ continue; -+ } -+ /* Other keys */ -+ continue; -+ } -+ } - sscanf(mapbuf,"%"KLF"x-%"KLF"x %31s %Lx %x:%x %Lu", &start, &end, flags, &file_offset, &dev_major, &dev_minor, &inode); - - if(start > range_high) -@@ -186,16 +241,9 @@ - flags[5] = '\0'; - - if(x_option){ -- const char *cp = mapping_name(p, start, diff, mapbuf, 0, dev_major, dev_minor, inode); -- printf( -- (sizeof(KLONG)==8) -- ? "%016"KLF"x %7lu - - - %s %s\n" -- : "%08lx %7lu - - - %s %s\n", -- start, -- (unsigned long)(diff>>10), -- flags, -- cp -- ); -+ cp2 = mapping_name(p, start, diff, mapbuf, 0, dev_major, dev_minor, inode); -+ /* printed with the keys */ -+ continue; - } - if(d_option){ - const char *cp = mapping_name(p, start, diff, mapbuf, 0, dev_major, dev_minor, inode); -@@ -232,10 +280,12 @@ - if(!q_option){ - if(x_option){ - if(sizeof(KLONG)==8){ -- printf("---------------- ------ ------ ------ ------\n"); -+ printf("---------------- ------ ------ ------\n"); - printf( -- "total kB %15ld - - -\n", -- (total_shared + total_private_writeable + total_private_readonly) >> 10 -+ "total kB %15ld %7llu %7llu\n", -+ (total_shared + total_private_writeable + total_private_readonly) >> 10, -+ total_rss, (total_shared_dirty+total_private_dirty) -+ - ); - }else{ - printf("-------- ------- ------- ------- -------\n"); diff --git a/srcpkgs/procps/patches/proc_version_constructor.patch b/srcpkgs/procps/patches/proc_version_constructor.patch deleted file mode 100644 index 932ac72df6..0000000000 --- a/srcpkgs/procps/patches/proc_version_constructor.patch +++ /dev/null @@ -1,37 +0,0 @@ -Description: Call libproc constructors in strict order - Having one constructor depend on another means if the order is reversed - you get a different result. Patched based on idea by Tom Evans. -Bug-Debian: http://bugs.debian.org/460331 -Author: Craig Small ---- a/proc/sysinfo.c -+++ b/proc/sysinfo.c -@@ -213,6 +213,7 @@ - static void init_libproc(void) __attribute__((constructor)); - static void init_libproc(void){ - have_privs = check_for_privs(); -+ init_Linux_version(); /* Must be called before we check code */ - // ought to count CPUs in /proc/stat instead of relying - // on glibc, which foolishly tries to parse /proc/cpuinfo - // ---- a/proc/version.c -+++ b/proc/version.c -@@ -33,8 +33,7 @@ - - int linux_version_code; - --static void init_Linux_version(void) __attribute__((constructor)); --static void init_Linux_version(void) { -+void init_Linux_version(void) { - int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ - FILE *fp; - char buf[256]; ---- a/proc/version.h -+++ b/proc/version.h -@@ -14,6 +14,7 @@ - - EXTERN_C_BEGIN - -+void init_Linux_version(void); /* Get Linux version */ - extern void display_version(void); /* display suite version */ - extern const char procps_version[]; /* global buf for suite version */ - diff --git a/srcpkgs/procps/patches/procps-3.2.7-free-hlmem.patch b/srcpkgs/procps/patches/procps-3.2.7-free-hlmem.patch new file mode 100644 index 0000000000..c5ef9cc4c6 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-free-hlmem.patch @@ -0,0 +1,23 @@ +diff -up procps-3.2.7/free.1.hlmem procps-3.2.7/free.1 +--- procps-3.2.7/free.1.hlmem 2009-02-24 10:54:35.000000000 +0100 ++++ procps-3.2.7/free.1 2009-02-24 11:00:26.000000000 +0100 +@@ -7,7 +7,7 @@ free \- Display amount of free and used + .SH SYNOPSIS + .BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s" + .I delay +-.RB "] [" "\-t" "] [" "\-V" ] ++.RB "] [" "\-t" "] [" "\-l" "] [" "\-V" "] + .SH DESCRIPTION + \fBfree\fP displays the total amount of free and used physical and swap + memory in the system, as well as the buffers used by the kernel. +@@ -28,7 +28,9 @@ may actually specify any floating point + .BR usleep (3) + is used for microsecond resolution delay times. + .PP +-The \fB\-V\fP displays version information. ++The \fB-l\fP switch shows detailed low and high memory statistics. ++.PP ++The \fB\-V\fP switch displays version information. + .SH FILES + .ta + .IR /proc/meminfo "\-\- memory information" diff --git a/srcpkgs/procps/patches/procps-3.2.7-longcmd.patch b/srcpkgs/procps/patches/procps-3.2.7-longcmd.patch new file mode 100644 index 0000000000..7c4fdca360 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-longcmd.patch @@ -0,0 +1,22 @@ +--- procps-3.2.7/proc/readproc.c.kzak 2006-06-16 10:18:13.000000000 +0200 ++++ procps-3.2.7/proc/readproc.c 2006-09-27 11:25:13.000000000 +0200 +@@ -432,14 +432,17 @@ + if(fd==-1) return NULL; + + /* read whole file into a memory buffer, allocating as we go */ +- while ((n = read(fd, buf, sizeof buf - 1)) > 0) { ++ while ((n = read(fd, buf, sizeof buf - 1)) >= 0) { + if (n < (int)(sizeof buf - 1)) + end_of_file = 1; +- if (n == 0 && rbuf == 0) ++ if (n == 0 && rbuf == 0) { ++ close(fd); + return NULL; /* process died between our open and read */ ++ } + if (n < 0) { + if (rbuf) + free(rbuf); ++ close(fd); + return NULL; /* read error */ + } + if (end_of_file && buf[n-1]) /* last read char not null */ diff --git a/srcpkgs/procps/patches/procps-3.2.7-ps-man-fmt.patch b/srcpkgs/procps/patches/procps-3.2.7-ps-man-fmt.patch new file mode 100644 index 0000000000..f3a80dca77 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-ps-man-fmt.patch @@ -0,0 +1,12 @@ +diff -up procps-3.2.7/ps/ps.1.ps-man-fmt procps-3.2.7/ps/ps.1 +--- procps-3.2.7/ps/ps.1.ps-man-fmt 2008-09-01 11:43:18.000000000 +0200 ++++ procps-3.2.7/ps/ps.1 2008-09-01 11:43:41.000000000 +0200 +@@ -30,7 +30,7 @@ + .\" the space needed for the 1st two columns. + .\" Making it messy: inches, ens, points, scaled points... + .\" +-.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n) ++.nr ColSize ((\n[.l] - \n[.i]) / 1n - 20) + .\" + .\" This is for command options + .nr OptSize (16u) diff --git a/srcpkgs/procps/patches/procps-3.2.7-psman.patch b/srcpkgs/procps/patches/procps-3.2.7-psman.patch new file mode 100644 index 0000000000..7ba6cff343 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-psman.patch @@ -0,0 +1,22 @@ +--- procps-3.2.7/ps/ps.1.psman 2007-06-20 08:30:47.000000000 +0200 ++++ procps-3.2.7/ps/ps.1 2007-06-20 08:50:10.000000000 +0200 +@@ -21,8 +21,8 @@ + .\" See /usr/share/groff/current/tmac/an-old.tmac for what these do. + .\" Setting them to zero provides extra space, but only do that for + .\" plain text output. PostScript and such will remain indented. +-.if n .nr IN 0n +-.if n .nr an-prevailing-indent 0n ++.\" .if n .nr IN 0n ++.\" .if n .nr an-prevailing-indent 0n + .\" + .\" + .\" ColSize is used for the format spec table. +@@ -838,6 +838,8 @@ + .\" lB1 lB1 lBw(5.5i) + .\" lB1 l1 l. + .\" ++.RE ++ + .TS + expand; + lB1 lB1 lBw(\n[ColSize]n) diff --git a/srcpkgs/procps/patches/procps-3.2.7-slabtop-once.patch b/srcpkgs/procps/patches/procps-3.2.7-slabtop-once.patch new file mode 100644 index 0000000000..d3319cfe7b --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-slabtop-once.patch @@ -0,0 +1,113 @@ +diff -up procps-3.2.7/slabtop.c.once procps-3.2.7/slabtop.c +--- procps-3.2.7/slabtop.c.once 2008-12-11 13:24:52.000000000 +0100 ++++ procps-3.2.7/slabtop.c 2008-12-11 13:33:12.000000000 +0100 +@@ -268,9 +268,24 @@ static void parse_input(char c) + } + } + ++/*printw or printf depending on the context*/ ++static void printwf(int once, const char *s,...) ++{ ++va_list va; ++ ++va_start(va,s); ++if(once) ++ vprintf(s,va); ++else ++ vwprintw(stdscr, s, va); ++va_end(va); ++} ++ ++ + int main(int argc, char *argv[]) + { + int o; ++ int once = 0; + unsigned short old_rows; + struct slab_info *slab_list = NULL; + +@@ -307,6 +322,7 @@ int main(int argc, char *argv[]) + break; + case 'o': + delay = 0; ++ once = 1; + break; + case 'V': + display_version(); +@@ -322,12 +338,18 @@ int main(int argc, char *argv[]) + if (tcgetattr(0, &saved_tty) == -1) + perror("tcgetattr"); + +- initscr(); +- term_size(0); +- old_rows = rows; +- resizeterm(rows, cols); +- signal(SIGWINCH, term_size); +- signal(SIGINT, sigint_handler); ++ if(!once) { ++ initscr(); ++ term_size(0); ++ old_rows = rows; ++ resizeterm(rows, cols); ++ signal(SIGWINCH, term_size); ++ signal(SIGINT, sigint_handler); ++ } else { ++ old_rows = rows; ++ rows = 80; ++ cols = 24; ++ } + + do { + struct slab_info *curr; +@@ -341,12 +363,12 @@ int main(int argc, char *argv[]) + break; + + if (old_rows != rows) { +- resizeterm(rows, cols); ++ if(!once) resizeterm(rows, cols); + old_rows = rows; + } + + move(0,0); +- printw( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" ++ printwf(once, " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" + " Active / Total Slabs (%% used) : %d / %d (%.1f%%)\n" + " Active / Total Caches (%% used) : %d / %d (%.1f%%)\n" + " Active / Total Size (%% used) : %.2fK / %.2fK (%.1f%%)\n" +@@ -360,15 +382,15 @@ int main(int argc, char *argv[]) + + slab_list = slabsort(slab_list); + +- attron(A_REVERSE); +- printw( "%6s %6s %4s %8s %6s %8s %10s %-23s\n", ++ if(!once) attron(A_REVERSE); ++ printwf(once, "%6s %6s %4s %8s %6s %8s %10s %-23s\n", + "OBJS", "ACTIVE", "USE", "OBJ SIZE", "SLABS", + "OBJ/SLAB", "CACHE SIZE", "NAME"); +- attroff(A_REVERSE); ++ if(!once) attroff(A_REVERSE); + + curr = slab_list; + for (i = 0; i < rows - 8 && curr->next; i++) { +- printw("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", ++ printwf(once, "%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", + curr->nr_objs, curr->nr_active_objs, curr->use, + curr->obj_size / 1024.0, curr->nr_slabs, + curr->objs_per_slab, (unsigned)(curr->cache_size / 1024), +@@ -376,7 +398,7 @@ int main(int argc, char *argv[]) + curr = curr->next; + } + +- refresh(); ++ if(!once) refresh(); + put_slabinfo(slab_list); + + FD_ZERO(&readfds); +@@ -392,6 +414,6 @@ int main(int argc, char *argv[]) + + tcsetattr(0, TCSAFLUSH, &saved_tty); + free_slabinfo(slab_list); +- endwin(); ++ if(!once) endwin(); + return 0; + } diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-clrscr.patch b/srcpkgs/procps/patches/procps-3.2.7-top-clrscr.patch new file mode 100644 index 0000000000..8a02568468 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-clrscr.patch @@ -0,0 +1,19 @@ +diff -up procps-3.2.7/top.c.clrscr procps-3.2.7/top.c +--- procps-3.2.7/top.c.clrscr 2008-04-08 08:49:48.000000000 +0200 ++++ procps-3.2.7/top.c 2008-04-08 08:50:07.000000000 +0200 +@@ -2109,6 +2109,7 @@ static void fields_sort (void) + *p = x + 'A'; + Curwin->rc.sortindx = x; + putp(Cap_curs_norm); ++ putp(Cap_clr_scr); + } + + +@@ -2134,6 +2135,7 @@ static void fields_toggle (void) + *p = i + 'A'; + } + putp(Cap_curs_norm); ++ putp(Cap_clr_scr); + } + + /*###### Windows/Field Groups support #################################*/ diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-cpu0.patch b/srcpkgs/procps/patches/procps-3.2.7-top-cpu0.patch new file mode 100644 index 0000000000..eb81121c57 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-cpu0.patch @@ -0,0 +1,20 @@ +--- procps-3.2.7/top.c.orig 2007-09-07 21:28:41.000000000 +0100 ++++ procps-3.2.7/top.c 2007-09-07 21:29:15.000000000 +0100 +@@ -959,8 +959,15 @@ + + // and just in case we're 2.2.xx compiled without SMP support... + if (Cpu_tot == 1) { +- cpus[1].id = 0; +- memcpy(cpus, &cpus[1], sizeof(CPU_t)); ++ cpus[0].id = cpus[1].id = 0; ++ cpus[0].u = cpus[1].u; ++ cpus[0].n = cpus[1].n; ++ cpus[0].s = cpus[1].s; ++ cpus[0].i = cpus[1].i; ++ cpus[0].w = cpus[1].w; ++ cpus[0].x = cpus[1].x; ++ cpus[0].y = cpus[1].y; ++ cpus[0].z = cpus[1].z; + } + + // now value each separate cpu's tics diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-env-cpuloop.patch b/srcpkgs/procps/patches/procps-3.2.7-top-env-cpuloop.patch new file mode 100644 index 0000000000..0034dcafb9 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-env-cpuloop.patch @@ -0,0 +1,84 @@ +diff -up procps-3.2.7/top.c.p15 procps-3.2.7/top.c +--- procps-3.2.7/top.c.p15 2008-09-01 11:37:51.000000000 +0200 ++++ procps-3.2.7/top.c 2008-09-01 11:37:51.000000000 +0200 +@@ -121,6 +121,7 @@ static int No_ksyms = -1, // set t + Batch = 0, // batch mode, collect no input, dumb output + Loops = -1, // number of iterations, -1 loops forever + Secure_mode = 0; // set if some functionality restricted ++static int CPU_loop = 0; // wait for reliable CPU data + + /* Some cap's stuff to reduce runtime calls -- + to accomodate 'Batch' mode, they begin life as empty strings */ +@@ -1679,6 +1680,9 @@ static void before (char *me) + Fieldstab[P_PPD].fmts = pid_fmt; + Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits; + } ++ ++ if (( getenv("CPULOOP")) && ( atoi(getenv("CPULOOP")) == 1 )) ++ CPU_loop = 1; + } + + +@@ -2978,6 +2981,7 @@ static proc_t **summary_show (void) + { + static proc_t **p_table = NULL; + static CPU_t *smpcpu = NULL; ++ static int first = 0; + + // whoa first time, gotta' prime the pump... + if (!p_table) { +@@ -3025,6 +3029,28 @@ static proc_t **summary_show (void) + + smpcpu = cpus_refresh(smpcpu); + ++ if (first==0 && CPU_loop) ++ { ++ int i; ++ CPU_t *cpu; ++ for (i = 0; i < Cpu_tot; i++) { ++ cpu = &smpcpu[i]; ++ cpu->u_sav = cpu->u; ++ cpu->s_sav = cpu->s; ++ cpu->n_sav = cpu->n; ++ cpu->i_sav = cpu->i; ++ cpu->w_sav = cpu->w; ++ cpu->x_sav = cpu->x; ++ cpu->y_sav = cpu->y; ++ cpu->z_sav = cpu->z; ++ } ++ tv.tv_sec = Rc.delay_time; ++ tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000; ++ select(0, NULL, NULL, NULL, &tv); ++ ++ smpcpu = cpus_refresh(smpcpu); ++ } ++ + if (CHKw(Curwin, View_CPUSUM)) { + // display just the 1st /proc/stat line + summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):"); +@@ -3050,6 +3076,8 @@ static proc_t **summary_show (void) + } + + SETw(Curwin, NEWFRAM_cwo); ++ ++ first = 1; + return p_table; + } + +diff -up procps-3.2.7/top.1.p15 procps-3.2.7/top.1 +--- procps-3.2.7/top.1.p15 2008-09-01 11:37:51.000000000 +0200 ++++ procps-3.2.7/top.1 2008-09-01 11:37:51.000000000 +0200 +@@ -1183,6 +1183,13 @@ Then ponder this: + Send bug reports to: + Albert D\. Cahalan, + ++The top command calculates Cpu(s) by looking at the change in CPU time values ++between samples. When you first run it, it has no previous sample to compare ++to, so these initial values are the percentages since boot. It means you need ++at least two loops or you have to ignore summary output from the first loop. ++This is problem for example for batch mode. There is a possible workaround if ++you define the CPULOOP=1 environment variable. The top command will be run one ++extra hidden loop for CPU data before standard output. + + .\" ---------------------------------------------------------------------- + .SH 8. HISTORY Former top diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-manpage.patch b/srcpkgs/procps/patches/procps-3.2.7-top-manpage.patch new file mode 100644 index 0000000000..4ce0779465 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-manpage.patch @@ -0,0 +1,32 @@ +diff -up procps-3.2.7/top.1.cpudesc procps-3.2.7/top.1 +--- procps-3.2.7/top.1.cpudesc 2008-01-18 08:04:19.000000000 +0100 ++++ procps-3.2.7/top.1 2008-01-18 08:15:49.000000000 +0100 +@@ -121,6 +121,7 @@ + 2. FIELDS / Columns + a. DESCRIPTIONS of Fields + b. SELECTING and ORDERING Columns ++ c. SUMMARY Area Fields + 3. INTERACTIVE Commands + a. GLOBAL Commands + b. SUMMARY Area Commands +@@ -540,6 +540,20 @@ You\fI move\fR a field to the\fB left\fR + upper case\fR letter and to the\fB right\fR with the\fB lower case\fR + letter. + ++.\" ...................................................................... ++.SS 2c. SUMMARY Area Fields ++.\" ---------------------------------------------------------------------- ++The summary area fields describing CPU statistics are abbreviated. They provide ++information about times spent in: ++ \fR us = user mode ++ \fR sy = system mode ++ \fR ni = low priority user mode (nice) ++ \fR id = idle task ++ \fR wa = I/O waiting ++ \fR hi = servicing IRQs ++ \fR si = servicing soft IRQs ++ \fR st = steal (time given to other DomU instances) ++ + + .\" ---------------------------------------------------------------------- + .SH 3. INTERACTIVE Commands diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-remcpu.patch b/srcpkgs/procps/patches/procps-3.2.7-top-remcpu.patch new file mode 100644 index 0000000000..88d14ef0ac --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-remcpu.patch @@ -0,0 +1,98 @@ +--- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200 ++++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200 +@@ -912,6 +912,7 @@ + static CPU_t *cpus_refresh (CPU_t *cpus) + { + static FILE *fp = NULL; ++ static int cpu_max; + int i; + int num; + // enough for a /proc/stat CPU line (not the intr line) +@@ -926,24 +927,29 @@ + can hold tics representing the /proc/stat cpu summary (the first + line read) -- that slot supports our View_CPUSUM toggle */ + cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t)); ++ cpu_max = Cpu_tot; + } ++ else if (cpu_max > Cpu_tot) ++ /* move saved CUPs summary to cpu_max possition */ ++ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); ++ + rewind(fp); + fflush(fp); + + // first value the last slot with the cpu summary line + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); +- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number + num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", +- &cpus[Cpu_tot].u, +- &cpus[Cpu_tot].n, +- &cpus[Cpu_tot].s, +- &cpus[Cpu_tot].i, +- &cpus[Cpu_tot].w, +- &cpus[Cpu_tot].x, +- &cpus[Cpu_tot].y, +- &cpus[Cpu_tot].z ++ &cpus[cpu_max].u, ++ &cpus[cpu_max].n, ++ &cpus[cpu_max].s, ++ &cpus[cpu_max].i, ++ &cpus[cpu_max].w, ++ &cpus[cpu_max].x, ++ &cpus[cpu_max].y, ++ &cpus[cpu_max].z + ); + if (num < 4) + std_err("failed /proc/stat read"); +@@ -955,7 +961,7 @@ + } + + // now value each separate cpu's tics +- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) { ++ for (i = 0; ; i++) { + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); + cpus[i].x = 0; // FIXME: can't tell by kernel version number + cpus[i].y = 0; // FIXME: can't tell by kernel version number +@@ -964,9 +970,35 @@ + &cpus[i].id, + &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z + ); +- if (num < 4) +- std_err("failed /proc/stat read"); ++ if (num < 4) { ++ Cpu_tot = i; ++ break; ++ } ++ if (i == cpu_max - 1) { ++ // Bump cpu_max and extend cpus ++ cpu_max++; ++ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t)); ++ if (!cpus) std_err("realloc failed"); ++ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t)); ++ } ++ } ++ ++ if (cpu_max > Cpu_tot) ++ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t)); ++ ++ // and just in case we're 2.2.xx compiled without SMP support... ++ if (Cpu_tot == 1) { ++ cpus[0].id = cpus[1].id = 0; ++ cpus[0].u = cpus[1].u; ++ cpus[0].n = cpus[1].n; ++ cpus[0].s = cpus[1].s; ++ cpus[0].i = cpus[1].i; ++ cpus[0].w = cpus[1].w; ++ cpus[0].x = cpus[1].x; ++ cpus[0].y = cpus[1].y; ++ cpus[0].z = cpus[1].z; + } ++ + return cpus; + } + diff --git a/srcpkgs/procps/patches/procps-3.2.7-top-sorthigh.patch b/srcpkgs/procps/patches/procps-3.2.7-top-sorthigh.patch new file mode 100644 index 0000000000..e17df1e228 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-top-sorthigh.patch @@ -0,0 +1,37 @@ +--- procps-3.2.7/top.c.sorthigh 2007-02-05 09:06:34.000000000 +0100 ++++ procps-3.2.7/top.c 2007-02-05 09:09:35.000000000 +0100 +@@ -3121,6 +3121,7 @@ + unsigned w = Fieldstab[i].width; + + int advance = (x==0) && !Rc.mode_altscr; ++ f += advance; + + switch (i) { + case P_CMD: +@@ -3179,7 +3180,7 @@ + break; + case P_PRI: + if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) { +- f = " RT"; ++ f = advance ? " RT" : " RT"; + MKCOL(""); + } else + MKCOL((int)p->priority); +@@ -3227,7 +3228,7 @@ + break; + case P_WCH: + if (No_ksyms) { +- f = " %08lx "; ++ f = advance ? "%08lx " : " %08lx "; + MKCOL((long)p->wchan); + } else { + MKCOL(lookup_wchan(p->wchan, p->XXXID)); +@@ -3236,7 +3237,7 @@ + + } /* end: switch 'procflag' */ + +- rp = scat(rp, cbuf+advance); ++ rp = scat(rp, cbuf); + } /* end: for 'maxpflgs' */ + + PUFF( diff --git a/srcpkgs/procps/patches/procps-3.2.7-w-best.patch b/srcpkgs/procps/patches/procps-3.2.7-w-best.patch new file mode 100644 index 0000000000..86b3e93283 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-w-best.patch @@ -0,0 +1,16 @@ +--- procps-3.2.7/w.c.kzak 2007-04-02 23:58:30.000000000 +0200 ++++ procps-3.2.7/w.c 2007-04-03 00:09:15.000000000 +0200 +@@ -149,11 +149,11 @@ + const proc_t *restrict const tmp = *pptr; + if(unlikely(tmp->tgid == u->ut_pid)) { + *found_utpid = 1; +- best = tmp; ++ if (!best) ++ best = tmp; + } + if(tmp->tty != line) continue; + (*jcpu) += tmp->utime + tmp->stime; +- secondbest = tmp; + /* same time-logic here as for "best" below */ + if(! (secondbest && tmp->start_time <= secondbest->start_time) ){ + secondbest = tmp; diff --git a/srcpkgs/procps/patches/procps-3.2.7-watch-unicode.patch b/srcpkgs/procps/patches/procps-3.2.7-watch-unicode.patch new file mode 100644 index 0000000000..1b3d97488d --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.7-watch-unicode.patch @@ -0,0 +1,139 @@ +diff -u procps-3.2.7/Makefile procps/Makefile +--- procps-3.2.7/Makefile 2007-01-16 17:24:49.000000000 +0100 ++++ procps/Makefile 2007-01-16 17:29:27.000000000 +0100 +@@ -67,7 +67,7 @@ + # plus the top-level Makefile to make it work stand-alone. + _TARFILES := Makefile + +-CURSES := -lncurses ++CURSES := -lncursesw + + # This seems about right for the dynamic library stuff. + # Something like this is probably needed to make the SE Linux +diff -u procps-3.2.7/watch.c procps/watch.c +--- procps-3.2.7/watch.c 2007-01-16 17:24:49.000000000 +0100 ++++ procps/watch.c 2007-01-16 18:06:57.000000000 +0100 +@@ -28,6 +28,8 @@ + #include + #include + #include "proc/procps.h" ++#include ++#include + + #ifdef FORCE_8BIT + #undef isprint +@@ -137,6 +139,27 @@ + } + } + ++static wint_t ++readwc(FILE *stream, mbstate_t *mbs) ++{ ++ for (;;) { ++ int chr; ++ char c; ++ wchar_t wc; ++ size_t len; ++ ++ chr = getc(stream); ++ if (chr == EOF) ++ return WEOF; ++ c = chr; ++ len = mbrtowc(&wc, &c, 1, mbs); ++ if (len == (size_t)-1) ++ memset(mbs, 0, sizeof(*mbs)); ++ else if (len != (size_t)-2) ++ return wc; ++ } ++} ++ + int + main(int argc, char *argv[]) + { +@@ -243,6 +266,7 @@ + FILE *p; + int x, y; + int oldeolseen = 1; ++ mbstate_t mbs; + + if (screen_size_changed) { + get_terminal_size(); +@@ -276,49 +300,63 @@ + do_exit(2); + } + ++ memset(&mbs, 0, sizeof(mbs)); + for (y = show_title; y < height; y++) { + int eolseen = 0, tabpending = 0; + for (x = 0; x < width; x++) { +- int c = ' '; +- int attr = 0; ++ wint_t c = L' '; ++ int attr = 0, c_width; ++ cchar_t cc; ++ wchar_t wstr[2]; + + if (!eolseen) { + /* if there is a tab pending, just spit spaces until the + next stop instead of reading characters */ + if (!tabpending) + do +- c = getc(p); +- while (c != EOF && !isprint(c) +- && c != '\n' +- && c != '\t'); +- if (c == '\n') ++ c = readwc(p, &mbs); ++ while (c != WEOF && !iswprint(c) ++ && c != L'\n' ++ && c != L'\t'); ++ if (c == L'\n') + if (!oldeolseen && x == 0) { + x = -1; + continue; + } else + eolseen = 1; +- else if (c == '\t') ++ else if (c == L'\t') + tabpending = 1; +- if (c == EOF || c == '\n' || c == '\t') +- c = ' '; ++ if (c == WEOF || c == L'\n' || c == L'\t') ++ c = L' '; + if (tabpending && (((x + 1) % 8) == 0)) + tabpending = 0; + } ++ wstr[0] = c; ++ wstr[1] = 0; ++ setcchar (&cc, wstr, 0, 0, NULL); + move(y, x); + if (option_differences) { +- chtype oldch = inch(); +- char oldc = oldch & A_CHARTEXT; ++ cchar_t oldc; ++ wchar_t oldwstr[2]; ++ attr_t attrs; ++ short colors; ++ ++ in_wch(&oldc); ++ getcchar(&oldc, oldwstr, &attrs, &colors, NULL); + attr = !first_screen +- && ((char)c != oldc ++ && (wstr[0] != oldwstr[0] + || + (option_differences_cumulative +- && (oldch & A_ATTRIBUTES))); ++ && attrs)); + } + if (attr) + standout(); +- addch(c); ++ add_wch(&cc); + if (attr) + standend(); ++ c_width = wcwidth(c); ++ if (c_width > 1) ++ x += c_width - 1; + } + oldeolseen = eolseen; + } diff --git a/srcpkgs/procps/patches/procps-3.2.8-linux-ver-init.patch b/srcpkgs/procps/patches/procps-3.2.8-linux-ver-init.patch new file mode 100644 index 0000000000..ca83c466d0 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.8-linux-ver-init.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/303120 + +make sure the linux version constructor runs before the libproc constructor +since the latter uses variables setup by the former + +fix by Chris Coleman + +Index: proc/version.c +=================================================================== +RCS file: /cvsroot/procps/procps/proc/version.c,v +retrieving revision 1.7 +diff -u -p -r1.7 version.c +--- procps-old/proc/version.c 9 Feb 2003 07:27:16 -0000 1.7 ++++ procps/proc/version.c 14 Nov 2010 00:22:44 -0000 +@@ -33,7 +33,7 @@ void display_version(void) { + + int linux_version_code; + +-static void init_Linux_version(void) __attribute__((constructor)); ++static void init_Linux_version(void) __attribute__((constructor(100))); + static void init_Linux_version(void) { + static struct utsname uts; + int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ diff --git a/srcpkgs/procps/patches/procps-3.2.8-setlocale.patch b/srcpkgs/procps/patches/procps-3.2.8-setlocale.patch new file mode 100644 index 0000000000..c197fd38a8 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.8-setlocale.patch @@ -0,0 +1,66 @@ +diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c +--- procps-3.2.8-orig/proc/sysinfo.c 2008-03-24 05:33:43.000000000 +0100 ++++ procps-3.2.8/proc/sysinfo.c 2009-12-18 22:50:52.000000000 +0100 +@@ -74,17 +74,19 @@ + /***********************************************************************/ + int uptime(double *restrict uptime_secs, double *restrict idle_secs) { + double up=0, idle=0; +- char *restrict savelocale; ++ char *savelocale; + + FILE_TO_BUF(UPTIME_FILE,uptime_fd); +- savelocale = setlocale(LC_NUMERIC, NULL); ++ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC,"C"); + if (sscanf(buf, "%lf %lf", &up, &idle) < 2) { + setlocale(LC_NUMERIC,savelocale); ++ free(savelocale); + fputs("bad data in " UPTIME_FILE "\n", stderr); + return 0; + } + setlocale(LC_NUMERIC,savelocale); ++ free(savelocale); + SET_IF_DESIRED(uptime_secs, up); + SET_IF_DESIRED(idle_secs, idle); + return up; /* assume never be zero seconds in practice */ +@@ -128,9 +130,9 @@ + double up_1, up_2, seconds; + unsigned long long jiffies; + unsigned h; +- char *restrict savelocale; ++ char *savelocale; + +- savelocale = setlocale(LC_NUMERIC, NULL); ++ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + do{ + FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1); +@@ -141,6 +143,7 @@ + /* uptime(&up_2, NULL); */ + } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */ + setlocale(LC_NUMERIC, savelocale); ++ free(savelocale); + jiffies = user_j + nice_j + sys_j + other_j; + seconds = (up_1 + up_2) / 2; + h = (unsigned)( (double)jiffies/seconds/smp_num_cpus ); +@@ -303,16 +306,18 @@ + /***********************************************************************/ + void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) { + double avg_1=0, avg_5=0, avg_15=0; +- char *restrict savelocale; ++ char *savelocale; + + FILE_TO_BUF(LOADAVG_FILE,loadavg_fd); +- savelocale = setlocale(LC_NUMERIC, NULL); ++ savelocale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) { + fputs("bad data in " LOADAVG_FILE "\n", stderr); ++ free(savelocale); + exit(1); + } + setlocale(LC_NUMERIC, savelocale); ++ free(savelocale); + SET_IF_DESIRED(av1, avg_1); + SET_IF_DESIRED(av5, avg_5); + SET_IF_DESIRED(av15, avg_15); diff --git a/srcpkgs/procps/patches/procps-3.2.8-threads.patch b/srcpkgs/procps/patches/procps-3.2.8-threads.patch new file mode 100644 index 0000000000..2491aa4c00 --- /dev/null +++ b/srcpkgs/procps/patches/procps-3.2.8-threads.patch @@ -0,0 +1,49 @@ +diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c +--- procps-3.2.8/top.c.threads 2009-10-01 07:14:43.000000000 -0400 ++++ procps-3.2.8/top.c 2009-10-05 14:05:00.000000000 -0400 +@@ -1138,6 +1138,7 @@ static proc_t **procs_refresh (proc_t ** + #define ENTsz sizeof(proc_t) + static unsigned savmax = 0; // first time, Bypass: (i) + proc_t *ptsk = (proc_t *)-1; // first time, Force: (ii) ++ proc_t *saved_ptsk; + unsigned curmax = 0; // every time (jeeze) + PROCTAB* PT; + static int show_threads_was_enabled = 0; // optimization +@@ -1172,6 +1173,10 @@ static proc_t **procs_refresh (proc_t ** + while (curmax < savmax) { + proc_t *ttsk; + if (unlikely(!(ptsk = readproc(PT, NULL)))) break; ++ if(!show_threads_was_enabled) ++ saved_ptsk = ptsk; ++ else ++ saved_ptsk = NULL; + show_threads_was_enabled = 1; + while (curmax < savmax) { + unsigned idx; +@@ -1189,7 +1194,7 @@ static proc_t **procs_refresh (proc_t ** + prochlp(ttsk); + ++curmax; + } +- free(ptsk); // readproc() proc_t not used ++ if(!saved_ptsk) free(ptsk); // readproc() proc_t not used + } + } + +@@ -1208,7 +1213,8 @@ static proc_t **procs_refresh (proc_t ** + else { // show each thread in a process separately + while (ptsk) { + proc_t *ttsk; +- if (likely(ptsk = readproc(PT, NULL))) { ++ if (likely(ptsk = readproc(PT, NULL)) || ++ unlikely(saved_ptsk && (ptsk = saved_ptsk)) ) { + show_threads_was_enabled = 1; + while (1) { + table = alloc_r(table, (curmax + 1) * PTRsz); +@@ -1216,6 +1222,7 @@ static proc_t **procs_refresh (proc_t ** + prochlp(ttsk); + table[curmax++] = ttsk; + } ++ saved_ptsk = NULL; + free(ptsk); // readproc() proc_t not used + } + } diff --git a/srcpkgs/procps/patches/ps_1_flt_output.patch b/srcpkgs/procps/patches/ps_1_flt_output.patch deleted file mode 100644 index ea8f62a2c3..0000000000 --- a/srcpkgs/procps/patches/ps_1_flt_output.patch +++ /dev/null @@ -1,30 +0,0 @@ -Description: Documenting maj_flt and min_flt output specifiers in ps.1 -Bug-Debian: http://bugs.debian.org/434221 -Author: Craig Small -Last-Update: 2010-02-25 ---- a/ps/ps.1 -+++ b/ps/ps.1 -@@ -4,7 +4,7 @@ - .\" Quick hack conversion by Albert Cahalan, 1998. - .\" Licensed under version 2 of the Gnu General Public License. - .\" --.TH PS 1 "July 28, 2004" "Linux" "Linux User's Manual" -+.TH PS 1 "February 25, 2010" "Linux" "Linux User's Manual" - .\" - .\" To render this page: - .\" groff -t -b -man -X -P-resolution -P100 -Tps ps.1 & -@@ -1084,6 +1084,14 @@ - (alias\ \fBspid\fR,\ \fBtid\fR). - T} - -+maj_flt MAJFLT T{ -+The number of major page faults that have occured with this process. -+T} -+ -+min_flt MINFLT T{ -+The number of minor page faults that have occured with this process. -+T} -+ - ni NI T{ - nice value. This ranges from 19 (nicest) to \-20 (not\ nice to\ others), - see\ \fInice\fR(1). (alias\ \fBnice\fR). diff --git a/srcpkgs/procps/patches/ps_1_options.patch b/srcpkgs/procps/patches/ps_1_options.patch deleted file mode 100644 index a03b335912..0000000000 --- a/srcpkgs/procps/patches/ps_1_options.patch +++ /dev/null @@ -1,548 +0,0 @@ -Author: Jari Aalto -Description: Re-sort ps.1 options -Bug-Debian: http://bugs.debian.org/518620 -Reviewed-by: Craig Small -Index: b/ps/ps.1 -=================================================================== ---- a/ps/ps.1 2009-11-24 21:00:48.000000000 +1100 -+++ b/ps/ps.1 2009-11-24 21:00:49.000000000 +1100 -@@ -158,20 +158,6 @@ - .PP - .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - .SH "SIMPLE PROCESS SELECTION" --.opt \-A --Select all processes. Identical to \fB\-e\fR. -- --.opt \-N --Select all processes except those that fulfill the specified conditions. --(negates the selection) Identical to \fB\-\-deselect\fR. -- --.opt T --Select all processes associated with this terminal. Identical to the --\fBt\fR option without any argument. -- --.opt \-a --Select all processes except both session leaders (see \fIgetsid\fR(2)) and --processes not associated with a terminal. - - .opt a - Lift the BSD\-style "only yourself" restriction, which is imposed upon -@@ -183,9 +169,20 @@ - list all processes with a terminal (tty), - or to list all processes when used together with the \fBx\fR option. - -+.opt \-A -+Select all processes. Identical to \fB\-e\fR. -+ -+.opt \-a -+Select all processes except both session leaders (see \fIgetsid\fR(2)) and -+processes not associated with a terminal. -+ - .opt \-d - Select all processes except session leaders. - -+.opt \-\-deselect -+Select all processes except those that fulfill the specified conditions. -+(negates the selection) Identical to \fB\-N\fR. -+ - .opt \-e - Select all processes. Identical to \fB\-A\fR. - -@@ -194,11 +191,20 @@ - .\" add in the group leaders -- at least according to the SunOS 4 - .\" man page on the FreeBSD site. Uh oh. I think I had tested SunOS - .\" though, so maybe the code is correct. -+ - .opt g - Really all, even session leaders. This flag is obsolete and may be - discontinued in a future release. It is normally implied by the \fBa\fR flag, - and is only useful when operating in the sunos4 personality. - -+.opt \-N -+Select all processes except those that fulfill the specified conditions. -+(negates the selection) Identical to \fB\-\-deselect\fR. -+ -+.opt T -+Select all processes associated with this terminal. Identical to the -+\fBt\fR option without any argument. -+ - .opt r - Restrict the selection to only running processes. - -@@ -212,10 +218,6 @@ - list all processes owned by you (same EUID as \fBps\fR), - or to list all processes when used together with the \fBa\fR option. - --.opt \-\-deselect --Select all processes except those that fulfill the specified conditions. --(negates the selection) Identical to \fB\-N\fR. -- - .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - .PD - .PP -@@ -224,6 +226,13 @@ - or comma\-separated list. They can be used multiple times. - For\ example:\ \fBps\ \-p\ "1\ 2"\ \-p\ 3,4\fR - .P -+ -+.opt \-\fI123\fR -+Identical to \fB\-\-sid\ \fI123\fR. -+ -+.opt \fI123\fR -+Identical to \fB\-\-pid\ \fI123\fR. -+ - .opt \-C \ cmdlist - Select by command name. - .br -@@ -237,24 +246,6 @@ - \fIgrplist\fR list. The real group ID identifies the group of the user - who created the process, see \fIgetgid\fR(2). - --.opt U \ userlist --Select by effective user ID (EUID) or name. --.br --This selects the processes whose effective user name --or ID is in \fIuserlist\fR. --The effective user\ ID describes the user whose file --access permissions are used by the process --(see\ \fIgeteuid\fR(2)). --Identical to \fB\-u\fR and\ \fB\-\-user\fR. -- --.opt \-U \ userlist --select by real user ID (RUID) or name. --.br --It selects the processes whose real user name or ID is in the --\fIuserlist\fR list. --The real user ID identifies the user who created the process, --see\ \fIgetuid\fR(2). -- - .opt \-g \ grplist - Select by session OR by effective group name. - .br -@@ -266,6 +257,17 @@ - Group ID numbers will work only when some group names are also specified. - See the \fB\-s\fR and \fB\-\-group\fR options. - -+.opt \-\-Group \ grplist -+Select by real group ID (RGID) or name. Identical to \fB\-G\fR. -+ -+.opt \-\-group \ grplist -+Select by effective group ID (EGID) or name. -+.br -+This selects the processes whose effective group name or ID is in -+\fIgrouplist\fR. The effective group ID describes the group whose file -+access permissions are used by the process (see\ \fIgeteuid\fR(2)). -+The \fB\-g\fR option is often an alternative to\ \fB\-\-group\fR. -+ - .opt p \ pidlist - Select by process ID. Identical to \fB\-p\fR and\ \fB\-\-pid\fR. - -@@ -275,12 +277,25 @@ - This selects the processes whose process ID numbers appear in - \fIpidlist\fR. Identical to \fBp\fR and\ \fB\-\-pid\fR. - -+.opt \-\-pid \ pidlist -+Select by process\ ID. Identical to \fB\-p\fR\ and\ \fBp\fR. -+ -+.opt \-\-ppid \ pidlist -+Select by parent process\ ID. -+This selects the processes -+with a parent\ process\ ID in \fRpidlist\fR. -+That\ is, it selects processes that are children -+of those listed in \fRpidlist\fR. -+ - .opt \-s \ sesslist - Select by session ID. - .br - This selects the processes - with a session ID specified in\ \fIsesslist\fR. - -+.opt \-\-sid \ sesslist -+Select by session\ ID. Identical to\ \fB\-s\fR. -+ - .opt t \ ttylist - Select by tty. Nearly identical to \fB\-t\fR and \fB\-\-tty\fR, - but can also be used with an empty \fIttylist\fR to indicate -@@ -297,6 +312,27 @@ - forms: /dev/ttyS1, ttyS1, S1. - A\ plain "\-" may be used to select processes not attached to any terminal. - -+.opt \-\-tty \ ttylist -+Select by terminal. Identical to \fB\-t\fR and\ \fBt\fR. -+ -+.opt U \ userlist -+Select by effective user ID (EUID) or name. -+.br -+This selects the processes whose effective user name -+or ID is in \fIuserlist\fR. -+The effective user\ ID describes the user whose file -+access permissions are used by the process -+(see\ \fIgeteuid\fR(2)). -+Identical to \fB\-u\fR and\ \fB\-\-user\fR. -+ -+.opt \-U \ userlist -+select by real user ID (RUID) or name. -+.br -+It selects the processes whose real user name or ID is in the -+\fIuserlist\fR list. -+The real user ID identifies the user who created the process, -+see\ \fIgetuid\fR(2). -+ - .opt \-u \ userlist - Select by effective user ID (EUID) or name. - .br -@@ -305,46 +341,13 @@ - access permissions are used by the process (see\ \fIgeteuid\fR(2)). - Identical to \fBU\fR and \fB\-\-user\fR. - --.opt \-\-Group \ grplist --Select by real group ID (RGID) or name. Identical to \fB\-G\fR. -- - .opt \-\-User \ userlist - Select by real user ID (RUID) or name. Identical to \fB\-U\fR. - --.opt \-\-group \ grplist --Select by effective group ID (EGID) or name. --.br --This selects the processes whose effective group name or ID is in --\fIgrouplist\fR. The effective group ID describes the group whose file --access permissions are used by the process (see\ \fIgeteuid\fR(2)). --The \fB\-g\fR option is often an alternative to\ \fB\-\-group\fR. -- --.opt \-\-pid \ pidlist --Select by process\ ID. Identical to \fB\-p\fR\ and\ \fBp\fR. -- --.opt \-\-ppid \ pidlist --Select by parent process\ ID. --This selects the processes --with a parent\ process\ ID in \fRpidlist\fR. --That\ is, it selects processes that are children --of those listed in \fRpidlist\fR. -- --.opt \-\-sid \ sesslist --Select by session\ ID. Identical to\ \fB\-s\fR. -- --.opt \-\-tty \ ttylist --Select by terminal. Identical to \fB\-t\fR and\ \fBt\fR. -- - .opt \-\-user \ userlist - Select by effective user ID (EUID) or name. - Identical to \fB\-u\fR and\ \fBU\fR. - --.opt \-\fI123\fR --Identical to \fB\-\-sid\ \fI123\fR. -- --.opt \fI123\fR --Identical to \fB\-\-pid\ \fI123\fR. -- - .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - .PD - .PP -@@ -353,38 +356,12 @@ - The output may differ by personality. - .PP - --.opt \-F --extra full format. See the \fB\-f\fR option, which \fB\-F\fR implies. -- --.opt \-O \ format --is like \fB\-o\fR, but preloaded with some default columns. --Identical to \fB\-o\ pid,\fIformat\fB,state,tname,time,command\fR --or \fB\-o\ pid,\fIformat\fB,tname,time,cmd\fR, see\ \fB\-o\fR\ below. -- --.opt O \ format --is preloaded \fBo\fR (overloaded). --.br --The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output --format with some common fields predefined) or can be used to specify --sort order. Heuristics are used to determine the behavior of this --option. To ensure that the desired behavior is obtained (sorting or --formatting), specify the option in some other way --(e.g. with \fB\-O\fR or \fB\-\-sort\fR). --When used as a formatting option, it is identical to \fB\-O\fR, with the --BSD\ personality. -- --.opt \-M --Add a column of security data. Identical to \fBZ\fR. (for\ SE\ Linux) -- --.opt X --Register format. -- --.opt Z --Add a column of security data. Identical to \fB\-M\fR. (for\ SE\ Linux) -- - .opt \-c - Show different scheduler information for the \fB\-l\fR option. - -+.opt \-\-context -+Display security context format. (for\ SE\ Linux) -+ - .opt \-f - does full\-format listing. This option can be combined with many - other UNIX\-style options to add additional columns. It also causes -@@ -393,6 +370,12 @@ - See the \fBc\fR option, the format keyword \fBargs\fR, and the - format keyword \fBcomm\fR. - -+.opt \-F -+extra full format. See the \fB\-f\fR option, which \fB\-F\fR implies. -+ -+.opt \-\-format \ format -+user\-defined format. Identical to \fB\-o\fR and \fBo\fR. -+ - .opt j - BSD job control format. - -@@ -405,6 +388,26 @@ - .opt \-l - long format. The \fB\-y\fR option is often useful with this. - -+.opt \-M -+Add a column of security data. Identical to \fBZ\fR. (for\ SE\ Linux) -+ -+.opt O \ format -+is preloaded \fBo\fR (overloaded). -+.br -+The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output -+format with some common fields predefined) or can be used to specify -+sort order. Heuristics are used to determine the behavior of this -+option. To ensure that the desired behavior is obtained (sorting or -+formatting), specify the option in some other way -+(e.g. with \fB\-O\fR or \fB\-\-sort\fR). -+When used as a formatting option, it is identical to \fB\-O\fR, with the -+BSD\ personality. -+ -+.opt \-O \ format -+is like \fB\-o\fR, but preloaded with some default columns. -+Identical to \fB\-o\ pid,\fIformat\fB,state,tname,time,command\fR -+or \fB\-o\ pid,\fIformat\fB,tname,time,cmd\fR, see\ \fB\-o\fR\ below. -+ - .opt o \ format - specify user\-defined format. Identical to \fB\-o\fR and - \fB\-\-format\fR. -@@ -440,15 +443,15 @@ - .opt v - display virtual memory format - -+.opt X -+Register format. -+ - .opt \-y - Do not show flags; show rss in place of addr. - This option can only be used with \fB\-l\fR. - --.opt \-\-format \ format --user\-defined format. Identical to \fB\-o\fR and \fBo\fR. -- --.opt \-\-context --Display security context format. (for\ SE\ Linux) -+.opt Z -+Add a column of security data. Identical to \fB\-M\fR. (for\ SE\ Linux) - - .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - .PD -@@ -459,37 +462,6 @@ - .\" .B C - .\" use raw CPU time for %CPU instead of decaying average - --.opt \-H --show process hierarchy (forest) -- --.opt N \ namelist --Specify namelist file. Identical to \fB\-n\fR, see \fB\-n\fR above. -- --.opt O \ order --Sorting order. (overloaded) --.br --The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output --format with some common fields predefined) or can be used to specify --sort order. Heuristics are used to determine the behavior of this --option. To ensure that the desired behavior is obtained (sorting or --formatting), specify the option in some other way (e.g. with \fB\-O\fR --or \fB\-\-sort\fR). -- --For sorting, obsolete BSD \fBO\fR option syntax is --\fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]]. --It orders the processes listing according to the multilevel sort specified by --the sequence of one\-letter short keys \fIk1\fR, \fIk2\fR, ... described --in the \fBOBSOLETE SORT KEYS\fR section below. --The\ "+" is currently optional, --merely re\-iterating the default direction on a key, --but may help to distinguish an \fBO\fR sort from an \fBO\fR format. --The\ "\-" reverses direction only on the key it precedes. -- --.opt S --Sum up some information, such as CPU usage, from dead child processes --into their parent. This is useful for examining a system where a --parent process repeatedly forks off short\-lived children to do work. -- - .opt c - Show the true command name. This is derived from the name of the - executable file, rather than from the argv value. Command arguments -@@ -502,12 +474,24 @@ - See the \fB\-f\fR option, the format keyword \fBargs\fR, and the - format keyword \fBcomm\fR. - -+.opt \-\-cols \ n -+set screen width -+ -+.opt \-\-columns \ n -+set screen width -+ -+.opt \-\-cumulative -+include some dead child process data (as a sum with the parent) -+ - .opt e - Show the environment after the command. - - .opt f - ASCII\-art process hierarchy (forest) - -+.opt \-\-forest -+ASCII art process tree -+ - .opt h - No header. (or, one header per screen in the BSD personality) - .br -@@ -521,6 +505,12 @@ - and \fB\-\-no\-headers\fR to enable printing headers each page or - disable headers entirely, respectively. - -+.opt \-H -+show process hierarchy (forest) -+ -+.opt \-\-headers -+repeat header lines, one per page of output -+ - .opt k \ spec - specify sorting order. Sorting syntax is - [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]] -@@ -557,40 +547,47 @@ - .br - /System.map - -+.opt \-\-lines \ n -+set screen height -+ - .opt n - Numeric output for WCHAN and USER. (including all types of UID and GID) - --.opt \-w --Wide output. Use this option twice for unlimited width. -- --.opt w --Wide output. Use this option twice for unlimited width. -- --.opt \-\-cols \ n --set screen width -- --.opt \-\-columns \ n --set screen width -- --.opt \-\-cumulative --include some dead child process data (as a sum with the parent) -+.opt N \ namelist -+Specify namelist file. Identical to \fB\-n\fR, see \fB\-n\fR above. - --.opt \-\-forest --ASCII art process tree -+.opt O \ order -+Sorting order. (overloaded) -+.br -+The BSD \fBO\fR option can act like \fB\-O\fR (user\-defined output -+format with some common fields predefined) or can be used to specify -+sort order. Heuristics are used to determine the behavior of this -+option. To ensure that the desired behavior is obtained (sorting or -+formatting), specify the option in some other way (e.g. with \fB\-O\fR -+or \fB\-\-sort\fR). - --.opt \-\-headers --repeat header lines, one per page of output -+For sorting, obsolete BSD \fBO\fR option syntax is -+\fBO\fR[\fB+\fR|\fB\-\fR]\fIk1\fR[,[\fB+\fR|\fB\-\fR]\fIk2\fR[,...]]. -+It orders the processes listing according to the multilevel sort specified by -+the sequence of one\-letter short keys \fIk1\fR, \fIk2\fR, ... described -+in the \fBOBSOLETE SORT KEYS\fR section below. -+The\ "+" is currently optional, -+merely re\-iterating the default direction on a key, -+but may help to distinguish an \fBO\fR sort from an \fBO\fR format. -+The\ "\-" reverses direction only on the key it precedes. - - .opt \-\-no\-headers - print no header line at all. \-\-no\-heading is an alias for this - option. - --.opt \-\-lines \ n --set screen height -- - .opt \-\-rows \ n - set screen height - -+.opt S -+Sum up some information, such as CPU usage, from dead child processes -+into their parent. This is useful for examining a system where a -+parent process repeatedly forks off short\-lived children to do work. -+ - .opt \-\-sort \ spec - specify sorting order. Sorting syntax is - [\fB+\fR|\fB\-\fR]\fIkey\fR[,[\fB+\fR|\fB\-\fR]\fIkey\fR[,...]] -@@ -599,6 +596,12 @@ - lexicographic order. Identical to\ \fBk\fR. - For example: \fBps\ jax\ \-\-sort=uid,\-ppid,+pid\fR - -+.opt w -+Wide output. Use this option twice for unlimited width. -+ -+.opt \-w -+Wide output. Use this option twice for unlimited width. -+ - .opt \-\-width \ n - set screen width - -@@ -614,35 +617,35 @@ - .opt \-L - Show threads, possibly with LWP and NLWP columns - --.opt \-T --Show threads, possibly with SPID column -- - .opt m - Show threads after processes - - .opt \-m - Show threads after processes - -+.opt \-T -+Show threads, possibly with SPID column -+ - .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - .PD - .PP - .SH "OTHER INFORMATION" - .PD 0 - -+.opt \-\-help -+Print a help message. -+ -+.opt \-\-info -+Print debugging info. -+ - .opt L - List all format specifiers. - --.opt \-V --Print the procps version. -- - .opt V - Print the procps version. - --.opt \-\-help --Print a help message. -- --.opt \-\-info --Print debugging info. -+.opt \-V -+Print the procps version. - - .opt \-\-version - Print the procps version. diff --git a/srcpkgs/procps/patches/ps_cgroup_display.patch b/srcpkgs/procps/patches/ps_cgroup_display.patch deleted file mode 100644 index 362c8f6a72..0000000000 --- a/srcpkgs/procps/patches/ps_cgroup_display.patch +++ /dev/null @@ -1,157 +0,0 @@ -Description: ps displays cgroup -Author: Swann Perarnau -Bug-Debian: http://bugs.debian.org/469669 -Reviewed-by: Craig Small ---- a/proc/readproc.c -+++ b/proc/readproc.c -@@ -598,6 +598,17 @@ - p->environ = file2strvec(path, "environ"); - else - p->environ = NULL; -+ -+ if(linux_version_code>=LINUX_VERSION(2,6,24) && (flags & PROC_FILLCGROUP)) { -+ p->cgroup = file2strvec(path, "cgroup"); /* read /proc/#/cgroup */ -+ if(p->cgroup && *p->cgroup) { -+ int i = strlen(*p->cgroup); -+ if( (*p->cgroup)[i-1]=='\n' ) -+ (*p->cgroup)[i-1] = ' '; //little hack to remove trailing \n -+ } -+ } -+ else -+ p->cgroup = NULL; - - return p; - next_proc: -@@ -686,7 +697,7 @@ - t->cmdline = p->cmdline; // better not free these until done with all threads! - t->environ = p->environ; - #endif -- -+ t->cgroup = p->cgroup; - t->ppid = p->ppid; // ought to put the per-task ppid somewhere - - return t; -@@ -896,6 +907,8 @@ - free((void*)*p->cmdline); - if (p->environ) - free((void*)*p->environ); -+ if (p->cgroup) -+ free((void*)*p->cgroup); - free(p); - } - ---- a/proc/readproc.h -+++ b/proc/readproc.h -@@ -139,6 +139,7 @@ - tpgid, // stat terminal process group id - exit_signal, // stat might not be SIGCHLD - processor; // stat current (or most recent?) CPU -+ char **cgroup; // cgroup current cgroup, looks like a classic filepath - } proc_t; - - // PROCTAB: data structure holding the persistent information readproc needs -@@ -236,8 +237,9 @@ - #define PROC_FILLSTAT 0x0040 // read stat -- currently unconditional - #define PROC_FILLWCHAN 0x0080 // look up WCHAN name - #define PROC_FILLARG 0x0100 // alloc and fill in `cmdline' -+#define PROC_FILLCGROUP 0x0200 // alloc and fill in `cgroup` - --#define PROC_LOOSE_TASKS 0x0200 // threat threads as if they were processes -+#define PROC_LOOSE_TASKS 0x2000 // threat threads as if they were processes - - // Obsolete, consider only processes with one of the passed: - #define PROC_PID 0x1000 // process id numbers ( 0 terminated) ---- a/ps/display.c -+++ b/ps/display.c -@@ -223,8 +223,7 @@ - - #define needs_for_format (proc_format_needs|task_format_needs) - --#define PROC_ONLY_FLAGS (PROC_FILLENV|PROC_FILLARG|PROC_FILLCOM|PROC_FILLMEM) -- -+#define PROC_ONLY_FLAGS (PROC_FILLENV|PROC_FILLARG|PROC_FILLCOM|PROC_FILLMEM|PROC_FILLCGROUP) - /***** munge lists and determine openproc() flags */ - static void lists_and_needs(void){ - check_headers(); -@@ -342,6 +341,7 @@ - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse -+ if(buf.cgroup) free((void*)*buf.cgroup); - } - break; - case TF_show_proc|TF_loose_tasks: // H option -@@ -354,6 +354,7 @@ - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse -+ if(buf.cgroup) free((void*)*buf.cgroup); - } - break; - case TF_show_proc|TF_show_task: // m and -m options -@@ -366,7 +367,8 @@ - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse -- } -+ if(buf.cgroup) free((void*)*buf.cgroup); -+ } - break; - case TF_show_task: // -L and -T options - while(readproc(ptp,&buf)){ -@@ -377,7 +379,8 @@ - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse -- } -+ if(buf.cgroup) free((void*)*buf.cgroup); -+ } - break; - } - closeproc(ptp); ---- a/ps/output.c -+++ b/ps/output.c -@@ -376,6 +376,26 @@ - return max_rightward-rightward; - } - -+static int pr_cgroup(char *restrict const outbuf,const proc_t *restrict const pp) { -+ if(pp->cgroup && *pp->cgroup) { -+ char *endp = outbuf; -+ int rightward=max_rightward; -+ if(forest_prefix){ -+ int fh = forest_helper(outbuf); -+ endp += fh; -+ rightward -= fh; -+ } -+ if(rightward>1){ -+ *endp++ = ' '; -+ rightward--; -+ endp += escape_str(endp, *pp->cgroup, OUTBUF_SIZE, &rightward); -+ } -+ return max_rightward-rightward; -+ } -+ else -+ return pr_nop(outbuf,pp); -+} -+ - /* "ucomm" is the same thing: short unless -f */ - static int pr_comm(char *restrict const outbuf, const proc_t *restrict const pp){ - char *endp = outbuf; -@@ -1274,7 +1294,7 @@ - #define GRP PROC_FILLGRP /* gid_t -> group names */ - #define WCH PROC_FILLWCHAN /* do WCHAN lookup */ - -- -+#define CGRP PROC_FILLCGROUP /* read cgroup */ - /* TODO - * pull out annoying BSD aliases into another table (to macro table?) - * add sorting functions here (to unify names) -@@ -1310,6 +1330,7 @@ - {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT}, - {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT}, - {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/ -+{"cgroup", "CGROUP", pr_cgroup, sr_nop, 27, CGRP, LNX, PO|UNLIMITED}, - {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT}, - {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/ - {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT}, diff --git a/srcpkgs/procps/patches/ps_size_sz.patch b/srcpkgs/procps/patches/ps_size_sz.patch deleted file mode 100644 index ff30815bd2..0000000000 --- a/srcpkgs/procps/patches/ps_size_sz.patch +++ /dev/null @@ -1,29 +0,0 @@ -Author: -Description: Renames second SZ to SIZE, means we don't follow SCO but less confusion -Bug-Debian: http://bugs.debian.org/541061 -Index: b/ps/output.c -=================================================================== ---- a/ps/output.c 2009-11-24 21:00:47.000000000 +1100 -+++ b/ps/output.c 2009-11-24 21:00:48.000000000 +1100 -@@ -1522,7 +1522,7 @@ - {"sigcatch", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, XXX, TO|SIGNAL}, /*caught*/ - {"sigignore", "IGNORED", pr_sigignore,sr_nop, 9, 0, XXX, TO|SIGNAL}, /*ignored*/ - {"sigmask", "BLOCKED", pr_sigmask, sr_nop, 9, 0, XXX, TO|SIGNAL}, /*blocked*/ --{"size", "SZ", pr_swapable, sr_swapable, 5, 0, SCO, PO|RIGHT}, -+{"size", "SIZE", pr_swapable, sr_swapable, 5, 0, SCO, PO|RIGHT}, - {"sl", "SL", pr_nop, sr_nop, 3, 0, XXX, AN|RIGHT}, - {"spid", "SPID", pr_thread, sr_tid, 5, 0, SGI, TO|PIDMAX|RIGHT}, - {"stackp", "STACKP", pr_stackp, sr_start_stack, 8, 0, LNX, PO|RIGHT}, /*start_stack*/ -Index: b/ps/ps.1 -=================================================================== ---- a/ps/ps.1 2009-11-24 21:00:47.000000000 +1100 -+++ b/ps/ps.1 2009-11-24 21:00:48.000000000 +1100 -@@ -1254,7 +1254,7 @@ - see\ \fBblocked\fR. (alias\ \fBblocked\fR,\ \fBsig_block\fR). - T} - --size SZ T{ -+size SIZE T{ - approximate amount of swap space that would be required - if the process were to dirty all writable pages and then - be swapped out. diff --git a/srcpkgs/procps/patches/ps_supgid_display.patch b/srcpkgs/procps/patches/ps_supgid_display.patch deleted file mode 100644 index 378daa1381..0000000000 --- a/srcpkgs/procps/patches/ps_supgid_display.patch +++ /dev/null @@ -1,446 +0,0 @@ -Description: 506303 ps displays supplementary groups -Author: Alfredo Esteban -Bug-Debian: http://bugs.debian.org/506303 -Reviewed-by: Craig Small ---- a/proc/library.map -+++ b/proc/library.map -@@ -7,7 +7,7 @@ - - readproc; readtask; readproctab; readproctab2; look_up_our_self; escape_command; - escape_str; escape_strlist; -- openproc; closeproc; freeproc; -+ openproc; closeproc; freeproc; allocsupgrp; freesupgrp; - tty_to_dev; dev_to_tty; open_psdb_message; open_psdb; lookup_wchan; - display_version; procps_version; linux_version_code; - Hertz; smp_num_cpus; have_privs; ---- a/proc/readproc.c -+++ b/proc/readproc.c -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -85,63 +86,68 @@ - long Threads = 0; - long Tgid = 0; - long Pid = 0; -+ int hash = 0; -+ int isupgid = 0; - -- static const unsigned char asso[] = -+ static const unsigned char asso[] = - { -- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 61, 15, 61, -- 61, 61, 61, 61, 61, 61, 30, 3, 5, 5, -- 61, 5, 61, 8, 61, 61, 3, 61, 10, 61, -- 6, 61, 13, 0, 30, 25, 0, 61, 61, 61, -- 61, 61, 61, 61, 61, 61, 61, 3, 61, 13, -- 0, 0, 61, 30, 61, 25, 61, 61, 61, 0, -- 61, 61, 61, 61, 5, 61, 0, 61, 61, 61, -- 0, 61, 61, 61, 61, 61, 61, 61 -+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 66, 0, 66, -+ 66, 66, 66, 66, 66, 66, 3, 30, 20, 30, -+ 66, 25, 66, 20, 66, 66, 30, 66, 25, 66, -+ 0, 66, 8, 10, 3, 18, 5, 66, 66, 66, -+ 66, 66, 66, 66, 66, 66, 66, 3, 66, 10, -+ 0, 0, 66, 25, 66, 5, 66, 66, 66, 25, -+ 66, 5, 66, 66, 0, 66, 0, 0, 66, 66, -+ 25, 66, 66, 66, 66, 66, 66, 66 - }; - - static const status_table_struct table[] = { -- F(VmStk) -+ F(Pid) - NUL NUL -- F(State) -+ F(Threads) -+ NUL -+ F(PPid) -+ NUL NUL -+ F(Tgid) - NUL -- F(VmExe) - F(ShdPnd) -+ NUL NUL -+ F(State) - NUL -- F(VmData) -+ F(VmStk) -+ NUL NUL -+ F(Uid) - NUL -- F(Name) -+ F(VmSize) - NUL NUL - F(VmRSS) -- NUL NUL -- F(VmLck) -- NUL NUL NUL -+ NUL - F(Gid) -- F(Pid) -- NUL NUL NUL -- F(VmSize) - NUL NUL -- F(VmLib) -- NUL NUL -- F(PPid) -- NUL -- F(SigCgt) -+ F(VmData) - NUL -- F(Threads) -+ F(Groups) -+ NUL NUL NUL NUL - F(SigPnd) -+ NUL NUL -+ F(SigBlk) - NUL -+ F(VmLib) -+ NUL NUL NUL NUL -+ F(VmLck) -+ NUL NUL NUL NUL -+ F(Name) -+ NUL NUL NUL NUL - F(SigIgn) -- NUL -- F(Uid) -- NUL NUL NUL NUL NUL NUL NUL NUL NUL -- NUL NUL NUL NUL NUL -- F(Tgid) - NUL NUL NUL NUL -- F(SigBlk) -- NUL NUL NUL -+ F(VmExe) -+ NUL NUL NUL NUL -+ F(SigCgt) - }; - - #undef F -@@ -157,6 +163,9 @@ - P->vm_exe = 0; - P->vm_lib = 0; - P->nlwp = 0; -+ P->nsupgid = 0; -+ P->supgid = NULL; -+ P->supgrp = NULL; - P->signal[0] = '\0'; // so we can detect it as missing for very old kernels - - goto base; -@@ -173,7 +182,9 @@ - // examine a field name (hash and compare) - base: - if(unlikely(!*S)) break; -- entry = table[63 & (asso[(int)S[3]] + asso[(int)S[2]] + asso[(int)S[0]])]; -+ hash = asso[S[3]] + asso[S[2]] + asso[S[0]]; -+ if (hash > 65) continue; -+ entry = table[hash]; - colon = strchr(S, ':'); - if(unlikely(!colon)) break; - if(unlikely(colon[1]!='\t')) break; -@@ -271,6 +282,21 @@ - P->sgid = strtol(S,&S,10); - P->fgid = strtol(S,&S,10); - continue; -+ case_Groups: -+ isupgid = 0; -+ if (*S != '\n'){ // Is there any supplementary group ? -+ P->supgid = (int *) xmalloc(0x0004 * sizeof(int)); -+ int vctsize = 0x0004; -+ while (S[1] != '\n' && isupgidsupgid = (int *)xrealloc(P->supgid,vctsize * sizeof(int)); -+ } -+ P->supgid[isupgid++] = strtol(S,&S,10); -+ P->nsupgid++; -+ } -+ } -+ continue; - case_VmData: - P->vm_data = strtol(S,&S,10); - continue; -@@ -589,6 +615,13 @@ - } - } - -+ if (flags & PROC_FILLSUPGRP && p->nsupgid > 0){ -+ allocsupgrp(p); -+ int i; -+ for (i=0; i < p->nsupgid; i++) -+ memcpy(p->supgrp[i], group_from_gid(p->supgid[i]), P_G_SZ); -+ } -+ - if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG)) /* read+parse /proc/#/cmdline */ - p->cmdline = file2strvec(path, "cmdline"); - else -@@ -683,6 +716,13 @@ - } - } - -+ if (flags & PROC_FILLSUPGRP && t->nsupgid > 0){ -+ allocsupgrp(t); -+ int i; -+ for (i=0; i < t->nsupgid; i++) -+ memcpy(t->supgrp[i], group_from_gid(t->supgid[i]), P_G_SZ); -+ } -+ - #if 0 - if ((flags & PROC_FILLCOM) || (flags & PROC_FILLARG)) /* read+parse /proc/#/cmdline */ - t->cmdline = file2strvec(path, "cmdline"); -@@ -897,6 +937,23 @@ - } - } - -+// allocate memory for supgrp -+void allocsupgrp(proc_t *p) { -+ if (!p || p->nsupgid == 0) return; -+ p->supgrp = (char**)xmalloc(p->nsupgid * sizeof(char*)); -+ int i; -+ for (i=0; insupgid; i++) -+ p->supgrp[i] = (char*)xmalloc(P_G_SZ * sizeof(char)); -+} -+ -+// free memory allocated for supgrp -+void freesupgrp(proc_t *p) { -+ int i; -+ for (i=0; insupgid; i++) -+ if (p->supgrp[i]) free(p->supgrp[i]); -+ free(p->supgrp); -+} -+ - // deallocate the space allocated by readproc if the passed rbuf was NULL - void freeproc(proc_t* p) { - if (!p) /* in case p is NULL */ ---- a/proc/readproc.h -+++ b/proc/readproc.h -@@ -122,6 +122,7 @@ - egroup[P_G_SZ], // status effective group name - sgroup[P_G_SZ], // status saved group name - fgroup[P_G_SZ], // status filesystem group name -+ **supgrp, // status supplementary groups - cmd[16]; // stat,status basename of executable file in call to exec(2) - struct proc_t - *ring, // n/a thread group ring -@@ -137,6 +138,8 @@ - suid, sgid, // status saved - fuid, fgid, // status fs (used for file access only) - tpgid, // stat terminal process group id -+ nsupgid, // status number of supplementary groups -+ *supgid, // status supplementary gid's - exit_signal, // stat might not be SIGCHLD - processor; // stat current (or most recent?) CPU - char **cgroup; // cgroup current cgroup, looks like a classic filepath -@@ -198,6 +201,12 @@ - // clean-up open files, etc from the openproc() - extern void closeproc(PROCTAB* PT); - -+// allocate memory for supgrp -+extern void allocsupgrp(proc_t *p); -+ -+// free memory allocated for supgrp -+extern void freesupgrp(proc_t *p); -+ - // retrieve the next process matching the criteria set by the openproc() - extern proc_t* readproc(PROCTAB *restrict const PT, proc_t *restrict p); - extern proc_t* readtask(PROCTAB *restrict const PT, const proc_t *restrict const p, proc_t *restrict t); -@@ -238,6 +247,7 @@ - #define PROC_FILLWCHAN 0x0080 // look up WCHAN name - #define PROC_FILLARG 0x0100 // alloc and fill in `cmdline' - #define PROC_FILLCGROUP 0x0200 // alloc and fill in `cgroup` -+#define PROC_FILLSUPGRP 0x0400 // resolve supplementary group id number -> group name - - #define PROC_LOOSE_TASKS 0x2000 // threat threads as if they were processes - ---- a/ps/display.c -+++ b/ps/display.c -@@ -342,6 +342,8 @@ - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse - if(buf.cgroup) free((void*)*buf.cgroup); -+ if(buf.nsupgid > 0 && buf.supgid) free(buf.supgid); -+ if((ptp->flags & PROC_FILLSUPGRP) && buf.nsupgid>0 && buf.supgrp) freesupgrp(&buf); - } - break; - case TF_show_proc|TF_loose_tasks: // H option -@@ -349,12 +351,16 @@ - proc_t buf2; - // must still have the process allocated - while(readtask(ptp,&buf,&buf2)){ -- if(!want_this_proc(&buf)) continue; -- show_one_proc(&buf2, task_format_list); -+ if(want_this_proc(&buf)) show_one_proc(&buf2, task_format_list); -+ if(buf2.nsupgid > 0 && buf2.supgid && buf.supgid!=buf2.supgid) free(buf2.supgid); -+ if((ptp->flags & PROC_FILLSUPGRP) && buf2.nsupgid>0 && buf2.supgrp && buf.supgrp!=buf2.supgrp) -+ freesupgrp(&buf2); - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse - if(buf.cgroup) free((void*)*buf.cgroup); -+ if(buf.nsupgid > 0 && buf.supgid) free(buf.supgid); -+ if((ptp->flags & PROC_FILLSUPGRP) && buf.nsupgid>0 && buf.supgrp) freesupgrp(&buf); - } - break; - case TF_show_proc|TF_show_task: // m and -m options -@@ -363,11 +369,18 @@ - proc_t buf2; - show_one_proc(&buf, proc_format_list); - // must still have the process allocated -- while(readtask(ptp,&buf,&buf2)) show_one_proc(&buf2, task_format_list); -+ while(readtask(ptp,&buf,&buf2)){ -+ show_one_proc(&buf2, task_format_list); -+ if(buf2.nsupgid > 0 && buf2.supgid && buf.supgid!=buf2.supgid) free(buf2.supgid); -+ if(ptp->flags & PROC_FILLSUPGRP && buf2.nsupgid>0 && buf2.supgrp && buf.supgrp!=buf2.supgrp) -+ freesupgrp(&buf2); -+ } - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse - if(buf.cgroup) free((void*)*buf.cgroup); -+ if(buf.nsupgid > 0 && buf.supgid) free(buf.supgid); -+ if((ptp->flags & PROC_FILLSUPGRP) && buf.nsupgid>0 && buf.supgrp) freesupgrp(&buf); - } - break; - case TF_show_task: // -L and -T options -@@ -375,11 +388,18 @@ - if(want_this_proc(&buf)){ - proc_t buf2; - // must still have the process allocated -- while(readtask(ptp,&buf,&buf2)) show_one_proc(&buf2, task_format_list); -+ while(readtask(ptp,&buf,&buf2)){ -+ show_one_proc(&buf2, task_format_list); -+ if(buf2.nsupgid > 0 && buf2.supgid && buf.supgid!=buf2.supgid) free(buf2.supgid); -+ if(ptp->flags & PROC_FILLSUPGRP && buf2.nsupgid>0 && buf2.supgrp && buf.supgrp!=buf2.supgrp) -+ freesupgrp(&buf2); -+ } - } - if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse - if(buf.environ) free((void*)*buf.environ); // ought to reuse - if(buf.cgroup) free((void*)*buf.cgroup); -+ if(buf.nsupgid > 0 && buf.supgid) free(buf.supgid); -+ if((ptp->flags & PROC_FILLSUPGRP) && buf.nsupgid>0 && buf.supgrp) freesupgrp(&buf); - } - break; - } -@@ -542,6 +562,12 @@ - qsort(processes, n, sizeof(proc_t*), compare_two_procs); - if(forest_type) show_forest(n); - else show_proc_array(ptp,n); -+ int i; -+ for (i=0; insupgid>0 && processes[i]->supgid) free(processes[i]->supgid); -+ if (ptp->flags & PROC_FILLSUPGRP) -+ for (i=0; insupgid>0 && processes[i]->supgrp) freesupgrp(processes[i]); - closeproc(ptp); - } - ---- a/ps/output.c -+++ b/ps/output.c -@@ -211,6 +211,32 @@ - return 0; - } - -+static int sr_supgid(const proc_t* P, const proc_t* Q){ -+ int i; -+ for (i = 0; i < INT_MAX; i++){ -+ if (P->nsupgid == i){ -+ if (Q->nsupgid == i) return 0; -+ else return -1; -+ } -+ if (Q->nsupgid == i) return 1; -+ if (P->supgid[i] != Q->supgid[i]) return P->supgid[i] - Q->supgid[i]; -+ } -+ return 0; -+} -+ -+static int sr_supgrp(const proc_t* P, const proc_t* Q){ -+ int i; -+ for (i = 0; i < INT_MAX; i++){ -+ if (P->nsupgid == i){ -+ if (Q->nsupgid == i) return 0; -+ else return -1; -+ } -+ if (Q->nsupgid == i) return 1; -+ int cmp = strncmp(P->supgrp[i],Q->supgrp[i],P_G_SZ); -+ if (cmp != 0) return cmp; -+ } -+ return 0; -+} - - /***************************************************************************/ - /************ Lots of format functions, starting with the NOP **************/ -@@ -1062,6 +1088,24 @@ - return snprintf(outbuf, COLWID, "%d", pp->fuid); - } - -+static int pr_supgid(char *restrict const outbuf, const proc_t *restrict const pp){ -+ if (pp->nsupgid == 0) return snprintf(outbuf,2,"-"); -+ int rest = COLWID; -+ int i = 0; -+ for (i = 0; i < pp->nsupgid && rest > 5; i++) -+ rest-= snprintf(outbuf+COLWID-rest, rest, "%d ", pp->supgid[i]); -+ return COLWID-rest; -+} -+ -+static int pr_supgrp(char *restrict const outbuf, const proc_t *restrict const pp){ -+ if (pp->nsupgid == 0) return snprintf(outbuf,2,"-"); -+ int rest = COLWID; -+ int i = 0; -+ for (i = 0; i < pp->nsupgid && rest > sizeof( pp->supgrp[i] ) + 1; i++) -+ rest-= snprintf(outbuf+COLWID-rest, rest, "%s ", pp->supgrp[i]); -+ return COLWID-rest; -+} -+ - // The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2004 Edition) - // requires that user and group names print as decimal numbers if there is - // not enough room in the column, so tough luck if you don't like it. -@@ -1293,6 +1337,7 @@ - #define USR PROC_FILLUSR /* uid_t -> user names */ - #define GRP PROC_FILLGRP /* gid_t -> group names */ - #define WCH PROC_FILLWCHAN /* do WCHAN lookup */ -+#define SUPGRP PROC_FILLSUPGRP /* supgid -> supplementary group names */ - - #define CGRP PROC_FILLCGROUP /* read cgroup */ - /* TODO -@@ -1490,6 +1535,8 @@ - {"status", "STATUS", pr_nop, sr_nop, 6, 0, DEC, AN|RIGHT}, - {"stime", "STIME", pr_stime, sr_stime, 5, 0, XXX, ET|RIGHT}, /* was 6 wide */ - {"suid", "SUID", pr_suid, sr_suid, 5, 0, LNx, ET|RIGHT}, -+{"supgid", "SUPGID", pr_supgid, sr_supgid, 27, 0, LNX, PO|UNLIMITED}, -+{"supgrp", "SUPGRP", pr_supgrp, sr_supgrp, 27, SUPGRP, LNX, PO|UNLIMITED}, - {"suser", "SUSER", pr_suser, sr_suser, 8, USR, LNx, ET|USER}, - {"svgid", "SVGID", pr_sgid, sr_sgid, 5, 0, XXX, ET|RIGHT}, - {"svgroup", "SVGROUP", pr_sgroup, sr_sgroup, 8, GRP, LNX, ET|USER}, ---- a/ps/ps.1 -+++ b/ps/ps.1 -@@ -1303,6 +1303,16 @@ - saved user\ ID. (alias\ \fBsvuid\fR). - T} - -+supgid SUPGID T{ -+gid of supplementary groups, see -+.BR getgroups (2). -+T} -+ -+supgrp SUPGRP T{ -+names of supplementary groups, see -+.BR getgroups (2). -+T} -+ - suser SUSER T{ - saved user name. This will be the textual user\ ID, - if\ it can be obtained and the field width permits, diff --git a/srcpkgs/procps/patches/readproc_c.patch b/srcpkgs/procps/patches/readproc_c.patch deleted file mode 100644 index 7b4442009d..0000000000 --- a/srcpkgs/procps/patches/readproc_c.patch +++ /dev/null @@ -1,25 +0,0 @@ -Author: Craig Small -Description: readproc.c some type conversion help -return if unable to open /proc -Index: b/proc/readproc.c -=================================================================== ---- a/proc/readproc.c 2009-11-24 20:53:03.000000000 +1100 -+++ b/proc/readproc.c 2009-11-24 21:00:41.000000000 +1100 -@@ -173,7 +173,7 @@ - // examine a field name (hash and compare) - base: - if(unlikely(!*S)) break; -- entry = table[63 & (asso[S[3]] + asso[S[2]] + asso[S[0]])]; -+ entry = table[63 & (asso[(int)S[3]] + asso[(int)S[2]] + asso[(int)S[0]])]; - colon = strchr(S, ':'); - if(unlikely(!colon)) break; - if(unlikely(colon[1]!='\t')) break; -@@ -942,6 +942,8 @@ - else - PT = openproc(flags); - va_end(ap); -+ if (!PT) -+ return 0; - do { /* read table: */ - tab = xrealloc(tab, (n+1)*sizeof(proc_t*));/* realloc as we go, using */ - tab[n] = readproc_direct(PT, NULL); /* final null to terminate */ diff --git a/srcpkgs/procps/patches/readproc_double_free.patch b/srcpkgs/procps/patches/readproc_double_free.patch deleted file mode 100644 index 669cb642ac..0000000000 --- a/srcpkgs/procps/patches/readproc_double_free.patch +++ /dev/null @@ -1,21 +0,0 @@ -Description: zeros out reused structures to stop double free problems -Bug-Debian: http://bugs.debian.org/550009 -Author: Arnaud Giersch ---- a/proc/readproc.c -+++ b/proc/readproc.c -@@ -828,6 +828,7 @@ - - saved_p = p; - if(!p) p = xcalloc(p, sizeof *p); /* passed buf or alloced mem */ -+ else memset(p, 0, sizeof *p); - - for(;;){ - // fills in the path, plus p->tid and p->tgid -@@ -856,6 +857,7 @@ - - saved_t = t; - if(!t) t = xcalloc(t, sizeof *t); /* passed buf or alloced mem */ -+ else memset(t, 0, sizeof *t); - - // 1. got to fake a thread for old kernels - // 2. for single-threaded processes, this is faster (but must patch up stuff that differs!) diff --git a/srcpkgs/procps/patches/series b/srcpkgs/procps/patches/series deleted file mode 100644 index ecbf642b09..0000000000 --- a/srcpkgs/procps/patches/series +++ /dev/null @@ -1,69 +0,0 @@ -fix_Makefile.diff -slabtop_once.patch -free.1.patch -output_sort_time.patch -pmap.1.patch -10_ps.1.patch -skill.1.patch -skill_perror.patch -slabtop_1.patch -sysctl.8.patch -sysctl_options.patch -tload.1.patch -top_irix.patch -top_no_openproc.patch -top_stdin_eof.patch -top_uid_length.patch -uptime.1.patch -vmstat.8.patch -watch.1.patch -w_time.patch -kill.1.patch -kill_warncr.patch -module_mk_shared.patch -sysinfo_elfnote.patch -top.1.patch -top_c_resize.patch -w-bassman.patch -top.1_cpustates.patch -watch_8bitchar.patch -library_map_freeproc.patch -pgrep_start_time.patch -readproc_c.patch -sysinfo_7_numbers.patch -tload_no_optargs.patch -w.1.patch -w_columns.patch -watch_exec_beep.patch -path_max.patch -w_envlength.patch -gnu-kbsd-version.patch -pgrep_c_option.patch -ps_cgroup_display.patch -watch_precision_time.patch -watch_unicode.patch -complain_unmounted_proc.patch -ps_supgid_display.patch -makefile_dev_null.patch -pgrep.1.patch -ps_size_sz.patch -top_mintime.patch -vmstat_headers.patch -pgrep_usage_exitcode.patch -ps_1_options.patch -top_highlight.patch -top_nohz.patch -vmstat_part_format.patch -readproc_double_free.patch -vmstat_units.patch -skill_null_argv.patch -skill_multiarg.patch -proc_version_constructor.patch -pmaps_smaps.patch -top_numeric_args.patch -top_1_swap.patch -w_userproc.patch -sysinfo_kfreebsd_hertz.patch -ps_1_flt_output.patch -watch_ansi_colour.patch -top_username_parse.patch diff --git a/srcpkgs/procps/patches/skill.1.patch b/srcpkgs/procps/patches/skill.1.patch deleted file mode 100644 index a327800857..0000000000 --- a/srcpkgs/procps/patches/skill.1.patch +++ /dev/null @@ -1,116 +0,0 @@ -Description: Cleanup man page #282168 -Bug-Debian: http://bugs.debian.org/282168 -Author: Brendan O'Dea -Reviewed-by: Craig Small -Index: b/skill.1 -=================================================================== ---- a/skill.1 2009-11-24 20:53:05.000000000 +1100 -+++ b/skill.1 2009-11-24 21:00:31.000000000 +1100 -@@ -11,37 +11,38 @@ - skill, snice \- send a signal or report process status - - .SH SYNOPSIS --.nf --skill [signal to send] [options] process selection criteria --snice [new priority] [options] process selection criteria --.fi -+.B skill -+.RI [ "signal to send" ] -+.RI [ options ] -+.I process selection criteria -+.br -+.B snice -+.RI [ "new priority" ] -+.RI [ options ] -+.I process selection criteria - - .SH DESCRIPTION - These tools are probably obsolete and unportable. The command - syntax is poorly defined. Consider using the killall, pkill, - and pgrep commands instead. - --The default signal for skill is TERM. Use -l or -L to list available signals. -+The default signal for skill is TERM. Use \-l or \-L to list available signals. - Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. --Alternate signals may be specified in three ways: -9 -SIGKILL -KILL. -+Alternate signals may be specified in three ways: \-9 \-SIGKILL \-KILL. - - The default priority for snice is +4. (snice +4 ...) --Priority numbers range from +20 (slowest) to -20 (fastest). -+Priority numbers range from +20 (slowest) to \-20 (fastest). - Negative priority numbers are restricted to administrative users. - - .SH "GENERAL OPTIONS" - .TS --l l l. ---f fast mode This is not currently useful. ---i interactive use T{ --You will be asked to approve each action. --T} ---v verbose output T{ --Display information about selected processes. --T} ---w warnings enabled This is not currently useful. ---n no action This only displays the process ID. ---V show version Displays version of program. -+lB l l. -+\-f fast mode This is not currently useful. -+\-i interactive use You will be asked to approve each action. -+\-v verbose output Display information about selected processes. -+\-w warnings enabled This is not currently useful. -+\-n no action This only displays the process ID. -+\-V show version Displays version of program. - .TE - - .SH "PROCESS SELECTION OPTIONS" -@@ -49,11 +50,11 @@ - The options below may be used to ensure correct interpretation. - Do not blame Albert for this interesting interface. - .TS --l l. ---t The next argument is a terminal (tty or pty). ---u The next argument is a username. ---p The next argument is a process ID number. ---c The next argument is a command name. -+lB l. -+\-t The next argument is a terminal (tty or pty). -+\-u The next argument is a username. -+\-p The next argument is a process ID number. -+\-c The next argument is a command name. - .TE - - .SH SIGNALS -@@ -63,7 +64,6 @@ - lB rB lB lB - lfCW r l l. - Name Num Action Description --.TH - 0 0 n/a exit code indicates if a signal may be sent - ALRM 14 exit - HUP 1 exit -@@ -104,15 +104,20 @@ - lB lB - lfCW l. - Command Description --.TC - snice seti crack +7 Slow down seti and crack --skill -KILL -v /dev/pts/* Kill users on new-style PTY devices --skill -STOP viro lm davem Stop 3 users --snice -17 root bash Give priority to root's shell -+skill \-KILL \-v /dev/pts/* Kill users on new-style PTY devices -+skill \-STOP viro lm davem Stop 3 users -+snice \-17 root bash Give priority to root's shell - .TE - - .SH "SEE ALSO" --killall(1) pkill(1) kill(1) renice(1) nice(1) signal(7) kill(2) -+.BR killall (1), -+.BR pkill (1), -+.BR kill (1), -+.BR renice (1), -+.BR nice(1), -+.BR kill(2), -+.BR signal(7) - - .SH STANDARDS - No standards apply. diff --git a/srcpkgs/procps/patches/skill_multiarg.patch b/srcpkgs/procps/patches/skill_multiarg.patch deleted file mode 100644 index 83b6e74ccf..0000000000 --- a/srcpkgs/procps/patches/skill_multiarg.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Fixed -v and -i and other flags in skill/snice - There was a too greedy option parser - Patch based on submitted patch by Yoshio Nakamura -Bug-Debian: http://bugs.debian.org/331419 -Bug-Debian: http://bugs.debian.org/569030 -Author: Craig Small - ---- a/skill.c -+++ b/skill.c -@@ -464,6 +464,8 @@ - switch(force){ /* fall through each data type */ - default: skillsnice_usage(); - case 0: /* not forced */ -+ if (argptr && argptr[0] == '-') /* its the next argument not a parameter */ -+ continue; - case 't': - if(argc){ - struct stat sbuf; diff --git a/srcpkgs/procps/patches/skill_null_argv.patch b/srcpkgs/procps/patches/skill_null_argv.patch deleted file mode 100644 index cafbd00847..0000000000 --- a/srcpkgs/procps/patches/skill_null_argv.patch +++ /dev/null @@ -1,14 +0,0 @@ -Author: WANG Yunfeng -Description: Don't treat skill null parameter as 0 -Bug-Debian: http://bugs.debian.org/551173 ---- a/skill.c -+++ b/skill.c -@@ -307,7 +307,7 @@ - long pid; - char *endp; - pid = strtol(argv[argc],&endp,10); -- if(!*endp){ -+ if(!*endp && (endp != argv[argc])){ - if(!kill((pid_t)pid,signo)) continue; - // The UNIX standard contradicts itself. If at least one process - // is matched for each PID (as if processes could share PID!) and diff --git a/srcpkgs/procps/patches/skill_perror.patch b/srcpkgs/procps/patches/skill_perror.patch deleted file mode 100644 index e9b64d0c43..0000000000 --- a/srcpkgs/procps/patches/skill_perror.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: kill prints perror -Author: Justin Pryzby -Bug-Debian: http://bugs.debian.org/468363 -Reviewed-by: Craig Small -Index: b/skill.c -=================================================================== ---- a/skill.c 2009-11-24 20:53:05.000000000 +1100 -+++ b/skill.c 2009-11-24 21:00:31.000000000 +1100 -@@ -317,6 +317,7 @@ - // The standard says we return non-zero if an error occurs. Thus if - // killing two processes gives 0 for one and EPERM for the other, - // we are required to return both zero and non-zero. Quantum kill??? -+ perror("kill"); - exitvalue = 1; - continue; - } diff --git a/srcpkgs/procps/patches/slabtop_1.patch b/srcpkgs/procps/patches/slabtop_1.patch deleted file mode 100644 index 24b7764e83..0000000000 --- a/srcpkgs/procps/patches/slabtop_1.patch +++ /dev/null @@ -1,97 +0,0 @@ -Description: Cleanup slabtop man page -Author: Brendan O'Dea -Bug-Debian: http://bugs.debian.org/282168 -Reviewed-by: Craig Small -Index: b/slabtop.1 -=================================================================== ---- a/slabtop.1 2009-11-24 20:53:05.000000000 +1100 -+++ b/slabtop.1 2009-11-24 21:00:32.000000000 +1100 -@@ -7,36 +7,39 @@ - slabtop \- display kernel slab cache information in real time - - .SH SYNOPSIS --.BI "slabtop [ " options " ] " -+.B slabtop -+.RI [ options ] - - .SH DESCRIPTION --.BR slabtop (1) -+.B slabtop - displays detailed kernel slab cache information in real time. It displays a - listing of the top caches sorted by one of the listed sort criteria. It also - displays a statistics header filled with slab layer information. - - .SH OPTIONS - Normal invocation of --.BR slabtop (1) -+.B slabtop - does not require any options. The behavior, however, can be fine-tuned by - specifying one or more of the following flags: - .TP --.B \-\^\-delay=n, \-d n --Refresh the display every n seconds. By default, --.BR slabtop (1) -+.B \-\-delay=\fIn\fR, \fB\-d \fIn -+Refresh the display every -+.I n -+in seconds. By default, -+.B slabtop - refreshes the display every three seconds. To exit the program, hit - .BR q. - .TP --.B \-\^\-sort=S, \-s S --Sort by S, where S is one of the sort criteria. -+.B \-\-sort=\fIS\fR, \fB\-s\fR \fIS -+Sort by \fIS\fR, where \fIS\fR is one of the sort criteria. - .TP --.B \-\^\-once, \-o -+.B \-\-once\fR, \fB\-o - Display the output once and then exit. - .TP --.B \-\^\-version, \-V -+.B \-\-version\fR, \fB\-V - Display version information and exit. - .TP --.B \-\^\-help -+.B \-\-help - Display usage information and exit. - - .SH SORT CRITERIA -@@ -78,7 +81,7 @@ - sort by cache utilization - - .SH COMMANDS --.BR slabtop (1) -+.B slabtop - accepts keyboard commands from the user during use. The following are - supported. In the case of letters, both cases are accepted. - -@@ -94,7 +97,9 @@ - Quit the program. - - .SH FILES --.IR /proc/slabinfo " \-\- slab information" -+.TP -+.I /proc/slabinfo -+slab information - - .SH "SEE ALSO" - .BR free (1), -@@ -104,7 +109,7 @@ - - .SH NOTES - Currently, --.BR slabtop (1) -+.B slabtop - requires a 2.4 or later kernel (specifically, a version 1.1 or later - .IR /proc/slabinfo ). - Kernel 2.2 should be supported in the future. -@@ -116,7 +121,7 @@ - .SH AUTHORS - Written by Chris Rivera and Robert Love. - --.BR slabtop (1) -+.B slabtop - was inspired by Martin Bligh's perl script, - .BR vmtop . - The procps package is maintained by Albert Cahalan . diff --git a/srcpkgs/procps/patches/slabtop_once.patch b/srcpkgs/procps/patches/slabtop_once.patch deleted file mode 100644 index 3c212bd2be..0000000000 --- a/srcpkgs/procps/patches/slabtop_once.patch +++ /dev/null @@ -1,116 +0,0 @@ -Description: Don't use ncurses for running once - Using ncurses initscr/endwin clears the screen for xterm/etc it - now prints raw text using printf -Bug-Debian: http://bugs.debian.org/503089 -Author: Craig Small ---- a/slabtop.c -+++ b/slabtop.c -@@ -268,11 +268,13 @@ - } - } - -+#define print_line(fmt, args...) if (run_once) printf(fmt, ## args); else printw(fmt, ## args) - int main(int argc, char *argv[]) - { - int o; - unsigned short old_rows; - struct slab_info *slab_list = NULL; -+ int run_once=0; - - struct option longopts[] = { - { "delay", 1, NULL, 'd' }, -@@ -306,6 +308,7 @@ - sort_func = set_sort_func(optarg[0]); - break; - case 'o': -+ run_once=1; - delay = 0; - break; - case 'V': -@@ -322,11 +325,13 @@ - if (tcgetattr(0, &saved_tty) == -1) - perror("tcgetattr"); - -- initscr(); -- term_size(0); - old_rows = rows; -- resizeterm(rows, cols); -- signal(SIGWINCH, term_size); -+ term_size(0); -+ if (!run_once) { -+ initscr(); -+ resizeterm(rows, cols); -+ signal(SIGWINCH, term_size); -+ } - signal(SIGINT, sigint_handler); - - do { -@@ -340,13 +345,13 @@ - if (get_slabinfo(&slab_list, &stats)) - break; - -- if (old_rows != rows) { -+ if (!run_once && old_rows != rows) { - resizeterm(rows, cols); - old_rows = rows; - } - - move(0,0); -- printw( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" -+ print_line( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Slabs (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Caches (%% used) : %d / %d (%.1f%%)\n" - " Active / Total Size (%% used) : %.2fK / %.2fK (%.1f%%)\n" -@@ -361,14 +366,14 @@ - slab_list = slabsort(slab_list); - - attron(A_REVERSE); -- printw( "%6s %6s %4s %8s %6s %8s %10s %-23s\n", -+ print_line( "%6s %6s %4s %8s %6s %8s %10s %-23s\n", - "OBJS", "ACTIVE", "USE", "OBJ SIZE", "SLABS", - "OBJ/SLAB", "CACHE SIZE", "NAME"); - attroff(A_REVERSE); - - curr = slab_list; - for (i = 0; i < rows - 8 && curr->next; i++) { -- printw("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", -+ print_line("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n", - curr->nr_objs, curr->nr_active_objs, curr->use, - curr->obj_size / 1024.0, curr->nr_slabs, - curr->objs_per_slab, (unsigned)(curr->cache_size / 1024), -@@ -376,22 +381,24 @@ - curr = curr->next; - } - -- refresh(); - put_slabinfo(slab_list); - -- FD_ZERO(&readfds); -- FD_SET(0, &readfds); -- tv.tv_sec = delay; -- tv.tv_usec = 0; -- if (select(1, &readfds, NULL, NULL, &tv) > 0) { -- if (read(0, &c, 1) != 1) -- break; -- parse_input(c); -- } -+ if (!run_once) { -+ refresh(); -+ FD_ZERO(&readfds); -+ FD_SET(0, &readfds); -+ tv.tv_sec = delay; -+ tv.tv_usec = 0; -+ if (select(1, &readfds, NULL, NULL, &tv) > 0) { -+ if (read(0, &c, 1) != 1) -+ break; -+ parse_input(c); -+ } -+ } - } while (delay); - - tcsetattr(0, TCSAFLUSH, &saved_tty); - free_slabinfo(slab_list); -- endwin(); -+ if (!run_once) endwin(); - return 0; - } diff --git a/srcpkgs/procps/patches/sysctl.8.patch b/srcpkgs/procps/patches/sysctl.8.patch deleted file mode 100644 index 394cb4d2b2..0000000000 --- a/srcpkgs/procps/patches/sysctl.8.patch +++ /dev/null @@ -1,147 +0,0 @@ -Author: -Description: -p flag has OPTIONAL filename -cleanup sysctl man page -Bug-Debian: http://bugs.debian.org/297144 -Bug-Debian: http://bugs.debian.org/282168 -Index: b/sysctl.8 -=================================================================== ---- a/sysctl.8 2009-11-24 20:53:05.000000000 +1100 -+++ b/sysctl.8 2009-11-24 21:00:32.000000000 +1100 -@@ -10,76 +10,108 @@ - .SH NAME - sysctl \- configure kernel parameters at runtime - .SH SYNOPSIS --.B "sysctl [-n] [-e] variable ..." -+.B sysctl -+.RB [ \-n ] -+.RB [ \-e ] -+.I variable -+\&... - .br --.B "sysctl [-n] [-e] [-q] -w variable=value ..." -+.B sysctl -+.RB [ \-n ] -+.RB [ \-e ] -+.RB [ \-q ] -+.B \-w -+.IR variable = value -+\&... - .br --.B "sysctl [-n] [-e] [-q] -p " -+.B sysctl -+.RB [ \-n ] -+.RB [ \-e ] -+.RB [ \-q ] -+.B \-p -+.RI [ filename ] - .br --.B "sysctl [-n] [-e] -a" -+.B sysctl -+.RB [ \-n ] -+.RB [ \-e ] -+.B \-a - .br --.B "sysctl [-n] [-e] -A" -+.B sysctl -+.RB [ \-n ] -+.RB [ \-e ] -+.B \-A - .SH DESCRIPTION - .B sysctl - is used to modify kernel parameters at runtime. The parameters available - are those listed under /proc/sys/. Procfs is required for --.B sysctl(8) -+.B sysctl - support in Linux. You can use --.B sysctl(8) -+.B sysctl - to both read and write sysctl data. - .SH PARAMETERS - .TP --.B "variable" -+.I variable - The name of a key to read from. An example is kernel.ostype. The '/' - separator is also accepted in place of a '.'. - .TP --.B "variable=value" --To set a key, use the form variable=value, where variable is the key and --value is the value to set it to. If the value contains quotes or characters -+.IR variable = value -+To set a key, use the form -+.IR variable = value -+where -+.I variable -+is the key and -+.I value -+is the value to set it to. If the value contains quotes or characters - which are parsed by the shell, you may need to enclose the value in double --quotes. This requires the -w parameter to use. -+quotes. This requires the -+.B \-w -+parameter to use. - .TP --.B "-n" -+.B \-n - Use this option to disable printing of the key name when printing values. - .TP --.B "-e" -+.B \-e - Use this option to ignore errors about unknown keys. - .TP --.B "-N" -+.B \-N - Use this option to only print the names. It may be useful with shells that - have programmable completion. - .TP --.B "-q" -+.B \-q - Use this option to not display the values set to stdout. - .TP --.B "-w" -+.B \-w - Use this option when you want to change a sysctl setting. - .TP --.B "-p" -+.B \-p - Load in sysctl settings from the file specified or /etc/sysctl.conf if none given. - Specifying \- as filename means reading data from standard input. - .TP --.B "-a" -+.B \-a - Display all values currently available. - .TP --.B "-A" -+.B \-A - Display all values currently available in table form. - .SH EXAMPLES --.TP --/sbin/sysctl -a --.TP --/sbin/sysctl -n kernel.hostname --.TP --/sbin/sysctl -w kernel.domainname="example.com" --.TP --/sbin/sysctl -p /etc/sysctl.conf -+/sbin/sysctl \-a -+.br -+/sbin/sysctl \-n kernel.hostname -+.br -+/sbin/sysctl \-w kernel.domainname="example.com" -+.br -+/sbin/sysctl \-p /etc/sysctl.conf - .SH FILES - .I /proc/sys -+.br - .I /etc/sysctl.conf - .SH SEE ALSO - .BR sysctl.conf (5) - .SH BUGS --The -A parameter behaves just as -a does. -+The -+.B \-A -+parameter behaves just as -+.B \-a -+does. - .SH AUTHOR - George Staikos, - diff --git a/srcpkgs/procps/patches/sysctl_options.patch b/srcpkgs/procps/patches/sysctl_options.patch deleted file mode 100644 index 55bbaf4949..0000000000 --- a/srcpkgs/procps/patches/sysctl_options.patch +++ /dev/null @@ -1,46 +0,0 @@ -Author: -Description: Fix up some option processing -Index: b/sysctl.c -=================================================================== ---- a/sysctl.c 2009-11-24 20:53:05.000000000 +1100 -+++ b/sysctl.c 2009-11-24 21:00:33.000000000 +1100 -@@ -421,6 +421,7 @@ - const char *me = (const char *)basename(argv[0]); - bool SwitchesAllowed = true; - bool WriteMode = false; -+ bool DisplayAllOpt = false; - int ReturnCode = 0; - const char *preloadfile = DEFAULT_PRELOAD; - -@@ -486,8 +487,8 @@ - case 'a': // string and integer values (for Linux, all of them) - case 'A': // same as -a -o - case 'X': // same as -a -x -- SwitchesAllowed = false; -- return DisplayAll(PROC_PATH); -+ DisplayAllOpt = true; -+ break; - case 'V': - fprintf(stdout, "sysctl (%s)\n",procps_version); - exit(0); -@@ -502,6 +503,8 @@ - } else { - if (NameOnly && Quiet) // nonsense - return Usage(me); -+ if (DisplayAllOpt) // We cannot have values with -a -+ return Usage(me); - SwitchesAllowed = false; - if (WriteMode || index(*argv, '=')) - ReturnCode = WriteSetting(*argv); -@@ -509,6 +512,11 @@ - ReturnCode = ReadSetting(*argv); - } - } -+ if (DisplayAllOpt) { -+ if (Quiet) -+ return Usage(me); -+ return DisplayAll(PROC_PATH); -+ } - - return ReturnCode; - } diff --git a/srcpkgs/procps/patches/sysinfo_7_numbers.patch b/srcpkgs/procps/patches/sysinfo_7_numbers.patch deleted file mode 100644 index a10519742a..0000000000 --- a/srcpkgs/procps/patches/sysinfo_7_numbers.patch +++ /dev/null @@ -1,36 +0,0 @@ -Author: Craig Small -Description: Adds up 7 cpu numbers not 4 -Bug-Debian: http://bugs.debian.org/460331 -Index: b/proc/sysinfo.c -=================================================================== ---- a/proc/sysinfo.c 2009-11-24 21:00:38.000000000 +1100 -+++ b/proc/sysinfo.c 2009-11-24 21:00:42.000000000 +1100 -@@ -124,24 +124,25 @@ - unsigned long long Hertz; - - static void old_Hertz_hack(void){ -- unsigned long long user_j, nice_j, sys_j, other_j; /* jiffies (clock ticks) */ -+ unsigned long long user_j, nice_j, sys_j, other_j, wait_j, hirq_j, sirq_j, stol_j; /* jiffies (clock ticks) */ - double up_1, up_2, seconds; - unsigned long long jiffies; - unsigned h; - char *restrict savelocale; - -+ wait_j = hirq_j = sirq_j = stol_j = 0; - savelocale = setlocale(LC_NUMERIC, NULL); - setlocale(LC_NUMERIC, "C"); - do{ - FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1); - /* uptime(&up_1, NULL); */ - FILE_TO_BUF(STAT_FILE,stat_fd); -- sscanf(buf, "cpu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j, &other_j); -+ sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", &user_j, &nice_j, &sys_j, &other_j, &wait_j, &hirq_j, &sirq_j, &stol_j); - FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_2); - /* uptime(&up_2, NULL); */ - } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */ - setlocale(LC_NUMERIC, savelocale); -- jiffies = user_j + nice_j + sys_j + other_j; -+ jiffies = user_j + nice_j + sys_j + other_j + wait_j + hirq_j + sirq_j + stol_j ; - seconds = (up_1 + up_2) / 2; - h = (unsigned)( (double)jiffies/seconds/smp_num_cpus ); - /* actual values used by 2.4 kernels: 32 64 100 128 1000 1024 1200 */ diff --git a/srcpkgs/procps/patches/sysinfo_elfnote.patch b/srcpkgs/procps/patches/sysinfo_elfnote.patch deleted file mode 100644 index 1e4a199139..0000000000 --- a/srcpkgs/procps/patches/sysinfo_elfnote.patch +++ /dev/null @@ -1,23 +0,0 @@ -Description: Find AT_CLKTCK elf note only on Linux -Author: Petr Salinger -Bug-Debian: http://bugs.debian.org/378157 -Reviewed-by: Craig Small -Index: b/proc/sysinfo.c -=================================================================== ---- a/proc/sysinfo.c 2009-11-24 20:53:04.000000000 +1100 -+++ b/proc/sysinfo.c 2009-11-24 21:00:38.000000000 +1100 -@@ -221,12 +221,13 @@ - // _SC_NPROCESSORS_ONLN returns 1, which should work OK - smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN); - if(smp_num_cpus<1) smp_num_cpus=1; /* SPARC glibc is buggy */ -- -+#ifdef __linux__ - if(linux_version_code > LINUX_VERSION(2, 4, 0)){ - Hertz = find_elf_note(AT_CLKTCK); - if(Hertz!=NOTE_NOT_FOUND) return; - fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr); - } -+#endif - old_Hertz_hack(); - } - diff --git a/srcpkgs/procps/patches/sysinfo_kfreebsd_hertz.patch b/srcpkgs/procps/patches/sysinfo_kfreebsd_hertz.patch deleted file mode 100644 index c6bc7a4b22..0000000000 --- a/srcpkgs/procps/patches/sysinfo_kfreebsd_hertz.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Fix Hertz calculation for kfreebsd -Bug-Debian: http://bugs.debian.org/460331 -Author: Petr Salinger ---- a/proc/sysinfo.c -+++ b/proc/sysinfo.c -@@ -230,6 +230,14 @@ - fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr); - } - #endif -+#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) -+ /* On FreeBSD the Hertz hack is unrelaible, there is no ELF note and -+ * Hertz isn't defined in asm/params.h -+ * See Debian Bug #460331 -+ */ -+ Hertz = 100; -+ return; -+#endif - old_Hertz_hack(); - } - diff --git a/srcpkgs/procps/patches/tload.1.patch b/srcpkgs/procps/patches/tload.1.patch deleted file mode 100644 index 896876f26f..0000000000 --- a/srcpkgs/procps/patches/tload.1.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: -Description: Reword tload.1 man page for the alarm -Index: b/tload.1 -=================================================================== ---- a/tload.1 2009-11-24 20:53:05.000000000 +1100 -+++ b/tload.1 2009-11-24 21:00:33.000000000 +1100 -@@ -39,7 +39,7 @@ - .BI "\-d" " delay" - option sets the time argument for an - .BR alarm (2); --if -d 0 is specified, the alarm is set to 0, which will never send the -+if \-d 0 is specified, the alarm is set to 0, which will never send the - .B SIGALRM - and update the display. - diff --git a/srcpkgs/procps/patches/tload_no_optargs.patch b/srcpkgs/procps/patches/tload_no_optargs.patch deleted file mode 100644 index 1fd365bdee..0000000000 --- a/srcpkgs/procps/patches/tload_no_optargs.patch +++ /dev/null @@ -1,16 +0,0 @@ -Author: Craig Small -Description: Removed unneeded optarg and optind variables form tload.c -Index: b/tload.c -=================================================================== ---- a/tload.c 2009-11-24 20:53:03.000000000 +1100 -+++ b/tload.c 2009-11-24 21:00:42.000000000 +1100 -@@ -30,9 +30,6 @@ - static int dly=5; - static jmp_buf jb; - --extern int optind; --extern char *optarg; -- - static void alrm(int signo) - { - (void)signo; diff --git a/srcpkgs/procps/patches/top.1.patch b/srcpkgs/procps/patches/top.1.patch deleted file mode 100644 index 92b00e24eb..0000000000 --- a/srcpkgs/procps/patches/top.1.patch +++ /dev/null @@ -1,416 +0,0 @@ -Description: Fix bold in top manual page -Fix page fault description because storage may not be disk -Author: Craig Small -Index: b/top.1 -=================================================================== ---- a/top.1 2009-11-24 20:53:04.000000000 +1100 -+++ b/top.1 2009-11-24 21:00:38.000000000 +1100 -@@ -42,7 +42,7 @@ - .ds EM \ \fB\-\-\ \fR - \# - these two are for chuckles, makes great grammar - .ds Me top --.ds ME \fBtop\fR -+.ds NE \fBtop\fR - \# - other misc strings for consistent usage/emphasis - .ds F \fIOff\fR - .ds O \fIOn\fR -@@ -85,7 +85,7 @@ - .\" ---------------------------------------------------------------------- - .SH SYNOPSIS - .\" ---------------------------------------------------------------------- --\*(ME \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI -+\*(NE \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI - iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...] - - The traditional switches '-' and whitespace are optional. -@@ -94,7 +94,7 @@ - .\" ---------------------------------------------------------------------- - .SH DESCRIPTION - .\" ---------------------------------------------------------------------- --The \*(ME program provides a dynamic real-time view of a running system. -+The \*(NE program provides a dynamic real-time view of a running system. - It can display\fB system\fR summary information as well as a list of\fB - tasks\fR currently being managed by the Linux kernel. - The types of system summary information shown and the types, order and -@@ -104,7 +104,7 @@ - The program provides a limited interactive interface for process - manipulation as well as a much more extensive interface for personal - configuration \*(EM encompassing every aspect of its operation. --And while \*(ME is referred to throughout this document, you are free -+And while \*(NE is referred to throughout this document, you are free - to name the program anything you wish. - That new name, possibly an alias, will then be reflected on \*(Me's display - and used when reading and writing a \*(CF. -@@ -190,7 +190,7 @@ - 'I' - Irix mode On\ \ (no, 'solaris' smp) - * 'p' - PID monitoring Off - * 's' - Secure mode Off (unsecured) -- 'B' - Bold disable Off -+ 'B' - Bold enable Off - \fISummary_Area_defaults\fR - 'l' - Load Avg/Uptime On\ \ (thus program name) - 't' - Task/Cpu states On\ \ (1+1 lines, see '1') -@@ -413,16 +413,14 @@ - q:\fB RES\fR \*(EM Resident size (kb) - The non-swapped \*(MP a task has used. - --RES = CODE + DATA. -- - .TP 3 - r:\fB CODE\fR \*(EM Code size (kb) --The amount of \*(MP devoted to executable code, also known as -+The amount of \*(MV devoted to executable code, also known as - the 'text resident set' size or TRS. - - .TP 3 - s:\fB DATA\fR \*(EM Data+Stack size (kb) --The amount of \*(MP devoted to other than executable code, also known as -+The amount of \*(MV devoted to other than executable code, also known as - the 'data resident set' size or DRS. - - .TP 3 -@@ -436,8 +434,8 @@ - The number of\fB major\fR page faults that have occurred for a task. - A page fault occurs when a process attempts to read from or write to a virtual - page that is not currently present in its address space. --A major page fault is when disk access is involved in making that --page available. -+A major page fault is when backing storage access (such as a disk) is involved -+in making that page available. - - .TP 3 - v:\fB nDRT\fR \*(EM Dirty Pages count -@@ -504,7 +502,7 @@ - .\" ...................................................................... - .SS 2b. SELECTING and ORDERING Columns - .\" ---------------------------------------------------------------------- --After pressing the \*(CIs 'f' (Fields select) or \'o' (Order fields) you will -+After pressing the \*(CIs 'f' (Fields select) or 'o' (Order fields) you will - be shown a screen containing the current \fBfields string\fR followed by names - and descriptions for all fields. - -@@ -580,7 +578,7 @@ - see current status, - - .TP 7 --\ \ \'\fB?\fR\' or \'\fBh\fR\' :\fIHelp\fR -+\ \ \<\fB?\fR\> or \<\fBh\fR\> :\fIHelp\fR - There are two help levels available. - The first will provide a reminder of all the basic \*(CIs. - If \*(Me is\fI secured\fR, that screen will be abbreviated. -@@ -589,7 +587,7 @@ - applicable to \*(AM. - - .TP 7 --\ \ \'\fB=\fR\' :\fIExit_Task_Limits\fR -+\ \ \<\fB=\fR\> :\fIExit_Task_Limits\fR - Removes restrictions on which tasks are shown. - This command will reverse any 'i' (idle tasks) and 'n' (max tasks) commands - that might be active. -@@ -599,13 +597,13 @@ - When operating in \*(AM this command has a slightly broader meaning. - - .TP 7 --\ \ \'\fBA\fR\' :\fIAlternate_Display_Mode_toggle\fR -+\ \ \<\fBA\fR\> :\fIAlternate_Display_Mode_toggle\fR - This command will switch between \*(FM and \*(AM. --\*(XT 4. ALTERNATE\-DISPLAY Mode and the 'G' \*(CI for insight into --\*(CWs and field groups. -+\*(XT 4. ALTERNATE\-DISPLAY Mode and the 'G' \*(CI for insight -+into \*(CWs and field groups. - - .TP 7 --\ \ \'\fBB\fR\' :\fIBold_Disable/Enable_toggle\fR -+\ \ \<\fBB\fR\> :\fIBold_Disable/Enable_toggle\fR - This command will influence use of the 'bold' terminfo capability and - alters\fB both\fR the \*(SA and \*(TA for the \*(CW. - While it is intended primarily for use with dumb terminals, it can be -@@ -617,7 +615,7 @@ - there will be no visual confirmation that they are even on. - - .TP 7 --*\ \'\fBd\fR\' or \'\fBs\fR\' :\fIChange_Delay_Time_interval\fR -+*\ \<\fBd\fR\> or \<\fBs\fR\> :\fIChange_Delay_Time_interval\fR - You will be prompted to enter the delay time, in seconds, between - display updates. - -@@ -631,32 +629,32 @@ - and view the system summary on the second line. - - .TP 7 --\ \ \'\fBG\fR\' :\fIChoose_Another_Window/Field_Group\fR -+\ \ \<\fBG\fR\> :\fIChoose_Another_Window/Field_Group\fR - You will be prompted to enter a number between 1 and 4 designating the - window/field group which should be made the \*(CW. - You will soon grow comfortable with these 4 windows, especially after - experimenting with \*(AM. - - .TP 7 --\ \ \'\fBI\fR\' :\fIIrix/Solaris_Mode_toggle\fR -+\ \ \<\fBI\fR\> :\fIIrix/Solaris_Mode_toggle\fR - When operating in 'Solaris mode' ('I' toggled \*F), a task's \*(Pu usage - will be divided by the total number of \*(PUs. - After issuing this command, you'll be informed of the new state of this toggle. - - .TP 7 --\ \ \'\fBu\fR\' :\fIselect a user\fR -+\ \ \<\fBu\fR\> :\fIselect a user\fR - You will be prompted for a UID or username. Only processes - belonging to the selected user will be displayed. This option - matches on the effective UID. - - .TP 7 --\ \ \'\fBU\fR\' :\fIselect a user\fR -+\ \ \<\fBU\fR\> :\fIselect a user\fR - You will be prompted for a UID or username. Only processes - belonging to the selected user will be displayed. This option - matches on the real, effective, saved, and filesystem UID. - - .TP 7 --*\ \'\fBk\fR\' :\fIKill_a_task\fR -+*\ \<\fBk\fR\> :\fIKill_a_task\fR - You will be prompted for a PID and then the signal to send. - The default signal, as reflected in the prompt, is SIGTERM. - However, you can send any signal, via number or name. -@@ -667,24 +665,24 @@ - 2) at the signal prompt, type 0 - - .TP 7 --\ \ \'\fBq\fR\' :\fIQuit\fR -+\ \ \<\fBq\fR\> :\fIQuit\fR - - .TP 7 --*\ \'\fBr\fR\' :\fIRenice_a_Task\fR -+*\ \<\fBr\fR\> :\fIRenice_a_Task\fR - You will be prompted for a PID and then the value to nice it to. - Entering a positive value will cause a process to lose priority. - Conversely, a negative value will cause a process to be viewed more - favorably by the kernel. - - .TP 7 --\ \ \'\fBW\fR\' :\fIWrite_the_Configuration_File\fR -+\ \ \<\fBW\fR\> :\fIWrite_the_Configuration_File\fR - This will save all of your options and toggles plus the current - display mode and delay time. - By issuing this command just before quitting \*(Me, you will be able restart - later in exactly that same state. - - .TP 7 --\ \ \'\fBZ\fR\' :\fIChange_Color_Mapping -+\ \ \<\fBZ\fR\> :\fIChange_Color_Mapping - This key will take you to a separate screen where you can change the - colors for the \*(CW, or for all windows. - For details regarding this \*(CI \*(Xt 3d. COLOR Mapping. -@@ -700,25 +698,25 @@ - of messages and prompts. - - These commands always impact just the \*(CW/field group. --\*(XT 4. ALTERNATE\-DISPLAY Mode and the 'G' \*(CI for insight into --\*(CWs and field groups. -+\*(XT 4. ALTERNATE\-DISPLAY Mode and the 'G' \*(CI for insight -+into \*(CWs and field groups. - - .TP 7 --\ \ \'\fBl\fR\' :\fIToggle_Load_Average/Uptime\fR \*(EM On/Off -+\ \ \<\fBl\fR\> :\fIToggle_Load_Average/Uptime\fR \*(EM On/Off - This is also the line containing the program name (possibly an alias) when - operating in \*(FM or the \*(CW name when operating in \*(AM. - - .TP 7 --\ \ \'\fBm\fR\' :\fIToggle_Memory/Swap_Usage\fR \*(EM On/Off -+\ \ \<\fBm\fR\> :\fIToggle_Memory/Swap_Usage\fR \*(EM On/Off - This command affects two \*(SA lines. - - .TP 7 --\ \ \'\fBt\fR\' :\fIToggle_Task/Cpu_States\fR \*(EM On/Off -+\ \ \<\fBt\fR\> :\fIToggle_Task/Cpu_States\fR \*(EM On/Off - This command affects from 2 to many \*(SA lines, depending on the state - of the '1' toggle and whether or not \*(Me is running under true SMP. - - .TP 7 --\ \ \'\fB1\fR\' :\fIToggle_Single/Separate_Cpu_States\fR \*(EM On/Off -+\ \ \<\fB1\fR\> :\fIToggle_Single/Separate_Cpu_States\fR \*(EM On/Off - This command affects how the 't' command's Cpu States portion is shown. - Although this toggle exists primarily to serve massively-parallel SMP machines, - it is not restricted to solely SMP environments. -@@ -750,12 +748,12 @@ - .in - - .TP 7 --\ \ \'\fBb\fR\' :\fIBold/Reverse_toggle\fR -+\ \ \<\fBb\fR\> :\fIBold/Reverse_toggle\fR - This command will impact how the 'x' and 'y' toggles are displayed. - Further, it will only be available when at least one of those toggles is \*O. - - .TP 7 --\ \ \'\fBx\fR\' :\fIColumn_Highlight_toggle\fR -+\ \ \<\fBx\fR\> :\fIColumn_Highlight_toggle\fR - Changes highlighting for the current sort field. - You probably don't need a constant visual reminder of the sort field and - \*(Me hopes that you always run with 'column highlight' \*F, due to the cost -@@ -765,7 +763,7 @@ - visual reminder. - - .TP 7 --\ \ \'\fBy\fR\' :\fIRow_Highlight_toggle\fR -+\ \ \<\fBy\fR\> :\fIRow_Highlight_toggle\fR - Changes highlighting for "running" tasks. - For additional insight into this task state, \*(Xt 2a. DESCRIPTIONS of Fields, - Process Status. -@@ -774,7 +772,7 @@ - The only costs will be a few additional tty escape sequences. - - .TP 7 --\ \ \'\fBz\fR\' :\fIColor/Monochrome_toggle\fR -+\ \ \<\fBz\fR\> :\fIColor/Monochrome_toggle\fR - Switches the \*(CW between your last used color scheme and the older form - of black-on-white or white-on-black. - This command will alter\fB both\fR the \*(SA and \*(TA but does not affect the -@@ -785,20 +783,20 @@ - .B CONTENT\fR of \*(TW - .PD 0 - .TP 7 --\ \ \'\fBc\fR\' :\fICommand_Line/Program_Name_toggle\fR -+\ \ \<\fBc\fR\> :\fICommand_Line/Program_Name_toggle\fR - This command will be honored whether or not the 'Command' column - is currently visible. - Later, should that field come into view, the change you applied will be seen. - - .TP 7 --\ \ \'\fBf\fR\' and \'\fBo\fR\' :\fIFields_select\fR or \fIOrder_fields\fR -+\ \ \<\fBf\fR\> and \<\fBo\fR\> :\fIFields_select\fR or \fIOrder_fields\fR - These keys display separate screens where you can change which - fields are displayed and their order. - For additional information on these \*(CIs - \*(Xt 2b. SELECTING and ORDERING Columns. - - .TP 7 --\ \ \'\fBH\fR\' :\fIThreads_toggle\fR -+\ \ \<\fBS\fR\> :\fICumulative_Time_Mode_toggle\fR - When this toggle is \*O, all individual threads will be displayed. Otherwise, \*(Me displays a summation of all threads in a process. - - .TP 7 -@@ -818,7 +816,7 @@ - effect, simply ask for help and view the window summary on the second line. - - .TP 7 --\ \ \'\fBu\fR\' :\fIShow_Specific_User_Only\fR -+\ \ \<\fBu\fR\> :\fIShow_Specific_User_Only\fR - You will be prompted to enter the name of the user to display. - Thereafter, in that \*(TW only matching User ID's will be shown, or possibly - no tasks will be shown. -@@ -831,7 +829,7 @@ - .B SIZE\fR of \*(TW - .PD 0 - .TP 7 --\ \ \'\fBi\fR\' :\fIIdle_Processes_toggle\fR -+\ \ \<\fBi\fR\> :\fIIdle_Processes_toggle\fR - Displays all tasks or just active tasks. - When this toggle is \*F, idled or zombied processes will not be displayed. - -@@ -839,7 +837,7 @@ - affect the window's size, as all prior \*(TDs will have already been painted. - - .TP 7 --\ \ \'\fBn\fR\' or \'#\' :\fISet_Maximum_Tasks\fR -+\ \ \<\fBn\fR\> or \<\fB#\fR\> :\fISet_Maximum_Tasks\fR - You will be prompted to enter the number of tasks to display. - The lessor of your number and available screen rows will be used. - -@@ -878,12 +876,12 @@ - .in - - .TP 7 --\ \ \'\fB<\fR\' :\fIMove_Sort_Field_Left\fR -+\ \ \<\fB<\fR\> :\fIMove_Sort_Field_Left\fR - Moves the sort column to the left unless the current sort field is - the first field being displayed. - - .TP 7 --\ \ \'\fB>\fR\' :\fIMove_Sort_Field_Right\fR -+\ \ \<\fB>\fR\> :\fIMove_Sort_Field_Right\fR - Moves the sort column to the right unless the current sort field is - the last field being displayed. - -@@ -894,7 +892,7 @@ - .in - - .TP 7 --\ \ \'\fBF\fR\' or \'\fBO\fR\' :\fISelect_Sort_Field\fR -+\ \ \<\fBF\fR\> or \<\fBO\fR\> :\fISelect_Sort_Field\fR - These keys display a separate screen where you can change which field - is used as the sort column. - -@@ -907,7 +905,7 @@ - when running \*(Me with column highlighting turned \*F. - - .TP 7 --\ \ \'\fBR\fR\' :\fIReverse/Normal_Sort_Field_toggle\fR -+\ \ \<\fBR\fR\> :\fIReverse/Normal_Sort_Field_toggle\fR - Using this \*(CI you can alternate between high-to-low and low-to-high sorts. - - .PP -@@ -984,7 +982,7 @@ - .\" ...................................................................... - .SS 4b. COMMANDS for Windows - .TP 7 --\ \ \'\fB-\fR\' and \'\fB_\fR\' :\fIShow/Hide_Window(s)_toggles\fR -+\ \ \<\fB-\fR\> and \<\fB_\fR\> :\fIShow/Hide_Window(s)_toggles\fR - The '-' key turns the \*(CW's \*(TD \*O and \*F. - When \*O, that \*(TA will show a minimum of the columns header you've - established with the 'f' and 'o' commands. -@@ -998,7 +996,7 @@ - as the only display element. - - .TP 7 --*\ \'\fB=\fR\' and \'\fB+\fR\' :\fIEqualize_(re-balance)_Window(s)\fR -+*\ \<\fB=\fR\> and \<\fB+\fR\> :\fIEqualize_(re-balance)_Window(s)\fR - The '=' key forces the \*(CW's \*(TD to be visible. - It also reverses any 'i' (idle tasks) and 'n' (max tasks) commands that might - be active. -@@ -1009,7 +1007,7 @@ - except for the 'i' (idle tasks) and 'n' (max tasks) commands. - - .TP 7 --*\ \'\fBA\fR\' :\fIAlternate_Display_Mode_toggle\fR -+*\ \<\fBA\fR\> :\fIAlternate_Display_Mode_toggle\fR - This command will switch between \*(FM and \*(AM. - - The first time you issue this command, all four \*(TDs will be shown. -@@ -1017,7 +1015,7 @@ - chosen to make visible. - - .TP 7 --*\ \'\fBa\fR\' and \'\fBw\fR\' :\fINext_Window_Forward/Backward\fR -+*\ \<\fBa\fR\> and \<\fBw\fR\> :\fINext_Window_Forward/Backward\fR - This will change the \*(CW, which in turn changes the window to which - commands are directed. - These keys act in a circular fashion so you can reach any desired \*(CW -@@ -1028,7 +1026,7 @@ - the \*(TD is \*F and many commands will be restricted. - - .TP 7 --*\ \'\fBG\fR\' :\fIChoose_Another_Window/Field_Group\fR -+*\ \<\fBG\fR\> :\fIChoose_Another_Window/Field_Group\fR - You will be prompted to enter a number between 1 and 4 designating the - window/field group which should be made the \*(CW. - -@@ -1037,15 +1035,15 @@ - commands. - - .TP 7 --\ \ \'\fBg\fR\' :\fIChange_Window/Field_Group_Name\fR -+\ \ \<\fBg\fR\> :\fIChange_Window/Field_Group_Name\fR - You will be prompted for a new name to be applied to the \*(CW. - It does not require that the window name be visible - (the 'l' toggle to be \*O). - - .IP "*" 3 - The \*(CIs shown with an \*(AS have use beyond \*(AM. -- \'=', 'A', 'G' are always available -- \'a', 'w' act the same when color mapping -+ '=', 'A', 'G' are always available -+ 'a', 'w' act the same when color mapping - - - .\" ---------------------------------------------------------------------- diff --git a/srcpkgs/procps/patches/top.1_cpustates.patch b/srcpkgs/procps/patches/top.1_cpustates.patch deleted file mode 100644 index 8dbc499579..0000000000 --- a/srcpkgs/procps/patches/top.1_cpustates.patch +++ /dev/null @@ -1,50 +0,0 @@ -Description: top CPU state descriptions -Author: Craig Small -Bug-Debian: http://bugs.debian.org/312157 -Index: b/top.1 -=================================================================== ---- a/top.1 2009-11-24 21:00:38.000000000 +1100 -+++ b/top.1 2009-11-24 21:00:40.000000000 +1100 -@@ -537,6 +537,42 @@ - upper case\fR letter and to the\fB right\fR with the\fB lower case\fR - letter. - -+.\" ...................................................................... -+.SS 2c. CPU States -+.\" ---------------------------------------------------------------------- -+The CPU states are shown in the Summary Area. They are always shown as a -+percentage and are for the time between now and the last refresh. -+ -+.TP 3 -+\fB us\fR \*(EM User CPU time -+The time the CPU has spent running users' processes that are not -+niced. -+ -+.TP 3 -+\fB sy\fR \*(EM System CPU time -+The time the CPU has spent running the kernel and its processes. -+ -+.TP 3 -+\fB ni\fR \*(EM Nice CPU time -+The time the CPU has spent running users' proccess that have been -+niced. -+ -+.TP 3 -+\fB wa\fR \*(EM iowait -+Amount of time the CPU has been waiting for I/O to complete. -+ -+.TP 3 -+\fB hi\fR \*(EM Hardware IRQ -+The amount of time the CPU has been servicing hardware interrupts. -+ -+.TP 3 -+\fB si\fR \*(EM Software Interrupts -+The amount of time the CPU has been servicing software interrupts. -+ -+.TP 3 -+\fB st\fR \*(EM Steal Time -+The amount of CPU 'stolen' from this virtual machine by the hypervisor -+for other tasks (such as running another virtual machine). - - .\" ---------------------------------------------------------------------- - .SH 3. INTERACTIVE Commands diff --git a/srcpkgs/procps/patches/top_1_swap.patch b/srcpkgs/procps/patches/top_1_swap.patch deleted file mode 100644 index 946eead30e..0000000000 --- a/srcpkgs/procps/patches/top_1_swap.patch +++ /dev/null @@ -1,23 +0,0 @@ -Description: Explain what SWAP means in top -Bug-Debian: http://bugs.debian.org/217841 -Author: Craig Small ---- a/top.1 -+++ b/top.1 -@@ -401,13 +401,13 @@ - o:\fB VIRT\fR \*(EM Virtual Image (kb) - The total amount of \*(MV used by the task. - It includes all code, data and shared libraries plus pages that have been --swapped out. -- --VIRT = SWAP + RES. -+swapped out and pages that have been mapped but not used. - - .TP 3 - p:\fB SWAP\fR \*(EM Swapped size (kb) --The swapped out portion of a task's total \*(MV image. -+Memory that is not resident but is present in a task. This is memory that -+has been swapped out but could include additional non-resident memory. -+This column is calculated by subtracting \*(MP from \*(MV. - - .TP 3 - q:\fB RES\fR \*(EM Resident size (kb) diff --git a/srcpkgs/procps/patches/top_c_resize.patch b/srcpkgs/procps/patches/top_c_resize.patch deleted file mode 100644 index 027bb65d28..0000000000 --- a/srcpkgs/procps/patches/top_c_resize.patch +++ /dev/null @@ -1,75 +0,0 @@ -Author: -Description: Prevent top from segfaulting when the display is shrinked to only -a few (read: 3 or less) lines. -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:35.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:39.000000000 +1100 -@@ -140,7 +140,7 @@ - are exploited in a macro and represent 90% of our optimization. - The Stdout_buf is transparent to our code and regardless of whose - buffer is used, stdout is flushed at frame end or if interactive. */ --static char *Pseudo_scrn; -+static PSEUDO_SCREEN_t Pseudo_scrn; - static int Pseudo_row, Pseudo_cols, Pseudo_size; - #ifndef STDOUT_IOLBF - // less than stdout's normal buffer but with luck mostly '\n' anyway -@@ -2431,7 +2431,10 @@ - Pseudo_cols = Screen_cols + CLRBUFSIZ + 1; - if (Batch) Pseudo_size = ROWBUFSIZ + 1; - else Pseudo_size = Pseudo_cols * Screen_rows; -- Pseudo_scrn = alloc_r(Pseudo_scrn, Pseudo_size); -+ if( Pseudo_scrn.buf == NULL || Pseudo_size > Pseudo_scrn.mem_size ) { -+ Pseudo_scrn.buf = alloc_r(Pseudo_scrn.buf, Pseudo_size); -+ Pseudo_scrn.mem_size = Pseudo_size; -+ } - - // force rebuild of column headers AND libproc/readproc requirements - Frames_libflags = 0; -@@ -3315,7 +3318,7 @@ - // reframewins(), who also builds each window's column headers - if (!Frames_libflags) { - reframewins(); -- memset(Pseudo_scrn, '\0', Pseudo_size); -+ memset(Pseudo_scrn.buf, '\0', Pseudo_size); - } - Pseudo_row = Msg_row = scrlins = 0; - ppt = summary_show(); -Index: b/top.h -=================================================================== ---- a/top.h 2009-11-24 20:53:04.000000000 +1100 -+++ b/top.h 2009-11-24 21:00:39.000000000 +1100 -@@ -135,7 +135,7 @@ - int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg); \ - putp ( Batch ? _str : \ - ({ \ -- char *restrict const _pse = &Pseudo_scrn[Pseudo_row++ * Pseudo_cols]; \ -+ char *restrict const _pse = &Pseudo_scrn.buf[Pseudo_row++ * Pseudo_cols]; \ - memcmp(_pse, _str, _len) ? memcpy(_pse, _str, _len) : "\n"; \ - }) \ - ); \ -@@ -149,7 +149,11 @@ - int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg); \ - if (Batch) _ptr = _str; \ - else { \ -- _ptr = &Pseudo_scrn[Pseudo_row++ * Pseudo_cols]; \ -+ if (Pseudo_row * Pseudo_cols + _len > Pseudo_size) { \ -+ Pseudo_scrn.buf = realloc(Pseudo_scrn.buf, Pseudo_row * Pseudo_cols + _len); \ -+ Pseudo_scrn.mem_size = Pseudo_size = Pseudo_row * Pseudo_cols + _len; \ -+ } \ -+ _ptr = &Pseudo_scrn.buf[Pseudo_row++ * Pseudo_cols]; \ - if (memcmp(_ptr, _str, _len)) { \ - memcpy(_ptr, _str, _len); \ - } else { \ -@@ -237,6 +241,11 @@ - RCW_t win [4]; // a 'WIN_t.rc' for each of the 4 windows - } RCF_t; - -+typedef struct PSEUDO_SCREEN_t { -+ char *buf; -+ int mem_size; -+} PSEUDO_SCREEN_t; -+ - // The scaling 'type' used with scale_num() -- this is how - // the passed number is interpreted should scaling be necessary - enum scale_num { diff --git a/srcpkgs/procps/patches/top_highlight.patch b/srcpkgs/procps/patches/top_highlight.patch deleted file mode 100644 index 4b321775f5..0000000000 --- a/srcpkgs/procps/patches/top_highlight.patch +++ /dev/null @@ -1,19 +0,0 @@ -Author: Paolo Pantaleo -Description: Fix highlighting problem in top -Bug-Debian: http://bugs.debian.org/351065 -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:48.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:50.000000000 +1100 -@@ -3054,9 +3054,10 @@ - snprintf(_z, sizeof(_z), f, ## va); \ - snprintf(cbuf, sizeof(cbuf), "%s%s%s", \ - q->capclr_rowhigh, \ -- _z, \ -+ _z+advance, \ - !(CHKw(q, Show_HIROWS) && 'R' == p->state) ? q->capclr_rownorm : "" \ - ); \ -+ advance=0; \ - pad += q->len_rowhigh; \ - if (!(CHKw(q, Show_HIROWS) && 'R' == p->state)) pad += q->len_rownorm; \ - } \ diff --git a/srcpkgs/procps/patches/top_irix.patch b/srcpkgs/procps/patches/top_irix.patch deleted file mode 100644 index 6a3728943f..0000000000 --- a/srcpkgs/procps/patches/top_irix.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Change formal of IRix mode when showing threads -Author: Samuel Thibault -Bug-Debian: http://bugs.debian.org/459890 -Reviewed-by: Craig Small -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 20:53:05.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:33.000000000 +1100 -@@ -1783,7 +1783,8 @@ - confighlp(Winstk[i].rc.fieldscur); - } - -- if(Rc.mode_irixps && smp_num_cpus>1){ -+ if(Rc.mode_irixps && smp_num_cpus>1 && -+ !(CHKw(Curwin, Show_THREADS))) { - // good for 100 CPUs per process - pcpu_max_value = 9999.0; - Fieldstab[P_CPU].fmts = " %4.0f"; -@@ -2570,6 +2571,15 @@ - case 'H': - if (VIZCHKc) { - TOGw(Curwin, Show_THREADS); -+ if(Rc.mode_irixps && smp_num_cpus>1 && -+ !(CHKw(Curwin, Show_THREADS))){ -+ // good for 100 CPUs per process -+ pcpu_max_value = 9999.0; -+ Fieldstab[P_CPU].fmts = " %4.0f"; -+ } else { -+ pcpu_max_value = 99.9; -+ Fieldstab[P_CPU].fmts = " %#4.1f"; -+ } - show_msg(fmtmk("Show threads %s" - , CHKw(Curwin, Show_THREADS) ? "On" : "Off")); - } -@@ -2626,7 +2636,8 @@ - Rc.mode_irixps = !Rc.mode_irixps; - show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off")); - #endif -- if(Rc.mode_irixps && smp_num_cpus>1){ -+ if(Rc.mode_irixps && smp_num_cpus>1 && -+ !(CHKw(Curwin, Show_THREADS))){ - // good for 100 CPUs per process - pcpu_max_value = 9999.0; - Fieldstab[P_CPU].fmts = " %4.0f"; diff --git a/srcpkgs/procps/patches/top_mintime.patch b/srcpkgs/procps/patches/top_mintime.patch deleted file mode 100644 index fe61d69333..0000000000 --- a/srcpkgs/procps/patches/top_mintime.patch +++ /dev/null @@ -1,16 +0,0 @@ -Author: -Description: Checks minimum time is valid -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:39.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:48.000000000 +1100 -@@ -2552,7 +2552,8 @@ - else { - float tmp = - get_float(fmtmk("Change delay from %.1f to", Rc.delay_time)); -- if (tmp > -1) Rc.delay_time = tmp; -+ if (tmp == 0.0) show_msg("\aNot valid"); -+ else if (tmp > 0) Rc.delay_time = tmp; - } - break; - diff --git a/srcpkgs/procps/patches/top_no_openproc.patch b/srcpkgs/procps/patches/top_no_openproc.patch deleted file mode 100644 index 905b3cecac..0000000000 --- a/srcpkgs/procps/patches/top_no_openproc.patch +++ /dev/null @@ -1,21 +0,0 @@ -Description: Exit top if cannot openproc -Author: Justin Pryzby -Bug-Debian: http://bugs.debian.org/378695 -Reviewed-by: Craig Small -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:33.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:34.000000000 +1100 -@@ -1106,6 +1106,12 @@ - else - PT = openproc(flags); - -+ if (PT==NULL) { -+ std_err(strerror(errno)); -+ exit(1); -+ } -+ -+ - // i) Allocated Chunks: *Existing* table; refresh + reuse - if (!(CHKw(Curwin, Show_THREADS))) { - while (curmax < savmax) { diff --git a/srcpkgs/procps/patches/top_nohz.patch b/srcpkgs/procps/patches/top_nohz.patch deleted file mode 100644 index 1e41fcd156..0000000000 --- a/srcpkgs/procps/patches/top_nohz.patch +++ /dev/null @@ -1,14 +0,0 @@ -Author: -Description: Handle idle time calculations correctly when running with NOHZ. -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:50.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:50.000000000 +1100 -@@ -2916,6 +2916,7 @@ - s_frme = cpu->s - cpu->s_sav; - n_frme = cpu->n - cpu->n_sav; - i_frme = TRIMz(cpu->i - cpu->i_sav); -+ if ((u_frme == 0) && (i_frme == 0)) i_frme = 100.0; - w_frme = cpu->w - cpu->w_sav; - x_frme = cpu->x - cpu->x_sav; - y_frme = cpu->y - cpu->y_sav; diff --git a/srcpkgs/procps/patches/top_numeric_args.patch b/srcpkgs/procps/patches/top_numeric_args.patch deleted file mode 100644 index 841cf6a3d2..0000000000 --- a/srcpkgs/procps/patches/top_numeric_args.patch +++ /dev/null @@ -1,98 +0,0 @@ -Description: Better top numeric argument handling -Bug-Debian: http://bugs.debian.org/358724 -Author: Justin Pryzby ---- a/top.c -+++ b/top.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - - // Foul POS defines all sorts of stuff... -@@ -1825,8 +1826,12 @@ - - while (*args) { - const char *cp = *(args++); -+ if (*cp!='-') { -+ std_err(fmtmk("unknown argument '%c'\nusage:\t%s%s" , *cp, Myname, usage)); -+ } - -- while (*cp) { -+ for(++cp; *cp; cp++) { -+ char *end; - switch (*cp) { - case '\0': - case '-': -@@ -1842,8 +1847,15 @@ - else if (*args) cp = *args++; - else std_err("-d requires argument"); - /* a negative delay will be dealt with shortly... */ -- if (sscanf(cp, "%f", &tmp_delay) != 1) -- std_err(fmtmk("bad delay '%s'", cp)); -+ errno=0; -+ if (( (fabs(tmp_delay=strtod(cp, &end))==HUGE_VAL && -+ errno==ERANGE) || -+ (tmp_delay==0 && errno!=0) || -+ end==cp || -+ end!=cp+strlen(cp))) { -+ std_err(fmtmk("bad delay '%s'", cp)); -+ } -+ cp=-1+end; - break; - case 'H': - TOGw(Curwin, Show_THREADS); -@@ -1859,8 +1871,15 @@ - if (cp[1]) cp++; - else if (*args) cp = *args++; - else std_err("-n requires argument"); -- if (sscanf(cp, "%d", &Loops) != 1 || Loops < 1) -- std_err(fmtmk("bad iterations arg '%s'", cp)); -+ errno=0; -+ if ((((Loops=strtol(cp, &end, 0))==LONG_MIN || -+ Loops==LONG_MAX) && -+ errno==ERANGE) || -+ end==cp || -+ end!=cp+strlen(cp) || Loops<1) { -+ std_err(fmtmk("bad iterations arg '%s'", cp)); -+ } -+ cp=-1+end; - break; - case 'p': - do { -@@ -1868,11 +1887,19 @@ - selection_type = 'p'; - if (cp[1]) cp++; - else if (*args) cp = *args++; -- else std_err("-p argument missing"); -+ else std_err("-p requires argument"); - if (Monpidsidx >= MONPIDMAX) - std_err(fmtmk("pid limit (%d) exceeded", MONPIDMAX)); -- if (sscanf(cp, "%d", &Monpids[Monpidsidx]) != 1 || Monpids[Monpidsidx] < 0) -- std_err(fmtmk("bad pid '%s'", cp)); -+ errno=0; -+ if ((((Monpids[Monpidsidx]=strtol(cp, &end, 0))==LONG_MIN || -+ Monpids[Monpidsidx]==LONG_MAX) && -+ errno==ERANGE) || -+ end==cp || -+ Monpids[Monpidsidx]<1) { -+ std_err(fmtmk("bad pid '%s'", cp)); -+ } -+ cp=-1+end; -+ - if (!Monpids[Monpidsidx]) - Monpids[Monpidsidx] = getpid(); - Monpidsidx++; -@@ -1918,10 +1945,7 @@ - , *cp, Myname, usage)); - - } /* end: switch (*cp) */ -- -- /* advance cp and jump over any numerical args used above */ -- if (*cp) cp += strspn(&cp[1], "- ,.1234567890") + 1; -- } /* end: while (*cp) */ -+ } /* end: for (; *cp) */ - } /* end: while (*args) */ - - /* fixup delay time, maybe... */ diff --git a/srcpkgs/procps/patches/top_stdin_eof.patch b/srcpkgs/procps/patches/top_stdin_eof.patch deleted file mode 100644 index 888bf85af4..0000000000 --- a/srcpkgs/procps/patches/top_stdin_eof.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Check for stdin eof if term -Author: Samuel Thibault -Bug-Debian: http://bugs.debian.org/458986 -Reviewed-by: Craig Small -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:34.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:35.000000000 +1100 -@@ -3408,9 +3408,8 @@ - // check 1st, in case tv zeroed (by sig handler) before it got set - rc = chin(0, &c, 1); - if (rc <= 0) { -- // EOF is pretty much a "can't happen" except for a kernel bug. -- // We should quickly die via SIGHUP, and thus not spin here. -- // if (rc == 0) end_pgm(0); /* EOF from terminal */ -+ if (rc == 0) end_pgm(0); /* EOF from terminal, may happen if top -+ * erroneously gets detached from it. */ - fcntl(STDIN_FILENO, F_SETFL, file_flags); - select(1, &fs, NULL, NULL, &tv); - fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK|file_flags); diff --git a/srcpkgs/procps/patches/top_uid_length.patch b/srcpkgs/procps/patches/top_uid_length.patch deleted file mode 100644 index 634cbff009..0000000000 --- a/srcpkgs/procps/patches/top_uid_length.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Make the uid length 5 not 4 -Author: -Bug-Debian: http://bugs.debian.org/426782 -Index: b/top.c -=================================================================== ---- a/top.c 2009-11-24 21:00:35.000000000 +1100 -+++ b/top.c 2009-11-24 21:00:35.000000000 +1100 -@@ -1237,7 +1237,7 @@ - { "AaAa", " PID", " %5u", -1, -1, SF(PID), "Process Id", L_NONE }, - { "BbBb", " PPID", " %5u", -1, -1, SF(PPD), "Parent Process Pid", L_EITHER }, - { "CcQq", " RUSER ", " %-8.8s", -1, -1, SF(URR), "Real user name", L_RUSER }, -- { "DdCc", " UID", " %4u", -1, -1, SF(UID), "User Id", L_NONE }, -+ { "DdCc", " UID", " %5u", -1, -1, SF(UID), "User Id", L_NONE }, - { "EeDd", " USER ", " %-8.8s", -1, -1, SF(URE), "User Name", L_EUSER }, - { "FfNn", " GROUP ", " %-8.8s", -1, -1, SF(GRP), "Group Name", L_GROUP }, - { "GgGg", " TTY ", " %-8.8s", 8, -1, SF(TTY), "Controlling Tty", L_stat }, diff --git a/srcpkgs/procps/patches/top_username_parse.patch b/srcpkgs/procps/patches/top_username_parse.patch deleted file mode 100644 index 47fceff00d..0000000000 --- a/srcpkgs/procps/patches/top_username_parse.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Fixes off-by-one error so top -u username works -Bug-Debian: http://bugs.debian.org/571790 -Author: Chuan-kai Lin -Last-Update: 2010-03-01 ---- a/top.c -+++ b/top.c -@@ -1924,7 +1924,7 @@ - errmsg = parse_uid(cp, &selection_uid); - if (errmsg) std_err(errmsg); - selection_type = 'u'; -- cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp); // FIXME: junk -+ cp += snprintf(Curwin->colusrnam, USRNAMSIZ-1, "%s", cp)-1; // FIXME: junk - } while(0); - break; - case 'U': diff --git a/srcpkgs/procps/patches/uptime.1.patch b/srcpkgs/procps/patches/uptime.1.patch deleted file mode 100644 index e5946f8ace..0000000000 --- a/srcpkgs/procps/patches/uptime.1.patch +++ /dev/null @@ -1,48 +0,0 @@ -Description: Cleanup uptime man page #282168 -Author: Brendan O'Dea -Bug-Debian: http://bugs.debian.org/282168 -Reviewed-by: Craig Small -Index: b/uptime.1 -=================================================================== ---- a/uptime.1 2009-11-24 20:53:05.000000000 +1100 -+++ b/uptime.1 2009-11-24 21:00:35.000000000 +1100 -@@ -6,7 +6,8 @@ - .SH SYNOPSIS - .B uptime - .br --.BR uptime " [" "\-V" ] -+.B uptime -+.RB [ \-V ] - .SH DESCRIPTION - .B uptime - gives a one line display of the following information. -@@ -14,13 +15,25 @@ - how long the system has been running, - how many users are currently logged on, - and the system load averages for the past 1, 5, and 15 minutes. --.sp -+ - This is the same information contained in the header line displayed by - .BR w (1). -+.sp -+System load averages is the average number of processes that are either -+in a runnable or uninterruptable state. A process in a runnable state is -+either using the CPU or waiting to use the CPU. A process in -+uninterruptable state is waiting for some I/O access, eg waiting for -+disk. The averages are taken over the three time intervals. -+Load averages are not normalized for the number of CPUs in a system, so -+a load average of 1 means a single CPU system is loaded all the time -+while on a 4 CPU system it means it was idle 75% of the time. - .SH FILES --.IR /var/run/utmp " information about who is currently logged on" --.br --.IR /proc " process information" -+.TP -+.I /var/run/utmp -+information about who is currently logged on -+.TP -+.I /proc -+process information - .SH AUTHORS - .B uptime - was written by Larry Greenfield and diff --git a/srcpkgs/procps/patches/vmstat.8.patch b/srcpkgs/procps/patches/vmstat.8.patch deleted file mode 100644 index 4963e4ca68..0000000000 --- a/srcpkgs/procps/patches/vmstat.8.patch +++ /dev/null @@ -1,109 +0,0 @@ -Author: -Description: Fixes groff problems -Removes pslab as it doesnt appear -Index: b/vmstat.8 -=================================================================== ---- a/vmstat.8 2009-11-24 20:53:04.000000000 +1100 -+++ b/vmstat.8 2009-11-24 21:00:36.000000000 +1100 -@@ -1,6 +1,6 @@ - .\" This page Copyright (C) 1994 Henry Ware - .\" Distributed under the GPL, Copyleft 1994. --.TH VMSTAT 8 "27 July 1994 " "Throatwobbler Ginkgo Labs" "Linux Administrator's Manual" -+.TH VMSTAT 8 "2009 Jan 9" "Throatwobbler Ginkgo Labs" "Linux Administrator's Manual" - .SH NAME - vmstat \- Report virtual memory statistics - .SH SYNOPSIS -@@ -22,32 +22,35 @@ - .RB [ "\-d"] - .br - .B vmstat -+.RB [ "\-D"] -+.br -+.B vmstat - .RB [ "\-p disk partition"] - .br - .B vmstat - .RB [ "\-V" ] - .SH DESCRIPTION - \fBvmstat\fP reports information about processes, memory, paging, --block IO, traps, and cpu activity. -+block IO, traps, disks and cpu activity. - - The first report produced gives averages since the last reboot. Additional - reports give information on a sampling period of length \fIdelay\fP. - The process and memory reports are instantaneous in either case. - - .SS Options --The \fB-a\fP switch displays active/inactive memory, given a 2.5.41 kernel or better. -+The \fB\-a\fP switch displays active/inactive memory, given a 2.5.41 kernel or better. - .PP --The \fB-f\fP switch displays the number of forks since boot. -+The \fB\-f\fP switch displays the number of forks since boot. - This includes the fork, vfork, and clone system calls, and is - equivalent to the total number of tasks created. Each process - is represented by one or more tasks, depending on thread usage. - This display does not repeat. - .PP --The \fB-m\fP displays slabinfo. -+The \fB\-m\fP displays slabinfo. - .PP --The \fB-n\fP switch causes the header to be displayed only once rather than periodically. -+The \fB\-n\fP switch causes the header to be displayed only once rather than periodically. - .PP --The \fB-s\fP switch displays a table of various event counters -+The \fB\-s\fP switch displays a table of various event counters - and memory statistics. This display does not repeat. - .PP - .I delay -@@ -58,13 +61,15 @@ - is the number of updates. If no count is specified and delay is - defined, \fIcount\fP defaults to infinity. - .PP --The \fB-d\fP reports disk statistics (2.5.70 or above required) -+The \fB\-d\fP reports disk statistics (2.5.70 or above required) -+.PP -+The \fB-D\fP reports some summary statistics about disk activity. - .PP --The \fB-p\fP followed by some partition name for detailed statistics (2.5.70 or above required) -+The \fB\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required) - .PP --The \fB-S\fP followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes -+The \fB\-S\fP followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes - .PP --The \fB-V\fP switch results in displaying version information. -+The \fB\-V\fP switch results in displaying version information. - .PP - .SH FIELD DESCRIPTION FOR VM MODE - .SS -@@ -81,8 +86,8 @@ - free: the amount of idle memory. - buff: the amount of memory used as buffers. - cache: the amount of memory used as cache. --inact: the amount of inactive memory. (-a option) --active: the amount of active memory. (-a option) -+inact: the amount of inactive memory. (\-a option) -+active: the amount of active memory. (\-a option) - .fi - .PP - .SS -@@ -110,9 +115,9 @@ - .B "CPU " - These are percentages of total CPU time. - .nf --us: Time spent running non-kernel code. (user time, including nice time) -+us: Time spent running non\-kernel code. (user time, including nice time) - sy: Time spent running kernel code. (system time) --id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time. -+id: Time spent idle. Prior to Linux 2.5.41, this includes IO\-wait time. - wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle. - st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown. - -@@ -161,8 +166,6 @@ - total: Total number of available objects - size: Size of each object - pages: Number of pages with at least one active object --totpages: Total number of allocated pages --pslab: Number of pages per slab - .fi - - .SH NOTES diff --git a/srcpkgs/procps/patches/vmstat_headers.patch b/srcpkgs/procps/patches/vmstat_headers.patch deleted file mode 100644 index d9ede29d8b..0000000000 --- a/srcpkgs/procps/patches/vmstat_headers.patch +++ /dev/null @@ -1,148 +0,0 @@ -Description: Headers for disk and slab info -getopt replacement -Author: Liu Xing -Author: Michael Tokarev -Bug-Debian: http://bugs.debian.org/436805 -Bug-Debian: http://bugs.debian.org/408088 -Index: b/vmstat.c -=================================================================== ---- a/vmstat.c 2009-11-24 20:53:00.000000000 +1100 -+++ b/vmstat.c 2009-11-24 21:00:49.000000000 +1100 -@@ -29,14 +29,15 @@ - #include "proc/sysinfo.h" - #include "proc/version.h" - --static unsigned long dataUnit=1024; --static char szDataUnit [16]; - #define UNIT_B 1 - #define UNIT_k 1000 - #define UNIT_K 1024 - #define UNIT_m 1000000 - #define UNIT_M 1048576 - -+static unsigned long dataUnit=UNIT_K; -+static char szDataUnit[3] = "K"; -+ - #define VMSTAT 0 - #define DISKSTAT 0x00000001 - #define VMSUMSTAT 0x00000002 -@@ -354,6 +355,7 @@ - if ((fDiskstat=fopen("/proc/diskstats", "rb"))){ - fclose(fDiskstat); - ndisks=getdiskstat(&disks,&partitions); -+ if (!moreheaders) diskheader(); - for(k=0; k0)?tmp:22); diff --git a/srcpkgs/procps/patches/vmstat_part_format.patch b/srcpkgs/procps/patches/vmstat_part_format.patch deleted file mode 100644 index eb1b59ad15..0000000000 --- a/srcpkgs/procps/patches/vmstat_part_format.patch +++ /dev/null @@ -1,77 +0,0 @@ -Author: Daniel Novotny -Description: The contents of /proc/diskstats have changed since 2.6.25 -Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243 ---- a/proc/sysinfo.c -+++ b/proc/sysinfo.c -@@ -796,6 +796,18 @@ - } - - ///////////////////////////////////////////////////////////////////////////// -+static int is_disk(char *dev) -+{ -+ char syspath[PATH_MAX]; -+ char *slash; -+ -+ while ((slash = strchr(dev, '/'))) -+ *slash = '!'; -+ snprintf(syspath, sizeof(syspath), "/sys/block/%s", dev); -+ return !(access(syspath, F_OK)); -+} -+ -+///////////////////////////////////////////////////////////////////////////// - - unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **partitions){ - FILE* fd; -@@ -803,6 +815,7 @@ - int cPartition = 0; - int fields; - unsigned dummy; -+ char devname[PATH_MAX]; - - *disks = NULL; - *partitions = NULL; -@@ -815,8 +828,9 @@ - fclose(fd); - break; - } -- fields = sscanf(buff, " %*d %*d %*s %*u %*u %*u %*u %*u %*u %*u %*u %*u %*u %u", &dummy); -- if (fields == 1){ -+ fields = sscanf(buff, " %*d %*d %15s %*u %*u %*u %*u %*u %*u %*u %*u %*u %*u %u", -+ &devname, &dummy); -+ if (fields == 2 && is_disk(devname)){ - (*disks) = realloc(*disks, (cDisk+1)*sizeof(struct disk_stat)); - sscanf(buff, " %*d %*d %15s %u %u %llu %u %u %u %llu %u %u %u %u", - //&disk_major, -@@ -839,7 +853,9 @@ - }else{ - (*partitions) = realloc(*partitions, (cPartition+1)*sizeof(struct partition_stat)); - fflush(stdout); -- sscanf(buff, " %*d %*d %15s %u %llu %u %u", -+ sscanf(buff, (fields == 2) -+ ? " %*d %*d %15s %u %*u %llu %*u %u %*u %llu %*u %*u %*u %*u" -+ : " %*d %*d %15s %u %llu %u %llu", - //&part_major, - //&part_minor, - (*partitions)[cPartition].partition_name, ---- a/proc/sysinfo.h -+++ b/proc/sysinfo.h -@@ -113,7 +113,7 @@ - unsigned parent_disk; // index into a struct disk_stat array - unsigned reads; - unsigned writes; -- unsigned requested_writes; -+ unsigned long long requested_writes; - }partition_stat; - - extern unsigned int getpartitions_num(struct disk_stat *disks, int ndisks); ---- a/vmstat.c -+++ b/vmstat.c -@@ -286,7 +286,7 @@ - struct disk_stat *disks; - struct partition_stat *partitions, *current_partition=NULL; - unsigned long ndisks, j, k, npartitions; -- const char format[] = "%20u %10llu %10u %10u\n"; -+ const char format[] = "%20u %10llu %10u %10llu\n"; - - fDiskstat=fopen("/proc/diskstats","rb"); - if(!fDiskstat){ diff --git a/srcpkgs/procps/patches/vmstat_units.patch b/srcpkgs/procps/patches/vmstat_units.patch deleted file mode 100644 index 3345463073..0000000000 --- a/srcpkgs/procps/patches/vmstat_units.patch +++ /dev/null @@ -1,52 +0,0 @@ -Author: Michael Tokarev -Description: For vmstat only change units where it makes sense and try -to stop some overflows of some kernel variables -Bug-Debian: http://bugs.debian.org/558134 -Bug-Debian: http://bugs.debian.org/558361 ---- a/proc/sysinfo.c -+++ b/proc/sysinfo.c -@@ -606,7 +606,7 @@ - ); - head = tail+1; - if(!found) goto nextline; -- *(found->slot) = strtoul(head,&tail,10); -+ *(found->slot) = (unsigned long)strtoull(head,&tail,10); - nextline: - tail = strchr(head, '\n'); - if(!tail) break; ---- a/vmstat.c -+++ b/vmstat.c -@@ -209,8 +209,8 @@ - unitConvert(kb_swap_used), unitConvert(kb_main_free), - unitConvert(a_option?kb_inactive:kb_main_buffers), - unitConvert(a_option?kb_active:kb_main_cached), -- (unsigned)( (*pswpin * unitConvert(kb_per_page) * hz + divo2) / Div ), -- (unsigned)( (*pswpout * unitConvert(kb_per_page) * hz + divo2) / Div ), -+ (unsigned)( (*pswpin * kb_per_page * hz + divo2) / Div ), -+ (unsigned)( (*pswpout * kb_per_page * hz + divo2) / Div ), - (unsigned)( (*pgpgin * hz + divo2) / Div ), - (unsigned)( (*pgpgout * hz + divo2) / Div ), - (unsigned)( (*intr * hz + divo2) / Div ), -@@ -258,8 +258,8 @@ - unitConvert(kb_swap_used),unitConvert(kb_main_free), - unitConvert(a_option?kb_inactive:kb_main_buffers), - unitConvert(a_option?kb_active:kb_main_cached), -- (unsigned)( ( (pswpin [tog] - pswpin [!tog])*unitConvert(kb_per_page)+sleep_half )/sleep_time ), /*si*/ -- (unsigned)( ( (pswpout[tog] - pswpout[!tog])*unitConvert(kb_per_page)+sleep_half )/sleep_time ), /*so*/ -+ (unsigned)( ( (pswpin [tog] - pswpin [!tog])*kb_per_page+sleep_half )/sleep_time ), /*si*/ -+ (unsigned)( ( (pswpout[tog] - pswpout[!tog])*kb_per_page+sleep_half )/sleep_time ), /*so*/ - (unsigned)( ( pgpgin [tog] - pgpgin [!tog] +sleep_half )/sleep_time ), /*bi*/ - (unsigned)( ( pgpgout[tog] - pgpgout[!tog] +sleep_half )/sleep_time ), /*bo*/ - (unsigned)( ( intr [tog] - intr [!tog] +sleep_half )/sleep_time ), /*in*/ ---- a/vmstat.8 -+++ b/vmstat.8 -@@ -67,7 +67,8 @@ - .PP - The \fB\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required) - .PP --The \fB\-S\fP followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes -+The \fB\-S\fP followed by k or K or m or M switches changes the units of -+ouput from bytes to outputs between 1000, 1024, 1000000, or 1048576 bytes. Note this does not change the swap (si/so) or block (bi/bo) fields. - .PP - The \fB\-V\fP switch results in displaying version information. - .PP diff --git a/srcpkgs/procps/patches/w-bassman.patch b/srcpkgs/procps/patches/w-bassman.patch deleted file mode 100644 index 6e8657dadf..0000000000 --- a/srcpkgs/procps/patches/w-bassman.patch +++ /dev/null @@ -1,88 +0,0 @@ -Author: -Description: w-bassman emulation with -o flag -Bug-Debian: http://bugs.debian.org/414906 -Index: b/w.1 -=================================================================== ---- a/w.1 2009-11-24 20:53:04.000000000 +1100 -+++ b/w.1 2009-11-24 21:00:39.000000000 +1100 -@@ -5,7 +5,7 @@ - w \- Show who is logged on and what they are doing. - .SH SYNOPSIS - .B w \- --.RB [ husfV ] -+.RB [ husfVo ] - .RI [ user ] - .SH DESCRIPTION - .B "w " -@@ -55,6 +55,9 @@ - .B "\-V " - Display version information. - .TP 0.5i -+.B "\-o " -+Old style output. Prints blank space for idle times less than one minute. -+.TP 0.5i - .B "user " - Show information about the specified user only. - -Index: b/w.c -=================================================================== ---- a/w.c 2009-11-24 21:00:37.000000000 +1100 -+++ b/w.c 2009-11-24 21:00:39.000000000 +1100 -@@ -30,6 +30,7 @@ - #include - - static int ignoreuser = 0; /* for '-u' */ -+static int oldstyle = 0; /* for '-o' */ - static proc_t **procs; /* our snapshot of the process table */ - - typedef struct utmp utmp_t; -@@ -76,6 +77,16 @@ - printf(" ? "); - return; - } -+ if (oldstyle) { -+ if (t >= 48*60*60) /* > 2 days */ -+ fprintf(fout, " %2ludays", t/(24*60*60)); -+ else if (t >= 60*60) /* > 1 hour */ -+ fprintf(fout, " %2lu:%02u ", t/(60*60), (unsigned) ((t/60)%60)); -+ else if (t > 60) /* > 1 minute */ -+ fprintf(fout, " %2lu:%02um", t/60, (unsigned) t%60); -+ else -+ fprintf(fout, " "); -+ } else { - if (t >= 48*60*60) /* > 2 days */ - fprintf(fout, " %2ludays", t/(24*60*60)); - else if (t >= 60*60) /* > 1 hour */ -@@ -84,6 +95,7 @@ - fprintf(fout, " %2lu:%02u ", t/60, (unsigned) t%60); - else - fprintf(fout, " %2lu.%02us", t, centi_sec); -+ } - } - - /**** stat the device file to get an idle time */ -@@ -239,7 +251,7 @@ - #endif - - setlocale(LC_ALL, ""); -- for (args=0; (ch = getopt(argc, argv, "hlusfV")) != EOF; args++) -+ for (args=0; (ch = getopt(argc, argv, "hlusfVo")) != EOF; args++) - switch (ch) { - case 'h': header = 0; break; - case 'l': longform = 1; break; -@@ -247,6 +259,7 @@ - case 'f': from = !from; break; - case 'V': display_version(); exit(0); - case 'u': ignoreuser = 1; break; -+ case 'o': oldstyle = 1; break; - default: - printf("usage: w -hlsufV [user]\n" - " -h skip header\n" -@@ -254,6 +267,7 @@ - " -s short listing\n" - " -u ignore uid of processes\n" - " -f toggle FROM field (default %s)\n" -+ " -o old-style output\n" - " -V display version\n", FROM_STRING); - exit(1); - } diff --git a/srcpkgs/procps/patches/w.1.patch b/srcpkgs/procps/patches/w.1.patch deleted file mode 100644 index ebb38e609c..0000000000 --- a/srcpkgs/procps/patches/w.1.patch +++ /dev/null @@ -1,70 +0,0 @@ -Author: -Description: Cleaned up the w man page -Make note of the time formats -Bug-Debian: http://bugs.debian.org/414906 -Index: b/w.1 -=================================================================== ---- a/w.1 2009-11-24 21:00:39.000000000 +1100 -+++ b/w.1 2009-11-24 21:00:42.000000000 +1100 -@@ -4,26 +4,26 @@ - .SH NAME - w \- Show who is logged on and what they are doing. - .SH SYNOPSIS --.B w \- --.RB [ husfVo ] -+.B w -+.RB [ \-husfVo ] - .RI [ user ] - .SH DESCRIPTION --.B "w " -+.B w - displays information about the users currently on the machine, - and their processes. - The header shows, in this order, the current time, - how long the system has been running, - how many users are currently logged on, - and the system load averages for the past 1, 5, and 15 minutes. --.sp -+ - The following entries are displayed for each user: - login name, the tty name, the remote host, login time, idle time, JCPU, PCPU, - and the command line of their current process. --.sp -+ - The JCPU time is the time used by all processes attached to the tty. It - does not include past background jobs, but does include currently - running background jobs. --.sp -+ - The PCPU time is the time used by the current process, named in the "what" - field. - -@@ -35,7 +35,7 @@ - .TP 0.5i - .B "\-u " - Ignores the username while figuring out the current process and cpu --times. To demonstrate this, do a "su" and do a "w" and a "w -u". -+times. To demonstrate this, do a "su" and do a "w" and a "w \-u". - .TP 0.5i - .B "\-s " - Use the short format. -@@ -70,6 +70,19 @@ - process information - .PP - -+.SH NOTES -+The output for Idle, JCPU and PCPU times vaires depending on if you use -+the \-o (old style) option or not. These formats can be confusing if you -+switch between the old style and standard. In the following paragraphs -+days are DD, hours HH, minutes MM, seconds SS and 100ths of seconds CC. -+ -+The standard format is DDdays, HH:MMm, MM:SS or SS.CC if the times are -+greater than 2 days, 1hour, or 1 minute respectively. -+ -+For the \-o option, the output will be either DDdays, HH:MM, MM:SSm or -+blank if the times are greater than 2 days, 1 hour or 1 minute -+respectively. -+ - .SH "SEE ALSO" - .BR free (1), - .BR ps (1), diff --git a/srcpkgs/procps/patches/w_columns.patch b/srcpkgs/procps/patches/w_columns.patch deleted file mode 100644 index 92424f8662..0000000000 --- a/srcpkgs/procps/patches/w_columns.patch +++ /dev/null @@ -1,30 +0,0 @@ -Description: use COLUMNS environment if TIOCGWINSZ fails -Author: Craig Small -Index: b/w.c -=================================================================== ---- a/w.c 2009-11-24 21:00:39.000000000 +1100 -+++ b/w.c 2009-11-24 21:00:43.000000000 +1100 -@@ -241,10 +241,10 @@ - - /***** main */ - int main(int argc, char **argv) { -- char *user = NULL; -+ char *user = NULL, *p; - utmp_t *u; - struct winsize win; -- int header=1, longform=1, from=1, args, maxcmd=80, ch; -+ int header=1, longform=1, from=1, args, maxcmd, ch; - - #ifndef W_SHOWFROM - from = 0; -@@ -277,6 +277,10 @@ - - if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_col > 0) - maxcmd = win.ws_col; -+ else if (p = getenv("COLUMNS")) -+ maxcmd = atoi(p); -+ else -+ maxcmd = 80; - if (maxcmd < 71) { - fprintf(stderr, "%d column window is too narrow\n", maxcmd); - exit(1); diff --git a/srcpkgs/procps/patches/w_envlength.patch b/srcpkgs/procps/patches/w_envlength.patch deleted file mode 100644 index 8ca1dcfde3..0000000000 --- a/srcpkgs/procps/patches/w_envlength.patch +++ /dev/null @@ -1,173 +0,0 @@ -Description: Use environment to set user and from/host column widths -Author: Craig Small -Bug-Debian: http://bugs.debian.org/396423 -Bug-Debian: http://bugs.debian.org/341439 -Index: b/w.1 -=================================================================== ---- a/w.1 2009-11-24 21:00:42.000000000 +1100 -+++ b/w.1 2009-11-24 21:00:44.000000000 +1100 -@@ -1,6 +1,6 @@ - .\" -*-Nroff-*- - .\" --.TH W 1 "8 Dec 1993 " " " "Linux User's Manual" -+.TH W 1 "5 October 2009 " " " "Linux User's Manual" - .SH NAME - w \- Show who is logged on and what they are doing. - .SH SYNOPSIS -@@ -61,6 +61,14 @@ - .B "user " - Show information about the specified user only. - -+.SH ENVIRONMENT -+.TP -+PROCPS_USERLEN -+Override the default width of the username column. Defaults to 8. -+.TP -+PROCPS_FROMLEN -+Override the default width of the from column. Defaults to 16. -+ - .SH FILES - .TP - .I /var/run/utmp -Index: b/w.c -=================================================================== ---- a/w.c 2009-11-24 21:00:43.000000000 +1100 -+++ b/w.c 2009-11-24 21:00:44.000000000 +1100 -@@ -44,20 +44,19 @@ - /* Uh... same thing as UT_NAMESIZE */ - #define USERSZ (sizeof u->ut_user) - -+/* Arbitary setting, not too big for the screen, max host size */ -+#define HOSTSZ 40 -+ - - /* This routine is careful since some programs leave utmp strings -- * unprintable. Always outputs at least 16 chars padded with spaces -+ * unprintable. Always outputs at least fromlen chars padded with spaces - * on the right if necessary. - */ --static void print_host(const char *restrict host, int len) { -+static void print_host(const char *restrict host, int len, const int fromlen) { - const char *last; - int width = 0; - -- /* FIXME: there should really be a way to configure this... */ -- /* for now, we'll just limit it to the 16 that the libc5 version -- * of utmp uses. -- */ -- if (len > 16) len = 16; -+ if (len > fromlen) len = fromlen; - last = host + len; - for ( ; host < last ; host++){ - if (isprint(*host) && *host != ' ') { -@@ -68,7 +67,8 @@ - } - } - // space-fill, and a '-' too if needed to ensure the column exists -- if(width < 16) fputs("- "+width, stdout); -+ while(width++ < fromlen) -+ fputc(' ',stdout); - } - - /***** compact 7 char format for time intervals (belongs in libproc?) */ -@@ -180,7 +180,7 @@ - - - /***** showinfo */ --static void showinfo(utmp_t *u, int formtype, int maxcmd, int from) { -+static void showinfo(utmp_t *u, int formtype, int maxcmd, int from, const int userlen, const int fromlen) { - unsigned long long jcpu; - int ut_pid_found; - unsigned i; -@@ -205,9 +205,9 @@ - - strncpy(uname, u->ut_user, USERSZ); /* force NUL term for printf */ - if (formtype) { -- printf("%-9.8s%-9.8s", uname, u->ut_line); -+ printf("%-*.*s%-9.8s", userlen+1, userlen, uname, u->ut_line); - if (from) -- print_host(u->ut_host, sizeof u->ut_host); -+ print_host(u->ut_host, sizeof u->ut_host, fromlen); - print_logintime(u->ut_time, stdout); - if (*u->ut_line == ':') /* idle unknown for xdm logins */ - printf(" ?xdm? "); -@@ -220,9 +220,9 @@ - } else - printf(" ? "); - } else { -- printf("%-9.8s%-9.8s", u->ut_user, u->ut_line); -+ printf("%-*.*s%-9.8s", userlen+1, userlen, u->ut_user, u->ut_line); - if (from) -- print_host(u->ut_host, sizeof u->ut_host); -+ print_host(u->ut_host, sizeof u->ut_host, fromlen); - if (*u->ut_line == ':') /* idle unknown for xdm logins */ - printf(" ?xdm? "); - else -@@ -245,6 +245,9 @@ - utmp_t *u; - struct winsize win; - int header=1, longform=1, from=1, args, maxcmd, ch; -+ int userlen = 8; -+ int fromlen = 16; -+ char *env_var; - - #ifndef W_SHOWFROM - from = 0; -@@ -275,6 +278,22 @@ - if ((argv[optind])) - user = (argv[optind]); - -+ /* Get user field length from environment */ -+ if ( (env_var = getenv("PROCPS_USERLEN")) != NULL) { -+ userlen = atoi(env_var); -+ if (userlen < 8 || userlen > USERSZ) { -+ fprintf(stderr, "User length environment PROCPS_USERLEN must be between 8 and %d, ignoring.\n", USERSZ); -+ userlen=8; -+ } -+ } -+ /* Get from field length from environment */ -+ if ( (env_var = getenv("PROCPS_FROMLEN")) != NULL) { -+ fromlen = atoi(env_var); -+ if (fromlen < 8 || fromlen > HOSTSZ) { -+ fprintf(stderr, "From length environment PROCPS_FROMLEN must be between 8 and %d, ignoring.\n", HOSTSZ); -+ fromlen=16; -+ } -+ } - if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_col > 0) - maxcmd = win.ws_col; - else if (p = getenv("COLUMNS")) -@@ -285,7 +304,7 @@ - fprintf(stderr, "%d column window is too narrow\n", maxcmd); - exit(1); - } -- maxcmd -= 29 + (from ? 16 : 0) + (longform ? 20 : 0); -+ maxcmd -= 21 + userlen + (from ? fromlen : 0) + (longform ? 20 : 0); - if (maxcmd < 3) - fprintf(stderr, "warning: screen width %d suboptimal.\n", win.ws_col); - -@@ -293,7 +312,7 @@ - - if (header) { /* print uptime and headers */ - print_uptime(); -- printf("USER TTY "); -+ printf("%-*s TTY ",userlen,"USER"); - if (from) - printf("FROM "); - if (longform) -@@ -309,14 +328,14 @@ - u = getutent(); - if (unlikely(!u)) break; - if (u->ut_type != USER_PROCESS) continue; -- if (!strncmp(u->ut_user, user, USERSZ)) showinfo(u, longform, maxcmd, from); -+ if (!strncmp(u->ut_user, user, USERSZ)) showinfo(u, longform, maxcmd, from, userlen, fromlen); - } - } else { - for (;;) { - u = getutent(); - if (unlikely(!u)) break; - if (u->ut_type != USER_PROCESS) continue; -- if (*u->ut_user) showinfo(u, longform, maxcmd, from); -+ if (*u->ut_user) showinfo(u, longform, maxcmd, from, userlen, fromlen); - } - } - endutent(); diff --git a/srcpkgs/procps/patches/w_time.patch b/srcpkgs/procps/patches/w_time.patch deleted file mode 100644 index 48f388483a..0000000000 --- a/srcpkgs/procps/patches/w_time.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Let fprintf print locale-friendly seconds -Author: Craig Small -Bug-Debian: http://bugs.debian.org/252575 -Index: b/w.c -=================================================================== ---- a/w.c 2009-11-24 20:53:04.000000000 +1100 -+++ b/w.c 2009-11-24 21:00:37.000000000 +1100 -@@ -83,7 +83,7 @@ - else if (t > 60) /* > 1 minute */ - fprintf(fout, " %2lu:%02u ", t/60, (unsigned) t%60); - else -- fprintf(fout, " %2lu.%02us", t, centi_sec); -+ fprintf(fout, " %2lu.%02us", t, centi_sec); - } - - /**** stat the device file to get an idle time */ diff --git a/srcpkgs/procps/patches/w_userproc.patch b/srcpkgs/procps/patches/w_userproc.patch deleted file mode 100644 index 8224acd6f2..0000000000 --- a/srcpkgs/procps/patches/w_userproc.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Make w make better guesses for user process - Based on suggestion by Herbert Xu -Bug-Debian: http://bugs.debian.org/187808 -Author: Craig Small ---- a/w.c -+++ b/w.c -@@ -171,7 +171,7 @@ - secondbest = tmp; - } - if(!ignoreuser && uid != tmp->euid && uid != tmp->ruid) continue; -- if(tmp->tgid != tmp->tpgid) continue; -+ if(tmp->pgrp != tmp->tpgid) continue; - if(best && tmp->start_time <= best->start_time) continue; - best = tmp; - } diff --git a/srcpkgs/procps/patches/watch.1.patch b/srcpkgs/procps/patches/watch.1.patch deleted file mode 100644 index 3ff182cfe4..0000000000 --- a/srcpkgs/procps/patches/watch.1.patch +++ /dev/null @@ -1,103 +0,0 @@ -Description: Cleanup of manual page and cumulative is a parameter not option -Author: jidanni@jidanni.org -Bug-Debian: http://bugs.debian.org/527193 -Reviewed-by: Craig Small -Index: b/watch.1 -=================================================================== ---- a/watch.1 2009-11-24 20:53:04.000000000 +1100 -+++ b/watch.1 2009-11-24 21:00:36.000000000 +1100 -@@ -1,45 +1,54 @@ --.TH WATCH 1 "1999 Apr 3" " " "Linux User's Manual" -+.TH WATCH 1 "2009 May 11" " " "Linux User's Manual" - .SH NAME - watch \- execute a program periodically, showing output fullscreen - .SH SYNOPSIS -+.na - .B watch --.I [\-dhvt] [\-n ] [\-\-differences[=cumulative]] [\-\-help] [\-\-interval=] [\-\-no\-title] [\-\-version] -+.RB [ \-dhvt ] -+.RB [ \-n -+.IR seconds ] -+.RB [ \-\-differences[=\fIcumulative\fP]] -+.RB [ \-\-help ] -+.RB [ \-\-interval=\fIseconds\fP] -+.RB [ \-\-no\-title ] -+.RB [ \-\-version ] -+.I command - .SH DESCRIPTION --.BR watch -+.B watch - runs - .I command - repeatedly, displaying its output (the first screenfull). This allows you to - watch the program output change over time. By default, the program is run - every 2 seconds; use --.I -n -+.B \-n - or --.I --interval -+.B \-\-interval - to specify a different interval. - .PP - The --.I -d -+.B \-d - or --.I --differences --flag will highlight the differences between successive updates. The --.I --cumulative --option makes highlighting "sticky", presenting a running display of all -+.B \-\-differences -+flag will highlight the differences between successive updates. Using -+.B \-\-differences=\fIcumulative\fP -+makes highlighting "sticky", presenting a running display of all - positions that have ever changed. The --.I -t -+.B \-t - or --.I --no-title -+.B \-\-no\-title - option turns off the header showing the interval, command, and current - time at the top of the display, as well as the following blank line. - .PP --.BR watch -+.B watch - will run until interrupted. - .SH NOTE - Note that - .I command --is given to "sh -c" -+is given to "sh \-c" - which means that you may need to use extra quoting to get the desired effect. - .PP - Note that POSIX option processing is used (i.e., option processing stops at --the first non-option argument). This means that flags after -+the first non\-option argument). This means that flags after - .I command - don't get interpreted by - .BR watch -@@ -61,20 +70,20 @@ - To see the effects of quoting, try these out - .IP - watch echo $$ --.IP -+.br - watch echo '$$' --.IP -+.br - watch echo "'"'$$'"'" - .PP - You can watch for your administrator to install the latest kernel with - .IP --watch uname -r -+watch uname \-r - .PP - (Just kidding.) - .SH BUGS - Upon terminal resize, the screen will not be correctly repainted until the - next scheduled update. All --.I --differences -+.B \-\-differences - highlighting is lost on that update as well. - .PP - Non-printing characters are stripped from program output. Use "cat -v" as diff --git a/srcpkgs/procps/patches/watch_8bitchar.patch b/srcpkgs/procps/patches/watch_8bitchar.patch deleted file mode 100644 index 3c226f37a0..0000000000 --- a/srcpkgs/procps/patches/watch_8bitchar.patch +++ /dev/null @@ -1,15 +0,0 @@ -Author: -Description: Make watch unsigned chars and 8bit clean -Index: b/watch.c -=================================================================== ---- a/watch.c 2009-11-24 20:53:03.000000000 +1100 -+++ b/watch.c 2009-11-24 21:00:40.000000000 +1100 -@@ -297,7 +297,7 @@ - move(y, x); - if (option_differences) { - chtype oldch = inch(); -- char oldc = oldch & A_CHARTEXT; -+ unsigned char oldc = oldch & A_CHARTEXT; - attr = !first_screen - && ((char)c != oldc - || diff --git a/srcpkgs/procps/patches/watch_ansi_colour.patch b/srcpkgs/procps/patches/watch_ansi_colour.patch deleted file mode 100644 index 077e13524f..0000000000 --- a/srcpkgs/procps/patches/watch_ansi_colour.patch +++ /dev/null @@ -1,180 +0,0 @@ -Description: Interprets ANSI color code sequences -Bug-Debian: http://bugs.debian.org/129334 -Author: Craig Small -Last-Update: 2010-03-01 ---- a/watch.c -+++ b/watch.c -@@ -37,6 +37,7 @@ - #endif - - static struct option longopts[] = { -+ {"color", no_argument, 0, 'c' }, - {"differences", optional_argument, 0, 'd'}, - {"help", no_argument, 0, 'h'}, - {"interval", required_argument, 0, 'n'}, -@@ -50,7 +51,7 @@ - }; - - static char usage[] = -- "Usage: %s [-bdhnptvx] [--beep] [--differences[=cumulative]] [--exec] [--help] [--interval=] [--no-title] [--version] \n"; -+ "Usage: %s [-bcdhnptvx] [--beep] [--color] [--differences[=cumulative]] [--exec] [--help] [--interval=] [--no-title] [--version] \n"; - - static char *progname; - -@@ -62,6 +63,74 @@ - static int precise_timekeeping = 0; - - #define min(x,y) ((x) > (y) ? (y) : (x)) -+#define MAX_ANSIBUF 10 -+ -+static void init_ansi_colors(void) -+{ -+ int i; -+ short ncurses_colors[] = { -+ COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE, -+ COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE }; -+ -+ for (i=0; i< 8; i++) -+ init_pair(i+1, ncurses_colors[i], -1); -+} -+ -+static void set_ansi_attribute(const int attrib) -+{ -+ switch (attrib) -+ { -+ case -1: -+ return; -+ case 0: -+ standend(); -+ return; -+ case 1: -+ attrset(A_BOLD); -+ return; -+ } -+ if (attrib >= 30 && attrib <= 37) { -+ color_set(attrib-29,NULL); -+ return; -+ } -+} -+ -+static void process_ansi(FILE *fp) -+{ -+ int i,c, num1, num2; -+ char buf[MAX_ANSIBUF]; -+ char *nextnum; -+ -+ -+ c= getc(fp); -+ if (c != '[') { -+ ungetc(c, fp); -+ return; -+ } -+ for(i=0; i '9' && c != ';') -+ { -+ while(--i >= 0) -+ ungetc(buf[i],fp); -+ return; -+ } -+ buf[i] = (char)c; -+ } -+ num1 = strtol(buf, &nextnum, 10); -+ if (nextnum != buf && nextnum[0] != '\0') -+ num2 = strtol(nextnum+1, NULL, 10); -+ else -+ num2 = -1; -+ set_ansi_attribute(num1); -+ set_ansi_attribute(num2); -+} - - static void do_usage(void) NORETURN; - static void do_usage(void) -@@ -187,6 +256,7 @@ - option_differences_cumulative = 0, - option_exec = 0, - option_beep = 0, -+ option_color = 0, - option_errexit = 0, - option_help = 0, option_version = 0; - double interval = 2; -@@ -205,12 +275,15 @@ - setlocale(LC_ALL, ""); - progname = argv[0]; - -- while ((optc = getopt_long(argc, argv, "+bed::hn:pvtx", longopts, (int *) 0)) -+ while ((optc = getopt_long(argc, argv, "+bced::hn:pvtx", longopts, (int *) 0)) - != EOF) { - switch (optc) { - case 'b': - option_beep = 1; - break; -+ case 'c': -+ option_color = 1; -+ break; - case 'd': - option_differences = 1; - if (optarg) -@@ -319,6 +392,14 @@ - /* Set up tty for curses use. */ - curses_started = 1; - initscr(); -+ if (option_color) { -+ if (has_colors()) { -+ start_color(); -+ use_default_colors(); -+ init_ansi_colors(); -+ } else -+ option_color = 0; -+ } - nonl(); - noecho(); - cbreak(); -@@ -460,7 +541,13 @@ - }while (c != WEOF && !isprint(c) && c<128 - && wcwidth(c) == 0 - && c != L'\n' -- && c != L'\t'); -+ && c != L'\t' -+ && (c != L'\033' || option_color != 1)); -+ if (c == L'\033' && option_color == 1) { -+ x--; -+ process_ansi(p); -+ continue; -+ } - if (c == L'\n') - if (!oldeolseen && x == 0) { - x = -1; ---- a/watch.1 -+++ b/watch.1 -@@ -1,4 +1,4 @@ --.TH WATCH 1 "2009 May 11" " " "Linux User's Manual" -+.TH WATCH 1 "2010 Mar 01" " " "Linux User's Manual" - .SH NAME - watch \- execute a program periodically, showing output fullscreen - .SH SYNOPSIS -@@ -8,6 +8,7 @@ - .RB [ \-n - .IR seconds ] - .RB [ \-\-beep ] -+.RB [ \-\-color ] - .RB [ \-\-differences[=\fIcumulative\fP]] - .RB [ \-\-errexit ] - .RB [ \-\-exec ] -@@ -75,6 +76,10 @@ - options, which will cause - .B watch - to exit if the return value from the program is non-zero. -+.PP -+By default \fBwatch\fR will normally not pass escape characters, however -+if you use the \fI\-\-c\fR or \fI\-\-color\fR option, then -+\fBwatch\fR will interpret ANSI color sequences for the foreground. - - .SH NOTE - Note that diff --git a/srcpkgs/procps/patches/watch_exec_beep.patch b/srcpkgs/procps/patches/watch_exec_beep.patch deleted file mode 100644 index 33de698503..0000000000 --- a/srcpkgs/procps/patches/watch_exec_beep.patch +++ /dev/null @@ -1,259 +0,0 @@ -Description: Adds -exec and -beep flags and has better quoting #410967 -Adds -errexit flag now too #183346 -Author: Mordechai T. Abzug -Bug-Debian: http://bugs.debian.org/410967 -Bug-Debian: http://bugs.debian.org/183346 -Reviewed-by: Craig Small -Index: b/watch.1 -=================================================================== ---- a/watch.1 2009-11-24 21:00:36.000000000 +1100 -+++ b/watch.1 2009-11-24 21:00:43.000000000 +1100 -@@ -4,10 +4,13 @@ - .SH SYNOPSIS - .na - .B watch --.RB [ \-dhvt ] -+.RB [ \-bdehvtx ] - .RB [ \-n - .IR seconds ] -+.RB [ \-\-beep ] - .RB [ \-\-differences[=\fIcumulative\fP]] -+.RB [ \-\-errexit ] -+.RB [ \-\-exec ] - .RB [ \-\-help ] - .RB [ \-\-interval=\fIseconds\fP] - .RB [ \-\-no\-title ] -@@ -17,7 +20,8 @@ - .B watch - runs - .I command --repeatedly, displaying its output (the first screenfull). This allows you to -+repeatedly, displaying its output and errors (the first screenfull). This -+allows you to - watch the program output change over time. By default, the program is run - every 2 seconds; use - .B \-n -@@ -37,15 +41,33 @@ - or - .B \-\-no\-title - option turns off the header showing the interval, command, and current --time at the top of the display, as well as the following blank line. -+time at the top of the display, as well as the following blank line. The -+.I \-b -+or -+.I \-\-beep -+option causes the command to beep if it has a non-zero exit. - .PP - .B watch --will run until interrupted. -+will normally run until interrupted. If you want -+.B watch -+to exit on an error from the program running use the -+.I \-e -+or -+.I \-\-errexit -+options, which will cause -+.B watch -+to exit if the return value from the program is non-zero. -+ - .SH NOTE - Note that - .I command - is given to "sh \-c" - which means that you may need to use extra quoting to get the desired effect. -+You can disable this with the -+.I -x -+or -+.I --exec -+option, which passes the command to exec(2) instead. - .PP - Note that POSIX option processing is used (i.e., option processing stops at - the first non\-option argument). This means that flags after -@@ -93,4 +115,5 @@ - .B watch - was written by Tony Rems in 1991, with mods and - corrections by Francois Pinard. It was reworked and new features added by --Mike Coleman in 1999. -+Mike Coleman in 1999. The beep, exec, and error handling -+features were added by Morty Abzug in 2008. -Index: b/watch.c -=================================================================== ---- a/watch.c 2009-11-24 21:00:40.000000000 +1100 -+++ b/watch.c 2009-11-24 21:00:43.000000000 +1100 -@@ -8,6 +8,7 @@ - * Mike Coleman . - * - * Changes by Albert Cahalan, 2002-2003. -+ * stderr handling, exec, and beep option added by Morty Abzug, 2008 - */ - - #define VERSION "0.2.0" -@@ -35,13 +36,16 @@ - {"differences", optional_argument, 0, 'd'}, - {"help", no_argument, 0, 'h'}, - {"interval", required_argument, 0, 'n'}, -+ {"beep", no_argument, 0, 'b'}, -+ {"errexit", no_argument, 0, 'e'}, -+ {"exec", no_argument, 0, 'x'}, - {"no-title", no_argument, 0, 't'}, - {"version", no_argument, 0, 'v'}, - {0, 0, 0, 0} - }; - - static char usage[] = -- "Usage: %s [-dhntv] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] \n"; -+ "Usage: %s [-bdhntvx] [--beep] [--differences[=cumulative]] [--exec] [--help] [--interval=] [--no-title] [--version] \n"; - - static char *progname; - -@@ -140,28 +144,44 @@ - int optc; - int option_differences = 0, - option_differences_cumulative = 0, -+ option_exec = 0, -+ option_beep = 0, -+ option_errexit = 0, - option_help = 0, option_version = 0; - double interval = 2; - char *command; -+ char **command_argv; - int command_length = 0; /* not including final \0 */ -+ int pipefd[2]; -+ int status; -+ pid_t child; - - setlocale(LC_ALL, ""); - progname = argv[0]; - -- while ((optc = getopt_long(argc, argv, "+d::hn:vt", longopts, (int *) 0)) -+ while ((optc = getopt_long(argc, argv, "+bed::hn:vtx", longopts, (int *) 0)) - != EOF) { - switch (optc) { -+ case 'b': -+ option_beep = 1; -+ break; - case 'd': - option_differences = 1; - if (optarg) - option_differences_cumulative = 1; - break; -+ case 'e': -+ option_errexit = 1; -+ break; - case 'h': - option_help = 1; - break; - case 't': - show_title = 0; - break; -+ case 'x': -+ option_exec = 1; -+ break; - case 'n': - { - char *str; -@@ -191,18 +211,23 @@ - - if (option_help) { - fprintf(stderr, usage, progname); -+ fputs(" -b, --beep\t\t\t\tbeep if the command has a non-zero exit\n", stderr); - fputs(" -d, --differences[=cumulative]\thighlight changes between updates\n", stderr); - fputs("\t\t(cumulative means highlighting is cumulative)\n", stderr); -+ fputs(" -e, --errexit\t\t\t\texit watch if the command has a non-zero exit\n", stderr); - fputs(" -h, --help\t\t\t\tprint a summary of the options\n", stderr); - fputs(" -n, --interval=\t\tseconds to wait between updates\n", stderr); - fputs(" -v, --version\t\t\t\tprint the version number\n", stderr); - fputs(" -t, --no-title\t\t\tturns off showing the header\n", stderr); -+ fputs(" -x, --exec\t\t\t\tpass command to exec instead of sh\n", stderr); - exit(0); - } - - if (optind >= argc) - do_usage(); - -+ command_argv=&(argv[optind]); /* save for later */ -+ - command = strdup(argv[optind++]); - command_length = strlen(command); - for (; optind < argc; optind++) { -@@ -261,11 +286,57 @@ - free(header); - } - -- if (!(p = popen(command, "r"))) { -- perror("popen"); -+ /* allocate pipes */ -+ if (pipe(pipefd)<0) { -+ perror("pipe"); -+ do_exit(7); -+ } -+ -+ /* flush stdout and stderr, since we're about to do fd stuff */ -+ fflush(stdout); -+ fflush(stderr); -+ -+ /* fork to prepare to run command */ -+ child=fork(); -+ -+ if (child<0) { /* fork error */ -+ perror("fork"); - do_exit(2); -+ } else if (child==0) { /* in child */ -+ close (pipefd[0]); /* child doesn't need read side of pipe */ -+ close (1); /* prepare to replace stdout with pipe */ -+ if (dup2 (pipefd[1], 1)<0) { /* replace stdout with write side of pipe */ -+ perror("dup2"); -+ exit(3); -+ } -+ dup2(1, 2); /* stderr should default to stdout */ -+ -+ if (option_exec) { /* pass command to exec instead of system */ -+ if (execvp(command_argv[0], command_argv)==-1) { -+ perror("exec"); -+ exit(4); -+ } -+ } else { -+ status=system(command); /* watch manpage promises sh quoting */ -+ -+ /* propagate command exit status as child exit status */ -+ if (!WIFEXITED(status)) { /* child exits nonzero if command does */ -+ exit(1); -+ } else { -+ exit(WEXITSTATUS(status)); -+ } -+ } -+ -+ } -+ -+ /* otherwise, we're in parent */ -+ close(pipefd[1]); /* close write side of pipe */ -+ if ((p=fdopen(pipefd[0], "r"))==NULL) { -+ perror("fdopen"); -+ do_exit(5); - } - -+ - for (y = show_title; y < height; y++) { - int eolseen = 0, tabpending = 0; - for (x = 0; x < width; x++) { -@@ -313,7 +384,19 @@ - oldeolseen = eolseen; - } - -- pclose(p); -+ fclose(p); -+ -+ /* harvest child process and get status, propagated from command */ -+ if (waitpid(child, &status, 0)<0) { -+ perror("waitpid"); -+ do_exit(8); -+ }; -+ -+ /* if child process exited in error, beep if option_beep is set */ -+ if ((!WIFEXITED(status) || WEXITSTATUS(status))) { -+ if (option_beep) beep(); -+ if (option_errexit) do_exit(8); -+ } - - first_screen = 0; - refresh(); diff --git a/srcpkgs/procps/patches/watch_precision_time.patch b/srcpkgs/procps/patches/watch_precision_time.patch deleted file mode 100644 index 8ed5095f91..0000000000 --- a/srcpkgs/procps/patches/watch_precision_time.patch +++ /dev/null @@ -1,216 +0,0 @@ -Description: Add precision wait time option -p -Author: Anthony DeRobertis -Bug-Debian: http://bugs.debian.org/183486 -Reviewed-by: Craig Small -Index: b/watch.1 -=================================================================== ---- a/watch.1 2009-11-24 21:00:43.000000000 +1100 -+++ b/watch.1 2009-11-24 21:00:46.000000000 +1100 -@@ -4,7 +4,7 @@ - .SH SYNOPSIS - .na - .B watch --.RB [ \-bdehvtx ] -+.RB [ \-bdehpvtx ] - .RB [ \-n - .IR seconds ] - .RB [ \-\-beep ] -@@ -14,6 +14,7 @@ - .RB [ \-\-help ] - .RB [ \-\-interval=\fIseconds\fP] - .RB [ \-\-no\-title ] -+.RB [ \-\-precise ] - .RB [ \-\-version ] - .I command - .SH DESCRIPTION -@@ -27,7 +28,24 @@ - .B \-n - or - .B \-\-interval --to specify a different interval. -+to specify a different interval. Normally, this interval is interpreted -+as the amout of time between the completion of one run of -+.I command -+and the beginning of the next run. However, with the -+.I \-p -+or -+.I \-\-precise -+option, you can make -+.BR watch -+attempt to run -+.I command -+every -+.I interval -+seconds. Try it with -+.B ntptime -+and notice how the fractional seconds stays -+(nearly) the same, as opposed to normal mode where they continuously -+increase. - .PP - The - .B \-d -@@ -97,11 +115,21 @@ - .br - watch echo "'"'$$'"'" - .PP -+To see the effect of precision time keeping, try adding -+.I \-p -+to -+.IP -+watch \-n 10 sleep 1 -+.PP - You can watch for your administrator to install the latest kernel with - .IP - watch uname \-r - .PP --(Just kidding.) -+(Note that -+.I \-p -+isn't guaranteed to work across reboots, especially in the face of -+.B ntpdate -+or other bootup time-changing mechanisms) - .SH BUGS - Upon terminal resize, the screen will not be correctly repainted until the - next scheduled update. All -@@ -110,6 +138,22 @@ - .PP - Non-printing characters are stripped from program output. Use "cat -v" as - part of the command pipeline if you want to see them. -+.PP -+.I \-\-precise -+mode doesn't yet have advanced temporal distortion technology to -+compensate for a -+.I command -+that takes more than -+.I interval -+seconds to execute. -+.B watch -+also can get into a state where it rapid-fires as many executions of -+.I command -+as it can to catch up from a previous executions running longer than -+.I interval -+(for example, -+.B netstat -+taking ages on a DNS lookup). - .SH AUTHORS - The original - .B watch -@@ -117,3 +161,7 @@ - corrections by Francois Pinard. It was reworked and new features added by - Mike Coleman in 1999. The beep, exec, and error handling - features were added by Morty Abzug in 2008. -+On a not so dark and stormy morning -+in March of 2003, Anthony DeRobertis got sick of -+his watches that should update every minute eventually updating many -+seconds after the minute started, and added microsecond precision. -Index: b/watch.c -=================================================================== ---- a/watch.c 2009-11-24 21:00:43.000000000 +1100 -+++ b/watch.c 2009-11-24 21:00:46.000000000 +1100 -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -39,13 +40,14 @@ - {"beep", no_argument, 0, 'b'}, - {"errexit", no_argument, 0, 'e'}, - {"exec", no_argument, 0, 'x'}, -+ {"precise", no_argument, 0, 'p'}, - {"no-title", no_argument, 0, 't'}, - {"version", no_argument, 0, 'v'}, - {0, 0, 0, 0} - }; - - static char usage[] = -- "Usage: %s [-bdhntvx] [--beep] [--differences[=cumulative]] [--exec] [--help] [--interval=] [--no-title] [--version] \n"; -+ "Usage: %s [-bdhnptvx] [--beep] [--differences[=cumulative]] [--exec] [--help] [--interval=] [--no-title] [--version] \n"; - - static char *progname; - -@@ -54,6 +56,7 @@ - static int screen_size_changed = 0; - static int first_screen = 1; - static int show_title = 2; // number of lines used, 2 or 0 -+static int precise_timekeeping = 0; - - #define min(x,y) ((x) > (y) ? (y) : (x)) - -@@ -138,6 +141,15 @@ - } - } - -+/* get current time in usec */ -+typedef unsigned long long watch_usec_t; -+#define USECS_PER_SEC (1000000ull) -+watch_usec_t get_time_usec() { -+ struct timeval now; -+ gettimeofday(&now, NULL); -+ return USECS_PER_SEC*now.tv_sec + now.tv_usec; -+} -+ - int - main(int argc, char *argv[]) - { -@@ -152,6 +164,8 @@ - char *command; - char **command_argv; - int command_length = 0; /* not including final \0 */ -+ watch_usec_t next_loop; /* next loop time in us, used for precise time -+ keeping only */ - int pipefd[2]; - int status; - pid_t child; -@@ -159,7 +173,7 @@ - setlocale(LC_ALL, ""); - progname = argv[0]; - -- while ((optc = getopt_long(argc, argv, "+bed::hn:vtx", longopts, (int *) 0)) -+ while ((optc = getopt_long(argc, argv, "+bed::hn:pvtx", longopts, (int *) 0)) - != EOF) { - switch (optc) { - case 'b': -@@ -194,6 +208,9 @@ - interval = ~0u/1000000; - } - break; -+ case 'p': -+ precise_timekeeping = 1; -+ break; - case 'v': - option_version = 1; - break; -@@ -217,6 +234,7 @@ - fputs(" -e, --errexit\t\t\t\texit watch if the command has a non-zero exit\n", stderr); - fputs(" -h, --help\t\t\t\tprint a summary of the options\n", stderr); - fputs(" -n, --interval=\t\tseconds to wait between updates\n", stderr); -+ fputs(" -p, --precise\t\t\t\tprecise timing, ignore command run time\n", stderr); - fputs(" -v, --version\t\t\t\tprint the version number\n", stderr); - fputs(" -t, --no-title\t\t\tturns off showing the header\n", stderr); - fputs(" -x, --exec\t\t\t\tpass command to exec instead of sh\n", stderr); -@@ -256,6 +274,9 @@ - noecho(); - cbreak(); - -+ if (precise_timekeeping) -+ next_loop = get_time_usec(); -+ - for (;;) { - time_t t = time(NULL); - char *ts = ctime(&t); -@@ -400,6 +421,12 @@ - - first_screen = 0; - refresh(); -+ if (precise_timekeeping) { -+ watch_usec_t cur_time = get_time_usec(); -+ next_loop += USECS_PER_SEC*interval; -+ if (cur_time < next_loop) -+ usleep(next_loop - cur_time); -+ } else - usleep(interval * 1000000); - } - diff --git a/srcpkgs/procps/patches/watch_unicode.patch b/srcpkgs/procps/patches/watch_unicode.patch deleted file mode 100644 index 1012271b62..0000000000 --- a/srcpkgs/procps/patches/watch_unicode.patch +++ /dev/null @@ -1,292 +0,0 @@ -Description: Unicode/8bit for watch -Bug-Debian: http://bugs.debian.org/240989 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/procps/+bug/318221 -Author: Jarrod Lowe ---- a/AUTHORS -+++ b/AUTHORS -@@ -47,4 +47,5 @@ - watch: - Tony Rems - Mike Coleman -+Jarrod Lowe - ---- a/Makefile -+++ b/Makefile -@@ -68,6 +68,7 @@ - _TARFILES := Makefile - - CURSES := -lncurses -+CURSESW := -lncursesw - - # This seems about right for the dynamic library stuff. - # Something like this is probably needed to make the SE Linux -@@ -119,7 +120,7 @@ - # Unlike the kernel one, this check_gcc goes all the way to - # producing an executable. There might be a -m64 that works - # until you go looking for a 64-bit curses library. --check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) -+check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) $(CURSESW) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) - - # Be 64-bit if at all possible. In a cross-compiling situation, one may - # do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT -@@ -250,7 +251,7 @@ - $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ $(CURSES) - - watch: % : %.o -- $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ $(CURSES) -+ $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ $(CURSESW) - - ############ progX --> progY - ---- a/watch.1 -+++ b/watch.1 -@@ -139,6 +139,17 @@ - Non-printing characters are stripped from program output. Use "cat -v" as - part of the command pipeline if you want to see them. - .PP -+Combining Characters that are supposed to display on the character at the -+last column on the screen may display one column early, or they may not -+display at all. -+.PP -+Combining Characters never count as different in -+.I \-\-differences -+mode. Only the base character counts. -+.PP -+Blank lines directly after a line which ends in the last column do not -+display. -+.PP - .I \-\-precise - mode doesn't yet have advanced temporal distortion technology to - compensate for a -@@ -165,3 +176,4 @@ - in March of 2003, Anthony DeRobertis got sick of - his watches that should update every minute eventually updating many - seconds after the minute started, and added microsecond precision. -+Unicode support was added in 2009 by Jarrod Lowe . ---- a/watch.c -+++ b/watch.c -@@ -9,14 +9,16 @@ - * - * Changes by Albert Cahalan, 2002-2003. - * stderr handling, exec, and beep option added by Morty Abzug, 2008 -+ * Unicode Support added by Jarrod Lowe in 2009. - */ - --#define VERSION "0.2.0" -+#define VERSION "0.3.0" - -+#include - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -27,6 +29,7 @@ - #include - #include - #include "proc/procps.h" -+#include - - #ifdef FORCE_8BIT - #undef isprint -@@ -150,6 +153,32 @@ - return USECS_PER_SEC*now.tv_sec + now.tv_usec; - } - -+// read a wide character from a popen'd stream -+#define MAX_ENC_BYTES 16 -+wint_t my_getwc(FILE *s); -+wint_t my_getwc(FILE *s) { -+ char i[MAX_ENC_BYTES]; //assuming no encoding ever consumes more than 16 bytes -+ int byte = 0; -+ int convert; -+ int x; -+ wchar_t rval; -+ while(1) { -+ i[byte] = getc(s); -+ if (i[byte]==EOF) { return WEOF; } -+ byte++; -+ errno = 0; -+ mbtowc(NULL, NULL, 0); -+ convert = mbtowc(&rval, i, byte); -+ x = errno; -+ if(convert > 0) { return rval; } //legal conversion -+ if(byte == MAX_ENC_BYTES) { -+ while(byte > 1) { ungetc(i[--byte], s); } //at least *try* to fix up -+ errno = -EILSEQ; -+ return WEOF; -+ } -+ } -+} -+ - int - main(int argc, char *argv[]) - { -@@ -162,8 +191,11 @@ - option_help = 0, option_version = 0; - double interval = 2; - char *command; -+ wchar_t *wcommand = NULL; - char **command_argv; - int command_length = 0; /* not including final \0 */ -+ int wcommand_columns = 0; /* not including final \0 */ -+ int wcommand_characters = 0; /* not including final \0 */ - watch_usec_t next_loop; /* next loop time in us, used for precise time - keeping only */ - int pipefd[2]; -@@ -259,6 +291,23 @@ - command[command_length] = '\0'; - } - -+ // convert to wide for printing purposes -+ //mbstowcs(NULL, NULL, 0); -+ wcommand_characters = mbstowcs(NULL, command, 0); -+ if(wcommand_characters < 0) { -+ fprintf(stderr, "Unicode Handling Error\n"); -+ exit(1); -+ } -+ wcommand = (wchar_t*)malloc((wcommand_characters+1) * sizeof(wcommand)); -+ if(wcommand == NULL) { -+ fprintf(stderr, "Unicode Handling Error (malloc)\n"); -+ exit(1); -+ } -+ mbstowcs(wcommand, command, wcommand_characters+1); -+ wcommand_columns = wcswidth(wcommand, -1); -+ -+ -+ - get_terminal_size(); - - /* Catch keyboard interrupts so we can put tty back in a sane state. */ -@@ -298,12 +347,44 @@ - if (show_title) { - // left justify interval and command, - // right justify time, clipping all to fit window width -- asprintf(&header, "Every %.1fs: %.*s", -- interval, min(width - 1, command_length), command); -- mvaddstr(0, 0, header); -- if (strlen(header) > (size_t) (width - tsl - 1)) -- mvaddstr(0, width - tsl - 4, "... "); -- mvaddstr(0, width - tsl + 1, ts); -+ -+ int hlen = asprintf(&header, "Every %.1fs: ", interval); -+ -+ // the rules: -+ // width < tsl : print nothing -+ // width < tsl + hlen + 1: print ts -+ // width = tsl + hlen + 1: print header, ts -+ // width < tsl + hlen + 4: print header, ..., ts -+ // width < tsl + hlen + wcommand_columns: print header, truncated wcommand, ..., ts -+ // width > "": print header, wcomand, ts -+ // this is slightly different from how it used to be -+ if(width >= tsl) { -+ if(width >= tsl + hlen + 1) { -+ mvaddstr(0, 0, header); -+ if(width >= tsl + hlen + 2) { -+ if(width < tsl + hlen + 4) { -+ mvaddstr(0, width - tsl - 4, "... "); -+ }else{ -+ if(width < tsl + hlen + wcommand_columns) { -+ // print truncated -+ int avail_columns = width - tsl - hlen; -+ int using_columns = wcommand_columns; -+ int using_characters = wcommand_characters; -+ while(using_columns > avail_columns - 4) { -+ using_characters--; -+ using_columns = wcswidth(wcommand, using_characters); -+ } -+ mvaddnwstr(0, hlen, wcommand, using_characters); -+ mvaddstr(0, width - tsl - 4, "... "); -+ }else{ -+ mvaddwstr(0, hlen, wcommand); -+ } -+ } -+ } -+ } -+ mvaddstr(0, width - tsl + 1, ts); -+ } -+ - free(header); - } - -@@ -360,47 +441,62 @@ - - for (y = show_title; y < height; y++) { - int eolseen = 0, tabpending = 0; -+ wint_t carry = WEOF; - for (x = 0; x < width; x++) { -- int c = ' '; -+ wint_t c = L' '; - int attr = 0; - - if (!eolseen) { - /* if there is a tab pending, just spit spaces until the - next stop instead of reading characters */ - if (!tabpending) -- do -- c = getc(p); -- while (c != EOF && !isprint(c) -- && c != '\n' -- && c != '\t'); -- if (c == '\n') -+ do { -+ if(carry == WEOF) { -+ c = my_getwc(p); -+ }else{ -+ c = carry; -+ carry = WEOF; -+ } -+ }while (c != WEOF && !isprint(c) && c<128 -+ && wcwidth(c) == 0 -+ && c != L'\n' -+ && c != L'\t'); -+ if (c == L'\n') - if (!oldeolseen && x == 0) { - x = -1; - continue; - } else - eolseen = 1; -- else if (c == '\t') -+ else if (c == L'\t') - tabpending = 1; -- if (c == EOF || c == '\n' || c == '\t') -- c = ' '; -+ if (x==width-1 && wcwidth(c)==2) { -+ y++; -+ x = -1; //process this double-width -+ carry = c; //character on the next line -+ continue; //because it won't fit here -+ } -+ if (c == WEOF || c == L'\n' || c == L'\t') -+ c = L' '; - if (tabpending && (((x + 1) % 8) == 0)) - tabpending = 0; - } - move(y, x); - if (option_differences) { -- chtype oldch = inch(); -- unsigned char oldc = oldch & A_CHARTEXT; -+ cchar_t oldc; -+ in_wch(&oldc); - attr = !first_screen -- && ((char)c != oldc -+ && ((wchar_t)c != oldc.chars[0] - || - (option_differences_cumulative -- && (oldch & A_ATTRIBUTES))); -+ && (oldc.attr & A_ATTRIBUTES))); - } - if (attr) - standout(); -- addch(c); -+ addnwstr((wchar_t*)&c,1); - if (attr) - standend(); -+ if(wcwidth(c) == 0) { x--; } -+ if(wcwidth(c) == 2) { x++; } - } - oldeolseen = eolseen; - } diff --git a/srcpkgs/procps/template b/srcpkgs/procps/template index 3e6ac9d421..7583693c63 100644 --- a/srcpkgs/procps/template +++ b/srcpkgs/procps/template @@ -1,7 +1,7 @@ # Template file for 'procps' pkgname=procps version=3.2.8 -revision=4 +revision=5 distfiles="http://procps.sf.net/$pkgname-$version.tar.gz" patch_args="-Np1" build_style=gnu_makefile @@ -17,10 +17,5 @@ long_desc=" performance improvements, and new features." Add_dependency run glibc -Add_dependency run ncursesw -Add_dependency build ncursesw-devel - -pre_build() -{ - sed -i -e "s|-lncurses$|-lncursesw|g" ${wrksrc}/Makefile -} +Add_dependency run ncurses-libs +Add_dependency build ncurses-devel diff --git a/srcpkgs/psmisc/template b/srcpkgs/psmisc/template index f0376ec89b..fad36d5b77 100644 --- a/srcpkgs/psmisc/template +++ b/srcpkgs/psmisc/template @@ -1,6 +1,7 @@ # Template file for 'psmisc' pkgname=psmisc version=22.13 +revision=1 distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure short_desc="Small set of utilities that use the linux proc filesystem" diff --git a/srcpkgs/python/python-devel.template b/srcpkgs/python/python-devel.template index f81dc3b110..787a3fd876 100644 --- a/srcpkgs/python/python-devel.template +++ b/srcpkgs/python/python-devel.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." +revision=1 + Add_dependency run libffi-devel Add_dependency run zlib-devel Add_dependency run readline-devel @@ -13,7 +15,7 @@ Add_dependency run gdbm-devel Add_dependency run openssl-devel Add_dependency run expat-devel Add_dependency run db-devel -Add_dependency run ncursesw-devel +Add_dependency run ncurses-devel Add_dependency run sqlite-devel Add_dependency run python diff --git a/srcpkgs/python/template b/srcpkgs/python/template index 7bde439775..b4cbd176a2 100644 --- a/srcpkgs/python/template +++ b/srcpkgs/python/template @@ -1,7 +1,7 @@ # Template build file for 'python'. pkgname=python version=2.7.1 -revision=1 +revision=2 wrksrc="Python-$version" distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.bz2" configure_args="--with-threads --enable-ipv6 --with-signal-module diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template index 0e0b1ffa3e..ac9d71421f 100644 --- a/srcpkgs/qemu/template +++ b/srcpkgs/qemu/template @@ -1,6 +1,7 @@ # Template file for 'qemu' pkgname=qemu _distver=0.14.0 +revision=1 #_patchver=rc1 #version=${_distver}${_patchver} #wrksrc=qemu-${_distver}-${_patchver} diff --git a/srcpkgs/readline/readline-devel.template b/srcpkgs/readline/readline-devel.template index 3b1fab8e5d..eed54dc04e 100644 --- a/srcpkgs/readline/readline-devel.template +++ b/srcpkgs/readline/readline-devel.template @@ -5,7 +5,8 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -Add_dependency run glibc-devel +revision=1 +Add_dependency run ncurses-devel Add_dependency run readline do_install() diff --git a/srcpkgs/readline/template b/srcpkgs/readline/template index 1570455c0c..f16424842c 100644 --- a/srcpkgs/readline/template +++ b/srcpkgs/readline/template @@ -4,6 +4,7 @@ _dist_ver=6.2 _patch_ver=000 #version=${_dist_ver}.${_patch_ver} version=${_dist_ver} +revision=1 wrksrc=${pkgname}-${_dist_ver} distfiles="http://ftp.gnu.org/gnu/readline/${pkgname}-${_dist_ver}.tar.gz" build_style=gnu_configure diff --git a/srcpkgs/ruby/ruby-devel.template b/srcpkgs/ruby/ruby-devel.template index 819bb83b36..3c1a065180 100644 --- a/srcpkgs/ruby/ruby-devel.template +++ b/srcpkgs/ruby/ruby-devel.template @@ -5,13 +5,14 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." +revision=1 + Add_dependency run db-devel Add_dependency run gdbm-devel Add_dependency run openssl-devel Add_dependency run zlib-devel Add_dependency run readline-devel Add_dependency run ncurses-devel -Add_dependency run ncursesw-devel Add_dependency run ruby do_install() diff --git a/srcpkgs/ruby/template b/srcpkgs/ruby/template index e487bed138..efeb1afb67 100644 --- a/srcpkgs/ruby/template +++ b/srcpkgs/ruby/template @@ -1,11 +1,12 @@ # Template build file for 'ruby'. pkgname=ruby -ruby_ver="1.9.2" -ruby_distpatchver="p180" -ruby_distver="${ruby_ver}-${ruby_distpatchver}" -version=${ruby_ver}${ruby_distpatchver} -wrksrc="${pkgname}-${ruby_distver}" -distfiles="ftp://ftp.ruby-lang.org/pub/ruby/1.9/$pkgname-${ruby_distver}.tar.gz" +_ruby_ver="1.9.2" +_ruby_distpatchver="p180" +_ruby_distver="${_ruby_ver}-${_ruby_distpatchver}" +revision=1 +version=${_ruby_ver}${_ruby_distpatchver} +wrksrc="${pkgname}-${_ruby_distver}" +distfiles="ftp://ftp.ruby-lang.org/pub/ruby/1.9/$pkgname-${_ruby_distver}.tar.gz" build_style=gnu_configure configure_args="--enable-shared --disable-rpath" short_desc="Ruby programming language" @@ -25,7 +26,7 @@ Add_dependency run gdbm Add_dependency run libssl Add_dependency run zlib Add_dependency run readline -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run libffi Add_dependency build db-devel @@ -33,7 +34,7 @@ Add_dependency build gdbm-devel Add_dependency build openssl-devel Add_dependency build zlib-devel Add_dependency build readline-devel -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel Add_dependency build libffi-devel Add_dependency build groff Add_dependency build doxygen diff --git a/srcpkgs/texinfo/template b/srcpkgs/texinfo/template index c73ead914c..0c808c34c0 100644 --- a/srcpkgs/texinfo/template +++ b/srcpkgs/texinfo/template @@ -1,7 +1,7 @@ # Template file for 'texinfo' pkgname=texinfo version=4.13a -revision=4 +revision=5 wrksrc="$pkgname-4.13" distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version.tar.gz" build_style=gnu_configure diff --git a/srcpkgs/tmux/template b/srcpkgs/tmux/template index ea15ebeb6b..ae1993f931 100644 --- a/srcpkgs/tmux/template +++ b/srcpkgs/tmux/template @@ -1,6 +1,7 @@ # Template file for 'tmux' pkgname=tmux version=1.4 +revision=1 distfiles="${SOURCEFORGE_SITE}/tmux/tmux-$version.tar.gz" build_style=custom-install short_desc="Terminal Multiplexer" @@ -13,14 +14,13 @@ long_desc=" the background, then later reattached." Add_dependency run glibc -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run libevent -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel Add_dependency build libevent-devel do_build() { - sed -i -e "s|-lncurses|-lncursesw|g" configure ./configure && make ${makejobs} PREFIX=/usr } diff --git a/srcpkgs/uml-utilities/template b/srcpkgs/uml-utilities/template index 63c8e39db2..32a89e856d 100644 --- a/srcpkgs/uml-utilities/template +++ b/srcpkgs/uml-utilities/template @@ -1,6 +1,7 @@ # Template file for 'uml-utilities' pkgname=uml-utilities version=20070815 +revision=1 wrksrc=tools-${version} distfiles="http://user-mode-linux.sourceforge.net/uml_utilities_${version}.tar.bz2" build_style=gnu_makefile diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template index c17fb70d29..9da675cd04 100644 --- a/srcpkgs/util-linux/template +++ b/srcpkgs/util-linux/template @@ -3,6 +3,7 @@ pkgname=util-linux _distver=2.19 #_patchver=rc3 version=${_distver}${_patchver} +revision=1 wrksrc=${pkgname}-${_distver} distfiles="${KERNEL_SITE}/utils/${pkgname}-ng/v${_distver}/${pkgname}-${_distver}.tar.bz2" build_style=gnu_configure @@ -28,12 +29,12 @@ Add_dependency run zlib Add_dependency run libuuid Add_dependency run libblkid Add_dependency run libmount -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run shadow Add_dependency build pkg-config Add_dependency build gettext Add_dependency build zlib-devel -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel post_configure() { diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template index ccea7627c4..46fb564c32 100644 --- a/srcpkgs/vim/template +++ b/srcpkgs/vim/template @@ -3,6 +3,7 @@ pkgname=vim _distver=7.3 _patchver=102 version=${_distver}.${_patchver} +revision=1 wrksrc=vim73 distfiles="ftp://ftp.vim.org/pub/vim/unix/$pkgname-${_distver}.tar.bz2" build_style=gnu_configure @@ -20,11 +21,11 @@ long_desc=" subpackages="vim-common" Add_dependency run glibc -Add_dependency run ncursesw +Add_dependency run ncurses-libs Add_dependency run acl Add_dependency run vim-common ">=${version}" Add_dependency build glibc-devel -Add_dependency build ncursesw-devel +Add_dependency build ncurses-devel Add_dependency build acl-devel pre_configure() diff --git a/srcpkgs/vte/template b/srcpkgs/vte/template index d701a05adf..3bd988d98f 100644 --- a/srcpkgs/vte/template +++ b/srcpkgs/vte/template @@ -1,6 +1,7 @@ # Template build file for 'vte'. pkgname=vte version=0.26.2 +revision=1 distfiles="${GNOME_SITE}/vte/0.26/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--localstatedir=/var" diff --git a/srcpkgs/vte/vte-devel.template b/srcpkgs/vte/vte-devel.template index c497504ec6..80c5be5b82 100644 --- a/srcpkgs/vte/vte-devel.template +++ b/srcpkgs/vte/vte-devel.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." +revision=1 + Add_dependency run pkg-config Add_dependency run intltool Add_dependency run gtk+-devel diff --git a/srcpkgs/vte/vte-python.template b/srcpkgs/vte/vte-python.template index f432a298be..5ea26dfa9e 100644 --- a/srcpkgs/vte/vte-python.template +++ b/srcpkgs/vte/vte-python.template @@ -5,6 +5,8 @@ long_desc="${long_desc} This package contains the Python bindings." +revision=1 + Add_dependency run glibc Add_dependency run ncurses-libs Add_dependency run python diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template index afcc0cea44..a2871c296e 100644 --- a/srcpkgs/xen/template +++ b/srcpkgs/xen/template @@ -1,7 +1,7 @@ # Template file for 'xen' pkgname=xen version=4.0.1 -revision=1 +revision=2 wrksrc=xen-${version} distfiles="http://bits.xensource.com/oss-xen/release/$version/xen-$version.tar.gz" build_style=custom-install diff --git a/srcpkgs/xen/xen-devel.template b/srcpkgs/xen/xen-devel.template index f7539d4033..80647b83ee 100644 --- a/srcpkgs/xen/xen-devel.template +++ b/srcpkgs/xen/xen-devel.template @@ -5,7 +5,7 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." -revision=1 +revision=2 Add_dependency run python-devel Add_dependency run e2fsprogs-devel diff --git a/srcpkgs/xterm/template b/srcpkgs/xterm/template index 01883c036b..a30646e7cc 100644 --- a/srcpkgs/xterm/template +++ b/srcpkgs/xterm/template @@ -1,6 +1,7 @@ # Template build file for 'xterm'. pkgname=xterm version=267 +revision=1 distfiles="ftp://invisible-island.net/xterm/$pkgname-$version.tgz" build_style=gnu_configure configure_args="--enable-wide-chars --enable-88-color --enable-broken-osc