summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/Python-3.1.2/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch225
-rw-r--r--patches/Python-3.1.2/0004--configure.in-printf-format-zd.patch51
-rw-r--r--patches/Python-3.1.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch72
-rw-r--r--patches/Python-3.1.2/0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch36
-rw-r--r--patches/Python-3.1.2/0007-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch36
-rw-r--r--patches/Python-3.1.2/0008-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch106
-rw-r--r--patches/Python-3.1.2/0009-fix-silent-flag.patch29
-rw-r--r--patches/Python-3.1.2/0010-use-PGEN_FOR_BUILD.patch34
-rw-r--r--patches/Python-3.1.2/0011-introduce-and-use-PYTHON_FOR_BUILD.patch181
-rw-r--r--patches/Python-3.1.2/0012-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch81
-rw-r--r--patches/Python-3.1.2/0013-setup.py-don-t-leak-host-path-into-cross-compilatio.patch85
-rw-r--r--patches/Python-3.1.2/0014-setup.py-skip-import-check-while-cross-compiling.patch28
-rw-r--r--patches/Python-3.1.2/0015-add-cross-compilation-support.patch142
-rw-r--r--patches/Python-3.1.2/0016-provide-wrapper-for-cross-python.patch46
-rw-r--r--patches/Python-3.1.2/0017-fix-for-new-autoconf.diff19
-rw-r--r--patches/Python-3.1.2/0018-dont-add-rpaths.diff24
-rw-r--r--patches/Python-3.1.2/0019-add-cache-for-sem-getvalue.diff44
-rwxr-xr-xpatches/Python-3.1.2/autogen.sh14
-rw-r--r--patches/Python-3.1.2/series19
-rw-r--r--patches/arora-0.10.2/fix-prefix.diff27
-rw-r--r--patches/arora-0.10.2/series1
-rw-r--r--patches/atop-1.24/fix-cross-compile.patch (renamed from patches/atop-1.23/fix-cross-compile.patch)13
-rw-r--r--patches/atop-1.24/series (renamed from patches/atop-1.23/series)0
-rw-r--r--patches/busybox-1.15.3/0001-init-make-FEATURE_EXTRA_QUIET-more-consistent.-1-b.patch37
-rw-r--r--patches/busybox-1.15.3/0001-init-revert-quiet-logic.patch30
-rw-r--r--patches/busybox-1.15.3/0003-fdisk_osf-silence-warning.patch33
-rw-r--r--patches/busybox-1.15.3/0004-sha1-silence-warning-on-big-endian-platforms.patch43
-rw-r--r--patches/busybox-1.15.3/0005-mkfs_vfat-silence-errors-on-BE-platforms.patch38
-rw-r--r--patches/busybox-1.15.3/0006-ifplugd-restore-auto-ifup-unless--a.patch205
-rw-r--r--patches/busybox-1.15.3/series7
-rw-r--r--patches/busybox-1.16.1/0001-reactivate-check-for-tty.patch (renamed from patches/busybox-1.15.3/0002-reactivate-check-for-tty.patch)6
-rw-r--r--patches/busybox-1.16.1/0002-silence-errors-on-BE-platforms.patch78
-rw-r--r--patches/busybox-1.16.1/series2
l---------patches/cgicc-3.2.9/autogen.sh (renamed from patches/confuse-2.6/autogen.sh)0
-rw-r--r--patches/confuse-2.6/confuse-2.6-werror.diff30
-rw-r--r--patches/confuse-2.6/fix-warning.diff466
-rw-r--r--patches/confuse-2.6/series2
-rw-r--r--patches/coreutils-8.2/coreutils.patch6934
-rw-r--r--patches/coreutils-8.2/series1
-rw-r--r--patches/coreutils-8.4/0001-tail-include-sys-vfs.h-if-possible-when-sys-statfs.h.patch30
-rw-r--r--patches/coreutils-8.4/0002-tail-HACK-touch-man-file-to-avoid-re-generation.patch26
-rw-r--r--patches/coreutils-8.4/series2
-rw-r--r--patches/curl-7.19.7/0001-don-t-include-LDFLAGS-int-pkg-config-libs.patch35
-rw-r--r--patches/curl-7.19.7/series2
-rw-r--r--patches/curl-7.20.0/0001-curl-config.in-add-SYSROOT-support.patch (renamed from patches/curl-7.19.7/0002-curl-config.in-add-SYSROOT-support.patch)9
-rw-r--r--patches/curl-7.20.0/series1
-rw-r--r--patches/dbus-1.2.24/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch (renamed from patches/dbus-1.2.16/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch)0
-rw-r--r--patches/dbus-1.2.24/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch (renamed from patches/dbus-1.2.16/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch)0
l---------patches/dbus-1.2.24/autogen.sh (renamed from patches/coreutils-8.2/autogen.sh)0
-rw-r--r--patches/dbus-1.2.24/make-pkgconfig-file-relocatable.diff39
-rw-r--r--patches/dbus-1.2.24/series (renamed from patches/dbus-1.2.16/series)1
-rw-r--r--patches/efax-0.9/efax-0.9-config.patch19
-rw-r--r--patches/efax-0.9/efax-0.9-manpage.patch11
-rw-r--r--patches/efax-0.9/efax-0.9-misc.patch10
-rw-r--r--patches/efax-0.9/efax-0.9-nullptr.patch19
-rw-r--r--patches/efax-0.9/efax-0.9-numlines.patch19
-rw-r--r--patches/efax-0.9/efax08a-time.patch8
-rw-r--r--patches/elfkickers-2.0a.orig/0001-01_add_toplevel_makefile.diff.patch26
-rw-r--r--patches/elfkickers-2.0a.orig/0002-02_update_subdirs_makefile.diff.patch82
-rw-r--r--patches/elfkickers-2.0a.orig/0003-03_add_include_string.h.diff.patch50
-rw-r--r--patches/elfkickers-2.0a.orig/0004-04_bsd_include_elf.h.diff.patch249
-rw-r--r--patches/elfkickers-2.0a.orig/0005-05_add_et_core_elfls.diff.patch24
-rw-r--r--patches/elfkickers-2.0a.orig/0006-mjn3-sstrip.patch729
-rw-r--r--patches/elfkickers-2.0a.orig/series6
-rw-r--r--patches/ethtool-6+20090323.orig/001_remove_support_for_rx_hashing_by_port.patch65
-rw-r--r--patches/ethtool-6+20090323.orig/002_update_ethtool-copy-h.patch210
-rw-r--r--patches/ethtool-6+20090323.orig/003_decode_port_other.patch23
-rw-r--r--patches/ethtool-6+20090323.orig/004_report_link_partner_advertising.patch85
-rw-r--r--patches/ethtool-6+20090323.orig/005_report_pause_autonegotiation_flags.patch33
-rw-r--r--patches/ethtool-6+20090323.orig/006_use_asm-types-h.patch26
l---------patches/ethtool-6+20090323.orig/autogen.sh1
-rw-r--r--patches/ethtool-6+20090323.orig/series10
-rw-r--r--patches/fakeroot-1.14.4/add-sysroot-prefix.diff34
-rw-r--r--patches/fakeroot-1.14.4/series1
-rw-r--r--patches/fbgrab-1.0/series1
-rw-r--r--patches/grub-0.97/series2
-rw-r--r--patches/ifplugd-0.28/series1
-rw-r--r--patches/insight-6.8-1/fix-destdir-handling.diff375
-rw-r--r--patches/insight-6.8-1/gdb-6.8-fix-compile-karmic.patch27
-rw-r--r--patches/insight-6.8-1/series2
-rw-r--r--patches/jed-0.99-19/series2
-rw-r--r--patches/libpcap-1.0.0/0002-compile-static-lib-without-fPIC.patch95
-rw-r--r--patches/libpcap-1.0.0/0003-creakte-hardlinks-with-force-during-install.patch57
-rw-r--r--patches/libpcap-1.0.0/0004-pcap-config-add-SYSROOT-support.patch30
-rw-r--r--patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch (renamed from patches/libpcap-1.0.0/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch)24
-rw-r--r--patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff34
-rw-r--r--patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch55
-rw-r--r--patches/libpcap-1.1.1/series (renamed from patches/libpcap-1.0.0/series)3
-rw-r--r--patches/logrotate-3.7.1/compressutime.patch14
-rw-r--r--patches/logrotate-3.7.1/configparse.patch12
-rw-r--r--patches/logrotate-3.7.1/cpp-crossbuild.patch10
-rw-r--r--patches/logrotate-3.7.1/datehack.patch10
-rw-r--r--patches/logrotate-3.7.1/deb-config-h.patch8
-rw-r--r--patches/logrotate-3.7.1/deb-taboos.patch8
-rw-r--r--patches/logrotate-3.7.1/dst.patch10
-rw-r--r--patches/logrotate-3.7.1/man-189243.patch14
-rw-r--r--patches/logrotate-3.7.1/man-333996.patch18
-rw-r--r--patches/logrotate-3.7.1/man-lastaction.patch10
-rw-r--r--patches/logrotate-3.7.1/man-mailtypo.patch10
-rw-r--r--patches/logrotate-3.7.1/man-overriden.patch10
-rw-r--r--patches/logrotate-3.7.1/man-rh-1.patch16
-rw-r--r--patches/logrotate-3.7.1/man-sizetypo.patch12
-rw-r--r--patches/logrotate-3.7.1/man-startcount.patch10
-rw-r--r--patches/logrotate-3.7.1/manpage.patch46
-rw-r--r--patches/logrotate-3.7.1/ptx-timeext.patch31
-rw-r--r--patches/logrotate-3.7.1/rh-dateext.patch47
-rw-r--r--patches/logrotate-3.7.1/rh-maxage.patch35
-rw-r--r--patches/logrotate-3.7.1/rh-noTMPDIR.patch12
-rw-r--r--patches/logrotate-3.7.1/rh-selinux.patch16
-rw-r--r--patches/logrotate-3.7.1/script-argument.patch10
-rw-r--r--patches/logrotate-3.7.1/scripterrors.patch12
-rw-r--r--patches/logrotate-3.7.1/taboo-to-debug.patch10
-rw-r--r--patches/logrotate-3.7.1/uncompressChild-warning.patch10
-rw-r--r--patches/memtest-0.0.4/series1
-rw-r--r--patches/procps-3.2.8/0001-slabtop_once.patch125
-rw-r--r--patches/procps-3.2.8/0002-free.1.patch112
-rw-r--r--patches/procps-3.2.8/0003-output_sort_time.patch (renamed from patches/procps-3.2.8/10_output_sort_time.dpatch)41
-rw-r--r--patches/procps-3.2.8/0004-pmap.1.patch (renamed from patches/procps-3.2.8/10_pmap.1.dpatch)25
-rw-r--r--patches/procps-3.2.8/0005-10_ps.1.patch (renamed from patches/procps-3.2.8/10_ps.1.dpatch)48
-rw-r--r--patches/procps-3.2.8/0006-skill.1.patch (renamed from patches/procps-3.2.8/10_skill.1.dpatch)31
-rw-r--r--patches/procps-3.2.8/0007-skill_perror.patch25
-rw-r--r--patches/procps-3.2.8/0008-slabtop_1.patch (renamed from patches/procps-3.2.8/10_slabtop.dpatch)37
-rw-r--r--patches/procps-3.2.8/0009-sysctl.8.patch (renamed from patches/procps-3.2.8/10_sysctl.8.dpatch)34
-rw-r--r--patches/procps-3.2.8/0010-sysctl_options.patch (renamed from patches/procps-3.2.8/10_sysctl_options.dpatch)33
-rw-r--r--patches/procps-3.2.8/0011-tload.1.patch26
-rw-r--r--patches/procps-3.2.8/0012-top_irix.patch (renamed from patches/procps-3.2.8/10_top_irix.dpatch)33
-rw-r--r--patches/procps-3.2.8/0013-top_no_openproc.patch30
-rw-r--r--patches/procps-3.2.8/0014-top_stdin_eof.patch (renamed from patches/procps-3.2.8/10_top_stdineof.dpatch)27
-rw-r--r--patches/procps-3.2.8/0015-top_uid_length.patch (renamed from patches/procps-3.2.8/10_top_uid_length.dpatch)27
-rw-r--r--patches/procps-3.2.8/0016-uptime.1.patch (renamed from patches/procps-3.2.8/10_uptime.1.dpatch)33
-rw-r--r--patches/procps-3.2.8/0017-vmstat.8.patch (renamed from patches/procps-3.2.8/10_vmstat.8.dpatch)46
-rw-r--r--patches/procps-3.2.8/0018-watch.1.patch (renamed from patches/procps-3.2.8/10_watch.1.dpatch)28
-rw-r--r--patches/procps-3.2.8/0019-w_time.patch26
-rw-r--r--patches/procps-3.2.8/0020-kill.1.patch (renamed from patches/procps-3.2.8/20_kill.1.dpatch)50
-rw-r--r--patches/procps-3.2.8/0021-kill_warncr.patch (renamed from patches/procps-3.2.8/20_kill_warncr.dpatch)29
-rw-r--r--patches/procps-3.2.8/0022-module_mk_shared.patch26
-rw-r--r--patches/procps-3.2.8/0023-sysinfo_elfnote.patch32
-rw-r--r--patches/procps-3.2.8/0024-top.1.patch (renamed from patches/procps-3.2.8/20_top_manpage.dpatch)103
-rw-r--r--patches/procps-3.2.8/0025-top_c_resize.patch (renamed from patches/procps-3.2.8/20_top_c_resize.dpatch)43
-rw-r--r--patches/procps-3.2.8/0026-w-bassman.patch (renamed from patches/procps-3.2.8/20_w-bassman.dpatch)46
-rw-r--r--patches/procps-3.2.8/0027-top.1_cpustates.patch (renamed from patches/procps-3.2.8/30_top.1_cpustate.dpatch)29
-rw-r--r--patches/procps-3.2.8/0028-watch_8bitchar.patch26
-rw-r--r--patches/procps-3.2.8/0029-library_map_freeproc.patch26
-rw-r--r--patches/procps-3.2.8/0030-pgrep_start_time.patch27
-rw-r--r--patches/procps-3.2.8/0031-readproc_c.patch35
-rw-r--r--patches/procps-3.2.8/0032-sysinfo_7_numbers.patch (renamed from patches/procps-3.2.8/30_sysinfo_7numbers.dpatch)27
-rw-r--r--patches/procps-3.2.8/0033-tload_no_optargs.patch27
-rw-r--r--patches/procps-3.2.8/0034-w.1.patch (renamed from patches/procps-3.2.8/30_w.1.dpatch)35
-rw-r--r--patches/procps-3.2.8/0035-w_columns.patch41
-rw-r--r--patches/procps-3.2.8/0036-watch_exec_beep.patch (renamed from patches/procps-3.2.8/30_watch_exec_beep.dpatch)68
-rw-r--r--patches/procps-3.2.8/0037-path_max.patch (renamed from patches/procps-3.2.8/35_path_max.dpatch)48
-rw-r--r--patches/procps-3.2.8/0038-w_envlength.patch183
-rw-r--r--patches/procps-3.2.8/0039-gnu-kbsd-version.patch (renamed from patches/procps-3.2.8/40_gnu-kbsd-version.dpatch)27
-rw-r--r--patches/procps-3.2.8/0040-pgrep_c_option.patch (renamed from patches/procps-3.2.8/40_pgrep_coption.dpatch)45
-rw-r--r--patches/procps-3.2.8/0041-ps_cgroup_display.patch (renamed from patches/procps-3.2.8/40_ps_cgroup_display.dpatch)79
-rw-r--r--patches/procps-3.2.8/0042-watch_precision_time.patch (renamed from patches/procps-3.2.8/40_watch_precision_time.dpatch)67
-rw-r--r--patches/procps-3.2.8/0043-watch_unicode.patch311
-rw-r--r--patches/procps-3.2.8/0044-complain_unmounted_proc.patch29
-rw-r--r--patches/procps-3.2.8/0045-ps_supgid_display.patch475
-rw-r--r--patches/procps-3.2.8/0046-makefile_dev_null.patch25
-rw-r--r--patches/procps-3.2.8/0047-pgrep.1.patch (renamed from patches/procps-3.2.8/50_pgrep.1.dpatch)49
-rw-r--r--patches/procps-3.2.8/0048-ps_size_sz.patch40
-rw-r--r--patches/procps-3.2.8/0049-top_mintime.patch27
-rw-r--r--patches/procps-3.2.8/0050-vmstat_headers.patch (renamed from patches/procps-3.2.8/50_vmstat_headers.dpatch)40
-rw-r--r--patches/procps-3.2.8/0051-pgrep_usage_exitcode.patch26
-rw-r--r--patches/procps-3.2.8/0052-ps_1_options.patch557
-rw-r--r--patches/procps-3.2.8/0053-top_highlight.patch (renamed from patches/procps-3.2.8/55_top_highlight.dpatch)27
-rw-r--r--patches/procps-3.2.8/0054-top_nohz.patch25
-rw-r--r--patches/procps-3.2.8/0055-vmstat_part_format.patch (renamed from patches/procps-3.2.8/65_fix_partition_format.dpatch)53
-rw-r--r--patches/procps-3.2.8/0056-readproc_double_free.patch32
-rw-r--r--patches/procps-3.2.8/0057-vmstat_units.patch70
-rw-r--r--patches/procps-3.2.8/0058-skill_null_argv.patch25
-rw-r--r--patches/procps-3.2.8/0059-skill_multiarg.patch25
-rw-r--r--patches/procps-3.2.8/0060-proc_version_constructor.patch52
-rw-r--r--patches/procps-3.2.8/0061-pmaps_smaps.patch150
-rw-r--r--patches/procps-3.2.8/0062-top_numeric_args.patch109
-rw-r--r--patches/procps-3.2.8/0063-top_1_swap.patch34
-rw-r--r--patches/procps-3.2.8/0064-w_userproc.patch25
-rw-r--r--patches/procps-3.2.8/0065-sysinfo_kfreebsd_hertz.patch31
-rw-r--r--patches/procps-3.2.8/0066-ps_1_flt_output.patch40
-rw-r--r--patches/procps-3.2.8/0067-watch_ansi_colour.patch193
-rw-r--r--patches/procps-3.2.8/0068-top_username_parse.patch25
-rw-r--r--patches/procps-3.2.8/0069-don-t-install-stuff-that-was-not-built.patch (renamed from patches/procps-3.2.8/fix-install.diff)15
-rw-r--r--patches/procps-3.2.8/0070-remove-frename-registers-option-due-to-ICE-on-gcc-4..patch25
-rw-r--r--patches/procps-3.2.8/10_free.1.dpatch66
-rw-r--r--patches/procps-3.2.8/10_skill_perror.dpatch18
-rw-r--r--patches/procps-3.2.8/10_tload.1.dpatch19
-rw-r--r--patches/procps-3.2.8/10_top_no_openproc.dpatch23
-rw-r--r--patches/procps-3.2.8/10_w_time.dpatch19
-rw-r--r--patches/procps-3.2.8/20_Makefile_lib64.dpatch53
-rw-r--r--patches/procps-3.2.8/20_module_mk_shared.dpatch36
-rw-r--r--patches/procps-3.2.8/20_sysinfo_c.dpatch25
-rw-r--r--patches/procps-3.2.8/20_watch_8bitchar.dpatch19
-rw-r--r--patches/procps-3.2.8/30_library_map_freeproc.dpatch35
-rw-r--r--patches/procps-3.2.8/30_pgrep_start_time.dpatch36
-rw-r--r--patches/procps-3.2.8/30_readproc_c.dpatch45
-rw-r--r--patches/procps-3.2.8/30_tload_no_optargs.dpatch36
-rw-r--r--patches/procps-3.2.8/30_w-columns.dpatch34
-rw-r--r--patches/procps-3.2.8/45_proc_complain_unmounted_proc.dpatch21
-rw-r--r--patches/procps-3.2.8/50_dev_null_makefile_fix.dpatch19
-rw-r--r--patches/procps-3.2.8/50_top_mintime.dpatch20
-rw-r--r--patches/procps-3.2.8/55_pgrep_usage_exitcode.dpatch17
-rw-r--r--patches/procps-3.2.8/60_top_nohz.dpatch18
-rw-r--r--patches/procps-3.2.8/README8
-rw-r--r--patches/procps-3.2.8/fix-unknown-HZ-arm-diff38
-rw-r--r--patches/procps-3.2.8/remove-rename-registers.diff23
-rw-r--r--patches/procps-3.2.8/series122
l---------patches/pure-ftpd-1.0.28/autogen.sh1
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-getgroups-cacheable.diff50
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-md5-cacheable.diff51
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-realpath-cacheable.diff55
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-remove-includes.diff63
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-sha1-cacheable.diff51
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-snprintf-cacheable.diff49
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac-virtuozzo-cacheable.diff43
-rw-r--r--patches/pure-ftpd-1.0.28/configure_ac_remove-fssa.diff25
-rw-r--r--patches/pure-ftpd-1.0.28/series8
-rw-r--r--patches/qt-embedded-linux-opensource-src-4.5.3/fix-host-zlib.diff35
-rw-r--r--patches/qt-embedded-linux-opensource-src-4.5.3/series1
-rw-r--r--patches/squashfs3.4/series1
-rw-r--r--patches/squashfs3.4/squashfs_libs.diff34
-rw-r--r--patches/squashfs4.0/series1
-rw-r--r--patches/squashfs4.0/squashfs_libs.diff34
-rw-r--r--patches/sudo-1.7.2p6/0001-install-sh-disable-stripping.patch (renamed from patches/sudo-1.6.9/0001-install-sh-disable-stripping.patch)0
-rw-r--r--patches/sudo-1.7.2p6/series (renamed from patches/sudo-1.6.9/series)0
-rw-r--r--patches/syslinux-3.86/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch (renamed from patches/syslinux-3.84/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch)15
-rw-r--r--patches/syslinux-3.86/series (renamed from patches/syslinux-3.84/series)0
-rw-r--r--patches/tcp_wrappers_7.6/series2
-rw-r--r--patches/tcp_wrappers_7.6/tcp_wrappers-7.6-gcc34-1.patch14
-rw-r--r--patches/tcp_wrappers_7.6/tcp_wrappers_7.6-ptx1.diff23
-rw-r--r--patches/tcpdump-4.0.0/0001-Propagate-from-the-git-tree.patch35
-rw-r--r--patches/tcpdump-4.0.0/series1
-rw-r--r--patches/udev-150/0001-Use-utimensat-instead-of-utimes-and-lutimes.patch35
-rw-r--r--patches/udev-150/series1
-rw-r--r--patches/udev-150/udev-150-split-extras.diff28
l---------patches/udisks-1.0.0/autogen.sh (renamed from patches/dbus-1.2.16/autogen.sh)0
-rw-r--r--patches/udisks-1.0.0/devmapper-optional.diff58
-rw-r--r--patches/udisks-1.0.0/libparted-optional.diff90
-rw-r--r--patches/udisks-1.0.0/libsgutils-optional.diff68
-rw-r--r--patches/udisks-1.0.0/series4
-rw-r--r--patches/udisks-1.0.0/smart-optional.diff415
-rw-r--r--patches/util-linux-ng-2.17.2/0001-replace-bzero-with-memset.patch38
-rw-r--r--patches/util-linux-ng-2.17.2/series1
-rw-r--r--patches/watchdog-5.7/0001-Fix-compile-with-USE_SYSLOG-disabled.patch30
-rw-r--r--patches/watchdog-5.7/0002-Replace-index-with-strchr.patch52
-rw-r--r--patches/watchdog-5.7/series2
-rwxr-xr-xpatches/wxGTK-2.8.10/autogen.sh4
-rw-r--r--patches/wxGTK-2.8.10/fix-cross-compiling.diff61
-rw-r--r--patches/wxGTK-2.8.10/fix-gsocket-name-clash.diff29
-rw-r--r--patches/wxGTK-2.8.10/series2
-rw-r--r--patches/xf86-video-fbdev-0.4.1/series1
251 files changed, 8965 insertions, 3057 deletions
diff --git a/patches/Python-3.1.2/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch b/patches/Python-3.1.2/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
new file mode 100644
index 000000000..c0f06fd94
--- /dev/null
+++ b/patches/Python-3.1.2/0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
@@ -0,0 +1,225 @@
+From 7f8972018c739fedf709f6d25405fa5505d226c7 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 5 May 2009 15:17:20 +0200
+Subject: [PATCH] Add support for socketcan to the python socket module
+
+This patch add support for the protocol family AF_CAN. It contains all the
+necessary code to use the python socket module for socketcan.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Lib/plat-linux2/IN.py | 2 +
+ Modules/socketmodule.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++
+ Modules/socketmodule.h | 11 ++++++
+ configure.in | 13 +++++++
+ 4 files changed, 115 insertions(+)
+
+Index: b/Lib/plat-linux2/IN.py
+===================================================================
+--- a/Lib/plat-linux2/IN.py
++++ b/Lib/plat-linux2/IN.py
+@@ -384,6 +384,7 @@ PF_SNA = 22
+ PF_IRDA = 23
+ PF_PPPOX = 24
+ PF_WANPIPE = 25
++PF_CAN = 29
+ PF_BLUETOOTH = 31
+ PF_MAX = 32
+ AF_UNSPEC = PF_UNSPEC
+@@ -414,6 +415,7 @@ AF_SNA = PF_SNA
+ AF_IRDA = PF_IRDA
+ AF_PPPOX = PF_PPPOX
+ AF_WANPIPE = PF_WANPIPE
++AF_CAN = PF_CAN
+ AF_BLUETOOTH = PF_BLUETOOTH
+ AF_MAX = PF_MAX
+ SOL_RAW = 255
+Index: b/Modules/socketmodule.c
+===================================================================
+--- a/Modules/socketmodule.c
++++ b/Modules/socketmodule.c
+@@ -420,6 +420,10 @@ dup_socket(SOCKET handle)
+
+ #define SAS2SA(x) ((struct sockaddr *)(x))
+
++#ifdef ENABLE_CAN
++#include <linux/can/raw.h>
++#endif
++
+ /*
+ * Constants for getnameinfo()
+ */
+@@ -1005,6 +1009,22 @@ makesockaddr(int sockfd, struct sockaddr
+ }
+ #endif
+
++#ifdef ENABLE_CAN
++ case AF_CAN:
++ {
++ struct sockaddr_can *a = (struct sockaddr_can *)addr;
++ char *ifname = "";
++ struct ifreq ifr;
++ /* need to look up interface name give index */
++ if (a->can_ifindex) {
++ ifr.ifr_ifindex = a->can_ifindex;
++ if (ioctl(sockfd, SIOCGIFNAME, &ifr) == 0)
++ ifname = ifr.ifr_name;
++ }
++ return Py_BuildValue("s", ifname);
++ }
++#endif
++
+ #ifdef USE_BLUETOOTH
+ case AF_BLUETOOTH:
+ switch (proto) {
+@@ -1280,6 +1300,28 @@ getsockaddrarg(PySocketSockObject *s, Py
+ }
+ #endif
+
++#ifdef ENABLE_CAN
++ case AF_CAN:
++ {
++ struct sockaddr_can* addr;
++ struct ifreq ifr;
++ char *interfaceName;
++ addr = (struct sockaddr_can*)addr_ret;
++ if (!PyArg_Parse(args, "s", &interfaceName))
++ return 0;
++ strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
++ ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
++ if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
++ s->errorhandler();
++ return 0;
++ }
++ addr->can_family = AF_CAN;
++ addr->can_ifindex = ifr.ifr_ifindex;
++ *len_ret = sizeof *addr;
++ return 1;
++ }
++#endif
++
+ #ifdef USE_BLUETOOTH
+ case AF_BLUETOOTH:
+ {
+@@ -1516,6 +1558,14 @@ getsockaddrlen(PySocketSockObject *s, so
+ }
+ #endif
+
++#ifdef ENABLE_CAN
++ case AF_CAN:
++ {
++ *len_ret = sizeof (struct sockaddr_can);
++ return 1;
++ }
++#endif
++
+ #ifdef USE_BLUETOOTH
+ case AF_BLUETOOTH:
+ {
+@@ -4379,6 +4429,10 @@ PyInit__socket(void)
+ PyModule_AddIntConstant(m, "AF_LLC", AF_LLC);
+ #endif
+
++#ifdef ENABLE_CAN
++ PyModule_AddIntConstant(m, "AF_CAN", AF_CAN);
++#endif
++
+ #ifdef USE_BLUETOOTH
+ PyModule_AddIntConstant(m, "AF_BLUETOOTH", AF_BLUETOOTH);
+ PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
+@@ -4710,6 +4764,41 @@ PyInit__socket(void)
+ PyModule_AddIntConstant(m, "IPPROTO_MAX", IPPROTO_MAX);
+ #endif
+
++#ifdef CAN_RAW
++ PyModule_AddIntConstant(m, "CAN_RAW", CAN_RAW);
++#endif
++#ifdef CAN_BCM
++ PyModule_AddIntConstant(m, "CAN_BCM", CAN_BCM);
++#endif
++#ifdef CAN_TP16
++ PyModule_AddIntConstant(m, "CAN_TP16", CAN_TP16);
++#endif
++#ifdef CAN_TP20
++ PyModule_AddIntConstant(m, "CAN_TP20", CAN_TP20);
++#endif
++#ifdef CAN_MCNET
++ PyModule_AddIntConstant(m, "CAN_MCNET", CAN_MCNET);
++#endif
++#ifdef CAN_ISOTP
++ PyModule_AddIntConstant(m, "CAN_ISOTP", CAN_ISOTP);
++#endif
++#ifdef CAN_NPROTO
++ PyModule_AddIntConstant(m, "CAN_NPROTO", CAN_NPROTO);
++#endif
++
++#ifdef SOL_CAN_BASE
++ PyModule_AddIntConstant(m, "SOL_CAN_BASE", SOL_CAN_BASE);
++#endif
++#ifdef SOL_CAN_RAW
++ PyModule_AddIntConstant(m, "SOL_CAN_RAW", SOL_CAN_RAW);
++#endif
++#ifdef ENABLE_CAN
++ PyModule_AddIntConstant(m, "CAN_RAW_FILTER", CAN_RAW_FILTER);
++ PyModule_AddIntConstant(m, "CAN_RAW_ERR_FILTER", CAN_RAW_ERR_FILTER);
++ PyModule_AddIntConstant(m, "CAN_RAW_LOOPBACK", CAN_RAW_LOOPBACK);
++ PyModule_AddIntConstant(m, "CAN_RAW_RECV_OWN_MSGS", CAN_RAW_RECV_OWN_MSGS);
++#endif
++
+ /* Some port configuration */
+ #ifdef IPPORT_RESERVED
+ PyModule_AddIntConstant(m, "IPPORT_RESERVED", IPPORT_RESERVED);
+Index: b/Modules/socketmodule.h
+===================================================================
+--- a/Modules/socketmodule.h
++++ b/Modules/socketmodule.h
+@@ -55,6 +55,14 @@ typedef int socklen_t;
+ #include <bluetooth/hci.h>
+ #endif
+
++#define AF_CAN 29
++#define PF_CAN AF_CAN
++
++#ifdef HAVE_LINUX_CAN_H
++#define ENABLE_CAN 1
++#include <linux/can.h>
++#endif
++
+ #ifdef HAVE_BLUETOOTH_H
+ #include <bluetooth.h>
+ #endif
+@@ -106,6 +114,9 @@ typedef union sock_addr {
+ struct sockaddr_in6 in6;
+ struct sockaddr_storage storage;
+ #endif
++#ifdef ENABLE_CAN
++ struct sockaddr_can can;
++#endif
+ #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
+ struct sockaddr_l2 bt_l2;
+ struct sockaddr_rc bt_rc;
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1296,6 +1296,19 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[
+ #endif
+ ])
+
++AC_CHECK_HEADERS(linux/can.h,[],[],[#include <sys/socket.h>])
++# check for AF_CAN
++AC_TRY_COMPILE(
++ [[#include <sys/socket.h>
++ int domain = AF_CAN;]],
++ [[socket(domain, 0, 0);]],
++ [],
++ [
++ AC_DEFINE(AF_CAN, 29, [Define AF_CAN if not defined by sys/socket.h])
++ AC_DEFINE(PF_CAN, 29, [Define PF_CAN if not defined by sys/socket.h])
++ ]
++)
++
+ # checks for typedefs
+ was_it_defined=no
+ AC_MSG_CHECKING(for clock_t in time.h)
diff --git a/patches/Python-3.1.2/0004--configure.in-printf-format-zd.patch b/patches/Python-3.1.2/0004--configure.in-printf-format-zd.patch
new file mode 100644
index 000000000..645f1d76e
--- /dev/null
+++ b/patches/Python-3.1.2/0004--configure.in-printf-format-zd.patch
@@ -0,0 +1,51 @@
+From 44a7b5cd5bca0d11b785d917a842d6436f6ad19f Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Thu, 23 Apr 2009 08:49:08 +0200
+Subject: [PATCH] [configure.in] printf format %zd
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -3955,7 +3955,8 @@ else
+ fi
+
+ AC_MSG_CHECKING(for %zd printf() format support)
+-AC_TRY_RUN([#include <stdio.h>
++AC_CACHE_VAL([ac_cv_py_format_size_t],[
++ AC_RUN_IFELSE([#include <stdio.h>
+ #include <stddef.h>
+ #include <string.h>
+
+@@ -3989,9 +3990,23 @@ int main()
+
+ return 0;
+ }],
+-[AC_MSG_RESULT(yes)
+- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
+- AC_MSG_RESULT(no))
++ [ac_cv_py_format_size_t=yes],
++ [ac_cv_py_format_size_t=no],
++ [ac_cv_py_format_size_t=cross],
++)])
++
++case "${ac_cv_py_format_size_t}" in
++yes)
++ AC_MSG_RESULT([yes])
++ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
++ ;;
++no)
++ AC_MSG_RESULT([no])
++ ;;
++*)
++ AC_MSG_ERROR([cross compiling - please ac_cv_py_format_size_t to yes (for working %zd printf() format support) or no])
++ ;;
++esac
+
+ AC_CHECK_TYPE(socklen_t,,
+ AC_DEFINE(socklen_t,int,
diff --git a/patches/Python-3.1.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch b/patches/Python-3.1.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
new file mode 100644
index 000000000..dfb0b0142
--- /dev/null
+++ b/patches/Python-3.1.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
@@ -0,0 +1,72 @@
+From b03b879f2f107c3f0e55720b31fc87fb02ec2884 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 18:35:19 +0200
+Subject: [PATCH] use AC_COMPILE_IFELSE rather than AC_TRY_RUN
+
+AC_TRY_RUN relys on executing the test, not working while cross
+compiling. Thus a hard wired value for the cross compilation must and is
+used.
+
+Switching to AC_COMPILE_IFELSE just tries to compile the test program
+which has the save effect and works even in the cross compiling
+scenario.
+
+This patch uses AC_COMPILE_IFELSE for these tests:
+"--enable-profiling, enable C-level code profiling"
+"whether $CC accepts -fno-strict-aliasing"
+"whether $CC accepts -OPT:Olimit=0"
+"whether $CC accepts -Olimit 1500"
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -665,9 +665,8 @@ AC_ARG_ENABLE(profiling,
+ AC_HELP_STRING(--enable-profiling, enable C-level code profiling),
+ [ac_save_cc="$CC"
+ CC="$CC -pg"
+- AC_TRY_RUN([int main() { return 0; }],
++ AC_COMPILE_IFELSE([int main() { return 0; }],
+ ac_enable_profiling="yes",
+- ac_enable_profiling="no",
+ ac_enable_profiling="no")
+ CC="$ac_save_cc"])
+ AC_MSG_RESULT($ac_enable_profiling)
+@@ -884,9 +883,8 @@ yes)
+ AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
+ ac_save_cc="$CC"
+ CC="$CC -fno-strict-aliasing"
+- AC_TRY_RUN([int main() { return 0; }],
++ AC_COMPILE_IFELSE([int main() { return 0; }],
+ ac_cv_no_strict_aliasing_ok=yes,
+- ac_cv_no_strict_aliasing_ok=no,
+ ac_cv_no_strict_aliasing_ok=no)
+ CC="$ac_save_cc"
+ AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
+@@ -1039,9 +1037,8 @@ AC_MSG_CHECKING(whether $CC accepts -OPT
+ AC_CACHE_VAL(ac_cv_opt_olimit_ok,
+ [ac_save_cc="$CC"
+ CC="$CC -OPT:Olimit=0"
+-AC_TRY_RUN([int main() { return 0; }],
++AC_COMPILE_IFELSE([int main() { return 0; }],
+ ac_cv_opt_olimit_ok=yes,
+- ac_cv_opt_olimit_ok=no,
+ ac_cv_opt_olimit_ok=no)
+ CC="$ac_save_cc"])
+ AC_MSG_RESULT($ac_cv_opt_olimit_ok)
+@@ -1061,9 +1058,8 @@ else
+ AC_CACHE_VAL(ac_cv_olimit_ok,
+ [ac_save_cc="$CC"
+ CC="$CC -Olimit 1500"
+- AC_TRY_RUN([int main() { return 0; }],
++ AC_COMPILE_IFELSE([int main() { return 0; }],
+ ac_cv_olimit_ok=yes,
+- ac_cv_olimit_ok=no,
+ ac_cv_olimit_ok=no)
+ CC="$ac_save_cc"])
+ AC_MSG_RESULT($ac_cv_olimit_ok)
diff --git a/patches/Python-3.1.2/0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch b/patches/Python-3.1.2/0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
new file mode 100644
index 000000000..b98bce9e7
--- /dev/null
+++ b/patches/Python-3.1.2/0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
@@ -0,0 +1,36 @@
+From ba932c009e8fc45e23efe1dfbc0f179c40af6923 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 18:44:11 +0200
+Subject: [PATCH] use AC_CHECK_SIZEOF rather than AC_TRY_COMPILE for long long detection
+
+AC_CHECK_SIZEOF does first detect if the type is available and detects
+its size. Use it, rather than hand crafted function with AC_TRY_COMPILE.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1398,15 +1398,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
+ AC_CHECK_SIZEOF(size_t, 4)
+ AC_CHECK_SIZEOF(pid_t, 4)
+
+-AC_MSG_CHECKING(for long long support)
+-have_long_long=no
+-AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
+- AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+- have_long_long=yes
+-])
+-AC_MSG_RESULT($have_long_long)
+-if test "$have_long_long" = yes ; then
+-AC_CHECK_SIZEOF(long long, 8)
++AC_CHECK_SIZEOF(long long)
++if test "$ac_cv_type_long_long" = "yes" ; then
++ AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ fi
+
+ AC_MSG_CHECKING(for long double support)
diff --git a/patches/Python-3.1.2/0007-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch b/patches/Python-3.1.2/0007-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
new file mode 100644
index 000000000..f9c76893b
--- /dev/null
+++ b/patches/Python-3.1.2/0007-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
@@ -0,0 +1,36 @@
+From e8684e66c22ce7463c86fb2c6b48451988769721 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 18:47:19 +0200
+Subject: [PATCH] use AC_TYPE_LONG_DOUBLE to detect long double support
+
+use the correct AC_TYPE_LONG_DOUBLE function rahter than hand crafted
+test to detect long double support.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1403,16 +1403,8 @@ if test "$ac_cv_type_long_long" = "yes"
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ fi
+
+-AC_MSG_CHECKING(for long double support)
+-have_long_double=no
+-AC_TRY_COMPILE([], [long double x; x = (long double)0;], [
+- AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
+- have_long_double=yes
+-])
+-AC_MSG_RESULT($have_long_double)
+-if test "$have_long_double" = yes ; then
+-AC_CHECK_SIZEOF(long double, 16)
+-fi
++AC_TYPE_LONG_DOUBLE
++AC_CHECK_SIZEOF(long double)
+
+
+ AC_MSG_CHECKING(for _Bool support)
diff --git a/patches/Python-3.1.2/0008-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch b/patches/Python-3.1.2/0008-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
new file mode 100644
index 000000000..7afd2cd49
--- /dev/null
+++ b/patches/Python-3.1.2/0008-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
@@ -0,0 +1,106 @@
+From 648a7538c36f67696d88ee99ddccc2bc78a1ef75 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 24 Apr 2009 19:10:14 +0200
+Subject: [PATCH] use AC_CHECK_SIZEOF rather than handcrafted test with AC_TRY_RUN
+
+AC_TRY_RUN doesn't work in the cross compilation scenario. Recent
+versions of autoconf support AC_CHECK_SIZEOF even while cross compiling.
+
+This patch converts the following tests to AC_CHECK_SIZEOF:
+- off_t
+- time_t
+- pthread_t
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 58 ++++------------------------------------------------------
+ 1 file changed, 4 insertions(+), 54 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1425,23 +1425,9 @@ AC_CHECK_TYPES(uintptr_t,
+ #endif])
+
+
+-# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
+-AC_MSG_CHECKING(size of off_t)
+-AC_CACHE_VAL(ac_cv_sizeof_off_t,
+-[AC_TRY_RUN([#include <stdio.h>
++AC_CHECK_SIZEOF([off_t],[],[
+ #include <sys/types.h>
+-main()
+-{
+- FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof(off_t));
+- exit(0);
+-}],
+-ac_cv_sizeof_off_t=`cat conftestval`,
+-ac_cv_sizeof_off_t=0,
+-ac_cv_sizeof_off_t=4)
+ ])
+-AC_MSG_RESULT($ac_cv_sizeof_off_t)
+ AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
+ [The number of bytes in an off_t.])
+
+@@ -1464,22 +1450,9 @@ else
+ fi
+
+ # AC_CHECK_SIZEOF() doesn't include <time.h>.
+-AC_MSG_CHECKING(size of time_t)
+-AC_CACHE_VAL(ac_cv_sizeof_time_t,
+-[AC_TRY_RUN([#include <stdio.h>
++AC_CHECK_SIZEOF([time_t],[],[
+ #include <time.h>
+-main()
+-{
+- FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof(time_t));
+- exit(0);
+-}],
+-ac_cv_sizeof_time_t=`cat conftestval`,
+-ac_cv_sizeof_time_t=0,
+-ac_cv_sizeof_time_t=4)
+ ])
+-AC_MSG_RESULT($ac_cv_sizeof_time_t)
+ AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t,
+ [The number of bytes in a time_t.])
+
+@@ -1493,32 +1466,9 @@ then CC="$CC -Kthread"
+ elif test "$ac_cv_pthread" = "yes"
+ then CC="$CC -pthread"
+ fi
+-AC_MSG_CHECKING(for pthread_t)
+-have_pthread_t=no
+-AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
+-AC_MSG_RESULT($have_pthread_t)
+-if test "$have_pthread_t" = yes ; then
+- # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
+- AC_MSG_CHECKING(size of pthread_t)
+- AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
+- [AC_TRY_RUN([#include <stdio.h>
++AC_CHECK_SIZEOF([pthread_t],[],[
+ #include <pthread.h>
+- main()
+- {
+- FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof(pthread_t));
+- exit(0);
+- }],
+- ac_cv_sizeof_pthread_t=`cat conftestval`,
+- ac_cv_sizeof_pthread_t=0,
+- ac_cv_sizeof_pthread_t=4)
+- ])
+- AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
+- AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
+- [The number of bytes in a pthread_t.])
+-fi
+-CC="$ac_save_cc"
++])
+
+
+
diff --git a/patches/Python-3.1.2/0009-fix-silent-flag.patch b/patches/Python-3.1.2/0009-fix-silent-flag.patch
new file mode 100644
index 000000000..1c1087f4b
--- /dev/null
+++ b/patches/Python-3.1.2/0009-fix-silent-flag.patch
@@ -0,0 +1,29 @@
+From 1833c8a1a14a9fbf99eac971532a6153cde6ba2f Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 13:08:35 +0200
+Subject: [PATCH] fix silent flag
+
+make uses "-s" as silent flag.
+only pass it (as "-q") to setup.py if a "s" (guarded by spaces)
+is detected in $MAKEFLAGS, "*s*" is not sufficient.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile.pre.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -416,8 +416,8 @@ platform: $(BUILDPYTHON)
+
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON)
+- @case $$MAKEFLAGS in \
+- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
++ @case "$(MAKEFLAGS)" in \
++ s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ esac
+
diff --git a/patches/Python-3.1.2/0010-use-PGEN_FOR_BUILD.patch b/patches/Python-3.1.2/0010-use-PGEN_FOR_BUILD.patch
new file mode 100644
index 000000000..51ea605b6
--- /dev/null
+++ b/patches/Python-3.1.2/0010-use-PGEN_FOR_BUILD.patch
@@ -0,0 +1,34 @@
+From ea4ae1db79bf21899b70f10cd892077725f2f804 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 14:05:30 +0200
+Subject: [PATCH] use PGEN_FOR_BUILD
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile.pre.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -217,6 +217,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
++PGEN_FOR_BUILD= $(PGEN)
+
+ POBJS= \
+ Parser/acceler.o \
+@@ -540,9 +541,9 @@ Modules/python.o: $(srcdir)/Modules/pyth
+
+ $(IO_OBJS): $(IO_H)
+
+-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
++$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
+ -@$(INSTALL) -d Include
+- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ -$(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+
+ $(PGEN): $(PGENOBJS)
+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
diff --git a/patches/Python-3.1.2/0011-introduce-and-use-PYTHON_FOR_BUILD.patch b/patches/Python-3.1.2/0011-introduce-and-use-PYTHON_FOR_BUILD.patch
new file mode 100644
index 000000000..9c5c1fc07
--- /dev/null
+++ b/patches/Python-3.1.2/0011-introduce-and-use-PYTHON_FOR_BUILD.patch
@@ -0,0 +1,181 @@
+From f091c104cb02b0724e7ea13fb5062a788c37091c Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 14:22:01 +0200
+Subject: [PATCH] introduce and use PYTHON_FOR_BUILD
+
+When cross compiling, the python version just build cannot be executed,
+thus we need a python running on the build system. This patch introduced
+the variable PYTHON_FOR_BUILD to specify this python, default is to use
+"python" from $PATH.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile.pre.in | 39 ++++++++++++++++++++-------------------
+ configure.in | 16 ++++++++++++++++
+ 2 files changed, 36 insertions(+), 19 deletions(-)
+
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -176,7 +176,8 @@ LIBOBJDIR= Python/
+ LIBOBJS= @LIBOBJS@
+
+ PYTHON= python$(EXE)
+-BUILDPYTHON= python$(BUILDEXE)
++BUILDPYTHON= ./python$(BUILDEXE)
++PYTHON_FOR_BUILD= @PYTHON_FOR_BUILD@
+
+ # The task to run while instrument when building the profile-opt target
+ PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
+@@ -394,7 +395,7 @@ build_all_generate_profile:
+ $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
+
+ run_profile_task:
+- ./$(BUILDPYTHON) $(PROFILE_TASK)
++ $(PYTHON_FOR_BUILD) $(PROFILE_TASK)
+
+ build_all_use_profile:
+ $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
+@@ -411,15 +412,15 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+-platform: $(BUILDPYTHON)
+- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
++ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E -c 'import sys ; from distutils.util import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
++platform: $(PYTHON_FOR_BUILD)
+
+
+ # Build the shared modules
+-sharedmods: $(BUILDPYTHON)
++sharedmods: $(BUILDPYTHON) $(PYTHON_FOR_BUILD)
+ @case "$(MAKEFLAGS)" in \
+- s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++ s|*\ s|s\ *|*\ s\ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
+ esac
+
+ # Build static library
+@@ -706,7 +707,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+
+ TESTOPTS= -l $(EXTRATESTOPTS)
+ TESTPROG= $(srcdir)/Lib/test/regrtest.py
+-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -E -bb
++TESTPYTHON= $(RUNSHARED) $(PYTHON_FOR_BUILD) -E -bb
+ test: all platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+@@ -729,7 +730,7 @@ testuniversal: all platform
+ -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
+ -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
+ $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -uall
+- $(RUNSHARED) /usr/libexec/oah/translate ./$(BUILDPYTHON) -E $(TESTPROG) $(TESTOPTS) -uall
++ $(RUNSHARED) /usr/libexec/oah/translate $(PYTHON_FOR_BUILD) -E $(TESTPROG) $(TESTOPTS) -uall
+
+
+ # Like testall, but with a single pass only
+@@ -910,25 +911,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+ done
+ $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- ./$(BUILDPYTHON) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
++ $(PYTHON_FOR_BUILD) -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
+
+ # Create the PLATDIR source directory, if one wasn't distributed..
+ $(srcdir)/Lib/$(PLATDIR):
+@@ -1020,7 +1021,7 @@ libainstall: all
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall:
+- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+@@ -1058,7 +1059,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+ fi; \
+ done
+ $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
+- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
++ sed 's/%VERSION%/'"`$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import platform; print(platform.python_version())'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
+ $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
+ $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
+ $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
+@@ -1101,7 +1102,7 @@ frameworkinstallextras:
+ # This installs a few of the useful scripts in Tools/scripts
+ scriptsinstall:
+ SRCDIR=$(srcdir) $(RUNSHARED) \
+- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
++ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --root=/$(DESTDIR)
+@@ -1123,7 +1124,7 @@ config.status: $(srcdir)/configure
+
+ # Run reindent on the library
+ reindent:
+- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
++ $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
+
+ # Rerun configure with the same options as it was run last time,
+ # provided the config.status script exists
+@@ -1239,7 +1240,7 @@ funny:
+
+ # Perform some verification checks on any modified files.
+ patchcheck:
+- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
++ $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/patchcheck.py
+
+ # Dependencies
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -4011,6 +4011,22 @@ for dir in $SRCDIRS; do
+ done
+ AC_MSG_RESULT(done)
+
++
++#
++# PYTHON_FOR_BUILD
++#
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_CHECKING(python for build)
++ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD-python}"
++ PYTHON_FOR_BUILD="$(which ${PYTHON_FOR_BUILD})"
++ AC_MSG_RESULT($PYTHON_FOR_BUILD)
++else
++ PYTHON_FOR_BUILD='$(BUILDPYTHON)'
++fi
++AC_SUBST(PYTHON_FOR_BUILD)
++AC_ARG_VAR(PYTHON_FOR_BUILD,[build system python (default: python)])
++
++
+ # generate output files
+ AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
+ AC_OUTPUT
diff --git a/patches/Python-3.1.2/0012-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch b/patches/Python-3.1.2/0012-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
new file mode 100644
index 000000000..c4902120b
--- /dev/null
+++ b/patches/Python-3.1.2/0012-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
@@ -0,0 +1,81 @@
+From 35b2f370694bb610118064ef0a6cc5a30fad4b70 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 18:05:33 +0200
+Subject: [PATCH] distutils: introduce and use EXECUTABLE_DIRNAME
+
+os.path.abspath(sys.executable) is used several times in
+distutils.sysconfig. This patch introduces the variable
+EXECUTABLE_DIRNAME which holds this information.
+
+This makes it easier to overwrite this value in the cross compilation
+scenario. (see later patch)
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+#@@ -73,13 +74,12 @@ def get_python_inc(plat_specific=0, prefix=None):
+# prefix = plat_specific and EXEC_PREFIX or PREFIX
+# if os.name == "posix":
+# if python_build:
+#- base = os.path.dirname(os.path.abspath(sys.executable))
+# if plat_specific:
+#- inc_dir = base
+#+ inc_dir = EXECUTABLE_DIRNAME
+# else:
+#- inc_dir = os.path.join(base, "Include")
+#+ inc_dir = os.path.join(EXECUTABLE_DIRNAME, "Include")
+# if not os.path.exists(inc_dir):
+#- inc_dir = os.path.join(os.path.dirname(base), "Include")
+#+ inc_dir = os.path.join(os.path.dirname(EXECUTABLE_DIRNAME), "Include")
+# return inc_dir
+# return os.path.join(prefix, "include", "python" + get_python_version())
+# elif os.name == "nt":
+---
+ Lib/distutils/sysconfig.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -21,11 +21,12 @@ from .errors import DistutilsPlatformErr
+ # These are needed in a couple of spots, so just compute them once.
+ PREFIX = os.path.normpath(sys.prefix)
+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++EXECUTABLE_DIRNAME = os.path.dirname(os.path.abspath(sys.executable))
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+ # it'll live in project/PCbuild/amd64.
+-project_base = os.path.dirname(os.path.abspath(sys.executable))
++project_base = EXECUTABLE_DIRNAME
+ if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
+ project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
+ # PC/VS7.1
+@@ -77,9 +78,8 @@ def get_python_inc(plat_specific=0, pref
+ # the build directory may not be the source directory, we
+ # must use "srcdir" from the makefile to find the "Include"
+ # directory.
+- base = os.path.dirname(os.path.abspath(sys.executable))
+ if plat_specific:
+- return base
++ return EXECUTABLE_DIRNAME
+ else:
+ incdir = os.path.join(get_config_var('srcdir'), 'Include')
+ return os.path.normpath(incdir)
+@@ -223,7 +223,7 @@ def get_config_h_filename():
+ def get_makefile_filename():
+ """Return full pathname of installed Makefile from the Python build."""
+ if python_build:
+- return os.path.join(os.path.dirname(sys.executable), "Makefile")
++ return os.path.join(EXECUTABLE_DIRNAME, "Makefile")
+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
+ return os.path.join(lib_dir, "config", "Makefile")
+
+@@ -520,7 +520,7 @@ def get_config_vars(*args):
+ # testing, for example, we might be running a non-installed python
+ # from a different directory.
+ if python_build and os.name == "posix":
+- base = os.path.dirname(os.path.abspath(sys.executable))
++ base = EXECUTABLE_DIRNAME
+ if (not os.path.isabs(_config_vars['srcdir']) and
+ base != os.getcwd()):
+ # srcdir is relative and we are not in the same directory
diff --git a/patches/Python-3.1.2/0013-setup.py-don-t-leak-host-path-into-cross-compilatio.patch b/patches/Python-3.1.2/0013-setup.py-don-t-leak-host-path-into-cross-compilatio.patch
new file mode 100644
index 000000000..628f2affa
--- /dev/null
+++ b/patches/Python-3.1.2/0013-setup.py-don-t-leak-host-path-into-cross-compilatio.patch
@@ -0,0 +1,85 @@
+From 2733013612e513e4756fafd82f33f66f7f7036f3 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 19:07:54 +0200
+Subject: [PATCH] setup.py: don't leak host path into cross compilation environment
+
+During cross compilation we don't host path (neither include nor library
+search patch) to leak into our environment.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ setup.py | 33 ++++++++++++++++++++++++++-------
+ 1 file changed, 26 insertions(+), 7 deletions(-)
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -295,8 +295,10 @@ class PyBuildExt(build_ext):
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++
++ if os.environ.get('CROSS_COMPILING') != 'yes':
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -310,6 +312,10 @@ class PyBuildExt(build_ext):
+ ('CPPFLAGS', '-I', self.compiler.include_dirs)):
+ env_val = sysconfig.get_config_var(env_var)
+ if env_val:
++ # replace "-isystem" by "-I" so that the option
++ # parser finds the dirs referenced by "-isystem"
++ env_val = re.sub(r'(^|\s+)-isystem\s+','\\1-I', env_val)
++
+ # To prevent optparse from raising an exception about any
+ # options in env_val that it doesn't know about we strip out
+ # all double dashes and any dashes followed by a character
+@@ -341,11 +347,18 @@ class PyBuildExt(build_ext):
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+- lib_dirs = self.compiler.library_dirs + [
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
+- ]
+- inc_dirs = self.compiler.include_dirs + ['/usr/include']
++ lib_dirs = self.compiler.library_dirs
++ inc_dirs = self.compiler.include_dirs
++
++ if os.environ.get('CROSS_COMPILING') != 'yes':
++ lib_dirs += [
++ '/lib64', '/usr/lib64',
++ '/lib', '/usr/lib',
++ ]
++ inc_dirs += ['/usr/include']
++ else:
++ lib_dirs += [ '.' ]
++
+ exts = []
+ missing = []
+
+@@ -697,6 +710,9 @@ class PyBuildExt(build_ext):
+ db_inc_paths.append('/pkg/db-3.%d/include' % x)
+ db_inc_paths.append('/opt/db-3.%d/include' % x)
+
++ if os.environ.get('CROSS_COMPILING') == 'yes':
++ db_inc_paths = []
++
+ # Add some common subdirectories for Sleepycat DB to the list,
+ # based on the standard include directories. This way DB3/4 gets
+ # picked up when it is installed in a non-standard prefix and
+@@ -815,6 +831,9 @@ class PyBuildExt(build_ext):
+ MIN_SQLITE_VERSION = ".".join([str(x)
+ for x in MIN_SQLITE_VERSION_NUMBER])
+
++ if os.environ.get('CROSS_COMPILING') == 'yes':
++ sqlite_inc_paths = []
++
+ # Scan the default include directories before the SQLite specific
+ # ones. This allows one to override the copy of sqlite on OSX,
+ # where /usr/include contains an old version of sqlite.
diff --git a/patches/Python-3.1.2/0014-setup.py-skip-import-check-while-cross-compiling.patch b/patches/Python-3.1.2/0014-setup.py-skip-import-check-while-cross-compiling.patch
new file mode 100644
index 000000000..70923297b
--- /dev/null
+++ b/patches/Python-3.1.2/0014-setup.py-skip-import-check-while-cross-compiling.patch
@@ -0,0 +1,28 @@
+From ffb8d658042e698dced9be6fece1bcf3f5b62f68 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Tue, 28 Apr 2009 19:08:19 +0200
+Subject: [PATCH] setup.py: skip import check while cross compiling
+
+during cross compilation we cannot import freshly for the target
+compiled modules into the build python. This patch skips this check.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ setup.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -246,6 +246,10 @@ class PyBuildExt(build_ext):
+ self.announce('WARNING: skipping import check for Cygwin-based "%s"'
+ % ext.name)
+ return
++ if os.environ.get('CROSS_COMPILING') == 'yes':
++ self.announce('WARNING: skipping import check for cross compiled "%s"'
++ % ext.name)
++ return
+ ext_filename = os.path.join(
+ self.build_lib,
+ self.get_ext_filename(self.get_ext_fullname(ext.name)))
diff --git a/patches/Python-3.1.2/0015-add-cross-compilation-support.patch b/patches/Python-3.1.2/0015-add-cross-compilation-support.patch
new file mode 100644
index 000000000..33c0f6763
--- /dev/null
+++ b/patches/Python-3.1.2/0015-add-cross-compilation-support.patch
@@ -0,0 +1,142 @@
+From 430893ea1bad2245f00d44fef62bbfb75db27f96 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 4 May 2009 14:39:18 +0200
+Subject: [PATCH] add cross compilation support
+
+This patch adds preliminary cross compilation support to python.
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Lib/distutils/sysconfig.py | 11 +++++++++--
+ Makefile.pre.in | 12 ++++++++----
+ configure.in | 31 ++++++++++++++++++++++++++++---
+ setup.py | 6 +++++-
+ 4 files changed, 50 insertions(+), 10 deletions(-)
+
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -19,9 +19,16 @@ import sys
+ from .errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+ EXECUTABLE_DIRNAME = os.path.dirname(os.path.abspath(sys.executable))
++if os.environ.get('CROSS_COMPILING') == 'yes':
++ _sysroot=os.environ.get('_python_sysroot')
++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
++ if '_python_srcdir' in os.environ:
++ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir'])
++else:
++ PREFIX = os.path.normpath(sys.prefix)
++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -75,6 +75,10 @@ CFLAGSFORSHARED=@CFLAGSFORSHARED@
+ # C flags used for building the interpreter object files
+ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
+
++# cross compiler options
++ifndef DESTDIR
++sysroot= @SYSROOT@
++endif
+
+ # Machine-dependent subdirectories
+ MACHDEP= @MACHDEP@
+@@ -90,11 +94,11 @@ datarootdir= @datarootdir@
+
+ # Expanded directories
+ BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++LIBDIR= $(sysroot)$(exec_prefix)/lib
+ MANDIR= @mandir@
+-INCLUDEDIR= @includedir@
+-CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++INCLUDEDIR= $(sysroot)@includedir@
++CONFINCLUDEDIR= $(sysroot)$(exec_prefix)/include
++SCRIPTDIR= $(sysroot)$(prefix)/lib
+
+ # Detailed destination directories
+ BINLIBDEST= $(LIBDIR)/python$(VERSION)
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -21,6 +21,9 @@ if test "$prefix" != "/"; then
+ prefix=`echo "$prefix" | sed -e 's/\/$//g'`
+ fi
+
++AC_CANONICAL_BUILD
++AC_CANONICAL_HOST
++
+ dnl This is for stuff that absolutely must end up in pyconfig.h.
+ dnl Please use pyport.h instead, if possible.
+ AH_TOP([
+@@ -760,9 +763,9 @@ fi
+
+ AC_MSG_RESULT($LDLIBRARY)
+
+-AC_PROG_RANLIB
+-AC_SUBST(AR)
+-AC_CHECK_PROGS(AR, ar aal, ar)
++# find tools while respecting --host setting
++AC_CHECK_TOOL(RANLIB,ranlib)
++AC_CHECK_TOOLS(AR,ar aal,ar)
+
+ # tweak ARFLAGS only if the user didn't set it on the command line
+ AC_SUBST(ARFLAGS)
+@@ -4027,6 +4030,28 @@ AC_SUBST(PYTHON_FOR_BUILD)
+ AC_ARG_VAR(PYTHON_FOR_BUILD,[build system python (default: python)])
+
+
++#
++# Cross compiling
++#
++# special RUNSHARED
++if test "$cross_compiling" = "yes"; then
++ RUNSHARED="\
++ CROSS_COMPILING=yes \
++ _python_cross_host=${ac_cv_host} \
++ _python_sysroot=\"\$(sysroot)\" \
++ _python_srcdir=\"\$(srcdir)\" \
++ _python_prefix=\"\$(prefix)\" \
++ _python_exec_prefix=\"\$(exec_prefix)\""
++fi
++
++# sysroot
++AC_SUBST(SYSROOT)
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_CHECKING([for SYSROOT])
++ AC_MSG_RESULT([$SYSROOT])
++fi
++
++
+ # generate output files
+ AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
+ AC_OUTPUT
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -1494,7 +1494,11 @@ class PyBuildExt(build_ext):
+ ffi_configfile):
+ from distutils.dir_util import mkpath
+ mkpath(ffi_builddir)
+- config_args = []
++
++ if os.environ.get('CROSS_COMPILING') != 'yes':
++ config_args = []
++ else:
++ config_args = ['--host=%s' % os.environ["_python_cross_host"],]
+
+ # Pass empty CFLAGS because we'll just append the resulting
+ # CFLAGS to Python's; -g or -O2 is to be avoided.
diff --git a/patches/Python-3.1.2/0016-provide-wrapper-for-cross-python.patch b/patches/Python-3.1.2/0016-provide-wrapper-for-cross-python.patch
new file mode 100644
index 000000000..4dbf13264
--- /dev/null
+++ b/patches/Python-3.1.2/0016-provide-wrapper-for-cross-python.patch
@@ -0,0 +1,46 @@
+From ff60f7c08cb167d060fd0e34b543550facf846c6 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Mon, 4 May 2009 21:45:37 +0200
+Subject: [PATCH] provide wrapper for cross-python
+
+this patch provides a wrapper script that sets up a propper cross
+compilation environemnt and call the python_for_build
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ configure.in | 2 +-
+ cross-python-wrapper.in | 13 +++++++++++++
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+ create mode 100755 cross-python-wrapper.in
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -4053,7 +4053,7 @@ fi
+
+
+ # generate output files
+-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc cross-python-wrapper)
+ AC_OUTPUT
+
+ echo "creating Modules/Setup"
+Index: b/cross-python-wrapper.in
+===================================================================
+--- /dev/null
++++ b/cross-python-wrapper.in
+@@ -0,0 +1,13 @@
++#!/bin/sh
++
++prefix="@prefix@"
++exec_prefix="@exec_prefix@"
++
++CROSS_COMPILING=yes
++_python_sysroot="@SYSROOT@"
++_python_prefix="${prefix}"
++_python_exec_prefix="${exec_prefix}"
++
++export CROSS_COMPILING _python_sysroot _python_prefix _python_exec_prefix
++
++exec @PYTHON_FOR_BUILD@ "${@}"
diff --git a/patches/Python-3.1.2/0017-fix-for-new-autoconf.diff b/patches/Python-3.1.2/0017-fix-for-new-autoconf.diff
new file mode 100644
index 000000000..8f40a6404
--- /dev/null
+++ b/patches/Python-3.1.2/0017-fix-for-new-autoconf.diff
@@ -0,0 +1,19 @@
+---
+ configure.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1401,8 +1401,9 @@ AC_CHECK_SIZEOF(fpos_t, 4)
+ AC_CHECK_SIZEOF(size_t, 4)
+ AC_CHECK_SIZEOF(pid_t, 4)
+
++AC_TYPE_LONG_LONG_INT
+ AC_CHECK_SIZEOF(long long)
+-if test "$ac_cv_type_long_long" = "yes" ; then
++if test "$ac_cv_type_long_long_int" = "yes" ; then
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ fi
+
diff --git a/patches/Python-3.1.2/0018-dont-add-rpaths.diff b/patches/Python-3.1.2/0018-dont-add-rpaths.diff
new file mode 100644
index 000000000..6a24bae47
--- /dev/null
+++ b/patches/Python-3.1.2/0018-dont-add-rpaths.diff
@@ -0,0 +1,24 @@
+---
+ setup.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -910,7 +910,6 @@ class PyBuildExt(build_ext):
+ include_dirs=["Modules/_sqlite",
+ sqlite_incdir],
+ library_dirs=sqlite_libdir,
+- runtime_library_dirs=sqlite_libdir,
+ extra_link_args=sqlite_extra_link_args,
+ libraries=["sqlite3",]))
+ else:
+@@ -972,7 +971,6 @@ class PyBuildExt(build_ext):
+ print("building dbm using bdb")
+ dbmext = Extension('_dbm', ['_dbmmodule.c'],
+ library_dirs=dblib_dir,
+- runtime_library_dirs=dblib_dir,
+ include_dirs=db_incs,
+ define_macros=[
+ ('HAVE_BERKDB_H', None),
diff --git a/patches/Python-3.1.2/0019-add-cache-for-sem-getvalue.diff b/patches/Python-3.1.2/0019-add-cache-for-sem-getvalue.diff
new file mode 100644
index 000000000..9b395bedb
--- /dev/null
+++ b/patches/Python-3.1.2/0019-add-cache-for-sem-getvalue.diff
@@ -0,0 +1,44 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: add cache variable for sem_getvalue test
+
+AC_TRY_RUN is used to check for a broken sem_getvalue.
+This patch adds a cache variable (ac_cv_broken_sem_getvalue)
+that can be set when cross-compiling.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure.in | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -3376,7 +3376,8 @@ fi
+
+ # Multiprocessing check for broken sem_getvalue
+ AC_MSG_CHECKING(for broken sem_getvalue)
+-AC_TRY_RUN([
++AC_CACHE_VAL(ac_cv_broken_sem_getvalue,
++[AC_TRY_RUN([
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+@@ -3398,10 +3399,14 @@ int main(void){
+ return res==-1 ? 1 : 0;
+ }
+ ]
+-,AC_MSG_RESULT(no),
+- AC_MSG_RESULT(yes)
++,ac_cv_broken_sem_getvalue=no,
++ ac_cv_broken_sem_getvalue=yes,
++ ac_cv_broken_sem_getvalue=yes)
++])
++AC_MSG_RESULT($ac_cv_broken_sem_getvalue)
++if test "x$ac_cv_broken_sem_getvalue" = "xyes"; then
+ AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is broken.)
+-)
++fi
+
+ # determine what size digit to use for Python's longs
+ AC_MSG_CHECKING([digit size for Python's longs])
diff --git a/patches/Python-3.1.2/autogen.sh b/patches/Python-3.1.2/autogen.sh
new file mode 100755
index 000000000..903ce7847
--- /dev/null
+++ b/patches/Python-3.1.2/autogen.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# to add config.guess and config.sub
+automake --copy --add-missing || true
+
+autoheader --force
+
+autoconf \
+ --force \
+ --warnings=cross \
+ --warnings=syntax \
+ --warnings=obsolete \
+ --warnings=unsupported
+
diff --git a/patches/Python-3.1.2/series b/patches/Python-3.1.2/series
new file mode 100644
index 000000000..2b5f25e15
--- /dev/null
+++ b/patches/Python-3.1.2/series
@@ -0,0 +1,19 @@
+0001-Add-support-for-socketcan-to-the-python-socket-modul.patch
+# 0002--configure.in-chflags.patch ## upstream
+# 0003--configure.in-lchflags.patch ## upstream
+0004--configure.in-printf-format-zd.patch
+0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch
+0006-use-AC_CHECK_SIZEOF-rather-than-AC_TRY_COMPILE-for-l.patch
+0007-use-AC_TYPE_LONG_DOUBLE-to-detect-long-double-suppor.patch
+0008-use-AC_CHECK_SIZEOF-rather-than-handcrafted-test-wit.patch
+0009-fix-silent-flag.patch
+0010-use-PGEN_FOR_BUILD.patch
+0011-introduce-and-use-PYTHON_FOR_BUILD.patch
+0012-distutils-introduce-and-use-EXECUTABLE_DIRNAME.patch
+0013-setup.py-don-t-leak-host-path-into-cross-compilatio.patch
+0014-setup.py-skip-import-check-while-cross-compiling.patch
+0015-add-cross-compilation-support.patch
+0016-provide-wrapper-for-cross-python.patch
+0017-fix-for-new-autoconf.diff
+0018-dont-add-rpaths.diff
+0019-add-cache-for-sem-getvalue.diff
diff --git a/patches/arora-0.10.2/fix-prefix.diff b/patches/arora-0.10.2/fix-prefix.diff
deleted file mode 100644
index 5f13542fb..000000000
--- a/patches/arora-0.10.2/fix-prefix.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Subject: fix prefix
-
-arora installs to /usr/local by default.
-This patch changes this to /usr.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
----
-# 20091210 rsc: is this patch ready for upstream, or should it be solved
-# differently?
-
- install.pri | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: b/install.pri
-===================================================================
---- a/install.pri
-+++ b/install.pri
-@@ -1,7 +1,7 @@
-
- unix {
- isEmpty(PREFIX) {
-- PREFIX = /usr/local
-+ PREFIX = /usr
- }
- BINDIR = $$PREFIX/bin
-
diff --git a/patches/arora-0.10.2/series b/patches/arora-0.10.2/series
index 2bb06a61a..e7b0e4083 100644
--- a/patches/arora-0.10.2/series
+++ b/patches/arora-0.10.2/series
@@ -1,2 +1 @@
-fix-prefix.diff
add-missing-include.diff
diff --git a/patches/atop-1.23/fix-cross-compile.patch b/patches/atop-1.24/fix-cross-compile.patch
index bbb2942ad..e325c7a1e 100644
--- a/patches/atop-1.23/fix-cross-compile.patch
+++ b/patches/atop-1.24/fix-cross-compile.patch
@@ -9,18 +9,17 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
#20081125: wsa: Mailed to upstream.
#20081127: wsa: Accepted upstream. Wait for next release.
+#20100317: mkl: Mailed to upstream again.
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
-Index: atop-1.23/Makefile
-===================================================================
---- atop-1.23.orig/Makefile
-+++ atop-1.23/Makefile
-@@ -13,8 +13,8 @@ INIPATH = /etc/rc.d/init.d
- CRNPATH = /etc/cron.d
+--- a/Makefile
++++ b/Makefile
+@@ -15,8 +15,8 @@ CRNPATH = /etc/cron.d
ROTPATH = /etc/logrotate.d
+ # CFLAGS = -g -I. -Wall # -DHTTPSTATS
-CFLAGS = -O -I. -Wall # -DHTTPSTATS
-LDFLAGS = -lncurses -lm -lz
+CFLAGS += -O2 -I. -Wall # -DHTTPSTATS
@@ -28,7 +27,7 @@ Index: atop-1.23/Makefile
OBJMOD0 = version.o
OBJMOD1 = various.o deviate.o procdbase.o
OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o
-@@ -25,7 +25,7 @@ ALLMODS = $(OBJMOD0) $(OBJMOD1) $(OBJMOD
+@@ -27,7 +27,7 @@ ALLMODS = $(OBJMOD0) $(OBJMOD1) $(OBJMOD
all: atop
atop: atop.o $(ALLMODS) Makefile
diff --git a/patches/atop-1.23/series b/patches/atop-1.24/series
index 0190994f9..0190994f9 100644
--- a/patches/atop-1.23/series
+++ b/patches/atop-1.24/series
diff --git a/patches/busybox-1.15.3/0001-init-make-FEATURE_EXTRA_QUIET-more-consistent.-1-b.patch b/patches/busybox-1.15.3/0001-init-make-FEATURE_EXTRA_QUIET-more-consistent.-1-b.patch
deleted file mode 100644
index 4079bccec..000000000
--- a/patches/busybox-1.15.3/0001-init-make-FEATURE_EXTRA_QUIET-more-consistent.-1-b.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 6be918d0ae15ca5f8b3b3879c496205bc8a11c2b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 14 Dec 2009 01:32:11 +0100
-Subject: [PATCH] init: make FEATURE_EXTRA_QUIET more consistent. +1 byte
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- init/init.c | 5 +++--
- 1 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/init/init.c b/init/init.c
-index 1413685..3748a15 100644
---- a/init/init.c
-+++ b/init/init.c
-@@ -86,7 +86,6 @@ static const char *log_console = VC_5;
- enum {
- L_LOG = 0x1,
- L_CONSOLE = 0x2,
-- MAYBE_CONSOLE = L_CONSOLE * !ENABLE_FEATURE_EXTRA_QUIET,
- #ifndef RB_HALT_SYSTEM
- RB_HALT_SYSTEM = 0xcdef0123, /* FIXME: this overflows enum */
- RB_ENABLE_CAD = 0x89abcdef,
-@@ -856,8 +855,10 @@ int init_main(int argc UNUSED_PARAM, char **argv)
- if (argv[1])
- xsetenv("RUNLEVEL", argv[1]);
-
-+#if ENABLE_FEATURE_EXTRA_QUIET
- /* Hello world */
-- message(MAYBE_CONSOLE | L_LOG, "init started: %s", bb_banner);
-+ message(L_CONSOLE | L_LOG, "init started: %s", bb_banner);
-+#endif
-
- /* Make sure there is enough memory to do something useful. */
- if (ENABLE_SWAPONOFF) {
---
-1.5.6.5
-
diff --git a/patches/busybox-1.15.3/0001-init-revert-quiet-logic.patch b/patches/busybox-1.15.3/0001-init-revert-quiet-logic.patch
deleted file mode 100644
index d5d2e44dd..000000000
--- a/patches/busybox-1.15.3/0001-init-revert-quiet-logic.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 64a1c32ee7072d745bb9e95b5b627524fe4ccdf1 Mon Sep 17 00:00:00 2001
-From: Robert Schwebel <r.schwebel@pengutronix.de>
-Date: Mon, 14 Dec 2009 23:37:35 +0100
-Subject: [PATCH] init: revert 'quiet' logic
-
-In 6be918d0ae15ca5f8b3b3879c496205bc8a11c2b the "EXTRA_QUIET" feature
-was fixed, but the logic is so that if QUIET is set, it is *not* quiet.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
----
-# 20091214 rsc: submitted here: https://bugs.busybox.net/show_bug.cgi?id=811
- init/init.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/init/init.c b/init/init.c
-index fb9c81e..b9c8924 100644
---- a/init/init.c
-+++ b/init/init.c
-@@ -873,7 +873,7 @@ int init_main(int argc UNUSED_PARAM, char **argv)
- if (argv[1])
- xsetenv("RUNLEVEL", argv[1]);
-
--#if ENABLE_FEATURE_EXTRA_QUIET
-+#if !ENABLE_FEATURE_EXTRA_QUIET
- /* Hello world */
- message(L_CONSOLE | L_LOG, "init started: %s", bb_banner);
- #endif
---
-1.5.6.5
-
diff --git a/patches/busybox-1.15.3/0003-fdisk_osf-silence-warning.patch b/patches/busybox-1.15.3/0003-fdisk_osf-silence-warning.patch
deleted file mode 100644
index c6a6b7ed0..000000000
--- a/patches/busybox-1.15.3/0003-fdisk_osf-silence-warning.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 861b2528b5a68e17891379eecd88fdea72a6929a Mon Sep 17 00:00:00 2001
-From: Robert Schwebel <r.schwebel@pengutronix.de>
-Date: Fri, 6 Nov 2009 09:19:58 +0100
-Subject: [PATCH 3/5] [fdisk_osf] silence warning
-
-Silence this warning, which crashes when CONFIG_WERROR is active:
-
-cc1: warnings being treated as errors
-In file included from util-linux/fdisk.c:622:
-util-linux/fdisk_osf.c: In function 'xbsd_writelabel':
-util-linux/fdisk_osf.c:961: error: unused parameter 'p'
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- util-linux/fdisk_osf.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
-index aeccc69..de8df04 100644
---- a/util-linux/fdisk_osf.c
-+++ b/util-linux/fdisk_osf.c
-@@ -964,6 +964,7 @@ xbsd_writelabel(struct partition *p)
- #if !defined(__alpha__) && !defined(__powerpc__) && !defined(__hppa__)
- sector = get_start_sect(p) + BSD_LABELSECTOR;
- #else
-+ (void)p; /* silence warning */
- sector = BSD_LABELSECTOR;
- #endif
-
---
-1.6.5.2
-
diff --git a/patches/busybox-1.15.3/0004-sha1-silence-warning-on-big-endian-platforms.patch b/patches/busybox-1.15.3/0004-sha1-silence-warning-on-big-endian-platforms.patch
deleted file mode 100644
index c461e2696..000000000
--- a/patches/busybox-1.15.3/0004-sha1-silence-warning-on-big-endian-platforms.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0983b05310b756f0c928910ca2f606fbca1feb63 Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 6 Nov 2009 09:19:58 +0100
-Subject: [PATCH 4/5] [sha1] silence warning on big endian platforms
-
-Silence this warning, which crashes when CONFIG_WERROR is active:
-
-cc1: warnings being treated as errors
-libbb/sha1.c: In function 'sha1_end':
-libbb/sha1.c:411: error: unused variable 'i'
-libbb/sha1.c: In function 'sha512_end':
-libbb/sha1.c:446: error: unused variable 'i'
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- libbb/sha1.c | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/libbb/sha1.c b/libbb/sha1.c
-index ea645b7..964ff3c 100644
---- a/libbb/sha1.c
-+++ b/libbb/sha1.c
-@@ -410,6 +410,8 @@ void FAST_FUNC sha1_end(void *resbuf, sha1_ctx_t *ctx)
- {
- unsigned i, pad, in_buf;
-
-+ (void)i;
-+
- in_buf = ctx->total64 & 63;
- /* Pad the buffer to the next 64-byte boundary with 0x80,0,0,0... */
- ctx->wbuffer[in_buf++] = 0x80;
-@@ -445,6 +447,8 @@ void FAST_FUNC sha512_end(void *resbuf, sha512_ctx_t *ctx)
- {
- unsigned i, pad, in_buf;
-
-+ (void)i;
-+
- in_buf = ctx->total64[0] & 127;
- /* Pad the buffer to the next 128-byte boundary with 0x80,0,0,0...
- * (FIPS 180-2:5.1.2)
---
-1.6.5.2
-
diff --git a/patches/busybox-1.15.3/0005-mkfs_vfat-silence-errors-on-BE-platforms.patch b/patches/busybox-1.15.3/0005-mkfs_vfat-silence-errors-on-BE-platforms.patch
deleted file mode 100644
index f66f91d94..000000000
--- a/patches/busybox-1.15.3/0005-mkfs_vfat-silence-errors-on-BE-platforms.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7292ca078fd3f5c6dc8256a7a2ecc9f3d38935ef Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Fri, 6 Nov 2009 09:26:56 +0100
-Subject: [PATCH 5/5] [mkfs_vfat] silence errors on BE platforms
-
-ilence this warning, which crashes when CONFIG_WERROR is active:
-
-cc1: warnings being treated as errors
-util-linux/mkfs_vfat.c: In function 'mkfs_vfat_main':
-util-linux/mkfs_vfat.c:468: error: large integer implicitly truncated to unsigned type
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- util-linux/mkfs_vfat.c | 6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
-index bdd4dd8..ade2282 100644
---- a/util-linux/mkfs_vfat.c
-+++ b/util-linux/mkfs_vfat.c
-@@ -174,11 +174,11 @@ void BUG_unsupported_field_size(void);
- #define STORE_LE(field, value) \
- do { \
- if (sizeof(field) == 4) \
-- field = cpu_to_le32(value); \
-+ field = (typeof(field))cpu_to_le32(value); \
- else if (sizeof(field) == 2) \
-- field = cpu_to_le16(value); \
-+ field = (typeof(field))cpu_to_le16(value); \
- else if (sizeof(field) == 1) \
-- field = (value); \
-+ field = (typeof(field))(value); \
- else \
- BUG_unsupported_field_size(); \
- } while (0)
---
-1.6.5.2
-
diff --git a/patches/busybox-1.15.3/0006-ifplugd-restore-auto-ifup-unless--a.patch b/patches/busybox-1.15.3/0006-ifplugd-restore-auto-ifup-unless--a.patch
deleted file mode 100644
index c88f1ebcd..000000000
--- a/patches/busybox-1.15.3/0006-ifplugd-restore-auto-ifup-unless--a.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From f422a722bb7c0b39a086255380c87eb4ba7af45b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 08 Jan 2010 11:27:57 +0000
-Subject: ifplugd: restore auto-ifup unless -a; make iff method less iffy :D
-
-function old new delta
-up_iface - 112 +112
-network_ioctl 13 38 +25
-detect_link_iff 58 71 +13
-detect_link 143 152 +9
-ifplugd_main 1107 1109 +2
-detect_link_wlan 131 125 -6
-detect_link_ethtool 71 65 -6
-detect_link_priv 88 80 -8
-detect_link_mii 88 80 -8
-maybe_up_new_iface 144 27 -117
-------------------------------------------------------------------------------
-(add/remove: 1/0 grow/shrink: 4/5 up/down: 161/-145) Total: 16 bytes
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
-diff --git a/networking/ifplugd.c b/networking/ifplugd.c
-index 4585530..ac6607c 100644
---- a/networking/ifplugd.c
-+++ b/networking/ifplugd.c
-@@ -210,9 +210,12 @@ static int run_script(const char *action)
- #endif
- }
-
--static int network_ioctl(int request, void* data)
-+static int network_ioctl(int request, void* data, const char *errmsg)
- {
-- return ioctl(ioctl_fd, request, data);
-+ int r = ioctl(ioctl_fd, request, data);
-+ if (r < 0 && errmsg)
-+ bb_perror_msg(errmsg);
-+ return r;
- }
-
- static void set_ifreq_to_ifname(struct ifreq *ifreq)
-@@ -236,8 +239,7 @@ static void up_iface(void)
- return;
-
- set_ifreq_to_ifname(&ifrequest);
-- if (network_ioctl(SIOCGIFFLAGS, &ifrequest) < 0) {
-- bb_perror_msg("can't %cet interface flags", 'g');
-+ if (network_ioctl(SIOCGIFFLAGS, &ifrequest, "can't get interface flags") < 0) {
- G.iface_exists = 0;
- return;
- }
-@@ -246,24 +248,19 @@ static void up_iface(void)
- ifrequest.ifr_flags |= IFF_UP;
- /* Let user know we mess up with interface */
- bb_error_msg("upping interface");
-- if (network_ioctl(SIOCSIFFLAGS, &ifrequest) < 0)
-- bb_perror_msg_and_die("can't %cet interface flags", 's');
-+ if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "can't set interface flags") < 0)
-+ xfunc_die();
- }
-
- #if 0 /* why do we mess with IP addr? It's not our business */
-- if (network_ioctl(SIOCGIFADDR, &ifrequest) < 0) {
-- bb_error_msg("can't get interface address");
-+ if (network_ioctl(SIOCGIFADDR, &ifrequest, "can't get interface address") < 0) {
- } else if (ifrequest.ifr_addr.sa_family != AF_INET) {
- bb_perror_msg("the interface is not IP-based");
- } else {
- ((struct sockaddr_in*)(&ifrequest.ifr_addr))->sin_addr.s_addr = INADDR_ANY;
-- if (network_ioctl(SIOCSIFADDR, &ifrequest) < 0)
-- bb_perror_msg("can't set interface address");
-- }
-- if (network_ioctl(SIOCGIFFLAGS, &ifrequest) < 0) {
-- bb_perror_msg("can't get interface flags");
-- return;
-+ network_ioctl(SIOCSIFADDR, &ifrequest, "can't set interface address");
- }
-+ network_ioctl(SIOCGIFFLAGS, &ifrequest, "can't get interface flags");
- #endif
- }
-
-@@ -279,13 +276,13 @@ static void maybe_up_new_iface(void)
- set_ifreq_to_ifname(&ifrequest);
- driver_info.cmd = ETHTOOL_GDRVINFO;
- ifrequest.ifr_data = &driver_info;
-- if (network_ioctl(SIOCETHTOOL, &ifrequest) == 0) {
-+ if (network_ioctl(SIOCETHTOOL, &ifrequest, NULL) == 0) {
- char buf[sizeof("/xx:xx:xx:xx:xx:xx")];
-
- /* Get MAC */
- buf[0] = '\0';
- set_ifreq_to_ifname(&ifrequest);
-- if (network_ioctl(SIOCGIFHWADDR, &ifrequest) == 0) {
-+ if (network_ioctl(SIOCGIFHWADDR, &ifrequest, NULL) == 0) {
- sprintf(buf, "/%02X:%02X:%02X:%02X:%02X:%02X",
- (uint8_t)(ifrequest.ifr_hwaddr.sa_data[0]),
- (uint8_t)(ifrequest.ifr_hwaddr.sa_data[1]),
-@@ -310,15 +307,13 @@ static smallint detect_link_mii(void)
-
- set_ifreq_to_ifname(&ifreq);
-
-- if (network_ioctl(SIOCGMIIPHY, &ifreq) < 0) {
-- bb_perror_msg("SIOCGMIIPHY failed");
-+ if (network_ioctl(SIOCGMIIPHY, &ifreq, "SIOCGMIIPHY failed") < 0) {
- return IFSTATUS_ERR;
- }
-
- mii->reg_num = 1;
-
-- if (network_ioctl(SIOCGMIIREG, &ifreq) < 0) {
-- bb_perror_msg("SIOCGMIIREG failed");
-+ if (network_ioctl(SIOCGMIIREG, &ifreq, "SIOCGMIIREG failed") < 0) {
- return IFSTATUS_ERR;
- }
-
-@@ -332,15 +327,13 @@ static smallint detect_link_priv(void)
-
- set_ifreq_to_ifname(&ifreq);
-
-- if (network_ioctl(SIOCDEVPRIVATE, &ifreq) < 0) {
-- bb_perror_msg("SIOCDEVPRIVATE failed");
-+ if (network_ioctl(SIOCDEVPRIVATE, &ifreq, "SIOCDEVPRIVATE failed") < 0) {
- return IFSTATUS_ERR;
- }
-
- mii->reg_num = 1;
-
-- if (network_ioctl(SIOCDEVPRIVATE+1, &ifreq) < 0) {
-- bb_perror_msg("SIOCDEVPRIVATE+1 failed");
-+ if (network_ioctl(SIOCDEVPRIVATE+1, &ifreq, "SIOCDEVPRIVATE+1 failed") < 0) {
- return IFSTATUS_ERR;
- }
-
-@@ -357,8 +350,7 @@ static smallint detect_link_ethtool(void)
- edata.cmd = ETHTOOL_GLINK;
- ifreq.ifr_data = (void*) &edata;
-
-- if (network_ioctl(SIOCETHTOOL, &ifreq) < 0) {
-- bb_perror_msg("ETHTOOL_GLINK failed");
-+ if (network_ioctl(SIOCETHTOOL, &ifreq, "ETHTOOL_GLINK failed") < 0) {
- return IFSTATUS_ERR;
- }
-
-@@ -371,11 +363,19 @@ static smallint detect_link_iff(void)
-
- set_ifreq_to_ifname(&ifreq);
-
-- if (network_ioctl(SIOCGIFFLAGS, &ifreq) < 0) {
-- bb_perror_msg("SIOCGIFFLAGS failed");
-+ if (network_ioctl(SIOCGIFFLAGS, &ifreq, "SIOCGIFFLAGS failed") < 0) {
- return IFSTATUS_ERR;
- }
-
-+ /* If IFF_UP is not set (interface is down), IFF_RUNNING is never set
-+ * regardless of link status. Simply continue to report last status -
-+ * no point in reporting spurious link downs if interface is disabled
-+ * by admin. When/if it will be brought up,
-+ * we'll report real link status.
-+ */
-+ if (!(ifreq.ifr_flags & IFF_UP) && G.iface_last_status != IFSTATUS_ERR)
-+ return G.iface_last_status;
-+
- return (ifreq.ifr_flags & IFF_RUNNING) ? IFSTATUS_UP : IFSTATUS_DOWN;
- }
-
-@@ -387,8 +387,7 @@ static smallint detect_link_wlan(void)
- memset(&iwrequest, 0, sizeof(struct iwreq));
- strncpy_IFNAMSIZ(iwrequest.ifr_ifrn.ifrn_name, G.iface);
-
-- if (network_ioctl(SIOCGIWAP, &iwrequest) < 0) {
-- bb_perror_msg("SIOCGIWAP failed");
-+ if (network_ioctl(SIOCGIWAP, &iwrequest, "SIOCGIWAP failed") < 0) {
- return IFSTATUS_ERR;
- }
-
-@@ -469,15 +468,12 @@ static smallint detect_link(void)
- if (!G.iface_exists)
- return (option_mask32 & FLAG_MONITOR) ? IFSTATUS_DOWN : IFSTATUS_ERR;
-
--#if 0
--/* Why? This behavior makes it hard to temporary down the iface.
-- * It makes a bit more sense to do only in maybe_up_new_iface.
-- * OTOH, maybe detect_link_wlan needs this. Then it should be done
-- * _only_ there.
-- */
-+ /* Some drivers can't detect link status when the interface is down.
-+ * I imagine detect_link_iff() is the most vulnerable.
-+ * That's why -a "noauto" in an option, not a hardwired behavior.
-+ */
- if (!(option_mask32 & FLAG_NO_AUTO))
- up_iface();
--#endif
-
- status = G.detect_link_func();
- if (status == IFSTATUS_ERR) {
-@@ -692,7 +688,7 @@ int ifplugd_main(int argc UNUSED_PARAM, char **argv)
- if (opts & FLAG_MONITOR) {
- struct ifreq ifrequest;
- set_ifreq_to_ifname(&ifrequest);
-- G.iface_exists = (network_ioctl(SIOCGIFINDEX, &ifrequest) == 0);
-+ G.iface_exists = (network_ioctl(SIOCGIFINDEX, &ifrequest, NULL) == 0);
- }
-
- if (G.iface_exists)
---
-cgit v0.8.2.1
diff --git a/patches/busybox-1.15.3/series b/patches/busybox-1.15.3/series
deleted file mode 100644
index d33ce0720..000000000
--- a/patches/busybox-1.15.3/series
+++ /dev/null
@@ -1,7 +0,0 @@
-0001-init-make-FEATURE_EXTRA_QUIET-more-consistent.-1-b.patch
-0001-init-revert-quiet-logic.patch
-0002-reactivate-check-for-tty.patch
-0003-fdisk_osf-silence-warning.patch
-0004-sha1-silence-warning-on-big-endian-platforms.patch
-0005-mkfs_vfat-silence-errors-on-BE-platforms.patch
-0006-ifplugd-restore-auto-ifup-unless--a.patch
diff --git a/patches/busybox-1.15.3/0002-reactivate-check-for-tty.patch b/patches/busybox-1.16.1/0001-reactivate-check-for-tty.patch
index a31b0aed2..b76dc60bf 100644
--- a/patches/busybox-1.15.3/0002-reactivate-check-for-tty.patch
+++ b/patches/busybox-1.16.1/0001-reactivate-check-for-tty.patch
@@ -1,7 +1,7 @@
-From a884ec095ec9dcc4e25abb68838fb6bd120639b4 Mon Sep 17 00:00:00 2001
+From 8bc1ce004ac5cddb2c1f14a60308ac5675899f24 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Fri, 6 Nov 2009 09:19:58 +0100
-Subject: [PATCH 2/5] reactivate check for tty
+Subject: [PATCH 1/2] reactivate check for tty
The busybox crew switched of the test for a tty in silentoldconfig,
we use this feature to break when oldconfig needs interaction
@@ -28,5 +28,5 @@ index 9befa2b..e65e25c 100644
case 'd':
input_mode = set_default;
--
-1.6.5.2
+1.7.0.3
diff --git a/patches/busybox-1.16.1/0002-silence-errors-on-BE-platforms.patch b/patches/busybox-1.16.1/0002-silence-errors-on-BE-platforms.patch
new file mode 100644
index 000000000..ec5bcce1d
--- /dev/null
+++ b/patches/busybox-1.16.1/0002-silence-errors-on-BE-platforms.patch
@@ -0,0 +1,78 @@
+From dc2ebb53bd52743bc643462c7ebe3fa8488c9a13 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 6 Nov 2009 09:26:56 +0100
+Subject: [PATCH 2/2] silence errors on BE platforms
+
+Silence this warning, which crashes when CONFIG_WERROR is active:
+
+cc1: warnings being treated as errors
+util-linux/mkfs_vfat.c: In function 'mkfs_vfat_main':
+util-linux/mkfs_vfat.c:468: error: large integer implicitly truncated to unsigned type
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ util-linux/mkfs_ext2.c | 6 +++---
+ util-linux/mkfs_reiser.c | 6 +++---
+ util-linux/mkfs_vfat.c | 6 +++---
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
+index 19c3c67..27abb00 100644
+--- a/util-linux/mkfs_ext2.c
++++ b/util-linux/mkfs_ext2.c
+@@ -29,11 +29,11 @@ char BUG_wrong_field_size(void);
+ #define STORE_LE(field, value) \
+ do { \
+ if (sizeof(field) == 4) \
+- field = cpu_to_le32(value); \
++ field = (typeof(field))cpu_to_le32(value); \
+ else if (sizeof(field) == 2) \
+- field = cpu_to_le16(value); \
++ field = (typeof(field))cpu_to_le16(value); \
+ else if (sizeof(field) == 1) \
+- field = (value); \
++ field = (typeof(field))(value); \
+ else \
+ BUG_wrong_field_size(); \
+ } while (0)
+diff --git a/util-linux/mkfs_reiser.c b/util-linux/mkfs_reiser.c
+index 7f37eb8..084a611 100644
+--- a/util-linux/mkfs_reiser.c
++++ b/util-linux/mkfs_reiser.c
+@@ -14,11 +14,11 @@ char BUG_wrong_field_size(void);
+ #define STORE_LE(field, value) \
+ do { \
+ if (sizeof(field) == 4) \
+- field = cpu_to_le32(value); \
++ field = (typeof(field))cpu_to_le32(value); \
+ else if (sizeof(field) == 2) \
+- field = cpu_to_le16(value); \
++ field = (typeof(field))cpu_to_le16(value); \
+ else if (sizeof(field) == 1) \
+- field = (value); \
++ field = (typeof(field))(value); \
+ else \
+ BUG_wrong_field_size(); \
+ } while (0)
+diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
+index a9a65aa..51c5b78 100644
+--- a/util-linux/mkfs_vfat.c
++++ b/util-linux/mkfs_vfat.c
+@@ -174,11 +174,11 @@ void BUG_unsupported_field_size(void);
+ #define STORE_LE(field, value) \
+ do { \
+ if (sizeof(field) == 4) \
+- field = cpu_to_le32(value); \
++ field = (typeof(field))cpu_to_le32(value); \
+ else if (sizeof(field) == 2) \
+- field = cpu_to_le16(value); \
++ field = (typeof(field))cpu_to_le16(value); \
+ else if (sizeof(field) == 1) \
+- field = (value); \
++ field = (typeof(field))(value); \
+ else \
+ BUG_unsupported_field_size(); \
+ } while (0)
+--
+1.7.0.3
+
diff --git a/patches/busybox-1.16.1/series b/patches/busybox-1.16.1/series
new file mode 100644
index 000000000..7e2b3684c
--- /dev/null
+++ b/patches/busybox-1.16.1/series
@@ -0,0 +1,2 @@
+0001-reactivate-check-for-tty.patch
+0002-silence-errors-on-BE-platforms.patch
diff --git a/patches/confuse-2.6/autogen.sh b/patches/cgicc-3.2.9/autogen.sh
index 9f8a4cb7d..9f8a4cb7d 120000
--- a/patches/confuse-2.6/autogen.sh
+++ b/patches/cgicc-3.2.9/autogen.sh
diff --git a/patches/confuse-2.6/confuse-2.6-werror.diff b/patches/confuse-2.6/confuse-2.6-werror.diff
deleted file mode 100644
index 7e7fbbf74..000000000
--- a/patches/confuse-2.6/confuse-2.6-werror.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Robert Schwebel <r.schwebel@pengutronix.de>
-Subject: [patch] remove -Werror
-
-With gcc-4.3.2 I get this error:
-
-cc1: warnings being treated as errors
-lexer.c:1638: error: 'input' defined but not used
-make[3]: *** [lexer.lo] Error 1
-
-Fix it temporarily by removing -Werror.
-
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-
----
- src/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: confuse-2.6/src/Makefile.am
-===================================================================
---- confuse-2.6.orig/src/Makefile.am
-+++ confuse-2.6/src/Makefile.am
-@@ -10,7 +10,7 @@ localedir = $(datadir)/locale
- DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-
- if cc_is_gcc
--AM_CFLAGS=-Wall -Werror
-+AM_CFLAGS=-Wall
- endif
-
- LIBS = @LIBS@
diff --git a/patches/confuse-2.6/fix-warning.diff b/patches/confuse-2.6/fix-warning.diff
new file mode 100644
index 000000000..c8291e7e6
--- /dev/null
+++ b/patches/confuse-2.6/fix-warning.diff
@@ -0,0 +1,466 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: [patch] fix warning
+
+With gcc-4.3.2 I get this error:
+
+cc1: warnings being treated as errors
+lexer.c:1638: error: 'input' defined but not used
+make[3]: *** [lexer.lo] Error 1
+
+Add "#define YY_NO_INPUT" to lexer.l to fix this.
+lexer.c is regenerated with flex.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ src/lexer.c | 108 ++++++++++++++++++++++++++++++------------------------------
+ src/lexer.l | 2 +
+ 2 files changed, 57 insertions(+), 53 deletions(-)
+
+Index: b/src/lexer.l
+===================================================================
+--- a/src/lexer.l
++++ b/src/lexer.l
+@@ -36,6 +36,8 @@
+ #endif
+ #define N_(str) str
+
++#define YY_NO_INPUT
++
+ typedef char * YYSTYPE;
+ extern YYSTYPE cfg_yylval;
+
+Index: b/src/lexer.c
+===================================================================
+--- a/src/lexer.c
++++ b/src/lexer.c
+@@ -336,7 +336,7 @@ void cfg_yyfree (void * );
+
+ /* Begin user sect3 */
+
+-#define cfg_yywrap() 1
++#define cfg_yywrap(n) 1
+ #define YY_SKIP_YYWRAP
+
+ typedef unsigned char YY_CHAR;
+@@ -574,6 +574,8 @@ char *cfg_yytext;
+ #endif
+ #define N_(str) str
+
++#define YY_NO_INPUT
++
+ typedef char * YYSTYPE;
+ extern YYSTYPE cfg_yylval;
+
+@@ -603,7 +605,7 @@ static YY_BUFFER_STATE string_scan_state
+
+
+
+-#line 607 "lexer.c"
++#line 609 "lexer.c"
+
+ #define INITIAL 0
+ #define comment 1
+@@ -759,10 +761,10 @@ YY_DECL
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+-#line 73 "lexer.l"
++#line 75 "lexer.l"
+
+
+-#line 766 "lexer.c"
++#line 768 "lexer.c"
+
+ if ( !(yy_init) )
+ {
+@@ -847,90 +849,90 @@ do_action: /* This label is used only to
+
+ case 1:
+ YY_RULE_SETUP
+-#line 75 "lexer.l"
++#line 77 "lexer.l"
+ /* eat up whitespace */
+ YY_BREAK
+ case 2:
+ /* rule 2 can match eol */
+ YY_RULE_SETUP
+-#line 77 "lexer.l"
++#line 79 "lexer.l"
+ cfg->line++; /* keep track of line number */
+ YY_BREAK
+ case 3:
+ YY_RULE_SETUP
+-#line 79 "lexer.l"
++#line 81 "lexer.l"
+ /* eat up one-line comments */
+ YY_BREAK
+ /* special keywords/symbols
+ */
+ case 4:
+ YY_RULE_SETUP
+-#line 83 "lexer.l"
++#line 85 "lexer.l"
+ { cfg_yylval = cfg_yytext; return '{'; }
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
+-#line 84 "lexer.l"
++#line 86 "lexer.l"
+ { cfg_yylval = cfg_yytext; return '}'; }
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
+-#line 85 "lexer.l"
++#line 87 "lexer.l"
+ { cfg_yylval = cfg_yytext; return '('; }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
+-#line 86 "lexer.l"
++#line 88 "lexer.l"
+ { cfg_yylval = cfg_yytext; return ')'; }
+ YY_BREAK
+ case 8:
+ YY_RULE_SETUP
+-#line 87 "lexer.l"
++#line 89 "lexer.l"
+ { cfg_yylval = cfg_yytext; return '='; }
+ YY_BREAK
+ case 9:
+ YY_RULE_SETUP
+-#line 88 "lexer.l"
++#line 90 "lexer.l"
+ { cfg_yylval = cfg_yytext; return '+'; }
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
+-#line 89 "lexer.l"
++#line 91 "lexer.l"
+ { cfg_yylval = cfg_yytext; return ','; }
+ YY_BREAK
+ /* handle multi-line C-style comments
+ */
+ case 11:
+ YY_RULE_SETUP
+-#line 93 "lexer.l"
++#line 95 "lexer.l"
+ BEGIN(comment);
+ YY_BREAK
+ case 12:
+ YY_RULE_SETUP
+-#line 94 "lexer.l"
++#line 96 "lexer.l"
+ /* eat anything that's not a '*' */
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
+-#line 95 "lexer.l"
++#line 97 "lexer.l"
+ /* eat up '*'s not followed by '/'s */
+ YY_BREAK
+ case 14:
+ /* rule 14 can match eol */
+ YY_RULE_SETUP
+-#line 96 "lexer.l"
++#line 98 "lexer.l"
+ cfg->line++;
+ YY_BREAK
+ case 15:
+ YY_RULE_SETUP
+-#line 97 "lexer.l"
++#line 99 "lexer.l"
+ BEGIN(INITIAL);
+ YY_BREAK
+ /* handle C-style strings
+ */
+ case 16:
+ YY_RULE_SETUP
+-#line 101 "lexer.l"
++#line 103 "lexer.l"
+ {
+ qstring_index = 0;
+ BEGIN(dq_str);
+@@ -938,7 +940,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 17:
+ YY_RULE_SETUP
+-#line 105 "lexer.l"
++#line 107 "lexer.l"
+ { /* saw closing quote - all done */
+ BEGIN(INITIAL);
+ qputc('\0');
+@@ -949,7 +951,7 @@ YY_RULE_SETUP
+ case 18:
+ /* rule 18 can match eol */
+ YY_RULE_SETUP
+-#line 111 "lexer.l"
++#line 113 "lexer.l"
+ { /* environment variable substitution */
+ char *var;
+ char *e;
+@@ -969,7 +971,7 @@ YY_RULE_SETUP
+ case 19:
+ /* rule 19 can match eol */
+ YY_RULE_SETUP
+-#line 126 "lexer.l"
++#line 128 "lexer.l"
+ {
+ qputc('\n');
+ cfg->line++;
+@@ -978,7 +980,7 @@ YY_RULE_SETUP
+ case 20:
+ /* rule 20 can match eol */
+ YY_RULE_SETUP
+-#line 130 "lexer.l"
++#line 132 "lexer.l"
+ { /* allow continuing on next line */
+ /* no-op */
+ cfg->line++;
+@@ -986,7 +988,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
+-#line 134 "lexer.l"
++#line 136 "lexer.l"
+ { /* octal escape sequence */
+ int result;
+ sscanf(cfg_yytext + 1, "%o", &result);
+@@ -999,7 +1001,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
+-#line 143 "lexer.l"
++#line 145 "lexer.l"
+ {
+ cfg_error(cfg, _("bad escape sequence '%s'"), cfg_yytext);
+ return 0;
+@@ -1007,7 +1009,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
+-#line 147 "lexer.l"
++#line 149 "lexer.l"
+ { /* hexadecimal escape sequence */
+ int result;
+ sscanf(cfg_yytext + 2, "%x", &result);
+@@ -1016,70 +1018,70 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
+-#line 152 "lexer.l"
++#line 154 "lexer.l"
+ {
+ qputc('\n');
+ }
+ YY_BREAK
+ case 25:
+ YY_RULE_SETUP
+-#line 155 "lexer.l"
++#line 157 "lexer.l"
+ {
+ qputc('\r');
+ }
+ YY_BREAK
+ case 26:
+ YY_RULE_SETUP
+-#line 158 "lexer.l"
++#line 160 "lexer.l"
+ {
+ qputc('\b');
+ }
+ YY_BREAK
+ case 27:
+ YY_RULE_SETUP
+-#line 161 "lexer.l"
++#line 163 "lexer.l"
+ {
+ qputc('\f');
+ }
+ YY_BREAK
+ case 28:
+ YY_RULE_SETUP
+-#line 164 "lexer.l"
++#line 166 "lexer.l"
+ {
+ qputc('\007');
+ }
+ YY_BREAK
+ case 29:
+ YY_RULE_SETUP
+-#line 167 "lexer.l"
++#line 169 "lexer.l"
+ {
+ qputc('\033');
+ }
+ YY_BREAK
+ case 30:
+ YY_RULE_SETUP
+-#line 170 "lexer.l"
++#line 172 "lexer.l"
+ {
+ qputc('\t');
+ }
+ YY_BREAK
+ case 31:
+ YY_RULE_SETUP
+-#line 173 "lexer.l"
++#line 175 "lexer.l"
+ {
+ qputc('\v');
+ }
+ YY_BREAK
+ case 32:
+ YY_RULE_SETUP
+-#line 176 "lexer.l"
++#line 178 "lexer.l"
+ {
+ qputc(cfg_yytext[1]);
+ }
+ YY_BREAK
+ case 33:
+ YY_RULE_SETUP
+-#line 179 "lexer.l"
++#line 181 "lexer.l"
+ {
+ char *yptr = cfg_yytext;
+ while(*yptr) {
+@@ -1090,7 +1092,7 @@ YY_RULE_SETUP
+ /* single-quoted string ('...') */
+ case 34:
+ YY_RULE_SETUP
+-#line 187 "lexer.l"
++#line 189 "lexer.l"
+ {
+ qstring_index = 0;
+ BEGIN(sq_str);
+@@ -1098,7 +1100,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+-#line 191 "lexer.l"
++#line 193 "lexer.l"
+ { /* saw closing quote - all done */
+ BEGIN(INITIAL);
+ qputc('\0');
+@@ -1109,7 +1111,7 @@ YY_RULE_SETUP
+ case 36:
+ /* rule 36 can match eol */
+ YY_RULE_SETUP
+-#line 197 "lexer.l"
++#line 199 "lexer.l"
+ {
+ qputc('\n');
+ cfg->line++;
+@@ -1118,7 +1120,7 @@ YY_RULE_SETUP
+ case 37:
+ /* rule 37 can match eol */
+ YY_RULE_SETUP
+-#line 201 "lexer.l"
++#line 203 "lexer.l"
+ { /* allow continuing on next line */
+ /* no-op */
+ cfg->line++;
+@@ -1126,7 +1128,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 38:
+ YY_RULE_SETUP
+-#line 205 "lexer.l"
++#line 207 "lexer.l"
+ {
+ qputc(cfg_yytext[1]);
+ }
+@@ -1134,7 +1136,7 @@ YY_RULE_SETUP
+ case 39:
+ /* rule 39 can match eol */
+ YY_RULE_SETUP
+-#line 208 "lexer.l"
++#line 210 "lexer.l"
+ {
+ qputc(cfg_yytext[0]);
+ qputc(cfg_yytext[1]);
+@@ -1142,7 +1144,7 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 40:
+ YY_RULE_SETUP
+-#line 212 "lexer.l"
++#line 214 "lexer.l"
+ {
+ char *cp = cfg_yytext;
+ while(*cp != '\0') {
+@@ -1151,7 +1153,7 @@ YY_RULE_SETUP
+ }
+ YY_BREAK
+ case YY_STATE_EOF(sq_str):
+-#line 218 "lexer.l"
++#line 220 "lexer.l"
+ {
+ cfg_error(cfg, _("unterminated string constant"));
+ return 0;
+@@ -1160,7 +1162,7 @@ case YY_STATE_EOF(sq_str):
+ case YY_STATE_EOF(INITIAL):
+ case YY_STATE_EOF(comment):
+ case YY_STATE_EOF(dq_str):
+-#line 223 "lexer.l"
++#line 225 "lexer.l"
+ {
+ if( string_scan_state != 0 || cfg_include_stack_ptr <= 0 )
+ {
+@@ -1183,7 +1185,7 @@ case YY_STATE_EOF(dq_str):
+ case 41:
+ /* rule 41 can match eol */
+ YY_RULE_SETUP
+-#line 243 "lexer.l"
++#line 245 "lexer.l"
+ {
+ char *var;
+ char *e;
+@@ -1208,7 +1210,7 @@ YY_RULE_SETUP
+ */
+ case 42:
+ YY_RULE_SETUP
+-#line 265 "lexer.l"
++#line 267 "lexer.l"
+ {
+ cfg_yylval = cfg_yytext;
+ return CFGT_STR;
+@@ -1216,10 +1218,10 @@ YY_RULE_SETUP
+ YY_BREAK
+ case 43:
+ YY_RULE_SETUP
+-#line 270 "lexer.l"
++#line 272 "lexer.l"
+ ECHO;
+ YY_BREAK
+-#line 1223 "lexer.c"
++#line 1225 "lexer.c"
+
+ case YY_END_OF_BUFFER:
+ {
+@@ -1448,7 +1450,7 @@ static int yy_get_next_buffer (void)
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+- (yy_n_chars), (size_t) num_to_read );
++ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+@@ -1949,7 +1951,7 @@ YY_BUFFER_STATE cfg_yy_scan_buffer (cha
+
+ /** Setup the input buffer state to scan a string. The next call to cfg_yylex() will
+ * scan from a @e copy of @a str.
+- * @param yystr a NUL-terminated string to scan
++ * @param str a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+@@ -2203,7 +2205,7 @@ void cfg_yyfree (void * ptr )
+
+ #define YYTABLES_NAME "yytables"
+
+-#line 270 "lexer.l"
++#line 272 "lexer.l"
+
+
+
diff --git a/patches/confuse-2.6/series b/patches/confuse-2.6/series
index 6692c873e..ba0fefeb2 100644
--- a/patches/confuse-2.6/series
+++ b/patches/confuse-2.6/series
@@ -1 +1 @@
-confuse-2.6-werror.diff
+fix-warning.diff
diff --git a/patches/coreutils-8.2/coreutils.patch69 b/patches/coreutils-8.2/coreutils.patch69
deleted file mode 100644
index 5fd4bf4a7..000000000
--- a/patches/coreutils-8.2/coreutils.patch69
+++ /dev/null
@@ -1,34 +0,0 @@
-From 99b9fc3eeff6b8d7544ae9657f026f1c0ed77e57 Mon Sep 17 00:00:00 2001
-From: Eric Blake <ebb9@byu.net>
-Date: Sat, 26 Dec 2009 10:37:44 -0700
-Subject: [PATCH] tac: supply link dependency
-
-* src/Makefile.am (tac_LDADD): Add LIB_GETHRXTIME.
-* THANKS: Update.
-Reported by Robert Schwebel.
----
- src/Makefile.am | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 208cb6c..86d78f7 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -325,12 +325,13 @@ ls_LDADD += $(LIB_CLOCK_GETTIME)
- pr_LDADD += $(LIB_CLOCK_GETTIME)
- touch_LDADD += $(LIB_CLOCK_GETTIME)
-
--# for gethrxtime, randint, randread, gen_tempname
-+# for gethrxtime, randint, randread, gen_tempname, mkstemp
- dd_LDADD += $(LIB_GETHRXTIME)
- mktemp_LDADD += $(LIB_GETHRXTIME)
- shred_LDADD += $(LIB_GETHRXTIME)
- shuf_LDADD += $(LIB_GETHRXTIME)
- sort_LDADD += $(LIB_GETHRXTIME)
-+tac_LDADD += $(LIB_GETHRXTIME)
-
- # for cap_get_file
- ls_LDADD += $(LIB_CAP)
---
-1.6.4.2
-
diff --git a/patches/coreutils-8.2/series b/patches/coreutils-8.2/series
deleted file mode 100644
index 1b7a0d327..000000000
--- a/patches/coreutils-8.2/series
+++ /dev/null
@@ -1 +0,0 @@
-coreutils.patch69
diff --git a/patches/coreutils-8.4/0001-tail-include-sys-vfs.h-if-possible-when-sys-statfs.h.patch b/patches/coreutils-8.4/0001-tail-include-sys-vfs.h-if-possible-when-sys-statfs.h.patch
new file mode 100644
index 000000000..c1f487c36
--- /dev/null
+++ b/patches/coreutils-8.4/0001-tail-include-sys-vfs.h-if-possible-when-sys-statfs.h.patch
@@ -0,0 +1,30 @@
+From 98dacf492e2e6f2153455cb4179058578cee20ff Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Sun, 4 Apr 2010 09:15:07 +0200
+Subject: [PATCH] tail: include sys/vfs.h (if possible) when sys/statfs.h is absent
+
+* src/tail.c [HAVE_INOTIFY && !HAVE_SYS_STATFS_H]: Include <sys/vfs.h>.
+
+(cherry-picked from upstream commit 98dacf492e2e6f2153455cb4179058578cee20ff)
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/tail.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/tail.c b/src/tail.c
+index 02c4a1a..9e95dee 100644
+--- a/src/tail.c
++++ b/src/tail.c
+@@ -56,6 +56,8 @@
+ # include "fs.h"
+ # if HAVE_SYS_STATFS_H
+ # include <sys/statfs.h>
++# elif HAVE_SYS_VFS_H
++# include <sys/vfs.h>
+ # endif
+ #endif
+
+--
+1.7.0.3
+
diff --git a/patches/coreutils-8.4/0002-tail-HACK-touch-man-file-to-avoid-re-generation.patch b/patches/coreutils-8.4/0002-tail-HACK-touch-man-file-to-avoid-re-generation.patch
new file mode 100644
index 000000000..033a54d72
--- /dev/null
+++ b/patches/coreutils-8.4/0002-tail-HACK-touch-man-file-to-avoid-re-generation.patch
@@ -0,0 +1,26 @@
+From a4f559d56a4c013e20919f83961e3c870ecc6df5 Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Sat, 3 Apr 2010 14:52:11 +0200
+Subject: [PATCH 2/2] [tail] HACK: touch man file to avoid re-generation
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ man/tail.1 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/man/tail.1 b/man/tail.1
+index 3d18380..74c5a54 100644
+--- a/man/tail.1
++++ b/man/tail.1
+@@ -92,7 +92,7 @@ There is NO WARRANTY, to the extent permitted by law.
+ .SH "SEE ALSO"
+ The full documentation for
+ .B tail
+-is maintained as a Texinfo manual. If the
++is maintained as a Texinfo manual. If the
+ .B info
+ and
+ .B tail
+--
+1.7.0.3
+
diff --git a/patches/coreutils-8.4/series b/patches/coreutils-8.4/series
new file mode 100644
index 000000000..f240386c0
--- /dev/null
+++ b/patches/coreutils-8.4/series
@@ -0,0 +1,2 @@
+0001-tail-include-sys-vfs.h-if-possible-when-sys-statfs.h.patch
+0002-tail-HACK-touch-man-file-to-avoid-re-generation.patch
diff --git a/patches/curl-7.19.7/0001-don-t-include-LDFLAGS-int-pkg-config-libs.patch b/patches/curl-7.19.7/0001-don-t-include-LDFLAGS-int-pkg-config-libs.patch
deleted file mode 100644
index 837f2c9c4..000000000
--- a/patches/curl-7.19.7/0001-don-t-include-LDFLAGS-int-pkg-config-libs.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 2c91cf9870e147f1d2b0e5f4149fa4aa999818e3 Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Sat, 9 Jan 2010 19:22:37 +0100
-Subject: [PATCH 1/2] don't include LDFLAGS int pkg-config libs
-
-curl saves the LDFLAGS set during configure into its pkg-config file.
-So -Wl stuff ends up in the .pc file, which is really bad, and breaks
-if there are multiple -Wl in our LDFLAGS (which are in PTXdist)
-
-This bug was submitted to the curl bug tracking system:
-https://sourceforge.net/tracker/?func=detail&aid=2893592&group_id=976&atid=100976
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
-20091106: rsc: added to bug tracker
-20091117: rsc: applied in upstream! \o/
----
- libcurl.pc.in | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/libcurl.pc.in b/libcurl.pc.in
-index 25beadd..78ea89c 100644
---- a/libcurl.pc.in
-+++ b/libcurl.pc.in
-@@ -35,6 +35,6 @@ Name: libcurl
- URL: http://curl.haxx.se/
- Description: Library to transfer files with ftp, http, etc.
- Version: @VERSION@
--Libs: -L${libdir} -lcurl @LDFLAGS@ @LIBS@
-+Libs: -L${libdir} -lcurl @LIBS@
- Libs.private: @LIBCURL_LIBS@ @LIBS@
- Cflags: -I${includedir}
---
-1.6.6
-
diff --git a/patches/curl-7.19.7/series b/patches/curl-7.19.7/series
deleted file mode 100644
index 45b6f7642..000000000
--- a/patches/curl-7.19.7/series
+++ /dev/null
@@ -1,2 +0,0 @@
-0001-don-t-include-LDFLAGS-int-pkg-config-libs.patch
-0002-curl-config.in-add-SYSROOT-support.patch
diff --git a/patches/curl-7.19.7/0002-curl-config.in-add-SYSROOT-support.patch b/patches/curl-7.20.0/0001-curl-config.in-add-SYSROOT-support.patch
index d971b2ba1..e21f2ab50 100644
--- a/patches/curl-7.19.7/0002-curl-config.in-add-SYSROOT-support.patch
+++ b/patches/curl-7.20.0/0001-curl-config.in-add-SYSROOT-support.patch
@@ -6,13 +6,11 @@ Subject: [PATCH 2/2] curl-config.in: add SYSROOT support
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
curl-config.in | 8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
+ 1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/curl-config.in b/curl-config.in
-index 1c439a1..ff52730 100644
--- a/curl-config.in
+++ b/curl-config.in
-@@ -122,16 +122,16 @@ while test $# -gt 0; do
+@@ -123,16 +123,16 @@ while test $# -gt 0; do
;;
--cflags)
@@ -33,6 +31,3 @@ index 1c439a1..ff52730 100644
else
CURLLIBDIR=""
fi
---
-1.6.6
-
diff --git a/patches/curl-7.20.0/series b/patches/curl-7.20.0/series
new file mode 100644
index 000000000..f55879936
--- /dev/null
+++ b/patches/curl-7.20.0/series
@@ -0,0 +1 @@
+0001-curl-config.in-add-SYSROOT-support.patch
diff --git a/patches/dbus-1.2.16/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch b/patches/dbus-1.2.24/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch
index cccaa3fb9..cccaa3fb9 100644
--- a/patches/dbus-1.2.16/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch
+++ b/patches/dbus-1.2.24/0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch
diff --git a/patches/dbus-1.2.16/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch b/patches/dbus-1.2.24/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch
index f9d432079..f9d432079 100644
--- a/patches/dbus-1.2.16/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch
+++ b/patches/dbus-1.2.24/0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch
diff --git a/patches/coreutils-8.2/autogen.sh b/patches/dbus-1.2.24/autogen.sh
index 9f8a4cb7d..9f8a4cb7d 120000
--- a/patches/coreutils-8.2/autogen.sh
+++ b/patches/dbus-1.2.24/autogen.sh
diff --git a/patches/dbus-1.2.24/make-pkgconfig-file-relocatable.diff b/patches/dbus-1.2.24/make-pkgconfig-file-relocatable.diff
new file mode 100644
index 000000000..1757b4ba6
--- /dev/null
+++ b/patches/dbus-1.2.24/make-pkgconfig-file-relocatable.diff
@@ -0,0 +1,39 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: make dbus-1.pc relocatable
+
+Don't use expanded paths in dbus-1.pc.in
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure.in | 2 +-
+ dbus-1.pc.in | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -1330,7 +1330,7 @@ AC_DEFINE_UNQUOTED(DBUS_DATADIR,"$DBUS_D
+
+ #### Directory to install dbus-daemon
+ if test -z "$with_dbus_daemondir" ; then
+- DBUS_DAEMONDIR=$EXPANDED_BINDIR
++ DBUS_DAEMONDIR=$bindir
+ else
+ DBUS_DAEMONDIR=$with_dbus_daemondir
+ fi
+Index: b/dbus-1.pc.in
+===================================================================
+--- a/dbus-1.pc.in
++++ b/dbus-1.pc.in
+@@ -3,8 +3,8 @@ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+ system_bus_default_address=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
+-sysconfdir=@EXPANDED_SYSCONFDIR@
+-session_bus_services_dir=@EXPANDED_DATADIR@/dbus-1/services
++sysconfdir=@sysconfdir@
++session_bus_services_dir=@datadir@/dbus-1/services
+ daemondir=@DBUS_DAEMONDIR@
+
+ Name: dbus
diff --git a/patches/dbus-1.2.16/series b/patches/dbus-1.2.24/series
index 430010de0..b40f40483 100644
--- a/patches/dbus-1.2.16/series
+++ b/patches/dbus-1.2.24/series
@@ -1,2 +1,3 @@
0001-dbus-daemon-launch-helper-fix-build-with-libxml.patch
0002-dbus-change-DBUS_MACHINE_UUID_FILE-path.patch
+make-pkgconfig-file-relocatable.diff
diff --git a/patches/efax-0.9/efax-0.9-config.patch b/patches/efax-0.9/efax-0.9-config.patch
index 6f3dce195..8a874036d 100644
--- a/patches/efax-0.9/efax-0.9-config.patch
+++ b/patches/efax-0.9/efax-0.9-config.patch
@@ -1,6 +1,11 @@
---- efax-0.9/Makefile.config 1999-03-12 02:00:34.000000000 +0100
-+++ efax-0.9/Makefile 2002-06-18 12:43:34.000000000 +0200
-@@ -8,7 +8,7 @@
+---
+ Makefile | 2 +-
+ fax | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,7 @@ CC=gcc
# Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror
# is undefined
@@ -9,8 +14,8 @@
LDFLAGS=
# Change the following to the destination directories for
---- efax-0.9/fax.config 1999-03-24 09:07:28.000000000 +0100
-+++ efax-0.9/fax 2002-06-18 12:41:53.000000000 +0200
+--- a/fax
++++ b/fax
@@ -17,9 +17,9 @@
# The names of the fax script, efax and efix, including full path
# if necessary.
@@ -24,7 +29,7 @@
# The device to which the fax modem is connected (e.g. ttya for
# /dev/ttya). Use a dial-out (cua) device if available. If
-@@ -28,16 +28,16 @@
+@@ -28,16 +28,16 @@ EFIX=efix
# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
@@ -44,7 +49,7 @@
# The preferred page size for creating and printing faxes.
# Allowed values are "letter", "legal", and "a4".
-@@ -67,7 +67,7 @@
+@@ -67,7 +67,7 @@ VIEWCMD="xloadimage stdin" # best
# The name of the Ghostscript executable including full path if
# necessary. Only required if faxing Postscript files.
diff --git a/patches/efax-0.9/efax-0.9-manpage.patch b/patches/efax-0.9/efax-0.9-manpage.patch
index 32e5ab0cb..b747954fd 100644
--- a/patches/efax-0.9/efax-0.9-manpage.patch
+++ b/patches/efax-0.9/efax-0.9-manpage.patch
@@ -1,6 +1,10 @@
---- efax-0.9/efax.1 2002/07/22 05:28:31 1.1
-+++ efax-0.9/efax.1 2002/07/22 05:30:21
-@@ -791,8 +791,8 @@
+---
+ efax.1 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/efax.1
++++ b/efax.1
+@@ -791,8 +791,8 @@ locking will only work if all programs u
efax will lock the modem device before opening it if one or more
UUCP lock file names are given with \fB-x\fP options. Most
@@ -10,3 +14,4 @@
+\fB/var/lock\fP directories and use the name \fBLCK..\fP\fIdev\fP
where \fIdev\fP is the name of the device file in the /dev
directory that is to be locked.
+
diff --git a/patches/efax-0.9/efax-0.9-misc.patch b/patches/efax-0.9/efax-0.9-misc.patch
index 64029e9e0..7c218746c 100644
--- a/patches/efax-0.9/efax-0.9-misc.patch
+++ b/patches/efax-0.9/efax-0.9-misc.patch
@@ -1,6 +1,10 @@
---- efax-0.9/efax.c.orig 2003-05-20 14:33:31.000000000 +0200
-+++ efax-0.9/efax.c 2003-05-20 14:32:51.000000000 +0200
-@@ -759,7 +759,7 @@
+---
+ efax.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/efax.c
++++ b/efax.c
+@@ -759,7 +759,7 @@ int readfaxruns ( TFILE *f, DECODER *d,
c = tgetd ( f, TO_CHAR ) ;
rd_state = ( rd_state & rd_allowed[c] ) ?
diff --git a/patches/efax-0.9/efax-0.9-nullptr.patch b/patches/efax-0.9/efax-0.9-nullptr.patch
index d98e68eda..67cdf852d 100644
--- a/patches/efax-0.9/efax-0.9-nullptr.patch
+++ b/patches/efax-0.9/efax-0.9-nullptr.patch
@@ -1,6 +1,11 @@
---- efax-0.9/efax.c.nullptr Sat Mar 27 09:24:10 1999
-+++ efax-0.9/efax.c Wed Jan 12 22:17:21 2000
-@@ -2186,6 +2186,7 @@
+---
+ efax.c | 1 +
+ efaxos.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/efax.c
++++ b/efax.c
+@@ -2186,6 +2186,7 @@ int main( int argc, char **argv)
/* print initial message to both stderr & stdout */
argv0 = argv[0] ;
@@ -8,9 +13,9 @@
verb[1] = "ewia" ;
msg ( "I " Version " " Copyright ) ;
argv0 = efaxbasename ( argv0 ) ;
---- efax-0.9/efaxos.c.nullptr Tue Mar 2 01:18:30 1999
-+++ efax-0.9/efaxos.c Wed Jan 12 22:16:04 2000
-@@ -482,7 +482,7 @@
+--- a/efaxos.c
++++ b/efaxos.c
+@@ -482,7 +482,7 @@ int lockall ( char **lkfiles, int log )
{
int err = 0 ;
char **p = lkfiles ;
@@ -19,7 +24,7 @@
if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ;
return err ;
}
-@@ -495,7 +495,7 @@
+@@ -495,7 +495,7 @@ int unlockall ( char **lkfiles )
{
int err = 0, i ;
char **p = lkfiles ;
diff --git a/patches/efax-0.9/efax-0.9-numlines.patch b/patches/efax-0.9/efax-0.9-numlines.patch
index f66c43ce2..3fdd13041 100644
--- a/patches/efax-0.9/efax-0.9-numlines.patch
+++ b/patches/efax-0.9/efax-0.9-numlines.patch
@@ -3,10 +3,13 @@ Without this patch, lines on page 2 and subsequent are missing if the
specified number of lines per page is lower than the default (66).
<mschwendt@yahoo.com>
-diff -Naur efax-0.9-orig/efix.c efax-0.9/efix.c
---- efax-0.9-orig/efix.c Tue Mar 2 07:02:47 1999
-+++ efax-0.9/efix.c Fri Aug 25 00:34:18 2000
-@@ -297,6 +297,9 @@
+---
+ efix.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/efix.c
++++ b/efix.c
+@@ -297,6 +297,9 @@ int main( int argc, char **argv)
if ( ! err && ! done ) {
@@ -16,13 +19,13 @@ diff -Naur efax-0.9-orig/efix.c efax-0.9/efix.c
if ( nxtoptind < argc ) {
ifnames = argv + nxtoptind ;
if ( argv [ argc ] ) {
-@@ -307,9 +310,6 @@
- } else {
+@@ -308,9 +311,6 @@ int main( int argc, char **argv)
err = msg ( "E3 missing input file name" ) ;
}
--
+
- if ( pfont ) ifile.font = pfont ;
- if ( pglines ) ifile.pglines = pglines ;
-
+-
newIFILE ( &ovfile, ovfnames ) ;
+ newOFILE ( &ofile, oformat, ofname, 0, 0, 0, 0 ) ;
diff --git a/patches/efax-0.9/efax08a-time.patch b/patches/efax-0.9/efax08a-time.patch
index 440e59aa3..ae06875a4 100644
--- a/patches/efax-0.9/efax08a-time.patch
+++ b/patches/efax-0.9/efax08a-time.patch
@@ -1,5 +1,9 @@
---- efax08a/efaxio.c.ewt Thu Dec 1 21:26:31 2016
-+++ efax08a/efaxio.c Thu Dec 1 21:26:31 2016
+---
+ efaxio.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/efaxio.c
++++ b/efaxio.c
@@ -2,6 +2,7 @@
#include <signal.h>
#include <stdio.h>
diff --git a/patches/elfkickers-2.0a.orig/0001-01_add_toplevel_makefile.diff.patch b/patches/elfkickers-2.0a.orig/0001-01_add_toplevel_makefile.diff.patch
new file mode 100644
index 000000000..c8edff780
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0001-01_add_toplevel_makefile.diff.patch
@@ -0,0 +1,26 @@
+From 0390735daaefeda85dd1f0bcfdcb6dbcd1910aec Mon Sep 17 00:00:00 2001
+From: the debian project <info@debian.org>
+Date: Thu, 11 Mar 2010 01:11:11 +0100
+Subject: [PATCH 1/6] 01_add_toplevel_makefile.diff
+
+---
+ Makefile | 7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..2a93406
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,7 @@
++SUBDIRS = elfls elftoc rebind sstrip
++
++all:
++ set -e; for d in $(SUBDIRS); do cd $$d ; CFLAGS="$(CFLAGS)" CC=$(CC) $(MAKE) ; cd - ; done
++
++clean:
++ set -e; for d in $(SUBDIRS); do cd $$d ; $(MAKE) clean; cd - ; done
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/0002-02_update_subdirs_makefile.diff.patch b/patches/elfkickers-2.0a.orig/0002-02_update_subdirs_makefile.diff.patch
new file mode 100644
index 000000000..0887631db
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0002-02_update_subdirs_makefile.diff.patch
@@ -0,0 +1,82 @@
+From a3b73432021d9e0a2a987bdc73c1d5c71966d038 Mon Sep 17 00:00:00 2001
+From: the debian project <info@debian.org>
+Date: Thu, 11 Mar 2010 01:11:12 +0100
+Subject: [PATCH 2/6] 02_update_subdirs_makefile.diff
+
+---
+ ebfc/Makefile | 3 ---
+ elfls/Makefile | 2 +-
+ elftoc/Makefile | 4 ----
+ rebind/Makefile | 2 +-
+ sstrip/Makefile | 2 +-
+ 5 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/ebfc/Makefile b/ebfc/Makefile
+index 6ca1dc2..b0b75a8 100644
+--- a/ebfc/Makefile
++++ b/ebfc/Makefile
+@@ -1,8 +1,5 @@
+ # Makefile for ebfc
+
+-CC = gcc
+-CFLAGS = -ggdb -Wall
+-
+ ebfc: ebfc.o brainfuck.o libelfparts.a
+
+ ebfc.o: ebfc.c elfparts.h ebfc.h
+diff --git a/elfls/Makefile b/elfls/Makefile
+index 0009fdc..e199af1 100644
+--- a/elfls/Makefile
++++ b/elfls/Makefile
+@@ -1,7 +1,7 @@
+ # Makefile for elfls
+
+ elfls: elfls.c
+- gcc -ggdb -Wall -W -o elfls elfls.c
++ $(CC) $(CFLAGS) -W -o elfls elfls.c
+
+ clean:
+ rm -f elfls
+diff --git a/elftoc/Makefile b/elftoc/Makefile
+index 1aaa61b..7681169 100644
+--- a/elftoc/Makefile
++++ b/elftoc/Makefile
+@@ -1,9 +1,5 @@
+ # Makefile for elftoc
+
+-CC = gcc
+-CFLAGS = -ggdb -Wall
+-LDFLAGS = $(CFLAGS)
+-
+ OBJS = pieces.o addr.o shdrtab.o dynamic.o outbasic.o outtools.o out.o elftoc.o
+
+ elftoc: $(OBJS)
+diff --git a/rebind/Makefile b/rebind/Makefile
+index 6448da7..231a569 100644
+--- a/rebind/Makefile
++++ b/rebind/Makefile
+@@ -1,7 +1,7 @@
+ # Makefile for rebind
+
+ rebind: rebind.c
+- gcc -ggdb -Wall -W -o rebind rebind.c
++ $(CC) $(CFLAGS) -W -o rebind rebind.c
+
+ clean:
+ rm -f rebind
+diff --git a/sstrip/Makefile b/sstrip/Makefile
+index dad4c92..1f05c3d 100644
+--- a/sstrip/Makefile
++++ b/sstrip/Makefile
+@@ -1,7 +1,7 @@
+ # Makefile for sstrip
+
+ sstrip: sstrip.c
+- gcc -ggdb -Wall -W -o sstrip sstrip.c
++ $(CC) $(CFLAGS) -W -o sstrip sstrip.c
+
+ clean:
+ rm -f sstrip
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/0003-03_add_include_string.h.diff.patch b/patches/elfkickers-2.0a.orig/0003-03_add_include_string.h.diff.patch
new file mode 100644
index 000000000..1676f879f
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0003-03_add_include_string.h.diff.patch
@@ -0,0 +1,50 @@
+From e0756d649ded0b9807c3df263519e3841e493244 Mon Sep 17 00:00:00 2001
+From: the debian project <info@debian.org>
+Date: Thu, 11 Mar 2010 01:11:12 +0100
+Subject: [PATCH 3/6] 03_add_include_string.h.diff
+
+---
+ ebfc/rel.c | 1 +
+ elfls/elfls.c | 1 +
+ elftoc/shdrtab.c | 1 +
+ 3 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/ebfc/rel.c b/ebfc/rel.c
+index 9c76d03..1c53d47 100644
+--- a/ebfc/rel.c
++++ b/ebfc/rel.c
+@@ -5,6 +5,7 @@
+ */
+
+ #include <stdlib.h>
++#include <string.h>
+ #include <linux/elf.h>
+ #include "elfparts.h"
+ #include "gen.h"
+diff --git a/elfls/elfls.c b/elfls/elfls.c
+index 5ccc944..feb5b27 100644
+--- a/elfls/elfls.c
++++ b/elfls/elfls.c
+@@ -4,6 +4,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <unistd.h>
+diff --git a/elftoc/shdrtab.c b/elftoc/shdrtab.c
+index 729a05c..48e1459 100644
+--- a/elftoc/shdrtab.c
++++ b/elftoc/shdrtab.c
+@@ -5,6 +5,7 @@
+ */
+
+ #include <stdlib.h>
++#include <string.h>
+ #include <ctype.h>
+ #include "gen.h"
+ #include "elf.h"
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/0004-04_bsd_include_elf.h.diff.patch b/patches/elfkickers-2.0a.orig/0004-04_bsd_include_elf.h.diff.patch
new file mode 100644
index 000000000..69c465834
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0004-04_bsd_include_elf.h.diff.patch
@@ -0,0 +1,249 @@
+From 34e5fd9f9893c1155b72b0358fb744abffa0f093 Mon Sep 17 00:00:00 2001
+From: the debian project <info@debian.org>
+Date: Thu, 11 Mar 2010 01:11:13 +0100
+Subject: [PATCH 4/6] 04_bsd_include_elf.h.diff
+
+---
+ ebfc/brainfuck.c | 4 ++++
+ ebfc/dynamic.c | 4 ++++
+ ebfc/ebfc.c | 4 ++++
+ ebfc/ehdr.c | 4 ++++
+ ebfc/elfparts.c | 4 ++++
+ ebfc/got.c | 4 ++++
+ ebfc/hash.c | 4 ++++
+ ebfc/phdrtab.c | 4 ++++
+ ebfc/progbits.c | 4 ++++
+ ebfc/rel.c | 4 ++++
+ ebfc/shdrtab.c | 4 ++++
+ ebfc/strtab.c | 4 ++++
+ ebfc/symtab.c | 4 ++++
+ rebind/rebind.c | 4 ++++
+ 14 files changed, 56 insertions(+), 0 deletions(-)
+
+diff --git a/ebfc/brainfuck.c b/ebfc/brainfuck.c
+index 0d87e21..ccfb755 100644
+--- a/ebfc/brainfuck.c
++++ b/ebfc/brainfuck.c
+@@ -8,7 +8,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stddef.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "ebfc.h"
+
+diff --git a/ebfc/dynamic.c b/ebfc/dynamic.c
+index a92b447..b867716 100644
+--- a/ebfc/dynamic.c
++++ b/ebfc/dynamic.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/ebfc.c b/ebfc/ebfc.c
+index 1e971ce..b94270b 100644
+--- a/ebfc/ebfc.c
++++ b/ebfc/ebfc.c
+@@ -14,7 +14,11 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <getopt.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "ebfc.h"
+
+diff --git a/ebfc/ehdr.c b/ebfc/ehdr.c
+index f8048f9..7d84b3e 100644
+--- a/ebfc/ehdr.c
++++ b/ebfc/ehdr.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/elfparts.c b/ebfc/elfparts.c
+index bac38b9..312b60e 100644
+--- a/ebfc/elfparts.c
++++ b/ebfc/elfparts.c
+@@ -7,7 +7,11 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <errno.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/got.c b/ebfc/got.c
+index f1e9986..3f584d1 100644
+--- a/ebfc/got.c
++++ b/ebfc/got.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/hash.c b/ebfc/hash.c
+index 1ee53fc..f359a2f 100644
+--- a/ebfc/hash.c
++++ b/ebfc/hash.c
+@@ -6,7 +6,11 @@
+
+ #include <stdlib.h>
+ #include <string.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/phdrtab.c b/ebfc/phdrtab.c
+index d562d23..f4545ca 100644
+--- a/ebfc/phdrtab.c
++++ b/ebfc/phdrtab.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/progbits.c b/ebfc/progbits.c
+index 17a7533..8d7f93f 100644
+--- a/ebfc/progbits.c
++++ b/ebfc/progbits.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/rel.c b/ebfc/rel.c
+index 1c53d47..581de78 100644
+--- a/ebfc/rel.c
++++ b/ebfc/rel.c
+@@ -6,7 +6,11 @@
+
+ #include <stdlib.h>
+ #include <string.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/shdrtab.c b/ebfc/shdrtab.c
+index 2ae0318..8a38c9c 100644
+--- a/ebfc/shdrtab.c
++++ b/ebfc/shdrtab.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/ebfc/strtab.c b/ebfc/strtab.c
+index 02c91c3..cfa11dc 100644
+--- a/ebfc/strtab.c
++++ b/ebfc/strtab.c
+@@ -5,7 +5,11 @@
+ */
+
+ #include <stdlib.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include <string.h>
+ #include "elfparts.h"
+ #include "gen.h"
+diff --git a/ebfc/symtab.c b/ebfc/symtab.c
+index 93dad34..d721f4f 100644
+--- a/ebfc/symtab.c
++++ b/ebfc/symtab.c
+@@ -6,7 +6,11 @@
+
+ #include <stdlib.h>
+ #include <string.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+ #include "elfparts.h"
+ #include "gen.h"
+
+diff --git a/rebind/rebind.c b/rebind/rebind.c
+index 5608cae..f740c47 100644
+--- a/rebind/rebind.c
++++ b/rebind/rebind.c
+@@ -7,7 +7,11 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
++#ifdef __linux__
+ #include <linux/elf.h>
++#else
++#include <elf.h>
++#endif
+
+ #ifndef TRUE
+ #define TRUE 1
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/0005-05_add_et_core_elfls.diff.patch b/patches/elfkickers-2.0a.orig/0005-05_add_et_core_elfls.diff.patch
new file mode 100644
index 000000000..8f36ff8f5
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0005-05_add_et_core_elfls.diff.patch
@@ -0,0 +1,24 @@
+From 50913d16ecb261ad4bbecaa7fa3c310ccb6ebbd3 Mon Sep 17 00:00:00 2001
+From: the debian project <info@debian.org>
+Date: Thu, 11 Mar 2010 01:11:14 +0100
+Subject: [PATCH 5/6] 05_add_et_core_elfls.diff
+
+---
+ elfls/elfls.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/elfls/elfls.c b/elfls/elfls.c
+index feb5b27..04410d2 100644
+--- a/elfls/elfls.c
++++ b/elfls/elfls.c
+@@ -317,6 +317,7 @@ static int readelfhdr(void)
+ return FALSE;
+ switch (elffhdr.e_type) {
+ case ET_REL:
++ case ET_CORE:
+ case ET_EXEC:
+ case ET_DYN:
+ return TRUE;
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/0006-mjn3-sstrip.patch b/patches/elfkickers-2.0a.orig/0006-mjn3-sstrip.patch
new file mode 100644
index 000000000..4b5dafdf6
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/0006-mjn3-sstrip.patch
@@ -0,0 +1,729 @@
+From 8566366ba5248eaf7e5e3e2c1933d2a80465a8f9 Mon Sep 17 00:00:00 2001
+From: Manuel Novoa III <mjn3@codepoet.org>
+Date: Thu, 11 Mar 2010 01:19:07 +0100
+Subject: [PATCH 6/6] mjn3-sstrip
+
+===================================================================
+---
+ sstrip/sstrip.c | 649 ++++++++++++++++++++++++++++++++++---------------------
+ 1 files changed, 404 insertions(+), 245 deletions(-)
+
+diff --git a/sstrip/sstrip.c b/sstrip/sstrip.c
+index d0997b9..1842f05 100644
+--- a/sstrip/sstrip.c
++++ b/sstrip/sstrip.c
+@@ -1,5 +1,55 @@
++/* http://www.muppetlabs.com/~breadbox/software/elfkickers.html */
++
+ /* sstrip: Copyright (C) 1999-2001 by Brian Raiter, under the GNU
+ * General Public License. No warranty. See COPYING for details.
++ *
++ * Aug 23, 2004 Hacked by Manuel Novoa III <mjn3@codepoet.org> to
++ * handle targets of different endianness and/or elf class, making
++ * it more useful in a cross-devel environment.
++ */
++
++/* ============== original README ===================
++ *
++ * sstrip is a small utility that removes the contents at the end of an
++ * ELF file that are not part of the program's memory image.
++ *
++ * Most ELF executables are built with both a program header table and a
++ * section header table. However, only the former is required in order
++ * for the OS to load, link and execute a program. sstrip attempts to
++ * extract the ELF header, the program header table, and its contents,
++ * leaving everything else in the bit bucket. It can only remove parts of
++ * the file that occur at the end, after the parts to be saved. However,
++ * this almost always includes the section header table, and occasionally
++ * a few random sections that are not used when running a program.
++ *
++ * It should be noted that the GNU bfd library is (understandably)
++ * dependent on the section header table as an index to the file's
++ * contents. Thus, an executable file that has no section header table
++ * cannot be used with gdb, objdump, or any other program based upon the
++ * bfd library, at all. In fact, the program will not even recognize the
++ * file as a valid executable. (This limitation is noted in the source
++ * code comments for bfd, and is marked "FIXME", so this may change at
++ * some future date. However, I would imagine that it is a pretty
++ * low-priority item, as executables without a section header table are
++ * rare in the extreme.) This probably also explains why strip doesn't
++ * offer the option to do this.
++ *
++ * Shared library files may also have their section header table removed.
++ * Such a library will still function; however, it will no longer be
++ * possible for a compiler to link a new program against it.
++ *
++ * As an added bonus, sstrip also tries to removes trailing zero bytes
++ * from the end of the file. (This normally cannot be done with an
++ * executable that has a section header table.)
++ *
++ * sstrip is a very simplistic program. It depends upon the common
++ * practice of putting the parts of the file that contribute to the
++ * memory image at the front, and the remaining material at the end. This
++ * permits it to discard the latter material without affecting file
++ * offsets and memory addresses in what remains. Of course, the ELF
++ * standard permits files to be organized in almost any order, so if a
++ * pathological linker decided to put its section headers at the top,
++ * sstrip would be useless on such executables.
+ */
+
+ #include <stdio.h>
+@@ -9,28 +59,21 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <elf.h>
+-#include <asm/elf.h>
++#include <endian.h>
++#include <byteswap.h>
+
+ #ifndef TRUE
+ #define TRUE 1
+ #define FALSE 0
+ #endif
+
+-#if ELF_CLASS == ELFCLASS32
+-#define Elf_Ehdr Elf32_Ehdr
+-#define Elf_Phdr Elf32_Phdr
+-#else
+-#define Elf_Ehdr Elf64_Ehdr
+-#define Elf_Phdr Elf64_Phdr
+-#endif
+-
+ /* The name of the program.
+ */
+-static char const *progname;
++static char const *progname;
+
+ /* The name of the current file.
+ */
+-static char const *filename;
++static char const *filename;
+
+
+ /* A simple error-handling function. FALSE is always returned for the
+@@ -38,227 +81,321 @@ static char const *filename;
+ */
+ static int err(char const *errmsg)
+ {
+- fprintf(stderr, "%s: %s: %s\n", progname, filename, errmsg);
+- return FALSE;
++ fprintf(stderr, "%s: %s: %s\n", progname, filename, errmsg);
++ return FALSE;
+ }
+
+-/* A macro for I/O errors: The given error message is used only when
+- * errno is not set.
++/* A flag to signal the need for endian reversal.
+ */
+-#define ferr(msg) (err(errno ? strerror(errno) : (msg)))
++static int do_reverse_endian;
+
+-/* readelfheader() reads the ELF header into our global variable, and
+- * checks to make sure that this is in fact a file that we should be
+- * munging.
++/* Get a value from the elf header, compensating for endianness.
+ */
+-static int readelfheader(int fd, Elf_Ehdr *ehdr)
+-{
+- errno = 0;
+- if (read(fd, ehdr, sizeof *ehdr) != sizeof *ehdr)
+- return ferr("missing or incomplete ELF header.");
+-
+- /* Check the ELF signature.
+- */
+- if (!(ehdr->e_ident[EI_MAG0] == ELFMAG0 &&
+- ehdr->e_ident[EI_MAG1] == ELFMAG1 &&
+- ehdr->e_ident[EI_MAG2] == ELFMAG2 &&
+- ehdr->e_ident[EI_MAG3] == ELFMAG3))
+- return err("missing ELF signature.");
+-
+- /* Compare the file's class and endianness with the program's.
+- */
+- if (ehdr->e_ident[EI_DATA] != ELF_DATA)
+- return err("ELF file has different endianness.");
+- if (ehdr->e_ident[EI_CLASS] != ELF_CLASS)
+- return err("ELF file has different word size.");
+-
+- /* Check the target architecture.
+- */
+- if (ehdr->e_machine != ELF_ARCH)
+- return err("ELF file created for different architecture.");
+-
+- /* Verify the sizes of the ELF header and the program segment
+- * header table entries.
+- */
+- if (ehdr->e_ehsize != sizeof(Elf_Ehdr))
+- return err("unrecognized ELF header size.");
+- if (ehdr->e_phentsize != sizeof(Elf_Phdr))
+- return err("unrecognized program segment header size.");
+-
+- /* Finally, check the file type.
+- */
+- if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
+- return err("not an executable or shared-object library.");
+-
+- return TRUE;
+-}
+-
+-/* readphdrtable() loads the program segment header table into memory.
++#define EGET(X) \
++ (__extension__ ({ \
++ uint64_t __res; \
++ if (!do_reverse_endian) { \
++ __res = (X); \
++ } else if (sizeof(X) == 1) { \
++ __res = (X); \
++ } else if (sizeof(X) == 2) { \
++ __res = bswap_16((X)); \
++ } else if (sizeof(X) == 4) { \
++ __res = bswap_32((X)); \
++ } else if (sizeof(X) == 8) { \
++ __res = bswap_64((X)); \
++ } else { \
++ fprintf(stderr, "%s: %s: EGET failed for size %d\n", \
++ progname, filename, sizeof(X)); \
++ exit(EXIT_FAILURE); \
++ } \
++ __res; \
++ }))
++
++/* Set a value 'Y' in the elf header to 'X', compensating for endianness.
+ */
+-static int readphdrtable(int fd, Elf_Ehdr const *ehdr, Elf_Phdr **phdrs)
+-{
+- size_t size;
++#define ESET(Y,X) \
++ do if (!do_reverse_endian) { \
++ Y = (X); \
++ } else if (sizeof(Y) == 1) { \
++ Y = (X); \
++ } else if (sizeof(Y) == 2) { \
++ Y = bswap_16((uint16_t)(X)); \
++ } else if (sizeof(Y) == 4) { \
++ Y = bswap_32((uint32_t)(X)); \
++ } else if (sizeof(Y) == 8) { \
++ Y = bswap_64((uint64_t)(X)); \
++ } else { \
++ fprintf(stderr, "%s: %s: ESET failed for size %d\n", \
++ progname, filename, sizeof(Y)); \
++ exit(EXIT_FAILURE); \
++ } while (0)
+
+- if (!ehdr->e_phoff || !ehdr->e_phnum)
+- return err("ELF file has no program header table.");
+
+- size = ehdr->e_phnum * sizeof **phdrs;
+- if (!(*phdrs = malloc(size)))
+- return err("Out of memory!");
++/* A macro for I/O errors: The given error message is used only when
++ * errno is not set.
++ */
++#define ferr(msg) (err(errno ? strerror(errno) : (msg)))
++
+
+- errno = 0;
+- if (read(fd, *phdrs, size) != (ssize_t)size)
+- return ferr("missing or incomplete program segment header table.");
+
+- return TRUE;
++#define HEADER_FUNCTIONS(CLASS) \
++ \
++/* readelfheader() reads the ELF header into our global variable, and \
++ * checks to make sure that this is in fact a file that we should be \
++ * munging. \
++ */ \
++static int readelfheader ## CLASS (int fd, Elf ## CLASS ## _Ehdr *ehdr) \
++{ \
++ if (read(fd, ((char *)ehdr)+EI_NIDENT, sizeof(*ehdr) - EI_NIDENT) \
++ != sizeof(*ehdr) - EI_NIDENT) \
++ return ferr("missing or incomplete ELF header."); \
++ \
++ /* Verify the sizes of the ELF header and the program segment \
++ * header table entries. \
++ */ \
++ if (EGET(ehdr->e_ehsize) != sizeof(Elf ## CLASS ## _Ehdr)) \
++ return err("unrecognized ELF header size."); \
++ if (EGET(ehdr->e_phentsize) != sizeof(Elf ## CLASS ## _Phdr)) \
++ return err("unrecognized program segment header size."); \
++ \
++ /* Finally, check the file type. \
++ */ \
++ if (EGET(ehdr->e_type) != ET_EXEC && EGET(ehdr->e_type) != ET_DYN) \
++ return err("not an executable or shared-object library."); \
++ \
++ return TRUE; \
++} \
++ \
++/* readphdrtable() loads the program segment header table into memory. \
++ */ \
++static int readphdrtable ## CLASS (int fd, Elf ## CLASS ## _Ehdr const *ehdr, \
++ Elf ## CLASS ## _Phdr **phdrs) \
++{ \
++ size_t size; \
++ \
++ if (!EGET(ehdr->e_phoff) || !EGET(ehdr->e_phnum) \
++) return err("ELF file has no program header table."); \
++ \
++ size = EGET(ehdr->e_phnum) * sizeof **phdrs; \
++ if (!(*phdrs = malloc(size))) \
++ return err("Out of memory!"); \
++ \
++ errno = 0; \
++ if (read(fd, *phdrs, size) != (ssize_t)size) \
++ return ferr("missing or incomplete program segment header table."); \
++ \
++ return TRUE; \
++} \
++ \
++/* getmemorysize() determines the offset of the last byte of the file \
++ * that is referenced by an entry in the program segment header table. \
++ * (Anything in the file after that point is not used when the program \
++ * is executing, and thus can be safely discarded.) \
++ */ \
++static int getmemorysize ## CLASS (Elf ## CLASS ## _Ehdr const *ehdr, \
++ Elf ## CLASS ## _Phdr const *phdrs, \
++ unsigned long *newsize) \
++{ \
++ Elf ## CLASS ## _Phdr const *phdr; \
++ unsigned long size, n; \
++ int i; \
++ \
++ /* Start by setting the size to include the ELF header and the \
++ * complete program segment header table. \
++ */ \
++ size = EGET(ehdr->e_phoff) + EGET(ehdr->e_phnum) * sizeof *phdrs; \
++ if (size < sizeof *ehdr) \
++ size = sizeof *ehdr; \
++ \
++ /* Then keep extending the size to include whatever data the \
++ * program segment header table references. \
++ */ \
++ for (i = 0, phdr = phdrs ; i < EGET(ehdr->e_phnum) ; ++i, ++phdr) { \
++ if (EGET(phdr->p_type) != PT_NULL) { \
++ n = EGET(phdr->p_offset) + EGET(phdr->p_filesz); \
++ if (n > size) \
++ size = n; \
++ } \
++ } \
++ \
++ *newsize = size; \
++ return TRUE; \
++} \
++ \
++/* modifyheaders() removes references to the section header table if \
++ * it was stripped, and reduces program header table entries that \
++ * included truncated bytes at the end of the file. \
++ */ \
++static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \
++ Elf ## CLASS ## _Phdr *phdrs, \
++ unsigned long newsize) \
++{ \
++ Elf ## CLASS ## _Phdr *phdr; \
++ int i; \
++ \
++ /* If the section header table is gone, then remove all references \
++ * to it in the ELF header. \
++ */ \
++ if (EGET(ehdr->e_shoff) >= newsize) { \
++ ESET(ehdr->e_shoff,0); \
++ ESET(ehdr->e_shnum,0); \
++ ESET(ehdr->e_shentsize,0); \
++ ESET(ehdr->e_shstrndx,0); \
++ } \
++ \
++ /* The program adjusts the file size of any segment that was \
++ * truncated. The case of a segment being completely stripped out \
++ * is handled separately. \
++ */ \
++ for (i = 0, phdr = phdrs ; i < EGET(ehdr->e_phnum) ; ++i, ++phdr) { \
++ if (EGET(phdr->p_offset) >= newsize) { \
++ ESET(phdr->p_offset,newsize); \
++ ESET(phdr->p_filesz,0); \
++ } else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \
++ newsize -= EGET(phdr->p_offset); \
++ ESET(phdr->p_filesz, newsize); \
++ } \
++ } \
++ \
++ return TRUE; \
++} \
++ \
++/* commitchanges() writes the new headers back to the original file \
++ * and sets the file to its new size. \
++ */ \
++static int commitchanges ## CLASS (int fd, Elf ## CLASS ## _Ehdr const *ehdr, \
++ Elf ## CLASS ## _Phdr *phdrs, \
++ unsigned long newsize) \
++{ \
++ size_t n; \
++ \
++ /* Save the changes to the ELF header, if any. \
++ */ \
++ if (lseek(fd, 0, SEEK_SET)) \
++ return ferr("could not rewind file"); \
++ errno = 0; \
++ if (write(fd, ehdr, sizeof *ehdr) != sizeof *ehdr) \
++ return err("could not modify file"); \
++ \
++ /* Save the changes to the program segment header table, if any. \
++ */ \
++ if (lseek(fd, EGET(ehdr->e_phoff), SEEK_SET) == (off_t)-1) { \
++ err("could not seek in file."); \
++ goto warning; \
++ } \
++ n = EGET(ehdr->e_phnum) * sizeof *phdrs; \
++ if (write(fd, phdrs, n) != (ssize_t)n) { \
++ err("could not write to file"); \
++ goto warning; \
++ } \
++ \
++ /* Eleventh-hour sanity check: don't truncate before the end of \
++ * the program segment header table. \
++ */ \
++ if (newsize < EGET(ehdr->e_phoff) + n) \
++ newsize = EGET(ehdr->e_phoff) + n; \
++ \
++ /* Chop off the end of the file. \
++ */ \
++ if (ftruncate(fd, newsize)) { \
++ err("could not resize file"); \
++ goto warning; \
++ } \
++ \
++ return TRUE; \
++ \
++ warning: \
++ return err("ELF file may have been corrupted!"); \
+ }
+
+-/* getmemorysize() determines the offset of the last byte of the file
+- * that is referenced by an entry in the program segment header table.
+- * (Anything in the file after that point is not used when the program
+- * is executing, and thus can be safely discarded.)
++
++/* First elements of Elf32_Ehdr and Elf64_Ehdr are common.
+ */
+-static int getmemorysize(Elf_Ehdr const *ehdr, Elf_Phdr const *phdrs,
+- unsigned long *newsize)
++static int readelfheaderident(int fd, Elf32_Ehdr *ehdr)
+ {
+- Elf32_Phdr const *phdr;
+- unsigned long size, n;
+- int i;
+-
+- /* Start by setting the size to include the ELF header and the
+- * complete program segment header table.
+- */
+- size = ehdr->e_phoff + ehdr->e_phnum * sizeof *phdrs;
+- if (size < sizeof *ehdr)
+- size = sizeof *ehdr;
+-
+- /* Then keep extending the size to include whatever data the
+- * program segment header table references.
+- */
+- for (i = 0, phdr = phdrs ; i < ehdr->e_phnum ; ++i, ++phdr) {
+- if (phdr->p_type != PT_NULL) {
+- n = phdr->p_offset + phdr->p_filesz;
+- if (n > size)
+- size = n;
++ errno = 0;
++ if (read(fd, ehdr, EI_NIDENT) != EI_NIDENT)
++ return ferr("missing or incomplete ELF header.");
++
++ /* Check the ELF signature.
++ */
++ if (!(ehdr->e_ident[EI_MAG0] == ELFMAG0 &&
++ ehdr->e_ident[EI_MAG1] == ELFMAG1 &&
++ ehdr->e_ident[EI_MAG2] == ELFMAG2 &&
++ ehdr->e_ident[EI_MAG3] == ELFMAG3))
++ {
++ err("missing ELF signature.");
++ return -1;
++ }
++
++ /* Compare the file's class and endianness with the program's.
++ */
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) {
++ do_reverse_endian = 0;
++ } else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) {
++/* fprintf(stderr, "ELF file has different endianness.\n"); */
++ do_reverse_endian = 1;
++ }
++#elif __BYTE_ORDER == __BIG_ENDIAN
++ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) {
++/* fprintf(stderr, "ELF file has different endianness.\n"); */
++ do_reverse_endian = 1;
++ } else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) {
++ do_reverse_endian = 0;
++ }
++#else
++#error unkown endianness
++#endif
++ else {
++ err("Unsupported endianness");
++ return -1;
+ }
+- }
+
+- *newsize = size;
+- return TRUE;
++ /* Check the target architecture.
++ */
++/* if (EGET(ehdr->e_machine) != ELF_ARCH) { */
++/* /\* return err("ELF file created for different architecture."); *\/ */
++/* fprintf(stderr, "ELF file created for different architecture.\n"); */
++/* } */
++ return ehdr->e_ident[EI_CLASS];
+ }
+
++
++HEADER_FUNCTIONS(32)
++
++HEADER_FUNCTIONS(64)
++
+ /* truncatezeros() examines the bytes at the end of the file's
+ * size-to-be, and reduces the size to exclude any trailing zero
+ * bytes.
+ */
+ static int truncatezeros(int fd, unsigned long *newsize)
+ {
+- unsigned char contents[1024];
+- unsigned long size, n;
+-
+- size = *newsize;
+- do {
+- n = sizeof contents;
+- if (n > size)
+- n = size;
+- if (lseek(fd, size - n, SEEK_SET) == (off_t)-1)
+- return ferr("cannot seek in file.");
+- if (read(fd, contents, n) != (ssize_t)n)
+- return ferr("cannot read file contents");
+- while (n && !contents[--n])
+- --size;
+- } while (size && !n);
+-
+- /* Sanity check.
+- */
+- if (!size)
+- return err("ELF file is completely blank!");
+-
+- *newsize = size;
+- return TRUE;
+-}
+-
+-/* modifyheaders() removes references to the section header table if
+- * it was stripped, and reduces program header table entries that
+- * included truncated bytes at the end of the file.
+- */
+-static int modifyheaders(Elf_Ehdr *ehdr, Elf_Phdr *phdrs,
+- unsigned long newsize)
+-{
+- Elf32_Phdr *phdr;
+- int i;
+-
+- /* If the section header table is gone, then remove all references
+- * to it in the ELF header.
+- */
+- if (ehdr->e_shoff >= newsize) {
+- ehdr->e_shoff = 0;
+- ehdr->e_shnum = 0;
+- ehdr->e_shentsize = 0;
+- ehdr->e_shstrndx = 0;
+- }
+-
+- /* The program adjusts the file size of any segment that was
+- * truncated. The case of a segment being completely stripped out
+- * is handled separately.
+- */
+- for (i = 0, phdr = phdrs ; i < ehdr->e_phnum ; ++i, ++phdr) {
+- if (phdr->p_offset >= newsize) {
+- phdr->p_offset = newsize;
+- phdr->p_filesz = 0;
+- } else if (phdr->p_offset + phdr->p_filesz > newsize) {
+- phdr->p_filesz = newsize - phdr->p_offset;
+- }
+- }
+-
+- return TRUE;
+-}
+-
+-/* commitchanges() writes the new headers back to the original file
+- * and sets the file to its new size.
+- */
+-static int commitchanges(int fd, Elf_Ehdr const *ehdr, Elf_Phdr *phdrs,
+- unsigned long newsize)
+-{
+- size_t n;
+-
+- /* Save the changes to the ELF header, if any.
+- */
+- if (lseek(fd, 0, SEEK_SET))
+- return ferr("could not rewind file");
+- errno = 0;
+- if (write(fd, ehdr, sizeof *ehdr) != sizeof *ehdr)
+- return err("could not modify file");
+-
+- /* Save the changes to the program segment header table, if any.
+- */
+- if (lseek(fd, ehdr->e_phoff, SEEK_SET) == (off_t)-1) {
+- err("could not seek in file.");
+- goto warning;
+- }
+- n = ehdr->e_phnum * sizeof *phdrs;
+- if (write(fd, phdrs, n) != (ssize_t)n) {
+- err("could not write to file");
+- goto warning;
+- }
+-
+- /* Eleventh-hour sanity check: don't truncate before the end of
+- * the program segment header table.
+- */
+- if (newsize < ehdr->e_phoff + n)
+- newsize = ehdr->e_phoff + n;
+-
+- /* Chop off the end of the file.
+- */
+- if (ftruncate(fd, newsize)) {
+- err("could not resize file");
+- goto warning;
+- }
+-
+- return TRUE;
+-
+- warning:
+- return err("ELF file may have been corrupted!");
++ unsigned char contents[1024];
++ unsigned long size, n;
++
++ size = *newsize;
++ do {
++ n = sizeof contents;
++ if (n > size)
++ n = size;
++ if (lseek(fd, size - n, SEEK_SET) == (off_t)-1)
++ return ferr("cannot seek in file.");
++ if (read(fd, contents, n) != (ssize_t)n)
++ return ferr("cannot read file contents");
++ while (n && !contents[--n])
++ --size;
++ } while (size && !n);
++
++ /* Sanity check.
++ */
++ if (!size)
++ return err("ELF file is completely blank!");
++
++ *newsize = size;
++ return TRUE;
+ }
+
+ /* main() loops over the cmdline arguments, leaving all the real work
+@@ -266,44 +403,66 @@ static int commitchanges(int fd, Elf_Ehdr const *ehdr, Elf_Phdr *phdrs,
+ */
+ int main(int argc, char *argv[])
+ {
+- int fd;
+- Elf_Ehdr ehdr;
+- Elf_Phdr *phdrs;
+- unsigned long newsize;
+- char **arg;
+- int failures = 0;
+-
+- if (argc < 2 || argv[1][0] == '-') {
+- printf("Usage: sstrip FILE...\n"
+- "sstrip discards all nonessential bytes from an executable.\n\n"
+- "Version 2.0 Copyright (C) 2000,2001 Brian Raiter.\n"
+- "This program is free software, licensed under the GNU\n"
+- "General Public License. There is absolutely no warranty.\n");
+- return EXIT_SUCCESS;
+- }
+-
+- progname = argv[0];
+-
+- for (arg = argv + 1 ; *arg != NULL ; ++arg) {
+- filename = *arg;
+-
+- fd = open(*arg, O_RDWR);
+- if (fd < 0) {
+- ferr("can't open");
+- ++failures;
+- continue;
++ int fd;
++ union {
++ Elf32_Ehdr ehdr32;
++ Elf64_Ehdr ehdr64;
++ } e;
++ union {
++ Elf32_Phdr *phdrs32;
++ Elf64_Phdr *phdrs64;
++ } p;
++ unsigned long newsize;
++ char **arg;
++ int failures = 0;
++
++ if (argc < 2 || argv[1][0] == '-') {
++ printf("Usage: sstrip FILE...\n"
++ "sstrip discards all nonessential bytes from an executable.\n\n"
++ "Version 2.0-X Copyright (C) 2000,2001 Brian Raiter.\n"
++ "Cross-devel hacks Copyright (C) 2004 Manuel Novoa III.\n"
++ "This program is free software, licensed under the GNU\n"
++ "General Public License. There is absolutely no warranty.\n");
++ return EXIT_SUCCESS;
+ }
+
+- if (!(readelfheader(fd, &ehdr) &&
+- readphdrtable(fd, &ehdr, &phdrs) &&
+- getmemorysize(&ehdr, phdrs, &newsize) &&
+- truncatezeros(fd, &newsize) &&
+- modifyheaders(&ehdr, phdrs, newsize) &&
+- commitchanges(fd, &ehdr, phdrs, newsize)))
+- ++failures;
+-
+- close(fd);
+- }
++ progname = argv[0];
++
++ for (arg = argv + 1 ; *arg != NULL ; ++arg) {
++ filename = *arg;
++
++ fd = open(*arg, O_RDWR);
++ if (fd < 0) {
++ ferr("can't open");
++ ++failures;
++ continue;
++ }
++
++ switch (readelfheaderident(fd, &e.ehdr32)) {
++ case ELFCLASS32:
++ if (!(readelfheader32(fd, &e.ehdr32) &&
++ readphdrtable32(fd, &e.ehdr32, &p.phdrs32) &&
++ getmemorysize32(&e.ehdr32, p.phdrs32, &newsize) &&
++ truncatezeros(fd, &newsize) &&
++ modifyheaders32(&e.ehdr32, p.phdrs32, newsize) &&
++ commitchanges32(fd, &e.ehdr32, p.phdrs32, newsize)))
++ ++failures;
++ break;
++ case ELFCLASS64:
++ if (!(readelfheader64(fd, &e.ehdr64) &&
++ readphdrtable64(fd, &e.ehdr64, &p.phdrs64) &&
++ getmemorysize64(&e.ehdr64, p.phdrs64, &newsize) &&
++ truncatezeros(fd, &newsize) &&
++ modifyheaders64(&e.ehdr64, p.phdrs64, newsize) &&
++ commitchanges64(fd, &e.ehdr64, p.phdrs64, newsize)))
++ ++failures;
++ break;
++ default:
++ ++failures;
++ break;
++ }
++ close(fd);
++ }
+
+- return failures ? EXIT_FAILURE : EXIT_SUCCESS;
++ return failures ? EXIT_FAILURE : EXIT_SUCCESS;
+ }
+--
+1.7.0
+
diff --git a/patches/elfkickers-2.0a.orig/series b/patches/elfkickers-2.0a.orig/series
new file mode 100644
index 000000000..a61de33c8
--- /dev/null
+++ b/patches/elfkickers-2.0a.orig/series
@@ -0,0 +1,6 @@
+0001-01_add_toplevel_makefile.diff.patch
+0002-02_update_subdirs_makefile.diff.patch
+0003-03_add_include_string.h.diff.patch
+0004-04_bsd_include_elf.h.diff.patch
+0005-05_add_et_core_elfls.diff.patch
+0006-mjn3-sstrip.patch
diff --git a/patches/ethtool-6+20090323.orig/001_remove_support_for_rx_hashing_by_port.patch b/patches/ethtool-6+20090323.orig/001_remove_support_for_rx_hashing_by_port.patch
deleted file mode 100644
index f33e80472..000000000
--- a/patches/ethtool-6+20090323.orig/001_remove_support_for_rx_hashing_by_port.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Subject: ethtool: Remove support for RX hashing by port
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Thu, 30 Apr 2009 13:36:49 +0100
-
-The kernel-side support for this was removed by:
-
-commit 59089d8d162ddcb5c434672e915331964d38a754
-Author: Santwona Behera <santwona.behera@sun.com>
-Date: Fri Feb 20 00:58:13 2009 -0800
-
- ethtool: Add RX pkt classification interface
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
----
- ethtool.8 | 3 ---
- ethtool.c | 8 +-------
- 2 files changed, 1 insertions(+), 10 deletions(-)
-
-diff --git a/ethtool.8 b/ethtool.8
-index 178f6ea..7a6f52b 100644
---- a/ethtool.8
-+++ b/ethtool.8
-@@ -473,9 +473,6 @@ Configures the hash options for the specified network traffic type.
- .RS
- .PD 0
- .TP 3
--.B p
--Hash on the device port number on which the packet was received.
--.TP 3
- .B m
- Hash on the Layer 2 destination address of the rx packet.
- .TP 3
-diff --git a/ethtool.c b/ethtool.c
-index 43ec2bf..5c45b2d 100644
---- a/ethtool.c
-+++ b/ethtool.c
-@@ -191,7 +191,7 @@ static struct option {
- { "-N", "--config-nfc", MODE_SNFC, "Configure Rx network flow "
- "classification options",
- " [ rx-flow-hash tcp4|udp4|ah4|sctp4|"
-- "tcp6|udp6|ah6|sctp6 p|m|v|t|s|d|f|n|r... ]\n" },
-+ "tcp6|udp6|ah6|sctp6 m|v|t|s|d|f|n|r... ]\n" },
- { "-h", "--help", MODE_HELP, "Show this help" },
- {}
- };
-@@ -1090,9 +1090,6 @@ static int parse_rxfhashopts(char *optstr, u32 *data)
- *data = 0;
- while (*optstr) {
- switch (*optstr) {
-- case 'p':
-- *data |= RXH_DEV_PORT;
-- break;
- case 'm':
- *data |= RXH_L2DA;
- break;
-@@ -1132,9 +1129,6 @@ static char *unparse_rxfhashopts(u64 opts)
- memset(buf, 0, sizeof(buf));
-
- if (opts) {
-- if (opts & RXH_DEV_PORT) {
-- strcat(buf, "Dev port\n");
-- }
- if (opts & RXH_L2DA) {
- strcat(buf, "L2DA\n");
- }
diff --git a/patches/ethtool-6+20090323.orig/002_update_ethtool-copy-h.patch b/patches/ethtool-6+20090323.orig/002_update_ethtool-copy-h.patch
deleted file mode 100644
index 3e14db5cb..000000000
--- a/patches/ethtool-6+20090323.orig/002_update_ethtool-copy-h.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-Subject: ethtool: Update ethtool-copy.h
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Thu, 30 Apr 2009 13:33:16 +0100
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
----
-This comes from net-next-2.6 as of today.
-
-Ben.
-
- ethtool-copy.h | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
- 1 files changed, 100 insertions(+), 7 deletions(-)
-
-diff --git a/ethtool-copy.h b/ethtool-copy.h
-index 3ca4e2c..d9bb957 100644
---- a/ethtool-copy.h
-+++ b/ethtool-copy.h
-@@ -7,11 +7,14 @@
- * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
- * christopher.leech@intel.com,
- * scott.feldman@intel.com)
-+ * Portions Copyright (C) Sun Microsystems 2008
- */
-
- #ifndef _LINUX_ETHTOOL_H
- #define _LINUX_ETHTOOL_H
-
-+#include <linux/types.h>
-+
- /* This should work for both 32 and 64 bit userland. */
- struct ethtool_cmd {
- __u32 cmd;
-@@ -23,14 +26,16 @@ struct ethtool_cmd {
- __u8 phy_address;
- __u8 transceiver; /* Which transceiver to use */
- __u8 autoneg; /* Enable or disable autonegotiation */
-+ __u8 mdio_support;
- __u32 maxtxpkt; /* Tx pkts before generating tx int */
- __u32 maxrxpkt; /* Rx pkts before generating rx int */
- __u16 speed_hi;
- __u16 reserved2;
-- __u32 reserved[3];
-+ __u32 lp_advertising; /* Features the link partner advertises */
-+ __u32 reserved[2];
- };
-
--static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
-+static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
- __u32 speed)
- {
-
-@@ -38,7 +43,7 @@ static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
- ep->speed_hi = (__u16)(speed >> 16);
- }
-
--static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
-+static __inline__ __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
- {
- return (ep->speed_hi << 16) | ep->speed;
- }
-@@ -285,12 +290,78 @@ enum ethtool_flags {
- ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
- };
-
--struct ethtool_rxnfc {
-- __u32 cmd;
-+/* The following structures are for supporting RX network flow
-+ * classification configuration. Note, all multibyte fields, e.g.,
-+ * ip4src, ip4dst, psrc, pdst, spi, etc. are expected to be in network
-+ * byte order.
-+ */
-+struct ethtool_tcpip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __be16 psrc;
-+ __be16 pdst;
-+ __u8 tos;
-+};
-+
-+struct ethtool_ah_espip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __be32 spi;
-+ __u8 tos;
-+};
-+
-+struct ethtool_rawip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __u8 hdata[64];
-+};
-+
-+struct ethtool_ether_spec {
-+ __be16 ether_type;
-+ __u8 frame_size;
-+ __u8 eframe[16];
-+};
-+
-+#define ETH_RX_NFC_IP4 1
-+#define ETH_RX_NFC_IP6 2
-+
-+struct ethtool_usrip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __be32 l4_4_bytes;
-+ __u8 tos;
-+ __u8 ip_ver;
-+ __u8 proto;
-+};
-+
-+struct ethtool_rx_flow_spec {
- __u32 flow_type;
-- __u64 data;
-+ union {
-+ struct ethtool_tcpip4_spec tcp_ip4_spec;
-+ struct ethtool_tcpip4_spec udp_ip4_spec;
-+ struct ethtool_tcpip4_spec sctp_ip4_spec;
-+ struct ethtool_ah_espip4_spec ah_ip4_spec;
-+ struct ethtool_ah_espip4_spec esp_ip4_spec;
-+ struct ethtool_rawip4_spec raw_ip4_spec;
-+ struct ethtool_ether_spec ether_spec;
-+ struct ethtool_usrip4_spec usr_ip4_spec;
-+ __u8 hdata[64];
-+ } h_u, m_u; /* entry, mask */
-+ __u64 ring_cookie;
-+ __u32 location;
- };
-
-+struct ethtool_rxnfc {
-+ __u32 cmd;
-+ __u32 flow_type;
-+ /* The rx flow hash value or the rule DB size */
-+ __u64 data;
-+ struct ethtool_rx_flow_spec fs;
-+ __u32 rule_cnt;
-+ __u32 rule_locs[0];
-+};
-+
-+
- /* CMDs currently supported */
- #define ETHTOOL_GSET 0x00000001 /* Get settings. */
- #define ETHTOOL_SSET 0x00000002 /* Set settings. */
-@@ -338,6 +409,12 @@ struct ethtool_rxnfc {
- #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
- #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
- #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
-+#define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */
-+#define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */
-+#define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */
-+#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */
-+#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
-+#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
-
- /* compatibility with older code */
- #define SPARC_ETH_GSET ETHTOOL_GSET
-@@ -360,6 +437,11 @@ struct ethtool_rxnfc {
- #define SUPPORTED_Pause (1 << 13)
- #define SUPPORTED_Asym_Pause (1 << 14)
- #define SUPPORTED_2500baseX_Full (1 << 15)
-+#define SUPPORTED_Backplane (1 << 16)
-+#define SUPPORTED_1000baseKX_Full (1 << 17)
-+#define SUPPORTED_10000baseKX4_Full (1 << 18)
-+#define SUPPORTED_10000baseKR_Full (1 << 19)
-+#define SUPPORTED_10000baseR_FEC (1 << 20)
-
- /* Indicates what features are advertised by the interface. */
- #define ADVERTISED_10baseT_Half (1 << 0)
-@@ -378,6 +460,11 @@ struct ethtool_rxnfc {
- #define ADVERTISED_Pause (1 << 13)
- #define ADVERTISED_Asym_Pause (1 << 14)
- #define ADVERTISED_2500baseX_Full (1 << 15)
-+#define ADVERTISED_Backplane (1 << 16)
-+#define ADVERTISED_1000baseKX_Full (1 << 17)
-+#define ADVERTISED_10000baseKX4_Full (1 << 18)
-+#define ADVERTISED_10000baseKR_Full (1 << 19)
-+#define ADVERTISED_10000baseR_FEC (1 << 20)
-
- /* The following are all involved in forcing a particular link
- * mode for the device for setting things. When getting the
-@@ -402,6 +489,7 @@ struct ethtool_rxnfc {
- #define PORT_MII 0x02
- #define PORT_FIBRE 0x03
- #define PORT_BNC 0x04
-+#define PORT_OTHER 0xff
-
- /* Which transceiver to use. */
- #define XCVR_INTERNAL 0x00
-@@ -434,9 +522,13 @@ struct ethtool_rxnfc {
- #define UDP_V6_FLOW 0x06
- #define SCTP_V6_FLOW 0x07
- #define AH_ESP_V6_FLOW 0x08
-+#define AH_V4_FLOW 0x09
-+#define ESP_V4_FLOW 0x0a
-+#define AH_V6_FLOW 0x0b
-+#define ESP_V6_FLOW 0x0c
-+#define IP_USER_FLOW 0x0d
-
- /* L3-L4 network traffic flow hash options */
--#define RXH_DEV_PORT (1 << 0)
- #define RXH_L2DA (1 << 1)
- #define RXH_VLAN (1 << 2)
- #define RXH_L3_PROTO (1 << 3)
-@@ -446,5 +538,6 @@ struct ethtool_rxnfc {
- #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
- #define RXH_DISCARD (1 << 31)
-
-+#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
-
- #endif /* _LINUX_ETHTOOL_H */
-
diff --git a/patches/ethtool-6+20090323.orig/003_decode_port_other.patch b/patches/ethtool-6+20090323.orig/003_decode_port_other.patch
deleted file mode 100644
index f8a2e0325..000000000
--- a/patches/ethtool-6+20090323.orig/003_decode_port_other.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Subject: ethtool: Decode PORT_OTHER
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Thu, 30 Apr 2009 13:37:14 +0100
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
----
- ethtool.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/ethtool.c b/ethtool.c
-index 5c45b2d..08165eb 100644
---- a/ethtool.c
-+++ b/ethtool.c
-@@ -941,6 +941,9 @@ static int dump_ecmd(struct ethtool_cmd *ep)
- case PORT_FIBRE:
- fprintf(stdout, "FIBRE\n");
- break;
-+ case PORT_OTHER:
-+ fprintf(stdout, "Other\n");
-+ break;
- default:
- fprintf(stdout, "Unknown! (%i)\n", ep->port);
- break;
diff --git a/patches/ethtool-6+20090323.orig/004_report_link_partner_advertising.patch b/patches/ethtool-6+20090323.orig/004_report_link_partner_advertising.patch
deleted file mode 100644
index 62386afe1..000000000
--- a/patches/ethtool-6+20090323.orig/004_report_link_partner_advertising.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-Subject: ethtool: Report link partner advertising
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Thu, 30 Apr 2009 13:37:43 +0100
-
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
----
- ethtool.c | 20 +++++++++++---------
- 1 files changed, 11 insertions(+), 9 deletions(-)
-
-diff --git a/ethtool.c b/ethtool.c
-index 08165eb..0d188af 100644
---- a/ethtool.c
-+++ b/ethtool.c
-@@ -839,12 +839,13 @@ static void dump_supported(struct ethtool_cmd *ep)
- fprintf(stdout, "No\n");
- }
-
--static void dump_advertised(struct ethtool_cmd *ep)
-+static void dump_advertised(struct ethtool_cmd *ep,
-+ const char *prefix, u_int32_t mask)
- {
-- u_int32_t mask = ep->advertising;
-+ int indent = strlen(prefix) + 14;
- int did1;
-
-- fprintf(stdout, " Advertised link modes: ");
-+ fprintf(stdout, " %s link modes: ", prefix);
- did1 = 0;
- if (mask & ADVERTISED_10baseT_Half) {
- did1++; fprintf(stdout, "10baseT/Half ");
-@@ -854,7 +855,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
- }
- if (did1 && (mask & (ADVERTISED_100baseT_Half|ADVERTISED_100baseT_Full))) {
- fprintf(stdout, "\n");
-- fprintf(stdout, " ");
-+ fprintf(stdout, " %*s", indent, "");
- }
- if (mask & ADVERTISED_100baseT_Half) {
- did1++; fprintf(stdout, "100baseT/Half ");
-@@ -864,7 +865,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
- }
- if (did1 && (mask & (ADVERTISED_1000baseT_Half|ADVERTISED_1000baseT_Full))) {
- fprintf(stdout, "\n");
-- fprintf(stdout, " ");
-+ fprintf(stdout, " %*s", indent, "");
- }
- if (mask & ADVERTISED_1000baseT_Half) {
- did1++; fprintf(stdout, "1000baseT/Half ");
-@@ -874,14 +875,14 @@ static void dump_advertised(struct ethtool_cmd *ep)
- }
- if (did1 && (mask & ADVERTISED_2500baseX_Full)) {
- fprintf(stdout, "\n");
-- fprintf(stdout, " ");
-+ fprintf(stdout, " %*s", indent, "");
- }
- if (mask & ADVERTISED_2500baseX_Full) {
- did1++; fprintf(stdout, "2500baseX/Full ");
- }
- if (did1 && (mask & ADVERTISED_10000baseT_Full)) {
- fprintf(stdout, "\n");
-- fprintf(stdout, " ");
-+ fprintf(stdout, " %*s", indent, "");
- }
- if (mask & ADVERTISED_10000baseT_Full) {
- did1++; fprintf(stdout, "10000baseT/Full ");
-@@ -890,7 +891,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
- fprintf(stdout, "Not reported");
- fprintf(stdout, "\n");
-
-- fprintf(stdout, " Advertised auto-negotiation: ");
-+ fprintf(stdout, " %s auto-negotiation: ", prefix);
- if (mask & ADVERTISED_Autoneg)
- fprintf(stdout, "Yes\n");
- else
-@@ -902,7 +903,8 @@ static int dump_ecmd(struct ethtool_cmd *ep)
- u32 speed;
-
- dump_supported(ep);
-- dump_advertised(ep);
-+ dump_advertised(ep, "Advertised", ep->advertising);
-+ dump_advertised(ep, "Link partner advertised", ep->lp_advertising);
-
- fprintf(stdout, " Speed: ");
- speed = ethtool_cmd_speed(ep);
diff --git a/patches/ethtool-6+20090323.orig/005_report_pause_autonegotiation_flags.patch b/patches/ethtool-6+20090323.orig/005_report_pause_autonegotiation_flags.patch
deleted file mode 100644
index 7c5338ca8..000000000
--- a/patches/ethtool-6+20090323.orig/005_report_pause_autonegotiation_flags.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Subject: ethtool: Report pause auto-negotiation flags
-From: Ben Hutchings <bhutchings@solarflare.com>
-Date: Thu, 30 Apr 2009 13:38:06 +0100
-
-Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
----
- ethtool.c | 13 +++++++++++++
- 1 files changed, 13 insertions(+), 0 deletions(-)
-
-diff --git a/ethtool.c b/ethtool.c
-index 0d188af..c40603c 100644
---- a/ethtool.c
-+++ b/ethtool.c
-@@ -891,6 +891,19 @@ static void dump_advertised(struct ethtool_cmd *ep,
- fprintf(stdout, "Not reported");
- fprintf(stdout, "\n");
-
-+ fprintf(stdout, " %s pause frame use: ", prefix);
-+ if (mask & ADVERTISED_Pause) {
-+ fprintf(stdout, "Symmetric");
-+ if (mask & ADVERTISED_Asym_Pause)
-+ fprintf(stdout, " Receive-only");
-+ fprintf(stdout, "\n");
-+ } else {
-+ if (mask & ADVERTISED_Asym_Pause)
-+ fprintf(stdout, "Transmit-only\n");
-+ else
-+ fprintf(stdout, "No\n");
-+ }
-+
- fprintf(stdout, " %s auto-negotiation: ", prefix);
- if (mask & ADVERTISED_Autoneg)
- fprintf(stdout, "Yes\n");
diff --git a/patches/ethtool-6+20090323.orig/006_use_asm-types-h.patch b/patches/ethtool-6+20090323.orig/006_use_asm-types-h.patch
deleted file mode 100644
index f3f50c6fe..000000000
--- a/patches/ethtool-6+20090323.orig/006_use_asm-types-h.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/ethtool-util.h b/ethtool-util.h
-index 5572771..8ae7e47 100644
---- a/ethtool-util.h
-+++ b/ethtool-util.h
-@@ -5,11 +5,7 @@
-
- #include <sys/types.h>
-
--/* hack, so we may include kernel's ethtool.h */
--typedef unsigned long long __u64;
--typedef __uint32_t __u32; /* ditto */
--typedef __uint16_t __u16; /* ditto */
--typedef __uint8_t __u8; /* ditto */
-+#include "ethtool-copy.h"
-
- /* historical: we used to use kernel-like types; remove these once cleaned */
- typedef unsigned long long u64;
-@@ -17,8 +13,6 @@ typedef __uint32_t u32; /* ditto */
- typedef __uint16_t u16; /* ditto */
- typedef __uint8_t u8; /* ditto */
-
--#include "ethtool-copy.h"
--
- /* National Semiconductor DP83815, DP83816 */
- int natsemi_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
- int natsemi_dump_eeprom(struct ethtool_drvinfo *info,
diff --git a/patches/ethtool-6+20090323.orig/autogen.sh b/patches/ethtool-6+20090323.orig/autogen.sh
deleted file mode 120000
index 9f8a4cb7d..000000000
--- a/patches/ethtool-6+20090323.orig/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-../autogen.sh \ No newline at end of file
diff --git a/patches/ethtool-6+20090323.orig/series b/patches/ethtool-6+20090323.orig/series
deleted file mode 100644
index eb494561d..000000000
--- a/patches/ethtool-6+20090323.orig/series
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# these patches come from
-# http://ftp.de.debian.org/debian/pool/main/e/ethtool/ethtool_6+20090323-2.diff.gz
-#
-001_remove_support_for_rx_hashing_by_port.patch
-002_update_ethtool-copy-h.patch
-003_decode_port_other.patch
-004_report_link_partner_advertising.patch
-005_report_pause_autonegotiation_flags.patch
-006_use_asm-types-h.patch
diff --git a/patches/fakeroot-1.14.4/add-sysroot-prefix.diff b/patches/fakeroot-1.14.4/add-sysroot-prefix.diff
new file mode 100644
index 000000000..38239568e
--- /dev/null
+++ b/patches/fakeroot-1.14.4/add-sysroot-prefix.diff
@@ -0,0 +1,34 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: add FAKEROOT_SYSROOT prefix for relocation
+
+Prefix all paths with FAKEROOT_SYSROOT
+It will be replaced by the current sysroot.
+
+Not for upstream.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ scripts/fakeroot.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: b/scripts/fakeroot.in
+===================================================================
+--- a/scripts/fakeroot.in
++++ b/scripts/fakeroot.in
+@@ -30,12 +30,12 @@ fatal ()
+ }
+
+ # strip /bin/fakeroot to find install prefix
+-FAKEROOT_PREFIX=@prefix@
+-FAKEROOT_BINDIR=@bindir@
++FAKEROOT_PREFIX="FAKEROOT_SYSROOT@prefix@"
++FAKEROOT_BINDIR="FAKEROOT_SYSROOT@bindir@"
+
+ USEABSLIBPATH=@LDPRELOADABS@
+ LIB=lib@fakeroot_transformed@@DLSUFFIX@
+-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
++PATHS="FAKEROOT_SYSROOT@libdir@":${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+ FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
+
+ FAKED_MODE="unknown-is-root"
diff --git a/patches/fakeroot-1.14.4/series b/patches/fakeroot-1.14.4/series
new file mode 100644
index 000000000..1ff956dd2
--- /dev/null
+++ b/patches/fakeroot-1.14.4/series
@@ -0,0 +1 @@
+add-sysroot-prefix.diff
diff --git a/patches/fbgrab-1.0/series b/patches/fbgrab-1.0/series
new file mode 100644
index 000000000..d4a2f2b81
--- /dev/null
+++ b/patches/fbgrab-1.0/series
@@ -0,0 +1 @@
+fbgrab-1.0-crosscompile.diff
diff --git a/patches/grub-0.97/series b/patches/grub-0.97/series
new file mode 100644
index 000000000..db0b68af5
--- /dev/null
+++ b/patches/grub-0.97/series
@@ -0,0 +1,2 @@
+grub-0.97-gcc4x.diff
+grub-set-install_partition_hd0_0.diff
diff --git a/patches/ifplugd-0.28/series b/patches/ifplugd-0.28/series
new file mode 100644
index 000000000..f093c5e62
--- /dev/null
+++ b/patches/ifplugd-0.28/series
@@ -0,0 +1 @@
+ifplugd-fix-include.diff
diff --git a/patches/insight-6.8-1/fix-destdir-handling.diff b/patches/insight-6.8-1/fix-destdir-handling.diff
new file mode 100644
index 000000000..2682557e2
--- /dev/null
+++ b/patches/insight-6.8-1/fix-destdir-handling.diff
@@ -0,0 +1,375 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: fix DESTDIR and INSTALL_ROOT
+
+* don't clean DESTDIR / INSTALL_ROOT
+* use DESTDIR / INSTALL_ROOT for everything
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ etc/Makefile.in | 2 +-
+ gdb/Makefile.in | 2 +-
+ itcl/itcl/Makefile.in | 20 ++++++++++----------
+ itcl/itk/Makefile.in | 22 +++++++++++-----------
+ itcl/iwidgets/Makefile.in | 4 ++--
+ libgui/Makefile.in | 2 +-
+ libgui/library/Makefile.in | 2 +-
+ libgui/src/Makefile.in | 2 +-
+ readline/Makefile.in | 2 +-
+ readline/doc/Makefile.in | 2 +-
+ readline/examples/Makefile.in | 2 +-
+ readline/examples/rlfe/Makefile.in | 2 +-
+ readline/shlib/Makefile.in | 2 +-
+ tcl/cygwin/Makefile.in | 2 +-
+ tcl/unix/Makefile.in | 2 +-
+ tcl/win/Makefile.in | 2 +-
+ tk/unix/Makefile.in | 2 +-
+ tk/win/Makefile.in | 2 +-
+ 18 files changed, 38 insertions(+), 38 deletions(-)
+
+Index: b/itcl/itcl/Makefile.in
+===================================================================
+--- a/itcl/itcl/Makefile.in
++++ b/itcl/itcl/Makefile.in
+@@ -116,7 +116,7 @@ GENERIC_HDRS= \
+ SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@
+
+ # CYGNUS LOCAL
+-ITCL_LIBRARY = @datadir@/itcl$(VERSION)
++ITCL_LIBRARY = $(DESTDIR)/@datadir@/itcl$(VERSION)
+ # END CYGNUS LOCAL
+
+ ITCL_GENERIC_DIR_NATIVE = @ITCL_GENERIC_DIR_NATIVE@
+@@ -149,7 +149,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
+ pkglibdir = $(libdir)/@PACKAGE@@VERSION@
+@@ -272,11 +272,11 @@ install-binaries: binaries install-lib-b
+ #========================================================================
+
+ install-libraries: libraries
+- $(mkinstalldirs) $(includedir)
+- @echo "Installing header files in $(includedir)"
++ $(mkinstalldirs) $(DESTDIR)$(includedir)
++ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @for i in $(GENERIC_HDRS) ; do \
+ echo "Installing $$i" ; \
+- $(INSTALL_DATA) $$i $(includedir) ; \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
+ done;
+ @echo "Installing library files in $(ITCL_LIBRARY)"
+ @for i in $(srcdir)/library/*.tcl ; do \
+@@ -290,14 +290,14 @@ install-libraries: libraries
+ #========================================================================
+
+ install-doc: doc
+- $(mkinstalldirs) $(mandir)/mann
+- @echo "Installing man pages in $(mandir)"
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/mann
++ @echo "Installing man pages in $(DESTDIR)$(mandir)"
+ @cd $(srcdir)/doc; for i in *.n; \
+ do \
+ echo "Installing $$i"; \
+ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+- $$i > $(mandir)/mann/$$i; \
+- chmod 444 $(mandir)/mann/$$i; \
++ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
++ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
+ done
+
+ test: $(TCLSH_PROG)
+@@ -447,7 +447,7 @@ install-lib-binaries: installdirs
+ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ else :; fi; \
+ done
+- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
++ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+
+ #========================================================================
+ # Install binary executables (e.g. .exe files)
+Index: b/etc/Makefile.in
+===================================================================
+--- a/etc/Makefile.in
++++ b/etc/Makefile.in
+@@ -2,7 +2,7 @@
+ # Makefile.in for etc
+ #
+
+-DESTDIR =
++#DESTDIR =
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+Index: b/gdb/Makefile.in
+===================================================================
+--- a/gdb/Makefile.in
++++ b/gdb/Makefile.in
+@@ -60,7 +60,7 @@ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+
+-DESTDIR =
++#DESTDIR =
+
+ AR = @AR@
+ AR_FLAGS = qv
+Index: b/itcl/itk/Makefile.in
+===================================================================
+--- a/itcl/itk/Makefile.in
++++ b/itcl/itk/Makefile.in
+@@ -104,7 +104,7 @@ GENERIC_HDRS= \
+ SAMPLE_NEW_VAR=@SAMPLE_NEW_VAR@
+
+ # CYGNUS LOCAL
+-ITK_LIBRARY = @datadir@/itk$(VERSION)
++ITK_LIBRARY = $(DESTDIR)@datadir@/itk$(VERSION)
+ # END CYGNUS LOCAL
+
+ ITK_GENERIC_DIR_NATIVE = @ITK_GENERIC_DIR_NATIVE@
+@@ -137,7 +137,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
+ pkglibdir = $(libdir)/@PACKAGE@@VERSION@
+@@ -267,11 +267,11 @@ install-binaries: binaries install-lib-b
+ #========================================================================
+
+ install-libraries: libraries
+- $(mkinstalldirs) $(includedir)
+- @echo "Installing header files in $(includedir)"
++ $(mkinstalldirs) $(DESTDIR)$(includedir)
++ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @for i in $(GENERIC_HDRS) ; do \
+ echo "Installing $$i" ; \
+- $(INSTALL_DATA) $$i $(includedir) ; \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
+ done;
+ @echo "Installing library files in $(ITK_LIBRARY)"
+ @for i in $(srcdir)/library/*.* $(srcdir)/library/tclIndex ; do \
+@@ -285,14 +285,14 @@ install-libraries: libraries
+ #========================================================================
+
+ install-doc: doc
+- $(mkinstalldirs) $(mandir)/mann
+- @echo "Installing man pages in $(mandir)"
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/mann
++ @echo "Installing man pages in $(DESTDIR)$(mandir)"
+ @cd $(srcdir)/doc; for i in *.n; \
+ do \
+- echo "Installing $$i info $(mandir)/mann"; \
++ echo "Installing $$i info $(DESTDIR)$(mandir)/mann"; \
+ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+- $$i > $(mandir)/mann/$$i; \
+- chmod 444 $(mandir)/mann/$$i; \
++ $$i > $(DESTDIR)$(mandir)/mann/$$i; \
++ chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \
+ done
+
+ test: $(TCLSH_PROG)
+@@ -421,7 +421,7 @@ install-lib-binaries: installdirs
+ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ else :; fi; \
+ done
+- $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir)
++ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+
+ #========================================================================
+ # Install binary executables (e.g. .exe files)
+Index: b/itcl/iwidgets/Makefile.in
+===================================================================
+--- a/itcl/iwidgets/Makefile.in
++++ b/itcl/iwidgets/Makefile.in
+@@ -36,13 +36,13 @@ bindir = @bindir@
+ # to be different than those used for actually reference files at
+ # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++#INSTALL_ROOT =
+
+ # Path name to use when installing library scripts:
+
+ # REDHAT LOCAL
+ #SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION)
+-SCRIPT_INSTALL_DIR = @datadir@/iwidgets$(IWIDGETS_VERSION)
++SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)@datadir@/iwidgets$(IWIDGETS_VERSION)
+ # END REDHAT LOCAL
+
+ # Directory in which to install the archive libtcl.a:
+Index: b/libgui/Makefile.in
+===================================================================
+--- a/libgui/Makefile.in
++++ b/libgui/Makefile.in
+@@ -32,7 +32,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+Index: b/libgui/library/Makefile.in
+===================================================================
+--- a/libgui/library/Makefile.in
++++ b/libgui/library/Makefile.in
+@@ -32,7 +32,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+Index: b/libgui/src/Makefile.in
+===================================================================
+--- a/libgui/src/Makefile.in
++++ b/libgui/src/Makefile.in
+@@ -34,7 +34,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+Index: b/readline/Makefile.in
+===================================================================
+--- a/readline/Makefile.in
++++ b/readline/Makefile.in
+@@ -63,7 +63,7 @@ infodir = @infodir@
+ man3dir = $(mandir)/man3
+
+ # Support an alternate destination root directory for package building
+-DESTDIR =
++#DESTDIR =
+
+ # Programs to make tags files.
+ ETAGS = etags -tw
+Index: b/readline/doc/Makefile.in
+===================================================================
+--- a/readline/doc/Makefile.in
++++ b/readline/doc/Makefile.in
+@@ -36,7 +36,7 @@ man3dir = $(mandir)/$(manpfx)3
+ htmldir =
+
+ # Support an alternate destination root directory for package building
+-DESTDIR =
++#DESTDIR =
+
+ SHELL = @MAKE_SHELL@
+ RM = rm -f
+Index: b/readline/examples/Makefile.in
+===================================================================
+--- a/readline/examples/Makefile.in
++++ b/readline/examples/Makefile.in
+@@ -27,7 +27,7 @@ top_srcdir = @top_srcdir@
+ BUILD_DIR = .
+
+ # Support an alternate destination root directory for package building
+-DESTDIR =
++#DESTDIR =
+
+ DEFS = @DEFS@
+ CC = @CC@
+Index: b/readline/examples/rlfe/Makefile.in
+===================================================================
+--- a/readline/examples/rlfe/Makefile.in
++++ b/readline/examples/rlfe/Makefile.in
+@@ -7,7 +7,7 @@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+-DESTDIR =
++#DESTDIR =
+
+ # Where to install screen.
+
+Index: b/readline/shlib/Makefile.in
+===================================================================
+--- a/readline/shlib/Makefile.in
++++ b/readline/shlib/Makefile.in
+@@ -59,7 +59,7 @@ datadir = @datadir@
+ localedir = $(datadir)/locale
+
+ # Support an alternate destination root directory for package building
+-DESTDIR =
++#DESTDIR =
+
+ CFLAGS = @CFLAGS@
+ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
+Index: b/tcl/cygwin/Makefile.in
+===================================================================
+--- a/tcl/cygwin/Makefile.in
++++ b/tcl/cygwin/Makefile.in
+@@ -32,7 +32,7 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+
+-DESTDIR =
++#DESTDIR =
+
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+Index: b/tcl/unix/Makefile.in
+===================================================================
+--- a/tcl/unix/Makefile.in
++++ b/tcl/unix/Makefile.in
+@@ -38,7 +38,7 @@ mandir = @mandir@
+ # to be different than those used for actually reference files at
+ # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++#INSTALL_ROOT =
+
+ # Path for the platform independent Tcl scripting libraries:
+ # REDHAT LOCAL
+Index: b/tcl/win/Makefile.in
+===================================================================
+--- a/tcl/win/Makefile.in
++++ b/tcl/win/Makefile.in
+@@ -34,7 +34,7 @@ mandir = @mandir@
+ # to be different than those used for actually reference files at
+ # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++#INSTALL_ROOT =
+
+ # Directory from which applications will reference the library of Tcl
+ # scripts (note: you can set the TCL_LIBRARY environment variable at
+Index: b/tk/unix/Makefile.in
+===================================================================
+--- a/tk/unix/Makefile.in
++++ b/tk/unix/Makefile.in
+@@ -41,7 +41,7 @@ mandir = @mandir@
+ # to be different than those used for actually reference files at
+ # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++#INSTALL_ROOT =
+
+ # Directory from which applications will reference the library of Tcl
+ # scripts (note: you can set the TK_LIBRARY environment variable at
+Index: b/tk/win/Makefile.in
+===================================================================
+--- a/tk/win/Makefile.in
++++ b/tk/win/Makefile.in
+@@ -34,7 +34,7 @@ mandir = @mandir@
+ # to be different than those used for actually reference files at
+ # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++#INSTALL_ROOT =
+
+ # Directory from which applications will reference the library of Tk
+ # scripts (note: you can set the TK_LIBRARY environment variable at
diff --git a/patches/insight-6.8-1/gdb-6.8-fix-compile-karmic.patch b/patches/insight-6.8-1/gdb-6.8-fix-compile-karmic.patch
new file mode 100644
index 000000000..1f4353f8f
--- /dev/null
+++ b/patches/insight-6.8-1/gdb-6.8-fix-compile-karmic.patch
@@ -0,0 +1,27 @@
+From d7931d9affb51de54069b75ae0ae9648ffdd64fc Mon Sep 17 00:00:00 2001
+From: Holger Hans Peter Freyther <zecke@selfish.org>
+Date: Sun, 2 Aug 2009 04:09:03 +0200
+Subject: [PATCH] gdb: Add a patch to fix compilation of gdb 6.8
+
+gcc warns about the subscript_array being uninitialized,
+just memset this area... luckily I can not break much as
+this is for fortran code.
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+
+Index: gdb-6.8/gdb/eval.c
+===================================================================
+--- gdb-6.8.orig/gdb/eval.c 2009-08-02 03:25:20.000000000 +0200
++++ gdb-6.8/gdb/eval.c 2009-08-02 03:53:39.000000000 +0200
+@@ -1656,6 +1656,8 @@
+ if (nargs != ndimensions)
+ error (_("Wrong number of subscripts"));
+
++ memset(&subscript_array, 0, sizeof(subscript_array));
++
+ /* Now that we know we have a legal array subscript expression
+ let us actually find out where this element exists in the array. */
+
+--
+1.6.1
+
diff --git a/patches/insight-6.8-1/series b/patches/insight-6.8-1/series
new file mode 100644
index 000000000..fcea17653
--- /dev/null
+++ b/patches/insight-6.8-1/series
@@ -0,0 +1,2 @@
+gdb-6.8-fix-compile-karmic.patch
+fix-destdir-handling.diff
diff --git a/patches/jed-0.99-19/series b/patches/jed-0.99-19/series
new file mode 100644
index 000000000..d6609c6a9
--- /dev/null
+++ b/patches/jed-0.99-19/series
@@ -0,0 +1,2 @@
+jed-0.99-18-chkslang.diff
+jed-0.99-18-rpath-hack.diff
diff --git a/patches/libpcap-1.0.0/0002-compile-static-lib-without-fPIC.patch b/patches/libpcap-1.0.0/0002-compile-static-lib-without-fPIC.patch
deleted file mode 100644
index 31dda3be6..000000000
--- a/patches/libpcap-1.0.0/0002-compile-static-lib-without-fPIC.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From b3f3e35dbd100fb10cbd0ee5cf86baecce48a673 Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Sun, 10 Jan 2010 00:47:38 +0100
-Subject: [PATCH 2/4] compile static lib without -fPIC
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.in | 26 ++++++++++++++------------
- 1 files changed, 14 insertions(+), 12 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 0551ae5..d8d12b3 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -73,9 +73,13 @@ YACC = @V_YACC@
- # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
- # Also, gcc does not remove the .o before forking 'as', which can be a
- # problem if you don't own the file but can write to the directory.
--.c.o:
-+%.o: %.c
- @rm -f $@
-- $(CC) $(CFLAGS) -c $(srcdir)/$*.c
-+ $(CC) $(filter-out -fPIC,$(CFLAGS)) -c $(srcdir)/$*.c -o $@
-+
-+%.do: %.c
-+ @rm -f $@
-+ $(CC) $(CFLAGS) -c $(srcdir)/$*.c -o $@
-
- PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
- FSRC = fad-@V_FINDALLDEVS@.c
-@@ -90,6 +94,7 @@ SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
- # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
- # hack the extra indirection
- OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
-+DOBJ = $(PSRC:.c=.do) $(FSRC:.c=.do) $(CSRC:.c=.do) $(SSRC:.c=.do) $(GENSRC:.c=.do) $(LIBOBJS:.o=.do)
- HDR = \
- acconfig.h \
- arcnet.h \
-@@ -122,7 +127,7 @@ TAGHDR = \
- TAGFILES = \
- $(SRC) $(HDR) $(TAGHDR)
-
--CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
-+CLEANFILES = $(OBJ) $(DOBJ) libpcap.a libpcap.$(DYEXT) $(GENSRC) $(GENHDR) lex.yy.c
-
- MAN1 = pcap-config.1
-
-@@ -324,9 +329,9 @@ shared: libpcap.$(DYEXT)
- # XXX - this works with GNU ld, but won't necessarily work with native
- # ld on, for example, various SVR4-flavored platforms, or Digital UNIX.
- #
--libpcap.so: $(OBJ)
-+libpcap.so: $(DOBJ)
- @rm -f $@
-- $(CC) $(LDFLAGS) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(DOBJ) $(DAGLIBS)
-
- #
- # The following rule succeeds, but the result is untested.
-@@ -349,7 +354,6 @@ scanner.c: $(srcdir)/scanner.l
- ./runlex.sh $(LEX) -o$@ $<
-
- scanner.o: scanner.c tokdefs.h
-- $(CC) $(CFLAGS) -c scanner.c
-
- pcap.o: version.h
-
-@@ -362,10 +366,11 @@ grammar.c: $(srcdir)/grammar.y
-
- grammar.o: grammar.c
- @rm -f $@
-- $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
-+ $(CC) $(filter-out -fPIC,$(CFLAGS)) -Dyylval=pcap_lval -c grammar.c -o $@
-
--version.o: version.c
-- $(CC) $(CFLAGS) -c version.c
-+grammar.do: grammar.c
-+ @rm -f $@
-+ $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c -o $@
-
- snprintf.o: $(srcdir)/missing/snprintf.c
- $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
-@@ -389,9 +394,6 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
- rm -f bpf_filter.c
- ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
-
--bpf_filter.o: bpf_filter.c
-- $(CC) $(CFLAGS) -c bpf_filter.c
--
- #
- # Generate the pcap-config script.
- #
---
-1.6.6
-
diff --git a/patches/libpcap-1.0.0/0003-creakte-hardlinks-with-force-during-install.patch b/patches/libpcap-1.0.0/0003-creakte-hardlinks-with-force-during-install.patch
deleted file mode 100644
index e292fe7a5..000000000
--- a/patches/libpcap-1.0.0/0003-creakte-hardlinks-with-force-during-install.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 14c3a49996ec9ba0d92b86e441024a1960557b66 Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Sun, 10 Jan 2010 00:47:38 +0100
-Subject: [PATCH 3/4] creakte hardlinks with force during install
-
-Without this patch a repeated "make install" fails,
-because the destination of the links already exists from the
-previous "make install".
-
-This patch add the "-f" parameter to "ln" to remove the link destination
-in order to overwrite it.
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile.in | 18 +++++++++---------
- 1 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index d8d12b3..46ef86a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -454,23 +454,23 @@ install: libpcap.a pcap-config
- for i in $(MAN3PCAP); do \
- $(INSTALL_DATA) $(srcdir)/$$i \
- $(DESTDIR)$(mandir)/man3/$$i; done
-- ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
-- ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
-+ ln -f $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
- $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
- for i in $(MANFILE); do \
- $(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manfile.in/.manfile/'` \
---
-1.6.6
-
diff --git a/patches/libpcap-1.0.0/0004-pcap-config-add-SYSROOT-support.patch b/patches/libpcap-1.0.0/0004-pcap-config-add-SYSROOT-support.patch
deleted file mode 100644
index 33c90b15d..000000000
--- a/patches/libpcap-1.0.0/0004-pcap-config-add-SYSROOT-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e41188c0eb0cbd906c4c649ea2f13de2d57b79ee Mon Sep 17 00:00:00 2001
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Sun, 10 Jan 2010 00:49:07 +0100
-Subject: [PATCH 4/4] pcap-config: add SYSROOT support
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- pcap-config.in | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pcap-config.in b/pcap-config.in
-index 19f2114..2a127f4 100644
---- a/pcap-config.in
-+++ b/pcap-config.in
-@@ -7,10 +7,10 @@
- case "$1" in
-
- --cflags)
-- echo "-I @includedir@"
-+ echo "-I ${SYSROOT}@includedir@"
- ;;
-
- --libs)
-- echo "-L @libdir@ -lpcap @DEPLIBS@"
-+ echo "-L ${SYSROOT}@libdir@ -lpcap @DEPLIBS@"
- ;;
- esac
---
-1.6.6
-
diff --git a/patches/libpcap-1.0.0/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch b/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
index 58a66bef4..25e5c9d38 100644
--- a/patches/libpcap-1.0.0/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
+++ b/patches/libpcap-1.1.1/0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
@@ -4,19 +4,19 @@ Date: Sun, 10 Jan 2010 00:47:38 +0100
Subject: [PATCH 1/4] add CFLAGS, CPPFLAGS and LDFLAGS to Makefile.in
the build system is autoconf but not automake :(
-It doesn't care about CFLAGS, CPPFLAGS or LDFLAGS from outside.
+It doesn't care about CFLAGS or CPPFLAGS from outside.
This patch adds them.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
- Makefile.in | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index 5c4d679..0551ae5 100644
+Index: b/Makefile.in
+===================================================================
--- a/Makefile.in
+++ b/Makefile.in
-@@ -55,7 +55,7 @@ DYEXT = @DYEXT@
+@@ -58,7 +58,7 @@ V_RPATH_OPT = @V_RPATH_OPT@
PROG=libpcap
# Standard CFLAGS
@@ -25,15 +25,3 @@ index 5c4d679..0551ae5 100644
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
-@@ -326,7 +326,7 @@ shared: libpcap.$(DYEXT)
- #
- libpcap.so: $(OBJ)
- @rm -f $@
-- $(CC) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
-
- #
- # The following rule succeeds, but the result is untested.
---
-1.6.6
-
diff --git a/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff b/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff
new file mode 100644
index 000000000..fefd05e4b
--- /dev/null
+++ b/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff
@@ -0,0 +1,34 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: build and install share lib only
+
+This patch removes the static library from the dependency list
+for "all" and "install". This way libpcap.a is not built and
+tcpdump cannot link against it.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/Makefile.in
+===================================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -324,7 +324,7 @@ EXTRA_DIST = \
+ Win32/Src/inet_net.c \
+ Win32/Src/inet_pton.c
+
+-all: libpcap.a shared pcap-config
++all: shared pcap-config
+
+ libpcap.a: $(OBJ)
+ @rm -f $@
+@@ -497,7 +497,7 @@ selpolltest: selpolltest.c libpcap.a
+ opentest: opentest.c libpcap.a
+ $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
+
+-install: install-shared install-archive pcap-config
++install: install-shared pcap-config
+ [ -d $(DESTDIR)$(libdir) ] || \
+ (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
+ [ -d $(DESTDIR)$(includedir) ] || \
diff --git a/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch b/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch
new file mode 100644
index 000000000..457a7aa41
--- /dev/null
+++ b/patches/libpcap-1.1.1/0004-pcap-config-add-SYSROOT-support.patch
@@ -0,0 +1,55 @@
+From e41188c0eb0cbd906c4c649ea2f13de2d57b79ee Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Sun, 10 Jan 2010 00:49:07 +0100
+Subject: [PATCH 4/4] pcap-config: add SYSROOT support
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ pcap-config.in | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+Index: b/pcap-config.in
+===================================================================
+--- a/pcap-config.in
++++ b/pcap-config.in
+@@ -47,16 +47,16 @@ then
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I@includedir@ -L@libdir@ -lpcap @LIBS@"
++ echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ -lpcap @LIBS@"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I@includedir@ -L@libdir@ @LIBS@"
++ echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ @LIBS@"
+ elif [ "$show_cflags" = 1 ]
+ then
+- echo "-I@includedir@"
++ echo "-I${SYSROOT}@includedir@"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L@libdir@ -lpcap @LIBS@"
++ echo "-L${SYSROOT}@libdir@ -lpcap @LIBS@"
+ elif [ "$show_additional_libs" = 1 ]
+ then
+ echo "@LIBS@"
+@@ -68,15 +68,15 @@ else
+ #
+ if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
+ then
+- echo "-I@includedir@ -L@libdir@ $RPATH -lpcap"
++ echo "-I${SYSROOT}@includedir@ -L${SYSROOT}@libdir@ $RPATH -lpcap"
+ elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
+ then
+- echo "-I@includedir@"
++ echo "-I${SYSROOT}@includedir@"
+ elif [ "$show_cflags" = 1 ]
+ then
+- echo "-I@includedir@"
++ echo "-I${SYSROOT}@includedir@"
+ elif [ "$show_libs" = 1 ]
+ then
+- echo "-L@libdir@ $RPATH -lpcap"
++ echo "-L:{SYSROOT}@libdir@ $RPATH -lpcap"
+ fi
+ fi
diff --git a/patches/libpcap-1.0.0/series b/patches/libpcap-1.1.1/series
index 842b18030..9c6cddcbc 100644
--- a/patches/libpcap-1.0.0/series
+++ b/patches/libpcap-1.1.1/series
@@ -1,4 +1,3 @@
0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch
-0002-compile-static-lib-without-fPIC.patch
-0003-creakte-hardlinks-with-force-during-install.patch
+0002-dont-compile-static-lib.diff
0004-pcap-config-add-SYSROOT-support.patch
diff --git a/patches/logrotate-3.7.1/compressutime.patch b/patches/logrotate-3.7.1/compressutime.patch
index e2da5cba2..4fbc90424 100644
--- a/patches/logrotate-3.7.1/compressutime.patch
+++ b/patches/logrotate-3.7.1/compressutime.patch
@@ -1,7 +1,13 @@
Preserve mtime/atime on compression. (Closes: #286957)
---- ./logrotate.c 2005-09-03 14:07:42.000000000 +0100
-+++ /tmp/dpep-work.m2M7hf/logrotate-3.7.1/logrotate.c 2005-09-03 14:08:14.000000000 +0100
+---
+ logrotate.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+Index: logrotate-3.7.1/logrotate.c
+===================================================================
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
@@ -12,6 +12,8 @@
#include <time.h>
#include <unistd.h>
@@ -11,7 +17,7 @@ Preserve mtime/atime on compression. (Closes: #286957)
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
-@@ -120,6 +122,7 @@
+@@ -120,6 +122,7 @@ static int removeLogFile(char * name) {
static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
char * compressedName;
const char ** fullCommand;
@@ -19,7 +25,7 @@ Preserve mtime/atime on compression. (Closes: #286957)
int inFile;
int outFile;
int i;
-@@ -190,6 +193,12 @@
+@@ -190,6 +193,12 @@ static int compressLogFile(char * name,
message(MESS_ERROR, "failed to compress log %s\n", name);
return 1;
}
diff --git a/patches/logrotate-3.7.1/configparse.patch b/patches/logrotate-3.7.1/configparse.patch
index a86eadb39..471f025d8 100644
--- a/patches/logrotate-3.7.1/configparse.patch
+++ b/patches/logrotate-3.7.1/configparse.patch
@@ -1,11 +1,15 @@
# Loosens the config syntax checking to allow more flexibility.
# (Closes: #95617,#95630)
+---
+ config.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
Index: logrotate-3.7.1/config.c
===================================================================
---- logrotate-3.7.1.orig/config.c 2006-04-08 20:46:40.250457779 +0100
-+++ logrotate-3.7.1/config.c 2006-04-08 20:48:15.188228344 +0100
-@@ -768,7 +768,7 @@
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
+@@ -768,7 +768,7 @@ static int readConfigFile(const char * c
while (*start) {
chptr = start;
@@ -14,7 +18,7 @@ Index: logrotate-3.7.1/config.c
chptr++;
tabooExts = realloc(tabooExts, sizeof(*tabooExts) *
-@@ -780,7 +780,7 @@
+@@ -780,7 +780,7 @@ static int readConfigFile(const char * c
tabooCount++;
start = chptr;
diff --git a/patches/logrotate-3.7.1/cpp-crossbuild.patch b/patches/logrotate-3.7.1/cpp-crossbuild.patch
index 783e405ce..f1bc31717 100644
--- a/patches/logrotate-3.7.1/cpp-crossbuild.patch
+++ b/patches/logrotate-3.7.1/cpp-crossbuild.patch
@@ -6,11 +6,15 @@ dpkg-cross sets CPP variable, and compilation failures, because
the executable 'cpp' does not accept multiple input files.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/Makefile
===================================================================
---- logrotate-3.7.1.orig/Makefile 2003-10-09 21:05:07.000000000 +0100
-+++ logrotate-3.7.1/Makefile 2006-04-08 21:21:31.333853922 +0100
-@@ -88,7 +88,7 @@
+--- logrotate-3.7.1.orig/Makefile
++++ logrotate-3.7.1/Makefile
+@@ -88,7 +88,7 @@ clean:
rm -f $(OBJS) $(PROG) core* .depend
depend:
diff --git a/patches/logrotate-3.7.1/datehack.patch b/patches/logrotate-3.7.1/datehack.patch
index fa58fbd43..c36a7a657 100644
--- a/patches/logrotate-3.7.1/datehack.patch
+++ b/patches/logrotate-3.7.1/datehack.patch
@@ -1,11 +1,15 @@
No longer consider state file dates before 1996 as fatal errors.
(Closes: #65534)
+---
+ logrotate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 20:46:40.217463729 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 20:52:51.770419373 +0100
-@@ -1145,7 +1145,7 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -1145,7 +1145,7 @@ static int readState(char * stateFilenam
}
/* Hack to hide earlier bug */
diff --git a/patches/logrotate-3.7.1/deb-config-h.patch b/patches/logrotate-3.7.1/deb-config-h.patch
index 3e78b509b..0958d8995 100644
--- a/patches/logrotate-3.7.1/deb-config-h.patch
+++ b/patches/logrotate-3.7.1/deb-config-h.patch
@@ -1,10 +1,14 @@
Fix locations of STATEFILE and DEFAULT_MAIL_COMMAND for Debian.
+---
+ config.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
Index: logrotate-3.7.1/config.h
===================================================================
---- logrotate-3.7.1.orig/config.h 2006-04-08 20:26:13.052651364 +0100
-+++ logrotate-3.7.1/config.h 2006-04-08 20:51:24.180005096 +0100
+--- logrotate-3.7.1.orig/config.h
++++ logrotate-3.7.1/config.h
@@ -20,7 +20,7 @@
* Default settings for Linux - leave these last.
*/
diff --git a/patches/logrotate-3.7.1/deb-taboos.patch b/patches/logrotate-3.7.1/deb-taboos.patch
index 7d3d0f88d..39fc315ac 100644
--- a/patches/logrotate-3.7.1/deb-taboos.patch
+++ b/patches/logrotate-3.7.1/deb-taboos.patch
@@ -2,10 +2,14 @@ Fix the taboo list to avoid .dpkg-old, etc.
+---
+ config.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
Index: logrotate-3.7.1/config.c
===================================================================
---- logrotate-3.7.1.orig/config.c 2006-04-08 20:46:40.147476352 +0100
-+++ logrotate-3.7.1/config.c 2006-04-08 20:48:26.323326011 +0100
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
@@ -30,6 +30,8 @@
#endif
diff --git a/patches/logrotate-3.7.1/dst.patch b/patches/logrotate-3.7.1/dst.patch
index 08538eb4c..ae408e3e3 100644
--- a/patches/logrotate-3.7.1/dst.patch
+++ b/patches/logrotate-3.7.1/dst.patch
@@ -18,11 +18,15 @@ with the day of the last rotation, 01:00 AM. This can be solved by
setting lastRotated.tm_isdst correctly prior to the mktime() call.
+---
+ logrotate.c | 1 +
+ 1 file changed, 1 insertion(+)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 21:36:03.268110593 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 21:36:11.342764986 +0100
-@@ -78,6 +78,7 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -78,6 +78,7 @@ static logState * findState(const char *
states[i].lastRotated.tm_mon = now.tm_mon;
states[i].lastRotated.tm_mday = now.tm_mday;
states[i].lastRotated.tm_year = now.tm_year;
diff --git a/patches/logrotate-3.7.1/man-189243.patch b/patches/logrotate-3.7.1/man-189243.patch
index 46a5e4acc..2f454cff4 100644
--- a/patches/logrotate-3.7.1/man-189243.patch
+++ b/patches/logrotate-3.7.1/man-189243.patch
@@ -1,8 +1,14 @@
Fix location of killall in the examples. (Closes: #189243)
---- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-02-11 21:18:23.000000000 +0000
-+++ logrotate-3.7/logrotate.8 2004-02-11 21:18:54.000000000 +0000
-@@ -83,7 +83,7 @@
+---
+ logrotate.8 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: logrotate-3.7.1/logrotate.8
+===================================================================
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -83,7 +83,7 @@ compress
rotate 5
weekly
postrotate
@@ -11,7 +17,7 @@ Fix location of killall in the examples. (Closes: #189243)
endscript
}
-@@ -93,7 +93,7 @@
+@@ -93,7 +93,7 @@ compress
size=100k
sharedscripts
postrotate
diff --git a/patches/logrotate-3.7.1/man-333996.patch b/patches/logrotate-3.7.1/man-333996.patch
index 11c2731db..b815da26b 100644
--- a/patches/logrotate-3.7.1/man-333996.patch
+++ b/patches/logrotate-3.7.1/man-333996.patch
@@ -5,11 +5,15 @@ The manpage contains several sentences with the same mistake:
the use of "then" instead of "than".
+---
+ logrotate.8 | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:47:40.000000000 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:48:43.456864197 +0100
-@@ -125,7 +125,7 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -125,7 +125,7 @@ The next section defines the parameters
\fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
Each is rotated whenever it grows over 100k in size, and the old log
files are mailed (uncompressed) to www@my.org after going through 5
@@ -18,7 +22,7 @@ Index: logrotate-3.7.1/logrotate.8
the \fBpostrotate\fR script will only be run once (after the old logs
have been compressed), not once for each
log which is rotated. Note that log file names may be enclosed in
-@@ -135,7 +135,7 @@
+@@ -135,7 +135,7 @@ characters supported.
The last section defines the parameters for all of the files in
\fI/var/log/news\fR. Each file is rotated on a monthly basis. This is
@@ -27,7 +31,7 @@ Index: logrotate-3.7.1/logrotate.8
one file, the log files are not compressed.
Please use wildcards with caution. If you specify *, \fBlogrotate\fR will
-@@ -366,7 +366,7 @@
+@@ -366,7 +366,7 @@ appear inside a log file definition. See
\fBrotate \fIcount\fR
Log files are rotated \fIcount\fR times before being removed or mailed to the
address specified in a \fBmail\fR directive. If \fIcount\fR is 0, old versions
@@ -36,7 +40,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBsharedscripts\fR
-@@ -381,7 +381,7 @@
+@@ -381,7 +381,7 @@ option and implies \fBcreate\fR option.
.TP
\fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
@@ -45,7 +49,7 @@ Index: logrotate-3.7.1/logrotate.8
\fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
If the \fIG\fR suffix is used, the size is in gigabytes.
If the \fIk\fR suffix is used, the size is in kilobytes. So \fBsize 100\fR,
-@@ -408,8 +408,8 @@
+@@ -408,8 +408,8 @@ not commas.
.TP
\fBweekly\fR
diff --git a/patches/logrotate-3.7.1/man-lastaction.patch b/patches/logrotate-3.7.1/man-lastaction.patch
index 9babc4dfb..41804150e 100644
--- a/patches/logrotate-3.7.1/man-lastaction.patch
+++ b/patches/logrotate-3.7.1/man-lastaction.patch
@@ -1,11 +1,15 @@
Fix typo in the lastaction section of the manpage. It refers to itself
rather than to firstaction.
+---
+ logrotate.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:11:37.760424103 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:13:28.917607025 +0100
-@@ -359,7 +359,7 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -359,7 +359,7 @@ The lines between \fBlastaction\fR and \
must appear on lines by themselves) are executed once after all log
files that match the wildcarded pattern are rotated, after postrotate script
is run and only if at least one log is rotated. These directives may only
diff --git a/patches/logrotate-3.7.1/man-mailtypo.patch b/patches/logrotate-3.7.1/man-mailtypo.patch
index 578d6694a..c5638131d 100644
--- a/patches/logrotate-3.7.1/man-mailtypo.patch
+++ b/patches/logrotate-3.7.1/man-mailtypo.patch
@@ -1,11 +1,15 @@
Fix the markup on the "mail" part of the manpage (Closes: #300644)
+---
+ logrotate.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:14:56.187543069 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:16:19.525257240 +0100
-@@ -45,7 +45,7 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -45,7 +45,7 @@ by hand, as the new files will be create
correctly.
.TP
diff --git a/patches/logrotate-3.7.1/man-overriden.patch b/patches/logrotate-3.7.1/man-overriden.patch
index 3a7cceacb..fae01acd0 100644
--- a/patches/logrotate-3.7.1/man-overriden.patch
+++ b/patches/logrotate-3.7.1/man-overriden.patch
@@ -1,11 +1,15 @@
Fix manpage typo (Closes: #310337)
+---
+ logrotate.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:13:28.917607025 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:14:56.187543069 +0100
-@@ -329,7 +329,7 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -329,7 +329,7 @@ must be on the same physical device as t
and is assumed to be relative to the directory holding the log file
unless an absolute path name is specified. When this option is used all
old versions of the log end up in \fIdirectory\fR. This option may be
diff --git a/patches/logrotate-3.7.1/man-rh-1.patch b/patches/logrotate-3.7.1/man-rh-1.patch
index c4c6d8fd7..bb5358396 100644
--- a/patches/logrotate-3.7.1/man-rh-1.patch
+++ b/patches/logrotate-3.7.1/man-rh-1.patch
@@ -1,12 +1,16 @@
Fixes from upstream 3.7.1-4:
* Typo and missing information in man page (#139346)
+---
+ logrotate.8 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:16:19.525257240 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:17:39.954145340 +0100
-@@ -126,7 +126,8 @@
- Each is rotated whenever it grows over 100k is size, and the old log
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -126,7 +126,8 @@ The next section defines the parameters
+ Each is rotated whenever it grows over 100k in size, and the old log
files are mailed (uncompressed) to www@my.org after going through 5
rotations, rather then being removed. The \fBsharedscripts\fR means that
-the \fBpostrotate\fR script will only be run once, not once for each
@@ -15,7 +19,7 @@ Index: logrotate-3.7.1/logrotate.8
log which is rotated. Note that log file names may be enclosed in
quotes (and that quotes are required if the name contains spaces).
Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR
-@@ -384,7 +385,7 @@
+@@ -376,7 +377,7 @@ times for log file entries which match m
are only run once, no matter how many logs match the wildcarded pattern.
However, if none of the logs in the pattern require rotating, the scripts
will not be run at all. This option overrides the \fBnosharedscripts\fR
@@ -23,4 +27,4 @@ Index: logrotate-3.7.1/logrotate.8
+option and implies \fBcreate\fR option.
.TP
- \fBstart \fIcount\fR
+ \fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
diff --git a/patches/logrotate-3.7.1/man-sizetypo.patch b/patches/logrotate-3.7.1/man-sizetypo.patch
index ea9154c34..5cdb3f859 100644
--- a/patches/logrotate-3.7.1/man-sizetypo.patch
+++ b/patches/logrotate-3.7.1/man-sizetypo.patch
@@ -1,8 +1,14 @@
Fix manpage typo in the size example.
---- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-09-13 22:50:08.000000000 +0100
-+++ logrotate-3.7/logrotate.8 2004-09-13 22:50:25.000000000 +0100
-@@ -90,7 +90,7 @@
+---
+ logrotate.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: logrotate-3.7.1/logrotate.8
+===================================================================
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -90,7 +90,7 @@ compress
"/var/log/httpd/access.log" /var/log/httpd/error.log {
rotate 5
mail www@my.org
diff --git a/patches/logrotate-3.7.1/man-startcount.patch b/patches/logrotate-3.7.1/man-startcount.patch
index 5553e6f74..c940114b4 100644
--- a/patches/logrotate-3.7.1/man-startcount.patch
+++ b/patches/logrotate-3.7.1/man-startcount.patch
@@ -1,11 +1,15 @@
Inconsistency in manpage logrotate(8), start directive
(Closes: #290628)
+---
+ logrotate.8 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:09:24.530501346 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:11:37.760424103 +0100
-@@ -392,7 +392,7 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -392,7 +392,7 @@ This is the number to use as the base fo
you specify 0, the logs will be created with a .0 extension as they are
rotated from the original log files. If you specify 9, log files will
be created with a .9, skipping 0-8. Files will still be rotated the
diff --git a/patches/logrotate-3.7.1/manpage.patch b/patches/logrotate-3.7.1/manpage.patch
index 0a43dbf1f..af469c381 100644
--- a/patches/logrotate-3.7.1/manpage.patch
+++ b/patches/logrotate-3.7.1/manpage.patch
@@ -4,10 +4,14 @@ Patches from: J S Bygott <jsb_no_spm@jsbygott.fsnet.co.uk>
General fixes to manpages.
+---
+ logrotate.8 | 151 +++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 84 insertions(+), 67 deletions(-)
+
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 21:43:29.280038309 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 21:45:53.721194620 +0100
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
@@ -3,7 +3,8 @@
.SH NAME
logrotate \- rotates, compresses, and mails system logs
@@ -18,7 +22,7 @@ Index: logrotate-3.7.1/logrotate.8
.SH DESCRIPTION
\fBlogrotate\fR is designed to ease administration of systems that generate
large numbers of log files. It allows automatic rotation, compression,
-@@ -11,16 +12,16 @@
+@@ -11,16 +12,16 @@ removal, and mailing of log files. Each
weekly, monthly, or when it grows too large.
.P
Normally, \fBlogrotate\fR is run as a daily cron job. It will not modify
@@ -40,7 +44,7 @@ Index: logrotate-3.7.1/logrotate.8
is given on the command line, every file in that directory is used as
a config file.
.P
-@@ -36,37 +37,42 @@
+@@ -36,37 +37,42 @@ Turns on debug mode and implies \fB-v\fR
be made to the logs or to the \fBlogrotate\fR state file.
.TP
@@ -91,7 +95,7 @@ Index: logrotate-3.7.1/logrotate.8
.nf
.ta +3i
-@@ -77,7 +83,7 @@
+@@ -77,7 +83,7 @@ compress
rotate 5
weekly
postrotate
@@ -100,7 +104,7 @@ Index: logrotate-3.7.1/logrotate.8
endscript
}
-@@ -87,7 +93,7 @@
+@@ -87,7 +93,7 @@ compress
size=100k
sharedscripts
postrotate
@@ -109,7 +113,7 @@ Index: logrotate-3.7.1/logrotate.8
endscript
}
-@@ -97,7 +103,7 @@
+@@ -97,7 +103,7 @@ compress
olddir /var/log/news/old
missingok
postrotate
@@ -118,7 +122,7 @@ Index: logrotate-3.7.1/logrotate.8
endscript
nocompress
}
-@@ -107,9 +113,9 @@
+@@ -107,9 +113,9 @@ compress
The first few lines set global options; in the example, logs are
compressed after they are rotated. Note that comments may appear
anywhere in the config file as long as the first non-whitespace
@@ -130,7 +134,7 @@ Index: logrotate-3.7.1/logrotate.8
\fI/var/log/messages\fR. The log will go through five weekly rotations before
being removed. After the log file has been rotated (but before the old
version of the log has been compressed), the command
-@@ -117,13 +123,13 @@
+@@ -117,13 +123,13 @@ version of the log has been compressed),
The next section defines the parameters for both
\fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
@@ -148,7 +152,7 @@ Index: logrotate-3.7.1/logrotate.8
characters supported.
The last section defines the parameters for all of the files in
-@@ -135,29 +141,33 @@
+@@ -135,29 +141,33 @@ Please use wildcards with caution. If y
rotate all files, including previously rotated ones. A way around this
is to use the \fBolddir\fR directive or a more exact wildcard (such as *.log).
@@ -188,7 +192,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBcompressoptions\fR
-@@ -174,9 +184,9 @@
+@@ -174,9 +184,9 @@ as the old log file stays in place.
.TP
\fBcopytruncate\fR
@@ -201,7 +205,7 @@ Index: logrotate-3.7.1/logrotate.8
and thus might continue writing (appending) to the previous log file forever.
Note that there is a very small time slice between copying the file and
truncating it, so some logging data might be lost.
-@@ -188,7 +198,7 @@
+@@ -188,7 +198,7 @@ as the old log file stays in place.
Immediately after rotation (before the \fBpostrotate\fR script is run)
the log file is created (with the same name as the log file just rotated).
\fImode\fR specifies the mode for the log file in octal (the same
@@ -210,7 +214,7 @@ Index: logrotate-3.7.1/logrotate.8
log file, and \fIgroup\fR specifies the group the log file will belong
to. Any of the log file attributes may be omitted, in which case those
attributes for the new file will use the same values as the original log
-@@ -207,20 +217,20 @@
+@@ -207,20 +217,20 @@ instead of simply adding a number.
.TP
\fBdelaycompress\fR
Postpone compression of the previous log file to the next rotation cycle.
@@ -236,7 +240,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBinclude \fIfile_or_directory\fR
-@@ -231,12 +241,12 @@
+@@ -231,12 +241,12 @@ before processing of the including file
which are ignored are files which are not regular files (such as
directories and named pipes) and files whose names end with one of
the taboo extensions, as specified by the \fBtabooext\fR directive.
@@ -251,7 +255,7 @@ Index: logrotate-3.7.1/logrotate.8
no mail should be generated by a particular log, the \fBnomail\fR directive
may be used.
-@@ -268,8 +278,7 @@
+@@ -268,8 +278,7 @@ Log files are rotated the first time \fB
.TP
\fBnocompress\fR
@@ -261,7 +265,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBnocopy\fR
-@@ -292,7 +301,7 @@
+@@ -292,7 +301,7 @@ Do not postpone compression of the previ
.TP
\fBnomail\fR
@@ -270,7 +274,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBnomissingok\fR
-@@ -300,12 +309,12 @@
+@@ -300,12 +309,12 @@ If a log file does not exist, issue an e
.TP
\fBnoolddir\fR
@@ -285,7 +289,7 @@ Index: logrotate-3.7.1/logrotate.8
is rotated (this is the default, and overrides the \fBsharedscripts\fR
option).
-@@ -326,16 +335,15 @@
+@@ -326,16 +335,15 @@ overriden by the \fBnoolddir\fR option.
\fBpostrotate\fR/\fBendscript\fR
The lines between \fBpostrotate\fR and \fBendscript\fR (both of which
must appear on lines by themselves) are executed after the log file is
@@ -305,7 +309,7 @@ Index: logrotate-3.7.1/logrotate.8
.TP
\fBfirstaction\fR/\fBendscript\fR
-@@ -351,33 +359,34 @@
+@@ -351,33 +359,34 @@ The lines between \fBlastaction\fR and \
must appear on lines by themselves) are executed once after all log
files that match the wildcarded pattern are rotated, after postrotate script
is run and only if at least one log is rotated. These directives may only
@@ -352,7 +356,7 @@ Index: logrotate-3.7.1/logrotate.8
\fBstart \fIcount\fR
This is the number to use as the base for rotation. For example, if
you specify 0, the logs will be created with a .0 extension as they are
-@@ -388,18 +397,21 @@
+@@ -388,18 +397,21 @@ number of times specified with the \fBco
.TP
\fBtabooext\fR [+] \fIlist\fR
The current taboo extension list is changed (see the \fBinclude\fR directive
@@ -379,7 +383,7 @@ Index: logrotate-3.7.1/logrotate.8
.SH FILES
.PD 0
-@@ -411,11 +423,16 @@
+@@ -411,11 +423,16 @@ Default state file.
Configuration options.
.SH SEE ALSO
diff --git a/patches/logrotate-3.7.1/ptx-timeext.patch b/patches/logrotate-3.7.1/ptx-timeext.patch
index 8931e3ab6..1c043b32c 100644
--- a/patches/logrotate-3.7.1/ptx-timeext.patch
+++ b/patches/logrotate-3.7.1/ptx-timeext.patch
@@ -1,7 +1,14 @@
-Index: logrotate.h
+---
+ config.c | 8 ++++++++
+ logrotate.8 | 8 ++++++++
+ logrotate.c | 49 +++++++++++++++++++++++++++++++++++++------------
+ logrotate.h | 1 +
+ 4 files changed, 54 insertions(+), 12 deletions(-)
+
+Index: logrotate-3.7.1/logrotate.h
===================================================================
---- a/logrotate.h.orig
-+++ b/logrotate.h
+--- logrotate-3.7.1.orig/logrotate.h
++++ logrotate-3.7.1/logrotate.h
@@ -16,6 +16,7 @@
#define LOG_FLAG_SHAREDSCRIPTS (1 << 7)
#define LOG_FLAG_COPY (1 << 8)
@@ -10,10 +17,10 @@ Index: logrotate.h
#define NO_FORCE_ROTATE 0
#define FORCE_ROTATE 1
-Index: config.c
+Index: logrotate-3.7.1/config.c
===================================================================
---- a/config.c.orig
-+++ b/config.c
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
@@ -521,6 +521,14 @@ static int readConfigFile(const char * c
newlog->flags &= ~LOG_FLAG_DATEEXT;
@@ -29,10 +36,10 @@ Index: config.c
} else if (!strcmp(start, "noolddir")) {
newlog->oldDir = NULL;
-Index: logrotate.8
+Index: logrotate-3.7.1/logrotate.8
===================================================================
---- a/logrotate.8.orig
-+++ b/logrotate.8
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
@@ -216,6 +216,14 @@ Archive old versions of log files adding
instead of simply adding a number.
@@ -48,10 +55,10 @@ Index: logrotate.8
\fBdelaycompress\fR
Postpone compression of the previous log file to the next rotation cycle.
This only has effect when used in combination with \fBcompress\fR.
-Index: logrotate.c
+Index: logrotate-3.7.1/logrotate.c
===================================================================
---- a/logrotate.c.orig
-+++ b/logrotate.c
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
@@ -542,7 +542,7 @@ int rotateSingleLog(logInfo * log, int l
alloc_size = strlen(dirName) + strlen(baseName) +
diff --git a/patches/logrotate-3.7.1/rh-dateext.patch b/patches/logrotate-3.7.1/rh-dateext.patch
index 7efbf896f..b1ccecd30 100644
--- a/patches/logrotate-3.7.1/rh-dateext.patch
+++ b/patches/logrotate-3.7.1/rh-dateext.patch
@@ -1,10 +1,17 @@
Enhance logrotate with "dateext".
From RedHat patches
+---
+ config.c | 8 ++
+ logrotate.8 | 5 +
+ logrotate.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
+ logrotate.h | 1
+ 4 files changed, 173 insertions(+), 18 deletions(-)
+
Index: logrotate-3.7.1/logrotate.h
===================================================================
---- logrotate-3.7.1.orig/logrotate.h 2006-04-08 20:32:36.772133783 +0100
-+++ logrotate-3.7.1/logrotate.h 2006-04-08 20:36:00.250859767 +0100
+--- logrotate-3.7.1.orig/logrotate.h
++++ logrotate-3.7.1/logrotate.h
@@ -15,6 +15,7 @@
#define LOG_FLAG_MAILFIRST (1 << 6)
#define LOG_FLAG_SHAREDSCRIPTS (1 << 7)
@@ -15,8 +22,8 @@ Index: logrotate-3.7.1/logrotate.h
#define FORCE_ROTATE 1
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 20:32:36.773133590 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 20:36:00.254859022 +0100
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
@@ -11,6 +11,7 @@
#include <sys/wait.h>
#include <time.h>
@@ -25,7 +32,7 @@ Index: logrotate-3.7.1/logrotate.c
#ifdef WITH_SELINUX
#include <selinux/selinux.h>
-@@ -22,6 +23,10 @@
+@@ -22,6 +23,10 @@ int selinux_enabled=0;
#include "log.h"
#include "logrotate.h"
@@ -36,7 +43,7 @@ Index: logrotate-3.7.1/logrotate.c
typedef struct {
char * fn;
struct tm lastRotated; /* only tm.mon, tm_mday, tm_year are good! */
-@@ -42,6 +47,14 @@
+@@ -42,6 +47,14 @@ int debug = 0;
char * mailCommand = DEFAULT_MAIL_COMMAND;
time_t nowSecs = 0;
@@ -51,7 +58,7 @@ Index: logrotate-3.7.1/logrotate.c
static logState * findState(const char * fn, struct stateSet * sip) {
int i;
logState * states = sip->states;
-@@ -121,6 +134,17 @@
+@@ -121,6 +134,17 @@ static int runScript(char * logfn, char
return rc;
}
@@ -69,7 +76,7 @@ Index: logrotate-3.7.1/logrotate.c
static int compressLogFile(char * name, logInfo * log, struct stat *sb) {
char * compressedName;
const char ** fullCommand;
-@@ -265,6 +289,25 @@
+@@ -265,6 +289,25 @@ static int mailLog(char * logFile, char
return rc;
}
@@ -95,7 +102,7 @@ Index: logrotate-3.7.1/logrotate.c
static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int flags) {
char buf[BUFSIZ];
int fdcurr = -1, fdsave = -1;
-@@ -479,6 +522,9 @@
+@@ -479,6 +522,9 @@ int rotateSingleLog(logInfo * log, int l
char * baseName;
char * dirName;
char * firstRotated;
@@ -105,7 +112,7 @@ Index: logrotate-3.7.1/logrotate.c
size_t alloc_size;
int rotateCount = log->rotateCount ? log->rotateCount : 1;
int logStart = (log->logStart == -1) ? 1 : log->logStart;
-@@ -509,7 +555,7 @@
+@@ -509,7 +555,7 @@ int rotateSingleLog(logInfo * log, int l
alloc_size = strlen(dirName) + strlen(baseName) +
strlen(log->files[logNum]) + strlen(fileext) +
@@ -114,7 +121,7 @@ Index: logrotate-3.7.1/logrotate.c
oldName = alloca(alloc_size);
newName = alloca(alloc_size);
-@@ -531,25 +577,106 @@
+@@ -531,25 +577,106 @@ int rotateSingleLog(logInfo * log, int l
/* First compress the previous log when necessary */
if (log->flags & LOG_FLAG_COMPRESS &&
log->flags & LOG_FLAG_DELAYCOMPRESS) {
@@ -231,7 +238,7 @@ Index: logrotate-3.7.1/logrotate.c
sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
logStart, fileext,
(log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
-@@ -599,12 +726,27 @@
+@@ -599,12 +726,27 @@ int rotateSingleLog(logInfo * log, int l
hasErrors = 1;
}
}
@@ -263,7 +270,7 @@ Index: logrotate-3.7.1/logrotate.c
/* if the last rotation doesn't exist, that's okay */
if (!debug && access(disposeName, F_OK)) {
-@@ -613,9 +755,6 @@
+@@ -613,9 +755,6 @@ int rotateSingleLog(logInfo * log, int l
disposeName = NULL;
}
@@ -273,7 +280,7 @@ Index: logrotate-3.7.1/logrotate.c
if (!hasErrors) {
if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
message(MESS_DEBUG, "running prerotate script\n");
-@@ -761,6 +900,8 @@
+@@ -761,6 +900,8 @@ int rotateSingleLog(logInfo * log, int l
}
}
#endif
@@ -284,9 +291,9 @@ Index: logrotate-3.7.1/logrotate.c
Index: logrotate-3.7.1/config.c
===================================================================
---- logrotate-3.7.1.orig/config.c 2006-04-08 20:32:36.774133397 +0100
-+++ logrotate-3.7.1/config.c 2006-04-08 20:36:00.256858650 +0100
-@@ -511,6 +511,14 @@
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
+@@ -511,6 +511,14 @@ static int readConfigFile(const char * c
newlog->flags &= ~LOG_FLAG_IFEMPTY;
*endtag = oldchar, start = endtag;
@@ -303,9 +310,9 @@ Index: logrotate-3.7.1/config.c
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 20:32:36.775133204 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 20:36:00.257858464 +0100
-@@ -200,6 +200,11 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -200,6 +200,11 @@ file for the omitted attributes. This op
Log files are rotated every day.
.TP
diff --git a/patches/logrotate-3.7.1/rh-maxage.patch b/patches/logrotate-3.7.1/rh-maxage.patch
index 03d15a102..49087c457 100644
--- a/patches/logrotate-3.7.1/rh-maxage.patch
+++ b/patches/logrotate-3.7.1/rh-maxage.patch
@@ -1,11 +1,18 @@
Enhance logrotate with "maxage".
From upstream RedHat patch.
+---
+ config.c | 15 +++++++++++++++
+ logrotate.8 | 6 ++++++
+ logrotate.c | 25 +++++++++++++++++++++++--
+ logrotate.h | 1 +
+ 4 files changed, 45 insertions(+), 2 deletions(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 20:38:58.277761983 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 20:38:58.314755223 +0100
-@@ -640,7 +640,10 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -640,7 +640,10 @@ int rotateSingleLog(logInfo * log, int l
* the date in their name */
for (i = 0; i < globResult.gl_pathc; i++) {
if( !stat((globResult.gl_pathv)[i],&fst_buf) ) {
@@ -17,7 +24,7 @@ Index: logrotate-3.7.1/logrotate.c
if ( mail_out != -1 ) {
if (!hasErrors && log->logAddress) {
char * mailFilename = (globResult.gl_pathv)[mail_out];
-@@ -670,6 +673,22 @@
+@@ -670,6 +673,22 @@ int rotateSingleLog(logInfo * log, int l
globfree(&globResult);
free(glob_pattern);
} else {
@@ -40,7 +47,7 @@ Index: logrotate-3.7.1/logrotate.c
sprintf(oldName, "%s/%s.%d%s%s", dirName, baseName,
logStart + rotateCount, fileext, compext);
-@@ -1188,7 +1207,9 @@
+@@ -1188,7 +1207,9 @@ static int readState(char * stateFilenam
int main(int argc, const char ** argv) {
logInfo defConfig = { NULL, NULL, 0, NULL, ROT_SIZE,
@@ -53,9 +60,9 @@ Index: logrotate-3.7.1/logrotate.c
/* first, last */ NULL, NULL,
Index: logrotate-3.7.1/logrotate.h
===================================================================
---- logrotate-3.7.1.orig/logrotate.h 2006-04-08 20:38:58.274762531 +0100
-+++ logrotate-3.7.1/logrotate.h 2006-04-08 20:38:58.315755040 +0100
-@@ -35,6 +35,7 @@
+--- logrotate-3.7.1.orig/logrotate.h
++++ logrotate-3.7.1/logrotate.h
+@@ -35,6 +35,7 @@ typedef struct {
enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_SIZE, ROT_FORCE } criterium;
unsigned int threshhold;
int rotateCount;
@@ -65,9 +72,9 @@ Index: logrotate-3.7.1/logrotate.h
char * logAddress;
Index: logrotate-3.7.1/config.c
===================================================================
---- logrotate-3.7.1.orig/config.c 2006-04-08 20:38:58.279761617 +0100
-+++ logrotate-3.7.1/config.c 2006-04-08 20:38:58.317754675 +0100
-@@ -678,6 +678,21 @@
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
+@@ -678,6 +678,21 @@ static int readConfigFile(const char * c
}
*endtag = oldchar, start = endtag;
}
@@ -91,9 +98,9 @@ Index: logrotate-3.7.1/config.c
configFile, lineNum);
Index: logrotate-3.7.1/logrotate.8
===================================================================
---- logrotate-3.7.1.orig/logrotate.8 2006-04-08 20:38:58.280761435 +0100
-+++ logrotate-3.7.1/logrotate.8 2006-04-08 20:38:58.318754492 +0100
-@@ -251,6 +251,12 @@
+--- logrotate-3.7.1.orig/logrotate.8
++++ logrotate-3.7.1/logrotate.8
+@@ -251,6 +251,12 @@ When using the \fBmail\fR command, mail
instead of the just-rotated file (this is the default).
.TP
diff --git a/patches/logrotate-3.7.1/rh-noTMPDIR.patch b/patches/logrotate-3.7.1/rh-noTMPDIR.patch
index 2b277f940..73e5fa717 100644
--- a/patches/logrotate-3.7.1/rh-noTMPDIR.patch
+++ b/patches/logrotate-3.7.1/rh-noTMPDIR.patch
@@ -1,11 +1,15 @@
Do not use tmpfile to run script anymore (Closes: #149270)
From RedHat patches.
+---
+ logrotate.c | 31 +------------------------------
+ 1 file changed, 1 insertion(+), 30 deletions(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 20:38:58.314755223 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 20:42:11.628324134 +0100
-@@ -88,10 +88,7 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -88,10 +88,7 @@ static logState * findState(const char *
}
static int runScript(char * logfn, char * script) {
@@ -16,7 +20,7 @@ Index: logrotate-3.7.1/logrotate.c
if (debug) {
message(MESS_DEBUG, "running script with arg %s: \"%s\"\n",
-@@ -99,38 +96,12 @@
+@@ -99,38 +96,12 @@ static int runScript(char * logfn, char
return 0;
}
diff --git a/patches/logrotate-3.7.1/rh-selinux.patch b/patches/logrotate-3.7.1/rh-selinux.patch
index 0e1a3bbdf..6798ce0b2 100644
--- a/patches/logrotate-3.7.1/rh-selinux.patch
+++ b/patches/logrotate-3.7.1/rh-selinux.patch
@@ -2,10 +2,14 @@ Add selinux_getenforce() calls to work when not in enforcing mode
- use security_getenforce() instead of selinux_getenforcemode
From RedHat patches.
+---
+ logrotate.c | 126 +++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 71 insertions(+), 55 deletions(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 20:42:37.114533654 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 20:44:17.311634566 +0100
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
@@ -17,6 +17,7 @@
#include <selinux/selinux.h>
static security_context_t prev_context=NULL;
@@ -14,7 +18,7 @@ Index: logrotate-3.7.1/logrotate.c
#endif
#include "basenames.h"
-@@ -293,38 +294,43 @@
+@@ -293,38 +294,43 @@ static int copyTruncate(char * currLog,
return 1;
}
#ifdef WITH_SELINUX
@@ -86,7 +90,7 @@ Index: logrotate-3.7.1/logrotate.c
}
#endif
if (fdsave < 0) {
-@@ -672,28 +678,34 @@
+@@ -672,28 +678,34 @@ int rotateSingleLog(logInfo * log, int l
(log->flags & LOG_FLAG_DELAYCOMPRESS) ? "" : compext);
#ifdef WITH_SELINUX
@@ -143,7 +147,7 @@ Index: logrotate-3.7.1/logrotate.c
}
#endif
for (i = rotateCount + logStart - 1; (i >= 0) && !hasErrors; i--) {
-@@ -883,11 +895,11 @@
+@@ -883,11 +895,11 @@ int rotateSingleLog(logInfo * log, int l
#ifdef WITH_SELINUX
if (selinux_enabled) {
@@ -160,7 +164,7 @@ Index: logrotate-3.7.1/logrotate.c
}
#endif
free(dirName);
-@@ -1249,6 +1261,10 @@
+@@ -1249,6 +1261,10 @@ int main(int argc, const char ** argv) {
exit(1);
}
diff --git a/patches/logrotate-3.7.1/script-argument.patch b/patches/logrotate-3.7.1/script-argument.patch
index 86ac656b0..cfc48a803 100644
--- a/patches/logrotate-3.7.1/script-argument.patch
+++ b/patches/logrotate-3.7.1/script-argument.patch
@@ -3,11 +3,15 @@ Closes: #330783
Allow the use of $1 in scripts.
+---
+ logrotate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 21:47:41.000000000 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 22:01:23.722498089 +0100
-@@ -101,7 +101,7 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -101,7 +101,7 @@ static int runScript(char * logfn, char
}
if (!fork()) {
diff --git a/patches/logrotate-3.7.1/scripterrors.patch b/patches/logrotate-3.7.1/scripterrors.patch
index 628897582..ff1619230 100644
--- a/patches/logrotate-3.7.1/scripterrors.patch
+++ b/patches/logrotate-3.7.1/scripterrors.patch
@@ -1,11 +1,15 @@
Give error messages identifying log file on script errors
(Closes: #122691, #195790, #222050, #306020)
+---
+ logrotate.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 21:03:38.961646055 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 21:05:20.850933782 +0100
-@@ -770,8 +770,8 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -770,8 +770,8 @@ int rotateSingleLog(logInfo * log, int l
if (log->pre && !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
message(MESS_DEBUG, "running prerotate script\n");
if (runScript(log->files[logNum], log->pre)) {
@@ -16,7 +20,7 @@ Index: logrotate-3.7.1/logrotate.c
hasErrors = 1;
}
}
-@@ -853,7 +853,8 @@
+@@ -853,7 +853,8 @@ int rotateSingleLog(logInfo * log, int l
!(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
message(MESS_DEBUG, "running postrotate script\n");
if (runScript(log->files[logNum], log->post)) {
diff --git a/patches/logrotate-3.7.1/taboo-to-debug.patch b/patches/logrotate-3.7.1/taboo-to-debug.patch
index d4086d354..dd78d643e 100644
--- a/patches/logrotate-3.7.1/taboo-to-debug.patch
+++ b/patches/logrotate-3.7.1/taboo-to-debug.patch
@@ -1,10 +1,14 @@
Quietens the taboo list from ERROR to a DEBUG (Closes: #249073)
+---
+ config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/config.c
===================================================================
---- logrotate-3.7.1.orig/config.c 2006-04-08 20:48:47.169764580 +0100
-+++ logrotate-3.7.1/config.c 2006-04-08 20:49:55.460798704 +0100
-@@ -149,7 +149,7 @@
+--- logrotate-3.7.1.orig/config.c
++++ logrotate-3.7.1/config.c
+@@ -149,7 +149,7 @@ static int checkFile(const char * fname)
for (i = 0; i < tabooCount; i++) {
if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]),
tabooExts[i])) {
diff --git a/patches/logrotate-3.7.1/uncompressChild-warning.patch b/patches/logrotate-3.7.1/uncompressChild-warning.patch
index b8fde6e69..1b8de68f2 100644
--- a/patches/logrotate-3.7.1/uncompressChild-warning.patch
+++ b/patches/logrotate-3.7.1/uncompressChild-warning.patch
@@ -1,8 +1,12 @@
+---
+ logrotate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
Index: logrotate-3.7.1/logrotate.c
===================================================================
---- logrotate-3.7.1.orig/logrotate.c 2006-04-08 22:58:51.000000000 +0100
-+++ logrotate-3.7.1/logrotate.c 2006-04-08 23:01:00.459602124 +0100
-@@ -209,7 +209,7 @@
+--- logrotate-3.7.1.orig/logrotate.c
++++ logrotate-3.7.1/logrotate.c
+@@ -209,7 +209,7 @@ static int compressLogFile(char * name,
static int mailLog(char * logFile, char * mailCommand, char * uncompressCommand,
char * address, char * subject) {
int mailInput;
diff --git a/patches/memtest-0.0.4/series b/patches/memtest-0.0.4/series
new file mode 100644
index 000000000..458c6f0d8
--- /dev/null
+++ b/patches/memtest-0.0.4/series
@@ -0,0 +1 @@
+memtest-0.0.4-ptx1.diff
diff --git a/patches/procps-3.2.8/0001-slabtop_once.patch b/patches/procps-3.2.8/0001-slabtop_once.patch
new file mode 100644
index 000000000..5d8a45195
--- /dev/null
+++ b/patches/procps-3.2.8/0001-slabtop_once.patch
@@ -0,0 +1,125 @@
+From cc53eb8aee12e32861e6073d9e6bd7d015a15c55 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 01/70] slabtop_once
+
+---
+ slabtop.c | 45 ++++++++++++++++++++++++++-------------------
+ 1 files changed, 26 insertions(+), 19 deletions(-)
+
+diff --git a/slabtop.c b/slabtop.c
+index 36025e2..5c9d31e 100644
+--- a/slabtop.c
++++ b/slabtop.c
+@@ -268,11 +268,13 @@ static void parse_input(char c)
+ }
+ }
+
++#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 @@ int main(int argc, char *argv[])
+ sort_func = set_sort_func(optarg[0]);
+ break;
+ case 'o':
++ run_once=1;
+ delay = 0;
+ break;
+ case 'V':
+@@ -322,11 +325,13 @@ 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);
++ term_size(0);
++ if (!run_once) {
++ initscr();
++ resizeterm(rows, cols);
++ signal(SIGWINCH, term_size);
++ }
+ signal(SIGINT, sigint_handler);
+
+ do {
+@@ -340,13 +345,13 @@ int main(int argc, char *argv[])
+ 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 @@ int main(int argc, char *argv[])
+ 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 @@ int main(int argc, char *argv[])
+ 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;
+ }
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0002-free.1.patch b/patches/procps-3.2.8/0002-free.1.patch
new file mode 100644
index 000000000..14bcb0f51
--- /dev/null
+++ b/patches/procps-3.2.8/0002-free.1.patch
@@ -0,0 +1,112 @@
+From 5f41954db84ec43205b71f79a98c46d24d55cca9 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 02/70] free.1
+
+---
+ free.1 | 76 ++++++++++++++++++++++++++++++++++++++++-----------------------
+ 1 files changed, 48 insertions(+), 28 deletions(-)
+
+diff --git a/free.1 b/free.1
+index 954c8d9..cae1241 100644
+--- 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 <albert@users.sf.net>
+-
++.SH "SEE ALSO"
++.BR ps "(1), " slabtop "(1), " top "(1), " vmstat (8).
++.\"{{{}}}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_output_sort_time.dpatch b/patches/procps-3.2.8/0003-output_sort_time.patch
index ca71b281f..91b4c4519 100644
--- a/patches/procps-3.2.8/10_output_sort_time.dpatch
+++ b/patches/procps-3.2.8/0003-output_sort_time.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_output_sort_time.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: More ps time sorting #508435
+From 42fd812b1fde2aa3c05cd67282f7cdfcf8f7e7b8 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 03/70] output_sort_time
-@DPATCH@
-diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
---- procps-3.2.7~/ps/output.c 2006-06-19 09:27:02.000000000 +1000
-+++ procps-3.2.7/ps/output.c 2009-01-07 17:52:09.000000000 +1100
-@@ -110,6 +110,20 @@
+===================================================================
+---
+ ps/output.c | 29 +++++++++++++++++++++++------
+ 1 files changed, 23 insertions(+), 6 deletions(-)
+
+diff --git a/ps/output.c b/ps/output.c
+index 87bf9de..b4fb3df 100644
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -110,6 +110,20 @@ static int sr_ ## NAME (const proc_t* P, const proc_t* Q) { \
return (int)(P->NAME) - (int)(Q->NAME); \
}
@@ -29,7 +33,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
CMP_INT(rtprio)
CMP_SMALL(sched)
CMP_INT(cutime)
-@@ -185,6 +199,9 @@
+@@ -185,6 +199,9 @@ CMP_SMALL(pcpu)
CMP_SMALL(state)
@@ -39,7 +43,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
/* 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 @@
+@@ -408,7 +425,7 @@ static int pr_etime(char *restrict const outbuf, const proc_t *restrict const pp
unsigned long t;
unsigned dd,hh,mm,ss;
char *cp = outbuf;
@@ -48,7 +52,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
ss = t%60;
t /= 60;
mm = t%60;
-@@ -476,7 +493,7 @@
+@@ -476,7 +493,7 @@ static int pr_time(char *restrict const outbuf, const proc_t *restrict const pp)
unsigned long t;
unsigned dd,hh,mm,ss;
int c;
@@ -57,7 +61,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
ss = t%60;
t /= 60;
mm = t%60;
-@@ -1277,7 +1294,7 @@
+@@ -1286,7 +1303,7 @@ static const format_struct format_array[] = {
{"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*/
@@ -66,7 +70,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
{"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},
-@@ -1296,7 +1313,7 @@
+@@ -1305,7 +1322,7 @@ static const format_struct format_array[] = {
{"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!
@@ -75,7 +79,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
{"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},
-@@ -1311,7 +1328,7 @@
+@@ -1320,7 +1337,7 @@ static const format_struct format_array[] = {
{"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},
@@ -84,7 +88,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
{"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*/
-@@ -1455,7 +1472,7 @@
+@@ -1463,7 +1480,7 @@ static const format_struct format_array[] = {
{"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},
@@ -93,3 +97,6 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
{"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},
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_pmap.1.dpatch b/patches/procps-3.2.8/0004-pmap.1.patch
index 10e9ae44f..c47f1c4c3 100644
--- a/patches/procps-3.2.8/10_pmap.1.dpatch
+++ b/patches/procps-3.2.8/0004-pmap.1.patch
@@ -1,13 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_pmap.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup pmap.1 manual page #282168
+From 2dc52f7e8cd2779504b9d2d361c25144695e65b5 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 04/70] pmap.1
-@DPATCH@
-diff -urNad procps-3.2.7~/pmap.1 procps-3.2.7/pmap.1
---- procps-3.2.7~/pmap.1 2004-01-29 13:39:08.000000000 +1100
-+++ procps-3.2.7/pmap.1 2006-06-26 11:48:23.000000000 +1000
+===================================================================
+---
+ pmap.1 | 24 ++++++++++++++----------
+ 1 files changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/pmap.1 b/pmap.1
+index a91d0e8..de03e87 100644
+--- a/pmap.1
++++ b/pmap.1
@@ -10,25 +10,29 @@
pmap \- report memory map of a process
@@ -48,3 +52,6 @@ diff -urNad procps-3.2.7~/pmap.1 procps-3.2.7/pmap.1
.SH STANDARDS
No standards apply, but pmap looks an awful lot like a SunOS command.
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_ps.1.dpatch b/patches/procps-3.2.8/0005-10_ps.1.patch
index 8f20d0df2..6cc3657b0 100644
--- a/patches/procps-3.2.8/10_ps.1.dpatch
+++ b/patches/procps-3.2.8/0005-10_ps.1.patch
@@ -1,17 +1,22 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_ps.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: ps.1 normal indent widths
-## DP: pri field explained #465761
-## DP: --no-heading comment is an alias for --no-headers
-## DP: Removed setproctitle(1) reference #529045
+From bc20fbffd9fd7f94ef02ad570dd697c4b6b75a16 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 05/70] 10_ps.1
-@DPATCH@
-diff -urNad procps-3.2.8~/ps/ps.1 procps-3.2.8/ps/ps.1
---- procps-3.2.8~/ps/ps.1 2009-05-28 17:40:42.000000000 +1000
-+++ procps-3.2.8/ps/ps.1 2009-05-28 17:41:32.000000000 +1000
-@@ -18,12 +18,6 @@
+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
+---
+ ps/ps.1 | 17 ++++++++---------
+ 1 files changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/ps/ps.1 b/ps/ps.1
+index 64953d5..0f896bf 100644
+--- a/ps/ps.1
++++ b/ps/ps.1
+@@ -18,19 +18,13 @@
.nh
.if n .ss 12 0
.\"
@@ -24,7 +29,15 @@ diff -urNad procps-3.2.8~/ps/ps.1 procps-3.2.8/ps/ps.1
.\"
.\" ColSize is used for the format spec table.
.\" It's the left margin, minus the right, minus
-@@ -499,7 +493,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(.lu-\n(.iu/\n(.Hu-26u)n)
+ .\"
+ .\" This is for command options
+ .nr OptSize (16u)
+@@ -499,7 +493,7 @@ 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
@@ -33,7 +46,7 @@ diff -urNad procps-3.2.8~/ps/ps.1 procps-3.2.8/ps/ps.1
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 @@
+@@ -588,7 +582,8 @@ ASCII art process tree
repeat header lines, one per page of output
.opt \-\-no\-headers
@@ -43,7 +56,7 @@ diff -urNad procps-3.2.8~/ps/ps.1 procps-3.2.8/ps/ps.1
.opt \-\-lines \ n
set screen height
-@@ -1159,6 +1154,10 @@
+@@ -1159,6 +1154,10 @@ ppid PPID T{
parent process ID.
T}
@@ -54,3 +67,6 @@ diff -urNad procps-3.2.8~/ps/ps.1 procps-3.2.8/ps/ps.1
psr PSR T{
processor that process is currently assigned to.
T}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_skill.1.dpatch b/patches/procps-3.2.8/0006-skill.1.patch
index 56ca5bc97..3896e5b7c 100644
--- a/patches/procps-3.2.8/10_skill.1.dpatch
+++ b/patches/procps-3.2.8/0006-skill.1.patch
@@ -1,13 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_skill.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup man page #282168
+From 25e97f620d09a704305bd42042f69b76c58cd64a Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 06/70] skill.1
-@DPATCH@
-diff -urNad procps-3.2.7~/skill.1 procps-3.2.7/skill.1
---- procps-3.2.7~/skill.1 2008-04-07 11:12:27.000000000 +1000
-+++ procps-3.2.7/skill.1 2008-04-07 11:13:03.000000000 +1000
+===================================================================
+---
+ skill.1 | 63 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 34 insertions(+), 29 deletions(-)
+
+diff --git a/skill.1 b/skill.1
+index a4fc274..a56b969 100644
+--- a/skill.1
++++ b/skill.1
@@ -11,37 +11,38 @@
skill, snice \- send a signal or report process status
@@ -65,7 +69,7 @@ diff -urNad procps-3.2.7~/skill.1 procps-3.2.7/skill.1
.TE
.SH "PROCESS SELECTION OPTIONS"
-@@ -49,11 +50,11 @@
+@@ -49,11 +50,11 @@ Selection criteria can be: terminal, user, pid, command.
The options below may be used to ensure correct interpretation.
Do not blame Albert for this interesting interface.
.TS
@@ -82,7 +86,7 @@ diff -urNad procps-3.2.7~/skill.1 procps-3.2.7/skill.1
.TE
.SH SIGNALS
-@@ -63,7 +64,6 @@
+@@ -63,7 +64,6 @@ When known, numbers and default behavior are shown.
lB rB lB lB
lfCW r l l.
Name Num Action Description
@@ -90,7 +94,7 @@ diff -urNad procps-3.2.7~/skill.1 procps-3.2.7/skill.1
0 0 n/a exit code indicates if a signal may be sent
ALRM 14 exit
HUP 1 exit
-@@ -104,15 +104,20 @@
+@@ -104,15 +104,20 @@ XFSZ core core dump may fail
lB lB
lfCW l.
Command Description
@@ -116,3 +120,6 @@ diff -urNad procps-3.2.7~/skill.1 procps-3.2.7/skill.1
.SH STANDARDS
No standards apply.
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0007-skill_perror.patch b/patches/procps-3.2.8/0007-skill_perror.patch
new file mode 100644
index 000000000..c38ca2ba7
--- /dev/null
+++ b/patches/procps-3.2.8/0007-skill_perror.patch
@@ -0,0 +1,25 @@
+From 680328798808b3d7201341a63e00c89e9d1bdb1a Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 07/70] skill_perror
+
+===================================================================
+---
+ skill.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index 96cc386..54d4c48 100644
+--- a/skill.c
++++ b/skill.c
+@@ -317,6 +317,7 @@ no_more_args:
+ // 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;
+ }
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_slabtop.dpatch b/patches/procps-3.2.8/0008-slabtop_1.patch
index 6aef08650..2b624927b 100644
--- a/patches/procps-3.2.8/10_slabtop.dpatch
+++ b/patches/procps-3.2.8/0008-slabtop_1.patch
@@ -1,13 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_slabtop.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup slabtop man page #282168
+From 1900641c9966032ac791bfb53f045c5c298b6d32 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 08/70] slabtop_1
-@DPATCH@
-diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
---- procps-3.2.7~/slabtop.1 2006-06-18 15:10:24.000000000 +1000
-+++ procps-3.2.7/slabtop.1 2006-06-26 12:31:42.000000000 +1000
+===================================================================
+---
+ slabtop.1 | 35 ++++++++++++++++++++---------------
+ 1 files changed, 20 insertions(+), 15 deletions(-)
+
+diff --git a/slabtop.1 b/slabtop.1
+index 11f277e..7e27980 100644
+--- a/slabtop.1
++++ b/slabtop.1
@@ -7,36 +7,39 @@
slabtop \- display kernel slab cache information in real time
@@ -34,7 +38,7 @@ diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
-Refresh the display every n seconds. By default,
-.BR slabtop (1)
+.B \-\-delay=\fIn\fR, \fB\-d \fIn
-+Refresh the display every
++Refresh the display every
+.I n
+in seconds. By default,
+.B slabtop
@@ -59,7 +63,7 @@ diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
Display usage information and exit.
.SH SORT CRITERIA
-@@ -78,7 +81,7 @@
+@@ -78,7 +81,7 @@ sort by object size
sort by cache utilization
.SH COMMANDS
@@ -68,18 +72,18 @@ diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
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 @@
+@@ -94,7 +97,9 @@ Refresh the screen.
Quit the program.
.SH FILES
-.IR /proc/slabinfo " \-\- slab information"
+.TP
-+.I /proc/slabinfo
++.I /proc/slabinfo
+slab information
.SH "SEE ALSO"
.BR free (1),
-@@ -104,7 +109,7 @@
+@@ -104,7 +109,7 @@ Quit the program.
.SH NOTES
Currently,
@@ -88,7 +92,7 @@ diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
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 @@
+@@ -116,7 +121,7 @@ file is tracking information about used slab physical memory.
.SH AUTHORS
Written by Chris Rivera and Robert Love.
@@ -97,3 +101,6 @@ diff -urNad procps-3.2.7~/slabtop.1 procps-3.2.7/slabtop.1
was inspired by Martin Bligh's perl script,
.BR vmtop .
The procps package is maintained by Albert Cahalan <albert@users.sf.net>.
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_sysctl.8.dpatch b/patches/procps-3.2.8/0009-sysctl.8.patch
index 7d9ec3e6f..73322e48a 100644
--- a/patches/procps-3.2.8/10_sysctl.8.dpatch
+++ b/patches/procps-3.2.8/0009-sysctl.8.patch
@@ -1,14 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_sysctl_8.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: -p flag has OPTIONAL filename (#297144)
-## DP: cleanup ssysctl man page #282168
+From 9dc2b36cc4ac6e49f0eeb2cc701376a7ce33fa13 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 09/70] sysctl.8
-@DPATCH@
-diff -urNad procps-3.2.7~/sysctl.8 procps-3.2.7/sysctl.8
---- procps-3.2.7~/sysctl.8 2006-06-26 09:44:20.000000000 +1000
-+++ procps-3.2.7/sysctl.8 2006-06-26 12:42:08.000000000 +1000
+cleanup sysctl man page
+Bug-Debian: http://bugs.debian.org/297144
+Bug-Debian: http://bugs.debian.org/282168
+---
+ sysctl.8 | 90 ++++++++++++++++++++++++++++++++++++++++++--------------------
+ 1 files changed, 61 insertions(+), 29 deletions(-)
+
+diff --git a/sysctl.8 b/sysctl.8
+index e26c4fb..3bb46d7 100644
+--- a/sysctl.8
++++ b/sysctl.8
@@ -10,76 +10,108 @@
.SH NAME
sysctl \- configure kernel parameters at runtime
@@ -130,7 +135,7 @@ diff -urNad procps-3.2.7~/sysctl.8 procps-3.2.7/sysctl.8
+.br
+/sbin/sysctl \-w kernel.domainname="example.com"
+.br
-+/sbin/sysctl \-p /etc/sysctl.conf
++/sbin/sysctl \-p /etc/sysctl.conf
.SH FILES
.I /proc/sys
+.br
@@ -139,11 +144,14 @@ diff -urNad procps-3.2.7~/sysctl.8 procps-3.2.7/sysctl.8
.BR sysctl.conf (5)
.SH BUGS
-The -A parameter behaves just as -a does.
-+The
++The
+.B \-A
-+parameter behaves just as
++parameter behaves just as
+.B \-a
+does.
.SH AUTHOR
George Staikos, <staikos@0wned.org>
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_sysctl_options.dpatch b/patches/procps-3.2.8/0010-sysctl_options.patch
index 1616bdb7c..ae896cee2 100644
--- a/patches/procps-3.2.8/10_sysctl_options.dpatch
+++ b/patches/procps-3.2.8/0010-sysctl_options.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_sysctl_options.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix up some option processing
+From 70cba9b7a33e2ce32045324b3fbe8fa901cfe9d2 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 10/70] sysctl_options
-@DPATCH@
-diff -urNad procps-3.2.7~/sysctl.c procps-3.2.7/sysctl.c
---- procps-3.2.7~/sysctl.c 2008-08-10 10:57:23.000000000 +1000
-+++ procps-3.2.7/sysctl.c 2008-08-10 10:59:11.000000000 +1000
-@@ -421,6 +421,7 @@
+===================================================================
+---
+ sysctl.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/sysctl.c b/sysctl.c
+index 1470df9..4024f71 100644
+--- a/sysctl.c
++++ b/sysctl.c
+@@ -421,6 +421,7 @@ int main(int argc, char *argv[]) {
const char *me = (const char *)basename(argv[0]);
bool SwitchesAllowed = true;
bool WriteMode = false;
@@ -16,7 +20,7 @@ diff -urNad procps-3.2.7~/sysctl.c procps-3.2.7/sysctl.c
int ReturnCode = 0;
const char *preloadfile = DEFAULT_PRELOAD;
-@@ -486,8 +487,8 @@
+@@ -486,8 +487,8 @@ int main(int argc, char *argv[]) {
case 'a': // string and integer values (for Linux, all of them)
case 'A': // same as -a -o
case 'X': // same as -a -x
@@ -27,7 +31,7 @@ diff -urNad procps-3.2.7~/sysctl.c procps-3.2.7/sysctl.c
case 'V':
fprintf(stdout, "sysctl (%s)\n",procps_version);
exit(0);
-@@ -502,6 +503,8 @@
+@@ -502,6 +503,8 @@ int main(int argc, char *argv[]) {
} else {
if (NameOnly && Quiet) // nonsense
return Usage(me);
@@ -36,7 +40,7 @@ diff -urNad procps-3.2.7~/sysctl.c procps-3.2.7/sysctl.c
SwitchesAllowed = false;
if (WriteMode || index(*argv, '='))
ReturnCode = WriteSetting(*argv);
-@@ -509,6 +512,11 @@
+@@ -509,6 +512,11 @@ int main(int argc, char *argv[]) {
ReturnCode = ReadSetting(*argv);
}
}
@@ -48,3 +52,6 @@ diff -urNad procps-3.2.7~/sysctl.c procps-3.2.7/sysctl.c
return ReturnCode;
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0011-tload.1.patch b/patches/procps-3.2.8/0011-tload.1.patch
new file mode 100644
index 000000000..abee2e8cb
--- /dev/null
+++ b/patches/procps-3.2.8/0011-tload.1.patch
@@ -0,0 +1,26 @@
+From 151b90caee59a7e1d4d5cf3cd6c38515e0cdac21 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 11/70] tload.1
+
+===================================================================
+---
+ tload.1 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tload.1 b/tload.1
+index ef82b01..8ec8c43 100644
+--- a/tload.1
++++ b/tload.1
+@@ -39,7 +39,7 @@ The
+ .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.
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_top_irix.dpatch b/patches/procps-3.2.8/0012-top_irix.patch
index 0d3f49950..334798ee0 100644
--- a/patches/procps-3.2.8/10_top_irix.dpatch
+++ b/patches/procps-3.2.8/0012-top_irix.patch
@@ -1,24 +1,28 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_top_irix.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change formal of IRix mode when showing threads #459890
+From 8d8c23f4cae6eb9de188d7261a23adff0b14954c Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 12/70] top_irix
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2008-04-07 08:43:08.000000000 +1000
-+++ procps-3.2.7/top.c 2008-04-07 08:45:23.000000000 +1000
-@@ -1774,7 +1774,8 @@
+===================================================================
+---
+ top.c | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/top.c b/top.c
+index 6d4a7cc..c7e7553 100644
+--- a/top.c
++++ b/top.c
+@@ -1783,7 +1783,8 @@ static void configs_read (void)
confighlp(Winstk[i].rc.fieldscur);
}
- if(Rc.mode_irixps && smp_num_cpus>1){
-+ 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";
-@@ -2561,6 +2562,15 @@
+@@ -2570,6 +2571,15 @@ static void do_key (unsigned c)
case 'H':
if (VIZCHKc) {
TOGw(Curwin, Show_THREADS);
@@ -34,7 +38,7 @@ diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
show_msg(fmtmk("Show threads %s"
, CHKw(Curwin, Show_THREADS) ? "On" : "Off"));
}
-@@ -2617,7 +2627,8 @@
+@@ -2626,7 +2636,8 @@ static void do_key (unsigned c)
Rc.mode_irixps = !Rc.mode_irixps;
show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
#endif
@@ -44,3 +48,6 @@ diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
// good for 100 CPUs per process
pcpu_max_value = 9999.0;
Fieldstab[P_CPU].fmts = " %4.0f";
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0013-top_no_openproc.patch b/patches/procps-3.2.8/0013-top_no_openproc.patch
new file mode 100644
index 000000000..4b953ed9e
--- /dev/null
+++ b/patches/procps-3.2.8/0013-top_no_openproc.patch
@@ -0,0 +1,30 @@
+From 9b25ed7c35e2c33e585b893052bcf6d8283b5eca Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 13/70] top_no_openproc
+
+===================================================================
+---
+ top.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/top.c b/top.c
+index c7e7553..72056a1 100644
+--- a/top.c
++++ b/top.c
+@@ -1106,6 +1106,12 @@ static proc_t **procs_refresh (proc_t **table, int flags)
+ 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) {
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_top_stdineof.dpatch b/patches/procps-3.2.8/0014-top_stdin_eof.patch
index 2eb50b06e..e09a1e46e 100644
--- a/patches/procps-3.2.8/10_top_stdineof.dpatch
+++ b/patches/procps-3.2.8/0014-top_stdin_eof.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_top_stdineof.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Check for stdin eof if term closes #458986
+From 694d025649a5536d0d30ed6e91d0a87ec85dc7aa Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 14/70] top_stdin_eof
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2008-08-10 00:24:40.000000000 +1000
-+++ procps-3.2.7/top.c 2008-08-10 10:09:49.000000000 +1000
-@@ -3382,9 +3382,8 @@
+===================================================================
+---
+ top.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/top.c b/top.c
+index 72056a1..beaca0a 100644
+--- a/top.c
++++ b/top.c
+@@ -3408,9 +3408,8 @@ int main (int dont_care_argc, char *argv[])
// check 1st, in case tv zeroed (by sig handler) before it got set
rc = chin(0, &c, 1);
if (rc <= 0) {
@@ -20,3 +24,6 @@ diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
fcntl(STDIN_FILENO, F_SETFL, file_flags);
select(1, &fs, NULL, NULL, &tv);
fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK|file_flags);
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_top_uid_length.dpatch b/patches/procps-3.2.8/0015-top_uid_length.patch
index 77befc5e2..de5a0ff23 100644
--- a/patches/procps-3.2.8/10_top_uid_length.dpatch
+++ b/patches/procps-3.2.8/0015-top_uid_length.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_top_uid_length.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Make the uid length 5 not 4 #426782
+From 2bd08f4ab9b3e6b5dcd1a0d7d7dfd25a5355bc92 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 15/70] top_uid_length
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2009-01-08 10:22:37.000000000 +1100
-+++ procps-3.2.7/top.c 2009-01-08 10:23:07.000000000 +1100
-@@ -1222,7 +1222,7 @@
+===================================================================
+---
+ top.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/top.c b/top.c
+index beaca0a..53cab05 100644
+--- a/top.c
++++ b/top.c
+@@ -1237,7 +1237,7 @@ static FLD_t Fieldstab[] = {
{ "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 },
@@ -17,3 +21,6 @@ diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
{ "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 },
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_uptime.1.dpatch b/patches/procps-3.2.8/0016-uptime.1.patch
index e9ae0064e..9c2da06dc 100644
--- a/patches/procps-3.2.8/10_uptime.1.dpatch
+++ b/patches/procps-3.2.8/0016-uptime.1.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_uptime.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup uptime man page #282168
+From b79e4c42592ff040817fd722c6083b2ebe40c289 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 16/70] uptime.1
-@DPATCH@
-diff -urNad procps-3.2.7~/uptime.1 procps-3.2.7/uptime.1
---- procps-3.2.7~/uptime.1 2006-06-26 09:37:50.000000000 +1000
-+++ procps-3.2.7/uptime.1 2006-06-26 12:45:06.000000000 +1000
-@@ -6,7 +6,8 @@
+===================================================================
+---
+ uptime.1 | 23 ++++++++++++++++++-----
+ 1 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/uptime.1 b/uptime.1
+index 3aae739..a3da7c7 100644
+--- a/uptime.1
++++ b/uptime.1
+@@ -6,7 +6,8 @@ uptime \- Tell how long the system has been running.
.SH SYNOPSIS
.B uptime
.br
@@ -18,7 +22,7 @@ diff -urNad procps-3.2.7~/uptime.1 procps-3.2.7/uptime.1
.SH DESCRIPTION
.B uptime
gives a one line display of the following information.
-@@ -14,13 +15,25 @@
+@@ -14,13 +15,25 @@ 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.
@@ -27,7 +31,7 @@ diff -urNad procps-3.2.7~/uptime.1 procps-3.2.7/uptime.1
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
++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
@@ -43,8 +47,11 @@ diff -urNad procps-3.2.7~/uptime.1 procps-3.2.7/uptime.1
+.I /var/run/utmp
+information about who is currently logged on
+.TP
-+.I /proc
++.I /proc
+process information
.SH AUTHORS
.B uptime
was written by Larry Greenfield <greenfie@gauss.rutgers.edu> and
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_vmstat.8.dpatch b/patches/procps-3.2.8/0017-vmstat.8.patch
index f3cca9627..af404a7db 100644
--- a/patches/procps-3.2.8/10_vmstat.8.dpatch
+++ b/patches/procps-3.2.8/0017-vmstat.8.patch
@@ -1,14 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_vmstat.8.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fixes groff problems
-## DP: Removes pslab as it doesnt appear
+From e0d2fe1828af05117a04e167cf77a26f7dcf1209 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 17/70] vmstat.8
-@DPATCH@
-diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
---- procps-3.2.7~/vmstat.8 2009-01-08 10:26:34.000000000 +1100
-+++ procps-3.2.7/vmstat.8 2009-01-09 12:23:21.000000000 +1100
+Removes pslab as it doesnt appear
+---
+ vmstat.8 | 37 ++++++++++++++++++++-----------------
+ 1 files changed, 20 insertions(+), 17 deletions(-)
+
+diff --git a/vmstat.8 b/vmstat.8
+index c059ec0..c97826f 100644
+--- a/vmstat.8
++++ b/vmstat.8
@@ -1,6 +1,6 @@
.\" This page Copyright (C) 1994 Henry Ware <al172@yfn.ysu.edu>
.\" Distributed under the GPL, Copyleft 1994.
@@ -17,7 +20,7 @@ diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
.SH NAME
vmstat \- Report virtual memory statistics
.SH SYNOPSIS
-@@ -22,32 +22,35 @@
+@@ -22,32 +22,35 @@ vmstat \- Report virtual memory statistics
.RB [ "\-d"]
.br
.B vmstat
@@ -59,27 +62,27 @@ diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
and memory statistics. This display does not repeat.
.PP
.I delay
-@@ -58,13 +61,15 @@
+@@ -58,13 +61,15 @@ only one report is printed with the average values since boot.
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)
++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-D\fP reports some summary statistics about disk activity.
++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\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required)
++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\-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.
.PP
.SH FIELD DESCRIPTION FOR VM MODE
.SS
-@@ -81,8 +86,8 @@
+@@ -81,8 +86,8 @@ swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
@@ -90,7 +93,7 @@ diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
.fi
.PP
.SS
-@@ -110,9 +115,9 @@
+@@ -110,9 +115,9 @@ cs: The number of context switches per second.
.B "CPU "
These are percentages of total CPU time.
.nf
@@ -102,7 +105,7 @@ diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
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 @@
+@@ -161,8 +166,6 @@ num: Number of currently active objects
total: Total number of available objects
size: Size of each object
pages: Number of pages with at least one active object
@@ -111,3 +114,6 @@ diff -urNad procps-3.2.7~/vmstat.8 procps-3.2.7/vmstat.8
.fi
.SH NOTES
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_watch.1.dpatch b/patches/procps-3.2.8/0018-watch.1.patch
index d0666a7b5..43a790193 100644
--- a/patches/procps-3.2.8/10_watch.1.dpatch
+++ b/patches/procps-3.2.8/0018-watch.1.patch
@@ -1,14 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_watch.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup of manual page
-## DP: cumulative is a parameter not option #527193
+From 61e92daf921b7a85ac8693341f8890658c61f047 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 18/70] watch.1
-@DPATCH@
-diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
---- procps-3.2.8~/watch.1 2009-05-11 22:40:13.000000000 +1000
-+++ procps-3.2.8/watch.1 2009-05-11 22:46:33.000000000 +1000
+===================================================================
+---
+ watch.1 | 47 ++++++++++++++++++++++++++++-------------------
+ 1 files changed, 28 insertions(+), 19 deletions(-)
+
+diff --git a/watch.1 b/watch.1
+index 41323f4..1616794 100644
+--- a/watch.1
++++ b/watch.1
@@ -1,45 +1,54 @@
-.TH WATCH 1 "1999 Apr 3" " " "Linux User's Manual"
+.TH WATCH 1 "2009 May 11" " " "Linux User's Manual"
@@ -79,7 +82,7 @@ diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
.I command
don't get interpreted by
.BR watch
-@@ -61,20 +70,20 @@
+@@ -61,20 +70,20 @@ watch \-d 'ls \-l | fgrep joe'
To see the effects of quoting, try these out
.IP
watch echo $$
@@ -104,3 +107,6 @@ diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
highlighting is lost on that update as well.
.PP
Non-printing characters are stripped from program output. Use "cat -v" as
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0019-w_time.patch b/patches/procps-3.2.8/0019-w_time.patch
new file mode 100644
index 000000000..1320cbe19
--- /dev/null
+++ b/patches/procps-3.2.8/0019-w_time.patch
@@ -0,0 +1,26 @@
+From 57506edfb12bcb7b14d8614d9e79872beeca05a9 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:45 +0100
+Subject: [PATCH 19/70] w_time
+
+===================================================================
+---
+ w.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/w.c b/w.c
+index 1b2a0fc..a6b1b25 100644
+--- a/w.c
++++ b/w.c
+@@ -83,7 +83,7 @@ static void print_time_ival7(time_t t, int centi_sec, FILE* fout) {
+ 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 */
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/20_kill.1.dpatch b/patches/procps-3.2.8/0020-kill.1.patch
index 25727d7e2..217a5499a 100644
--- a/patches/procps-3.2.8/20_kill.1.dpatch
+++ b/patches/procps-3.2.8/0020-kill.1.patch
@@ -1,31 +1,18 @@
-#! /bin/sh -e
-## 20_kill.1.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix kill.1 manual page
-## DP: Changed may to cannot or might #375739
+From 05403f8eb1a2fb4d0c03034633e8626fffb33687 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 20/70] kill.1
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+Changed may to cannot or might
+Bug-Debian: http://bugs.debian.org/375739
+---
+ kill.1 | 86 +++++++++++++++++++++++++++------------------------------------
+ 1 files changed, 37 insertions(+), 49 deletions(-)
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
-diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
---- procps-3.2.7~/kill.1 2009-01-09 17:04:24.000000000 +1100
-+++ procps-3.2.7/kill.1 2009-01-09 17:11:37.000000000 +1100
+diff --git a/kill.1 b/kill.1
+index aef9dbf..df1bdd7 100644
+--- a/kill.1
++++ b/kill.1
@@ -10,23 +10,18 @@
kill \- send a signal to a process
@@ -58,7 +45,7 @@ diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
all processes except the kill process itself and init.
.SH SIGNALS
-@@ -37,12 +32,11 @@
+@@ -37,12 +32,11 @@ When known constant, numbers and default behavior are shown.
lB rB lB lB
lfCW r l l.
Name Num Action Description
@@ -72,7 +59,7 @@ diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
PIPE 13 exit
POLL exit
PROF exit
-@@ -50,15 +44,15 @@
+@@ -50,15 +44,15 @@ TERM 15 exit
USR1 exit
USR2 exit
VTALRM exit
@@ -94,7 +81,7 @@ diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
CONT restart continue if stopped, otherwise ignore
ABRT 6 core
FPE 8 core
-@@ -66,11 +60,11 @@
+@@ -66,11 +60,11 @@ ILL 4 core
QUIT 3 core
SEGV 11 core
TRAP 5 core
@@ -111,7 +98,7 @@ diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
.TE
.SH NOTES
-@@ -79,36 +73,30 @@
+@@ -79,36 +73,30 @@ You may need to run the command described here as /bin/kill to solve
the conflict.
.SH EXAMPLES
@@ -165,3 +152,6 @@ diff -urNad procps-3.2.7~/kill.1 procps-3.2.7/kill.1
.SH AUTHOR
Albert Cahalan <albert@users.sf.net> wrote kill in 1999 to replace a
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/20_kill_warncr.dpatch b/patches/procps-3.2.8/0021-kill_warncr.patch
index 9efeff1e2..f48ba80d1 100644
--- a/patches/procps-3.2.8/20_kill_warncr.dpatch
+++ b/patches/procps-3.2.8/0021-kill_warncr.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_kill_warncr.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add CR to warning line #331419
+From 07d93d1f2f5a299d4279a0fe3b69efeb943509dd Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 21/70] kill_warncr
-@DPATCH@
-diff -urNad procps-3.2.7~/skill.c procps-3.2.7/skill.c
---- procps-3.2.7~/skill.c 2004-09-09 23:49:38.000000000 +1000
-+++ procps-3.2.7/skill.c 2006-06-26 22:40:17.000000000 +1000
-@@ -128,7 +128,7 @@
+===================================================================
+---
+ skill.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index 54d4c48..c8af9fd 100644
+--- a/skill.c
++++ b/skill.c
+@@ -128,7 +128,7 @@ static void check_proc(int pid){
sprintf(buf, "/proc/%d/stat", pid); /* pid (cmd) state ppid pgrp session tty */
fd = open(buf,O_RDONLY);
if(fd==-1){ /* process exited maybe */
@@ -17,7 +21,7 @@ diff -urNad procps-3.2.7~/skill.c procps-3.2.7/skill.c
return;
}
fstat(fd, &statbuf);
-@@ -333,7 +333,7 @@
+@@ -342,7 +342,7 @@ static void skillsnice_usage(void){
}else{
fprintf(stderr,
"Usage: snice [new priority] [options] process selection criteria\n"
@@ -26,3 +30,6 @@ diff -urNad procps-3.2.7~/skill.c procps-3.2.7/skill.c
"\n"
"The default priority is +4. (snice +4 ...)\n"
"Priority numbers range from +20 (slowest) to -20 (fastest).\n"
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0022-module_mk_shared.patch b/patches/procps-3.2.8/0022-module_mk_shared.patch
new file mode 100644
index 000000000..975e29104
--- /dev/null
+++ b/patches/procps-3.2.8/0022-module_mk_shared.patch
@@ -0,0 +1,26 @@
+From 20aef92ce98efb9afc8da15135a11dc84e311d54 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 22/70] module_mk_shared
+
+===================================================================
+---
+ proc/module.mk | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/proc/module.mk b/proc/module.mk
+index af20334..c4e85b4 100644
+--- a/proc/module.mk
++++ b/proc/module.mk
+@@ -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
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0023-sysinfo_elfnote.patch b/patches/procps-3.2.8/0023-sysinfo_elfnote.patch
new file mode 100644
index 000000000..ec03cd49d
--- /dev/null
+++ b/patches/procps-3.2.8/0023-sysinfo_elfnote.patch
@@ -0,0 +1,32 @@
+From 8df7dcb845f80d7ebb46a5942a684164577b5bee Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 23/70] sysinfo_elfnote
+
+===================================================================
+---
+ proc/sysinfo.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index cd59534..473634f 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -221,12 +221,13 @@ static void init_libproc(void){
+ // _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();
+ }
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/20_top_manpage.dpatch b/patches/procps-3.2.8/0024-top.1.patch
index 901f580f2..b636ff49f 100644
--- a/patches/procps-3.2.8/20_top_manpage.dpatch
+++ b/patches/procps-3.2.8/0024-top.1.patch
@@ -1,32 +1,18 @@
-#! /bin/sh -e
-## 20_top_manpage by Randy Hron
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix bold in top manual page
-## DP: Fix page fault description because storage may not be disk
-## DP{ Used NE and not ME as a defined as it clashes wirh something
+From 12fb3382a3002090ab811a779556522560f2669d Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 24/70] top.1
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+Fix page fault description because storage may not be disk
+Author: Craig Small <csmall@debian.org>
+---
+ top.1 | 110 ++++++++++++++++++++++++++++++++---------------------------------
+ 1 files changed, 54 insertions(+), 56 deletions(-)
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
-diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
---- procps-3.2.7~/top.1 2009-01-09 17:45:51.000000000 +1100
-+++ procps-3.2.7/top.1 2009-01-09 18:07:32.000000000 +1100
+diff --git a/top.1 b/top.1
+index aeee3c9..b0cec2d 100644
+--- a/top.1
++++ b/top.1
@@ -42,7 +42,7 @@
.ds EM \ \fB\-\-\ \fR
\# - these two are for chuckles, makes great grammar
@@ -36,7 +22,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
\# - other misc strings for consistent usage/emphasis
.ds F \fIOff\fR
.ds O \fIOn\fR
-@@ -85,7 +85,7 @@
+@@ -85,7 +85,7 @@ top \- display Linux tasks
.\" ----------------------------------------------------------------------
.SH SYNOPSIS
.\" ----------------------------------------------------------------------
@@ -45,7 +31,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...]
The traditional switches '-' and whitespace are optional.
-@@ -94,7 +94,7 @@
+@@ -94,7 +94,7 @@ The traditional switches '-' and whitespace are optional.
.\" ----------------------------------------------------------------------
.SH DESCRIPTION
.\" ----------------------------------------------------------------------
@@ -54,7 +40,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -104,7 +104,7 @@ that configuration can be made persistent across restarts.
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.
@@ -63,7 +49,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -190,7 +190,7 @@ command-line.
'I' - Irix mode On\ \ (no, 'solaris' smp)
* 'p' - PID monitoring Off
* 's' - Secure mode Off (unsecured)
@@ -72,7 +58,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
\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 @@
+@@ -413,16 +413,14 @@ The swapped out portion of a task's total \*(MV image.
q:\fB RES\fR \*(EM Resident size (kb)
The non-swapped \*(MP a task has used.
@@ -91,7 +77,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
the 'data resident set' size or DRS.
.TP 3
-@@ -436,8 +434,8 @@
+@@ -436,8 +434,8 @@ u:\fB nFLT\fR \*(EM Page Fault count
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.
@@ -102,7 +88,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
.TP 3
v:\fB nDRT\fR \*(EM Dirty Pages count
-@@ -504,7 +502,7 @@
+@@ -504,7 +502,7 @@ and 'Order fields' screens.
.\" ......................................................................
.SS 2b. SELECTING and ORDERING Columns
.\" ----------------------------------------------------------------------
@@ -111,7 +97,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
be shown a screen containing the current \fBfields string\fR followed by names
and descriptions for all fields.
-@@ -580,7 +578,7 @@
+@@ -580,7 +578,7 @@ Use either of these keys if you have a large delay interval and wish to
see current status,
.TP 7
@@ -120,7 +106,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -589,7 +587,7 @@ Typing 'h' or '?' on that help screen will take you to help for those \*(CIs
applicable to \*(AM.
.TP 7
@@ -129,7 +115,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -599,13 +597,13 @@ See the '-p' \*(CO for a discussion of PID monitoring.
When operating in \*(AM this command has a slightly broader meaning.
.TP 7
@@ -147,7 +133,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -617,7 +615,7 @@ Thus, unless the 'x' and/or 'y' toggles are using reverse for emphasis,
there will be no visual confirmation that they are even on.
.TP 7
@@ -156,7 +142,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
You will be prompted to enter the delay time, in seconds, between
display updates.
-@@ -631,32 +629,32 @@
+@@ -631,32 +629,32 @@ If at any time you wish to know the current delay time, simply ask for help
and view the system summary on the second line.
.TP 7
@@ -194,7 +180,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -667,24 +665,24 @@ depending on your progress:
2) at the signal prompt, type 0
.TP 7
@@ -223,7 +209,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -700,25 +698,25 @@ They affect the beginning lines of your display and will determine the position
of messages and prompts.
These commands always impact just the \*(CW/field group.
@@ -255,7 +241,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -750,12 +748,12 @@ global 'B' (bold disable) toggle.
.in
.TP 7
@@ -270,7 +256,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -765,7 +763,7 @@ If you forget which field is being sorted this command can serve as a quick
visual reminder.
.TP 7
@@ -279,7 +265,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
Changes highlighting for "running" tasks.
For additional insight into this task state, \*(Xt 2a. DESCRIPTIONS of Fields,
Process Status.
-@@ -774,7 +772,7 @@
+@@ -774,7 +772,7 @@ Use of this provision provides important insight into your system's health.
The only costs will be a few additional tty escape sequences.
.TP 7
@@ -288,7 +274,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -785,20 +783,20 @@ state of the 'x', 'y' or 'b' toggles.
.B CONTENT\fR of \*(TW
.PD 0
.TP 7
@@ -312,7 +298,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -818,7 +816,7 @@ If you wish to know in advance whether or not 'Cumulative mode' is in
effect, simply ask for help and view the window summary on the second line.
.TP 7
@@ -321,7 +307,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -831,7 +829,7 @@ just press <Enter> at the prompt, without providing a name.
.B SIZE\fR of \*(TW
.PD 0
.TP 7
@@ -330,7 +316,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
Displays all tasks or just active tasks.
When this toggle is \*F, idled or zombied processes will not be displayed.
-@@ -839,7 +837,7 @@
+@@ -839,7 +837,7 @@ If this command is applied to the last \*(TD when in \*(AM, then it will not
affect the window's size, as all prior \*(TDs will have already been painted.
.TP 7
@@ -339,7 +325,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -878,12 +876,12 @@ The sort field might\fI not\fR be visible because:
.in
.TP 7
@@ -354,7 +340,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
Moves the sort column to the right unless the current sort field is
the last field being displayed.
-@@ -894,7 +892,7 @@
+@@ -894,7 +892,7 @@ the current sort field is visible.
.in
.TP 7
@@ -363,7 +349,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
These keys display a separate screen where you can change which field
is used as the sort column.
-@@ -907,7 +905,7 @@
+@@ -907,7 +905,7 @@ This \*(CI can be a convenient way to simply verify the current sort field,
when running \*(Me with column highlighting turned \*F.
.TP 7
@@ -372,7 +358,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
Using this \*(CI you can alternate between high-to-low and low-to-high sorts.
.PP
-@@ -984,7 +982,7 @@
+@@ -984,7 +982,7 @@ know what window is the \*(CW.
.\" ......................................................................
.SS 4b. COMMANDS for Windows
.TP 7
@@ -381,7 +367,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -998,7 +996,7 @@ If all 4 \*(TDs are currently visible, this \*(CI will leave the \*(SA
as the only display element.
.TP 7
@@ -390,7 +376,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -1009,7 +1007,7 @@ They will also have retained any customizations you had previously applied,
except for the 'i' (idle tasks) and 'n' (max tasks) commands.
.TP 7
@@ -399,7 +385,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -1017,7 +1015,7 @@ Thereafter when you switch modes, you will see only the \*(TD(s) you've
chosen to make visible.
.TP 7
@@ -408,7 +394,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -1028,7 +1026,7 @@ whenever the \*(CW name loses its emphasis/color, that's a reminder
the \*(TD is \*F and many commands will be restricted.
.TP 7
@@ -417,7 +403,7 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
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 @@
+@@ -1037,15 +1035,15 @@ In \*(AM, it is simply a less convenient alternative to the 'a' and 'w'
commands.
.TP 7
@@ -436,3 +422,6 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
.\" ----------------------------------------------------------------------
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/20_top_c_resize.dpatch b/patches/procps-3.2.8/0025-top_c_resize.patch
index 4cc9c6c51..38a58df16 100644
--- a/patches/procps-3.2.8/20_top_c_resize.dpatch
+++ b/patches/procps-3.2.8/0025-top_c_resize.patch
@@ -1,13 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20top_resize_terminal.dpatch by <hesso@pool.math.tu-berlin.de>
-##
-## DP: Prevent top from segfaulting when the display is shrinked to only
-## DP: a few (read: 3 or less) lines.
+From 6a2fce1a2b052f033f8f8c36c76aa4530b2887b1 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 25/70] top_c_resize
-@DPATCH@
---- procps-3.2.7.orig/top.c 2006-06-25 08:41:48.000000000 +0200
-+++ procps-3.2.7/top.c 2007-08-06 03:27:28.000000000 +0200
-@@ -140,7 +140,7 @@
+a few (read: 3 or less) lines.
+---
+ top.c | 9 ++++++---
+ top.h | 13 +++++++++++--
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/top.c b/top.c
+index 53cab05..6cc1a93 100644
+--- a/top.c
++++ b/top.c
+@@ -140,7 +140,7 @@ static int Cap_can_goto = 0;
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. */
@@ -16,7 +22,7 @@
static int Pseudo_row, Pseudo_cols, Pseudo_size;
#ifndef STDOUT_IOLBF
// less than stdout's normal buffer but with luck mostly '\n' anyway
-@@ -2415,7 +2415,10 @@
+@@ -2431,7 +2431,10 @@ static void wins_resize (void)
Pseudo_cols = Screen_cols + CLRBUFSIZ + 1;
if (Batch) Pseudo_size = ROWBUFSIZ + 1;
else Pseudo_size = Pseudo_cols * Screen_rows;
@@ -28,7 +34,7 @@
// force rebuild of column headers AND libproc/readproc requirements
Frames_libflags = 0;
-@@ -3289,7 +3292,7 @@
+@@ -3315,7 +3318,7 @@ static void frame_make (void)
// reframewins(), who also builds each window's column headers
if (!Frames_libflags) {
reframewins();
@@ -37,9 +43,11 @@
}
Pseudo_row = Msg_row = scrlins = 0;
ppt = summary_show();
---- procps-3.2.7.orig/top.h 2006-06-25 08:41:48.000000000 +0200
-+++ procps-3.2.7/top.h 2007-08-06 03:27:28.000000000 +0200
-@@ -135,7 +135,7 @@
+diff --git a/top.h b/top.h
+index b4ac079..8cf8538 100644
+--- a/top.h
++++ b/top.h
+@@ -135,7 +135,7 @@ do { \
int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg); \
putp ( Batch ? _str : \
({ \
@@ -48,7 +56,7 @@
memcmp(_pse, _str, _len) ? memcpy(_pse, _str, _len) : "\n"; \
}) \
); \
-@@ -149,7 +149,11 @@
+@@ -149,7 +149,11 @@ do { \
int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg); \
if (Batch) _ptr = _str; \
else { \
@@ -61,7 +69,7 @@
if (memcmp(_ptr, _str, _len)) { \
memcpy(_ptr, _str, _len); \
} else { \
-@@ -237,6 +241,11 @@
+@@ -237,6 +241,11 @@ typedef struct RCF_t { // the complete rcfile (new style)
RCW_t win [4]; // a 'WIN_t.rc' for each of the 4 windows
} RCF_t;
@@ -73,3 +81,6 @@
// The scaling 'type' used with scale_num() -- this is how
// the passed number is interpreted should scaling be necessary
enum scale_num {
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/20_w-bassman.dpatch b/patches/procps-3.2.8/0026-w-bassman.patch
index cc68ab72a..f82be150e 100644
--- a/patches/procps-3.2.8/20_w-bassman.dpatch
+++ b/patches/procps-3.2.8/0026-w-bassman.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_w-bassman.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: w-bassman emulation with -o flag
-## DP: Was from #45947, corrected for #414906
+From 651c5b2622859ce190a6bee53dc6abfd491fa380 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 26/70] w-bassman
-@DPATCH@
-diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
---- procps-3.2.7~/w.1 2009-01-09 16:24:17.000000000 +1100
-+++ procps-3.2.7/w.1 2009-01-09 16:24:55.000000000 +1100
+===================================================================
+---
+ w.1 | 5 ++++-
+ w.c | 16 +++++++++++++++-
+ 2 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/w.1 b/w.1
+index d57a9b5..84786e6 100644
+--- a/w.1
++++ b/w.1
@@ -5,7 +5,7 @@
w \- Show who is logged on and what they are doing.
.SH SYNOPSIS
@@ -18,7 +22,7 @@ diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
.RI [ user ]
.SH DESCRIPTION
.B "w "
-@@ -55,6 +55,9 @@
+@@ -55,6 +55,9 @@ field is shown by default.
.B "\-V "
Display version information.
.TP 0.5i
@@ -28,9 +32,10 @@ diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
.B "user "
Show information about the specified user only.
-diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
---- procps-3.2.7~/w.c 2009-01-09 16:24:54.000000000 +1100
-+++ procps-3.2.7/w.c 2009-01-09 16:25:39.000000000 +1100
+diff --git a/w.c b/w.c
+index a6b1b25..91fe8b1 100644
+--- a/w.c
++++ b/w.c
@@ -30,6 +30,7 @@
#include <termios.h>
@@ -39,7 +44,7 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
static proc_t **procs; /* our snapshot of the process table */
typedef struct utmp utmp_t;
-@@ -76,6 +77,16 @@
+@@ -76,6 +77,16 @@ static void print_time_ival7(time_t t, int centi_sec, FILE* fout) {
printf(" ? ");
return;
}
@@ -56,7 +61,7 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
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 @@
+@@ -84,6 +95,7 @@ static void print_time_ival7(time_t t, int centi_sec, FILE* fout) {
fprintf(fout, " %2lu:%02u ", t/60, (unsigned) t%60);
else
fprintf(fout, " %2lu.%02us", t, centi_sec);
@@ -64,7 +69,7 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
}
/**** stat the device file to get an idle time */
-@@ -239,7 +251,7 @@
+@@ -239,7 +251,7 @@ int main(int argc, char **argv) {
#endif
setlocale(LC_ALL, "");
@@ -73,7 +78,7 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
switch (ch) {
case 'h': header = 0; break;
case 'l': longform = 1; break;
-@@ -247,6 +259,7 @@
+@@ -247,6 +259,7 @@ int main(int argc, char **argv) {
case 'f': from = !from; break;
case 'V': display_version(); exit(0);
case 'u': ignoreuser = 1; break;
@@ -81,7 +86,7 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
default:
printf("usage: w -hlsufV [user]\n"
" -h skip header\n"
-@@ -254,6 +267,7 @@
+@@ -254,6 +267,7 @@ int main(int argc, char **argv) {
" -s short listing\n"
" -u ignore uid of processes\n"
" -f toggle FROM field (default %s)\n"
@@ -89,3 +94,6 @@ diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
" -V display version\n", FROM_STRING);
exit(1);
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/30_top.1_cpustate.dpatch b/patches/procps-3.2.8/0027-top.1_cpustates.patch
index 24f603ac8..ce3374e20 100644
--- a/patches/procps-3.2.8/30_top.1_cpustate.dpatch
+++ b/patches/procps-3.2.8/0027-top.1_cpustates.patch
@@ -1,21 +1,25 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_top.1_cpustate.dpatch by <csmall@localhost.localdomain>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: top CPU state descriptions
+From e7c71a7a9f743f102e01f2e1104ab0e5417f8f34 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 27/70] top.1_cpustates
-@DPATCH@
-diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
---- procps-3.2.7~/top.1 2007-10-04 22:35:09.000000000 +1000
-+++ procps-3.2.7/top.1 2007-10-04 22:36:45.000000000 +1000
-@@ -539,6 +539,42 @@
+===================================================================
+---
+ top.1 | 36 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 36 insertions(+), 0 deletions(-)
+
+diff --git a/top.1 b/top.1
+index b0cec2d..0ce1c62 100644
+--- a/top.1
++++ b/top.1
+@@ -537,6 +537,42 @@ You\fI move\fR a field to the\fB left\fR by pressing the corresponding\fB
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
++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
@@ -51,3 +55,6 @@ diff -urNad procps-3.2.7~/top.1 procps-3.2.7/top.1
.\" ----------------------------------------------------------------------
.SH 3. INTERACTIVE Commands
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0028-watch_8bitchar.patch b/patches/procps-3.2.8/0028-watch_8bitchar.patch
new file mode 100644
index 000000000..2b3c47356
--- /dev/null
+++ b/patches/procps-3.2.8/0028-watch_8bitchar.patch
@@ -0,0 +1,26 @@
+From a91e6470c2f1f6bbe481988fbf2a6af6bb87fd6c Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 28/70] watch_8bitchar
+
+===================================================================
+---
+ watch.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/watch.c b/watch.c
+index 5841168..eb5ce92 100644
+--- a/watch.c
++++ b/watch.c
+@@ -297,7 +297,7 @@ main(int argc, char *argv[])
+ 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
+ ||
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0029-library_map_freeproc.patch b/patches/procps-3.2.8/0029-library_map_freeproc.patch
new file mode 100644
index 000000000..a949d44b5
--- /dev/null
+++ b/patches/procps-3.2.8/0029-library_map_freeproc.patch
@@ -0,0 +1,26 @@
+From 9dc737cb6dfc072605c3c4e0afb02fa85d2b0b14 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 29/70] library_map_freeproc
+
+===================================================================
+---
+ proc/library.map | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/proc/library.map b/proc/library.map
+index a38627b..154061b 100644
+--- a/proc/library.map
++++ b/proc/library.map
+@@ -7,7 +7,7 @@ global:
+
+ 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;
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0030-pgrep_start_time.patch b/patches/procps-3.2.8/0030-pgrep_start_time.patch
new file mode 100644
index 000000000..d97c0768e
--- /dev/null
+++ b/patches/procps-3.2.8/0030-pgrep_start_time.patch
@@ -0,0 +1,27 @@
+From 5206f75b80699216ad3677f500a93e3d2323b623 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 30/70] pgrep_start_time
+
+===================================================================
+---
+ pgrep.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/pgrep.c b/pgrep.c
+index bbb7cd1..609cabd 100644
+--- a/pgrep.c
++++ b/pgrep.c
+@@ -430,7 +430,8 @@ static union el * select_procs (int *num)
+ 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;
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0031-readproc_c.patch b/patches/procps-3.2.8/0031-readproc_c.patch
new file mode 100644
index 000000000..89c945516
--- /dev/null
+++ b/patches/procps-3.2.8/0031-readproc_c.patch
@@ -0,0 +1,35 @@
+From 49aba46c22ec4af297566165dda611fe6c3c792b Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 31/70] readproc_c
+
+return if unable to open /proc
+---
+ proc/readproc.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/proc/readproc.c b/proc/readproc.c
+index 4fad11d..0386a63 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -173,7 +173,7 @@ ENTER(0x220);
+ // 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 @@ proc_t** readproctab(int flags, ...) {
+ 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 */
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/30_sysinfo_7numbers.dpatch b/patches/procps-3.2.8/0032-sysinfo_7_numbers.patch
index b3c95fb16..9d7da0e28 100644
--- a/patches/procps-3.2.8/30_sysinfo_7numbers.dpatch
+++ b/patches/procps-3.2.8/0032-sysinfo_7_numbers.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_sysctl_7numbers.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Adds up 7 cpu numbers not 4; #460331
+From 6f469982d7c74ca22b7345f5bc8b956f583a9783 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 32/70] sysinfo_7_numbers
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
---- procps-3.2.7~/proc/sysinfo.c 2008-08-10 10:13:50.000000000 +1000
-+++ procps-3.2.7/proc/sysinfo.c 2008-08-10 10:13:50.000000000 +1000
-@@ -122,24 +122,25 @@
+===================================================================
+---
+ proc/sysinfo.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index 473634f..8dbabdf 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -124,24 +124,25 @@ int uptime(double *restrict uptime_secs, double *restrict idle_secs) {
unsigned long long Hertz;
static void old_Hertz_hack(void){
@@ -37,3 +41,6 @@ diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
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 */
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0033-tload_no_optargs.patch b/patches/procps-3.2.8/0033-tload_no_optargs.patch
new file mode 100644
index 000000000..4f8283df0
--- /dev/null
+++ b/patches/procps-3.2.8/0033-tload_no_optargs.patch
@@ -0,0 +1,27 @@
+From baaed0489bc1273633e918e085ff28b85e41a3c6 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 33/70] tload_no_optargs
+
+===================================================================
+---
+ tload.c | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+diff --git a/tload.c b/tload.c
+index 1d346bb..cece48c 100644
+--- a/tload.c
++++ b/tload.c
+@@ -30,9 +30,6 @@ static int fd=1;
+ static int dly=5;
+ static jmp_buf jb;
+
+-extern int optind;
+-extern char *optarg;
+-
+ static void alrm(int signo)
+ {
+ (void)signo;
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/30_w.1.dpatch b/patches/procps-3.2.8/0034-w.1.patch
index f92b89ea4..6d9aa0330 100644
--- a/patches/procps-3.2.8/30_w.1.dpatch
+++ b/patches/procps-3.2.8/0034-w.1.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_w.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleaned up the w man page
-## DP: Make note of the time formats #414906
+From ee43ea4717fd1629956fa6b7968f134ef1fdf236 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 34/70] w.1
-@DPATCH@
-diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
---- procps-3.2.7~/w.1 2009-01-09 16:26:36.000000000 +1100
-+++ procps-3.2.7/w.1 2009-01-09 16:33:16.000000000 +1100
+Make note of the time formats
+Bug-Debian: http://bugs.debian.org/414906
+---
+ w.1 | 27 ++++++++++++++++++++-------
+ 1 files changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/w.1 b/w.1
+index 84786e6..a13cc81 100644
+--- a/w.1
++++ b/w.1
@@ -4,26 +4,26 @@
.SH NAME
w \- Show who is logged on and what they are doing.
@@ -42,7 +46,7 @@ diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
The PCPU time is the time used by the current process, named in the "what"
field.
-@@ -35,7 +35,7 @@
+@@ -35,7 +35,7 @@ Don't print the header.
.TP 0.5i
.B "\-u "
Ignores the username while figuring out the current process and cpu
@@ -51,17 +55,17 @@ diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
.TP 0.5i
.B "\-s "
Use the short format.
-@@ -70,6 +70,19 @@
+@@ -70,6 +70,19 @@ information about who is currently logged on
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
++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
++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
@@ -71,3 +75,6 @@ diff -urNad procps-3.2.7~/w.1 procps-3.2.7/w.1
.SH "SEE ALSO"
.BR free (1),
.BR ps (1),
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0035-w_columns.patch b/patches/procps-3.2.8/0035-w_columns.patch
new file mode 100644
index 000000000..1ad19bdcb
--- /dev/null
+++ b/patches/procps-3.2.8/0035-w_columns.patch
@@ -0,0 +1,41 @@
+From 6b8ebd31ac38cd8465f9d9a4c5a335b1d76e04bf Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 35/70] w_columns
+
+===================================================================
+---
+ w.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/w.c b/w.c
+index 91fe8b1..2077338 100644
+--- a/w.c
++++ b/w.c
+@@ -241,10 +241,10 @@ static void showinfo(utmp_t *u, int formtype, int maxcmd, int from) {
+
+ /***** 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 @@ int main(int argc, char **argv) {
+
+ 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);
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/30_watch_exec_beep.dpatch b/patches/procps-3.2.8/0036-watch_exec_beep.patch
index 481445a99..8099e4ae9 100644
--- a/patches/procps-3.2.8/30_watch_exec_beep.dpatch
+++ b/patches/procps-3.2.8/0036-watch_exec_beep.patch
@@ -1,15 +1,23 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_watch_exec_beep.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Adds -exec and -beep flags and has better quoting #410967
-## DP: Adds -errexit flag now too #183346
+From 42dd0d6fabd0e3bb134afaddc07a1c02905ecc36 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 36/70] watch_exec_beep
-@DPATCH@
-diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
---- procps-3.2.8~/watch.1 2009-05-28 17:27:41.000000000 +1000
-+++ procps-3.2.8/watch.1 2009-05-28 17:28:28.000000000 +1000
-@@ -4,10 +4,13 @@
+Adds -errexit flag now too #183346
+Author: Mordechai T. Abzug <morty@frakir.org>
+Bug-Debian: http://bugs.debian.org/410967
+Bug-Debian: http://bugs.debian.org/183346
+Reviewed-by: Craig Small <csmall@debian.org>
+---
+ watch.1 | 33 +++++++++++++++++++---
+ watch.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 116 insertions(+), 10 deletions(-)
+
+diff --git a/watch.1 b/watch.1
+index 1616794..802ab84 100644
+--- a/watch.1
++++ b/watch.1
+@@ -4,10 +4,13 @@ watch \- execute a program periodically, showing output fullscreen
.SH SYNOPSIS
.na
.B watch
@@ -24,24 +32,24 @@ diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
.RB [ \-\-help ]
.RB [ \-\-interval=\fIseconds\fP]
.RB [ \-\-no\-title ]
-@@ -17,7 +20,8 @@
+@@ -17,7 +20,8 @@ watch \- execute a program periodically, showing output fullscreen
.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
++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 @@
+@@ -37,15 +41,33 @@ positions that have ever changed. The
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
++or
+.I \-\-beep
+option causes the command to beep if it has a non-zero exit.
.PP
@@ -53,7 +61,7 @@ diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
+.I \-e
+or
+.I \-\-errexit
-+options, which will cause
++options, which will cause
+.B watch
+to exit if the return value from the program is non-zero.
+
@@ -62,24 +70,25 @@ diff -urNad procps-3.2.8~/watch.1 procps-3.2.8/watch.1
.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
++You can disable this with the
+.I -x
-+or
++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 @@
+@@ -93,4 +115,5 @@ The original
.B watch
was written by Tony Rems <rembo@unisoft.com> in 1991, with mods and
corrections by Francois Pinard. It was reworked and new features added by
-Mike Coleman <mkc@acm.org> in 1999.
-+Mike Coleman <mkc@acm.org> in 1999. The beep, exec, and error handling
++Mike Coleman <mkc@acm.org> in 1999. The beep, exec, and error handling
+features were added by Morty Abzug <morty@frakir.org> in 2008.
-diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
---- procps-3.2.8~/watch.c 2009-05-28 17:27:41.000000000 +1000
-+++ procps-3.2.8/watch.c 2009-05-28 17:27:42.000000000 +1000
+diff --git a/watch.c b/watch.c
+index eb5ce92..acb152f 100644
+--- a/watch.c
++++ b/watch.c
@@ -8,6 +8,7 @@
* Mike Coleman <mkc@acm.org>.
*
@@ -88,7 +97,7 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
*/
#define VERSION "0.2.0"
-@@ -35,13 +36,16 @@
+@@ -35,13 +36,16 @@ static struct option longopts[] = {
{"differences", optional_argument, 0, 'd'},
{"help", no_argument, 0, 'h'},
{"interval", required_argument, 0, 'n'},
@@ -106,7 +115,7 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
static char *progname;
-@@ -140,28 +144,44 @@
+@@ -140,28 +144,44 @@ main(int argc, char *argv[])
int optc;
int option_differences = 0,
option_differences_cumulative = 0,
@@ -152,7 +161,7 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
case 'n':
{
char *str;
-@@ -191,18 +211,23 @@
+@@ -191,18 +211,23 @@ main(int argc, char *argv[])
if (option_help) {
fprintf(stderr, usage, progname);
@@ -176,7 +185,7 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
command = strdup(argv[optind++]);
command_length = strlen(command);
for (; optind < argc; optind++) {
-@@ -261,11 +286,57 @@
+@@ -261,11 +286,57 @@ main(int argc, char *argv[])
free(header);
}
@@ -236,7 +245,7 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
for (y = show_title; y < height; y++) {
int eolseen = 0, tabpending = 0;
for (x = 0; x < width; x++) {
-@@ -313,7 +384,19 @@
+@@ -313,7 +384,19 @@ main(int argc, char *argv[])
oldeolseen = eolseen;
}
@@ -257,3 +266,6 @@ diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
first_screen = 0;
refresh();
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/35_path_max.dpatch b/patches/procps-3.2.8/0037-path_max.patch
index 9ab50a012..986846c90 100644
--- a/patches/procps-3.2.8/35_path_max.dpatch
+++ b/patches/procps-3.2.8/0037-path_max.patch
@@ -1,14 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 35_path_max.dpatch by Madhusudan.C.S <madhusudancs@gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Uses alloc instead of fixed PATH_MAX value #496274
+From 3bf20a04ddbdf435e20a190dc45cabb5d02c7b68 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 37/70] path_max
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
---- procps-3.2.7~/proc/readproc.c 2008-09-09 15:01:09.000000000 +1000
-+++ procps-3.2.7/proc/readproc.c 2008-09-09 15:01:36.000000000 +1000
-@@ -1034,7 +1034,7 @@
+===================================================================
+---
+ proc/readproc.c | 2 +-
+ pwdx.c | 20 ++++++++++++++++----
+ 2 files changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/proc/readproc.c b/proc/readproc.c
+index 0386a63..d3e85a3 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -1036,7 +1036,7 @@ proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *
* and filled out proc_t structure.
*/
proc_t * get_proc_stats(pid_t pid, proc_t *p) {
@@ -17,10 +22,11 @@ diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
struct stat statbuf;
sprintf(path, "/proc/%d", pid);
-diff -urNad procps-3.2.7~/pwdx.c procps-3.2.7/pwdx.c
---- procps-3.2.7~/pwdx.c 2006-06-17 19:29:06.000000000 +1000
-+++ procps-3.2.7/pwdx.c 2009-03-11 19:56:58.466099226 +0100
-@@ -35,7 +35,6 @@
+diff --git a/pwdx.c b/pwdx.c
+index cb96a52..3e88f3c 100644
+--- a/pwdx.c
++++ b/pwdx.c
+@@ -35,7 +35,6 @@ static void version(void)
int main(int argc, char* argv[])
{
@@ -28,7 +34,7 @@ diff -urNad procps-3.2.7~/pwdx.c procps-3.2.7/pwdx.c
regex_t re;
int i;
-@@ -59,6 +58,7 @@
+@@ -59,6 +58,7 @@ int main(int argc, char* argv[])
for (i = 1; i < argc; i++) {
if (regexec(&re, argv[i], 0, NULL, 0) != 0) {
@@ -36,7 +42,7 @@ diff -urNad procps-3.2.7~/pwdx.c procps-3.2.7/pwdx.c
snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]);
die(buf);
}
-@@ -68,9 +68,13 @@
+@@ -68,9 +68,13 @@ int main(int argc, char* argv[])
regfree(&re);
@@ -51,7 +57,8 @@ diff -urNad procps-3.2.7~/pwdx.c procps-3.2.7/pwdx.c
// At this point, all arguments are in the form /proc/nnnn
// or nnnn, so a simple check based on the first char is
-@@ -83,13 +87,21 @@
+@@ -82,14 +86,22 @@ int main(int argc, char* argv[])
+
// buf contains /proc/nnnn/cwd symlink name on entry, the
// target of that symlink on return
- if ((len = readlink(buf, buf, PATH_MAX)) < 0) {
@@ -67,11 +74,14 @@ diff -urNad procps-3.2.7~/pwdx.c procps-3.2.7/pwdx.c
+ pathbuf[len] = 0;
+ s = pathbuf;
}
-
+
printf("%s: %s\n", argv[i], s);
}
-
+
+ free(pathbuf);
+
return 0;
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0038-w_envlength.patch b/patches/procps-3.2.8/0038-w_envlength.patch
new file mode 100644
index 000000000..501e86a69
--- /dev/null
+++ b/patches/procps-3.2.8/0038-w_envlength.patch
@@ -0,0 +1,183 @@
+From fcc63581dff12b8d5603c0787091af1a1f1d7c89 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 38/70] w_envlength
+
+===================================================================
+---
+ w.1 | 10 +++++++++-
+ w.c | 53 ++++++++++++++++++++++++++++++++++++-----------------
+ 2 files changed, 45 insertions(+), 18 deletions(-)
+
+diff --git a/w.1 b/w.1
+index a13cc81..d51e490 100644
+--- a/w.1
++++ b/w.1
+@@ -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 @@ Old style output. Prints blank space for idle times less than one minute.
+ .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
+diff --git a/w.c b/w.c
+index 2077338..48a02be 100644
+--- a/w.c
++++ b/w.c
+@@ -44,20 +44,19 @@ typedef struct utmp utmp_t;
+ /* 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 @@ static void print_host(const char *restrict host, int len) {
+ }
+ }
+ // 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 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric
+
+
+ /***** 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 @@ static void showinfo(utmp_t *u, int formtype, int maxcmd, int from) {
+
+ 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 @@ static void showinfo(utmp_t *u, int formtype, int maxcmd, int from) {
+ } 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 @@ int main(int argc, char **argv) {
+ 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 @@ int main(int argc, char **argv) {
+ 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 @@ int main(int argc, char **argv) {
+ 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 @@ int main(int argc, char **argv) {
+
+ 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 @@ int main(int argc, char **argv) {
+ 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();
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/40_gnu-kbsd-version.dpatch b/patches/procps-3.2.8/0039-gnu-kbsd-version.patch
index 79c3ff991..01f0417c8 100644
--- a/patches/procps-3.2.8/40_gnu-kbsd-version.dpatch
+++ b/patches/procps-3.2.8/0039-gnu-kbsd-version.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40_gnu-kbsd-version.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Rework version parsing so its ok with other OSes
+From 9f1caa3ae8d638b24356f4d4e12b3c88aa2451a9 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 39/70] gnu-kbsd-version
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/version.c procps-3.2.7/proc/version.c
---- procps-3.2.7~/proc/version.c 2006-06-27 08:55:32.000000000 +1000
-+++ procps-3.2.7/proc/version.c 2006-06-27 09:02:25.000000000 +1000
-@@ -35,15 +35,23 @@
+===================================================================
+---
+ proc/version.c | 20 ++++++++++++++------
+ 1 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/proc/version.c b/proc/version.c
+index 69bae4f..96ffb7f 100644
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -35,15 +35,23 @@ int linux_version_code;
static void init_Linux_version(void) __attribute__((constructor));
static void init_Linux_version(void) {
@@ -38,3 +42,6 @@ diff -urNad procps-3.2.7~/proc/version.c procps-3.2.7/proc/version.c
+ x, y, z, LINUX_VERSION(x,y,z));
linux_version_code = LINUX_VERSION(x, y, z);
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/40_pgrep_coption.dpatch b/patches/procps-3.2.8/0040-pgrep_c_option.patch
index 2a3be153a..76f2bb601 100644
--- a/patches/procps-3.2.8/40_pgrep_coption.dpatch
+++ b/patches/procps-3.2.8/0040-pgrep_c_option.patch
@@ -1,13 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40_pgrep-coption.dpatch by <csmall@localhost.localdomain>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: c option for pgrep for counting number of matched proceesses
+From 1eddc716164481ece7fd1c00850e9891b4d55269 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 40/70] pgrep_c_option
-@DPATCH@
-diff -urNad procps-3.2.8~/pgrep.1 procps-3.2.8/pgrep.1
---- procps-3.2.8~/pgrep.1 2009-05-11 22:23:42.000000000 +1000
-+++ procps-3.2.8/pgrep.1 2009-05-11 22:24:14.000000000 +1000
+===================================================================
+---
+ pgrep.1 | 5 ++++-
+ pgrep.c | 20 ++++++++++++++------
+ 2 files changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/pgrep.1 b/pgrep.1
+index ae2edc2..9152799 100644
+--- a/pgrep.1
++++ b/pgrep.1
@@ -7,7 +7,7 @@
pgrep, pkill \- look up or signal processes based on name and other attributes
@@ -17,7 +22,7 @@ diff -urNad procps-3.2.8~/pgrep.1 procps-3.2.8/pgrep.1
.br
[\-s \fIsid\fP,...] [\-u \fIeuid\fP,...] [\-U \fIuid\fP,...] [\-G \fIgid\fP,...]
.br
-@@ -38,6 +38,9 @@
+@@ -38,6 +38,9 @@ to each process instead of listing them on stdout.
.SH OPTIONS
.TP
@@ -27,10 +32,11 @@ diff -urNad procps-3.2.8~/pgrep.1 procps-3.2.8/pgrep.1
\-d \fIdelimiter\fP
Sets the string used to delimit each process ID in the output (by
default a newline). (\fBpgrep\fP only.)
-diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
---- procps-3.2.8~/pgrep.c 2009-05-11 22:24:14.000000000 +1000
-+++ procps-3.2.8/pgrep.c 2009-05-11 22:25:40.000000000 +1000
-@@ -54,6 +54,7 @@
+diff --git a/pgrep.c b/pgrep.c
+index 609cabd..33cbed8 100644
+--- a/pgrep.c
++++ b/pgrep.c
+@@ -54,6 +54,7 @@ static int opt_oldest = 0;
static int opt_newest = 0;
static int opt_negate = 0;
static int opt_exact = 0;
@@ -38,7 +44,7 @@ diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
static int opt_signal = SIGTERM;
static int opt_lock = 0;
static int opt_case = 0;
-@@ -79,7 +80,7 @@
+@@ -79,7 +80,7 @@ static int usage (int opt)
if (i_am_pkill)
fprintf (fp, "Usage: pkill [-SIGNAL] [-fvx] ");
else
@@ -47,7 +53,7 @@ diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
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 @@
+@@ -565,7 +566,7 @@ static void parse_opts (int argc, char **argv)
strcat (opts, "ld:");
}
@@ -56,7 +62,7 @@ diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
while ((opt = getopt (argc, argv, opts)) != -1) {
switch (opt) {
-@@ -613,6 +614,9 @@
+@@ -613,6 +614,9 @@ static void parse_opts (int argc, char **argv)
exit(EXIT_SUCCESS);
// case 'c': // Solaris: match by contract ID
// break;
@@ -66,7 +72,7 @@ diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
case 'd': // Solaris: change the delimiter
opt_delim = strdup (optarg);
break;
-@@ -724,10 +728,14 @@
+@@ -724,10 +728,14 @@ int main (int argc, char *argv[])
procs[i].num, strerror (errno));
}
} else {
@@ -85,3 +91,6 @@ diff -urNad procps-3.2.8~/pgrep.c procps-3.2.8/pgrep.c
}
return !num; // exit(EXIT_SUCCESS) if match, otherwise exit(EXIT_FAILURE)
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/40_ps_cgroup_display.dpatch b/patches/procps-3.2.8/0041-ps_cgroup_display.patch
index 93f4a8767..3e1a34677 100644
--- a/patches/procps-3.2.8/40_ps_cgroup_display.dpatch
+++ b/patches/procps-3.2.8/0041-ps_cgroup_display.patch
@@ -1,14 +1,21 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40_ps_cgroup_display.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: ps displays cgroup #469669
+From e4eb468ea41f912a0d76c194c06549449e21ea8c Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 41/70] ps_cgroup_display
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
---- procps-3.2.7~/proc/readproc.c 2009-01-07 18:20:19.000000000 +1100
-+++ procps-3.2.7/proc/readproc.c 2009-01-07 18:24:51.000000000 +1100
-@@ -598,6 +598,17 @@
+===================================================================
+---
+ proc/readproc.c | 15 ++++++++++++++-
+ proc/readproc.h | 3 +++
+ ps/display.c | 11 +++++++----
+ ps/output.c | 23 ++++++++++++++++++++++-
+ 4 files changed, 46 insertions(+), 6 deletions(-)
+
+diff --git a/proc/readproc.c b/proc/readproc.c
+index d3e85a3..19d99b2 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -598,6 +598,17 @@ static proc_t* simple_readproc(PROCTAB *restrict const PT, proc_t *restrict cons
p->environ = file2strvec(path, "environ");
else
p->environ = NULL;
@@ -26,7 +33,7 @@ diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
return p;
next_proc:
-@@ -686,7 +697,7 @@
+@@ -686,7 +697,7 @@ static proc_t* simple_readtask(PROCTAB *restrict const PT, const proc_t *restric
t->cmdline = p->cmdline; // better not free these until done with all threads!
t->environ = p->environ;
#endif
@@ -35,7 +42,7 @@ diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
t->ppid = p->ppid; // ought to put the per-task ppid somewhere
return t;
-@@ -896,6 +907,8 @@
+@@ -896,6 +907,8 @@ void freeproc(proc_t* p) {
free((void*)*p->cmdline);
if (p->environ)
free((void*)*p->environ);
@@ -44,10 +51,11 @@ diff -urNad procps-3.2.7~/proc/readproc.c procps-3.2.7/proc/readproc.c
free(p);
}
-diff -urNad procps-3.2.7~/proc/readproc.h procps-3.2.7/proc/readproc.h
---- procps-3.2.7~/proc/readproc.h 2006-06-16 18:01:21.000000000 +1000
-+++ procps-3.2.7/proc/readproc.h 2009-01-07 18:24:56.000000000 +1100
-@@ -139,6 +139,7 @@
+diff --git a/proc/readproc.h b/proc/readproc.h
+index a953b29..3a9aecf 100644
+--- a/proc/readproc.h
++++ b/proc/readproc.h
+@@ -139,6 +139,7 @@ typedef struct proc_t {
tpgid, // stat terminal process group id
exit_signal, // stat might not be SIGCHLD
processor; // stat current (or most recent?) CPU
@@ -55,7 +63,7 @@ diff -urNad procps-3.2.7~/proc/readproc.h procps-3.2.7/proc/readproc.h
} proc_t;
// PROCTAB: data structure holding the persistent information readproc needs
-@@ -239,6 +240,8 @@
+@@ -239,6 +240,8 @@ extern proc_t * get_proc_stats(pid_t pid, proc_t *p);
#define PROC_LOOSE_TASKS 0x0200 // threat threads as if they were processes
@@ -64,10 +72,11 @@ diff -urNad procps-3.2.7~/proc/readproc.h procps-3.2.7/proc/readproc.h
// Obsolete, consider only processes with one of the passed:
#define PROC_PID 0x1000 // process id numbers ( 0 terminated)
#define PROC_UID 0x4000 // user id numbers ( length needed )
-diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
---- procps-3.2.7~/ps/display.c 2005-01-06 10:44:37.000000000 +1100
-+++ procps-3.2.7/ps/display.c 2009-01-07 18:24:32.000000000 +1100
-@@ -223,8 +223,7 @@
+diff --git a/ps/display.c b/ps/display.c
+index 4574b9c..3d6bbde 100644
+--- a/ps/display.c
++++ b/ps/display.c
+@@ -223,8 +223,7 @@ static unsigned task_format_needs;
#define needs_for_format (proc_format_needs|task_format_needs)
@@ -77,7 +86,7 @@ diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
/***** munge lists and determine openproc() flags */
static void lists_and_needs(void){
check_headers();
-@@ -342,6 +341,7 @@
+@@ -342,6 +341,7 @@ static void simple_spew(void){
}
if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse
if(buf.environ) free((void*)*buf.environ); // ought to reuse
@@ -85,7 +94,7 @@ diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
}
break;
case TF_show_proc|TF_loose_tasks: // H option
-@@ -354,6 +354,7 @@
+@@ -354,6 +354,7 @@ static void simple_spew(void){
}
if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse
if(buf.environ) free((void*)*buf.environ); // ought to reuse
@@ -93,7 +102,7 @@ diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
}
break;
case TF_show_proc|TF_show_task: // m and -m options
-@@ -366,7 +367,8 @@
+@@ -366,7 +367,8 @@ static void simple_spew(void){
}
if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse
if(buf.environ) free((void*)*buf.environ); // ought to reuse
@@ -103,7 +112,7 @@ diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
break;
case TF_show_task: // -L and -T options
while(readproc(ptp,&buf)){
-@@ -377,7 +379,8 @@
+@@ -377,7 +379,8 @@ static void simple_spew(void){
}
if(buf.cmdline) free((void*)*buf.cmdline); // ought to reuse
if(buf.environ) free((void*)*buf.environ); // ought to reuse
@@ -113,17 +122,18 @@ diff -urNad procps-3.2.7~/ps/display.c procps-3.2.7/ps/display.c
break;
}
closeproc(ptp);
-diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
---- procps-3.2.7~/ps/output.c 2006-06-19 09:27:02.000000000 +1000
-+++ procps-3.2.7/ps/output.c 2009-01-07 18:24:43.000000000 +1100
-@@ -359,6 +359,26 @@
+diff --git a/ps/output.c b/ps/output.c
+index b4fb3df..a165ed5 100644
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -376,6 +376,26 @@ static int pr_args(char *restrict const outbuf, const proc_t *restrict const pp)
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;
++ int rightward=max_rightward;
+ if(forest_prefix){
+ int fh = forest_helper(outbuf);
+ endp += fh;
@@ -135,7 +145,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
+ endp += escape_str(endp, *pp->cgroup, OUTBUF_SIZE, &rightward);
+ }
+ return max_rightward-rightward;
-+ }
++ }
+ else
+ return pr_nop(outbuf,pp);
+}
@@ -143,7 +153,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
/* "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;
-@@ -1248,7 +1268,7 @@
+@@ -1274,7 +1294,7 @@ static int pr_t_left2(char *restrict const outbuf, const proc_t *restrict const
#define GRP PROC_FILLGRP /* gid_t -> group names */
#define WCH PROC_FILLWCHAN /* do WCHAN lookup */
@@ -152,7 +162,7 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
/* TODO
* pull out annoying BSD aliases into another table (to macro table?)
* add sorting functions here (to unify names)
-@@ -1284,6 +1304,7 @@
+@@ -1310,6 +1330,7 @@ static const format_struct format_array[] = {
{"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*/
@@ -160,3 +170,6 @@ diff -urNad procps-3.2.7~/ps/output.c procps-3.2.7/ps/output.c
{"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},
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/40_watch_precision_time.dpatch b/patches/procps-3.2.8/0042-watch_precision_time.patch
index 16f885673..a5c047dc8 100644
--- a/patches/procps-3.2.8/40_watch_precision_time.dpatch
+++ b/patches/procps-3.2.8/0042-watch_precision_time.patch
@@ -1,14 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40_watch_precision_time.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add precision wait time option -p #183486
+From 6c6919c283c78b453320c344889de5892449b11c Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 42/70] watch_precision_time
-@DPATCH@
-diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
---- procps-3.2.7~/watch.1 2009-01-11 12:27:23.000000000 +1100
-+++ procps-3.2.7/watch.1 2009-01-11 12:28:49.000000000 +1100
-@@ -4,7 +4,7 @@
+===================================================================
+---
+ watch.1 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++---
+ watch.c | 31 +++++++++++++++++++++++++++++--
+ 2 files changed, 80 insertions(+), 5 deletions(-)
+
+diff --git a/watch.1 b/watch.1
+index 802ab84..40e6c8e 100644
+--- a/watch.1
++++ b/watch.1
+@@ -4,7 +4,7 @@ watch \- execute a program periodically, showing output fullscreen
.SH SYNOPSIS
.na
.B watch
@@ -17,7 +22,7 @@ diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
.RB [ \-n
.IR seconds ]
.RB [ \-\-beep ]
-@@ -14,6 +14,7 @@
+@@ -14,6 +14,7 @@ watch \- execute a program periodically, showing output fullscreen
.RB [ \-\-help ]
.RB [ \-\-interval=\fIseconds\fP]
.RB [ \-\-no\-title ]
@@ -25,7 +30,7 @@ diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
.RB [ \-\-version ]
.I command
.SH DESCRIPTION
-@@ -27,7 +28,24 @@
+@@ -27,7 +28,24 @@ every 2 seconds; use
.B \-n
or
.B \-\-interval
@@ -51,11 +56,11 @@ diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
.PP
The
.B \-d
-@@ -97,11 +115,21 @@
+@@ -97,11 +115,21 @@ watch echo '$$'
.br
watch echo "'"'$$'"'"
.PP
-+To see the effect of precision time keeping, try adding
++To see the effect of precision time keeping, try adding
+.I \-p
+to
+.IP
@@ -74,7 +79,7 @@ diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
.SH BUGS
Upon terminal resize, the screen will not be correctly repainted until the
next scheduled update. All
-@@ -110,6 +138,22 @@
+@@ -110,6 +138,22 @@ highlighting is lost on that update as well.
.PP
Non-printing characters are stripped from program output. Use "cat -v" as
part of the command pipeline if you want to see them.
@@ -97,17 +102,18 @@ diff -urNad procps-3.2.7~/watch.1 procps-3.2.7/watch.1
.SH AUTHORS
The original
.B watch
-@@ -117,3 +161,7 @@
+@@ -117,3 +161,7 @@ was written by Tony Rems <rembo@unisoft.com> in 1991, with mods and
corrections by Francois Pinard. It was reworked and new features added by
- Mike Coleman <mkc@acm.org> in 1999. The beep, exec, and error handling
+ Mike Coleman <mkc@acm.org> in 1999. The beep, exec, and error handling
features were added by Morty Abzug <morty@frakir.org> in 2008.
+On a not so dark and stormy morning
+in March of 2003, Anthony DeRobertis <asd@suespammers.org> got sick of
+his watches that should update every minute eventually updating many
+seconds after the minute started, and added microsecond precision.
-diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
---- procps-3.2.7~/watch.c 2009-01-11 12:27:23.000000000 +1100
-+++ procps-3.2.7/watch.c 2009-01-11 12:28:37.000000000 +1100
+diff --git a/watch.c b/watch.c
+index acb152f..c7369b6 100644
+--- a/watch.c
++++ b/watch.c
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
@@ -116,7 +122,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
#include <time.h>
#include <unistd.h>
#include <termios.h>
-@@ -39,13 +40,14 @@
+@@ -39,13 +40,14 @@ static struct option longopts[] = {
{"beep", no_argument, 0, 'b'},
{"errexit", no_argument, 0, 'e'},
{"exec", no_argument, 0, 'x'},
@@ -132,7 +138,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
static char *progname;
-@@ -54,6 +56,7 @@
+@@ -54,6 +56,7 @@ static int height = 24, width = 80;
static int screen_size_changed = 0;
static int first_screen = 1;
static int show_title = 2; // number of lines used, 2 or 0
@@ -140,7 +146,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
#define min(x,y) ((x) > (y) ? (y) : (x))
-@@ -138,6 +141,15 @@
+@@ -138,6 +141,15 @@ get_terminal_size(void)
}
}
@@ -156,7 +162,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
int
main(int argc, char *argv[])
{
-@@ -152,6 +164,8 @@
+@@ -152,6 +164,8 @@ main(int argc, char *argv[])
char *command;
char **command_argv;
int command_length = 0; /* not including final \0 */
@@ -165,7 +171,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
int pipefd[2];
int status;
pid_t child;
-@@ -159,7 +173,7 @@
+@@ -159,7 +173,7 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
progname = argv[0];
@@ -174,7 +180,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
!= EOF) {
switch (optc) {
case 'b':
-@@ -194,6 +208,9 @@
+@@ -194,6 +208,9 @@ main(int argc, char *argv[])
interval = ~0u/1000000;
}
break;
@@ -184,7 +190,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
case 'v':
option_version = 1;
break;
-@@ -217,6 +234,7 @@
+@@ -217,6 +234,7 @@ main(int argc, char *argv[])
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=<seconds>\t\tseconds to wait between updates\n", stderr);
@@ -192,7 +198,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
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 @@
+@@ -256,6 +274,9 @@ main(int argc, char *argv[])
noecho();
cbreak();
@@ -202,7 +208,7 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
for (;;) {
time_t t = time(NULL);
char *ts = ctime(&t);
-@@ -400,6 +421,12 @@
+@@ -400,6 +421,12 @@ main(int argc, char *argv[])
first_screen = 0;
refresh();
@@ -215,3 +221,6 @@ diff -urNad procps-3.2.7~/watch.c procps-3.2.7/watch.c
usleep(interval * 1000000);
}
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0043-watch_unicode.patch b/patches/procps-3.2.8/0043-watch_unicode.patch
new file mode 100644
index 000000000..734eba6e6
--- /dev/null
+++ b/patches/procps-3.2.8/0043-watch_unicode.patch
@@ -0,0 +1,311 @@
+From 82851661382a9411a8b288ffb374488ab4a13649 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 43/70] watch_unicode
+
+---
+ AUTHORS | 1 +
+ Makefile | 5 +-
+ watch.1 | 12 +++++
+ watch.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 4 files changed, 135 insertions(+), 25 deletions(-)
+
+diff --git a/AUTHORS b/AUTHORS
+index 0860b24..d861b4b 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -47,4 +47,5 @@ Charles Blake
+ watch:
+ Tony Rems <rembo@unisoft.com>
+ Mike Coleman <mkc@acm.org>
++Jarrod Lowe <procps@rrod.net>
+
+diff --git a/Makefile b/Makefile
+index 09fb3ed..06728fc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -68,6 +68,7 @@ TARFILES := AUTHORS BUGS NEWS README TODO COPYING COPYING.LIB \
+ _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 @@ ifneq ($(MAKECMDGOALS),beta)
+ # 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 @@ slabtop top: % : %.o $(LIBPROC)
+ $(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
+
+diff --git a/watch.1 b/watch.1
+index 40e6c8e..c5f17c4 100644
+--- a/watch.1
++++ b/watch.1
+@@ -139,6 +139,17 @@ highlighting is lost on that update as well.
+ 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 @@ On a not so dark and stormy morning
+ in March of 2003, Anthony DeRobertis <asd@suespammers.org> 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 <procps@rrod.net>.
+diff --git a/watch.c b/watch.c
+index c7369b6..7ab57ab 100644
+--- 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 <procps@rrod.net> in 2009.
+ */
+
+-#define VERSION "0.2.0"
++#define VERSION "0.3.0"
+
++#include <wchar.h>
+ #include <ctype.h>
+ #include <getopt.h>
+ #include <signal.h>
+-#include <ncurses.h>
++#include <ncursesw/ncurses.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -27,6 +29,7 @@
+ #include <termios.h>
+ #include <locale.h>
+ #include "proc/procps.h"
++#include <errno.h>
+
+ #ifdef FORCE_8BIT
+ #undef isprint
+@@ -150,6 +153,32 @@ watch_usec_t get_time_usec() {
+ 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 @@ main(int argc, char *argv[])
+ 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 @@ main(int argc, char *argv[])
+ 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 @@ main(int argc, char *argv[])
+ 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 @@ main(int argc, char *argv[])
+
+ 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;
+ }
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0044-complain_unmounted_proc.patch b/patches/procps-3.2.8/0044-complain_unmounted_proc.patch
new file mode 100644
index 000000000..113a10375
--- /dev/null
+++ b/patches/procps-3.2.8/0044-complain_unmounted_proc.patch
@@ -0,0 +1,29 @@
+From daae1481360c99edbabcf87a544eedd0dda14cc6 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 44/70] complain_unmounted_proc
+
+exiting silently.
+---
+ proc/version.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/proc/version.c b/proc/version.c
+index 96ffb7f..7930367 100644
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -39,8 +39,10 @@ static void init_Linux_version(void) {
+ 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);
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0045-ps_supgid_display.patch b/patches/procps-3.2.8/0045-ps_supgid_display.patch
new file mode 100644
index 000000000..749ed5347
--- /dev/null
+++ b/patches/procps-3.2.8/0045-ps_supgid_display.patch
@@ -0,0 +1,475 @@
+From 3fb4f51883525e888571d72d30929dd2b912154d Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 45/70] ps_supgid_display
+
+===================================================================
+---
+ proc/library.map | 2 +-
+ proc/readproc.c | 135 ++++++++++++++++++++++++++++++++++++++----------------
+ proc/readproc.h | 12 ++++-
+ ps/display.c | 34 ++++++++++++--
+ ps/output.c | 47 +++++++++++++++++++
+ ps/ps.1 | 10 ++++
+ 6 files changed, 195 insertions(+), 45 deletions(-)
+
+diff --git a/proc/library.map b/proc/library.map
+index 154061b..8d69cd5 100644
+--- a/proc/library.map
++++ b/proc/library.map
+@@ -7,7 +7,7 @@ global:
+
+ 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;
+diff --git a/proc/readproc.c b/proc/readproc.c
+index 19d99b2..9660799 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -20,6 +20,7 @@
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <string.h>
++#include <limits.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <fcntl.h>
+@@ -85,63 +86,68 @@ static void status2proc(char *S, proc_t *restrict P, int is_proc){
+ 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 @@ ENTER(0x220);
+ 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 @@ ENTER(0x220);
+ // 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 @@ ENTER(0x220);
+ 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' && isupgid<INT_MAX){ // There is one blank before '\n'
++ if (isupgid == vctsize){
++ vctsize *= 2;
++ P->supgid = (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 @@ static proc_t* simple_readproc(PROCTAB *restrict const PT, proc_t *restrict cons
+ }
+ }
+
++ 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 @@ static proc_t* simple_readtask(PROCTAB *restrict const PT, const proc_t *restric
+ }
+ }
+
++ 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 @@ void closeproc(PROCTAB* PT) {
+ }
+ }
+
++// 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; i<p->nsupgid; 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; i<p->nsupgid; 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 */
+diff --git a/proc/readproc.h b/proc/readproc.h
+index 3a9aecf..ac166ca 100644
+--- a/proc/readproc.h
++++ b/proc/readproc.h
+@@ -122,6 +122,7 @@ typedef struct proc_t {
+ 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 @@ typedef struct proc_t {
+ 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 @@ extern proc_t** readproctab(int flags, ... /* same as openproc */ );
+ // 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);
+@@ -237,8 +246,9 @@ extern proc_t * get_proc_stats(pid_t pid, proc_t *p);
+ #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_FILLSUPGRP 0x0200 // resolve supplementary group id number -> group name
+
+-#define PROC_LOOSE_TASKS 0x0200 // threat threads as if they were processes
++#define PROC_LOOSE_TASKS 0x0400 // threat threads as if they were processes
+
+ #define PROC_FILLCGROUP 0x0400 // alloc and fill in `cgroup`
+
+diff --git a/ps/display.c b/ps/display.c
+index 3d6bbde..6ef5d58 100644
+--- a/ps/display.c
++++ b/ps/display.c
+@@ -342,6 +342,8 @@ static void simple_spew(void){
+ 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 @@ static void simple_spew(void){
+ 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 @@ static void simple_spew(void){
+ 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 @@ static void simple_spew(void){
+ 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 @@ static void fancy_spew(void){
+ 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; i<n; i++)
++ if (processes[i]->nsupgid>0 && processes[i]->supgid) free(processes[i]->supgid);
++ if (ptp->flags & PROC_FILLSUPGRP)
++ for (i=0; i<n; i++)
++ if (processes[i]->nsupgid>0 && processes[i]->supgrp) freesupgrp(processes[i]);
+ closeproc(ptp);
+ }
+
+diff --git a/ps/output.c b/ps/output.c
+index a165ed5..1a196ff 100644
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -211,6 +211,32 @@ static int sr_swapable(const proc_t* P, const proc_t* Q) {
+ 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 @@ static int pr_fuid(char *restrict const outbuf, const proc_t *restrict const pp)
+ 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 @@ static int pr_t_left2(char *restrict const outbuf, const proc_t *restrict const
+ #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 @@ static const format_struct format_array[] = {
+ {"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},
+diff --git a/ps/ps.1 b/ps/ps.1
+index 0f896bf..90fabbc 100644
+--- a/ps/ps.1
++++ b/ps/ps.1
+@@ -1303,6 +1303,16 @@ suid SUID T{
+ 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,
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0046-makefile_dev_null.patch b/patches/procps-3.2.8/0046-makefile_dev_null.patch
new file mode 100644
index 000000000..4d8e92cac
--- /dev/null
+++ b/patches/procps-3.2.8/0046-makefile_dev_null.patch
@@ -0,0 +1,25 @@
+From 817acf1db736315bcc89082fe12fe41a4a9492d2 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 46/70] makefile_dev_null
+
+---
+ Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 06728fc..abddb6e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -120,7 +120,7 @@ ifneq ($(MAKECMDGOALS),beta)
+ # 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
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/50_pgrep.1.dpatch b/patches/procps-3.2.8/0047-pgrep.1.patch
index 33c9e2ac4..7df5d6980 100644
--- a/patches/procps-3.2.8/50_pgrep.1.dpatch
+++ b/patches/procps-3.2.8/0047-pgrep.1.patch
@@ -1,14 +1,17 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_pgrep.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Cleanup pgrep manual page #282168
-## DP: Uses .BR for see also section #437678
+From c55f0fd0d7758cc170ef72fce0d4a66d3200906f Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 47/70] pgrep.1
-@DPATCH@
-diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
---- procps-3.2.7~/pgrep.1 2008-04-07 11:22:03.000000000 +1000
-+++ procps-3.2.7/pgrep.1 2008-04-07 11:22:16.000000000 +1000
+Uses .BR for see also section #437678
+---
+ pgrep.1 | 98 +++++++++++++++++++++++++++++++++++++-------------------------
+ 1 files changed, 58 insertions(+), 40 deletions(-)
+
+diff --git a/pgrep.1 b/pgrep.1
+index 9152799..257a6ce 100644
+--- a/pgrep.1
++++ b/pgrep.1
@@ -2,35 +2,39 @@
.\" Licensed under version 2 of the GNU General Public License.
.\" Copyright 2000 Kjetil Torgrim Homme
@@ -24,17 +27,18 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
- [\-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]
-
+-
-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,...] \
@@ -62,7 +66,7 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
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 @@
+@@ -38,18 +42,18 @@ to each process instead of listing them on stdout.
.SH OPTIONS
.TP
@@ -86,7 +90,7 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
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 @@
+@@ -57,40 +61,40 @@ is translated into \fBpgrep\fP's or \fBpkill\fP's own process group.
Only match processes whose real group ID is listed. Either the
numerical or symbolical value may be used.
.TP
@@ -137,7 +141,7 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
Only match processes whose name (or command line if \-f is specified)
\fBexactly\fP match the \fIpattern\fP.
.TP
-@@ -107,32 +111,40 @@
+@@ -107,32 +111,40 @@ process names or command lines.
.SH EXAMPLES
Example 1: Find the process ID of the \fBnamed\fP daemon:
@@ -186,13 +190,13 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
Fatal error: out of memory etc.
.SH NOTES
-@@ -144,13 +156,19 @@
+@@ -144,13 +156,19 @@ The running \fBpgrep\fP or \fBpkill\fP process will never report
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.
++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.
@@ -209,3 +213,6 @@ diff -urNad procps-3.2.7~/pgrep.1 procps-3.2.7/pgrep.1
.SH STANDARDS
\fBpkill\fP and \fBpgrep\fP were introduced in Sun's Solaris 7. This
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0048-ps_size_sz.patch b/patches/procps-3.2.8/0048-ps_size_sz.patch
new file mode 100644
index 000000000..e75c732ed
--- /dev/null
+++ b/patches/procps-3.2.8/0048-ps_size_sz.patch
@@ -0,0 +1,40 @@
+From 941c8bea2133a9155df6fddb3666d528cab2034e Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 48/70] ps_size_sz
+
+===================================================================
+---
+ ps/output.c | 2 +-
+ ps/ps.1 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ps/output.c b/ps/output.c
+index 1a196ff..f9a29ce 100644
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -1522,7 +1522,7 @@ static const format_struct format_array[] = {
+ {"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*/
+diff --git a/ps/ps.1 b/ps/ps.1
+index 90fabbc..ad347ad 100644
+--- a/ps/ps.1
++++ b/ps/ps.1
+@@ -1254,7 +1254,7 @@ sigmask BLOCKED T{
+ 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.
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0049-top_mintime.patch b/patches/procps-3.2.8/0049-top_mintime.patch
new file mode 100644
index 000000000..9909d3b4d
--- /dev/null
+++ b/patches/procps-3.2.8/0049-top_mintime.patch
@@ -0,0 +1,27 @@
+From cf99e9bb004f6c6eb649d34bea8221bc7501d106 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 49/70] top_mintime
+
+===================================================================
+---
+ top.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/top.c b/top.c
+index 6cc1a93..f6880b5 100644
+--- a/top.c
++++ b/top.c
+@@ -2552,7 +2552,8 @@ static void do_key (unsigned c)
+ 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;
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/50_vmstat_headers.dpatch b/patches/procps-3.2.8/0050-vmstat_headers.patch
index 13fa4bf61..8434d2468 100644
--- a/patches/procps-3.2.8/50_vmstat_headers.dpatch
+++ b/patches/procps-3.2.8/0050-vmstat_headers.patch
@@ -1,14 +1,21 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_vmstat_headers.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Headers for disk and slab info Debian bug #436805
-## DP: getopt replacement #408088
+From a45013a749f144819a9a10cb5b5bb2455ca04703 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 50/70] vmstat_headers
-@DPATCH@
-diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
---- procps-3.2.7~/vmstat.c 2007-10-04 22:26:49.000000000 +1000
-+++ procps-3.2.7/vmstat.c 2007-10-04 22:27:07.000000000 +1000
+getopt replacement
+Author: Liu Xing <liuxing@cn.fujitsu.com>
+Author: Michael Tokarev <mjt@corpit.ru>
+Bug-Debian: http://bugs.debian.org/436805
+Bug-Debian: http://bugs.debian.org/408088
+---
+ vmstat.c | 80 ++++++++++++++++++++++++++-----------------------------------
+ 1 files changed, 34 insertions(+), 46 deletions(-)
+
+diff --git a/vmstat.c b/vmstat.c
+index f022928..e0d3c23 100644
+--- a/vmstat.c
++++ b/vmstat.c
@@ -29,14 +29,15 @@
#include "proc/sysinfo.h"
#include "proc/version.h"
@@ -27,7 +34,7 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
#define VMSTAT 0
#define DISKSTAT 0x00000001
#define VMSUMSTAT 0x00000002
-@@ -354,6 +355,7 @@
+@@ -354,6 +355,7 @@ static void diskformat(void){
if ((fDiskstat=fopen("/proc/diskstats", "rb"))){
fclose(fDiskstat);
ndisks=getdiskstat(&disks,&partitions);
@@ -35,7 +42,7 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
for(k=0; k<ndisks; k++){
if (moreheaders && ((k%height)==0)) diskheader();
printf(format,
-@@ -424,6 +426,7 @@
+@@ -424,6 +426,7 @@ static void slabformat (void){
return;
}
@@ -43,7 +50,7 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
nSlab = getslabinfo(&slabs);
for(k=0; k<nSlab; k++){
if (moreheaders && ((k%height)==0)) slabheader();
-@@ -582,12 +585,10 @@
+@@ -582,12 +585,10 @@ static int winhi(void) {
////////////////////////////////////////////////////////////////////////////
int main(int argc, char *argv[]) {
@@ -60,7 +67,7 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
case 'V':
display_version();
exit(0);
-@@ -603,7 +604,7 @@
+@@ -603,7 +604,7 @@ int main(int argc, char *argv[]) {
fork_format();
exit(0);
case 'm':
@@ -69,7 +76,7 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
break;
case 'D':
statMode |= DISKSUMSTAT;
-@@ -614,53 +615,40 @@
+@@ -614,53 +615,40 @@ int main(int argc, char *argv[]) {
break;
case 'p':
statMode |= PARTITIONSTAT;
@@ -147,3 +154,6 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
if (moreheaders) {
int tmp=winhi()-3;
height=((tmp>0)?tmp:22);
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0051-pgrep_usage_exitcode.patch b/patches/procps-3.2.8/0051-pgrep_usage_exitcode.patch
new file mode 100644
index 000000000..19e6aae83
--- /dev/null
+++ b/patches/procps-3.2.8/0051-pgrep_usage_exitcode.patch
@@ -0,0 +1,26 @@
+From a8346dc7b4d1da04928b2885a5a9564234eb025e Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 51/70] pgrep_usage_exitcode
+
+===================================================================
+---
+ pgrep.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/pgrep.c b/pgrep.c
+index 33cbed8..36eccb6 100644
+--- a/pgrep.c
++++ b/pgrep.c
+@@ -681,7 +681,7 @@ static void parse_opts (int argc, char **argv)
+ // case 'z': // Solaris: match by zone ID
+ // break;
+ case '?':
+- usage (opt);
++ usage (optopt?optopt:opt);
+ break;
+ }
+ }
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0052-ps_1_options.patch b/patches/procps-3.2.8/0052-ps_1_options.patch
new file mode 100644
index 000000000..2ebd0c07a
--- /dev/null
+++ b/patches/procps-3.2.8/0052-ps_1_options.patch
@@ -0,0 +1,557 @@
+From 19b2d182a4b75edaeb9c8ee163d7abb30a5cd0e9 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 52/70] ps_1_options
+
+===================================================================
+---
+ ps/ps.1 | 335 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 files changed, 169 insertions(+), 166 deletions(-)
+
+diff --git a/ps/ps.1 b/ps/ps.1
+index ad347ad..6ba31dc 100644
+--- a/ps/ps.1
++++ b/ps/ps.1
+@@ -158,20 +158,6 @@ Print only the name of PID 42:
+ .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 @@ An alternate description is that this option causes \fBps\fR to
+ 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 @@ Select all processes. Identical to \fB\-A\fR.
+ .\" 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 @@ An alternate description is that this option causes \fBps\fR to
+ 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 @@ These options accept a single argument in the form of a blank\-separated
+ 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 @@ This selects the processes whose real group name or ID is in the
+ \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 @@ is completely numeric (as\ sessions\ are).
+ 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 @@ Select by PID.
+ 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 @@ Terminals (ttys, or screens for text output) can be specified in several
+ 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 @@ This selects the processes whose effective user name or ID is in
+ 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 @@ These options are used to choose the information displayed by \fBps\fR.
+ 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 @@ NLWP (number of threads) and LWP (thread ID) columns will be added.
+ 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 @@ display BSD long format.
+ .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 @@ display user\-oriented format
+ .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 @@ Display security context format. (for\ SE\ Linux)
+ .\" .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 @@ display the command arguments.
+ 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 @@ current personality, you can use the long options \fB\-\-headers\fR
+ 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 @@ Without this option, the default search path for the namelist is:
+ .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 @@ The\ "+" is optional since default direction is increasing numerical or
+ 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 @@ Show threads as if they were processes
+ .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.
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/55_top_highlight.dpatch b/patches/procps-3.2.8/0053-top_highlight.patch
index df53c1399..2621f1715 100644
--- a/patches/procps-3.2.8/55_top_highlight.dpatch
+++ b/patches/procps-3.2.8/0053-top_highlight.patch
@@ -1,14 +1,18 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 55_top_highlight.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix highlighting problem Closes: #351065
+From 8408efa4ad9bf469b957b3e84c13593499d9ed64 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 53/70] top_highlight
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2008-01-08 20:13:02.000000000 +1100
-+++ procps-3.2.7/top.c 2008-01-08 20:13:47.000000000 +1100
-@@ -3027,9 +3027,10 @@
+===================================================================
+---
+ top.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/top.c b/top.c
+index f6880b5..d86a311 100644
+--- a/top.c
++++ b/top.c
+@@ -3054,9 +3054,10 @@ static proc_t **summary_show (void)
snprintf(_z, sizeof(_z), f, ## va); \
snprintf(cbuf, sizeof(cbuf), "%s%s%s", \
q->capclr_rowhigh, \
@@ -20,3 +24,6 @@ diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
pad += q->len_rowhigh; \
if (!(CHKw(q, Show_HIROWS) && 'R' == p->state)) pad += q->len_rownorm; \
} \
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0054-top_nohz.patch b/patches/procps-3.2.8/0054-top_nohz.patch
new file mode 100644
index 000000000..2b6ec5a4e
--- /dev/null
+++ b/patches/procps-3.2.8/0054-top_nohz.patch
@@ -0,0 +1,25 @@
+From c09814258383e1c032c6df12ae96d5e56386daef Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 54/70] top_nohz
+
+===================================================================
+---
+ top.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/top.c b/top.c
+index d86a311..ea33989 100644
+--- a/top.c
++++ b/top.c
+@@ -2916,6 +2916,7 @@ static void summaryhlp (CPU_t *cpu, const char *pfx)
+ 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;
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/65_fix_partition_format.dpatch b/patches/procps-3.2.8/0055-vmstat_part_format.patch
index d60f98627..3146ac808 100644
--- a/patches/procps-3.2.8/65_fix_partition_format.dpatch
+++ b/patches/procps-3.2.8/0055-vmstat_part_format.patch
@@ -1,15 +1,19 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 65_fix_partition_format.dpatch by Daniel Novotny (see
-## https://bugzilla.redhat.com/show_bug.cgi?id=485243 )
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: The contents of /proc/diskstats have changed since 2.6.25
+From f619f8629a5915c900f984c1caf44241ff077f32 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 55/70] vmstat_part_format
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
---- procps-3.2.7~/proc/sysinfo.c 2009-05-27 18:33:13.443866133 +0000
-+++ procps-3.2.7/proc/sysinfo.c 2009-05-27 18:33:13.735867382 +0000
-@@ -780,6 +780,18 @@
+---
+ proc/sysinfo.c | 22 +++++++++++++++++++---
+ proc/sysinfo.h | 2 +-
+ vmstat.c | 2 +-
+ 3 files changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index 8dbabdf..444ee5b 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -796,6 +796,18 @@ unsigned int getpartitions_num(struct disk_stat *disks, int ndisks){
}
/////////////////////////////////////////////////////////////////////////////
@@ -28,7 +32,7 @@ diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **partitions){
FILE* fd;
-@@ -787,6 +799,7 @@
+@@ -803,6 +815,7 @@ unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **parti
int cPartition = 0;
int fields;
unsigned dummy;
@@ -36,7 +40,7 @@ diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
*disks = NULL;
*partitions = NULL;
-@@ -799,8 +812,9 @@
+@@ -815,8 +828,9 @@ unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **parti
fclose(fd);
break;
}
@@ -48,7 +52,7 @@ diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
(*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,
-@@ -823,7 +837,9 @@
+@@ -839,7 +853,9 @@ unsigned int getdiskstat(struct disk_stat **disks, struct partition_stat **parti
}else{
(*partitions) = realloc(*partitions, (cPartition+1)*sizeof(struct partition_stat));
fflush(stdout);
@@ -59,10 +63,11 @@ diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
//&part_major,
//&part_minor,
(*partitions)[cPartition].partition_name,
-diff -urNad procps-3.2.7~/proc/sysinfo.h procps-3.2.7/proc/sysinfo.h
---- procps-3.2.7~/proc/sysinfo.h 2009-05-27 18:32:49.000000000 +0000
-+++ procps-3.2.7/proc/sysinfo.h 2009-05-27 18:33:13.735867382 +0000
-@@ -113,7 +113,7 @@
+diff --git a/proc/sysinfo.h b/proc/sysinfo.h
+index e30a38b..494c4b3 100644
+--- a/proc/sysinfo.h
++++ b/proc/sysinfo.h
+@@ -113,7 +113,7 @@ typedef struct partition_stat{
unsigned parent_disk; // index into a struct disk_stat array
unsigned reads;
unsigned writes;
@@ -71,10 +76,11 @@ diff -urNad procps-3.2.7~/proc/sysinfo.h procps-3.2.7/proc/sysinfo.h
}partition_stat;
extern unsigned int getpartitions_num(struct disk_stat *disks, int ndisks);
-diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
---- procps-3.2.7~/vmstat.c 2009-05-27 18:33:13.603867748 +0000
-+++ procps-3.2.7/vmstat.c 2009-05-27 18:33:13.735867382 +0000
-@@ -286,7 +286,7 @@
+diff --git a/vmstat.c b/vmstat.c
+index e0d3c23..e81a4ac 100644
+--- a/vmstat.c
++++ b/vmstat.c
+@@ -286,7 +286,7 @@ static int diskpartition_format(const char* partition_name){
struct disk_stat *disks;
struct partition_stat *partitions, *current_partition=NULL;
unsigned long ndisks, j, k, npartitions;
@@ -83,3 +89,6 @@ diff -urNad procps-3.2.7~/vmstat.c procps-3.2.7/vmstat.c
fDiskstat=fopen("/proc/diskstats","rb");
if(!fDiskstat){
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0056-readproc_double_free.patch b/patches/procps-3.2.8/0056-readproc_double_free.patch
new file mode 100644
index 000000000..8a3084b2b
--- /dev/null
+++ b/patches/procps-3.2.8/0056-readproc_double_free.patch
@@ -0,0 +1,32 @@
+From 0a7cff0b81b32033591436d2bbc65f5c54e8fa3a Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 56/70] readproc_double_free
+
+---
+ proc/readproc.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/proc/readproc.c b/proc/readproc.c
+index 9660799..4203071 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -828,6 +828,7 @@ proc_t* readproc(PROCTAB *restrict const PT, proc_t *restrict p) {
+
+ 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 @@ proc_t* readtask(PROCTAB *restrict const PT, const proc_t *restrict const p, pro
+
+ 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!)
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0057-vmstat_units.patch b/patches/procps-3.2.8/0057-vmstat_units.patch
new file mode 100644
index 000000000..ef2bb3e32
--- /dev/null
+++ b/patches/procps-3.2.8/0057-vmstat_units.patch
@@ -0,0 +1,70 @@
+From cc3d82aca91e1910e5dacb56f2b50e23eab66d73 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 57/70] vmstat_units
+
+to stop some overflows of some kernel variables
+Bug-Debian: http://bugs.debian.org/558134
+Bug-Debian: http://bugs.debian.org/558361
+---
+ proc/sysinfo.c | 2 +-
+ vmstat.8 | 3 ++-
+ vmstat.c | 8 ++++----
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index 444ee5b..382c8dc 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -606,7 +606,7 @@ void meminfo(void){
+ );
+ 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;
+diff --git a/vmstat.8 b/vmstat.8
+index c97826f..486224b 100644
+--- a/vmstat.8
++++ b/vmstat.8
+@@ -67,7 +67,8 @@ 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)
+ .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/vmstat.c b/vmstat.c
+index e81a4ac..cbbb094 100644
+--- a/vmstat.c
++++ b/vmstat.c
+@@ -209,8 +209,8 @@ static void new_format(void) {
+ 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 @@ static void new_format(void) {
+ 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*/
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0058-skill_null_argv.patch b/patches/procps-3.2.8/0058-skill_null_argv.patch
new file mode 100644
index 000000000..69b00298b
--- /dev/null
+++ b/patches/procps-3.2.8/0058-skill_null_argv.patch
@@ -0,0 +1,25 @@
+From 52ec990a0823501e28015c2e9607dc6cfc7542ba Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 58/70] skill_null_argv
+
+---
+ skill.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index c8af9fd..d9a1af9 100644
+--- a/skill.c
++++ b/skill.c
+@@ -307,7 +307,7 @@ no_more_args:
+ 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
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0059-skill_multiarg.patch b/patches/procps-3.2.8/0059-skill_multiarg.patch
new file mode 100644
index 000000000..32a3ada9f
--- /dev/null
+++ b/patches/procps-3.2.8/0059-skill_multiarg.patch
@@ -0,0 +1,25 @@
+From 26cd8eee99742fd69b006b4b8467aefc230ae61d Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 59/70] skill_multiarg
+
+---
+ skill.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index d9a1af9..2d90ad0 100644
+--- a/skill.c
++++ b/skill.c
+@@ -464,6 +464,8 @@ selection_collection:
+ 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;
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0060-proc_version_constructor.patch b/patches/procps-3.2.8/0060-proc_version_constructor.patch
new file mode 100644
index 000000000..5a4d27182
--- /dev/null
+++ b/patches/procps-3.2.8/0060-proc_version_constructor.patch
@@ -0,0 +1,52 @@
+From 5b7bf25c0b54723789abfd5f46779ae6ae49e2c3 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 60/70] proc_version_constructor
+
+---
+ proc/sysinfo.c | 1 +
+ proc/version.c | 3 +--
+ proc/version.h | 1 +
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index 382c8dc..c804f49 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -213,6 +213,7 @@ static int check_for_privs(void){
+ 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
+ //
+diff --git a/proc/version.c b/proc/version.c
+index 7930367..cc215bc 100644
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -33,8 +33,7 @@ void display_version(void) {
+
+ 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];
+diff --git a/proc/version.h b/proc/version.h
+index 3769b84..04a75e9 100644
+--- 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 */
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0061-pmaps_smaps.patch b/patches/procps-3.2.8/0061-pmaps_smaps.patch
new file mode 100644
index 000000000..fde235825
--- /dev/null
+++ b/patches/procps-3.2.8/0061-pmaps_smaps.patch
@@ -0,0 +1,150 @@
+From 37502350f47277ad647ed77ad75e345b76e313c5 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 61/70] pmaps_smaps
+
+---
+ pmap.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 files changed, 68 insertions(+), 18 deletions(-)
+
+diff --git a/pmap.c b/pmap.c
+index 6b865fc..3dcb81e 100644
+--- a/pmap.c
++++ b/pmap.c
+@@ -126,24 +126,37 @@ static int one_proc(proc_t *p){
+ 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 @@ static int one_proc(proc_t *p){
+ }
+ }
+
+- 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 @@ static int one_proc(proc_t *p){
+ 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 @@ static int one_proc(proc_t *p){
+ 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");
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0062-top_numeric_args.patch b/patches/procps-3.2.8/0062-top_numeric_args.patch
new file mode 100644
index 000000000..d1487741e
--- /dev/null
+++ b/patches/procps-3.2.8/0062-top_numeric_args.patch
@@ -0,0 +1,109 @@
+From 3742765f0bf30142c8f7d1510a86b0babe80e6e6 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 62/70] top_numeric_args
+
+---
+ top.c | 48 ++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 36 insertions(+), 12 deletions(-)
+
+diff --git a/top.c b/top.c
+index ea33989..e194244 100644
+--- a/top.c
++++ b/top.c
+@@ -32,6 +32,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <math.h>
+ #include <string.h>
+
+ // Foul POS defines all sorts of stuff...
+@@ -1825,8 +1826,12 @@ static void parse_args (char **args)
+
+ 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 @@ static void parse_args (char **args)
+ 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 @@ static void parse_args (char **args)
+ 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 @@ static void parse_args (char **args)
+ 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 @@ static void parse_args (char **args)
+ , *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... */
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0063-top_1_swap.patch b/patches/procps-3.2.8/0063-top_1_swap.patch
new file mode 100644
index 000000000..e488385e4
--- /dev/null
+++ b/patches/procps-3.2.8/0063-top_1_swap.patch
@@ -0,0 +1,34 @@
+From 6a4504ffe207c72f1f4646f46db4d4076e154c89 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 63/70] top_1_swap
+
+---
+ top.1 | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/top.1 b/top.1
+index 0ce1c62..5b44828 100644
+--- a/top.1
++++ b/top.1
+@@ -401,13 +401,13 @@ A task's currently used share of available \*(MP.
+ 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)
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0064-w_userproc.patch b/patches/procps-3.2.8/0064-w_userproc.patch
new file mode 100644
index 000000000..d16462f5b
--- /dev/null
+++ b/patches/procps-3.2.8/0064-w_userproc.patch
@@ -0,0 +1,25 @@
+From 3350dba35edadb332e7e86baaa514c19c8067223 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 64/70] w_userproc
+
+---
+ w.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/w.c b/w.c
+index 48a02be..107b9fc 100644
+--- a/w.c
++++ b/w.c
+@@ -171,7 +171,7 @@ static const proc_t *getproc(const utmp_t *restrict const u, const char *restric
+ 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;
+ }
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0065-sysinfo_kfreebsd_hertz.patch b/patches/procps-3.2.8/0065-sysinfo_kfreebsd_hertz.patch
new file mode 100644
index 000000000..7b792889d
--- /dev/null
+++ b/patches/procps-3.2.8/0065-sysinfo_kfreebsd_hertz.patch
@@ -0,0 +1,31 @@
+From df11ed5cbcac1bcf18799bf5c4df7b0c6a26b639 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:46 +0100
+Subject: [PATCH 65/70] sysinfo_kfreebsd_hertz
+
+---
+ proc/sysinfo.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index c804f49..65d94d7 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -230,6 +230,14 @@ static void init_libproc(void){
+ 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();
+ }
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0066-ps_1_flt_output.patch b/patches/procps-3.2.8/0066-ps_1_flt_output.patch
new file mode 100644
index 000000000..a8e9e6039
--- /dev/null
+++ b/patches/procps-3.2.8/0066-ps_1_flt_output.patch
@@ -0,0 +1,40 @@
+From bb71519ca889076afa450fcfd15229c49ba44442 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:47 +0100
+Subject: [PATCH 66/70] ps_1_flt_output
+
+---
+ ps/ps.1 | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/ps/ps.1 b/ps/ps.1
+index 6ba31dc..f07dc82 100644
+--- 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 @@ lwp (light weight process, or thread) ID of the lwp being reported.
+ (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).
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0067-watch_ansi_colour.patch b/patches/procps-3.2.8/0067-watch_ansi_colour.patch
new file mode 100644
index 000000000..3d0b01fb9
--- /dev/null
+++ b/patches/procps-3.2.8/0067-watch_ansi_colour.patch
@@ -0,0 +1,193 @@
+From cda40ddb76fa6619d86bf675ae0cc816f16f26c9 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:47 +0100
+Subject: [PATCH 67/70] watch_ansi_colour
+
+---
+ watch.1 | 7 ++++-
+ watch.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 96 insertions(+), 4 deletions(-)
+
+diff --git a/watch.1 b/watch.1
+index c5f17c4..aecbfeb 100644
+--- 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 @@ watch \- execute a program periodically, showing output fullscreen
+ .RB [ \-n
+ .IR seconds ]
+ .RB [ \-\-beep ]
++.RB [ \-\-color ]
+ .RB [ \-\-differences[=\fIcumulative\fP]]
+ .RB [ \-\-errexit ]
+ .RB [ \-\-exec ]
+@@ -75,6 +76,10 @@ or
+ 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/watch.c b/watch.c
+index 7ab57ab..af7229e 100644
+--- 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 struct option longopts[] = {
+ };
+
+ static char usage[] =
+- "Usage: %s [-bdhnptvx] [--beep] [--differences[=cumulative]] [--exec] [--help] [--interval=<n>] [--no-title] [--version] <command>\n";
++ "Usage: %s [-bcdhnptvx] [--beep] [--color] [--differences[=cumulative]] [--exec] [--help] [--interval=<n>] [--no-title] [--version] <command>\n";
+
+ static char *progname;
+
+@@ -62,6 +63,74 @@ 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))
++#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<MAX_ANSIBUF; i++)
++ {
++ c = getc(fp);
++ if (c == 'm') //COLOUR SEQUENCE ENDS in 'm'
++ {
++ buf[i] = '\0';
++ break;
++ }
++ if (c < '0' && c > '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 @@ main(int argc, char *argv[])
+ 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 @@ main(int argc, char *argv[])
+ 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 @@ main(int argc, char *argv[])
+ /* 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 @@ main(int argc, char *argv[])
+ }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;
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0068-top_username_parse.patch b/patches/procps-3.2.8/0068-top_username_parse.patch
new file mode 100644
index 000000000..0ebcf6156
--- /dev/null
+++ b/patches/procps-3.2.8/0068-top_username_parse.patch
@@ -0,0 +1,25 @@
+From 9c1f9f99a5826be5069fc0ef66a8d3ada4e488b2 Mon Sep 17 00:00:00 2001
+From: http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-8.debian.tar.gz <info@debian.org>
+Date: Fri, 19 Mar 2010 21:58:47 +0100
+Subject: [PATCH 68/70] top_username_parse
+
+---
+ top.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/top.c b/top.c
+index e194244..62f4077 100644
+--- a/top.c
++++ b/top.c
+@@ -1924,7 +1924,7 @@ static void parse_args (char **args)
+ 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':
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/fix-install.diff b/patches/procps-3.2.8/0069-don-t-install-stuff-that-was-not-built.patch
index 42f12c9a5..b7f3a8380 100644
--- a/patches/procps-3.2.8/fix-install.diff
+++ b/patches/procps-3.2.8/0069-don-t-install-stuff-that-was-not-built.patch
@@ -1,5 +1,7 @@
+From 97bc8fbfedfc3d823891ec6497c187cb8e1ace06 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
-Subject: don't install stuff that was not built
+Date: Fri, 19 Mar 2010 21:59:28 +0100
+Subject: [PATCH 69/70] don't install stuff that was not built
We don't built everything in ptxdist. This Patch makes sure that
'make install' won't fail if 'skill' or 'pgrep' is not there.
@@ -7,13 +9,13 @@ We don't built everything in ptxdist. This Patch makes sure that
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ 1 files changed, 2 insertions(+), 2 deletions(-)
-Index: b/Makefile
-===================================================================
+diff --git a/Makefile b/Makefile
+index abddb6e..5efabb3 100644
--- a/Makefile
+++ b/Makefile
-@@ -228,8 +228,8 @@ $(MANFILES) : all
+@@ -229,8 +229,8 @@ $(MANFILES) : all
$(install) --mode a=r $(notdir $@) $@
install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
@@ -24,3 +26,6 @@ Index: b/Makefile
############ prog.c --> prog.o
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/0070-remove-frename-registers-option-due-to-ICE-on-gcc-4..patch b/patches/procps-3.2.8/0070-remove-frename-registers-option-due-to-ICE-on-gcc-4..patch
new file mode 100644
index 000000000..fa5f509c3
--- /dev/null
+++ b/patches/procps-3.2.8/0070-remove-frename-registers-option-due-to-ICE-on-gcc-4..patch
@@ -0,0 +1,25 @@
+From 88fe43f463b9a2ad6ae5ac4be85de66af7b142ef Mon Sep 17 00:00:00 2001
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Fri, 19 Mar 2010 22:03:13 +0100
+Subject: [PATCH 70/70] remove -frename-registers option, due to ICE on gcc-4.3.1
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ Makefile | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5efabb3..a83df5e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -142,7 +142,6 @@ ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,)
+ # if not debugging, enable things that could confuse gdb
+ ifeq (,$(findstring -g,$(filter -g%,$(CFLAGS))))
+ ALL_CFLAGS += $(call check_gcc,-fweb,)
+-ALL_CFLAGS += $(call check_gcc,-frename-registers,)
+ ALL_CFLAGS += $(call check_gcc,-fomit-frame-pointer,)
+ endif
+
+--
+1.7.0
+
diff --git a/patches/procps-3.2.8/10_free.1.dpatch b/patches/procps-3.2.8/10_free.1.dpatch
deleted file mode 100644
index 75eb73846..000000000
--- a/patches/procps-3.2.8/10_free.1.dpatch
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_free.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: -g flag documented #286900
-## DP: hypen escaped #282168
-
-@DPATCH@
-diff -urNad procps-3.2.7~/free.1 procps-3.2.7/free.1
---- procps-3.2.7~/free.1 2004-02-24 08:35:55.000000000 +1100
-+++ procps-3.2.7/free.1 2007-10-04 22:32:20.000000000 +1000
-@@ -5,7 +5,7 @@
- .SH NAME
- free \- Display amount of free and used memory in the system
- .SH SYNOPSIS
--.BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s"
-+.BR "free " [ "\-b" " | " "\-k" " | " "\-m" " | " "\-g" "] [" "\-o" "] [" "\-s"
- .I delay
- .RB "] [" "\-t" "] [" "\-V" ]
- .SH DESCRIPTION
-@@ -13,32 +13,34 @@
- 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.
-+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; the \fB\-g\fP switch displays it in
-+gigabytes.
- .PP
--The \fB-t\fP switch displays a line containing the totals.
-+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
-+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
-+The \fB\-s\fP switch activates continuous polling \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.
- .SH FILES
--.ta
--.IR /proc/meminfo "\-\- memory information"
--.fi
-+.TP
-+.I /proc/meminfo
-+memory information
-+
-
- .SH "SEE ALSO"
- .BR ps (1),
- .BR slabtop (1),
- .BR vmstat (8),
--.BR top(1)
-+.BR top (1)
-
- .SH AUTHORS
- Written by Brian Edmonds.
diff --git a/patches/procps-3.2.8/10_skill_perror.dpatch b/patches/procps-3.2.8/10_skill_perror.dpatch
deleted file mode 100644
index a2dbb6c27..000000000
--- a/patches/procps-3.2.8/10_skill_perror.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_skill_perror.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: kill prints perror #468363
-
-@DPATCH@
-diff -urNad procps-3.2.8~/skill.c procps-3.2.8/skill.c
---- procps-3.2.8~/skill.c 2009-05-11 22:10:28.000000000 +1000
-+++ procps-3.2.8/skill.c 2009-05-11 22:15:13.000000000 +1000
-@@ -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/patches/procps-3.2.8/10_tload.1.dpatch b/patches/procps-3.2.8/10_tload.1.dpatch
deleted file mode 100644
index ce660d621..000000000
--- a/patches/procps-3.2.8/10_tload.1.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_tload.1.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Reword tload.1 man page for the alarm
-
-@DPATCH@
-diff -urNad procps-3.2.7~/tload.1 procps-3.2.7/tload.1
---- procps-3.2.7~/tload.1 2002-10-07 07:26:12.000000000 +1000
-+++ procps-3.2.7/tload.1 2006-06-26 12:44:39.000000000 +1000
-@@ -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/patches/procps-3.2.8/10_top_no_openproc.dpatch b/patches/procps-3.2.8/10_top_no_openproc.dpatch
deleted file mode 100644
index 46d708798..000000000
--- a/patches/procps-3.2.8/10_top_no_openproc.dpatch
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_top_no_openproc.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Exit top if cannot openproc #378695
-
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2009-01-09 17:04:25.000000000 +1100
-+++ procps-3.2.7/top.c 2009-01-09 17:43:06.000000000 +1100
-@@ -1097,6 +1097,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/patches/procps-3.2.8/10_w_time.dpatch b/patches/procps-3.2.8/10_w_time.dpatch
deleted file mode 100644
index c820441ef..000000000
--- a/patches/procps-3.2.8/10_w_time.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_w_time.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Let fprintf print locale-friendly seconds #252575
-
-@DPATCH@
-diff -urNad procps-3.2.7~/w.c procps-3.2.7/w.c
---- procps-3.2.7~/w.c 2009-01-09 15:56:04.000000000 +1100
-+++ procps-3.2.7/w.c 2009-01-09 16:14:56.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/patches/procps-3.2.8/20_Makefile_lib64.dpatch b/patches/procps-3.2.8/20_Makefile_lib64.dpatch
deleted file mode 100644
index 09225ac30..000000000
--- a/patches/procps-3.2.8/20_Makefile_lib64.dpatch
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh -e
-## 20_Makefile_lib64.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Removed entry about /lib64 as it breaks the sparc
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
-
-[mkl: ported to procps-3.2.8]
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: procps-3.2.8/Makefile
-===================================================================
---- procps-3.2.8.orig/Makefile
-+++ procps-3.2.8/Makefile
-@@ -30,7 +30,7 @@ ln_sf := ln -sf
- install := install -D --owner 0 --group 0
-
- # Lame x86-64 /lib64 and /usr/lib64 abomination:
--lib64 := lib$(shell [ -d /lib64 ] && echo 64)
-+lib64 := lib
-
- usr/bin := $(DESTDIR)/usr/bin/
- bin := $(DESTDIR)/bin/
-@@ -127,7 +127,7 @@ check_gcc = $(shell if $(CC) $(ALL_CPPFL
- # produce separate executables for ppc and ppc64, s390 and s390x,
- # i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
- # Failure to do so will cause data corruption.
--m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
-+#m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
- ALL_CFLAGS += $(m64)
-
- ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
diff --git a/patches/procps-3.2.8/20_module_mk_shared.dpatch b/patches/procps-3.2.8/20_module_mk_shared.dpatch
deleted file mode 100644
index 7b3cd678c..000000000
--- a/patches/procps-3.2.8/20_module_mk_shared.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh -e
-## 20_module_mk_shared.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Made SHARED variable overwritable
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/module.mk procps-3.2.7/proc/module.mk
---- procps-3.2.7~/proc/module.mk 2006-06-27 08:24:51.000000000 +1000
-+++ procps-3.2.7/proc/module.mk 2006-06-27 08:25:43.000000000 +1000
-@@ -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/patches/procps-3.2.8/20_sysinfo_c.dpatch b/patches/procps-3.2.8/20_sysinfo_c.dpatch
deleted file mode 100644
index 96e176947..000000000
--- a/patches/procps-3.2.8/20_sysinfo_c.dpatch
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_sysinfo_c.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Dont find elf note for non-linux Bug #378157
-
-@DPATCH@
-diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
---- procps-3.2.7~/proc/sysinfo.c 2006-06-25 16:41:48.000000000 +1000
-+++ procps-3.2.7/proc/sysinfo.c 2007-10-04 22:07:48.000000000 +1000
-@@ -218,12 +218,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/patches/procps-3.2.8/20_watch_8bitchar.dpatch b/patches/procps-3.2.8/20_watch_8bitchar.dpatch
deleted file mode 100644
index 1be95ddda..000000000
--- a/patches/procps-3.2.8/20_watch_8bitchar.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_watch_8bitchar.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Make char unsigned
-
-@DPATCH@
-diff -urNad procps-3.2.8~/watch.c procps-3.2.8/watch.c
---- procps-3.2.8~/watch.c 2009-05-11 22:20:14.000000000 +1000
-+++ procps-3.2.8/watch.c 2009-05-11 22:22:52.000000000 +1000
-@@ -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/patches/procps-3.2.8/30_library_map_freeproc.dpatch b/patches/procps-3.2.8/30_library_map_freeproc.dpatch
deleted file mode 100644
index 2842c89b6..000000000
--- a/patches/procps-3.2.8/30_library_map_freeproc.dpatch
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh -e
-## 30_library_map_freeproc.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Added freeproc to library.map
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
---- procps-3.2.0.orig/proc/library.map
-+++ procps-3.2.0/proc/library.map
-@@ -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;
diff --git a/patches/procps-3.2.8/30_pgrep_start_time.dpatch b/patches/procps-3.2.8/30_pgrep_start_time.dpatch
deleted file mode 100644
index f68fd569e..000000000
--- a/patches/procps-3.2.8/30_pgrep_start_time.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh -e
-## 30_pgrep_start_time.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: pgrep.c saved_start_time was missed
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
---- procps-3.2.0.orig/pgrep.c
-+++ procps-3.2.0/pgrep.c
-@@ -367,7 +367,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/patches/procps-3.2.8/30_readproc_c.dpatch b/patches/procps-3.2.8/30_readproc_c.dpatch
deleted file mode 100644
index 8c83e8810..000000000
--- a/patches/procps-3.2.8/30_readproc_c.dpatch
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh -e
-## 30_readproc_c.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: readproc.c some type conversion help
-## DP: return if unable to open /proc
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
---- procps-3.2.0.orig/proc/readproc.c
-+++ procps-3.2.0/proc/readproc.c
-@@ -162,7 +162,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;
-@@ -888,6 +888,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/patches/procps-3.2.8/30_tload_no_optargs.dpatch b/patches/procps-3.2.8/30_tload_no_optargs.dpatch
deleted file mode 100644
index 02f23cb2f..000000000
--- a/patches/procps-3.2.8/30_tload_no_optargs.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh -e
-## 30_tload_no_optargs.dpatch by Craig Small <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Removed unneeded optarg and optind variables form tload.c
-
-[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
-patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
-
-if [ $# -ne 1 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch $patch_opts -p1 < $0;;
- -unpatch) patch $patch_opts -p1 -R < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argum
-ent"
- exit 1;;
-esac
-
-exit 0
-@DPATCH@
---- procps-3.2.0.orig/tload.c
-+++ procps-3.2.0/tload.c
-@@ -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/patches/procps-3.2.8/30_w-columns.dpatch b/patches/procps-3.2.8/30_w-columns.dpatch
deleted file mode 100644
index 57c94aeda..000000000
--- a/patches/procps-3.2.8/30_w-columns.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_w-columns.dpatch by <csmall@localhost.localdomain>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: use COLUMNS environment if TIOCGWINSZ fails
-
-@DPATCH@
-diff -urNad --exclude=CVS --exclude=.svn ./w.c /tmp/dpep-work.0retPU/procps-3.2.6/w.c
---- ./w.c 2005-10-31 12:41:33.000000000 +1100
-+++ /tmp/dpep-work.0retPU/procps-3.2.6/w.c 2005-10-31 12:41:55.000000000 +1100
-@@ -231,10 +231,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;
-@@ -267,6 +267,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/patches/procps-3.2.8/45_proc_complain_unmounted_proc.dpatch b/patches/procps-3.2.8/45_proc_complain_unmounted_proc.dpatch
deleted file mode 100644
index c34e618b4..000000000
--- a/patches/procps-3.2.8/45_proc_complain_unmounted_proc.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 45_proc_complain_unmounted_proc.dpatch by <hesso@hesso.pool.math.tu-berlin.de>
-##
-## DP: Complain when /proc/version cannot be found instead of
-## DP: exiting silently.
-
-@DPATCH@
---- procps-3.2.7/proc/version.cO 2007-08-06 16:18:41.000000000 +0200
-+++ procps-3.2.7/proc/version.c 2007-08-06 16:19:28.000000000 +0200
-@@ -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/patches/procps-3.2.8/50_dev_null_makefile_fix.dpatch b/patches/procps-3.2.8/50_dev_null_makefile_fix.dpatch
deleted file mode 100644
index 7132b0f88..000000000
--- a/patches/procps-3.2.8/50_dev_null_makefile_fix.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## dev_null_makefile_fix.dpatch by <xaiki@gonzo>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Make sure Makefile doesnt zot random files while checking GCC
-
-@DPATCH@
-diff -urNad procps-3.2.6~/Makefile procps-3.2.6/Makefile
---- procps-3.2.6~/Makefile 2005-10-30 07:27:04.000000000 +0100
-+++ procps-3.2.6/Makefile 2005-12-20 02:57:41.000000000 +0100
-@@ -119,7 +119,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 will_this_file_really_exist.tmp $(CURSES) > /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/patches/procps-3.2.8/50_top_mintime.dpatch b/patches/procps-3.2.8/50_top_mintime.dpatch
deleted file mode 100644
index c38f889b8..000000000
--- a/patches/procps-3.2.8/50_top_mintime.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_top_mintime.dpatch by <csmall@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Checks minimum time is valid
-
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2007-10-04 21:58:56.000000000 +1000
-+++ procps-3.2.7/top.c 2007-10-04 21:59:24.000000000 +1000
-@@ -2535,7 +2535,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/patches/procps-3.2.8/55_pgrep_usage_exitcode.dpatch b/patches/procps-3.2.8/55_pgrep_usage_exitcode.dpatch
deleted file mode 100644
index c6dabb5d7..000000000
--- a/patches/procps-3.2.8/55_pgrep_usage_exitcode.dpatch
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 55_pgrep_usage_exitcode.dpatch by <hesso@pool.math.tu-berlin.de>
-##
-## DP: Distinguish between invalid commandline parameters and '-?'.
-
-@DPATCH@
---- procps-3.2.7.orig/pgrep.c 2007-08-06 16:35:30.000000000 +0200
-+++ procps-3.2.7/pgrep.c 2007-08-06 16:35:06.000000000 +0200
-@@ -678,7 +678,7 @@
- // case 'z': // Solaris: match by zone ID
- // break;
- case '?':
-- usage (opt);
-+ usage (optopt?optopt:opt);
- break;
- }
- }
diff --git a/patches/procps-3.2.8/60_top_nohz.dpatch b/patches/procps-3.2.8/60_top_nohz.dpatch
deleted file mode 100644
index 6b7390fdd..000000000
--- a/patches/procps-3.2.8/60_top_nohz.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 60_top_nohz.dpatch by <fabbione@sunfire.int.fabbione.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Handle idle time calculations correctly when running with NOHZ.
-
-@DPATCH@
-diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
---- procps-3.2.7~/top.c 2006-06-25 08:41:48.000000000 +0200
-+++ procps-3.2.7/top.c 2007-07-20 12:50:00.000000000 +0200
-@@ -2886,6 +2886,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/patches/procps-3.2.8/README b/patches/procps-3.2.8/README
deleted file mode 100644
index e2de56465..000000000
--- a/patches/procps-3.2.8/README
+++ /dev/null
@@ -1,8 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Subject: import patches from debian's procps
-
-this is basially the patches from:
-http://ftp.de.debian.org/debian/pool/main/p/procps/procps_3.2.8-1.diff.gz
-taken dpatch squeezed into quilt :)
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
diff --git a/patches/procps-3.2.8/fix-unknown-HZ-arm-diff b/patches/procps-3.2.8/fix-unknown-HZ-arm-diff
deleted file mode 100644
index 197fcea44..000000000
--- a/patches/procps-3.2.8/fix-unknown-HZ-arm-diff
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Subject: fix "Unknown HZ value! (94) Assume 100." on arm systems
-
-For more info, see:
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460331
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- proc/sysinfo.c | 2 +-
- proc/version.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-Index: procps-3.2.8/proc/sysinfo.c
-===================================================================
---- procps-3.2.8.orig/proc/sysinfo.c
-+++ procps-3.2.8/proc/sysinfo.c
-@@ -210,7 +210,7 @@ static int check_for_privs(void){
- return !!rc;
- }
-
--static void init_libproc(void) __attribute__((constructor));
-+static void init_libproc(void) __attribute__((constructor (40)));
- static void init_libproc(void){
- have_privs = check_for_privs();
- // ought to count CPUs in /proc/stat instead of relying
-Index: procps-3.2.8/proc/version.c
-===================================================================
---- procps-3.2.8.orig/proc/version.c
-+++ procps-3.2.8/proc/version.c
-@@ -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 (20)));
- static void init_Linux_version(void) {
- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
- FILE *fp;
diff --git a/patches/procps-3.2.8/remove-rename-registers.diff b/patches/procps-3.2.8/remove-rename-registers.diff
deleted file mode 100644
index a6c6e65a1..000000000
--- a/patches/procps-3.2.8/remove-rename-registers.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Subject: remove -frename-registers option, due to ICE on gcc-4.3.1
-
-remove the -frename-registers options, because they ICE on gcc-4.3.1
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: procps-3.2.7/Makefile
-===================================================================
---- procps-3.2.7.orig/Makefile
-+++ procps-3.2.7/Makefile
-@@ -141,7 +141,7 @@ ALL_CFLAGS += $(call check_gcc,-Wstrict-
- # if not debugging, enable things that could confuse gdb
- ifeq (,$(findstring -g,$(filter -g%,$(CFLAGS))))
- ALL_CFLAGS += $(call check_gcc,-fweb,)
--ALL_CFLAGS += $(call check_gcc,-frename-registers,)
-+#ALL_CFLAGS += $(call check_gcc,-frename-registers,)
- ALL_CFLAGS += $(call check_gcc,-fomit-frame-pointer,)
- endif
-
diff --git a/patches/procps-3.2.8/series b/patches/procps-3.2.8/series
index 62485c51b..1a4bde253 100644
--- a/patches/procps-3.2.8/series
+++ b/patches/procps-3.2.8/series
@@ -1,52 +1,70 @@
-10_free.1.dpatch
-10_output_sort_time.dpatch
-10_pmap.1.dpatch
-10_ps.1.dpatch
-10_skill.1.dpatch
-10_skill_perror.dpatch
-10_slabtop.dpatch
-10_sysctl.8.dpatch
-10_sysctl_options.dpatch
-10_tload.1.dpatch
-10_top_irix.dpatch
-10_top_no_openproc.dpatch
-10_top_stdineof.dpatch
-10_top_uid_length.dpatch
-10_uptime.1.dpatch
-10_vmstat.8.dpatch
-10_watch.1.dpatch
-10_w_time.dpatch
-20_kill.1.dpatch
-20_kill_warncr.dpatch
-20_Makefile_lib64.dpatch
-20_module_mk_shared.dpatch
-20_sysinfo_c.dpatch
-20_top_c_resize.dpatch
-20_top_manpage.dpatch
-20_watch_8bitchar.dpatch
-20_w-bassman.dpatch
-30_library_map_freeproc.dpatch
-30_pgrep_start_time.dpatch
-30_readproc_c.dpatch
-30_sysinfo_7numbers.dpatch
-30_tload_no_optargs.dpatch
-30_top.1_cpustate.dpatch
-30_w.1.dpatch
-30_watch_exec_beep.dpatch
-30_w-columns.dpatch
-35_path_max.dpatch
-40_gnu-kbsd-version.dpatch
-40_pgrep_coption.dpatch
-40_ps_cgroup_display.dpatch
-40_watch_precision_time.dpatch
-45_proc_complain_unmounted_proc.dpatch
-50_dev_null_makefile_fix.dpatch
-50_pgrep.1.dpatch
-50_top_mintime.dpatch
-50_vmstat_headers.dpatch
-55_pgrep_usage_exitcode.dpatch
-55_top_highlight.dpatch
-60_top_nohz.dpatch
-65_fix_partition_format.dpatch
-fix-unknown-HZ-arm-diff
-fix-install.diff
+0001-slabtop_once.patch
+0002-free.1.patch
+0003-output_sort_time.patch
+0004-pmap.1.patch
+0005-10_ps.1.patch
+0006-skill.1.patch
+0007-skill_perror.patch
+0008-slabtop_1.patch
+0009-sysctl.8.patch
+0010-sysctl_options.patch
+0011-tload.1.patch
+0012-top_irix.patch
+0013-top_no_openproc.patch
+0014-top_stdin_eof.patch
+0015-top_uid_length.patch
+0016-uptime.1.patch
+0017-vmstat.8.patch
+0018-watch.1.patch
+0019-w_time.patch
+0020-kill.1.patch
+0021-kill_warncr.patch
+0022-module_mk_shared.patch
+0023-sysinfo_elfnote.patch
+0024-top.1.patch
+0025-top_c_resize.patch
+0026-w-bassman.patch
+0027-top.1_cpustates.patch
+0028-watch_8bitchar.patch
+0029-library_map_freeproc.patch
+0030-pgrep_start_time.patch
+0031-readproc_c.patch
+0032-sysinfo_7_numbers.patch
+0033-tload_no_optargs.patch
+0034-w.1.patch
+0035-w_columns.patch
+0036-watch_exec_beep.patch
+0037-path_max.patch
+0038-w_envlength.patch
+0039-gnu-kbsd-version.patch
+0040-pgrep_c_option.patch
+0041-ps_cgroup_display.patch
+0042-watch_precision_time.patch
+0043-watch_unicode.patch
+0044-complain_unmounted_proc.patch
+0045-ps_supgid_display.patch
+0046-makefile_dev_null.patch
+0047-pgrep.1.patch
+0048-ps_size_sz.patch
+0049-top_mintime.patch
+0050-vmstat_headers.patch
+0051-pgrep_usage_exitcode.patch
+0052-ps_1_options.patch
+0053-top_highlight.patch
+0054-top_nohz.patch
+0055-vmstat_part_format.patch
+0056-readproc_double_free.patch
+0057-vmstat_units.patch
+0058-skill_null_argv.patch
+0059-skill_multiarg.patch
+0060-proc_version_constructor.patch
+0061-pmaps_smaps.patch
+0062-top_numeric_args.patch
+0063-top_1_swap.patch
+0064-w_userproc.patch
+0065-sysinfo_kfreebsd_hertz.patch
+0066-ps_1_flt_output.patch
+0067-watch_ansi_colour.patch
+0068-top_username_parse.patch
+0069-don-t-install-stuff-that-was-not-built.patch
+0070-remove-frename-registers-option-due-to-ICE-on-gcc-4..patch
diff --git a/patches/pure-ftpd-1.0.28/autogen.sh b/patches/pure-ftpd-1.0.28/autogen.sh
deleted file mode 120000
index 9f8a4cb7d..000000000
--- a/patches/pure-ftpd-1.0.28/autogen.sh
+++ /dev/null
@@ -1 +0,0 @@
-../autogen.sh \ No newline at end of file
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-getgroups-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-getgroups-cacheable.diff
deleted file mode 100644
index 9dbb58f06..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-getgroups-cacheable.diff
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for getgroups is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 17 +++++++++++------
-# 1 file changed, 11 insertions(+), 6 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -955,7 +955,9 @@ else
- fi
-
-
--AC_MSG_CHECKING(whether getgroups 0 is sane)
-+AC_CACHE_CHECK([whether getgroups 0 is sane],
-+ [ac_cv_safe_getgroups_0],
-+[
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #ifdef STDC_HEADERS
-@@ -974,11 +976,14 @@ int main(void)
- {
- return getgroups(0, NULL) <= 0;
- }
--]])],[
--AC_MSG_RESULT(yes)
--AC_DEFINE(SAFE_GETGROUPS_0,,[Define is getgroups(0, NULL) works on your system])
--],[AC_MSG_RESULT(no)
--],[AC_MSG_RESULT(suppose that it doesnt)])
-+]])],[ac_cv_safe_getgroups_0=yes
-+],[ac_cv_safe_getgroups_0=no
-+],[ac_cv_safe_getgroups_0=yes])
-+])
-+if test "x$ac_cv_safe_getgroups_0" = "xyes"
-+then
-+ AC_DEFINE(SAFE_GETGROUPS_0,,[Define is getgroups(0, NULL) works on your system])
-+fi
-
- AC_MSG_CHECKING(whether realpath likes unreadable directories)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-md5-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-md5-cacheable.diff
deleted file mode 100644
index c16ba49da..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-md5-cacheable.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for MD5 is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 17 +++++++++++------
-# 1 file changed, 11 insertions(+), 6 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -1051,7 +1051,9 @@ else
- AC_DEFINE(USE_BUILTIN_REALPATH)
- fi
-
--AC_MSG_CHECKING(whether you already have a standard MD5 implementation)
-+AC_CACHE_CHECK([whether you already have a standard MD5 implementation],
-+ [ac_cv_use_system_crypt_md5],
-+[
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #include <stdio.h>
-@@ -1071,12 +1073,15 @@ int main(void)
-
- return strcasecmp(b, "098f6bcd4621d373cade4e832627b4f6");
- }
--]])],[
--AC_MSG_RESULT(yes)
--AC_DEFINE(USE_SYSTEM_CRYPT_MD5,,[Define if you already have standard
-+]])],[ac_cv_use_system_crypt_md5=yes
-+],[ac_cv_use_system_crypt_md5=no
-+],[ac_cv_use_system_crypt_md5="no (cross compiling)"])
-+])
-+if test "x$ac_cv_use_system_crypt_md5" = xyes
-+then
-+ AC_DEFINE(USE_SYSTEM_CRYPT_MD5,,[Define if you already have standard
- MD5 functions])
--],[AC_MSG_RESULT(no)
--],[AC_MSG_RESULT(assuming no)])
-+fi
-
- AC_MSG_CHECKING(whether you already have a standard SHA1 implementation)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-realpath-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-realpath-cacheable.diff
deleted file mode 100644
index b17ec7aa1..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-realpath-cacheable.diff
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for realpath is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 22 +++++++++++++---------
-# 1 file changed, 13 insertions(+), 9 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -985,7 +985,9 @@ then
- AC_DEFINE(SAFE_GETGROUPS_0,,[Define is getgroups(0, NULL) works on your system])
- fi
-
--AC_MSG_CHECKING(whether realpath likes unreadable directories)
-+AC_CACHE_CHECK([whether realpath likes unreadable directories],
-+ [ac_cv_realpath_works_with_unreadable_directories],
-+[
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #ifdef STDC_HEADERS
-@@ -1038,14 +1040,16 @@ int main(void)
-
- return 0;
- }
--]])],[
--AC_MSG_RESULT(yes)
--AC_DEFINE(REALPATH_WORKS_WITH_UNREADABLE_DIRECTORIES,,
--[Define if realpath() works on unreadable directories])
--],[AC_MSG_RESULT(no)
--AC_DEFINE(USE_BUILTIN_REALPATH)
--],[AC_MSG_RESULT(no)
--AC_DEFINE(USE_BUILTIN_REALPATH)])
-+]])],[ac_cv_realpath_works_with_unreadable_directories=yes
-+],[ac_cv_realpath_works_with_unreadable_directories=no
-+],[ac_cv_realpath_works_with_unreadable_directories=yes])
-+])
-+if test "x$ac_cv_realpath_works_with_unreadable_directories" = "xyes"
-+then
-+ AC_DEFINE(REALPATH_WORKS_WITH_UNREADABLE_DIRECTORIES,,[Define if realpath() works on unreadable directories])
-+else
-+ AC_DEFINE(USE_BUILTIN_REALPATH)
-+fi
-
- AC_MSG_CHECKING(whether you already have a standard MD5 implementation)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-remove-includes.diff b/patches/pure-ftpd-1.0.28/configure_ac-remove-includes.diff
deleted file mode 100644
index 49dddf68f..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-remove-includes.diff
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# inclusion of hosts dirs is not desired if cross compiling
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 16 +++++++++++-----
-# 1 file changed, 11 insertions(+), 5 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -29,6 +29,7 @@ AC_ARG_VAR(PYTHON,local path to the pyth
- python_possible_path="/usr/bin:/usr/local/bin:/bin:/opt/python/bin:/opt/python/usr/bin:/opt/python/usr/local/bin"
- AC_PATH_PROG(PYTHON,python,/usr/bin/env python,$python_possible_path)
-
-+if test "$cross_compiling" != yes; then
- if test -d /usr/local/include; then
- CPPFLAGS="$CPPFLAGS -I/usr/local/include"
- fi
-@@ -44,6 +45,7 @@ fi
- if uname | fgrep SunOS > /dev/null 2> /dev/null ; then
- CPPFLAGS="$CPPFLAGS -D_XPG4_2=1"
- fi
-+fi
-
- dnl Checks for header files
-
-@@ -1196,8 +1198,10 @@ AC_ARG_WITH(mysql,
- LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
- CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
- else
-- CFLAGS="$CFLAGS `mysql_config --cflags`"
-- LDFLAGS="$LDFLAGS `mysql_config --libs`"
-+ if test "$cross_compiling" != yes; then
-+ CFLAGS="$CFLAGS `mysql_config --cflags`"
-+ LDFLAGS="$LDFLAGS `mysql_config --libs`"
-+ fi
- fi
- AC_CHECK_LIB(m, floor)
- AC_CHECK_LIB(z, gzclose)
-@@ -1230,9 +1234,11 @@ AC_ARG_WITH(pgsql,
- LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/pgsql -L${withval}/lib/postgresql -L${withval}/pgsql/lib -L${withval}/postgresql/lib"
- CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/pgsql -I${withval}/include/postgresql -I${withval}/pgsql/include -I${withval}/postgresql/include"
- else
-- LD_RUN_PATH="`pg_config --libdir`${LD_RUN_PATH:+:}${LD_RUN_PATH}"
-- CPPFLAGS="$CPPFLAGS -I`pg_config --includedir`"
-- LDFLAGS="$LDFLAGS -L`pg_config --libdir`"
-+ if test "$cross_compiling" != yes; then
-+ LD_RUN_PATH="`pg_config --libdir`${LD_RUN_PATH:+:}${LD_RUN_PATH}"
-+ CPPFLAGS="$CPPFLAGS -I`pg_config --includedir`"
-+ LDFLAGS="$LDFLAGS -L`pg_config --libdir`"
-+ fi
- fi
- AC_CHECK_LIB(m, floor)
- AC_CHECK_LIB(z, gzclose)
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-sha1-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-sha1-cacheable.diff
deleted file mode 100644
index 1fe9a0806..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-sha1-cacheable.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for SHA1 is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 17 +++++++++++------
-# 1 file changed, 11 insertions(+), 6 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -1083,7 +1083,9 @@ then
- MD5 functions])
- fi
-
--AC_MSG_CHECKING(whether you already have a standard SHA1 implementation)
-+AC_CACHE_CHECK([whether you already have a standard SHA1 implementation],
-+ [ac_cv_use_system_crypt_sha1],
-+[
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #include <string.h>
-@@ -1102,12 +1104,15 @@ int main(void)
-
- return strcasecmp(b, "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3");
- }
--]])],[
--AC_MSG_RESULT(yes)
--AC_DEFINE(USE_SYSTEM_CRYPT_SHA1,,[Define if you already have standard
-+]])],[ac_cv_use_system_crypt_sha1=yes
-+],[ac_cv_use_system_crypt_sha1=no
-+],[ac_cv_use_system_crypt_sha1="no (cross compiling)"])
-+])
-+if test "x$ac_cv_use_system_crypt_sha1" = "xyes"
-+then
-+ AC_DEFINE(USE_SYSTEM_CRYPT_SHA1,,[Define if you already have standard
- SHA1 functions])
--],[AC_MSG_RESULT(no)
--],[AC_MSG_RESULT(assuming no)])
-+fi
-
- AC_MSG_CHECKING([whether we are inside a Virtuozzo virtual host])
- if test -d /proc/vz; then
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-snprintf-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-snprintf-cacheable.diff
deleted file mode 100644
index b1996a3c7..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-snprintf-cacheable.diff
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for snprintf is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 14 ++++++++------
-# 1 file changed, 8 insertions(+), 6 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -920,7 +920,9 @@ for (;;) {
- AC_MSG_RESULT(no)
- ])
-
--AC_MSG_CHECKING(whether snprintf is C99 conformant)
-+AC_CACHE_CHECK([whether snprintf is C99 conformant],
-+ [ac_cv_conf_snprintf_type],
-+[
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #ifdef STDC_HEADERS
-@@ -943,13 +945,13 @@ int main(void)
- (int) snprintf(buf, sizeof buf, "12345678"));
- return 0;
- }
--]])],[CONF_SNPRINTF_TYPE=`cat conftestval`
--],[],[CONF_SNPRINTF_TYPE=8])
--AC_MSG_RESULT(done)
--if test "x$CONF_SNPRINTF_TYPE" = "x" ; then
-+]])],[ac_cv_conf_snprintf_type=`cat conftestval`
-+],[],[ac_cv_conf_snprintf_type=8])
-+])
-+if test "x$ac_cv_conf_snprintf_type" = "x" ; then
- AC_MSG_WARN(your operating system doesn't implement snprintf)
- else
-- AC_DEFINE_UNQUOTED(CONF_SNPRINTF_TYPE, $CONF_SNPRINTF_TYPE, [return value of an overflowed snprintf])
-+ AC_DEFINE_UNQUOTED(CONF_SNPRINTF_TYPE, $ac_cv_conf_snprintf_type, [return value of an overflowed snprintf])
- fi
-
-
diff --git a/patches/pure-ftpd-1.0.28/configure_ac-virtuozzo-cacheable.diff b/patches/pure-ftpd-1.0.28/configure_ac-virtuozzo-cacheable.diff
deleted file mode 100644
index 1e84b51f1..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac-virtuozzo-cacheable.diff
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Committed-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2006-11-29
-#
-# Error:
-#
-# check for Virtuozzo is not cross aware, make it cacheable and added cross default value
-#
-# State:
-#
-# should be commited
-#
----
-# configure.ac | 14 ++++++++++----
-# 1 file changed, 10 insertions(+), 4 deletions(-)
-#
-Index: pure-ftpd-1.0.28/configure.ac
-===================================================================
---- pure-ftpd-1.0.28.orig/configure.ac
-+++ pure-ftpd-1.0.28/configure.ac
-@@ -1114,13 +1114,19 @@ then
- SHA1 functions])
- fi
-
--AC_MSG_CHECKING([whether we are inside a Virtuozzo virtual host])
-+AC_CACHE_CHECK([whether we are inside a Virtuozzo virtual host],
-+ [ac_cv_virtuozzo],
-+[
- if test -d /proc/vz; then
-- AC_MSG_RESULT(yes)
-+ ac_cv_virtuozzo=yes
-+else
-+ ac_cv_virtuozzo=no
-+fi
-+])
-+if test "x$ac_cv_virtuozzo" = xyes
-+then
- AC_DEFINE(VIRTUOZZO,,[Define if you are inside a Virtuozzo virtual
- host])
--else
-- AC_MSG_RESULT(no)
- fi
-
- AC_MSG_CHECKING(default TCP send buffer size)
diff --git a/patches/pure-ftpd-1.0.28/configure_ac_remove-fssa.diff b/patches/pure-ftpd-1.0.28/configure_ac_remove-fssa.diff
deleted file mode 100644
index ed7727f61..000000000
--- a/patches/pure-ftpd-1.0.28/configure_ac_remove-fssa.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Submitted:
-#
-# Sascha Hauer <s.hauer@pengutronix.de>, 2005-08-31
-#
-# This patch sets some defaults for cross compiling and
-# removes the -fssa switch from CFLAGS, because man gcc says
-# that this option is not ready for production use and it
-# produces internal compiler errrors here
-#
-# unknown
-#
-Index: pure-ftpd-1.0.21/configure.ac
-===================================================================
---- pure-ftpd-1.0.21.orig/configure.ac
-+++ pure-ftpd-1.0.21/configure.ac
-@@ -361,7 +361,7 @@ AC_ARG_WITH(minimal,
- AC_DEFINE(WITHOUT_ASCII)
- AC_DEFINE(NO_BANNER)
- AC_DEFINE(BORING_MODE)
-- CFLAGS="$CFLAGS -Os -ftracer -fomit-frame-pointer -fssa -fgcse -falign-functions=2 -falign-jumps=2 -fno-unroll-loops "
-+ CFLAGS="$CFLAGS -Os -ftracer -fomit-frame-pointer -fgcse -falign-functions=2 -falign-jumps=2 -fno-unroll-loops "
- LDFLAGS="$LDFLAGS -s "
- fi ])
-
diff --git a/patches/pure-ftpd-1.0.28/series b/patches/pure-ftpd-1.0.28/series
deleted file mode 100644
index 43ab249e7..000000000
--- a/patches/pure-ftpd-1.0.28/series
+++ /dev/null
@@ -1,8 +0,0 @@
-#configure_ac_remove-fssa.diff
-configure_ac-remove-includes.diff
-configure_ac-snprintf-cacheable.diff
-configure_ac-getgroups-cacheable.diff
-configure_ac-realpath-cacheable.diff
-configure_ac-md5-cacheable.diff
-configure_ac-sha1-cacheable.diff
-configure_ac-virtuozzo-cacheable.diff
diff --git a/patches/qt-embedded-linux-opensource-src-4.5.3/fix-host-zlib.diff b/patches/qt-embedded-linux-opensource-src-4.5.3/fix-host-zlib.diff
new file mode 100644
index 000000000..eec941ed5
--- /dev/null
+++ b/patches/qt-embedded-linux-opensource-src-4.5.3/fix-host-zlib.diff
@@ -0,0 +1,35 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Subject: fix bootstrap during cross compilation if host lacks zlib
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ src/tools/bootstrap/bootstrap.pri | 2 +-
+ src/tools/bootstrap/bootstrap.pro | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: b/src/tools/bootstrap/bootstrap.pro
+===================================================================
+--- a/src/tools/bootstrap/bootstrap.pro
++++ b/src/tools/bootstrap/bootstrap.pro
+@@ -95,7 +95,7 @@ macx: {
+ LIBS += -framework CoreServices
+ }
+
+-contains(QT_CONFIG, zlib) {
++contains(QT_CONFIG, zlib)|cross_compile {
+ INCLUDEPATH += ../../3rdparty/zlib
+ SOURCES+= \
+ ../3rdparty/zlib/adler32.c \
+Index: b/src/tools/bootstrap/bootstrap.pri
+===================================================================
+--- a/src/tools/bootstrap/bootstrap.pri
++++ b/src/tools/bootstrap/bootstrap.pri
+@@ -51,7 +51,7 @@ hpux-acc*|hpuxi-acc* {
+ }
+ LIBS += -lbootstrap
+ }
+-!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
++!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile {
+ unix:LIBS += -lz
+ # win32:LIBS += libz.lib
+ }
diff --git a/patches/qt-embedded-linux-opensource-src-4.5.3/series b/patches/qt-embedded-linux-opensource-src-4.5.3/series
index c1ae829cd..007d1090e 100644
--- a/patches/qt-embedded-linux-opensource-src-4.5.3/series
+++ b/patches/qt-embedded-linux-opensource-src-4.5.3/series
@@ -9,3 +9,4 @@ hide-cursor-at-startup.diff
# dependency with ptxdist.
#script-qtdbus.diff
#designer-script.diff
+fix-host-zlib.diff
diff --git a/patches/squashfs3.4/series b/patches/squashfs3.4/series
new file mode 100644
index 000000000..de458cdb8
--- /dev/null
+++ b/patches/squashfs3.4/series
@@ -0,0 +1 @@
+squashfs_libs.diff
diff --git a/patches/squashfs3.4/squashfs_libs.diff b/patches/squashfs3.4/squashfs_libs.diff
new file mode 100644
index 000000000..962c8ef1f
--- /dev/null
+++ b/patches/squashfs3.4/squashfs_libs.diff
@@ -0,0 +1,34 @@
+Subject: Add way to change linker settings
+From: Erwin Rol <erwin@erwinrol.com>
+
+When cross compiling the linker can not find libz, this patch
+adds a LIBS variable that makes it possible to pass the right
+linker flags.
+
+Signed-off-by: Erwin Rol <erwin@erwinrol.com>
+
+--- squashfs3.4/squashfs-tools/Makefile.orig 2010-02-27 00:01:56.000000000 +0100
++++ squashfs3.4/squashfs-tools/Makefile 2010-02-27 00:02:46.000000000 +0100
+@@ -4,10 +4,12 @@
+
+ CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
+
++LIBS := -lz -lpthread -lm
++
+ all: mksquashfs unsquashfs
+
+ mksquashfs: mksquashfs.o read_fs.o sort.o
+- $(CC) mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o $@
++ $(CC) mksquashfs.o read_fs.o sort.o $(LIBS) $(LDFLAGS)-o $@
+
+ mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h
+
+@@ -16,7 +18,7 @@
+ sort.o: sort.c squashfs_fs.h global.h sort.h
+
+ unsquashfs: unsquashfs.o
+- $(CC) unsquashfs.o -lz -lpthread -lm -o $@
++ $(CC) unsquashfs.o $(LIBS) $(LDFLAGS)-o $@
+
+ unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h
+
diff --git a/patches/squashfs4.0/series b/patches/squashfs4.0/series
new file mode 100644
index 000000000..de458cdb8
--- /dev/null
+++ b/patches/squashfs4.0/series
@@ -0,0 +1 @@
+squashfs_libs.diff
diff --git a/patches/squashfs4.0/squashfs_libs.diff b/patches/squashfs4.0/squashfs_libs.diff
new file mode 100644
index 000000000..541d49d77
--- /dev/null
+++ b/patches/squashfs4.0/squashfs_libs.diff
@@ -0,0 +1,34 @@
+Subject: Add way to change linker settings
+From: Erwin Rol <erwin@erwinrol.com>
+
+When cross compiling the linker can not find libz, this patch
+adds a LIBS variable that makes it possible to pass the right
+linker flags.
+
+Signed-off-by: Erwin Rol <erwin@erwinrol.com>
+
+--- squashfs4.0/squashfs-tools/Makefile.orig 2010-02-26 13:25:30.000000000 +0100
++++ squashfs4.0/squashfs-tools/Makefile 2010-02-26 13:26:31.000000000 +0100
+@@ -4,10 +4,12 @@
+
+ CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
+
++LIBS := -lz -lpthread -lm
++
+ all: mksquashfs unsquashfs
+
+ mksquashfs: mksquashfs.o read_fs.o sort.o swap.o pseudo.o
+- $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o -lz -lpthread -lm -o $@
++ $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o $(LIBS) $(LDFLAGS) -o $@
+
+ mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h squashfs_swap.h Makefile
+
+@@ -20,7 +22,7 @@
+ pseudo.o: pseudo.c pseudo.h Makefile
+
+ unsquashfs: unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o
+- $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o -lz -lpthread -lm -o $@
++ $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o $(LIBS) $(LDFLAGS) -o $@
+
+ unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h Makefile
+
diff --git a/patches/sudo-1.6.9/0001-install-sh-disable-stripping.patch b/patches/sudo-1.7.2p6/0001-install-sh-disable-stripping.patch
index c8421a5a2..c8421a5a2 100644
--- a/patches/sudo-1.6.9/0001-install-sh-disable-stripping.patch
+++ b/patches/sudo-1.7.2p6/0001-install-sh-disable-stripping.patch
diff --git a/patches/sudo-1.6.9/series b/patches/sudo-1.7.2p6/series
index fab226119..fab226119 100644
--- a/patches/sudo-1.6.9/series
+++ b/patches/sudo-1.7.2p6/series
diff --git a/patches/syslinux-3.84/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch b/patches/syslinux-3.86/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch
index f1c59c770..1e36c592d 100644
--- a/patches/syslinux-3.84/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch
+++ b/patches/syslinux-3.86/0001-Makefile-don-t-fail-during-make-install-on-non-mingw.patch
@@ -17,21 +17,18 @@ http://syslinux.zytor.com/archives/2010-January/013669.html
---
Makefile | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile b/Makefile
-index d0f5e71..f429e8c 100644
+Index: b/Makefile
+===================================================================
--- a/Makefile
+++ b/Makefile
-@@ -67,7 +67,7 @@ INSTALL_SBIN = extlinux/extlinux
+@@ -68,7 +68,7 @@ INSTALL_SBIN = extlinux/extlinux
# Things to install in /usr/lib/syslinux
INSTALL_AUX = core/pxelinux.0 gpxe/gpxelinux.0 core/isolinux.bin \
core/isolinux-debug.bin \
-- dos/syslinux.com dos/copybs.com win32/syslinux.exe \
-+ dos/syslinux.com dos/copybs.com \
+- dos/syslinux.com win32/syslinux.exe \
++ dos/syslinux.com \
mbr/*.bin $(MODULES)
INSTALL_AUX_OPT = win32/syslinux.exe
---
-1.6.6
-
diff --git a/patches/syslinux-3.84/series b/patches/syslinux-3.86/series
index b813fb86d..b813fb86d 100644
--- a/patches/syslinux-3.84/series
+++ b/patches/syslinux-3.86/series
diff --git a/patches/tcp_wrappers_7.6/series b/patches/tcp_wrappers_7.6/series
new file mode 100644
index 000000000..a1196b028
--- /dev/null
+++ b/patches/tcp_wrappers_7.6/series
@@ -0,0 +1,2 @@
+tcp_wrappers_7.6-ptx1.diff
+tcp_wrappers-7.6-gcc34-1.patch
diff --git a/patches/tcp_wrappers_7.6/tcp_wrappers-7.6-gcc34-1.patch b/patches/tcp_wrappers_7.6/tcp_wrappers-7.6-gcc34-1.patch
index 4c897157d..52b1e1777 100644
--- a/patches/tcp_wrappers_7.6/tcp_wrappers-7.6-gcc34-1.patch
+++ b/patches/tcp_wrappers_7.6/tcp_wrappers-7.6-gcc34-1.patch
@@ -13,13 +13,19 @@ Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
-diff -aur tcp_wrappers_7.6/scaffold.c tcp_wrappers_7.6-new/scaffold.c
---- tcp_wrappers_7.6/scaffold.c 1997-03-21 10:27:24.000000000 -0800
-+++ tcp_wrappers_7.6-new/scaffold.c 2004-04-10 14:11:01.653193120 -0700
-@@ -25,7 +25,6 @@
+---
+ scaffold.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+Index: tcp_wrappers_7.6/scaffold.c
+===================================================================
+--- tcp_wrappers_7.6.orig/scaffold.c
++++ tcp_wrappers_7.6/scaffold.c
+@@ -25,7 +25,6 @@ static char sccs_id[] = "@(#) scaffold.c
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
#endif
-extern char *malloc();
/* Application-specific. */
+
diff --git a/patches/tcp_wrappers_7.6/tcp_wrappers_7.6-ptx1.diff b/patches/tcp_wrappers_7.6/tcp_wrappers_7.6-ptx1.diff
index ca698cd4a..41b499990 100644
--- a/patches/tcp_wrappers_7.6/tcp_wrappers_7.6-ptx1.diff
+++ b/patches/tcp_wrappers_7.6/tcp_wrappers_7.6-ptx1.diff
@@ -1,7 +1,13 @@
-diff -urN /home/robert/embedded/ptxdist-0.3.20pre/build/tcp_wrappers_7.6/Makefile tcp_wrappers_7.6/Makefile
---- /home/robert/embedded/ptxdist-0.3.20pre/build/tcp_wrappers_7.6/Makefile 1997-03-21 19:27:21.000000000 +0100
-+++ tcp_wrappers_7.6/Makefile 2003-02-04 16:18:35.000000000 +0100
-@@ -44,7 +44,7 @@
+---
+ Makefile | 2 +-
+ percent_m.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile
++++ tcp_wrappers_7.6/Makefile
+@@ -44,7 +44,7 @@ what:
#REAL_DAEMON_DIR=/usr/etc
#
# SysV.4 Solaris 2.x OSF AIX
@@ -10,10 +16,11 @@ diff -urN /home/robert/embedded/ptxdist-0.3.20pre/build/tcp_wrappers_7.6/Makefil
#
# BSD 4.4
#REAL_DAEMON_DIR=/usr/libexec
-diff -urN /home/robert/embedded/ptxdist-0.3.20pre/build/tcp_wrappers_7.6/percent_m.c tcp_wrappers_7.6/percent_m.c
---- /home/robert/embedded/ptxdist-0.3.20pre/build/tcp_wrappers_7.6/percent_m.c 1994-12-28 17:42:37.000000000 +0100
-+++ tcp_wrappers_7.6/percent_m.c 2003-02-04 16:20:11.000000000 +0100
-@@ -14,7 +14,7 @@
+Index: tcp_wrappers_7.6/percent_m.c
+===================================================================
+--- tcp_wrappers_7.6.orig/percent_m.c
++++ tcp_wrappers_7.6/percent_m.c
+@@ -14,7 +14,7 @@ static char sccsid[] = "@(#) percent_m.c
extern int errno;
#ifndef SYS_ERRLIST_DEFINED
diff --git a/patches/tcpdump-4.0.0/0001-Propagate-from-the-git-tree.patch b/patches/tcpdump-4.0.0/0001-Propagate-from-the-git-tree.patch
deleted file mode 100644
index 117182e1f..000000000
--- a/patches/tcpdump-4.0.0/0001-Propagate-from-the-git-tree.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 08293a774d3dc5e81a8bbd8265299f5ee6e27ede Mon Sep 17 00:00:00 2001
-From: guy <guy>
-Date: Tue, 18 Nov 2008 07:35:32 +0000
-Subject: [PATCH] Propagate from the git tree:
-
-Author: Peter Volkov <pva@gentoo.org>
-Date: Fri Nov 7 13:23:26 2008 -0500
-
- tcpdump-4.0.0 fails to build with --disable-ipv6. Patch to fix the issue
- is in attachment.
-
-ported from tcpdump git-upstream
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
----
- print-enc.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: tcpdump-4.0.0/print-enc.c
-===================================================================
---- tcpdump-4.0.0.orig/print-enc.c
-+++ tcpdump-4.0.0/print-enc.c
-@@ -77,9 +77,11 @@ enc_if_print(const struct pcap_pkthdr *h
- case AF_INET:
- ip_print(gndo, p, length);
- break;
-+#ifdef INET6
- case AF_INET6:
- ip6_print(p, length);
- break;
-+#endif /*INET6*/
- }
-
- out:
diff --git a/patches/tcpdump-4.0.0/series b/patches/tcpdump-4.0.0/series
deleted file mode 100644
index 38b3cd3d4..000000000
--- a/patches/tcpdump-4.0.0/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-Propagate-from-the-git-tree.patch
diff --git a/patches/udev-150/0001-Use-utimensat-instead-of-utimes-and-lutimes.patch b/patches/udev-150/0001-Use-utimensat-instead-of-utimes-and-lutimes.patch
new file mode 100644
index 000000000..8c5ad23e2
--- /dev/null
+++ b/patches/udev-150/0001-Use-utimensat-instead-of-utimes-and-lutimes.patch
@@ -0,0 +1,35 @@
+From 0f76fd4a8f57c474c4fbac0d9d725ec135f4b0ac Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Wed, 10 Mar 2010 10:15:20 -0500
+Subject: [PATCH] Use utimensat instead of utimes and lutimes
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ udev/udev-node.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/udev/udev-node.c b/udev/udev-node.c
+index c80a74c..f38a8f8 100644
+--- a/udev/udev-node.c
++++ b/udev/udev-node.c
+@@ -57,7 +57,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod
+ preserve = 1;
+ udev_selinux_lsetfilecon(udev, file, mode);
+ /* update time stamp when we re-use the node, like on media change events */
+- utimes(file, NULL);
++ utimensat(AT_FDCWD, file, NULL, 0);
+ } else {
+ char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)];
+
+@@ -178,7 +178,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink)
+ info(udev, "preserve already existing symlink '%s' to '%s'\n",
+ slink, target);
+ udev_selinux_lsetfilecon(udev, slink, S_IFLNK);
+- lutimes(slink, NULL);
++ utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW);
+ goto exit;
+ }
+ }
+--
+1.7.0.2.182.ge007
+
diff --git a/patches/udev-150/series b/patches/udev-150/series
index aea07abe0..fa53e88ff 100644
--- a/patches/udev-150/series
+++ b/patches/udev-150/series
@@ -4,3 +4,4 @@ udev-150-revert-bsg_h-removal.diff
udev-150-remove-le16toh.diff
udev-150-fix-ppc-build.diff
udev-150-kernel-headers-dir.diff
+0001-Use-utimensat-instead-of-utimes-and-lutimes.patch
diff --git a/patches/udev-150/udev-150-split-extras.diff b/patches/udev-150/udev-150-split-extras.diff
index de1dff0ae..abc162d21 100644
--- a/patches/udev-150/udev-150-split-extras.diff
+++ b/patches/udev-150/udev-150-split-extras.diff
@@ -17,9 +17,9 @@ as configure options
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
- Makefile.am | 25 +++++++++++++++++++++----
- configure.ac | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
- 2 files changed, 69 insertions(+), 15 deletions(-)
+ Makefile.am | 25 +++++++++++++++++----
+ configure.ac | 69 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 2 files changed, 78 insertions(+), 16 deletions(-)
Index: b/Makefile.am
===================================================================
@@ -131,7 +131,7 @@ Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -46,32 +46,70 @@ if test "x$enable_logging" = "xyes"; the
+@@ -46,32 +46,72 @@ if test "x$enable_logging" = "xyes"; the
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
fi
@@ -198,6 +198,8 @@ Index: b/configure.ac
+if test "x$enable_usbdb" = xyes; then
PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
++else
++ USB_DATABASE=no
+fi
- AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
@@ -212,11 +214,27 @@ Index: b/configure.ac
AC_ARG_WITH(pci-ids-path,
AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
[PCI_DATABASE=${withval}],
-@@ -82,7 +120,6 @@ if test "x$enable_extras" = xyes; then
+@@ -81,8 +121,9 @@ if test "x$enable_extras" = xyes; then
+ AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
fi])
AC_SUBST(PCI_DATABASE)
++else
++ PCI_DATABASE=no
fi
-AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
AC_ARG_ENABLE([introspection],
AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
+@@ -134,7 +175,11 @@ AC_MSG_RESULT([
+ cflags: ${CFLAGS}
+ ldflags: ${LDFLAGS}
+
+- extras: ${enable_extras}
++ gudev: ${enable_gudev}
++ bluetooth: ${enable_bluetooth}
++ keymap: ${enable_keymap}
++ acl: ${enable_acl}
++ modem-modeswitch: ${enable_modem_modeswitch}
+ gintrospection: ${enable_introspection}
+
+ usb.ids: ${USB_DATABASE}
diff --git a/patches/dbus-1.2.16/autogen.sh b/patches/udisks-1.0.0/autogen.sh
index 9f8a4cb7d..9f8a4cb7d 120000
--- a/patches/dbus-1.2.16/autogen.sh
+++ b/patches/udisks-1.0.0/autogen.sh
diff --git a/patches/udisks-1.0.0/devmapper-optional.diff b/patches/udisks-1.0.0/devmapper-optional.diff
new file mode 100644
index 000000000..3a7a3368b
--- /dev/null
+++ b/patches/udisks-1.0.0/devmapper-optional.diff
@@ -0,0 +1,58 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: make devmapper dependency optional
+
+This patch adds a configure option for devmapper.
+When disabled, the helper program using it will not be built.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ configure.ac | 11 ++++++++---
+ src/probers/Makefile.am | 5 ++++-
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -173,9 +173,14 @@ if test "x$enable_libparted" = xyes; the
+ fi
+ AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes)
+
+-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
+-AC_SUBST(DEVMAPPER_CFLAGS)
+-AC_SUBST(DEVMAPPER_LIBS)
++AC_ARG_ENABLE(devmapper,[ --disable-devmapper],enable_devmapper=$enableval,enable_devmapper=yes)
++
++if test "x$enable_devmapper" = xyes; then
++ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
++ AC_SUBST(DEVMAPPER_CFLAGS)
++ AC_SUBST(DEVMAPPER_LIBS)
++fi
++AM_CONDITIONAL(DEVMAPPER_ENABLED, test "x$enable_devmapper" = xyes)
+
+ have_lvm2=no
+ AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support]))
+Index: b/src/probers/Makefile.am
+===================================================================
+--- a/src/probers/Makefile.am
++++ b/src/probers/Makefile.am
+@@ -22,7 +22,6 @@ INCLUDES = \
+
+ udevhelperdir = $(slashlibdir)/udev
+ udevhelper_PROGRAMS = \
+- udisks-dm-export \
+ udisks-probe-ata-smart \
+ udisks-probe-sas-expander \
+ $(NULL)
+@@ -31,6 +30,10 @@ if LIBPARTED_ENABLED
+ udevhelper_PROGRAMS += udisks-part-id
+ endif
+
++if DEVMAPPER_ENABLED
++udevhelper_PROGRAMS += udisks-dm-export
++endif
++
+ if HAVE_LVM2
+ udevhelper_PROGRAMS += udisks-lvm-pv-export
+ endif
diff --git a/patches/udisks-1.0.0/libparted-optional.diff b/patches/udisks-1.0.0/libparted-optional.diff
new file mode 100644
index 000000000..e5027ccf1
--- /dev/null
+++ b/patches/udisks-1.0.0/libparted-optional.diff
@@ -0,0 +1,90 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: make libparted dependency optional
+
+This patch adds a configure option for libparted.
+When disabled, the helper programs using it will not be built.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ configure.ac | 11 ++++++++---
+ src/helpers/Makefile.am | 13 +++++++++----
+ src/probers/Makefile.am | 6 +++++-
+ 3 files changed, 22 insertions(+), 8 deletions(-)
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -164,9 +164,14 @@ PKG_CHECK_MODULES(POLKIT_BACKEND_1, [pol
+ AC_SUBST(POLKIT_BACKEND_1_CFLAGS)
+ AC_SUBST(POLKIT_BACKEND_1_LIBS)
+
+-PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8])
+-AC_SUBST(LIBPARTED_CFLAGS)
+-AC_SUBST(LIBPARTED_LIBS)
++AC_ARG_ENABLE(libparted,[ --disable-libparted],enable_libparted=$enableval,enable_libparted=yes)
++
++if test "x$enable_libparted" = xyes; then
++ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8])
++ AC_SUBST(LIBPARTED_CFLAGS)
++ AC_SUBST(LIBPARTED_LIBS)
++fi
++AM_CONDITIONAL(LIBPARTED_ENABLED, test "x$enable_libparted" = xyes)
+
+ PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
+ AC_SUBST(DEVMAPPER_CFLAGS)
+Index: b/src/helpers/Makefile.am
+===================================================================
+--- a/src/helpers/Makefile.am
++++ b/src/helpers/Makefile.am
+@@ -19,10 +19,6 @@ INCLUDES = \
+
+ libexec_PROGRAMS = \
+ udisks-helper-mkfs \
+- udisks-helper-delete-partition \
+- udisks-helper-create-partition \
+- udisks-helper-modify-partition \
+- udisks-helper-create-partition-table \
+ udisks-helper-change-filesystem-label \
+ udisks-helper-linux-md-remove-component \
+ udisks-helper-fstab-mounter \
+@@ -37,7 +33,16 @@ if SGUTILS2_ENABLED
+ libexec_PROGRAMS += udisks-helper-drive-detach
+ endif
+
++if LIBPARTED_ENABLED
++libexec_PROGRAMS += \
++ udisks-helper-delete-partition \
++ udisks-helper-create-partition \
++ udisks-helper-modify-partition \
++ udisks-helper-create-partition-table \
++ $(NULL)
++
+ noinst_LTLIBRARIES = libpartutil.la
++endif
+ libpartutil_la_SOURCES = partutil.h partutil.c
+ libpartutil_la_CPPFLAGS = $(LIBPARTED_CFLAGS)
+ libpartutil_la_LIBADD = $(LIBPARTED_LIBS)
+Index: b/src/probers/Makefile.am
+===================================================================
+--- a/src/probers/Makefile.am
++++ b/src/probers/Makefile.am
+@@ -21,12 +21,16 @@ INCLUDES = \
+ #
+
+ udevhelperdir = $(slashlibdir)/udev
+-udevhelper_PROGRAMS = udisks-part-id \
++udevhelper_PROGRAMS = \
+ udisks-dm-export \
+ udisks-probe-ata-smart \
+ udisks-probe-sas-expander \
+ $(NULL)
+
++if LIBPARTED_ENABLED
++udevhelper_PROGRAMS += udisks-part-id
++endif
++
+ if HAVE_LVM2
+ udevhelper_PROGRAMS += udisks-lvm-pv-export
+ endif
diff --git a/patches/udisks-1.0.0/libsgutils-optional.diff b/patches/udisks-1.0.0/libsgutils-optional.diff
new file mode 100644
index 000000000..75ee41080
--- /dev/null
+++ b/patches/udisks-1.0.0/libsgutils-optional.diff
@@ -0,0 +1,68 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: make sgutils2 dependency optional
+
+This patch adds a configure option for sgutils2.
+When disabled, the helper program using it will not be built.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ configure.ac | 23 ++++++++++++++---------
+ src/helpers/Makefile.am | 5 ++++-
+ 2 files changed, 18 insertions(+), 10 deletions(-)
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -120,15 +120,20 @@ if test "x$GCC" = "xyes"; then
+ changequote([,])dnl
+ fi
+
+-have_sgutils="false"
+-AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true")
+-if test x$have_sgutils != "xtrue"; then
+- AC_MSG_ERROR([libsgutils2 is needed])
+-fi
+-SGUTILS_CFLAGS=""
+-SGUTILS_LIBS="-lsgutils2"
+-AC_SUBST(SGUTILS_CFLAGS)
+-AC_SUBST(SGUTILS_LIBS)
++AC_ARG_ENABLE(sgutils2, [ --disable-sgutils2],enable_sgutils2=$enableval,enable_sgutils2=yes)
++
++if test "x$enable_sgutils2" = xyes; then
++ have_sgutils="false"
++ AC_CHECK_LIB([sgutils2], [sg_ll_inquiry], have_sgutils="true")
++ if test x$have_sgutils != "xtrue"; then
++ AC_MSG_ERROR([libsgutils2 is needed])
++ fi
++ SGUTILS_CFLAGS=""
++ SGUTILS_LIBS="-lsgutils2"
++ AC_SUBST(SGUTILS_CFLAGS)
++ AC_SUBST(SGUTILS_LIBS)
++fi
++AM_CONDITIONAL(SGUTILS2_ENABLED, test "x$enable_sgutils2" = xyes)
+
+
+ PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= 147])
+Index: b/src/helpers/Makefile.am
+===================================================================
+--- a/src/helpers/Makefile.am
++++ b/src/helpers/Makefile.am
+@@ -28,12 +28,15 @@ libexec_PROGRAMS = \
+ udisks-helper-fstab-mounter \
+ udisks-helper-ata-smart-collect \
+ udisks-helper-ata-smart-selftest \
+- udisks-helper-drive-detach \
+ udisks-helper-drive-poll \
+ udisks-helper-linux-md-check \
+ udisks-helper-drive-benchmark \
+ $(NULL)
+
++if SGUTILS2_ENABLED
++libexec_PROGRAMS += udisks-helper-drive-detach
++endif
++
+ noinst_LTLIBRARIES = libpartutil.la
+ libpartutil_la_SOURCES = partutil.h partutil.c
+ libpartutil_la_CPPFLAGS = $(LIBPARTED_CFLAGS)
diff --git a/patches/udisks-1.0.0/series b/patches/udisks-1.0.0/series
new file mode 100644
index 000000000..e490966aa
--- /dev/null
+++ b/patches/udisks-1.0.0/series
@@ -0,0 +1,4 @@
+libsgutils-optional.diff
+libparted-optional.diff
+devmapper-optional.diff
+smart-optional.diff
diff --git a/patches/udisks-1.0.0/smart-optional.diff b/patches/udisks-1.0.0/smart-optional.diff
new file mode 100644
index 000000000..a5e405cd2
--- /dev/null
+++ b/patches/udisks-1.0.0/smart-optional.diff
@@ -0,0 +1,415 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: make libatasmart dependency optional
+
+This patch adds a configure option for libatasmart.
+When disabled, the helper programs using it will not be built.
+Any other code using libatasmart is guarded with appropriate ifdefs.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ configure.ac | 12 +++++++++---
+ src/adapter-private.h | 1 -
+ src/adapter.c | 1 -
+ src/daemon.c | 4 ++++
+ src/device-private.c | 2 ++
+ src/device-private.h | 6 ++++++
+ src/device.c | 20 ++++++++++++++++++++
+ src/expander-private.h | 1 -
+ src/expander.c | 1 -
+ src/helpers/Makefile.am | 9 +++++++--
+ src/port-private.h | 1 -
+ src/probers/Makefile.am | 5 ++++-
+ tools/udisks.c | 6 ++++++
+ 13 files changed, 58 insertions(+), 11 deletions(-)
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -204,9 +204,15 @@ if test "x$enable_dmmp" != "xno"; then
+ fi
+ AM_CONDITIONAL(HAVE_DMMP, [test "$have_dmmp" = "yes"])
+
+-PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14])
+-AC_SUBST(LIBATASMART_CFLAGS)
+-AC_SUBST(LIBATASMART_LIBS)
++AC_ARG_ENABLE(libatasmart,[ --disable-libatasmart],enable_libatasmart=$enableval,enable_libatasmart=yes)
++
++if test "x$enable_libatasmart" = xyes; then
++ PKG_CHECK_MODULES(LIBATASMART, [libatasmart >= 0.14])
++ AC_SUBST(LIBATASMART_CFLAGS)
++ AC_SUBST(LIBATASMART_LIBS)
++ AC_DEFINE(LIBATASMART_ENABLED,[1],[libatasmart enabled])
++fi
++AM_CONDITIONAL(LIBATASMART_ENABLED, test "x$enable_libatasmart" = xyes)
+
+ PKG_CHECK_MODULES(LIBUDEV, [libudev >= 143])
+ AC_SUBST(LIBUDEV_CFLAGS)
+Index: b/src/device-private.h
+===================================================================
+--- a/src/device-private.h
++++ b/src/device-private.h
+@@ -23,7 +23,9 @@
+
+ #include <dbus/dbus-glib.h>
+ #include <gudev/gudev.h>
++#ifdef LIBATASMART_ENABLED
+ #include <atasmart.h>
++#endif
+
+ #include "types.h"
+
+@@ -224,7 +226,9 @@ struct DevicePrivate
+
+ gboolean drive_ata_smart_is_available;
+ guint64 drive_ata_smart_time_collected;
++#ifdef LIBATASMART_ENABLED
+ SkSmartOverall drive_ata_smart_status;
++#endif
+ void *drive_ata_smart_blob;
+ gsize drive_ata_smart_blob_size;
+
+@@ -389,10 +393,12 @@ void device_set_dm_name (Device *device,
+ void device_set_slaves_objpath (Device *device, GStrv value);
+ void device_set_holders_objpath (Device *device, GStrv value);
+
++#ifdef LIBATASMART_ENABLED
+ void device_set_drive_ata_smart_is_available (Device *device, gboolean value);
+ void device_set_drive_ata_smart_time_collected (Device *device, guint64 value);
+ void device_set_drive_ata_smart_status (Device *device, SkSmartOverall value);
+ void device_set_drive_ata_smart_blob_steal (Device *device, gchar *blob, gsize blob_size);
++#endif
+
+ G_END_DECLS
+
+Index: b/src/device.c
+===================================================================
+--- a/src/device.c
++++ b/src/device.c
+@@ -49,7 +49,9 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <gudev/gudev.h>
++#ifdef LIBATASMART_ENABLED
+ #include <atasmart.h>
++#endif
+
+ #include "daemon.h"
+ #include "device.h"
+@@ -658,6 +660,7 @@ get_property (GObject *object,
+ case PROP_DRIVE_ATA_SMART_TIME_COLLECTED:
+ g_value_set_uint64 (value, device->priv->drive_ata_smart_time_collected);
+ break;
++#ifdef LIBATASMART_ENABLED
+ case PROP_DRIVE_ATA_SMART_STATUS:
+ {
+ const gchar *status;
+@@ -668,6 +671,7 @@ get_property (GObject *object,
+ g_value_set_string (value, status);
+ }
+ break;
++#endif
+ case PROP_DRIVE_ATA_SMART_BLOB:
+ {
+ GArray *a;
+@@ -1740,7 +1744,9 @@ device_init (Device *device)
+ device->priv->slaves_objpath = g_ptr_array_new ();
+ device->priv->holders_objpath = g_ptr_array_new ();
+
++#ifdef LIBATASMART_ENABLED
+ device->priv->drive_ata_smart_status = -1;
++#endif
+ }
+
+ static void
+@@ -3830,6 +3836,7 @@ update_info_linux_md (Device *device)
+ static gboolean
+ update_info_drive_ata_smart (Device *device)
+ {
++#ifdef LIBATASMART_ENABLED
+ gboolean ata_smart_is_available;
+
+ ata_smart_is_available = FALSE;
+@@ -3842,6 +3849,7 @@ update_info_drive_ata_smart (Device *dev
+ * collecting data is done in separate routines, see the
+ * device_drive_ata_smart_refresh_data() function for details.
+ */
++#endif
+
+ return TRUE;
+ }
+@@ -9646,6 +9654,7 @@ device_filesystem_set_label (Device *dev
+
+ /*--------------------------------------------------------------------------------------------------------------*/
+
++#ifdef LIBATASMART_ENABLED
+ /* may be called with context==NULL */
+ static void
+ drive_ata_smart_refresh_data_completed_cb (DBusGMethodInvocation *context,
+@@ -9848,6 +9857,7 @@ device_drive_ata_smart_refresh_data_auth
+ ;
+ PROFILE ("device_drive_ata_smart_refresh_data_authorized_cb(device=%s) end", device->priv->native_path);
+ }
++#endif /* LIBATASMART_ENABLED */
+
+ /* may be called with context==NULL */
+ gboolean
+@@ -9855,6 +9865,7 @@ device_drive_ata_smart_refresh_data (Dev
+ char **options,
+ DBusGMethodInvocation *context)
+ {
++#ifdef LIBATASMART_ENABLED
+ const gchar *action_id;
+
+ action_id = NULL;
+@@ -9875,10 +9886,14 @@ device_drive_ata_smart_refresh_data (Dev
+ g_strfreev);
+
+ return TRUE;
++#else
++ return FALSE;
++#endif
+ }
+
+ /*--------------------------------------------------------------------------------------------------------------*/
+
++#ifdef LIBATASMART_ENABLED
+ static void
+ drive_ata_smart_initiate_selftest_completed_cb (DBusGMethodInvocation *context,
+ Device *device,
+@@ -9975,6 +9990,7 @@ device_drive_ata_smart_initiate_selftest
+ out:
+ ;
+ }
++#endif /* LIBATASMART_ENABLED */
+
+ gboolean
+ device_drive_ata_smart_initiate_selftest (Device *device,
+@@ -9982,6 +9998,7 @@ device_drive_ata_smart_initiate_selftest
+ gchar **options,
+ DBusGMethodInvocation *context)
+ {
++#ifdef LIBATASMART_ENABLED
+ if (!device->priv->drive_ata_smart_is_available)
+ {
+ throw_error (context, ERROR_FAILED, "Device does not support ATA SMART");
+@@ -10003,6 +10020,9 @@ device_drive_ata_smart_initiate_selftest
+
+ out:
+ return TRUE;
++#else
++ return FALSE;
++#endif
+ }
+
+ /*--------------------------------------------------------------------------------------------------------------*/
+Index: b/src/device-private.c
+===================================================================
+--- a/src/device-private.c
++++ b/src/device-private.c
+@@ -1354,6 +1354,7 @@ device_set_holders_objpath (Device *devi
+ }
+ }
+
++#ifdef LIBATASMART_ENABLED
+ void
+ device_set_drive_ata_smart_is_available (Device *device,
+ gboolean value)
+@@ -1400,6 +1401,7 @@ device_set_drive_ata_smart_blob_steal (D
+
+ emit_changed (device, "drive_ata_smart_blob");
+ }
++#endif /* LIBATASMART_ENABLED */
+
+
+ void
+Index: b/tools/udisks.c
+===================================================================
+--- a/tools/udisks.c
++++ b/tools/udisks.c
+@@ -43,7 +43,9 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+
++#ifdef LIBATASMART_ENABLED
+ #include <atasmart.h>
++#endif
+
+ #include "udisks-daemon-glue.h"
+ #include "udisks-device-glue.h"
+@@ -1003,6 +1005,7 @@ ata_smart_status_to_desc (const gchar *s
+ return desc;
+ }
+
++#ifdef LIBATASMART_ENABLED
+ static gchar *
+ get_ata_smart_unit (guint unit,
+ guint64 pretty_value)
+@@ -1137,6 +1140,7 @@ print_ata_smart_attr (SkDisk *d,
+ g_free (threshold_str);
+ g_free (pretty);
+ }
++#endif
+
+ static void
+ do_show_info (const char *object_path)
+@@ -1419,6 +1423,7 @@ do_show_info (const char *object_path)
+
+ /* ------------------------------------------------------------------------------------------------- */
+
++#ifdef LIBATASMART_ENABLED
+ if (!props->drive_ata_smart_is_available)
+ {
+ g_print (" ATA SMART: not available\n");
+@@ -1471,6 +1476,7 @@ do_show_info (const char *object_path)
+ }
+
+ }
++#endif
+
+ /* ------------------------------------------------------------------------------------------------- */
+
+Index: b/src/helpers/Makefile.am
+===================================================================
+--- a/src/helpers/Makefile.am
++++ b/src/helpers/Makefile.am
+@@ -22,13 +22,18 @@ libexec_PROGRAMS = \
+ udisks-helper-change-filesystem-label \
+ udisks-helper-linux-md-remove-component \
+ udisks-helper-fstab-mounter \
+- udisks-helper-ata-smart-collect \
+- udisks-helper-ata-smart-selftest \
+ udisks-helper-drive-poll \
+ udisks-helper-linux-md-check \
+ udisks-helper-drive-benchmark \
+ $(NULL)
+
++if LIBATASMART_ENABLED
++libexec_PROGRAMS += \
++ udisks-helper-ata-smart-collect \
++ udisks-helper-ata-smart-selftest \
++ $(NULL)
++endif
++
+ if SGUTILS2_ENABLED
+ libexec_PROGRAMS += udisks-helper-drive-detach
+ endif
+Index: b/src/probers/Makefile.am
+===================================================================
+--- a/src/probers/Makefile.am
++++ b/src/probers/Makefile.am
+@@ -22,7 +22,6 @@ INCLUDES = \
+
+ udevhelperdir = $(slashlibdir)/udev
+ udevhelper_PROGRAMS = \
+- udisks-probe-ata-smart \
+ udisks-probe-sas-expander \
+ $(NULL)
+
+@@ -38,6 +37,10 @@ if HAVE_LVM2
+ udevhelper_PROGRAMS += udisks-lvm-pv-export
+ endif
+
++if LIBATASMART_ENABLED
++udevhelper_PROGRAMS += udisks-probe-ata-smart
++endif
++
+ udisks_part_id_SOURCES = part-id.c
+ udisks_part_id_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUDEV_CFLAGS)
+ udisks_part_id_LDADD = $(GLIB_LIBS) $(LIBUDEV_LIBS) $(top_builddir)/src/helpers/libpartutil.la
+Index: b/src/adapter-private.h
+===================================================================
+--- a/src/adapter-private.h
++++ b/src/adapter-private.h
+@@ -23,7 +23,6 @@
+
+ #include <dbus/dbus-glib.h>
+ #include <gudev/gudev.h>
+-#include <atasmart.h>
+
+ #include "types.h"
+
+Index: b/src/expander-private.h
+===================================================================
+--- a/src/expander-private.h
++++ b/src/expander-private.h
+@@ -23,7 +23,6 @@
+
+ #include <dbus/dbus-glib.h>
+ #include <gudev/gudev.h>
+-#include <atasmart.h>
+
+ #include "types.h"
+
+Index: b/src/port-private.h
+===================================================================
+--- a/src/port-private.h
++++ b/src/port-private.h
+@@ -23,7 +23,6 @@
+
+ #include <dbus/dbus-glib.h>
+ #include <gudev/gudev.h>
+-#include <atasmart.h>
+
+ #include "types.h"
+
+Index: b/src/adapter.c
+===================================================================
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -30,7 +30,6 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <gudev/gudev.h>
+-#include <atasmart.h>
+
+ #include "daemon.h"
+ #include "adapter.h"
+Index: b/src/daemon.c
+===================================================================
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -1719,6 +1719,7 @@ mdstat_changed_event (GIOChannel *channe
+ return TRUE;
+ }
+
++#ifdef LIBATASMART_ENABLED
+ static gboolean
+ refresh_ata_smart_data (Daemon *daemon)
+ {
+@@ -1747,6 +1748,7 @@ refresh_ata_smart_data (Daemon *daemon)
+
+ return FALSE;
+ }
++#endif /* LIBATASMART_ENABLED */
+
+ static gboolean
+ register_disks_daemon (Daemon *daemon)
+@@ -1949,12 +1951,14 @@ daemon_new (void)
+ mount_file_clean_stale (l);
+ g_list_free (l);
+
++#ifdef LIBATASMART_ENABLED
+ /* set up timer for refreshing ATA SMART data - we don't want to refresh immediately because
+ * when adding a device we also do this...
+ */
+ daemon->priv->ata_smart_refresh_timer_id = g_timeout_add_seconds (ATA_SMART_REFRESH_INTERVAL_SECONDS,
+ (GSourceFunc) refresh_ata_smart_data,
+ daemon);
++#endif /* LIBATASMART_ENABLED */
+
+ PROFILE ("daemon_new(): end");
+ return daemon;
+Index: b/src/expander.c
+===================================================================
+--- a/src/expander.c
++++ b/src/expander.c
+@@ -34,7 +34,6 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <gudev/gudev.h>
+-#include <atasmart.h>
+ #include <stdlib.h>
+
+ #include "daemon.h"
diff --git a/patches/util-linux-ng-2.17.2/0001-replace-bzero-with-memset.patch b/patches/util-linux-ng-2.17.2/0001-replace-bzero-with-memset.patch
new file mode 100644
index 000000000..6951ae632
--- /dev/null
+++ b/patches/util-linux-ng-2.17.2/0001-replace-bzero-with-memset.patch
@@ -0,0 +1,38 @@
+From 06fe890db9b7798363b814269f2a6cc2ec594e8f Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Thu, 25 Mar 2010 22:38:53 -0400
+Subject: [PATCH] replace bzero with memset
+
+Work on this was done in commit c0f19ccff73aa0ec5e9f3b61b932ea4a8bf4e6ed,
+however a couple of bzero call sites were missed
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ fdisk/fdiskbsdlabel.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fdisk/fdiskbsdlabel.c b/fdisk/fdiskbsdlabel.c
+index 2f41561..9c09252 100644
+--- a/fdisk/fdiskbsdlabel.c
++++ b/fdisk/fdiskbsdlabel.c
+@@ -540,7 +540,7 @@ xbsd_write_bootstrap (void)
+ memmove (&dl, d, sizeof (struct xbsd_disklabel));
+
+ /* The disklabel will be overwritten by 0's from bootxx anyway */
+- bzero (d, sizeof (struct xbsd_disklabel));
++ memset (d, 0, sizeof (struct xbsd_disklabel));
+
+ snprintf (path, sizeof(path), "%s/boot%s", bootdir, dkbasename);
+ if (!xbsd_get_bootstrap (path, &disklabelbuffer[xbsd_dlabel.d_secsize],
+@@ -656,7 +656,7 @@ xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, int pindex) {
+ struct geom g;
+
+ get_geometry (fd, &g);
+- bzero (d, sizeof (struct xbsd_disklabel));
++ memset (d, 0, sizeof (struct xbsd_disklabel));
+
+ d -> d_magic = BSD_DISKMAGIC;
+
+--
+1.7.0.2.182.ge007
+
diff --git a/patches/util-linux-ng-2.17.2/series b/patches/util-linux-ng-2.17.2/series
new file mode 100644
index 000000000..80f9ac96a
--- /dev/null
+++ b/patches/util-linux-ng-2.17.2/series
@@ -0,0 +1 @@
+0001-replace-bzero-with-memset.patch
diff --git a/patches/watchdog-5.7/0001-Fix-compile-with-USE_SYSLOG-disabled.patch b/patches/watchdog-5.7/0001-Fix-compile-with-USE_SYSLOG-disabled.patch
new file mode 100644
index 000000000..479afa139
--- /dev/null
+++ b/patches/watchdog-5.7/0001-Fix-compile-with-USE_SYSLOG-disabled.patch
@@ -0,0 +1,30 @@
+From 10bc35db707c552a2dcf002eccd6dbc644a33bcd Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Tue, 2 Mar 2010 20:49:26 -0500
+Subject: [PATCH 1/2] Fix compile with USE_SYSLOG disabled
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ src/shutdown.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/shutdown.c b/src/shutdown.c
+index c743d8e..7490906 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -354,10 +354,11 @@ void do_shutdown(int errorcode)
+ * We cannot let the shell check, because a non-existant or
+ * non-executable sendmail binary means that the pipe is closed faster
+ * than we can write to it. */
+- if ((stat(PATH_SENDMAIL, &buf) != 0) || ((buf.st_mode&S_IXUSR) == 0))
++ if ((stat(PATH_SENDMAIL, &buf) != 0) || ((buf.st_mode&S_IXUSR) == 0)) {
+ #if USE_SYSLOG
+ syslog(LOG_ERR, "%s does not exist or is not executable (errno = %d)", PATH_SENDMAIL, errno);
+ #endif /* USE_SYSLOG */
++ }
+ else
+ {
+ sprintf(exe, "%s -i %s", PATH_SENDMAIL, admin);
+--
+1.7.0.rc2
+
diff --git a/patches/watchdog-5.7/0002-Replace-index-with-strchr.patch b/patches/watchdog-5.7/0002-Replace-index-with-strchr.patch
new file mode 100644
index 000000000..c1e31866e
--- /dev/null
+++ b/patches/watchdog-5.7/0002-Replace-index-with-strchr.patch
@@ -0,0 +1,52 @@
+From cbb4eb9d35a809c328dc0a5d6651ec504ce4435c Mon Sep 17 00:00:00 2001
+From: Jon Ringle <jon@ringle.org>
+Date: Wed, 3 Mar 2010 19:21:24 -0500
+Subject: [PATCH 2/2] Replace index() with strchr()
+
+uclibc does not have index(), but strchr() is equivalent
+to index() according to the index man page
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+---
+ src/mntent.c | 4 ++--
+ src/umount.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/mntent.c b/src/mntent.c
+index 4d103c3..a4aeed0 100644
+--- a/src/mntent.c
++++ b/src/mntent.c
+@@ -8,7 +8,7 @@
+ #endif
+
+ #include <stdio.h>
+-#include <string.h> /* for index */
++#include <string.h> /* for strchr */
+ #include <ctype.h> /* for isdigit */
+ #include "wd_mntent.h"
+ #include "sundries.h" /* for xmalloc */
+@@ -157,7 +157,7 @@ my_getmntent (mntFILE *mfp) {
+ if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL)
+ return NULL;
+
+- s = index (buf, '\n');
++ s = strchr (buf, '\n');
+ if (s == NULL) {
+ /* extremely long line - assume file was corrupted */
+ mfp->mntent_errs = 1;
+diff --git a/src/umount.c b/src/umount.c
+index 8c9f08c..d5fbd0b 100644
+--- a/src/umount.c
++++ b/src/umount.c
+@@ -212,7 +212,7 @@ umount_one (const char *spec, const char *node, const char *type,
+ if (res < 0)
+ umnt_err2 = errno;
+ /* Do not complain about remote NFS mount points */
+- if (errno == ENOENT && index(spec, ':'))
++ if (errno == ENOENT && strchr(spec, ':'))
+ umnt_err2 = 0;
+ }
+ }
+--
+1.7.0.rc2
+
diff --git a/patches/watchdog-5.7/series b/patches/watchdog-5.7/series
new file mode 100644
index 000000000..6aab8b78f
--- /dev/null
+++ b/patches/watchdog-5.7/series
@@ -0,0 +1,2 @@
+0001-Fix-compile-with-USE_SYSLOG-disabled.patch
+0002-Replace-index-with-strchr.patch
diff --git a/patches/wxGTK-2.8.10/autogen.sh b/patches/wxGTK-2.8.10/autogen.sh
new file mode 100755
index 000000000..69351724f
--- /dev/null
+++ b/patches/wxGTK-2.8.10/autogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+autoconf -I build/aclocal/
+
diff --git a/patches/wxGTK-2.8.10/fix-cross-compiling.diff b/patches/wxGTK-2.8.10/fix-cross-compiling.diff
new file mode 100644
index 000000000..e511f0729
--- /dev/null
+++ b/patches/wxGTK-2.8.10/fix-cross-compiling.diff
@@ -0,0 +1,61 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: fix cross compiling
+
+ - make sure to search in the right paths.
+ - don't call check for pkg-config multiple times
+ or configure hangs in an endless loop
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ configure.in | 20 ++++----------------
+ 1 file changed, 4 insertions(+), 16 deletions(-)
+
+Index: b/configure.in
+===================================================================
+--- a/configure.in
++++ b/configure.in
+@@ -2738,14 +2740,12 @@ AC_MSG_RESULT($wx_cv_std_libpath)
+ SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath"
+
+ dnl Cross compiling with gcc?
+-if test "$build" != "$host" -a "$GCC" = yes; then
++if test "$build" != "$host"; then
+ dnl for gcc cross-compilers "$CC -print-prog-name=ld" prints the path to
+ dnl the linker. Stripping off the trailing '/bin/ld' gives us a candiate
+ dnl for a 'root' below which libraries and headers for the target system
+ dnl might be installed.
+- if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then
+- cross_root=`dirname $cross_root`
+- cross_root=`dirname $cross_root`
++ if cross_root="$SYSROOT/usr"; then
+
+ dnl substitute this candiate root for '^/usr' in the search lists,
+ dnl strip out any that don't start '^/usr'.
+@@ -3647,8 +3641,6 @@ libraries returned by 'pkg-config gtk+-2
+ fi
+
+ if test "$wxUSE_DFB" = 1; then
+- PKG_PROG_PKG_CONFIG()
+-
+ PKG_CHECK_MODULES(DIRECTFB,
+ [directfb >= 0.9.23],
+ [
+@@ -3725,8 +3717,6 @@ libraries returned by 'pkg-config gtk+-2
+ fi
+
+ if test "$wxUSE_UNICODE" = "yes"; then
+- PKG_PROG_PKG_CONFIG()
+-
+ PKG_CHECK_MODULES(PANGOX, pangox,
+ [
+ CFLAGS="$PANGOX_CFLAGS $CFLAGS"
+@@ -6154,8 +6144,6 @@ if test "$wxUSE_SOUND" = "yes"; then
+ fi
+
+ if test "$WXGTK20" = 1; then
+- PKG_PROG_PKG_CONFIG()
+-
+ if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
+ if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then
+
diff --git a/patches/wxGTK-2.8.10/fix-gsocket-name-clash.diff b/patches/wxGTK-2.8.10/fix-gsocket-name-clash.diff
new file mode 100644
index 000000000..ca645fb19
--- /dev/null
+++ b/patches/wxGTK-2.8.10/fix-gsocket-name-clash.diff
@@ -0,0 +1,29 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Subject: avoid name clashes with GSocket from glib 2.21+
+
+taken from http://trac.wxwidgets.org/changeset/61009
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+
+---
+ src/gtk/gsockgtk.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+Index: b/src/gtk/gsockgtk.cpp
+===================================================================
+--- a/src/gtk/gsockgtk.cpp
++++ b/src/gtk/gsockgtk.cpp
+@@ -15,8 +15,13 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+
++// newer versions of glib define its own GSocket but we unfortunately use this
++// name in our own (semi-)public header and so can't change it -- rename glib
++// one instead
++#define GSocket GlibGSocket
+ #include <gdk/gdk.h>
+ #include <glib.h>
++#undef GSocket
+
+ #include "wx/gsocket.h"
+ #include "wx/unix/gsockunx.h"
diff --git a/patches/wxGTK-2.8.10/series b/patches/wxGTK-2.8.10/series
new file mode 100644
index 000000000..58aeb4ec7
--- /dev/null
+++ b/patches/wxGTK-2.8.10/series
@@ -0,0 +1,2 @@
+fix-cross-compiling.diff
+fix-gsocket-name-clash.diff
diff --git a/patches/xf86-video-fbdev-0.4.1/series b/patches/xf86-video-fbdev-0.4.1/series
new file mode 100644
index 000000000..243b43acb
--- /dev/null
+++ b/patches/xf86-video-fbdev-0.4.1/series
@@ -0,0 +1 @@
+ignore-timing-option.diff