summaryrefslogtreecommitdiff
path: root/meta/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/at/at_3.1.13.bb63
-rw-r--r--meta/recipes-extended/at/files/S99at39
-rw-r--r--meta/recipes-extended/at/files/configure-add-enable-pam.patch25
-rw-r--r--meta/recipes-extended/at/files/configure.patch29
-rw-r--r--meta/recipes-extended/at/files/file_replacement_with_gplv2.patch30
-rw-r--r--meta/recipes-extended/at/files/fix_parallel_build_error.patch28
-rw-r--r--meta/recipes-extended/at/files/pam.conf.patch21
-rw-r--r--meta/recipes-extended/at/files/posixtm.c328
-rw-r--r--meta/recipes-extended/at/files/posixtm.h37
-rw-r--r--meta/recipes-extended/at/files/use-ldflags.patch24
-rw-r--r--meta/recipes-extended/augeas/augeas.inc29
-rw-r--r--meta/recipes-extended/augeas/augeas_0.10.0.bb6
-rw-r--r--meta/recipes-extended/bash/bash-4.2/execute_cmd.patch17
-rw-r--r--meta/recipes-extended/bash/bash.inc37
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb50
-rw-r--r--meta/recipes-extended/bash/bash_4.2.bb41
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb24
-rw-r--r--meta/recipes-extended/blktool/blktool_4-6.bb24
-rw-r--r--meta/recipes-extended/byacc/byacc.inc17
-rw-r--r--meta/recipes-extended/byacc/byacc_20120115.bb13
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am41
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac14
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb44
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb29
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/statdef.patch17
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch25
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch31
-rw-r--r--meta/recipes-extended/cpio/cpio-2.8/statdef.patch15
-rw-r--r--meta/recipes-extended/cpio/cpio_2.11.bb9
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb16
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc42
-rw-r--r--meta/recipes-extended/cracklib/cracklib_2.8.18.bb17
-rwxr-xr-xmeta/recipes-extended/cronie/cronie/crond.init69
-rw-r--r--meta/recipes-extended/cronie/cronie/crond_pam_config.patch19
-rw-r--r--meta/recipes-extended/cronie/cronie/crontab10
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.8.bb75
-rw-r--r--meta/recipes-extended/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch70
-rw-r--r--meta/recipes-extended/cups/cups-1.4.6/use_echo_only_in_init.patch13
-rw-r--r--meta/recipes-extended/cups/cups14.inc98
-rw-r--r--meta/recipes-extended/cups/cups_1.4.6.bb19
-rw-r--r--meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb18
-rw-r--r--meta/recipes-extended/diffutils/diffutils_2.8.1.bb26
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.2.bb25
-rw-r--r--meta/recipes-extended/ed/ed-1.6/ed-1.2-build.patch43
-rw-r--r--meta/recipes-extended/ed/ed_0.5.bb21
-rw-r--r--meta/recipes-extended/ed/ed_1.6.bb28
-rw-r--r--meta/recipes-extended/ethtool/ethtool_2.6.36.bb15
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch56
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch781
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch294
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch58
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch40
-rw-r--r--meta/recipes-extended/findutils/findutils.inc25
-rw-r--r--meta/recipes-extended/findutils/findutils_4.2.31.bb31
-rw-r--r--meta/recipes-extended/findutils/findutils_4.4.2.bb16
-rw-r--r--meta/recipes-extended/foomatic/foomatic-filters_4.0.7.bb39
-rw-r--r--meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch56
-rw-r--r--meta/recipes-extended/gamin/gamin/noconst.patch59
-rw-r--r--meta/recipes-extended/gamin/gamin_0.1.10.bb34
-rw-r--r--meta/recipes-extended/gawk/gawk_3.1.5.bb40
-rw-r--r--meta/recipes-extended/gawk/gawk_4.0.0.bb39
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch27
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch912
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch95
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch54
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h41
l---------meta/recipes-extended/ghostscript/ghostscript/i6861
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.05.bb117
-rw-r--r--meta/recipes-extended/gperf/gperf.inc22
-rw-r--r--meta/recipes-extended/gperf/gperf_3.0.3.bb10
-rw-r--r--meta/recipes-extended/gperf/gperf_3.0.4.bb6
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch55
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb43
-rw-r--r--meta/recipes-extended/grep/grep_2.9.bb43
-rw-r--r--meta/recipes-extended/groff/groff_1.20.1.bb44
-rw-r--r--meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch48
-rw-r--r--meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch56
-rw-r--r--meta/recipes-extended/gzip/gzip.inc26
-rw-r--r--meta/recipes-extended/gzip/gzip_1.3.12.bb36
-rw-r--r--meta/recipes-extended/gzip/gzip_1.4.bb10
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.39.bb36
-rw-r--r--meta/recipes-extended/images/core-image-basic.bb13
-rw-r--r--meta/recipes-extended/images/core-image-lsb-dev.bb13
-rw-r--r--meta/recipes-extended/images/core-image-lsb-sdk.bb15
-rw-r--r--meta/recipes-extended/images/core-image-lsb.bb13
-rw-r--r--meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch49
-rw-r--r--meta/recipes-extended/iptables/iptables_1.4.13.bb39
-rw-r--r--meta/recipes-extended/iputils/files/debian/add-icmp-return-codes.diff43
-rw-r--r--meta/recipes-extended/iputils/files/debian/fix-arping-timeouts.diff26
-rw-r--r--meta/recipes-extended/iputils/files/debian/fix-dead-host-ping-stats.diff16
-rw-r--r--meta/recipes-extended/iputils/files/debian/targets.diff15
-rw-r--r--meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff31
-rw-r--r--meta/recipes-extended/iputils/files/nsgmls-path-fix.patch27
-rw-r--r--meta/recipes-extended/iputils/iputils_s20101006.bb84
-rw-r--r--meta/recipes-extended/less/less_444.bb42
-rw-r--r--meta/recipes-extended/libaio/libaio/00_arches.patch779
-rw-r--r--meta/recipes-extended/libaio/libaio/destdir.patch17
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch61
-rw-r--r--meta/recipes-extended/libaio/libaio/toolchain.patch27
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.109.bb23
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch42
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch63
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch33
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch28
-rw-r--r--meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch31
-rw-r--r--meta/recipes-extended/libarchive/libarchive_2.8.5.bb24
-rw-r--r--meta/recipes-extended/libidn/libidn_0.6.14.bb27
-rw-r--r--meta/recipes-extended/libidn/libidn_1.24.bb31
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.1-fortify.patch26
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.2-rpc-des-prot.patch39
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc-0.2.2/remove-des-crypt.patch17
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_0.2.2.bb32
-rw-r--r--meta/recipes-extended/libuser/libuser_0.57.1.bb24
-rw-r--r--meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch71
-rw-r--r--meta/recipes-extended/libzypp/libzypp/close.patch32
-rw-r--r--meta/recipes-extended/libzypp/libzypp/config-release.patch23
-rw-r--r--meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch22
-rw-r--r--meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch22
-rw-r--r--meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch54
-rw-r--r--meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch500
-rw-r--r--meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch24
-rw-r--r--meta/recipes-extended/libzypp/libzypp/no-doc.patch33
-rw-r--r--meta/recipes-extended/libzypp/libzypp/rpm5-no-rpmdbinit.patch27
-rw-r--r--meta/recipes-extended/libzypp/libzypp/rpm5.patch32
-rw-r--r--meta/recipes-extended/libzypp/libzypp_git.bb152
-rw-r--r--meta/recipes-extended/lighttpd/files/index.html.lighttpd1
-rw-r--r--meta/recipes-extended/lighttpd/files/lighttpd34
-rw-r--r--meta/recipes-extended/lighttpd/files/lighttpd.conf328
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb63
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch107
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch34
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch42
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.1.bb34
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/init-functions39
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_killproc6
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_log_message27
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_pidofproc6
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_start_daemon45
-rw-r--r--meta/recipes-extended/lsb/lsb_1.4.bb108
-rw-r--r--meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh230
-rw-r--r--meta/recipes-extended/lsb/lsbsetup_1.0.bb26
-rw-r--r--meta/recipes-extended/lsb/lsbtest/LSB_Test.sh510
-rw-r--r--meta/recipes-extended/lsb/lsbtest/packages_list50
-rw-r--r--meta/recipes-extended/lsb/lsbtest/session194
-rw-r--r--meta/recipes-extended/lsb/lsbtest_1.0.bb37
-rw-r--r--meta/recipes-extended/lsof/lsof_4.85.bb47
-rw-r--r--meta/recipes-extended/ltp/ltp/uclibc-getcontext.patch78
-rw-r--r--meta/recipes-extended/ltp/ltp_20120104.bb76
-rw-r--r--meta/recipes-extended/mailx/mailx_12.5.bb30
-rw-r--r--meta/recipes-extended/man-pages/man-pages_3.36.bb28
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5g-nonrootbuild.patch16
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5h1-gencat.patch14
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5h1-make.patch17
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5i2-initial.patch19
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5i2-newline.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5i2-overflow.patch16
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5j-i18n.patch16
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5j-nocache.patch16
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5j-utf8.patch61
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5k-confpath.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5k-nonascii.patch18
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5k-sofix.patch24
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-bug11621.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-buildroot.patch52
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-multiple.patch22
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-no-color-for-printing.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-sigpipe.patch30
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.5m2-tv_fhs.patch31
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-i18n_whatis.patch145
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch124
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-mandirs.patch31
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-new_sections.patch15
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-ro_usr.patch33
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-security.patch62
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-use_i18n_vars_in_a_std_way.patch160
-rw-r--r--meta/recipes-extended/man/man-1.6f/man-1.6e-whatis2.patch52
-rw-r--r--meta/recipes-extended/man/man-1.6f/man.1.gzbin0 -> 12323 bytes
-rw-r--r--meta/recipes-extended/man/man-1.6f/man.7.gzbin0 -> 6192 bytes
-rw-r--r--meta/recipes-extended/man/man-1.6f/manpath.5.gzbin0 -> 2133 bytes
-rw-r--r--meta/recipes-extended/man/man_1.6f.bb64
-rw-r--r--meta/recipes-extended/mc/mc_4.7.5.2.bb25
-rw-r--r--meta/recipes-extended/mc/mc_4.8.3.bb25
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch24
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.2.3.bb33
-rw-r--r--meta/recipes-extended/mingetty/mingetty_1.08.bb26
-rw-r--r--meta/recipes-extended/minicom/minicom-2.6.1/gcc4-scope.patch46
-rw-r--r--meta/recipes-extended/minicom/minicom-2.6.1/rename-conflicting-functions.patch15
-rw-r--r--meta/recipes-extended/minicom/minicom_2.6.1.bb22
-rw-r--r--meta/recipes-extended/mktemp/files/disable-strip.patch15
-rw-r--r--meta/recipes-extended/mktemp/files/fix-parallel-make.patch24
-rw-r--r--meta/recipes-extended/mktemp/mktemp_1.7.bb31
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.4.24.bb27
-rw-r--r--meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.h75
-rw-r--r--meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.make36
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-23.bb82
-rw-r--r--meta/recipes-extended/newt/files/fix_SHAREDDIR.patch29
-rw-r--r--meta/recipes-extended/newt/files/remove_slang_include.patch16
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.14.bb41
-rw-r--r--meta/recipes-extended/pam/libpam/99_pam1
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests.patch35
-rw-r--r--meta/recipes-extended/pam/libpam/pam-no-innetgr.patch97
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-account25
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-auth18
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-password26
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-session19
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive19
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/other27
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.5.bb91
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch20
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch43
-rw-r--r--meta/recipes-extended/parted/parted-3.1/no_check.patch20
-rw-r--r--meta/recipes-extended/parted/parted-3.1/syscalls.patch55
-rw-r--r--meta/recipes-extended/parted/parted_3.1.bb22
-rw-r--r--meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch25
-rw-r--r--meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch185
-rw-r--r--meta/recipes-extended/pax/pax_3.4.bb22
-rw-r--r--meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb18
-rw-r--r--meta/recipes-extended/perl/libtimedate-perl_1.20.bb20
-rw-r--r--meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb22
-rw-r--r--meta/recipes-extended/perl/libxml-sax-perl_0.99.bb27
-rw-r--r--meta/recipes-extended/pigz/files/ldflags.patch17
-rw-r--r--meta/recipes-extended/pigz/pigz.inc32
-rw-r--r--meta/recipes-extended/pigz/pigz_2.2.4.bb11
-rw-r--r--meta/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch70
-rw-r--r--meta/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch46
-rw-r--r--meta/recipes-extended/polkit/polkit-0.104/introspection.patch104
-rw-r--r--meta/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch23
-rw-r--r--meta/recipes-extended/polkit/polkit-gnome_0.102.bb27
-rw-r--r--meta/recipes-extended/polkit/polkit_0.104.bb40
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch44
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/install.patch39
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch15
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/pagesz-not-constant.patch24
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procmodule.patch38
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch19
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/psmodule.patch23
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/sysctl.conf64
-rw-r--r--meta/recipes-extended/procps/procps.inc18
-rw-r--r--meta/recipes-extended/procps/procps_3.2.8.bb35
-rw-r--r--meta/recipes-extended/psmisc/psmisc.inc58
-rw-r--r--meta/recipes-extended/psmisc/psmisc_22.16.bb7
-rw-r--r--meta/recipes-extended/quota/quota_4.00.bb24
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch16
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb22
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch57
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/cmake.patch31
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/db5.patch26
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/fix_gcc-4.6.0_compile_issue.patch115
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch127
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch22
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch69
-rw-r--r--meta/recipes-extended/sat-solver/sat-solver_git.bb64
-rw-r--r--meta/recipes-extended/screen/screen-4.0.3/configure.patch979
-rw-r--r--meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch19
-rw-r--r--meta/recipes-extended/screen/screen-4.0.3/screen.pam2
-rw-r--r--meta/recipes-extended/screen/screen_4.0.3.bb43
-rw-r--r--meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch18
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb29
-rw-r--r--meta/recipes-extended/sed/sed_4.2.1.bb30
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_options.patch1374
-rw-r--r--meta/recipes-extended/shadow/files/disable-syslog.patch34
-rw-r--r--meta/recipes-extended/shadow/files/login.defs_shadow-sysroot386
-rw-r--r--meta/recipes-extended/shadow/files/login_defs_pam.sed32
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/chfn14
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/chpasswd4
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/chsh19
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/login84
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/newusers4
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/passwd5
-rw-r--r--meta/recipes-extended/shadow/files/pam.d/su60
-rw-r--r--meta/recipes-extended/shadow/files/securetty209
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch27
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch36
-rw-r--r--meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch31
-rw-r--r--meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch91
-rw-r--r--meta/recipes-extended/shadow/files/shadow.automake-1.11.patch106
-rw-r--r--meta/recipes-extended/shadow/files/useradd.patch17
-rw-r--r--meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb67
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb31
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb35
-rw-r--r--meta/recipes-extended/shadow/shadow_4.1.4.3.bb124
-rw-r--r--meta/recipes-extended/slang/slang/rpathfix.patch70
-rw-r--r--meta/recipes-extended/slang/slang_2.2.4.bb36
-rw-r--r--meta/recipes-extended/stat/stat_3.3.bb25
-rw-r--r--meta/recipes-extended/sudo/files/libtool.patch24
-rw-r--r--meta/recipes-extended/sudo/files/sudo.pam6
-rw-r--r--meta/recipes-extended/sudo/sudo.inc32
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.4p4.bb29
-rw-r--r--meta/recipes-extended/sysklogd/files/no-strip-install.patch17
-rw-r--r--meta/recipes-extended/sysklogd/files/no-vectorization.patch20
-rwxr-xr-xmeta/recipes-extended/sysklogd/files/sysklogd140
-rw-r--r--meta/recipes-extended/sysklogd/files/syslog.conf70
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc98
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.bb5
-rw-r--r--meta/recipes-extended/sysstat/files/99_sysstat1
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc38
-rw-r--r--meta/recipes-extended/sysstat/sysstat_10.0.4.bb8
-rw-r--r--meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch22
-rw-r--r--meta/recipes-extended/tar/tar-1.17/gcc43build.patch37
-rw-r--r--meta/recipes-extended/tar/tar-1.17/m4extensions.patch30
-rw-r--r--meta/recipes-extended/tar/tar-replacement-native_1.26.bb6
-rw-r--r--meta/recipes-extended/tar/tar.inc34
-rw-r--r--meta/recipes-extended/tar/tar_1.17.bb14
-rw-r--r--meta/recipes-extended/tar/tar_1.26.bb9
-rw-r--r--meta/recipes-extended/tasks/task-core-basic.bb157
-rw-r--r--meta/recipes-extended/tasks/task-core-lsb.bb198
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff77
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch250
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch105
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch32
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch1255
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch153
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch47
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch83
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch255
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch68
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch14
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch73
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch21
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch45
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch23
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch39
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff41
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.834
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch31
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch36
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch32
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch44
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch41
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.828
-rw-r--r--meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb120
-rw-r--r--meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch44
-rw-r--r--meta/recipes-extended/texi2html/texi2html_5.0.bb27
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/disable-native-tools.patch43
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/gettext-macros.patch61
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/link-zip.patch16
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch171
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch34
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch25
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch13
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch14
-rw-r--r--meta/recipes-extended/texinfo/texinfo-4.13a/use_host_makedoc.patch37
-rw-r--r--meta/recipes-extended/texinfo/texinfo_4.13a.bb64
-rw-r--r--meta/recipes-extended/time/time-1.7/debian.patch1301
-rw-r--r--meta/recipes-extended/time/time.inc18
-rw-r--r--meta/recipes-extended/time/time_1.7.bb11
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2011i.bb25
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2012b.bb222
-rw-r--r--meta/recipes-extended/unzip/unzip/avoid-strip.patch50
-rw-r--r--meta/recipes-extended/unzip/unzip_6.0.bb32
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.11.bb20
-rw-r--r--meta/recipes-extended/wget/wget-1.13.4/fix_makefile.patch46
-rw-r--r--meta/recipes-extended/wget/wget.inc20
-rw-r--r--meta/recipes-extended/wget/wget_1.13.4.bb9
-rw-r--r--meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch53
-rw-r--r--meta/recipes-extended/which/which-2.20/remove-declaration.patch18
-rw-r--r--meta/recipes-extended/which/which_2.18.bb36
-rw-r--r--meta/recipes-extended/which/which_2.20.bb32
-rw-r--r--meta/recipes-extended/xdg-utils/xdg-utils_1.0.2.bb26
-rw-r--r--meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch86
-rw-r--r--meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch79
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch112
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.conf11
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.init57
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb49
-rw-r--r--meta/recipes-extended/xz/xz_5.0.3.bb28
-rw-r--r--meta/recipes-extended/zip/zip.inc24
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb9
-rw-r--r--meta/recipes-extended/zypper/zypper/cmake.patch22
-rw-r--r--meta/recipes-extended/zypper/zypper/cmake_libxml2.patch28
-rw-r--r--meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch60
-rw-r--r--meta/recipes-extended/zypper/zypper/gcc-scope.patch20
-rw-r--r--meta/recipes-extended/zypper/zypper/rpm5-flag.patch18
-rw-r--r--meta/recipes-extended/zypper/zypper_git.bb27
382 files changed, 25131 insertions, 0 deletions
diff --git a/meta/recipes-extended/at/at_3.1.13.bb b/meta/recipes-extended/at/at_3.1.13.bb
new file mode 100644
index 000000000..9af35690f
--- /dev/null
+++ b/meta/recipes-extended/at/at_3.1.13.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Delayed job execution and batch processing"
+DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
+the system load levels drop to a particular level."
+SECTION = "base"
+LICENSE="GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+DEPENDS = "flex initscripts \
+ ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
+PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
+
+RCONFLICTS_${PN} = "atd"
+RREPLACES_${PN} = "atd"
+PR = "r1"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
+ file://configure.patch \
+ file://use-ldflags.patch \
+ file://fix_parallel_build_error.patch \
+ file://posixtm.c \
+ file://posixtm.h \
+ file://file_replacement_with_gplv2.patch \
+ file://S99at \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://pam.conf.patch \
+ file://configure-add-enable-pam.patch"
+
+SRC_URI[md5sum] = "1da61af6c29e323abaaf13ee1a8dad79"
+SRC_URI[sha256sum] = "3a8b90868d615d21a92f4986ea9a823886329af8fae8dd7ab4eed9b273bca072"
+
+EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
+ --with-daemon_username=root \
+ --with-daemon_groupname=root \
+ --with-jobdir=/var/spool/at/jobs \
+ --with-atspool=/var/spool/at/spool \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} "
+
+inherit autotools
+
+PARALLEL_MAKE = ""
+
+do_compile_prepend () {
+ cp -f ${WORKDIR}/posixtm.[ch] ${S}
+}
+
+do_install () {
+ oe_runmake "IROOT=${D}" install
+
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/rcS.d
+ install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
+ ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
+ cp -r ${D}/usr/doc/at ${D}${docdir}/
+ rm -rf ${D}/usr/doc
+
+ for feature in ${DISTRO_FEATURES}; do
+ if [ "$feature" = "pam" ]; then
+ install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
+ break
+ fi
+ done
+}
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/files/S99at
new file mode 100644
index 000000000..bcfcbdae2
--- /dev/null
+++ b/meta/recipes-extended/at/files/S99at
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Starts at daemon
+#
+
+umask 077
+
+start() {
+ echo -n "Starting atd: "
+ start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping atd: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
+ echo "OK"
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
diff --git a/meta/recipes-extended/at/files/configure-add-enable-pam.patch b/meta/recipes-extended/at/files/configure-add-enable-pam.patch
new file mode 100644
index 000000000..1e5efef12
--- /dev/null
+++ b/meta/recipes-extended/at/files/configure-add-enable-pam.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+--- at-3.1.12/configure.ac 2011-06-23 14:51:03.653572945 +0800
++++ at-3.1.12/configure.ac.new 2011-06-27 16:12:14.903572945 +0800
+@@ -81,10 +81,18 @@
+ AC_FUNC_VPRINTF
+ AC_FUNC_GETLOADAVG
+ AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
++
++AC_ARG_WITH([pam],
++ [AS_HELP_STRING([--without-pam], [without PAM support])])
++
++if test "x$with_pam" != xno; then
+ AC_CHECK_HEADERS(security/pam_appl.h, [
+ PAMLIB="-lpam"
+- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
+-])
++ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])],
++ [if test "x$with_pam" = xyes; then
++ AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
++ fi])
++fi
+
+ dnl Checking for programs
+
diff --git a/meta/recipes-extended/at/files/configure.patch b/meta/recipes-extended/at/files/configure.patch
new file mode 100644
index 000000000..14310e335
--- /dev/null
+++ b/meta/recipes-extended/at/files/configure.patch
@@ -0,0 +1,29 @@
+
+Fix cross-compilation issues in configure.ac
+Derived from an OE patch for at-3.1.8
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: at-3.1.12/configure.ac
+===================================================================
+--- at-3.1.12.orig/configure.ac
++++ at-3.1.12/configure.ac
+@@ -38,12 +38,11 @@ case "$host" in
+ AC_MSG_RESULT(no)
+ ;;
+ esac
++if [ X"${cross_compiling}" = Xno ]; then
+ AC_MSG_CHECKING(Trying to compile a trivial ANSI C program)
+-AC_TRY_RUN([ main(int ac, char **av) { return 0; } ],
+- AC_MSG_RESULT(yes),
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.),
+- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.))
++AC_RUN_IFELSE([AC_LANG_SOURCE([[ main(int ac, char **av) { return 0; } ]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
++ AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)],[AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)])
++fi
+
+ AC_MSG_CHECKING(__attribute__((noreturn)))
+ AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);],
diff --git a/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch
new file mode 100644
index 000000000..d5ef0032b
--- /dev/null
+++ b/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [licensing]
+
+posixtm.[ch] files are replaced with gplv2 version from these locations:
+
+http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
+http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
+
+update the Copyright file information to reflect the replaced files.
+
+Date: 2010/08/31
+Nitin A Kamble nitin.a.kamble@intel.com
+
+Index: at-3.1.12/Copyright
+===================================================================
+--- at-3.1.12.orig/Copyright
++++ at-3.1.12/Copyright
+@@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t
+ Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007 Free Software Foundation Inc.
+
+- This program is free software: you can redistribute it and/or modify
++ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 3 of the License, or
+- (at your option) any later version.
++ the Free Software Foundation; either version 2, or (at your option)
++ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/meta/recipes-extended/at/files/fix_parallel_build_error.patch b/meta/recipes-extended/at/files/fix_parallel_build_error.patch
new file mode 100644
index 000000000..66ff3e1c1
--- /dev/null
+++ b/meta/recipes-extended/at/files/fix_parallel_build_error.patch
@@ -0,0 +1,28 @@
+make -j was failing sometimesa like this
+| ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed
+| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory
+| compilation terminated.
+| make: *** [lex.yy.o] Error 1
+| make: *** Waiting for unfinished jobs....
+
+Fixed the issue by adding a dependency in the makefile.
+Nitin <nitin.a.kamble@intel.com>
+2010/09/02
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: at-3.1.12/Makefile.in
+===================================================================
+--- at-3.1.12.orig/Makefile.in
++++ at-3.1.12/Makefile.in
+@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
+ lex.yy.c: parsetime.l
+ $(LEX) -i parsetime.l
+
++parsetime.l: y.tab.h
++
+ atrun: atrun.in
+ configure
+
diff --git a/meta/recipes-extended/at/files/pam.conf.patch b/meta/recipes-extended/at/files/pam.conf.patch
new file mode 100644
index 000000000..dfe76d748
--- /dev/null
+++ b/meta/recipes-extended/at/files/pam.conf.patch
@@ -0,0 +1,21 @@
+oe doesn't support "@include", use the concrete directive instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+--- at-3.1.12/pam.conf.orig 2009-11-23 23:11:52.000000000 +0800
++++ at-3.1.12/pam.conf 2011-07-15 11:14:04.132818950 +0800
+@@ -2,8 +2,8 @@
+ # The PAM configuration file for the at daemon
+ #
+
+-auth required pam_env.so
+-@include common-auth
+-@include common-account
+-@include common-session-noninteractive
+-session required pam_limits.so
++auth required pam_env.so
++auth include common-auth
++account include common-account
++session include common-session-noninteractive
++session required pam_limits.so
diff --git a/meta/recipes-extended/at/files/posixtm.c b/meta/recipes-extended/at/files/posixtm.c
new file mode 100644
index 000000000..5514ba4fe
--- /dev/null
+++ b/meta/recipes-extended/at/files/posixtm.c
@@ -0,0 +1,328 @@
+/* Parse dates for touch and date.
+
+ Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007 Free Software Foundation Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Yacc-based version written by Jim Kingdon and David MacKenzie.
+ Rewritten by Jim Meyering. */
+
+#include <config.h>
+
+#include "posixtm.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* ISDIGIT differs from isdigit, as follows:
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
+ - It's typically faster.
+ POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
+ isdigit unless it's important to use the locale's definition
+ of `digit' even when the host does not conform to POSIX. */
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+
+time_t mktime ();
+
+/*
+ POSIX requires:
+
+ touch -t [[CC]YY]mmddhhmm[.ss] FILE...
+ 8, 10, or 12 digits, followed by optional .ss
+ (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)
+
+ touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001)
+ 8 or 10 digits, YY (if present) must be in the range 69-99
+ (PDS_TRAILING_YEAR | PDS_PRE_2000)
+
+ date mmddhhmm[[CC]YY]
+ 8, 10, or 12 digits
+ (PDS_TRAILING_YEAR | PDS_CENTURY)
+
+*/
+
+static int
+year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits)
+{
+ switch (n)
+ {
+ case 1:
+ tm->tm_year = *digit_pair;
+ /* Deduce the century based on the year.
+ POSIX requires that 00-68 be interpreted as 2000-2068,
+ and that 69-99 be interpreted as 1969-1999. */
+ if (digit_pair[0] <= 68)
+ {
+ if (syntax_bits & PDS_PRE_2000)
+ return 1;
+ tm->tm_year += 100;
+ }
+ break;
+
+ case 2:
+ if (! (syntax_bits & PDS_CENTURY))
+ return 1;
+ tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900;
+ break;
+
+ case 0:
+ {
+ time_t now;
+ struct tm *tmp;
+
+ /* Use current year. */
+ time (&now);
+ tmp = localtime (&now);
+ if (! tmp)
+ return 1;
+ tm->tm_year = tmp->tm_year;
+ }
+ break;
+
+ default:
+ abort ();
+ }
+
+ return 0;
+}
+
+static int
+posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
+{
+ const char *dot = NULL;
+ int pair[6];
+ int *p;
+ size_t i;
+
+ size_t s_len = strlen (s);
+ size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.')))
+ ? (size_t) (dot - s)
+ : s_len);
+
+ if (len != 8 && len != 10 && len != 12)
+ return 1;
+
+ if (dot)
+ {
+ if (!(syntax_bits & PDS_SECONDS))
+ return 1;
+
+ if (s_len - len != 3)
+ return 1;
+ }
+
+ for (i = 0; i < len; i++)
+ if (!ISDIGIT (s[i]))
+ return 1;
+
+ len /= 2;
+ for (i = 0; i < len; i++)
+ pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0';
+
+ p = pair;
+ if (syntax_bits & PDS_LEADING_YEAR)
+ {
+ if (year (tm, p, len - 4, syntax_bits))
+ return 1;
+ p += len - 4;
+ len = 4;
+ }
+
+ /* Handle 8 digits worth of `MMDDhhmm'. */
+ tm->tm_mon = *p++ - 1;
+ tm->tm_mday = *p++;
+ tm->tm_hour = *p++;
+ tm->tm_min = *p++;
+ len -= 4;
+
+ /* Handle any trailing year. */
+ if (syntax_bits & PDS_TRAILING_YEAR)
+ {
+ if (year (tm, p, len, syntax_bits))
+ return 1;
+ }
+
+ /* Handle seconds. */
+ if (!dot)
+ {
+ tm->tm_sec = 0;
+ }
+ else
+ {
+ int seconds;
+
+ ++dot;
+ if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1]))
+ return 1;
+ seconds = 10 * (dot[0] - '0') + dot[1] - '0';
+
+ tm->tm_sec = seconds;
+ }
+
+ return 0;
+}
+
+/* Parse a POSIX-style date, returning true if successful. */
+
+bool
+posixtime (time_t *p, const char *s, unsigned int syntax_bits)
+{
+ struct tm tm0
+#ifdef lint
+ /* Placate gcc-4's -Wuninitialized.
+ posix_time_parse fails to set all of tm0 only when it returns
+ nonzero (due to year() returning nonzero), and in that case,
+ this code doesn't use the tm0 at all. */
+ = { 0, }
+#endif
+ ;
+ struct tm tm1;
+ struct tm const *tm;
+ time_t t;
+
+ if (posix_time_parse (&tm0, s, syntax_bits))
+ return false;
+
+ tm1 = tm0;
+ tm1.tm_isdst = -1;
+ t = mktime (&tm1);
+
+ if (t != (time_t) -1)
+ tm = &tm1;
+ else
+ {
+ /* mktime returns -1 for errors, but -1 is also a valid time_t
+ value. Check whether an error really occurred. */
+ tm = localtime (&t);
+ if (! tm)
+ return false;
+ }
+
+ /* Reject dates like "September 31" and times like "25:61". */
+ if ((tm0.tm_year ^ tm->tm_year)
+ | (tm0.tm_mon ^ tm->tm_mon)
+ | (tm0.tm_mday ^ tm->tm_mday)
+ | (tm0.tm_hour ^ tm->tm_hour)
+ | (tm0.tm_min ^ tm->tm_min)
+ | (tm0.tm_sec ^ tm->tm_sec))
+ return false;
+
+ *p = t;
+ return true;
+}
+
+#ifdef TEST_POSIXTIME
+/*
+ Test mainly with syntax_bits == 13
+ (aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS))
+
+ This test data assumes Universal Time, e.g., TZ="UTC0".
+
+ This test data also assumes that time_t is signed and is at least
+ 39 bits wide, so that it can represent all years from 0000 through
+ 9999. A host with 32-bit signed time_t can represent only time
+ stamps in the range 1901-12-13 20:45:52 through 2038-01-18
+ 03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test
+ cases outside this range will not work on such a host.
+
+ Also, the first two lines of test data assume that the current
+ year is 2002.
+
+BEGIN-DATA
+12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
+12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
+000001010000.00 13 -62167132800 Sun Jan 1 00:00:00 0000
+190112132045.52 13 -2147483648 Fri Dec 13 20:45:52 1901
+190112132045.53 13 -2147483647 Fri Dec 13 20:45:53 1901
+190112132046.52 13 -2147483588 Fri Dec 13 20:46:52 1901
+190112132145.52 13 -2147480048 Fri Dec 13 21:45:52 1901
+190112142045.52 13 -2147397248 Sat Dec 14 20:45:52 1901
+190201132045.52 13 -2144805248 Mon Jan 13 20:45:52 1902
+196912312359.59 13 -1 Wed Dec 31 23:59:59 1969
+197001010000.00 13 0 Thu Jan 1 00:00:00 1970
+197001010000.01 13 1 Thu Jan 1 00:00:01 1970
+197001010001.00 13 60 Thu Jan 1 00:01:00 1970
+197001010100.00 13 3600 Thu Jan 1 01:00:00 1970
+197001020000.00 13 86400 Fri Jan 2 00:00:00 1970
+197002010000.00 13 2678400 Sun Feb 1 00:00:00 1970
+197101010000.00 13 31536000 Fri Jan 1 00:00:00 1971
+197001000000.00 13 * *
+197000010000.00 13 * *
+197001010000.60 13 * *
+197001010060.00 13 * *
+197001012400.00 13 * *
+197001320000.00 13 * *
+197013010000.00 13 * *
+203801190314.06 13 2147483646 Tue Jan 19 03:14:06 2038
+203801190314.07 13 2147483647 Tue Jan 19 03:14:07 2038
+203801190314.08 13 2147483648 Tue Jan 19 03:14:08 2038
+999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999
+1112131415 13 1323785700 Tue Dec 13 14:15:00 2011
+1112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
+201112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
+191112131415.16 13 -1831974284 Wed Dec 13 14:15:16 1911
+203712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
+3712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
+6812131415.16 13 3122633716 Thu Dec 13 14:15:16 2068
+6912131415.16 13 -1590284 Sat Dec 13 14:15:16 1969
+7012131415.16 13 29945716 Sun Dec 13 14:15:16 1970
+1213141599 2 945094500 Mon Dec 13 14:15:00 1999
+1213141500 2 976716900 Wed Dec 13 14:15:00 2000
+END-DATA
+
+*/
+
+# define MAX_BUFF_LEN 1024
+
+int
+main (void)
+{
+ char buff[MAX_BUFF_LEN + 1];
+
+ buff[MAX_BUFF_LEN] = 0;
+ while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
+ {
+ char time_str[MAX_BUFF_LEN];
+ unsigned int syntax_bits;
+ time_t t;
+ if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2)
+ printf ("*\n");
+ else
+ {
+ printf ("%-15s %2u ", time_str, syntax_bits);
+ if (posixtime (&t, time_str, syntax_bits))
+ printf ("%12ld %s", (long int) t, ctime (&t));
+ else
+ printf ("%12s %s", "*", "*\n");
+ }
+ }
+ exit (0);
+
+}
+#endif
+
+/*
+Local Variables:
+compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c"
+End:
+*/
diff --git a/meta/recipes-extended/at/files/posixtm.h b/meta/recipes-extended/at/files/posixtm.h
new file mode 100644
index 000000000..e91749d73
--- /dev/null
+++ b/meta/recipes-extended/at/files/posixtm.h
@@ -0,0 +1,37 @@
+/* Parse dates for touch and date.
+
+ Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Yacc-based version written by Jim Kingdon and David MacKenzie.
+ Rewritten by Jim Meyering. */
+
+#ifndef POSIXTM_H_
+# define POSIXTM_H_
+
+# include <stdbool.h>
+# include <time.h>
+
+/* POSIX Date Syntax flags. */
+# define PDS_LEADING_YEAR 1
+# define PDS_TRAILING_YEAR 2
+# define PDS_CENTURY 4
+# define PDS_SECONDS 8
+# define PDS_PRE_2000 16
+
+bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
+
+#endif
diff --git a/meta/recipes-extended/at/files/use-ldflags.patch b/meta/recipes-extended/at/files/use-ldflags.patch
new file mode 100644
index 000000000..4c698003d
--- /dev/null
+++ b/meta/recipes-extended/at/files/use-ldflags.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+Ensure use of $LDFLAGS during build
+Derived from an OE patch for at-3.1.8
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+--- at-3.1.12.orig/Makefile.in 2009-11-23 07:11:52.000000000 -0800
++++ at-3.1.12/Makefile.in 2010-07-20 16:28:04.000000000 -0700
+@@ -65,13 +65,13 @@
+ all: at atd atrun
+
+ at: $(ATOBJECTS)
+- $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB)
++ $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) $(LDFLAGS)
+ rm -f $(CLONES)
+ $(LN_S) -f at atq
+ $(LN_S) -f at atrm
+
+ atd: $(RUNOBJECTS)
+- $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
++ $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) $(LDFLAGS)
+
+ y.tab.c y.tab.h: parsetime.y
+ $(YACC) -d parsetime.y
diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc
new file mode 100644
index 000000000..9fe864d27
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas.inc
@@ -0,0 +1,29 @@
+DESCRIPTION = "Augeas configuration API"
+HOMEPAGE = "http://augeas.net/"
+BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+SRC_URI = "http://augeas.net/download/${BP}.tar.gz"
+
+DEPENDS = "readline libxml2"
+
+inherit autotools
+
+PACKAGES =+ "${PN}-lenses lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-dbg"
+
+FILES_${PN}-lenses = "${datadir}/augeas/lenses"
+FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
+FILES_lib${BPN}-dev = "${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${includedir} ${libdir}/pkgconfig"
+FILES_lib${BPN}-staticdev = "${libdir}/*.a"
+FILES_lib${BPN}-dbg = "${libdir}/.debug"
+
+RDEPENDS_lib${BPN} += "${PN}-lenses"
+RRECOMMENDS_lib${BPN} += "${PN}"
+
+LEAD_SONAME = "libaugeas.so"
+
+do_install_append() {
+ rm -fr ${D}${datadir}/vim
+}
diff --git a/meta/recipes-extended/augeas/augeas_0.10.0.bb b/meta/recipes-extended/augeas/augeas_0.10.0.bb
new file mode 100644
index 000000000..00921aa85
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas_0.10.0.bb
@@ -0,0 +1,6 @@
+require augeas.inc
+
+PR = "r1"
+
+SRC_URI[md5sum] = "fe1834e90a066c3208ac0214622c7352"
+SRC_URI[sha256sum] = "ec111af06186216930176ebe5ecccdf7bf528528aee9acde1d5d70088484afca"
diff --git a/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch b/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch
new file mode 100644
index 000000000..81f8f0a9c
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/execute_cmd.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+--- execute_cmd.c.orig Fri Jun 3 13:34:42 2011
++++ execute_cmd.c Fri Jun 3 13:36:41 2011
+@@ -2202,7 +2202,11 @@
+ /* If the `lastpipe' option is set with shopt, and job control is not
+ enabled, execute the last element of non-async pipelines in the
+ current shell environment. */
+- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
++ if (lastpipe_opt &&
++#if defined(JOB_CONTROL)
++ job_control == 0 &&
++#endif
++ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ {
+ lstdin = move_to_high_fd (0, 0, 255);
+ if (lstdin > 0)
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
new file mode 100644
index 000000000..876be1e42
--- /dev/null
+++ b/meta/recipes-extended/bash/bash.inc
@@ -0,0 +1,37 @@
+DESCRIPTION = "An sh-compatible command language interpreter."
+HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
+SECTION = "base/shell"
+
+# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "ncurses bison-native"
+
+inherit autotools gettext update-alternatives
+
+PARALLEL_MAKE = ""
+
+bindir = "/bin"
+sbindir = "/sbin"
+
+EXTRA_OECONF = "--enable-job-control"
+export CC_FOR_BUILD = "${BUILD_CC}"
+
+ALTERNATIVE_NAME = "sh"
+ALTERNATIVE_PATH = "${base_bindir}/bash"
+ALTERNATIVE_LINK = "${base_bindir}/sh"
+ALTERNATIVE_PRIORITY = "100"
+
+export AUTOHEADER = "true"
+
+do_configure_prepend () {
+ if [ ! -e acinclude.m4 ]; then
+ cat aclocal.m4 > acinclude.m4
+ fi
+}
+
+pkg_postinst_${PN} () {
+ touch $D${sysconfdir}/shells
+ grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
+ grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
+}
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
new file mode 100644
index 000000000..509d7a092
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "An sh-compatible command language interpreter."
+HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
+SECTION = "base/shell"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
+DEPENDS = "ncurses"
+
+PR = "r10"
+
+SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch001 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
+ ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003"
+
+SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
+SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
+SRC_URI[patch001.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
+SRC_URI[patch001.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
+SRC_URI[patch002.md5sum] = "8443d4385d73ec835abe401d90591377"
+SRC_URI[patch002.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
+SRC_URI[patch003.md5sum] = "15c6653042e9814aa87120098fc7a849"
+SRC_URI[patch003.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
+
+SRC_URI[md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
+SRC_URI[sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
+
+inherit autotools gettext
+
+PARALLEL_MAKE = ""
+
+bindir = "/bin"
+sbindir = "/sbin"
+
+EXTRA_OECONF = "--with-ncurses"
+export CC_FOR_BUILD = "${BUILD_CC}"
+
+export AUTOHEADER = "true"
+
+do_configure_prepend () {
+ if [ ! -e acinclude.m4 ]; then
+ cat aclocal.m4 > acinclude.m4
+ fi
+}
+
+pkg_postinst_${PN} () {
+ touch $D${sysconfdir}/shells
+ grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
+ grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
+}
diff --git a/meta/recipes-extended/bash/bash_4.2.bb b/meta/recipes-extended/bash/bash_4.2.bb
new file mode 100644
index 000000000..e96709a59
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_4.2.bb
@@ -0,0 +1,41 @@
+require bash.inc
+
+PR = "r2"
+
+SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-001;apply=yes;striplevel=0;name=patch001 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-002;apply=yes;striplevel=0;name=patch002 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-003;apply=yes;striplevel=0;name=patch003 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-004;apply=yes;striplevel=0;name=patch004 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-005;apply=yes;striplevel=0;name=patch005 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-006;apply=yes;striplevel=0;name=patch006 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-007;apply=yes;striplevel=0;name=patch007 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-008;apply=yes;striplevel=0;name=patch008 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-009;apply=yes;striplevel=0;name=patch009 \
+ ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \
+ file://execute_cmd.patch;striplevel=0 \
+ "
+
+SRC_URI[tarball.md5sum] = "3fb927c7c33022f1c327f14a81c0d4b0"
+SRC_URI[tarball.sha256sum] = "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8"
+SRC_URI[patch001.md5sum] = "1100bc1dda2cdc06ac44d7e5d17864a3"
+SRC_URI[patch001.sha256sum] = "8d6ca028576c4af23e660a2fbc2112221a11c8a785c0b37f033967e5cd12b47a"
+SRC_URI[patch002.md5sum] = "30e7948079921d3261efcc6a40722135"
+SRC_URI[patch002.sha256sum] = "febac927e199aceeba2004908d971d4afb49b521796c3f42d1166f9fbbfbcef9"
+SRC_URI[patch003.md5sum] = "9ea06decec43a198f3d7cf29acc602f8"
+SRC_URI[patch003.sha256sum] = "5a0a7c15018c87348ea87cb0beea14345faf878dbb0e25c17fa70677194cb4cd"
+SRC_URI[patch004.md5sum] = "fb48f6134d7b013135929476aa0c250c"
+SRC_URI[patch004.sha256sum] = "4e34b0f830d2583d56e14225a66937abc81f45bbafcd2eb49daf61c9462140c1"
+SRC_URI[patch005.md5sum] = "e70e45de33426b38153b390be0dbbcd4"
+SRC_URI[patch005.sha256sum] = "a81749e73004b81cfdf0fe075bec365dc1fef756ee5e3fd142821e317d1459a0"
+SRC_URI[patch006.md5sum] = "ce4e5c484993705b27daa151eca242c2"
+SRC_URI[patch006.sha256sum] = "c91148945a2ddafa792682d7c8668c59e7e645eae1334b15b0d5d9ad22634bd1"
+SRC_URI[patch007.md5sum] = "88d1f96db29461767602e2546803bda7"
+SRC_URI[patch007.sha256sum] = "405826acf443dd1084f236a15cb76d7f0ee2dbe5edff45c5fb836db571fb7e95"
+SRC_URI[patch008.md5sum] = "24c574bf6d6a581e300823d9c1276af6"
+SRC_URI[patch008.sha256sum] = "23080d11a60a78941210e2477f6bca066b45db03defa60da86fd765107ba2437"
+SRC_URI[patch009.md5sum] = "4c5835f2fbab36c4292bb334977e5b6d"
+SRC_URI[patch009.sha256sum] = "e7ed5440b4c19765786e90e4f1ded43195d38b3e4d1c4b39fcc23de9a74ccb20"
+SRC_URI[patch010.md5sum] = "0a51602b535ef661ee707be6c8bdb373"
+SRC_URI[patch010.sha256sum] = "acfc5482c25e6923116fcf4b4f7f6345b80f75ad7299749db4b736ad67aa43dc"
+
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
new file mode 100644
index 000000000..283e2d879
--- /dev/null
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "An arbitrary precision calculator language."
+HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
+BUGTRACKER = ""
+
+LICENSE = "GPLv2+ & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+ file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
+ file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
+ file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
+
+SECTION = "base"
+DEPENDS = "flex"
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
+SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
+
+inherit autotools update-alternatives
+
+ALTERNATIVE_LINKS = "${bindir}/dc"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/blktool/blktool_4-6.bb b/meta/recipes-extended/blktool/blktool_4-6.bb
new file mode 100644
index 000000000..cc1174cdf
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool_4-6.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Tune low-level block device parameters"
+DESCRIPTION = "blktool is used for querying and/or changing settings \
+of a block device. It is like hdparm but a more general tool, as it \
+works on SCSI, IDE and SATA devices."
+HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
+
+DEPENDS = "glib-2.0"
+PR = "r0"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
+ ${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.diff.gz;apply=yes;name=patch"
+
+SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
+SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
+
+SRC_URI[patch.md5sum] = "2d1bc2f2c38b65d47e27da7c7508d17f"
+SRC_URI[patch.sha256sum] = "999f2062203e389327d997724621be37bea9c98fa226238f9f4eb4a6ea25bd4b"
+
+S = "${WORKDIR}/${BPN}-4.orig"
+
+inherit autotools
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
new file mode 100644
index 000000000..d1453a892
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc.inc
@@ -0,0 +1,17 @@
+SUMMARY = "Berkeley LALR Yacc parser generator"
+DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
+parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
+programming language."
+SECTION = "devel"
+LICENSE = "PD"
+
+SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz"
+EXTRA_OECONF += "--program-transform-name='s,^,b,'"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools
+
+do_configure() {
+ oe_runconf
+}
diff --git a/meta/recipes-extended/byacc/byacc_20120115.bb b/meta/recipes-extended/byacc/byacc_20120115.bb
new file mode 100644
index 000000000..4549ca41a
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc_20120115.bb
@@ -0,0 +1,13 @@
+PR = "r0"
+
+# Sigh. This is one of those places where everyone licenses it differently. Someone
+# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
+# "I've found no reliable source which states that byacc must bear a UCB copyright."
+# Setting to PD as this is what the upstream has it as.
+
+LICENSE="PD"
+LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3"
+require byacc.inc
+
+SRC_URI[md5sum] = "3061c62c47ec0f43255afd8fc3f7e3ab"
+SRC_URI[sha256sum] = "4034efc9b59646fc61e29b1a87472cccf1d1aaf45435f9d3bf58dec2b5f0831c"
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
new file mode 100644
index 000000000..070d57b24
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -0,0 +1,41 @@
+
+lib_LTLIBRARIES = libbz2.la
+
+libbz2_la_SOURCES = blocksort.c \
+ huffman.c \
+ crctable.c \
+ randtable.c \
+ compress.c \
+ decompress.c \
+ bzlib.c
+
+bin_PROGRAMS = bzip2 bzip2recover
+
+bzip2_SOURCES = bzip2.c
+bzip2_LDADD = libbz2.la
+bzip2_DEPENDENCIES = libbz2.la
+
+include_HEADERS = bzlib.h
+
+bzip2recover_SOURCES = bzip2recover.c
+bzip2recover_LDADD = libbz2.la
+bzip2recover_DEPENDENCIES = libbz2.la
+
+bin_SCRIPTS = bzgrep bzmore bzdiff
+
+man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
+EXTRA_DIST = $(man_MANS)
+
+install-exec-hook:
+ ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
+ ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
+ ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
+ ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
+ ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
+ ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
+
+install-data-hook:
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
+ echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
+ echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
new file mode 100644
index 000000000..14b1d1809
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -0,0 +1,14 @@
+AC_PREREQ([2.57])
+
+AC_INIT(bzip2, 2.0.5, , libXrender)
+AM_INIT_AUTOMAKE()
+AM_MAINTAINER_MODE
+
+#AM_CONFIG_HEADER(config.h)
+
+# Check for progs
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+AC_OUTPUT([Makefile])
+
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
new file mode 100644
index 000000000..fa8310e12
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Very high-quality data compression program."
+DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
+Huffman coding. Compression is generally considerably better than that achieved by more conventional \
+LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
+HOMEPAGE = "http://www.bzip.org/"
+SECTION = "console/utils"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
+PR = "r5"
+
+SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
+ file://configure.ac \
+ file://Makefile.am"
+
+SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
+SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
+
+PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev"
+
+CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
+
+inherit autotools update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINKS = "${bindir}/bunzip2 ${bindir}/bzcat"
+
+do_configure_prepend () {
+ cp ${WORKDIR}/configure.ac ${S}/
+ cp ${WORKDIR}/Makefile.am ${S}/
+ cp ${STAGING_DATADIR_NATIVE}/automake*/install-sh ${S}/
+}
+
+FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
+
+FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}"
+SECTION_libbz2-dev = "devel"
+RDEPENDS_libbz2-dev = "libbz2 (= ${EXTENDPKGV})"
+
+FILES_libbz2-staticdev = "${libdir}/*.a"
+SECTION_libbz2-staticdev = "devel"
+RDEPENDS_libbz2-staticdev = "libbz2-dev (= ${EXTENDPKGV})"
+
+PROVIDES_append_virtclass-native = " bzip2-full-native"
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
new file mode 100644
index 000000000..17987a660
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -0,0 +1,29 @@
+SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy"
+
+DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \
+information for system services. Chkconfig manipulates the numerous \
+symbolic links in /etc/rc.d, to relieve system administrators of some \
+of the drudgery of manually editing the symbolic links."
+
+HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+DEPENDS = "libnewt popt"
+
+PR = "r1"
+
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
+SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
+
+inherit autotools gettext
+
+EXTRA_OEMAKE += 'MANDIR="${mandir}" BINDIR="${base_sbindir}" SBINDIR="${sbindir}"'
+
+do_install_append() {
+ mkdir -p ${D}/etc/chkconfig.d
+ rm -f ${D}${sbindir}/update-alternatives
+}
diff --git a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
new file mode 100644
index 000000000..a6b8e82a0
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
@@ -0,0 +1,17 @@
+Avoid multiple stat definitions
+Patch taken from cpio mailing list posting 2010-03-19
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
+--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
+@@ -82,4 +82,6 @@
+ #define lstat stat
+ #endif
+ int lstat ();
++#ifndef stat
+ int stat ();
++#endif
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
new file mode 100644
index 000000000..49a7cf52a
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
+recipe, as they share code.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+
+ sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+ if (do_command (handle, command_buffer) == -1
+- || (status = get_status (handle)) == SAFE_READ_ERROR)
++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+ return SAFE_READ_ERROR;
+
+ for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
new file mode 100644
index 000000000..e16585dd3
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
+--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
++++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4 -*- Autoconf -*-
++# serial 5 -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
new file mode 100644
index 000000000..a00799fea
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Avoid multiple stat definitions
+# Patch taken from cpio mailing list posting 2010-03-19
+
+diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
+--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
+@@ -82,4 +82,6 @@
+ #define lstat stat
+ #endif
+ int lstat ();
++#ifndef stat
+ int stat ();
++#endif
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
new file mode 100644
index 000000000..78da20e3d
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -0,0 +1,9 @@
+include cpio_v2.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+PR = "r1"
+
+SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
+SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
new file mode 100644
index 000000000..006e4f6df
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -0,0 +1,16 @@
+require cpio_v2.inc
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
+
+PR = "r1"
+
+SRC_URI += "file://m4extensions.patch \
+ file://avoid_heap_overflow.patch \
+ "
+
+SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
+SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
+
+# Required to build with gcc 4.3 and later:
+CFLAGS += "-fgnu89-inline"
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
new file mode 100644
index 000000000..066e9374a
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -0,0 +1,42 @@
+SUMMARY = "GNU cpio is a program to manage archives of files"
+DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
+another. It handles a number of cpio formats as well as reading and writing tar files."
+HOMEPAGE = "http://www.gnu.org/software/cpio/"
+SECTION = "base"
+
+DEPENDS = "texinfo-native"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+ file://statdef.patch \
+ "
+
+inherit autotools gettext
+
+S = "${WORKDIR}/cpio-${PV}"
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}/
+ mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio.${PN}"
+ rmdir ${D}${bindir}/
+ case ${TARGET_OS} in
+ *-uclibc*) ;;
+ *) mv "${D}${libexecdir}/rmt" "${D}${libexecdir}/rmt.${PN}" ;;
+ esac
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/cpio cpio cpio.${PN} 100
+ if [ -f ${libexecdir}/rmt.${PN} ]
+ then
+ update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 50
+ fi
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove cpio cpio.${PN}
+ if [ -f ${libexecdir}/rmt.${PN} ]
+ then
+ update-alternatives --remove rmt rmt.${PN}
+ fi
+}
diff --git a/meta/recipes-extended/cracklib/cracklib_2.8.18.bb b/meta/recipes-extended/cracklib/cracklib_2.8.18.bb
new file mode 100644
index 000000000..ad8fd5b35
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib_2.8.18.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "A pro-active password checker library"
+HOMEPAGE = "http://sourceforge.net/projects/cracklib"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+DEPENDS = "zlib"
+PR ="r4"
+
+EXTRA_OECONF = "--without-python"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "79053ad8bc714a44cd660cb12116211b"
+SRC_URI[sha256sum] = "2b072f67f7267358459424c3ed70f7f5b70919118e6504a90d3bce37a67c1454"
+
+inherit autotools gettext
diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init
new file mode 100755
index 000000000..08f34beed
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond.init
@@ -0,0 +1,69 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: crond crontab
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: run cron daemon
+# Description: cron is a standard UNIX program that runs user-specified
+# programs at periodic scheduled times. vixie cron adds a
+# number of features to the basic UNIX cron, including better
+# security and more powerful configuration options.
+### END INIT INFO
+
+CROND=/usr/sbin/crond
+CONFIG=/etc/sysconfig/crond
+
+[ -f $CONFIG ] || exit 1
+[ -x $CROND ] || exit 1
+
+. $CONFIG
+
+# Source function library.
+. /etc/init.d/functions
+
+case "$1" in
+ start)
+ if [ $UID -ne 0 ] ; then
+ echo "User has insufficient privilege."
+ exit 1
+ fi
+ echo -n "Starting crond: "
+ start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ ;;
+ stop)
+ if [ $UID -ne 0 ] ; then
+ echo "User has insufficient privilege."
+ exit 1
+ fi
+ echo -n "Stopping crond: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ ;;
+ status)
+ if [ -n "`/bin/pidof $CROND`" ] ; then
+ echo "crond is running."
+ else
+ echo "crond is not running."
+ fi
+ ;;
+ restart)
+ $0 stop && sleep 1 && $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
+ exit 1
+esac
+
+exit 0
+
diff --git a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
new file mode 100644
index 000000000..675872c3c
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -0,0 +1,19 @@
+password-auth is the Fedora's common pam configure file, use oe common pam
+configure files instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+--- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800
++++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800
+@@ -4,7 +4,7 @@
+ #
+ # No PAM authentication called, auth modules not needed
+ account required pam_access.so
+-account include password-auth
++account include common-account
+ session required pam_loginuid.so
+-session include password-auth
+-auth include password-auth
++session include common-session-noninteractive
++auth include common-auth
diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab
new file mode 100644
index 000000000..cc9169eda
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crontab
@@ -0,0 +1,10 @@
+# /etc/crontab: system-wide crontab
+# Unlike any other crontab you don't have to run the `crontab'
+# command to install the new version when you edit this file
+# and files in /etc/cron.d. These files also have username fields,
+# that none of the other crontabs do.
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# m h dom mon dow user command
diff --git a/meta/recipes-extended/cronie/cronie_1.4.8.bb b/meta/recipes-extended/cronie/cronie_1.4.8.bb
new file mode 100644
index 000000000..2d256277b
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie_1.4.8.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Cron daemon for executing programs at set times"
+DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
+specified programs at scheduled times and related tools. It is based on the \
+original cron and has security and configuration enhancements like the \
+ability to use pam and SELinux."
+HOMEPAGE = "https://fedorahosted.org/cronie/"
+BUGTRACKER = "mmaslano@redhat.com"
+
+# Internet Systems Consortium License
+LICENSE = "ISC & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
+ file://src/cron.h;endline=20;md5=b425c334265026177128353a142633b4 \
+ file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
+
+SECTION = "utils"
+
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)}"
+PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
+
+PR = "r2"
+
+SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
+ file://crond.init \
+ file://crontab \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://crond_pam_config.patch"
+
+
+SRC_URI[md5sum] = "9b1d2ce6db8d1883e06635f437170657"
+SRC_URI[sha256sum] = "a3b910876f255712f1a5c364b74f34b0ceac9f6f3bbc45e854c5722785f513b3"
+
+inherit autotools update-rc.d useradd
+
+EXTRA_OECONF += "\
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
+
+INITSCRIPT_NAME = "crond"
+INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "crontab"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/sysconfig/
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
+ install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
+
+ # below are necessary for a complete cron environment
+ install -d ${D}${localstatedir}/spool/cron
+ install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
+ mkdir -p ${D}${sysconfdir}/cron.d
+ mkdir -p ${D}${sysconfdir}/cron.hourly
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${sysconfdir}/cron.weekly
+ mkdir -p ${D}${sysconfdir}/cron.monthly
+ touch ${D}${sysconfdir}/cron.deny
+
+ # below setting is necessary to allow normal user using crontab
+
+ # setgid for crontab binary
+ chown root:crontab ${D}/usr/bin/crontab
+ chmod 2755 ${D}/usr/bin/crontab
+
+ # allow 'crontab' group write to /var/spool/cron
+ chown root:crontab ${D}/var/spool/cron
+ chmod 770 ${D}/var/spool/cron
+
+ chmod 600 ${D}/etc/crontab
+}
+
+FILES_${PN} += "${sysconfdir}/cron*"
+
diff --git a/meta/recipes-extended/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 000000000..e6544b560
--- /dev/null
+++ b/meta/recipes-extended/cups/cups-1.4.6/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,70 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sun, 30 Jan 2011 16:37:27 +0100
+Subject: [PATCH] don't try to run generated binaries
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ ppdc/Makefile | 30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/ppdc/Makefile b/ppdc/Makefile
+index 0288d47..fc87f1b 100644
+--- a/ppdc/Makefile
++++ b/ppdc/Makefile
+@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+ libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
+ $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+- echo Generating localization strings...
+- ./genstrings >sample.c
++# echo Generating localization strings...
++# ./genstrings >sample.c
+
+
+ #
+@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
+ $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+- echo Testing PPD compiler...
+- ./ppdc-static -l en,fr -I ../data foo.drv
+- ./ppdc-static -l en,fr -z -I ../data foo.drv
++# echo Testing PPD compiler...
++# ./ppdc-static -l en,fr -I ../data foo.drv
++# ./ppdc-static -l en,fr -z -I ../data foo.drv
+
+
+ #
+@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
+ ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ $(COMMONLIBS) $(LIBZ)
+ echo Testing PPD importer...
+- $(RM) -r ppd ppd2 sample-import.drv
+- ./ppdc-static -I ../data sample.drv
+- ./ppdi-static -I ../data -o sample-import.drv ppd/*
+- ./ppdc-static -I ../data -d ppd2 sample-import.drv
+- if diff -r ppd ppd2 >/dev/null; then \
+- echo PPD import OK; \
+- else \
+- echo PPD import FAILED; \
+- exit 1; \
+- fi
++# $(RM) -r ppd ppd2 sample-import.drv
++# ./ppdc-static -I ../data sample.drv
++# ./ppdi-static -I ../data -o sample-import.drv ppd/*
++# ./ppdc-static -I ../data -d ppd2 sample-import.drv
++# if diff -r ppd ppd2 >/dev/null; then \
++# echo PPD import OK; \
++# else \
++# echo PPD import FAILED; \
++# exit 1; \
++# fi
+
+
+ #
+--
+1.6.6.1
+
diff --git a/meta/recipes-extended/cups/cups-1.4.6/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups-1.4.6/use_echo_only_in_init.patch
new file mode 100644
index 000000000..26b57dd6c
--- /dev/null
+++ b/meta/recipes-extended/cups/cups-1.4.6/use_echo_only_in_init.patch
@@ -0,0 +1,13 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+--- a/init/cups.sh.in.orig 2008-10-04 16:50:46.000000000 -0300
++++ b/init/cups.sh.in 2008-10-04 16:51:39.000000000 -0300
+@@ -68,7 +68,7 @@
+ ECHO_ERROR=:
+ ;;
+
+- Linux*)
++ DISABLELinux*)
+ IS_ON=/bin/true
+ if test -f /etc/init.d/functions; then
+ . /etc/init.d/functions
diff --git a/meta/recipes-extended/cups/cups14.inc b/meta/recipes-extended/cups/cups14.inc
new file mode 100644
index 000000000..7c1968220
--- /dev/null
+++ b/meta/recipes-extended/cups/cups14.inc
@@ -0,0 +1,98 @@
+SUMMARY = "An Internet printing system for Unix"
+DESCRIPTION = "An Internet printing system for Unix."
+SECTION = "console/utils"
+LICENSE = "GPLv2 LGPLv2"
+DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib"
+PROVIDES = "cups14"
+
+SRC_URI = "ftp://ftp.easysw.com/pub/cups/${PV}/cups-${PV}-source.tar.bz2"
+
+LEAD_SONAME = "libcupsdriver.so"
+
+inherit autotools binconfig
+
+EXTRA_OECONF = " \
+ --enable-gnutls \
+ --enable-dbus \
+ --enable-browsing \
+ --disable-openssl \
+ --disable-tiff \
+ --without-php \
+ --without-perl \
+ --without-python \
+ --without-java \
+ "
+
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ DSOFLAGS="${LDFLAGS}" oe_runconf
+}
+
+do_compile () {
+ sed -i s:STRIP:NOSTRIP: Makedefs
+ sed -i s:serial:: backend/Makefile
+
+ echo "all:" > man/Makefile
+ echo "libs:" >> man/Makefile
+ echo "install:" >> man/Makefile
+ echo "install-data:" >> man/Makefile
+ echo "install-exec:" >> man/Makefile
+ echo "install-headers:" >> man/Makefile
+ echo "install-libs:" >> man/Makefile
+
+ oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
+ "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
+ "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
+ "LIBZ=-lz -L${STAGING_LIBDIR}" \
+ "-I."
+}
+
+fakeroot do_install () {
+ oe_runmake "DSTROOT=${D}" install
+
+ # This directory gets installed with perms 511, which makes packaging fail
+ chmod 0711 "${D}/${localstatedir}/run/cups/certs"
+}
+
+python do_package_append() {
+ # Change permissions back the way they were, they probably had a reason...
+ workdir = d.getVar('WORKDIR', True)
+ os.system('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir)
+}
+
+PACKAGES =+ "${PN}-lib ${PN}-libimage"
+
+FILES_${PN} += "${exec_prefix}/lib/cups/backend \
+ ${exec_prefix}/lib/cups/cgi-bin \
+ ${exec_prefix}/lib/cups/filter \
+ ${exec_prefix}/lib/cups/monitor \
+ ${exec_prefix}/lib/cups/notifier \
+ ${exec_prefix}/lib/cups/daemon \
+ "
+
+FILES_${PN}-lib = "${libdir}/libcups.so.*"
+
+FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
+
+FILES_${PN}-dbg += "${exec_prefix}/lib/cups/backend/.debug \
+ ${exec_prefix}/lib/cups/cgi-bin/.debug \
+ ${exec_prefix}/lib/cups/filter/.debug \
+ ${exec_prefix}/lib/cups/monitor/.debug \
+ ${exec_prefix}/lib/cups/notifier/.debug \
+ ${exec_prefix}/lib/cups/daemon/.debug \
+ "
+
+#package the html for the webgui inside the main packages (~1MB uncompressed)
+
+FILES_${PN} += "${datadir}/doc/cups/images \
+ ${datadir}/doc/cups/*html \
+ ${datadir}/doc/cups/*.css \
+ ${datadir}/icons/ \
+ "
+
+SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
+cups_sysroot_preprocess () {
+ sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
+}
diff --git a/meta/recipes-extended/cups/cups_1.4.6.bb b/meta/recipes-extended/cups/cups_1.4.6.bb
new file mode 100644
index 000000000..ec555d791
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_1.4.6.bb
@@ -0,0 +1,19 @@
+require cups14.inc
+
+PR = "r3"
+DEPENDS += "libusb \
+ ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=956e7600195e6139f12de8c2a5bbefa9"
+SRC_URI += " \
+ file://use_echo_only_in_init.patch \
+ file://0001-don-t-try-to-run-generated-binaries.patch \
+ "
+
+SRC_URI[md5sum] = "de8fb5a29c36554925c0c6a6e2c0dae1"
+SRC_URI[sha256sum] = "f08711702a77b52c7150f96fe1f45482f6151cb95ef601268c528607fe6ad514"
+
+EXTRA_OECONF += " --disable-gssapi --enable-debug --disable-relro --enable-libusb \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
new file mode 100644
index 000000000..41713b38f
--- /dev/null
+++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "cwautomacros: a collection of autoconf m4 macros"
+SECTION = "base"
+HOMEPAGE = "http://cwautomacros.berlios.de/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2"
+
+PR = "r0"
+
+SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
+SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
+
+do_install() {
+ oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
new file mode 100644
index 000000000..0fb3a31bc
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Diffutils contains tools used for finding differences between files."
+DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
+sdiff, and cmp utilities. These programs are usually \
+used for creating patch files."
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+PR = "r4"
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
+SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
+
+inherit autotools update-alternatives gettext
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality. regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
+
+ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/diffutils/diffutils_3.2.bb b/meta/recipes-extended/diffutils/diffutils_3.2.bb
new file mode 100644
index 000000000..174866c1c
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_3.2.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
+sdiff, and cmp utilities. These programs are usually \
+used for creating patch files."
+SECTION = "base"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PR = "r0"
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
+
+inherit autotools update-alternatives gettext
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality. regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
+
+ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp"
+ALTERNATIVE_PRIORITY = "100"
+
+SRC_URI[md5sum] = "22e4deef5d8949a727b159d6bc65c1cc"
+SRC_URI[sha256sum] = "2aaaebef615be7dc365306a14caa5d273a4fc174f9f10abca8b60e082c054ed3"
diff --git a/meta/recipes-extended/ed/ed-1.6/ed-1.2-build.patch b/meta/recipes-extended/ed/ed-1.6/ed-1.2-build.patch
new file mode 100644
index 000000000..d30b39336
--- /dev/null
+++ b/meta/recipes-extended/ed/ed-1.6/ed-1.2-build.patch
@@ -0,0 +1,43 @@
+http://lists.gnu.org/archive/html/bug-ed/2008-12/msg00001.html
+
+2007-04-16 Mike Frysinger <vapier@gentoo.org>
+
+ * Do not set CC/CXX/CPPFLAGS/LDFLAGS to "" so that user can
+ override if they so choose.
+ * Only set CFLAGS/CXXFLAGS if user did not specify any.
+
+ed had already taken GPLv3 when this patch out, so it should be GPLv3.
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Upstream-Status: Pending
+
+Index: ed-1.5/configure
+===================================================================
+--- ed-1.5.orig/configure 2010-08-30 07:34:49.000000000 -0700
++++ ed-1.5/configure 2010-11-20 16:42:20.490645823 -0800
+@@ -26,10 +26,6 @@
+ mandir='$(datadir)/man'
+ sysconfdir='$(prefix)/etc'
+ program_prefix=
+-CC=
+-CPPFLAGS=
+-CFLAGS='-Wall -W -O2'
+-LDFLAGS=
+
+ # Loop over all args
+ while [ -n "$1" ] ; do
+@@ -105,6 +101,14 @@
+ esac
+ done
+
++# Defaults if the user did not select any
++if [ x"${CFLAGS+set}" != xset ] ; then
++ CFLAGS='-Wall -W -O2'
++fi
++if [ x"${CXXFLAGS+set}" != xset ] ; then
++ CXXFLAGS='-Wall -W -O2'
++fi
++
+ # Find the source files, if location was not specified.
+ srcdirtext=
+ if [ -z "${srcdir}" ] ; then
diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb
new file mode 100644
index 000000000..d251e4e39
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_0.5.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "GNU ed is a line-oriented text editor"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
+ file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
+
+PR = "r2"
+SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/ed/ed-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
+
+inherit autotools
+
+EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
+
+CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
+CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
+
+
diff --git a/meta/recipes-extended/ed/ed_1.6.bb b/meta/recipes-extended/ed/ed_1.6.bb
new file mode 100644
index 000000000..cc72588f0
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_1.6.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "a line-oriented text editor"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+BUGTRACKER = ""
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://ed.h;endline=20;md5=c708cda1b2e8d723d458690b7db03878 \
+ file://main.c;endline=24;md5=1bd039d59e04ee5f82adcc970144a2c3"
+
+SECTION = "base"
+PR = "r0"
+
+# LSB states that ed should be in /bin/
+bindir = "${base_bindir}"
+
+SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz \
+ file://ed-1.2-build.patch"
+
+SRC_URI[md5sum] = "9a78593decccaa889523aa4bb555ed4b"
+SRC_URI[sha256sum] = "211c67b0c4aae277d34b1c5f842db1952e468e5905142868e4718ac838f08a65"
+
+do_configure() {
+ ${S}/configure
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/meta/recipes-extended/ethtool/ethtool_2.6.36.bb b/meta/recipes-extended/ethtool/ethtool_2.6.36.bb
new file mode 100644
index 000000000..5824ce084
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool_2.6.36.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://sourceforge.net/projects/gkernel/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://ethtool.c;firstline=4;endline=16;md5=6db6b005b8390ea76cb85a2c7bda8e6b"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/ethtool-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "3b2322695e9ee7bf447ebcdb85f93e83"
+SRC_URI[sha256sum] = "639622180fe48dc7bb117ffbf263395d7ae47aac9819b8d9f83ff053ecf17bdd"
+
+inherit autotools
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
new file mode 100644
index 000000000..65bd64277
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
@@ -0,0 +1,56 @@
+Upstream-Status: Inappropriate [legacy version]
+
+the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
+
+against 4.2.31
+07/08/2010 - qhe
+
+diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
+index 143a9e5..0f27ceb 100644
+--- a/gnulib/m4/extensions.m4
++++ b/gnulib/m4/extensions.m4
+@@ -12,44 +12,6 @@
+ # enough in this area it's likely we'll need to redefine
+ # AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+-# AC_USE_SYSTEM_EXTENSIONS
+-# ------------------------
+-# Enable extensions on systems that normally disable them,
+-# typically due to standards-conformance issues.
+-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+-[
+- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+- AC_BEFORE([$0], [AC_RUN_IFELSE])
+-
+- AC_REQUIRE([AC_GNU_SOURCE])
+- AC_REQUIRE([AC_AIX])
+- AC_REQUIRE([AC_MINIX])
+-
+- AH_VERBATIM([__EXTENSIONS__],
+-[/* Enable extensions on Solaris. */
+-#ifndef __EXTENSIONS__
+-# undef __EXTENSIONS__
+-#endif
+-#ifndef _POSIX_PTHREAD_SEMANTICS
+-# undef _POSIX_PTHREAD_SEMANTICS
+-#endif
+-#ifndef _TANDEM_SOURCE
+-# undef _TANDEM_SOURCE
+-#endif])
+- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+- [ac_cv_safe_to_define___extensions__],
+- [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([
+-# define __EXTENSIONS__ 1
+- AC_INCLUDES_DEFAULT])],
+- [ac_cv_safe_to_define___extensions__=yes],
+- [ac_cv_safe_to_define___extensions__=no])])
+- test $ac_cv_safe_to_define___extensions__ = yes &&
+- AC_DEFINE([__EXTENSIONS__])
+- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+- AC_DEFINE([_TANDEM_SOURCE])
+-])
+-
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
new file mode 100644
index 000000000..69c1486cf
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
@@ -0,0 +1,781 @@
+Upstream-Status: Backport
+
+commit af974034b68bf59337c7a384e488a518a77dfecd
+Author: James Youngman <jay@gnu.org>
+Date: Sat Jul 11 19:55:27 2009 +0100
+
+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
+
+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
+ coredumps.
+ * find/tree.c (set_new_parent): Initialise struct
+ predicate->arg_text to NULL (instead of leaving it uninitialised).
+ (get_new_pred_noarg): Likewise.
+ (get_new_pred): Initialise predicate->arg_text to
+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
+ bugs.
+ (get_new_pred_chk_op): Use get_new_pred_noarg.
+ (print_predicate): Use an if statement instead of
+ two ternary operators.
+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
+ being the argument (if any) of this predicate. Pass it to
+ get_new_pred_chk_op.
+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
+ (insert_primary_noarg): New function; calls insert_primary with
+ arg=NULL.
+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
+ the filename from which we collected the stat information.
+ (parse_closeparen, parse_delete, parse_and, parse_or,
+ parse_comma): Use get_new_pred_noarg.
+ (parse_cnewer, parse_newer, parse_anewer): Use new
+ collect_arg_stat_info and insert_primary interface.
+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
+ insert_primary_noarg.
+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
+ (parse_used, parse_iname, parse_fprint, insert_fprint,
+ parse_fstype, parse_ilname): Use new collect_arg and
+ insert_primary interfaces.
+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
+ parse_perm, parse_size, parse_user, parse_time): Use new
+ collect_arg and insert_primary_withpred interface.
+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
+ (insert_regex, parse_samefile): Use new insert_primary_withpred
+ interface.
+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
+ new insert_primary_withpred interface.
+ * find/defs.h (struct predicate.arg_text): make const.
+ Add declarations for new function get_new_pred_noarg and
+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
+ and insert_primary_withpred.
+
+diff --git a/ChangeLog b/ChangeLog
+index 6e346b8..e8ba0f8 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,0 +1,45 @@
++2009-07-11 James Youngman <jay@gnu.org>
++
++ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
++ coredumps.
++ * find/tree.c (set_new_parent): Initialise struct
++ predicate->arg_text to NULL (instead of leaving it uninitialised).
++ (get_new_pred_noarg): Likewise.
++ (get_new_pred): Initialise predicate->arg_text to
++ "ThisShouldBeSetToSomethingElse" to make it easier to notice
++ bugs.
++ (get_new_pred_chk_op): Use get_new_pred_noarg.
++ (print_predicate): Use an if statement instead of
++ two ternary operators.
++ * find/util.c (insert_primary_withpred): Accept new argument, arg,
++ being the argument (if any) of this predicate. Pass it to
++ get_new_pred_chk_op.
++ (insert_primary): Likewise (pass arg to insert_primary_withpred).
++ (insert_primary_noarg): New function; calls insert_primary with
++ arg=NULL.
++ * find/parser.c (collect_arg_stat_info): Add an output parameter;
++ the filename from which we collected the stat information.
++ (parse_closeparen, parse_delete, parse_and, parse_or,
++ parse_comma): Use get_new_pred_noarg.
++ (parse_cnewer, parse_newer, parse_anewer): Use new
++ collect_arg_stat_info and insert_primary interface.
++ (parse_print, parse_prune, parse_nouser, parse_empty): Use
++ insert_primary_noarg.
++ (parse_accesscheck, parse_false): Use insert_primary_noarg.
++ (parse_used, parse_iname, parse_fprint, insert_fprint,
++ parse_fstype, parse_ilname): Use new collect_arg and
++ insert_primary interfaces.
++ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
++ parse_perm, parse_size, parse_user, parse_time): Use new
++ collect_arg and insert_primary_withpred interface.
++ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
++ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
++ (insert_regex, parse_samefile): Use new insert_primary_withpred
++ interface.
++ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
++ new insert_primary_withpred interface.
++ * find/defs.h (struct predicate.arg_text): make const.
++ Add declarations for new function get_new_pred_noarg and
++ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
++ and insert_primary_withpred.
++
+diff --git a/find/defs.h b/find/defs.h
+index 1708d83..4539fd9 100644
+--- a/find/defs.h
++++ b/find/defs.h
+@@ -297,7 +297,7 @@ struct predicate
+ boolean artificial;
+
+ /* The raw text of the argument of this predicate. */
+- char *arg_text;
++ const char *arg_text;
+
+ /* Information needed by the predicate processor.
+ Next to each member are listed the predicates that use it. */
+@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
+ /* tree.c */
+ struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
+ struct predicate * get_eval_tree PARAMS((void));
++struct predicate *get_new_pred_noarg (const struct parser_table *entry);
+ struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
+-struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
++struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
++ const char *arg));
+ float calculate_derived_rates PARAMS((struct predicate *p));
+
+ /* util.c */
+-struct predicate *insert_primary PARAMS((const struct parser_table *entry));
+-struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
++struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
++struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
++struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
+ void usage PARAMS((FILE *fp, int status, char *msg));
+ extern boolean check_nofollow(void);
+ void complete_pending_execs(struct predicate *p);
+diff --git a/find/parser.c b/find/parser.c
+index 534b670..2e6b989 100644
+--- a/find/parser.c
++++ b/find/parser.c
+@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
+ }
+
+ static boolean
+-collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
++collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
++ const char **argument)
+ {
+ const char *filename;
+ if (collect_arg(argv, arg_ptr, &filename))
+ {
++ *argument = filename;
+ if (0 == (options.xstat)(filename, p))
+ {
+ return true;
+@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
+ }
+ else
+ {
++ *argument = NULL;
+ return false;
+ }
+ }
+@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = get_new_pred (entry);
++ our_pred = get_new_pred_noarg (entry);
+ our_pred->pred_func = pred_and;
+ our_pred->p_type = BI_OP;
+ our_pred->p_prec = AND_PREC;
+@@ -691,11 +694,12 @@ static boolean
+ parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ struct stat stat_newer;
++ const char *arg;
+
+ set_stat_placeholders(&stat_newer);
+- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, arg);
+ our_pred->args.reftime.xval = XVAL_ATIME;
+ our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
+ our_pred->args.reftime.kind = COMP_GT;
+@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = get_new_pred (entry);
++ our_pred = get_new_pred_noarg (entry);
+ our_pred->pred_func = pred_closeparen;
+ our_pred->p_type = CLOSE_PAREN;
+ our_pred->p_prec = NO_PREC;
+@@ -725,11 +729,12 @@ static boolean
+ parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ struct stat stat_newer;
++ const char *arg;
+
+ set_stat_placeholders(&stat_newer);
+- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, arg);
+ our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
+ our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
+ our_pred->args.reftime.kind = COMP_GT;
+@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = get_new_pred (entry);
++ our_pred = get_new_pred_noarg (entry);
+ our_pred->pred_func = pred_comma;
+ our_pred->p_type = BI_OP;
+ our_pred->p_prec = COMMA_PREC;
+@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->side_effects = our_pred->no_default_print = true;
+ /* -delete implies -depth */
+ options.do_dir_first = false;
+@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
+ return true;
+ }
+@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->side_effects = our_pred->no_default_print = false;
+ our_pred->est_success_rate = 0.0f;
+@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
+ static boolean
+ insert_fls (const struct parser_table* entry, const char *filename)
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary_noarg (entry);
+ if (filename)
+ open_output_file (filename, &our_pred->args.printf_vec);
+ else
+@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
+ const char *filename;
+ if (collect_arg(argv, arg_ptr, &filename))
+ {
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, filename);
+ open_output_file (filename, &our_pred->args.printf_vec);
+ our_pred->side_effects = our_pred->no_default_print = true;
+ our_pred->need_stat = our_pred->need_type = false;
+@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
+ static boolean
+ insert_fprint(const struct parser_table* entry, const char *filename)
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, filename);
+ if (filename)
+ open_output_file (filename, &our_pred->args.printf_vec);
+ else
+@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
+ const char *typename;
+ if (collect_arg(argv, arg_ptr, &typename))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, typename);
+ our_pred->args.str = typename;
+
+ /* This is an expensive operation, so although there are
+@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
+ return false;
+ }
+ }
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, groupname);
+ our_pred->args.gid = gid;
+ our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
+ return true;
+@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
+ const char *name;
+ if (collect_arg(argv, arg_ptr, &name))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, name);
+ our_pred->args.str = name;
+ /* Use the generic glob pattern estimator to figure out how many
+ * links will match, but bear in mind that most files won't be links.
+@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ if (check_name_arg("-iname", name))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, name);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->args.str = name;
+ our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
+@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
+ fnmatch_sanitycheck ();
+ if (collect_arg (argv, arg_ptr, &name))
+ {
+- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
++ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->args.str = name;
+ our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
+@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
+ fnmatch_sanitycheck();
+ if (collect_arg(argv, arg_ptr, &name))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, name);
+ our_pred->args.str = name;
+ our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
+ return true;
+@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
+ "arithmetic overflow while converting %s "
+ "minutes to a number of seconds"))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, minutes);
+ our_pred->args.reftime = tval;
+ our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
+ return true;
+@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
+ fnmatch_sanitycheck();
+ if (check_name_arg("-name", name))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, name);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->args.str = name;
+ our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
+@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) &argv;
+ (void) &arg_ptr;
+
+- our_pred = get_new_pred_chk_op (entry);
++ our_pred = get_new_pred_chk_op (entry, NULL);
+ our_pred->pred_func = pred_negate;
+ our_pred->p_type = UNI_OP;
+ our_pred->p_prec = NEGATE_PREC;
+@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ struct predicate *our_pred;
+ struct stat stat_newer;
++ const char *arg;
+
+ set_stat_placeholders(&stat_newer);
+- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
+ {
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, arg);
+ our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
+ our_pred->args.reftime.xval = XVAL_MTIME;
+ our_pred->args.reftime.kind = COMP_GT;
+@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (*arg_ptr)++;
+ }
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, argv[*arg_ptr]);
+
+
+ switch (x)
+@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) &argv;
+ (void) &arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, NULL);
+ our_pred->est_success_rate = 1e-4;
+ #ifdef CACHE_IDS
+ if (gid_unused == NULL)
+@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) arg_ptr;
+
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->est_success_rate = 1e-3;
+ #ifdef CACHE_IDS
+ if (uid_unused == NULL)
+@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = get_new_pred_chk_op (entry);
++ our_pred = get_new_pred_chk_op (entry, NULL);
+ our_pred->pred_func = pred_openparen;
+ our_pred->p_type = OPEN_PAREN;
+ our_pred->p_prec = NO_PREC;
+@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = get_new_pred (entry);
++ our_pred = get_new_pred_noarg (entry);
+ our_pred->pred_func = pred_or;
+ our_pred->p_type = BI_OP;
+ our_pred->p_prec = OR_PREC;
+@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
+ const char *name;
+ if (collect_arg(argv, arg_ptr, &name))
+ {
+- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
++ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->args.str = name;
+ our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
+@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
+ rate = 0.9986; /* probably matches anything but a broken symlink */
+ }
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, perm_expr);
+ our_pred->est_success_rate = rate;
+ if (havekind)
+ {
+@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ /* -print has the side effect of printing. This prevents us
+ from doing undesired multiple printing when the user has
+ already specified -print. */
+@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ if (options.do_dir_first == false)
+ our_pred->need_stat = our_pred->need_type = false;
+ /* -prune has a side effect that it does not descend into
+@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
+ static boolean
+ parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary_noarg (entry);
+ (void) argv;
+ (void) arg_ptr;
+ our_pred->need_stat = our_pred->need_type = false;
+@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
+ {
+ struct re_pattern_buffer *re;
+ const char *error_message;
+- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
++ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
+ our_pred->need_stat = our_pred->need_type = false;
+ re = xmalloc (sizeof (struct re_pattern_buffer));
+ our_pred->args.regex = re;
+@@ -2061,6 +2067,7 @@ static boolean
+ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ struct predicate *our_pred;
++ char *arg;
+ uintmax_t num;
+ char suffix;
+ enum comparison_type c_type;
+@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
+ */
+ if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+ return false;
++ arg = argv[*arg_ptr];
+
+- len = strlen (argv[*arg_ptr]);
++ len = strlen (arg);
+ if (len == 0)
+ error (1, 0, _("invalid null argument to -size"));
+
+- suffix = argv[*arg_ptr][len - 1];
++ suffix = arg[len - 1];
+ switch (suffix)
+ {
+ case 'b':
+ blksize = 512;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case 'c':
+ blksize = 1;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case 'k':
+ blksize = 1024;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case 'M': /* Megabytes */
+ blksize = 1024*1024;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case 'G': /* Gigabytes */
+ blksize = 1024*1024*1024;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case 'w':
+ blksize = 2;
+- argv[*arg_ptr][len - 1] = '\0';
++ arg[len - 1] = '\0';
+ break;
+
+ case '0':
+@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
+ error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
+ }
+ /* TODO: accept fractional megabytes etc. ? */
+- if (!get_num (argv[*arg_ptr], &num, &c_type))
++ if (!get_num (arg, &num, &c_type))
+ {
+ error(1, 0,
+ _("Invalid argument `%s%c' to -size"),
+- argv[*arg_ptr], (int)suffix);
++ arg, (int)suffix);
+ return false;
+ }
+- our_pred = insert_primary (entry);
++our_pred = insert_primary (entry, arg);
+ our_pred->args.size.kind = c_type;
+ our_pred->args.size.blocksize = blksize;
+ our_pred->args.size.size = num;
+@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
+ struct predicate *our_pred;
+ struct stat st, fst;
+ int fd, openflags;
++ const char *filename;
+
+ set_stat_placeholders(&st);
+- if (!collect_arg_stat_info(argv, arg_ptr, &st))
++ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
+ return false;
+
+ set_stat_placeholders(&fst);
+@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
+ }
+ }
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, filename);
+ our_pred->args.samefileid.ino = st.st_ino;
+ our_pred->args.samefileid.dev = st.st_dev;
+ our_pred->args.samefileid.fd = fd;
+@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
+ (void) argv;
+ (void) arg_ptr;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->est_success_rate = 1.0f;
+ return true;
+@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
+ struct predicate *our_pred;
+ (void) argv;
+ (void) arg_ptr;
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary_noarg (entry);
+ our_pred->need_stat = our_pred->need_type = false;
+ our_pred->side_effects = our_pred->no_default_print = false;
+ if (pred_is(our_pred, pred_executable))
+@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
+ struct timespec zero = {0,0};
+ if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
+ {
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, offset_str);
+ our_pred->args.reftime = tval;
+ our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
+ return true;
+@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
+ return false;
+ }
+ }
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, username);
+ our_pred->args.uid = uid;
+ our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
+ return true;
+@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
+ error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
+ return false;
+ }
+- our_pred = insert_primary_withpred (entry, which_pred);
++ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
+ our_pred->est_success_rate = rate;
+
+ /* Figure out if we will need to stat the file, because if we don't
+@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
+ struct segment **segmentp; /* Address of current segment. */
+ struct predicate *our_pred;
+
+- our_pred = insert_primary_withpred (entry, func);
++ our_pred = insert_primary_withpred (entry, func, format_const);
+ our_pred->side_effects = our_pred->no_default_print = true;
+ our_pred->args.printf_vec = *vec;
+ our_pred->need_type = false;
+@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
+ if ((argv == NULL) || (argv[*arg_ptr] == NULL))
+ return false;
+
+- our_pred = insert_primary_withpred (entry, func);
++ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
+ our_pred->side_effects = our_pred->no_default_print = true;
+ our_pred->need_type = our_pred->need_stat = false;
+
+@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
+ if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
+ return false;
+
+- our_pred = insert_primary (entry);
++ our_pred = insert_primary (entry, orig_timearg);
+ our_pred->args.reftime = tval;
+ our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
+
+@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
+
+ if (get_num (numstr, &num, &c_type))
+ {
+- struct predicate *our_pred = insert_primary (entry);
++ struct predicate *our_pred = insert_primary (entry, numstr);
+ our_pred->args.numinfo.kind = c_type;
+ our_pred->args.numinfo.l_val = num;
+
+diff --git a/find/tree.c b/find/tree.c
+index 7420c60..60a0601 100644
+--- a/find/tree.c
++++ b/find/tree.c
+@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
+ /* Prints a predicate */
+ void print_predicate(FILE *fp, const struct predicate *p)
+ {
+- fprintf (fp, "%s%s%s",
+- p->p_name,
+- p->arg_text ? " " : "",
+- p->arg_text ? p->arg_text : "");
++ if (p->arg_text)
++ {
++ fprintf (fp, "%s %s", p->p_name, p->arg_text);
++ }
++ else
++ {
++ fprintf (fp, "%s", p->p_name);
++ }
+ }
+
+
+@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
+ new_parent->need_stat = false;
+ new_parent->need_type = false;
+ new_parent->p_cost = NeedsNothing;
+-
++ new_parent->arg_text = NULL;
++
+ switch (high_prec)
+ {
+ case COMMA_PREC:
+@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
+ p->visits = p->successes = 0;
+ }
+
++
++struct predicate *
++get_new_pred_noarg (const struct parser_table *entry)
++{
++ struct predicate *p = get_new_pred(entry);
++ if (p)
++ {
++ p->arg_text = NULL;
++ }
++ return p;
++}
++
+
+ /* Return a pointer to a new predicate structure, which has been
+ linked in as the last one in the predicates list.
+@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
+ last_pred->no_default_print = false;
+ last_pred->need_stat = true;
+ last_pred->need_type = true;
++ last_pred->p_cost = NeedsUnknown;
++ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
+ last_pred->args.str = NULL;
+ last_pred->pred_next = NULL;
+ last_pred->pred_left = NULL;
+@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
+ predicate is an operator. If it isn't, the AND operator is inserted. */
+
+ struct predicate *
+-get_new_pred_chk_op (const struct parser_table *entry)
++get_new_pred_chk_op (const struct parser_table *entry,
++ const char *arg)
+ {
+ struct predicate *new_pred;
+ static const struct parser_table *entry_and = NULL;
+@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
+ case PRIMARY_TYPE:
+ case CLOSE_PAREN:
+ /* We need to interpose the and operator. */
+- new_pred = get_new_pred (entry_and);
++ new_pred = get_new_pred_noarg (entry_and);
+ new_pred->pred_func = pred_and;
+ new_pred->p_name = "-a";
+ new_pred->p_type = BI_OP;
+ new_pred->p_prec = AND_PREC;
+ new_pred->need_stat = false;
+ new_pred->need_type = false;
++ new_pred->arg_text = NULL;
+ new_pred->args.str = NULL;
+ new_pred->side_effects = false;
+ new_pred->no_default_print = false;
+@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
+ }
+
+ new_pred = get_new_pred (entry);
++ new_pred->arg_text = arg;
+ new_pred->parser_entry = entry;
+ return new_pred;
+ }
+diff --git a/find/util.c b/find/util.c
+index a06eada..cc9a3eb 100644
+--- a/find/util.c
++++ b/find/util.c
+@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
+ operator. */
+
+ struct predicate *
+-insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
++insert_primary_withpred (const struct parser_table *entry,
++ PRED_FUNC pred_func,
++ const char *arg)
+ {
+ struct predicate *new_pred;
+
+- new_pred = get_new_pred_chk_op (entry);
++ new_pred = get_new_pred_chk_op (entry, arg);
+ new_pred->pred_func = pred_func;
+ new_pred->p_name = entry->parser_name;
+ new_pred->args.str = NULL;
+@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
+ either not there at all (we are the very first node) or is an
+ operator. */
+ struct predicate *
+-insert_primary (const struct parser_table *entry)
++insert_primary (const struct parser_table *entry, const char *arg)
+ {
+ assert (entry->pred_func != NULL);
+- return insert_primary_withpred(entry, entry->pred_func);
++ return insert_primary_withpred(entry, entry->pred_func, arg);
++}
++
++struct predicate *
++insert_primary_noarg (const struct parser_table *entry)
++{
++ return insert_primary(entry, NULL);
+ }
+
+
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
new file mode 100644
index 000000000..c0ff3ff1c
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
@@ -0,0 +1,294 @@
+Upstream-Status: Backport
+
+commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
+Author: James Youngman <jay@gnu.org>
+Date: Sat Feb 20 13:11:45 2010 +0000
+
+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
+
+ * find/parser.c (parse_fls): If the argument is invalid, reverse
+ the change that collect_arg() made to *arg_ptr (that is, don't
+ consume the argument).
+ (parse_fprint0): Likewise.
+ (parse_gid): Likewise.
+ (parse_group): Likewise.
+ (parse_inum): Likewise.
+ (parse_links): Likewise.
+ (do_parse_xmin): Likewise.
+ (parse_name): Likewise.
+ (parse_printf): Likewise.
+ (parse_uid): Likewise.
+ (parse_used): Likewise.
+ (parse_time): Likewise.
+
+ Signed-off-by: James Youngman <jay@gnu.org>
+
+diff --git a/ChangeLog b/ChangeLog
+index d0ce1fe..13539a4 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,0 +1,19 @@
++2010-02-20 James Youngman <jay@gnu.org>
++
++ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
++ `-ctime'".
++ * find/parser.c (parse_fls): If the argument is invalid, reverse
++ the change that collect_arg() made to *arg_ptr (that is, don't
++ consume the argument).
++ (parse_fprint0): Likewise.
++ (parse_gid): Likewise.
++ (parse_group): Likewise.
++ (parse_inum): Likewise.
++ (parse_links): Likewise.
++ (do_parse_xmin): Likewise.
++ (parse_name): Likewise.
++ (parse_printf): Likewise.
++ (parse_uid): Likewise.
++ (parse_used): Likewise.
++ (parse_time): Likewise.
++
+diff --git a/NEWS b/NEWS
+index 5394311..4e910df 100644
+--- a/NEWS
++++ b/NEWS
+@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
+
+ ** Bug Fixes
+
++#28824: Corrected error message for "-ctime x".
++ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
++ -uid, -used, -atime, -mtime, -ctime.
+ #26537: find -prune now makes sure it has valid stat() information.
+
+diff --git a/find/parser.c b/find/parser.c
+index 2e6b989..08758ee 100644
+--- a/find/parser.c
++++ b/find/parser.c
+@@ -886,8 +886,14 @@ static boolean
+ parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *filename;
+- return collect_arg(argv, arg_ptr, &filename)
+- && insert_fls(entry, filename);
++ if (collect_arg(argv, arg_ptr, &filename))
++ {
++ if (insert_fls(entry, filename))
++ return true;
++ else
++ --*arg_ptr; /* don't consume the invalid arg. */
++ }
++ return false;
+ }
+
+ static boolean
+@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *filename;
+ if (collect_arg(argv, arg_ptr, &filename))
+- return insert_fprint(entry, filename);
+- else
+- return false;
++ {
++ if (insert_fprint(entry, filename))
++ return true;
++ else
++ --*arg_ptr; /* don't consume the bad arg. */
++ }
++ return false;
+ }
+
+ static float estimate_fstype_success_rate(const char *fsname)
+@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
+ }
+ else
+ {
++ --*arg_ptr; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -1049,6 +1060,7 @@ static boolean
+ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *groupname;
++ const int saved_argc = *arg_ptr;
+
+ if (collect_arg(argv, arg_ptr, &groupname))
+ {
+@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
+ "because it has the unexpected suffix %s"),
+ quotearg_n_style(0, options.err_quoting_style, groupname),
+ quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ error(1, 0, _("argument to -group is empty, but should be a group name"));
+ }
++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
+ }
+ else
+ {
++ --*arg_ptr; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
+ }
+ else
+ {
++ --*arg_ptr; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
+ error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
+ predicate,
+ quotearg_n_style(0, options.err_quoting_style, depthstr));
++ /* NOTREACHED */
+ return false;
+ }
+ /* missing argument */
+@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
+ enum xval xv)
+ {
+ const char *minutes;
++ const int saved_argc = *arg_ptr;
+
+ if (collect_arg(argv, arg_ptr, &minutes))
+ {
+@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
+ our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
+ return true;
+ }
++ else
++ {
++ /* Don't consume the invalid argument. */
++ *arg_ptr = saved_argc;
++ }
+ }
+ return false;
+ }
+@@ -1427,6 +1450,8 @@ static boolean
+ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *name;
++ const int saved_argc = *arg_ptr;
++
+ if (collect_arg(argv, arg_ptr, &name))
+ {
+ fnmatch_sanitycheck();
+@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
+ our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
+ return true;
+ }
++ else
++ {
++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
++ }
+ }
+ return false;
+ }
+@@ -1954,11 +1983,21 @@ static boolean
+ parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *format;
++ const int saved_argc = *arg_ptr;
++
+ if (collect_arg(argv, arg_ptr, &format))
+ {
+ struct format_val fmt;
+ open_stdout(&fmt);
+- return insert_fprintf (&fmt, entry, pred_fprintf, format);
++ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
++ {
++ return true;
++ }
++ else
++ {
++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
++ return false;
++ }
+ }
+ return false;
+ }
+@@ -1967,15 +2006,21 @@ static boolean
+ parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
+ {
+ const char *format, *filename;
++ int saved_argc = *arg_ptr;
++
+ if (collect_arg(argv, arg_ptr, &filename))
+ {
+ if (collect_arg(argv, arg_ptr, &format))
+ {
+ struct format_val fmt;
+ open_output_file (filename, &fmt);
+- return insert_fprintf (&fmt, entry, pred_fprintf, format);
++ saved_argc = *arg_ptr;
++
++ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
++ return true;
+ }
+ }
++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
+ return false;
+ }
+
+@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
+ }
+ else
+ {
++ --*arg_ptr; /* don't consume the invalid argument. */
+ return false;
+ }
+ }
+@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
+ else
+ {
+ error(1, 0, _("Invalid argument %s to -used"), offset_str);
++ /*NOTREACHED*/
+ return false;
+ }
+ }
+@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
+ if (strlen(typeletter) != 1u)
+ {
+ error(1, 0, _("Arguments to -type should contain only one letter"));
++ /*NOTREACHED*/
+ return false;
+ }
+
+@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
+ #endif
+ default: /* None of the above ... nuke 'em. */
+ error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
++ /*NOTREACHED*/
+ return false;
+ }
+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
+@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
+ const char *errmsg = "arithmetic overflow while converting %s "
+ "days to a number of seconds";
+ struct timespec origin;
++ const int saved_argc = *arg_ptr;
+
+ if (!collect_arg(argv, arg_ptr, &timearg))
+ return false;
+@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
+ timearg = orig_timearg;
+
+ if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
+- return false;
++ {
++ *arg_ptr = saved_argc; /* don't consume the invalid argument */
++ return false;
++ }
+
+ our_pred = insert_primary (entry, orig_timearg);
+ our_pred->args.reftime = tval;
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
new file mode 100644
index 000000000..940aaf6ff
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
@@ -0,0 +1,58 @@
+Upstream-Status: Backport
+
+commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
+Author: James Youngman <jay@gnu.org>
+Date: Sat Feb 20 19:53:13 2010 +0000
+
+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
+
+ * doc/find.texi (Problems with -exec and filenames): Add missing
+ $0 argument in example for sh -c 'something "$@" sh ...
+ * NEWS: Mention this change.
+
+ Signed-off-by: James Youngman <jay@gnu.org>
+
+diff --git a/ChangeLog b/ChangeLog
+index 13539a4..e94ba96 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,10 @@
+ 2010-02-20 James Youngman <jay@gnu.org>
+
++ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
++ * doc/find.texi (Problems with -exec and filenames): Add missing
++ $0 argument in example for sh -c 'something "$@" sh ...
++ * NEWS: Mention this change.
++
+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
+ `-ctime'".
+ * find/parser.c (parse_fls): If the argument is invalid, reverse
+diff --git a/NEWS b/NEWS
+index 4e910df..4c97be9 100644
+--- a/NEWS
++++ b/NEWS
+@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
+
+ ** Bug Fixes
+
++#28872: Mistake in "#safer" example in "Problems with -exec and
++ filenames" section of the Texinfo manual.
++
+ #28824: Corrected error message for "-ctime x".
+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
+ -uid, -used, -atime, -mtime, -ctime.
+diff --git a/doc/find.texi b/doc/find.texi
+index 2e5958d..391ffa0 100644
+--- a/doc/find.texi
++++ b/doc/find.texi
+@@ -4830,8 +4830,8 @@ problem:
+
+ @example
+ # safer
+-find -exec sh -c 'something "$@@"' @{@} \;
+-find -execdir sh -c 'something "$@@"' @{@}\;
++find -exec sh -c 'something "$@@"' sh @{@} \;
++find -execdir sh -c 'something "$@@"' sh @{@}\;
+ @end example
+
+ This approach is not guaranteed to avoid every problem, but it is much
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
new file mode 100644
index 000000000..b78cc7539
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
@@ -0,0 +1,40 @@
+Upstream-Status: Pending
+
+Author: H.J. Lu <hjl.tools@gmail.com>
+
+Work around gnulib time_t assumption in findutils for x32
+
+time_t is 64bit and long int is 32bit on x32. But gnulib used in
+findutils assumes time_t values fit into long int. Such assumption is
+invalid for x32 and should be removed.
+
+This patch is a workaround to compile gnulib for x32.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
+
+
+Index: findutils-4.4.2/gnulib/lib/getdate.y
+===================================================================
+--- findutils-4.4.2.orig/gnulib/lib/getdate.y
++++ findutils-4.4.2/gnulib/lib/getdate.y
+@@ -114,7 +114,6 @@
+ wraps around, but there's no portable way to check for that at
+ compile-time. */
+ verify (TYPE_IS_INTEGER (time_t));
+-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
+
+ /* An integer value, and the number of digits in its textual
+ representation. */
+Index: findutils-4.4.2/gnulib/lib/mktime.c
+===================================================================
+--- findutils-4.4.2.orig/gnulib/lib/mktime.c
++++ findutils-4.4.2/gnulib/lib/mktime.c
+@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
+ {
+ verify (C99_integer_division, -1 / 2 == 0);
+ verify (long_int_year_and_yday_are_wide_enough,
+- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
++ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+
+ /* Compute intervening leap days correctly even if year is negative.
+ Take care to avoid integer overflow here. */
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
new file mode 100644
index 000000000..64909a1f8
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -0,0 +1,25 @@
+SUMMARY = "find, locate, and xargs binaries."
+DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
+These programs are typically used in conjunction with other programs to provide modular and powerful directory \
+search and file locating capabilities to other commands."
+HOMEPAGE = "http://www.gnu.org/software/findutils/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
+SECTION = "console/utils"
+
+# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
+
+inherit autotools gettext update-alternatives
+
+ALTERNATIVE_LINKS = "${bindir}/find ${bindir}/xargs"
+ALTERNATIVE_PRIORITY = "100"
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality. regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb
new file mode 100644
index 000000000..0c3783614
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.2.31.bb
@@ -0,0 +1,31 @@
+SUMMARY = "find, locate, and xargs binaries."
+DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
+These programs are typically used in conjunction with other programs to provide modular and powerful directory \
+search and file locating capabilities to other commands."
+HOMEPAGE = "http://www.gnu.org/software/findutils/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+PR = "r2"
+
+SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz \
+ file://gnulib-extension.patch"
+
+SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
+SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"
+
+inherit autotools gettext update-alternatives
+
+ALTERNATIVE_LINKS = "${bindir}/find ${bindir}/xargs"
+ALTERNATIVE_PRIORITY = "100"
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality. regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/findutils/findutils_4.4.2.bb b/meta/recipes-extended/findutils/findutils_4.4.2.bb
new file mode 100644
index 000000000..d80511c4d
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.4.2.bb
@@ -0,0 +1,16 @@
+require findutils.inc
+
+PR = "r3"
+
+SRC_URI += "file://01-27017.patch \
+ file://02-28824.patch \
+ file://03-28872.patch \
+ file://findutils_fix_for_x32.patch "
+
+SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
+SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"
+
+# http://savannah.gnu.org/bugs/?27299
+CACHED_CONFIGUREVARS += "${@base_contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.7.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.7.bb
new file mode 100644
index 000000000..223bb02ca
--- /dev/null
+++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.7.bb
@@ -0,0 +1,39 @@
+SUMMARY = "OpenPrinting printer support - filters"
+DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \
+common printers for use with UNIX-like operating systems.\
+It provides the "glue" between a print spooler (like CUPS or lpr) and \
+the printer, by processing files sent to the printer. \
+ \
+This package consists of filters used by the printer spoolers \
+to convert the incoming PostScript data into the printer's native \
+format using a printer-specific, but spooler-independent PPD file. \
+"
+
+DEPENDS += "cups perl libxml2"
+PR = "r3"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "20abd25c1c98b2dae68709062a132a7d"
+SRC_URI[sha256sum] = "090313fae40b177f505d9c9b93d7a4d7188b6d5d18b6ae41ab24903ac983478d"
+
+inherit autotools
+
+EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
+
+do_configure_prepend() {
+ export LIB_CUPS=${exec_prefix}/lib/cups # /usr/lib NOT libdir
+ export CUPS_BACKENDS=${exec_prefix}/lib/cups/backend # /usr/lib NOT libdir
+ export CUPS_FILTERS=${exec_prefix}/lib/cups/filter # /usr/lib NOT libdir
+ export CUPS_PPDS=${datadir}/cups/model
+}
+
+do_install_append_linuxstdbase() {
+ install -d ${D}${exec_prefix}/lib/cups/filter
+ ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter
+}
+
+FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/"
diff --git a/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch b/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch
new file mode 100644
index 000000000..cddf2dc93
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch
@@ -0,0 +1,56 @@
+Upstream-Status: Inappropriate [configuration]
+
+--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200
++++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200
+@@ -354,51 +354,6 @@
+ AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
+ fi
+
+-#### Abstract sockets
+-
+-AC_MSG_CHECKING(abstract socket namespace)
+-AC_LANG_PUSH(C)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
+-#include <sys/socket.h>
+-#include <sys/un.h>
+-#include <errno.h>
+-]],
+-[[
+- int listen_fd;
+- struct sockaddr_un addr;
+-
+- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
+-
+- if (listen_fd < 0)
+- {
+- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
+- exit (1);
+- }
+-
+- memset (&addr, '\0', sizeof (addr));
+- addr.sun_family = AF_UNIX;
+- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
+- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
+-
+- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
+- {
+- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
+- strerror (errno));
+- exit (1);
+- }
+- else
+- exit (0);
+-]])],
+- [have_abstract_sockets=yes],
+- [have_abstract_sockets=no])
+-AC_LANG_POP(C)
+-AC_MSG_RESULT($have_abstract_sockets)
+-
+ if test x$enable_abstract_sockets = xyes; then
+ if test x$have_abstract_sockets = xno; then
+ AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
diff --git a/meta/recipes-extended/gamin/gamin/noconst.patch b/meta/recipes-extended/gamin/gamin/noconst.patch
new file mode 100644
index 000000000..7b2998c27
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin/noconst.patch
@@ -0,0 +1,59 @@
+G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid
+build failures.
+
+RP 2011/10/12
+
+Upstream-Status: Pending
+
+Index: gamin-0.1.10/server/gam_node.c
+===================================================================
+--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100
++++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100
+@@ -122,7 +122,7 @@
+ * it has finished with the string. If it must keep it longer, it
+ * should makes its own copy. The returned string must not be freed.
+ */
+-G_CONST_RETURN char *
++const char *
+ gam_node_get_path(GamNode * node)
+ {
+ g_assert(node);
+Index: gamin-0.1.10/server/gam_node.h
+===================================================================
+--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100
++++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100
+@@ -58,7 +58,7 @@
+ void gam_node_set_is_dir (GamNode *node,
+ gboolean is_dir);
+
+-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
++const char *gam_node_get_path (GamNode *node);
+
+ GList *gam_node_get_subscriptions (GamNode *node);
+
+Index: gamin-0.1.10/server/gam_subscription.c
+===================================================================
+--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100
++++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100
+@@ -141,7 +141,7 @@
+ * @param sub the GamSubscription
+ * @returns The path being monitored. It should not be freed.
+ */
+-G_CONST_RETURN char *
++const char *
+ gam_subscription_get_path(GamSubscription * sub)
+ {
+ if (sub == NULL)
+Index: gamin-0.1.10/server/gam_subscription.h
+===================================================================
+--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100
++++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100
+@@ -21,7 +21,7 @@
+
+ int gam_subscription_get_reqno (GamSubscription *sub);
+
+-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
++const char *gam_subscription_get_path (GamSubscription *sub);
+
+ GamListener *gam_subscription_get_listener (GamSubscription *sub);
+
diff --git a/meta/recipes-extended/gamin/gamin_0.1.10.bb b/meta/recipes-extended/gamin/gamin_0.1.10.bb
new file mode 100644
index 000000000..9da7e51a1
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin_0.1.10.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Gamin the File Alteration Monitor"
+DESCRIPTION = "Gamin is a file and directory monitoring system defined to \
+be a subset of the FAM (File Alteration Monitor) system."
+HOMEPAGE = "http://people.gnome.org/~veillard/gamin/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=412a9be54757a155d0b997b52b519f62"
+
+DEPENDS = "glib-2.0"
+PROVIDES = "fam"
+PR = "r4"
+
+SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \
+ file://no-abstract-sockets.patch \
+ file://noconst.patch"
+
+SRC_URI[md5sum] = "b4ec549e57da470c04edd5ec2876a028"
+SRC_URI[sha256sum] = "28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-python"
+
+PACKAGES += "lib${BPN} lib${BPN}-dev"
+FILES_${PN} = "${libexecdir}"
+FILES_${PN}-dbg += "${libexecdir}/.debug"
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+FILES_lib${BPN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/lib*.la \
+ ${libdir}/lib*.a ${libdir}/lib*.so"
+
+RDEPENDS_lib${BPN} = "${PN}"
+
+LEAD_SONAME = "libgamin-1.so"
+
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb
new file mode 100644
index 000000000..d5d9beaa4
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -0,0 +1,40 @@
+SUMMARY = "The GNU awk text processing utility"
+DESCRIPTION = "The gawk package contains the GNU version of awk, a text processing \
+utility. Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "www.gnu.org/software/gawk"
+BUGTRACKER = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+RDEPENDS_gawk += "gawk-common"
+RDEPENDS_pgawk += "gawk-common"
+PR = "r0"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
+SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
+
+inherit autotools gettext update-alternatives
+
+PACKAGES += "gawk-common pgawk"
+
+FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
+FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
+FILES_pgawk = "${bindir}/pgawk*"
+FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
+
+ALTERNATIVE_NAME = "awk"
+ALTERNATIVE_PATH = "gawk"
+ALTERNATIVE_LINK = "${bindir}/awk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+ # remove the link since we don't package it
+ rm ${D}${bindir}/awk
+}
diff --git a/meta/recipes-extended/gawk/gawk_4.0.0.bb b/meta/recipes-extended/gawk/gawk_4.0.0.bb
new file mode 100644
index 000000000..977feb90e
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_4.0.0.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "A program that you can use to select particular records in a \
+file and perform operations upon them."
+HOMEPAGE = "www.gnu.org/software/gawk"
+BUGTRACKER = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+RDEPENDS_gawk += "gawk-common"
+RDEPENDS_pgawk += "gawk-common"
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "51e417b71287629940051e6f652c6492"
+SRC_URI[sha256sum] = "c3a7cf7d976e05c6a1d8a9b3f14fa55d4304707408ddafb1396212653ea00be5"
+
+inherit autotools gettext update-alternatives
+
+PACKAGES += "gawk-common pgawk dgawk"
+
+FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
+FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
+FILES_pgawk = "${bindir}/pgawk*"
+FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
+FILES_dgawk = "${bindir}/dgawk*"
+
+ALTERNATIVE_NAME = "awk"
+ALTERNATIVE_PATH = "gawk"
+ALTERNATIVE_LINK = "${bindir}/awk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+ # remove the link since we don't package it
+ rm ${D}${bindir}/awk
+}
diff --git a/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h
new file mode 100644
index 000000000..e8772cd95
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
new file mode 100644
index 000000000..c18246cdb
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -0,0 +1,27 @@
+Import patch from windriver linux for cross compilation, and split patches
+into oe way under different directories such as i586, powerpc etc according
+to Richard's opinion.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for ppc32
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800
+@@ -66,8 +66,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
++##$(GLGEN)arch.h : $(GENARCH_XE)
++## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
+
+ # Platform interfaces
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
new file mode 100644
index 000000000..7b7202374
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
@@ -0,0 +1,912 @@
+When parallel make it will fail with multi copy, see
+http://bugzilla.pokylinux.org/show_bug.cgi?id=1202
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+RP: Extended || true to all CP_ operations, they all can race e.g.:
+| cp -f ./obj/gconfxx.h ./obj/gconfig.h
+| cp: cannot create regular file `./obj/gconfig.h': File exists
+
+Index: ghostscript-9.05/base/unixhead.mak
+===================================================================
+--- ghostscript-9.05.orig/base/unixhead.mak 2012-03-29 08:27:46.458812172 +0000
++++ ghostscript-9.05/base/unixhead.mak 2012-03-29 08:27:52.526811946 +0000
+@@ -54,7 +54,7 @@
+
+ # Define generic commands.
+
+-CP_=cp
++CP_=cp -f
+ RM_=rm -f
+ RMN_=rm -f
+
+Index: ghostscript-9.05/base/lib.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lib.mak 2012-03-29 08:27:46.470812164 +0000
++++ ghostscript-9.05/base/lib.mak 2012-03-29 08:27:52.526811946 +0000
+@@ -327,7 +327,7 @@
+ $(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE)
+ $(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22
+ $(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h
+- $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c
++ $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c || true
+ $(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c
+ $(RM_) $(GLGEN)md5.c $(GLGEN)md5.h
+
+@@ -593,22 +593,20 @@
+ $(gscdefs_h) $(gconf_h)\
+ $(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\
+ $(MAKEDDIRS)
+- $(RM_) $(GLGEN)gconfig.c
+- $(RM_) $(GLGEN)gconfig.h
+- $(CP_) $(gconfig_h) $(GLGEN)gconfig.h
+- $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c
++ $(CP_) $(gconfig_h) $(GLGEN)gconfig.h || true
++ $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c || true
+ $(GLCC) $(GLO_)gconfig.$(OBJ) $(C_) $(GLGEN)gconfig.c
+
+ $(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\
+ $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS)
+ $(RM_) $(GLGEN)gscdefs.c
+- $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c
++ $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c || true
+ $(GLCC) $(GLO_)gscdefs.$(OBJ) $(C_) $(GLGEN)gscdefs.c
+
+ $(AUX)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\
+ $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS)
+ $(RM_) $(AUX)gscdefs.c
+- $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c
++ $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c || true
+ $(GLCCAUX) $(AUXO_)gscdefs.$(OBJ) $(C_) $(AUX)gscdefs.c
+
+ $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\
+@@ -1428,7 +1426,7 @@
+ $(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c
+
+ $(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ)
+- $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ)
++ $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) || true
+
+ # sdcparam is used by the filter operator and the PS/PDF writer.
+ # It is not included automatically in sdcte/d.
+@@ -1456,7 +1454,7 @@
+ $(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c
+
+ $(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ)
++ $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) || true
+
+
+ $(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
+@@ -1472,7 +1470,7 @@
+ $(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c
+
+ $(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ)
++ $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) || true
+
+ # sdeparam is used by the filter operator and the PS/PDF writer.
+ # It is not included automatically in sdcte.
+@@ -1504,7 +1502,7 @@
+ $(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c
+
+ $(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ)
++ $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) || true
+
+
+ $(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
+@@ -1521,7 +1519,7 @@
+
+
+ $(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ)
++ $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) || true
+
+ # sddparam is used by the filter operator.
+ # It is not included automatically in sdctd.
+@@ -1544,7 +1542,7 @@
+
+ # We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory.
+ $(GLD)slzwe.dev : $(GLD)lzwe.dev
+- $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev
++ $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev || true
+
+ $(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(slzwx_h) $(strimpl_h) $(MAKEDIRS)
+@@ -1560,7 +1558,7 @@
+
+ # We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory.
+ $(GLD)slzwd.dev : $(GLD)lzwd.dev
+- $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev
++ $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev || true
+
+ $(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(slzwx_h) $(strimpl_h) $(MAKEDIRS)
+@@ -1610,7 +1608,7 @@
+ # ---------------- JBIG2 compression filter ---------------- #
+
+ $(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev
+- $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev
++ $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev || true
+
+ # jbig2dec version
+ sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ)
+@@ -1646,7 +1644,7 @@
+ # ---------------- JPEG 2000 compression filter ---------------- #
+
+ $(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev
+- $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev
++ $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev || true
+
+ # jasper version
+ sjpx_jasper=$(GLOBJ)sjpx.$(OBJ)
+@@ -1784,7 +1782,7 @@
+ $(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c
+
+ $(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ)
++ $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) || true
+
+ szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ)
+ $(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_)
+@@ -1800,7 +1798,7 @@
+ $(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c
+
+ $(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ)
++ $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) || true
+
+ szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ)
+ $(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_)
+@@ -1816,7 +1814,7 @@
+ $(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c
+
+ $(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ)
++ $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) || true
+
+ # ---------------- Page devices ---------------- #
+ # We include this here, rather than in devs.mak, because it is more like
+@@ -2757,7 +2755,7 @@
+ $(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c
+
+ $(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ)
+- $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ)
++ $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) || true
+
+
+ $(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
+@@ -2769,7 +2767,7 @@
+ $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c
+
+ $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ)
+- $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ)
++ $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true
+
+ # Note that gsicc_create requires compile with lcms to obtain icc34.h
+ # header file that is used for creating ICC structures from PS objects.
+@@ -2789,7 +2787,7 @@
+ $(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
+
+ $(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ)
++ $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) || true
+
+
+ #include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */
+@@ -3060,7 +3058,7 @@
+ $(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS)
+
+ $(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS)
+- $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c
++ $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c || true
+
+ # the following module is only included if the romfs.dev FEATURE is enabled
+ $(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
+@@ -3076,7 +3074,7 @@
+ $(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c
+
+ $(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
+- $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ)
++ $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) || true
+
+ $(GLOBJ)gsromfs1.$(OBJ) : $(GLOBJ)gsromfs1.c $(time__h) $(MAKEDIRS)
+ $(GLCC) $(GLO_)gsromfs1.$(OBJ) $(C_) $(GLOBJ)gsromfs1.c
+Index: ghostscript-9.05/base/expat.mak
+===================================================================
+--- ghostscript-9.05.orig/base/expat.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/expat.mak 2012-03-29 08:27:52.554812021 +0000
+@@ -81,7 +81,7 @@
+ # Copy the target definition we want
+ $(EXPATGEN)expat.dev : $(TOP_MAKEFILES) $(EXPAT_MAK) \
+ $(EXPATGEN)expat_$(SHARE_EXPAT).dev
+- $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev
++ $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev || true
+
+ # Define the compiled in target
+ $(EXPATGEN)expat_0.dev : $(EXPAT_MAK) $(ECHOGS_XE) $(expat_)
+Index: ghostscript-9.05/base/freetype.mak
+===================================================================
+--- ghostscript-9.05.orig/base/freetype.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/freetype.mak 2012-03-29 08:27:52.566812025 +0000
+@@ -193,7 +193,7 @@
+
+ # instantiate the requested build option (shared or compiled in)
+ $(FTGEN)freetype.dev : $(TOP_MAKEFILES) $(FTGEN)freetype_$(SHARE_FT).dev
+- $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev
++ $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev || true
+
+ # Define the shared version.
+ $(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/ijs.mak
+===================================================================
+--- ghostscript-9.05.orig/base/ijs.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/ijs.mak 2012-03-29 08:27:52.574812030 +0000
+@@ -64,7 +64,7 @@
+
+
+ $(IJSGEN)ijslib.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(IJSGEN)ijslib_$(SHARE_IJS).dev
+- $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev
++ $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev || true
+
+
+ ijs_h=$(IJSSRC)ijs.h
+Index: ghostscript-9.05/base/jasper.mak
+===================================================================
+--- ghostscript-9.05.orig/base/jasper.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/jasper.mak 2012-03-29 08:27:52.582812027 +0000
+@@ -164,7 +164,7 @@
+
+ # switch in the selected .dev
+ $(JASGEN)jasper.dev : $(TOP_MAKEFILES) $(JASGEN)jasper_$(SHARE_JPX).dev
+- $(CP_) $(JASGEN)jasper_$(SHARE_JPX).dev $(JASGEN)jasper.dev
++ $(CP_) $(JASGEN)jasper_$(SHARE_JPX).dev $(JASGEN)jasper.dev || true
+
+ # external link .dev
+ $(JASGEN)jasper_1.dev : $(TOP_MAKEFILES) $(JASPER_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/jbig2.mak
+===================================================================
+--- ghostscript-9.05.orig/base/jbig2.mak 2012-02-08 08:48:47.000000000 +0000
++++ ghostscript-9.05/base/jbig2.mak 2012-03-29 08:27:52.590812023 +0000
+@@ -96,7 +96,7 @@
+
+ # switch in the version of libjbig2.dev we're actually using
+ $(JBIG2GEN)jbig2dec.dev : $(TOP_MAKEFILES) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev
+- $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev
++ $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev || true
+
+ # dev file for shared (separately built) jbig2dec library
+ $(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/jpeg.mak
+===================================================================
+--- ghostscript-9.05.orig/base/jpeg.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/jpeg.mak 2012-03-29 08:27:52.602812026 +0000
+@@ -94,7 +94,7 @@
+ jmorecfg_h=$(GLGEN)jmorecfg.h
+
+ $(GLGEN)jconfig_.h : $(GLGEN)jconfig$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS)
+- $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h
++ $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h || true
+
+ $(GLGEN)jconfig0.h : $(ECHOGS_XE) $(GLSRC)gsjconf.h $(stdpre_h) $(MAKEFILE)\
+ $(MAKEDIRS)
+@@ -106,13 +106,13 @@
+ $(RMN_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h
+
+ $(GLGEN)jconfig.h : $(GLGEN)jconfig0.h $(MAKEDIRS)
+- $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h
++ $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h || true
+
+ $(GLGEN)jmorecf_.h : $(GLGEN)jmorecf$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS)
+- $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h
++ $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h || true
+
+ $(GLGEN)jmorecf0.h : $(GLSRC)gsjmorec.h $(GLGEN)jmcorig.h $(MAKEDIRS)
+- $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h
++ $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h || true
+ $(RM_) $(GLGEN)jmorecf1.h
+
+ $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
+@@ -120,10 +120,10 @@
+ $(RMN_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h
+
+ $(GLGEN)jmorecfg.h : $(GLGEN)jmorecf0.h $(MAKEDIRS)
+- $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h
++ $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h || true
+
+ $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS)
+- $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h
++ $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h || true
+
+ # Contrary to what some portability bigots assert as fact, C compilers are
+ # not consistent about where they start searching for #included files:
+@@ -139,23 +139,23 @@
+ JHCOPY=$(GLGEN)jinclude.h $(GLGEN)jpeglib.h
+
+ $(GLGEN)jinclude.h : $(JSRC)jinclude.h $(MAKEDIRS)
+- $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h
++ $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h || true
+
+ # jpeglib_.h doesn't really depend on jconfig.h or jmcorig.h,
+ # but we choose to put the dependencies here rather than in the
+ # definition of jpeglib__h.
+ $(GLGEN)jpeglib_.h : $(GLGEN)jpeglib$(SHARE_JPEG).h $(MAKEDIRS)
+- $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h
++ $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h || true
+
+ $(GLGEN)jpeglib0.h : $(JSRC)jpeglib.h $(jconfig_h) $(jmorecfg_h) $(MAKEDIRS)
+- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h
++ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h || true
+
+ $(GLGEN)jpeglib1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
+ $(EXP)$(ECHOGS_XE) -w $(GLGEN)jpeglib1.h -x 23 include -x 203c jpeglib.h -x 3e
+
+ # We also need jpeglib.h for #includes in the library itself.
+ $(GLGEN)jpeglib.h : $(JSRC)jpeglib.h $(MAKEDIRS)
+- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h
++ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h || true
+
+ # In order to avoid having to keep the dependency lists for the IJG code
+ # accurate, we simply make all of them depend on the only files that
+@@ -172,40 +172,40 @@
+ $(SETMOD) $(JGEN)jpegc0 $(jpegc0_)
+
+ $(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP)
+- $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c
++ $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c || true
+ $(JCC) $(JO_)jcomapi.$(OBJ) $(C_) $(GLGEN)jcomapi.c
+ $(RM_) $(GLGEN)jcomapi.c
+
+ $(JOBJ)jutils.$(OBJ) : $(JSRC)jutils.c $(JDEP)
+- $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c
++ $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c || true
+ $(JCC) $(JO_)jutils.$(OBJ) $(C_) $(GLGEN)jutils.c
+ $(RM_) $(GLGEN)jutils.c
+
+ $(JOBJ)jmemmgr.$(OBJ) : $(JSRC)jmemmgr.c $(JDEP)
+- $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c
++ $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c || true
+ $(JCC) $(JO_)jmemmgr.$(OBJ) $(C_) $(GLGEN)jmemmgr.c
+ $(RM_) $(GLGEN)jmemmgr.c
+
+ $(JOBJ)jerror.$(OBJ) : $(JSRC)jerror.c $(JDEP)
+- $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c
++ $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c || true
+ $(JCC) $(JO_)jerror.$(OBJ) $(C_) $(GLGEN)jerror.c
+ $(RM_) $(GLGEN)jerror.c
+
+ $(JOBJ)jaricom.$(OBJ) : $(JSRC)jaricom.c $(JDEP)
+- $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c
++ $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c || true
+ $(JCC) $(JO_)jaricom.$(OBJ) $(C_) $(GLGEN)jaricom.c
+ $(RM_) $(GLGEN)jaricom.c
+
+ # Encoding (compression) code.
+
+ $(JGEN)jpege.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege_$(SHARE_JPEG).dev
+- $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev
++ $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev || true
+
+ $(JGEN)jpege_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE)
+ $(SETMOD) $(JGEN)jpege_1 -lib $(JPEG_NAME)
+
+ $(JGEN)jpege_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege6.dev
+- $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev
++ $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev || true
+
+ jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ)
+
+@@ -221,90 +221,90 @@
+ $(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3)
+
+ $(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP)
+- $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c
++ $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c || true
+ $(JCC) $(JO_)jcapimin.$(OBJ) $(C_) $(GLGEN)jcapimin.c
+ $(RM_) $(GLGEN)jcapimin.c
+
+ $(JOBJ)jcapistd.$(OBJ) : $(JSRC)jcapistd.c $(JDEP)
+- $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c
++ $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c || true
+ $(JCC) $(JO_)jcapistd.$(OBJ) $(C_) $(GLGEN)jcapistd.c
+ $(RM_) $(GLGEN)jcapistd.c
+
+ $(JOBJ)jcinit.$(OBJ) : $(JSRC)jcinit.c $(JDEP)
+- $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c
++ $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c || true
+ $(JCC) $(JO_)jcinit.$(OBJ) $(C_) $(GLGEN)jcinit.c
+ $(RM_) $(GLGEN)jcinit.c
+
+ $(JOBJ)jccoefct.$(OBJ) : $(JSRC)jccoefct.c $(JDEP)
+- $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c
++ $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c || true
+ $(JCC) $(JO_)jccoefct.$(OBJ) $(C_) $(GLGEN)jccoefct.c
+ $(RM_) $(GLGEN)jccoefct.c
+
+ $(JOBJ)jccolor.$(OBJ) : $(JSRC)jccolor.c $(JDEP)
+- $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c
++ $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c || true
+ $(JCC) $(JO_)jccolor.$(OBJ) $(C_) $(GLGEN)jccolor.c
+ $(RM_) $(GLGEN)jccolor.c
+
+ $(JOBJ)jcdctmgr.$(OBJ) : $(JSRC)jcdctmgr.c $(JDEP)
+- $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c
++ $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c || true
+ $(JCC) $(JO_)jcdctmgr.$(OBJ) $(C_) $(GLGEN)jcdctmgr.c
+ $(RM_) $(GLGEN)jcdctmgr.c
+
+ $(JOBJ)jchuff.$(OBJ) : $(JSRC)jchuff.c $(JDEP)
+- $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c
++ $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c || true
+ $(JCC) $(JO_)jchuff.$(OBJ) $(C_) $(GLGEN)jchuff.c
+ $(RM_) $(GLGEN)jchuff.c
+
+ $(JOBJ)jcmainct.$(OBJ) : $(JSRC)jcmainct.c $(JDEP)
+- $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c
++ $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c || true
+ $(JCC) $(JO_)jcmainct.$(OBJ) $(C_) $(GLGEN)jcmainct.c
+ $(RM_) $(GLGEN)jcmainct.c
+
+ $(JOBJ)jcmarker.$(OBJ) : $(JSRC)jcmarker.c $(JDEP)
+- $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c
++ $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c || true
+ $(JCC) $(JO_)jcmarker.$(OBJ) $(C_) $(GLGEN)jcmarker.c
+ $(RM_) $(GLGEN)jcmarker.c
+
+ $(JOBJ)jcmaster.$(OBJ) : $(JSRC)jcmaster.c $(JDEP)
+- $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c
++ $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c || true
+ $(JCC) $(JO_)jcmaster.$(OBJ) $(C_) $(GLGEN)jcmaster.c
+ $(RM_) $(GLGEN)jcmaster.c
+
+ $(JOBJ)jcparam.$(OBJ) : $(JSRC)jcparam.c $(JDEP)
+- $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c
++ $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c || true
+ $(JCC) $(JO_)jcparam.$(OBJ) $(C_) $(GLGEN)jcparam.c
+ $(RM_) $(GLGEN)jcparam.c
+
+ $(JOBJ)jcprepct.$(OBJ) : $(JSRC)jcprepct.c $(JDEP)
+- $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c
++ $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c || true
+ $(JCC) $(JO_)jcprepct.$(OBJ) $(C_) $(GLGEN)jcprepct.c
+ $(RM_) $(GLGEN)jcprepct.c
+
+ $(JOBJ)jcsample.$(OBJ) : $(JSRC)jcsample.c $(JDEP)
+- $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c
++ $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c || true
+ $(JCC) $(JO_)jcsample.$(OBJ) $(C_) $(GLGEN)jcsample.c
+ $(RM_) $(GLGEN)jcsample.c
+
+ $(JOBJ)jfdctint.$(OBJ) : $(JSRC)jfdctint.c $(JDEP)
+- $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c
++ $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c || true
+ $(JCC) $(JO_)jfdctint.$(OBJ) $(C_) $(GLGEN)jfdctint.c
+ $(RM_) $(GLGEN)jfdctint.c
+
+ $(JOBJ)jcarith.$(OBJ) : $(JSRC)jcarith.c $(JDEP)
+- $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c
++ $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c || true
+ $(JCC) $(JO_)jcarith.$(OBJ) $(C_) $(GLGEN)jcarith.c
+ $(RM_) $(GLGEN)jcarith.c
+
+ # Decompression code
+
+ $(JGEN)jpegd.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd_$(SHARE_JPEG).dev
+- $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev
++ $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev || true
+
+ $(JGEN)jpegd_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE)
+ $(SETMOD) $(JGEN)jpegd_1 -lib $(JPEG_NAME)
+
+ $(JGEN)jpegd_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd6.dev
+- $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev
++ $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev || true
+
+ jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ)
+
+@@ -320,76 +320,76 @@
+ $(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3)
+
+ $(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP)
+- $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c
++ $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c || true
+ $(JCC) $(JO_)jdapimin.$(OBJ) $(C_) $(GLGEN)jdapimin.c
+ $(RM_) $(GLGEN)jdapimin.c
+
+ $(JOBJ)jdapistd.$(OBJ) : $(JSRC)jdapistd.c $(JDEP)
+- $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c
++ $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c || true
+ $(JCC) $(JO_)jdapistd.$(OBJ) $(C_) $(GLGEN)jdapistd.c
+ $(RM_) $(GLGEN)jdapistd.c
+
+ $(JOBJ)jdcoefct.$(OBJ) : $(JSRC)jdcoefct.c $(JDEP)
+- $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c
++ $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c || true
+ $(JCC) $(JO_)jdcoefct.$(OBJ) $(C_) $(GLGEN)jdcoefct.c
+ $(RM_) $(GLGEN)jdcoefct.c
+
+ $(JOBJ)jdcolor.$(OBJ) : $(JSRC)jdcolor.c $(JDEP)
+- $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c
++ $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c || true
+ $(JCC) $(JO_)jdcolor.$(OBJ) $(C_) $(GLGEN)jdcolor.c
+ $(RM_) $(GLGEN)jdcolor.c
+
+ $(JOBJ)jddctmgr.$(OBJ) : $(JSRC)jddctmgr.c $(JDEP)
+- $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c
++ $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c || true
+ $(JCC) $(JO_)jddctmgr.$(OBJ) $(C_) $(GLGEN)jddctmgr.c
+ $(RM_) $(GLGEN)jddctmgr.c
+
+ $(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP)
+- $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c
++ $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true
+ $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c
+ $(RM_) $(GLGEN)jdhuff.c
+
+ $(JOBJ)jdinput.$(OBJ) : $(JSRC)jdinput.c $(JDEP)
+- $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c
++ $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c || true
+ $(JCC) $(JO_)jdinput.$(OBJ) $(C_) $(GLGEN)jdinput.c
+ $(RM_) $(GLGEN)jdinput.c
+
+ $(JOBJ)jdmainct.$(OBJ) : $(JSRC)jdmainct.c $(JDEP)
+- $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c
++ $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c || true
+ $(JCC) $(JO_)jdmainct.$(OBJ) $(C_) $(GLGEN)jdmainct.c
+ $(RM_) $(GLGEN)jdmainct.c
+
+ $(JOBJ)jdmarker.$(OBJ) : $(JSRC)jdmarker.c $(JDEP)
+- $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c
++ $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c || true
+ $(JCC) $(JO_)jdmarker.$(OBJ) $(C_) $(GLGEN)jdmarker.c
+ $(RM_) $(GLGEN)jdmarker.c
+
+ $(JOBJ)jdmaster.$(OBJ) : $(JSRC)jdmaster.c $(JDEP)
+- $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c
++ $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c || true
+ $(JCC) $(JO_)jdmaster.$(OBJ) $(C_) $(GLGEN)jdmaster.c
+ $(RM_) $(GLGEN)jdmaster.c
+
+ #$(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP)
+-# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c
++# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true
+ # $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c
+ # $(RM_) $(GLGEN)jdhuff.c
+
+ $(JOBJ)jdpostct.$(OBJ) : $(JSRC)jdpostct.c $(JDEP)
+- $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c
++ $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c || true
+ $(JCC) $(JO_)jdpostct.$(OBJ) $(C_) $(GLGEN)jdpostct.c
+ $(RM_) $(GLGEN)jdpostct.c
+
+ $(JOBJ)jdsample.$(OBJ) : $(JSRC)jdsample.c $(JDEP)
+- $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c
++ $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c || true
+ $(JCC) $(JO_)jdsample.$(OBJ) $(C_) $(GLGEN)jdsample.c
+ $(RM_) $(GLGEN)jdsample.c
+
+ $(JOBJ)jidctint.$(OBJ) : $(JSRC)jidctint.c $(JDEP)
+- $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c
++ $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c || true
+ $(JCC) $(JO_)jidctint.$(OBJ) $(C_) $(GLGEN)jidctint.c
+ $(RM_) $(GLGEN)jidctint.c
+
+ $(JOBJ)jdarith.$(OBJ) : $(JSRC)jdarith.c $(JDEP)
+- $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c
++ $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c || true
+ $(JCC) $(JO_)jdarith.$(OBJ) $(C_) $(GLGEN)jdarith.c
+ $(RM_) $(GLGEN)jdarith.c
+Index: ghostscript-9.05/base/jpegxr.mak
+===================================================================
+--- ghostscript-9.05.orig/base/jpegxr.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/jpegxr.mak 2012-03-29 08:27:52.606812026 +0000
+@@ -100,7 +100,7 @@
+ # Copy the target definition we want
+ $(JPEGXR_GEN)jpegxr.dev : $(TOP_MAKEFILES) $(JPEGXR_MAK) \
+ $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev
+- $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev
++ $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev || true
+
+ # Define the compiled in target
+ $(JPEGXR_GEN)jpegxr_0.dev : $(JPEGXR_MAK) $(ECHOGS_XE) $(jpegxr_objs)
+Index: ghostscript-9.05/base/lcms.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lcms.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/lcms.mak 2012-03-29 08:27:52.614812023 +0000
+@@ -83,7 +83,7 @@
+
+ # switch in the version of lcms.dev we're actually using
+ $(LCMSGEN)lcms.dev : $(TOP_MAKEFILES) $(LCMSGEN)lcms_$(SHARE_LCMS).dev
+- $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev
++ $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev || true
+
+ # dev file for shared (separately built) lcms library
+ $(LCMSGEN)lcms_1.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/lcms2.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lcms2.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/lcms2.mak 2012-03-29 08:27:52.626812023 +0000
+@@ -83,7 +83,7 @@
+
+ # switch in the version of lcms2.dev we're actually using
+ $(LCMS2GEN)lcms2.dev : $(TOP_MAKEFILES) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev
+- $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev
++ $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev || true
+
+ # dev file for shared (separately built) lcms library
+ $(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/lcups.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lcups.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/lcups.mak 2012-03-29 08:27:52.630812023 +0000
+@@ -112,7 +112,7 @@
+
+ # instantiate the requested build option (shared or compiled in)
+ $(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev
+- $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev
++ $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev || true
+
+ # Define the shared version.
+ $(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE)
+@@ -129,7 +129,7 @@
+ # for simplicity we have every source file depend on all headers
+
+ $(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h
+- $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h
++ $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h || true
+
+ $(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h
+ $(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c
+@@ -216,7 +216,7 @@
+ $(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c
+
+ $(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS)
+- $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c
++ $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c || true
+ $(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c
+
+ $(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS)
+@@ -253,7 +253,7 @@
+ $(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c
+
+ $(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS)
+- $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c
++ $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c || true
+ $(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c
+
+ $(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS)
+@@ -269,5 +269,5 @@
+ $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c
+
+ $(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS)
+- $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c
++ $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true
+ $(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c
+Index: ghostscript-9.05/base/lcupsi.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lcupsi.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/lcupsi.mak 2012-03-29 08:27:52.642812024 +0000
+@@ -71,7 +71,7 @@
+
+ # instantiate the requested build option (shared or compiled in)
+ $(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev
+- $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev
++ $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev || true
+
+ # Define the shared version.
+ $(LIBCUPSIGEN)lcupsi_1.dev : $(TOP_MAKEFILES) $(LCUPSI_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/ldf_jb2.mak
+===================================================================
+--- ghostscript-9.05.orig/base/ldf_jb2.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/ldf_jb2.mak 2012-03-29 08:27:52.650812024 +0000
+@@ -222,7 +222,7 @@
+
+ # switch in the selected library .dev
+ $(LDF_JB2_GEN)ldf_jb2.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev
+- $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev
++ $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev || true
+
+ # external link .dev
+ $(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/lwf_jp2.mak
+===================================================================
+--- ghostscript-9.05.orig/base/lwf_jp2.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/lwf_jp2.mak 2012-03-29 08:27:52.654812024 +0000
+@@ -175,7 +175,7 @@
+
+ # switch in the selected library .dev
+ $(LWF_JP2_GEN)lwf_jp2.dev : $(TOP_MAKEFILES) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev
+- $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev
++ $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev || true
+
+ # external link .dev
+ $(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/macos-mcp.mak
+===================================================================
+--- ghostscript-9.05.orig/base/macos-mcp.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/macos-mcp.mak 2012-03-29 08:27:52.662812024 +0000
+@@ -384,11 +384,11 @@
+
+ $(CWPROJ_XML): $(gconfigd_h)
+ -mkdir -p obj/sys
+- $(CP_) $(macsystypes_h) $(systypes_h)
++ $(CP_) $(macsystypes_h) $(systypes_h) || true
+ $(SH) $(GLSRC)macgenmcpxml.sh `$(CAT) $(ld_tr)` > $(CWPROJ_XML)
+- $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c
+- $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c
+- $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c
++ $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c || true
++ $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c || true
++ $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c || true
+ /Developer/Tools/SetFile -c CWIE -t TEXT $(CWPROJ_XML)
+
+ $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
+Index: ghostscript-9.05/base/openjpeg.mak
+===================================================================
+--- ghostscript-9.05.orig/base/openjpeg.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/openjpeg.mak 2012-03-29 08:27:52.662812024 +0000
+@@ -86,11 +86,11 @@
+ $(OPEN_JPEG_SRC)tgt.h \
+
+ $(OPEN_JPEG_CONFIG_H): $(TOP_MAKEFILES) $(JPXSRCDIR)$(D)opj_config.h.in.user
+- $(CP_) $(JPXSRCDIR)$(D)opj_config.h.in.user $(OPEN_JPEG_CONFIG_H)
++ $(CP_) $(JPXSRCDIR)$(D)opj_config.h.in.user $(OPEN_JPEG_CONFIG_H) || true
+
+ # switch in the selected library .dev
+ $(OPEN_JPEG_GEN)openjpeg.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev
+- $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev
++ $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev || true
+
+ # external link .dev
+ $(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE)
+Index: ghostscript-9.05/base/openvms.mak
+===================================================================
+--- ghostscript-9.05.orig/base/openvms.mak 2012-02-08 08:48:47.000000000 +0000
++++ ghostscript-9.05/base/openvms.mak 2012-03-29 08:27:52.674812022 +0000
+@@ -364,7 +364,7 @@
+
+ # Define generic commands.
+
+-CP_=$$ @$(GLSRCDIR)COPY_ONE
++CP_=$$ @$(GLSRCDIR)COPY_ONE || true
+
+ # Define the command for deleting (a) file(s) (including wild cards)
+
+Index: ghostscript-9.05/base/png.mak
+===================================================================
+--- ghostscript-9.05.orig/base/png.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/png.mak 2012-03-29 08:27:52.674812022 +0000
+@@ -123,7 +123,7 @@
+
+ # Define the version of libpng.dev that we are actually using.
+ $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev
+- $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev
++ $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true
+
+ # Define the shared version of libpng.
+ # Note that it requires libz, which must be searched *after* libpng.
+Index: ghostscript-9.05/base/tiff.mak
+===================================================================
+--- ghostscript-9.05.orig/base/tiff.mak 2012-02-08 08:48:48.000000000 +0000
++++ ghostscript-9.05/base/tiff.mak 2012-03-29 08:27:52.674812022 +0000
+@@ -48,11 +48,11 @@
+
+ $(TIFFSRC)libtiff$(D)tif_config.unix.h : $(TIFFSRC)libtiff$(D)tif_config.h.in
+ cd $(TIFFSRC) && ./configure
+- $(CP_) $(TIFFSRC)libtiff$(D)tif_config.h $(TIFFSRC)libtiff$(D)tif_config.unix.h
++ $(CP_) $(TIFFSRC)libtiff$(D)tif_config.h $(TIFFSRC)libtiff$(D)tif_config.unix.h || true
+
+ $(TIFFSRC)libtiff$(D)tiffconf.unix.h : $(TIFFSRC)libtiff$(D)tiffconf.h.in
+ cd $(TIFFSRC) && ./configure
+- $(CP_) $(TIFFSRC)libtiff$(D)tiffconf.h $(TIFFSRC)libtiff$(D)tiffconf.unix.h
++ $(CP_) $(TIFFSRC)libtiff$(D)tiffconf.h $(TIFFSRC)libtiff$(D)tiffconf.unix.h || true
+
+ $(TIFFOBJ)tif_aux.$(OBJ) : $(TIFFSRC)/libtiff/tif_aux.c $(TIFFDEP)
+ $(TIFFCC) $(TIFFO_)tif_aux.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_aux.c
+@@ -178,14 +178,14 @@
+ $(TIFFCC) $(TIFFO_)tif_unix.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_unix.c
+
+ $(TIFFGEN)tif_config.h: $(TIFFCONFIG)
+- $(CP_) $(TIFFCONFIG) $(TIFFGEN)tif_config.h
++ $(CP_) $(TIFFCONFIG) $(TIFFGEN)tif_config.h || true
+
+ $(TIFFGEN)tiffconf.h: $(TIFFCONF)
+- $(CP_) $(TIFFCONF) $(TIFFGEN)tiffconf.h
++ $(CP_) $(TIFFCONF) $(TIFFGEN)tiffconf.h || true
+
+ # Define the version of libtiff.dev that we are actually using.
+ $(TIFFGEN)libtiff.dev : $(TOP_MAKEFILES) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev
+- $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev
++ $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev || true
+
+
+ # Define the shared version.
+Index: ghostscript-9.05/base/unix-aux.mak
+===================================================================
+--- ghostscript-9.05.orig/base/unix-aux.mak 2012-03-21 17:51:12.106037764 +0000
++++ ghostscript-9.05/base/unix-aux.mak 2012-03-29 08:27:52.674812022 +0000
+@@ -105,7 +105,7 @@
+ # $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) -lm $(EXTRALIBS)
+ #
+ #$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
+-# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
++# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) || true
+
+ # Query the environment to construct gconfig_.h.
+ # The "else true;" is required because Ultrix's implementation of sh -e
+Index: ghostscript-9.05/base/zlib.mak
+===================================================================
+--- ghostscript-9.05.orig/base/zlib.mak 2012-02-08 08:48:47.000000000 +0000
++++ ghostscript-9.05/base/zlib.mak 2012-03-29 08:27:52.678812021 +0000
+@@ -82,7 +82,7 @@
+ # Encoding (compression) code.
+
+ $(ZGEN)zlibe.dev : $(TOP_MAKEFILES) $(ZGEN)zlibe_$(SHARE_ZLIB).dev
+- $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev
++ $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev || true
+
+ $(ZGEN)zlibe_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
+ $(SETMOD) $(ZGEN)zlibe_1 -lib $(ZLIB_NAME)
+@@ -110,7 +110,7 @@
+ # with 0.90 do.
+
+ $(ZGEN)crc32.dev : $(TOP_MAKEFILES) $(ZGEN)crc32_$(SHARE_ZLIB).dev
+- $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev
++ $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev || true
+
+ $(ZGEN)crc32_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
+ $(SETMOD) $(ZGEN)crc32_1 -lib $(ZLIB_NAME)
+@@ -126,7 +126,7 @@
+ # Decoding (decompression) code.
+
+ $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev
+- $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev
++ $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true
+
+ $(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
+ $(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME)
+Index: ghostscript-9.05/psi/int.mak
+===================================================================
+--- ghostscript-9.05.orig/psi/int.mak 2012-03-29 08:28:53.942810602 +0000
++++ ghostscript-9.05/psi/int.mak 2012-03-29 08:29:05.814797444 +0000
+@@ -272,8 +272,8 @@
+ $(gconf_h) $(gconfigd_h) $(gsmemory_h) $(gstypes_h)\
+ $(iminst_h) $(iref_h) $(ivmspace_h) $(opdef_h) $(iplugin_h)
+ $(RM_) $(PSGEN)iconfig.c
+- $(CP_) $(gconfig_h) $(PSGEN)gconfig.h
+- $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c
++ $(CP_) $(gconfig_h) $(PSGEN)gconfig.h || true
++ $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c || true
+ $(PSCC) $(PSO_)iconfig.$(OBJ) $(C_) $(PSGEN)iconfig.c
+
+ $(PSOBJ)iinit.$(OBJ) : $(PSSRC)iinit.c $(GH) $(string__h)\
+@@ -605,7 +605,7 @@
+
+ # We keep the old name for backward compatibility.
+ $(PSD)level1.dev : $(PSD)psl1.dev
+- $(CP_) $(PSD)psl1.dev $(PSD)level1.dev
++ $(CP_) $(PSD)psl1.dev $(PSD)level1.dev || true
+
+ $(PSD)psl1.dev : $(INT_MAK) $(ECHOGS_XE)\
+ $(PSD)psbase.dev $(PSD)bcp.dev $(PSD)path1.dev $(PSD)type1.dev
+@@ -931,7 +931,7 @@
+
+ # We keep the old name for backward compatibility.
+ $(PSD)level2.dev : $(PSD)psl2.dev
+- $(CP_) $(PSD)psl2.dev $(PSD)level2.dev
++ $(CP_) $(PSD)psl2.dev $(PSD)level2.dev || true
+
+ # We -include dpsand2 first so that geninit will have access to the
+ # system name table as soon as possible.
+@@ -1205,7 +1205,7 @@
+ # this can be turned on and off with a FEATURE_DEV
+
+ $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev
+- $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev
++ $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev || true
+
+ fjpx_jasper=$(PSOBJ)zfjpx.$(OBJ)
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
new file mode 100644
index 000000000..c37e4c40a
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
@@ -0,0 +1,95 @@
+Just use commands provided by ghostscript-native, preventing recompile them when
+compile ghostscript.
+Way to enable cross compile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+--- a/base/unix-aux.mak.orig 2011-10-17 16:12:20.354167007 +0800
++++ a/base/unix-aux.mak 2011-10-17 16:16:26.774167008 +0800
+@@ -67,45 +67,45 @@
+
+ # -------------------------- Auxiliary programs --------------------------- #
+
+-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c
+-
+-# On the RS/6000 (at least), compiling genarch.c with gcc with -O
+-# produces a buggy executable.
+-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c
+-
+-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c
+-
+-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
+- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c
+-
+-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
+- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c
+-
+-# To get GS to use the system zlib, you remove/hide the gs/zlib directory
+-# which means that the mkromfs build can't find the zlib source it needs.
+-# So it's split into two targets, one using the zlib source directly.....
+-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gscdefs.$(OBJ) $(AUX)gsmisc.$(OBJ) \
+- $(AUX)gpmisc.$(OBJ) $(AUX)gslibctx.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+-
+-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
+- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) -lm $(EXTRALIBS)
+-
+-# .... and one using the zlib library linked via the command line
+-MKROMFS_OBJS_1=$(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
+- $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
+- $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
+- $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
+-
+-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
+- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) -lm $(EXTRALIBS)
+-
+-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
+- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
++#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c
++#
++## On the RS/6000 (at least), compiling genarch.c with gcc with -O
++## produces a buggy executable.
++#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c
++#
++#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c
++#
++#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c
++#
++#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
++# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c
++#
++## To get GS to use the system zlib, you remove/hide the gs/zlib directory
++## which means that the mkromfs build can't find the zlib source it needs.
++## So it's split into two targets, one using the zlib source directly.....
++#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gscdefs.$(OBJ) $(AUX)gsmisc.$(OBJ) \
++# $(AUX)gpmisc.$(OBJ) $(AUX)gslibctx.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
++# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
++#
++#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
++# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) -lm $(EXTRALIBS)
++#
++## .... and one using the zlib library linked via the command line
++#MKROMFS_OBJS_1=$(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \
++# $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \
++# $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \
++# $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ)
++#
++#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
++# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) -lm $(EXTRALIBS)
++#
++#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
++# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
+
+ # Query the environment to construct gconfig_.h.
+ # The "else true;" is required because Ultrix's implementation of sh -e
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
new file mode 100644
index 000000000..ab4326f3c
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
@@ -0,0 +1,54 @@
+configure will check endianness of build machine. When cross compile it fails.
+So remove the check for Yocto.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+--- ghostscript-9.05/base/configure.ac.orig 2012-03-14 15:28:30.828956872 +0800
++++ ghostscript-9.05/base/configure.ac 2012-03-14 15:29:05.060957357 +0800
+@@ -1739,25 +1739,25 @@
+ dnl check for big/little endian for LCMS
+ dnl --------------------------------------------------
+
+-AC_MSG_CHECKING([for big endian])
+-
+-AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM([#include <stdio.h>], [
+- static const int one = 1;
+- return (*(char*)&one == 0 ? 0 : 1);
+- ])],
+- [LCMS_BIGENDIAN=1],
+- [LCMS_BIGENDIAN=0])
+-
+-if test "x$LCMS_BIGENDIAN" != "x0"; then
+- LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
+- LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
+- AC_MSG_RESULT(yes)
+-else
+- LCMS_ENDIAN=
+- LCMS2_ENDIAN=
+- AC_MSG_RESULT(no)
+-fi
++dnl AC_MSG_CHECKING([for big endian])
++dnl
++dnl AC_RUN_IFELSE(
++dnl [AC_LANG_PROGRAM([#include <stdio.h>], [
++dnl static const int one = 1;
++dnl return (*(char*)&one == 0 ? 0 : 1);
++dnl ])],
++dnl [LCMS_BIGENDIAN=1],
++dnl [LCMS_BIGENDIAN=0])
++dnl
++dnl if test "x$LCMS_BIGENDIAN" != "x0"; then
++dnl LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
++dnl LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
++dnl AC_MSG_RESULT(yes)
++dnl else
++dnl LCMS_ENDIAN=
++dnl LCMS2_ENDIAN=
++dnl AC_MSG_RESULT(no)
++dnl fi
+
+
+ AC_SUBST(LCMS_ENDIAN)
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h
new file mode 100644
index 000000000..5817b7a6d
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h
@@ -0,0 +1,41 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686
new file mode 120000
index 000000000..87aaca590
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/i686
@@ -0,0 +1 @@
+i586 \ No newline at end of file
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
new file mode 100644
index 000000000..359097f35
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h
new file mode 100644
index 000000000..359097f35
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h
new file mode 100644
index 000000000..0d0a16bfa
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h
new file mode 100644
index 000000000..a05de29de
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+ /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+ /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+ /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+ /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.05.bb b/meta/recipes-extended/ghostscript/ghostscript_9.05.bb
new file mode 100644
index 000000000..dc6e48151
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.05.bb
@@ -0,0 +1,117 @@
+SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
+DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
+a back-end to a program such as ghostview, it can display PostScript and PDF \
+documents in an X11 environment. \
+\
+Furthermore, it can render PostScript and PDF files as graphics to be printed \
+on non-PostScript printers. Supported printers include common \
+dot-matrix, inkjet and laser models. \
+\
+Package gsfonts contains a set of standard fonts for Ghostscript. \
+"
+HOMEPAGE = "http://www.ghostscript.com"
+SECTION = "console/utils"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c5326026692dbed183f0558f926580f8"
+
+PR = "r2"
+
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
+DEPENDS_virtclass-native = ""
+
+SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz"
+
+SRC_URI = "${SRC_URI_BASE} \
+ file://ghostscript-9.02-prevent_recompiling.patch \
+ file://ghostscript-9.02-genarch.patch \
+ file://objarch.h \
+ file://ghostscript-9.02-parallel-make.patch \
+ file://ghostscript-9.05-NOT-check-endian.patch \
+ "
+
+SRC_URI_virtclass-native = "${SRC_URI_BASE}"
+
+SRC_URI[md5sum] = "f7c6f0431ca8d44ee132a55d583212c1"
+SRC_URI[sha256sum] = "593f77f7584704bdf9de41598a084a4208c3ad3b940a1de1faaf8f59a15cc207"
+
+EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec --without-jasper \
+ --with-fontpath=${datadir}/fonts --with-install-cups"
+
+# This has been fixed upstream but for now we need to subvert the check for time.h
+# http://bugs.ghostscript.com/show_bug.cgi?id=692443
+# http://bugs.ghostscript.com/show_bug.cgi?id=692426
+CFLAGS += "-DHAVE_SYS_TIME_H=1"
+BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
+
+inherit autotools
+
+do_configure_prepend () {
+ mkdir -p obj
+ mkdir -p soobj
+ if [ -e ${WORKDIR}/objarch.h ]; then
+ cp ${WORKDIR}/objarch.h obj/arch.h
+ fi
+}
+
+do_configure_append () {
+ # copy tools from the native ghostscript build
+ if [ "${PN}" != "ghostscript-native" ]; then
+ mkdir -p obj/aux soobj
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
+ done
+ fi
+
+ # replace cups paths from sysroots/.../usr/bin/crossscripts/cups-config with target paths
+ # CUPSDATA is compiled into a utility, and CUPSSERVERBIN is used as an install path
+ CUPSSERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir
+ CUPSDATA=${datadir}/cups
+
+ sed -e "s#^CUPSSERVERBIN=.*#CUPSSERVERBIN=${CUPSSERVERBIN}#" -i Makefile
+ sed -e "s#^CUPSDATA=.*#CUPSDATA=${CUPSDATA}#" -i Makefile
+}
+
+do_install_append () {
+ mkdir -p ${D}${datadir}/ghostscript/${PV}/
+ cp -r Resource ${D}${datadir}/ghostscript/${PV}/
+ cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
+
+ chown -R root:lp ${D}${sysconfdir}/cups
+}
+
+python do_patch_virtclass-native () {
+ pass
+}
+
+do_compile_virtclass-native () {
+ mkdir -p obj
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ oe_runmake obj/aux/$i
+ done
+}
+
+do_install_virtclass-native () {
+ install -d ${D}${bindir}/ghostscript-${PV}
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
+ done
+}
+
+BBCLASSEXTEND = "native"
+
+# Ghostscript install tool 'instcopy' tries to remove already created
+# directories during install and parallel make causes problems.
+PARALLEL_MAKEINST=""
+
+PACKAGES =+ "${PN}-cups"
+
+FILES_${PN}-dbg += "${exec_prefix}/lib/cups/filter/.debug"
+
+FILES_${PN}-cups += "${exec_prefix}/lib/cups/filter/gstoraster \
+ ${exec_prefix}/lib/cups/filter/gstopxl \
+ ${datadir}/cups \
+ ${sysconfdir}/cups \
+ "
+
+RDEPENDS_${PN}-cups = "${PN}"
diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf.inc
new file mode 100644
index 000000000..a521e0943
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "GNU gperf is a perfect hash function generator"
+HOMEPAGE = "http://www.gnu.org/software/gperf"
+SUMMARY = "Generate a perfect hash function from a set of keywords"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/main.cc;firstline=8;endline=19;md5=24688d2dff69bcf5cbea4bc3e4174c5a"
+
+SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
+
+inherit autotools
+
+# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
+# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
+EXTRA_AUTORECONF += " -I ${S}"
+
+do_configure_prepend() {
+ if [ ! -e acinclude.m4 ]; then
+ cat aclocal.m4 > acinclude.m4
+ fi
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb
new file mode 100644
index 000000000..e7acc1f47
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.3.bb
@@ -0,0 +1,10 @@
+require gperf.inc
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
+ file://src/main.cc;firstline=8;endline=19;md5=3eab12ba436c4da725b19b131def6de9"
+
+PR = "r1"
+
+SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00"
+SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb
new file mode 100644
index 000000000..c2942cdb3
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.4.bb
@@ -0,0 +1,6 @@
+require gperf.inc
+
+PR = "r0"
+
+SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632"
+SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e"
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
new file mode 100644
index 000000000..de054fc75
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
+# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
+# mempcpy, we'll just use that instead.
+# Patch source: OpenEmbedded
+
+Index: grep-2.5.1/intl/localealias.c
+===================================================================
+--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
++++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
+@@ -65,7 +65,7 @@
+ # define strcasecmp __strcasecmp
+
+ # ifndef mempcpy
+-# define mempcpy __mempcpy
++# error "mempcpy not detected"
+ # endif
+ # define HAVE_MEMPCPY 1
+ # define HAVE___FSETLOCKING 1
+Index: grep-2.5.1/lib/getopt.c
+===================================================================
+--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
++++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
+@@ -326,7 +326,7 @@
+ nonoption_flags_len = nonoption_flags_max_len = 0;
+ else
+ {
+- memset (__mempcpy (new_str, __getopt_nonoption_flags,
++ memset (mempcpy (new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
+ '\0', top + 1 - nonoption_flags_max_len);
+ nonoption_flags_max_len = top + 1;
+@@ -437,7 +437,7 @@
+ if (__getopt_nonoption_flags == NULL)
+ nonoption_flags_max_len = -1;
+ else
+- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
++ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', nonoption_flags_max_len - len);
+ }
+ }
+Index: grep-2.5.1/lib/regex.c
+===================================================================
+--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
++++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
+@@ -7842,7 +7842,7 @@
+ if (msg_size > errbuf_size)
+ {
+ #if defined HAVE_MEMPCPY || defined _LIBC
+- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
++ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+ #else
+ memcpy (errbuf, msg, errbuf_size - 1);
+ errbuf[errbuf_size - 1] = 0;
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
new file mode 100644
index 000000000..64064fc5c
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Pattern matching utilities"
+DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \
+files for lines containing a match to a specified pattern."
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
+ file://uclibc-fix.patch"
+
+SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
+SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
+ rmdir ${D}${bindir}/
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
+ update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
+ update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove grep grep.${PN}
+ update-alternatives --remove egrep egrep.${PN}
+ update-alternatives --remove fgrep fgrep.${PN}
+}
diff --git a/meta/recipes-extended/grep/grep_2.9.bb b/meta/recipes-extended/grep/grep_2.9.bb
new file mode 100644
index 000000000..1bc79f21c
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.9.bb
@@ -0,0 +1,43 @@
+SUMMARY = "GNU grep utility"
+DESCRIPTION = "GNU grep utility"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
+
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "03e3451a38b0d615cb113cbeaf252dc0"
+SRC_URI[sha256sum] = "e9118eac72ecc71191725a7566361ab7643edfd3364869a47b78dc934a357970"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--disable-perl-regexp"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
+ rmdir ${D}${bindir}/
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
+ update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
+ update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove grep grep.${PN}
+ update-alternatives --remove egrep egrep.${PN}
+ update-alternatives --remove fgrep fgrep.${PN}
+}
diff --git a/meta/recipes-extended/groff/groff_1.20.1.bb b/meta/recipes-extended/groff/groff_1.20.1.bb
new file mode 100644
index 000000000..6cb72bf11
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.20.1.bb
@@ -0,0 +1,44 @@
+SUMMARY = "GNU Troff software"
+DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
+formatting commands and produces formatted output."
+SECTION = "base"
+HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/"
+LICENSE = "GPLv2"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "48fa768dd6fdeb7968041dd5ae8e2b02"
+SRC_URI[sha256sum] = "b645878135cb620c6c417c5601bfe96172245af12045540d7344938b4c2cd805"
+
+DEPENDS = "groff-native"
+DEPENDS_virtclass-native = ""
+
+inherit autotools
+
+EXTRA_OECONF = "--without-x"
+PARALLEL_MAKE = ""
+
+do_configure_prepend() {
+ if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+ sed -i \
+ -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
+ -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
+ -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
+ -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
+ ${S}/contrib/*/Makefile.sub \
+ ${S}/doc/Makefile.in \
+ ${S}/doc/Makefile.sub
+ fi
+}
+
+do_install_append_virtclass-native() {
+ create_cmdline_wrapper ${D}/${bindir}/groff \
+ -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
+ -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
+}
+
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
new file mode 100644
index 000000000..d9e8d212b
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
@@ -0,0 +1,48 @@
+gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Upstream-Status: Inappropriate [licensing]
+
+Index: gzip-1.3.12/gzip.c
+===================================================================
+--- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800
++++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800
+@@ -1637,7 +1637,7 @@
+ }
+ }
+
+- if (futimens (ofd, ofname, timespec) != 0)
++ if (futimens_gnulib (ofd, ofname, timespec) != 0)
+ {
+ int e = errno;
+ WARN ((stderr, "%s: ", program_name));
+Index: gzip-1.3.12/lib/utimens.c
+===================================================================
+--- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800
++++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800
+@@ -75,7 +75,7 @@
+ Return 0 on success, -1 (setting errno) on failure. */
+
+ int
+-futimens (int fd ATTRIBUTE_UNUSED,
++futimens_gnulib (int fd ATTRIBUTE_UNUSED,
+ char const *file, struct timespec const timespec[2])
+ {
+ /* Some Linux-based NFS clients are buggy, and mishandle time stamps
+@@ -185,5 +185,5 @@
+ int
+ utimens (char const *file, struct timespec const timespec[2])
+ {
+- return futimens (-1, file, timespec);
++ return futimens_gnulib (-1, file, timespec);
+ }
+Index: gzip-1.3.12/lib/utimens.h
+===================================================================
+--- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800
++++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800
+@@ -1,3 +1,3 @@
+ #include <time.h>
+-int futimens (int, char const *, struct timespec const [2]);
++int futimens_gnulib (int, char const *, struct timespec const [2]);
+ int utimens (char const *, struct timespec const [2]);
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
new file mode 100644
index 000000000..6b2f69870
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
@@ -0,0 +1,56 @@
+remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
+dependency of AC_GNU_SOURCE"
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Upstream-Status: Inappropriate [licensing]
+
+Index: gzip-1.3.12/m4/extensions.m4
+===================================================================
+--- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800
++++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800
+@@ -12,44 +12,6 @@
+ # enough in this area it's likely we'll need to redefine
+ # AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+-# AC_USE_SYSTEM_EXTENSIONS
+-# ------------------------
+-# Enable extensions on systems that normally disable them,
+-# typically due to standards-conformance issues.
+-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+-[
+- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+- AC_BEFORE([$0], [AC_RUN_IFELSE])
+-
+- AC_REQUIRE([AC_GNU_SOURCE])
+- AC_REQUIRE([AC_AIX])
+- AC_REQUIRE([AC_MINIX])
+-
+- AH_VERBATIM([__EXTENSIONS__],
+-[/* Enable extensions on Solaris. */
+-#ifndef __EXTENSIONS__
+-# undef __EXTENSIONS__
+-#endif
+-#ifndef _POSIX_PTHREAD_SEMANTICS
+-# undef _POSIX_PTHREAD_SEMANTICS
+-#endif
+-#ifndef _TANDEM_SOURCE
+-# undef _TANDEM_SOURCE
+-#endif])
+- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+- [ac_cv_safe_to_define___extensions__],
+- [AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([
+-# define __EXTENSIONS__ 1
+- AC_INCLUDES_DEFAULT])],
+- [ac_cv_safe_to_define___extensions__=yes],
+- [ac_cv_safe_to_define___extensions__=no])])
+- test $ac_cv_safe_to_define___extensions__ = yes &&
+- AC_DEFINE([__EXTENSIONS__])
+- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+- AC_DEFINE([_TANDEM_SOURCE])
+-])
+-
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
new file mode 100644
index 000000000..1d608a671
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -0,0 +1,26 @@
+SUMMARY = "Standard GNU compressor"
+DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
+project. Mark Adler wrote the decompression part"
+HOMEPAGE = "http://www.gnu.org/software/gzip/"
+SECTION = "console/utils"
+# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gzip.h;firstline=8;endline=20;md5=e2ec6b91fbe43a18f6081f3bbae46a01"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+
+inherit autotools
+
+do_install_append () {
+ # Rename and move files into /bin (FHS), which is typical place for gzip
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
+ mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
+ mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_LINKS = "${base_bindir}/gunzip ${base_bindir}/gzip ${base_bindir}/zcat"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb
new file mode 100644
index 000000000..6d18d47cb
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.3.12.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Standard GNU compressor"
+DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
+project. Mark Adler wrote the decompression part"
+HOMEPAGE = "http://www.gnu.org/software/gzip"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
+ file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
+
+SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
+ file://m4-extensions-fix.patch \
+ file://dup-def-fix.patch"
+
+SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1"
+SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af"
+
+PR = "r1"
+
+inherit autotools
+
+do_install_append () {
+ # move files into /bin (FHS)
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
+ mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
+ mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_LINKS = "${base_bindir}/gunzip ${base_bindir}/gzip ${base_bindir}/zcat"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gzip/gzip_1.4.bb b/meta/recipes-extended/gzip/gzip_1.4.bb
new file mode 100644
index 000000000..54dd50a96
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.4.bb
@@ -0,0 +1,10 @@
+require gzip.inc
+
+PR = "r2"
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "e381b8506210c794278f5527cba0e765"
+SRC_URI[sha256sum] = "d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee"
diff --git a/meta/recipes-extended/hdparm/hdparm_9.39.bb b/meta/recipes-extended/hdparm/hdparm_9.39.bb
new file mode 100644
index 000000000..42867a90d
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm_9.39.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+LICENSE = "BSD"
+LICENSE_wiper = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
+ file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+ file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+ file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+PR = "r2"
+
+PACKAGES += "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+FILES_${PN} = "${base_sbindir} ${mandir}"
+
+RDEPENDS_wiper = "bash gawk stat"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
+
+SRC_URI[md5sum] = "2bc17b72403885d4faf959682944243b"
+SRC_URI[sha256sum] = "72d550af4526aa96f0841c79321a0ee39d636cbaf1f294e52193e90c054b3cea"
+
+EXTRA_OEMAKE += 'STRIP="echo"'
+
+inherit update-alternatives
+
+ALTERNATIVE_LINKS = "${base_sbindir}/hdparm"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install () {
+ install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+ oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+ cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
diff --git a/meta/recipes-extended/images/core-image-basic.bb b/meta/recipes-extended/images/core-image-basic.bb
new file mode 100644
index 000000000..f80134637
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-basic.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "A foundational basic image without support for X that can be \
+reasonably used for customization."
+
+IMAGE_FEATURES += "apps-console-core ssh-server-openssh"
+
+IMAGE_INSTALL = "\
+ task-core-boot \
+ task-core-basic \
+ "
+
+# ${CORE_IMAGE_BASE_INSTALL}
+
+inherit core-image
diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb
new file mode 100644
index 000000000..3bb78003a
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-dev.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Basic image without X support suitable for development work. It \
+can be used for customization and implementations that conform to Linux \
+Standard Base (LSB)."
+
+IMAGE_FEATURES += "apps-console-core dev-pkgs ssh-server-openssh"
+
+IMAGE_INSTALL = "\
+ ${CORE_IMAGE_BASE_INSTALL} \
+ task-core-basic \
+ task-core-lsb \
+ "
+
+inherit core-image
diff --git a/meta/recipes-extended/images/core-image-lsb-sdk.bb b/meta/recipes-extended/images/core-image-lsb-sdk.bb
new file mode 100644
index 000000000..32a5077e3
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-sdk.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \
+(LSB) implementations. It includes the full meta-toolchain, plus development \
+headers and libraries to form a standalone SDK."
+
+IMAGE_FEATURES += "apps-console-core tools-sdk dev-pkgs ssh-server-openssh"
+EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps debug-tweaks"
+
+
+IMAGE_INSTALL = "\
+ ${CORE_IMAGE_BASE_INSTALL} \
+ task-core-basic \
+ task-core-lsb \
+ "
+
+inherit core-image
diff --git a/meta/recipes-extended/images/core-image-lsb.bb b/meta/recipes-extended/images/core-image-lsb.bb
new file mode 100644
index 000000000..b370d49c5
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "A foundational basic image without support for X that can be \
+reasonably used for customization and is suitable for implementations that \
+conform to Linux Standard Base (LSB)."
+
+IMAGE_FEATURES += "apps-console-core ssh-server-openssh"
+
+IMAGE_INSTALL = "\
+ ${CORE_IMAGE_BASE_INSTALL} \
+ task-core-basic \
+ task-core-lsb \
+ "
+
+inherit core-image
diff --git a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
new file mode 100644
index 000000000..24ee29e2d
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
@@ -0,0 +1,49 @@
+From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Fri, 23 Mar 2012 14:27:20 -0400
+Subject: [PATCH] types.h: add defines that are required for if_packet.h
+
+The iptables local linux/types.h overrides the kernel/sysroot
+types.h. As such, we need to provide some defines that are required
+to build against 3.2+ kernel headers.
+
+ifndef protection is provided for the defines to ensure that
+configuration that already have these defines are still buildable.
+
+This commit is temporary until a new version of iptables can be
+used that contains the defines.
+
+This is similar to the commit in the iptables git repository:
+
+ https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
+
+Upstream-Status: Backport
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ include/linux/types.h | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/types.h b/include/linux/types.h
+index 8b483c8..ebf6432 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
+ typedef __u16 __bitwise __sum16;
+ typedef __u32 __bitwise __wsum;
+
++#ifndef __aligned_u64
++#define __aligned_u64 __u64 __attribute__((aligned(8)))
++#endif
++#ifndef __aligned_be64
++#define __aligned_be64 __be64 __attribute__((aligned(8)))
++#endif
++#ifndef __aligned_le64
++#define __aligned_le64 __le64 __attribute__((aligned(8)))
++#endif
++
+ #endif /* __ASSEMBLY__ */
+ #endif /* _LINUX_TYPES_H */
+--
+1.7.0.4
+
diff --git a/meta/recipes-extended/iptables/iptables_1.4.13.bb b/meta/recipes-extended/iptables/iptables_1.4.13.bb
new file mode 100644
index 000000000..59782c017
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables_1.4.13.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Tools for managing kernel packaet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
+ file://iptables/iptables.c;firstline=13;endline=25;md5=f1028f2401da1c120df27594b2be50ef"
+
+PR = "r0"
+
+RRECOMMENDS_${PN} = "kernel-module-x-tables \
+ kernel-module-ip-tables \
+ kernel-module-iptable-filter \
+ kernel-module-iptable-nat \
+ kernel-module-nf-defrag-ipv4 \
+ kernel-module-nf-conntrack \
+ kernel-module-nf-conntrack-ipv4 \
+ kernel-module-nf-nat \
+ kernel-module-ipt-masquerade"
+FILES_${PN} =+ "${libdir}/xtables/"
+FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+ file://types.h-add-defines-that-are-required-for-if_packet.patch"
+
+SRC_URI[md5sum] = "40a15608ec57b50e9377cace546dd115"
+SRC_URI[sha256sum] = "321e2600fc4541a958e44cafd85a42864b0035404097e0f2e082d474029b9ded"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
+ ${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6', d)}"
+
+do_configure_prepend() {
+ # Remove some libtool m4 files
+ # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+ rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
diff --git a/meta/recipes-extended/iputils/files/debian/add-icmp-return-codes.diff b/meta/recipes-extended/iputils/files/debian/add-icmp-return-codes.diff
new file mode 100644
index 000000000..40070c346
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/add-icmp-return-codes.diff
@@ -0,0 +1,43 @@
+Upstream-Status: Pending [from other distro Debian]
+
+Index: trunk/ping.c
+===================================================================
+--- trunk.orig/ping.c 2010-05-07 23:13:54.000000000 -0700
++++ trunk/ping.c 2010-05-07 23:23:22.000000000 -0700
+@@ -883,9 +883,36 @@
+ case ICMP_SR_FAILED:
+ printf("Source Route Failed\n");
+ break;
++ case ICMP_NET_UNKNOWN:
++ printf("Destination Net Unknown\n");
++ break;
++ case ICMP_HOST_UNKNOWN:
++ printf("Destination Host Unknown\n");
++ break;
++ case ICMP_HOST_ISOLATED:
++ printf("Source Host Isolated\n");
++ break;
++ case ICMP_NET_ANO:
++ printf("Destination Net Prohibited\n");
++ break;
++ case ICMP_HOST_ANO:
++ printf("Destination Host Prohibited\n");
++ break;
++ case ICMP_NET_UNR_TOS:
++ printf("Destination Net Unreachable for Type of Service\n");
++ break;
++ case ICMP_HOST_UNR_TOS:
++ printf("Destination Host Unreachable for Type of Service\n");
++ break;
+ case ICMP_PKT_FILTERED:
+ printf("Packet filtered\n");
+ break;
++ case ICMP_PREC_VIOLATION:
++ printf("Precedence Violation\n");
++ break;
++ case ICMP_PREC_CUTOFF:
++ printf("Precedence Cutoff\n");
++ break;
+ default:
+ printf("Dest Unreachable, Bad Code: %d\n", code);
+ break;
diff --git a/meta/recipes-extended/iputils/files/debian/fix-arping-timeouts.diff b/meta/recipes-extended/iputils/files/debian/fix-arping-timeouts.diff
new file mode 100644
index 000000000..3e34788a5
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/fix-arping-timeouts.diff
@@ -0,0 +1,26 @@
+Upstream-Status: Pending [from other distro Debian]
+
+Index: trunk/arping.c
+===================================================================
+--- trunk.orig/arping.c 2010-05-07 23:13:52.000000000 -0700
++++ trunk/arping.c 2010-05-07 23:41:16.000000000 -0700
+@@ -182,12 +182,17 @@
+ if (start.tv_sec==0)
+ start = tv;
+
+- if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
++ if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
+ finish();
+
+- if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
++ if ((!timeout) && (count == 0))
++ finish();
++
++ if ( count!=0 && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
+ send_pack(s, src, dst,
+ (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
++ if (count >= 0)
++ count--;
+ if (count == 0 && unsolicited)
+ finish();
+ }
diff --git a/meta/recipes-extended/iputils/files/debian/fix-dead-host-ping-stats.diff b/meta/recipes-extended/iputils/files/debian/fix-dead-host-ping-stats.diff
new file mode 100644
index 000000000..fda42bf02
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/fix-dead-host-ping-stats.diff
@@ -0,0 +1,16 @@
+Upstream-Status: Pending [from other distro Debian]
+
+Index: trunk/ping_common.c
+===================================================================
+--- trunk.orig/ping_common.c 2010-05-07 23:13:51.000000000 -0700
++++ trunk/ping_common.c 2010-05-07 23:22:33.000000000 -0700
+@@ -872,7 +872,8 @@
+ printf("%spipe %d", comma, pipesize);
+ comma = ", ";
+ }
+- if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
++ if (ntransmitted > 1 && nreceived &&
++ (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
+ int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
+ printf("%sipg/ewma %d.%03d/%d.%03d ms",
+ comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff
new file mode 100644
index 000000000..6b899cb39
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/targets.diff
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [disable feature]
+
+Index: trunk/Makefile
+===================================================================
+--- trunk.orig/Makefile 2010-05-07 23:43:00.000000000 -0700
++++ trunk/Makefile 2010-05-07 23:47:10.000000000 -0700
+@@ -16,7 +16,7 @@
+ CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
+ CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
+
+-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
++IPV4_TARGETS=tracepath ping arping clockdiff
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
+
diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
new file mode 100644
index 000000000..1d01e151e
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
@@ -0,0 +1,31 @@
+Upstream-Status: Pending [from other distro Debian]
+
+Index: trunk/tracepath.c
+===================================================================
+--- trunk.orig/tracepath.c 2010-05-07 23:13:52.000000000 -0700
++++ trunk/tracepath.c 2010-05-07 23:24:09.000000000 -0700
+@@ -338,9 +338,9 @@
+ base_port = atoi(p+1);
+ } else
+ base_port = 44444;
+- he = gethostbyname(argv[0]);
++ he = gethostbyname2(argv[0], AF_INET);
+ if (he == NULL) {
+- herror("gethostbyname");
++ herror("gethostbyname2");
+ exit(1);
+ }
+ memcpy(&target.sin_addr, he->h_addr, 4);
+Index: trunk/ping.c
+===================================================================
+--- trunk.orig/ping.c 2010-05-07 23:23:22.000000000 -0700
++++ trunk/ping.c 2010-05-07 23:24:09.000000000 -0700
+@@ -250,7 +250,7 @@
+ if (argc == 1)
+ options |= F_NUMERIC;
+ } else {
+- hp = gethostbyname(target);
++ hp = gethostbyname2(target, AF_INET);
+ if (!hp) {
+ fprintf(stderr, "ping: unknown host %s\n", target);
+ exit(2);
diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
new file mode 100644
index 000000000..92bf946f2
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
@@ -0,0 +1,27 @@
+Fix nsgmls path issue
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Index: iputils-s20101006/doc/Makefile
+===================================================================
+--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
++++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
+@@ -27,10 +27,15 @@
+ # docbook2man produces utterly ugly output and I did not find
+ # any way to customize this but hacking backend perl script a little.
+ # Well, hence...
++# nsgmls seems append path to search directory according to the sysid path.
++# e.g. if input ../index.db, it would search $search_directory/../ rather than
++# $search_directory, which leads searching failure. Fixing nsgmls probably
++# introduce some side effects, so use this ugly hack: running nsgmls in current
++# directory, and running docbook2man in tmp directory.
+
+ $(MANFILES): index.db
+ @-mkdir tmp.db2man
+- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
++ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
+ @-rm -rf tmp.db2man
+
+ clean:
diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb b/meta/recipes-extended/iputils/iputils_s20101006.bb
new file mode 100644
index 000000000..a0921924e
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "http://www.skbuff.net/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
+ file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
+ file://arping.c;beginline=1;endline=10;md5=ada2a6d06acc90f943bddf40d15e0541 \
+ file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
+
+DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native"
+
+PR = "r3"
+
+SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
+ file://debian/fix-dead-host-ping-stats.diff \
+ file://debian/add-icmp-return-codes.diff \
+ file://debian/use_gethostbyname2.diff \
+ file://debian/targets.diff \
+ file://debian/fix-arping-timeouts.diff \
+ file://nsgmls-path-fix.patch \
+ "
+
+SRC_URI[md5sum] = "a36c25e9ec17e48be514dc0485e7376c"
+SRC_URI[sha256sum] = "fd3af46c80ebb99607c2ca1f2a3608b6fe828e25bbec6e54f2afd25f6ddb6ee7"
+
+do_compile () {
+ oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
+}
+
+do_install () {
+ install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
+ # SUID root programs
+ install -m 4555 ping ${D}${base_bindir}/ping.${PN}
+ install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN}
+ install -m 4555 traceroute6 ${D}${base_bindir}/
+ # Other programgs
+ for i in arping tracepath tracepath6; do
+ install -m 0755 $i ${D}${base_bindir}/
+ done
+ # Manual pages for things we build packages for
+ for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
+ install -m 0644 doc/$i ${D}${mandir}/man8/ || true
+ done
+}
+
+# Busybox also provides ping and ping6, so use update-alternatives
+# Also fixup SUID bit for applications that need it
+pkg_postinst_${PN}-ping () {
+ chmod 4555 ${base_bindir}/ping.${PN}
+ update-alternatives --install ${base_bindir}/ping ping ping.${PN} 100
+}
+pkg_prerm_${PN}-ping () {
+ update-alternatives --remove ping ping.${PN}
+}
+
+pkg_postinst_${PN}-ping6 () {
+ chmod 4555 ${base_bindir}/ping6.${PN}
+ update-alternatives --install ${base_bindir}/ping6 ping6 ping6.${PN} 100
+}
+pkg_prerm_${PN}-ping6 () {
+ update-alternatives --remove ping6 ping6.${PN}
+}
+
+pkg_postinst_${PN}-traceroute6 () {
+ chmod 4555 ${base_bindir}/traceroute6
+}
+
+PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+
+FILES_${PN} = ""
+FILES_${PN}-ping = "${base_bindir}/ping.${PN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${PN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
+FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
+FILES_${PN}-doc = "${mandir}/man8"
diff --git a/meta/recipes-extended/less/less_444.bb b/meta/recipes-extended/less/less_444.bb
new file mode 100644
index 000000000..a5c9c0055
--- /dev/null
+++ b/meta/recipes-extended/less/less_444.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LICENSE;md5=1237c0f825bb36122b0b2b486ffbe6be"
+DEPENDS = "ncurses"
+PR = "r2"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "56f9f76ffe13f70155f47f6b3c87d421"
+SRC_URI[sha256sum] = "be64ad3e22d6d4aa19fe7024d998563a1ce1671ee3625f8851d26b16dedcdeeb"
+
+inherit autotools update-alternatives
+
+do_install () {
+ oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+ mv ${D}${bindir}/less ${D}${bindir}/less.${PN}
+}
+
+ALTERNATIVE_NAME = "less"
+ALTERNATIVE_PATH = "less.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
new file mode 100644
index 000000000..91f4588cc
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -0,0 +1,779 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+from openembedded, added by Qing He <qing.he@intel.com>
+
+Index: libaio-0.3.109/src/syscall-m68k.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.109/src/syscall-m68k.h
+@@ -0,0 +1,78 @@
++#define __NR_io_setup 241
++#define __NR_io_destroy 242
++#define __NR_io_getevents 243
++#define __NR_io_submit 244
++#define __NR_io_cancel 245
++
++#define io_syscall1(type,fname,sname,atype,a) \
++type fname(atype a) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++__asm__ __volatile__ ("trap #0" \
++ : "+d" (__res) \
++ : "d" (__a) ); \
++return (type) __res; \
++}
++
++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
++type fname(atype a,btype b) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++__asm__ __volatile__ ("trap #0" \
++ : "+d" (__res) \
++ : "d" (__a), "d" (__b) \
++ ); \
++return (type) __res; \
++}
++
++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
++type fname(atype a,btype b,ctype c) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++__asm__ __volatile__ ("trap #0" \
++ : "+d" (__res) \
++ : "d" (__a), "d" (__b), \
++ "d" (__c) \
++ ); \
++return (type) __res; \
++}
++
++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
++type fname (atype a, btype b, ctype c, dtype d) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++register long __d __asm__ ("%d4") = (long)(d); \
++__asm__ __volatile__ ("trap #0" \
++ : "+d" (__res) \
++ : "d" (__a), "d" (__b), \
++ "d" (__c), "d" (__d) \
++ ); \
++return (type) __res; \
++}
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname (atype a,btype b,ctype c,dtype d,etype e) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++register long __d __asm__ ("%d4") = (long)(d); \
++register long __e __asm__ ("%d5") = (long)(e); \
++__asm__ __volatile__ ("trap #0" \
++ : "+d" (__res) \
++ : "d" (__a), "d" (__b), \
++ "d" (__c), "d" (__d), "d" (__e) \
++ ); \
++return (type) __res; \
++}
++
+Index: libaio-0.3.109/src/syscall-sparc.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.109/src/syscall-sparc.h
+@@ -0,0 +1,130 @@
++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
++
++/*
++ * System calls under the Sparc.
++ *
++ * Don't be scared by the ugly clobbers, it is the only way I can
++ * think of right now to force the arguments into fixed registers
++ * before the trap into the system call with gcc 'asm' statements.
++ *
++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
++ *
++ * SunOS compatibility based upon preliminary work which is:
++ *
++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
++ */
++
++
++#define __NR_io_setup 268
++#define __NR_io_destroy 269
++#define __NR_io_submit 270
++#define __NR_io_cancel 271
++#define __NR_io_getevents 272
++
++
++#define io_syscall1(type,fname,sname,type1,arg1) \
++type fname(type1 arg1) \
++{ \
++long __res; \
++register long __g1 __asm__ ("g1") = __NR_##sname; \
++register long __o0 __asm__ ("o0") = (long)(arg1); \
++__asm__ __volatile__ ("t 0x10\n\t" \
++ "bcc 1f\n\t" \
++ "mov %%o0, %0\n\t" \
++ "sub %%g0, %%o0, %0\n\t" \
++ "1:\n\t" \
++ : "=r" (__res), "=&r" (__o0) \
++ : "1" (__o0), "r" (__g1) \
++ : "cc"); \
++if (__res < -255 || __res >= 0) \
++ return (type) __res; \
++return -1; \
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
++type fname(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++register long __g1 __asm__ ("g1") = __NR_##sname; \
++register long __o0 __asm__ ("o0") = (long)(arg1); \
++register long __o1 __asm__ ("o1") = (long)(arg2); \
++__asm__ __volatile__ ("t 0x10\n\t" \
++ "bcc 1f\n\t" \
++ "mov %%o0, %0\n\t" \
++ "sub %%g0, %%o0, %0\n\t" \
++ "1:\n\t" \
++ : "=r" (__res), "=&r" (__o0) \
++ : "1" (__o0), "r" (__o1), "r" (__g1) \
++ : "cc"); \
++if (__res < -255 || __res >= 0) \
++ return (type) __res; \
++return -1; \
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
++type fname(type1 arg1,type2 arg2,type3 arg3) \
++{ \
++long __res; \
++register long __g1 __asm__ ("g1") = __NR_##sname; \
++register long __o0 __asm__ ("o0") = (long)(arg1); \
++register long __o1 __asm__ ("o1") = (long)(arg2); \
++register long __o2 __asm__ ("o2") = (long)(arg3); \
++__asm__ __volatile__ ("t 0x10\n\t" \
++ "bcc 1f\n\t" \
++ "mov %%o0, %0\n\t" \
++ "sub %%g0, %%o0, %0\n\t" \
++ "1:\n\t" \
++ : "=r" (__res), "=&r" (__o0) \
++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
++ : "cc"); \
++if (__res < -255 || __res>=0) \
++ return (type) __res; \
++return -1; \
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
++{ \
++long __res; \
++register long __g1 __asm__ ("g1") = __NR_##sname; \
++register long __o0 __asm__ ("o0") = (long)(arg1); \
++register long __o1 __asm__ ("o1") = (long)(arg2); \
++register long __o2 __asm__ ("o2") = (long)(arg3); \
++register long __o3 __asm__ ("o3") = (long)(arg4); \
++__asm__ __volatile__ ("t 0x10\n\t" \
++ "bcc 1f\n\t" \
++ "mov %%o0, %0\n\t" \
++ "sub %%g0, %%o0, %0\n\t" \
++ "1:\n\t" \
++ : "=r" (__res), "=&r" (__o0) \
++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
++ : "cc"); \
++if (__res < -255 || __res>=0) \
++ return (type) __res; \
++return -1; \
++}
++
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
++ type5,arg5) \
++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
++{ \
++long __res; \
++register long __g1 __asm__ ("g1") = __NR_##sname; \
++register long __o0 __asm__ ("o0") = (long)(arg1); \
++register long __o1 __asm__ ("o1") = (long)(arg2); \
++register long __o2 __asm__ ("o2") = (long)(arg3); \
++register long __o3 __asm__ ("o3") = (long)(arg4); \
++register long __o4 __asm__ ("o4") = (long)(arg5); \
++__asm__ __volatile__ ("t 0x10\n\t" \
++ "bcc 1f\n\t" \
++ "mov %%o0, %0\n\t" \
++ "sub %%g0, %%o0, %0\n\t" \
++ "1:\n\t" \
++ : "=r" (__res), "=&r" (__o0) \
++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
++ : "cc"); \
++if (__res < -255 || __res>=0) \
++ return (type) __res; \
++return -1; \
++}
++
+Index: libaio-0.3.109/src/syscall.h
+===================================================================
+--- libaio-0.3.109.orig/src/syscall.h
++++ libaio-0.3.109/src/syscall.h
+@@ -24,6 +24,14 @@
+ #include "syscall-alpha.h"
+ #elif defined(__arm__)
+ #include "syscall-arm.h"
++#elif defined(__m68k__)
++#include "syscall-m68k.h"
++#elif defined(__sparc__)
++#include "syscall-sparc.h"
++#elif defined(__hppa__)
++#include "syscall-parisc.h"
++#elif defined(__mips__)
++#include "syscall-mips.h"
+ #else
+ #error "add syscall-arch.h"
+ #endif
+Index: libaio-0.3.109/src/syscall-mips.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.109/src/syscall-mips.h
+@@ -0,0 +1,223 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
++ *
++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
++ */
++
++#ifndef _MIPS_SIM_ABI32
++#define _MIPS_SIM_ABI32 1
++#define _MIPS_SIM_NABI32 2
++#define _MIPS_SIM_ABI64 3
++#endif
++
++#if _MIPS_SIM == _MIPS_SIM_ABI32
++
++/*
++ * Linux o32 style syscalls are in the range from 4000 to 4999.
++ */
++#define __NR_Linux 4000
++#define __NR_io_setup (__NR_Linux + 241)
++#define __NR_io_destroy (__NR_Linux + 242)
++#define __NR_io_getevents (__NR_Linux + 243)
++#define __NR_io_submit (__NR_Linux + 244)
++#define __NR_io_cancel (__NR_Linux + 245)
++
++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
++
++#if _MIPS_SIM == _MIPS_SIM_ABI64
++
++/*
++ * Linux 64-bit syscalls are in the range from 5000 to 5999.
++ */
++#define __NR_Linux 5000
++#define __NR_io_setup (__NR_Linux + 200)
++#define __NR_io_destroy (__NR_Linux + 201)
++#define __NR_io_getevents (__NR_Linux + 202)
++#define __NR_io_submit (__NR_Linux + 203)
++#define __NR_io_cancel (__NR_Linux + 204)
++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
++
++#if _MIPS_SIM == _MIPS_SIM_NABI32
++
++/*
++ * Linux N32 syscalls are in the range from 6000 to 6999.
++ */
++#define __NR_Linux 6000
++#define __NR_io_setup (__NR_Linux + 200)
++#define __NR_io_destroy (__NR_Linux + 201)
++#define __NR_io_getevents (__NR_Linux + 202)
++#define __NR_io_submit (__NR_Linux + 203)
++#define __NR_io_cancel (__NR_Linux + 204)
++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
++
++#define io_syscall1(type,fname,sname,atype,a) \
++type fname(atype a) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %3\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
++type fname(atype a, btype b) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %4\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
++type fname(atype a, btype b, ctype c) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7"); \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %5\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "=r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
++type fname(atype a, btype b, ctype c, dtype d) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7") = (unsigned long) d; \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %5\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "+r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#if (_MIPS_SIM == _MIPS_SIM_ABI32)
++
++/*
++ * Using those means your brain needs more than an oil change ;-)
++ */
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname(atype a, btype b, ctype c, dtype d, etype e) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7") = (unsigned long) d; \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "lw\t$2, %6\n\t" \
++ "subu\t$29, 32\n\t" \
++ "sw\t$2, 16($29)\n\t" \
++ "li\t$2, %5\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ "addiu\t$29, 32\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "+r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \
++ "m" ((unsigned long)e) \
++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
++
++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname (atype a,btype b,ctype c,dtype d,etype e) \
++{ \
++ register unsigned long __a0 asm("$4") = (unsigned long) a; \
++ register unsigned long __a1 asm("$5") = (unsigned long) b; \
++ register unsigned long __a2 asm("$6") = (unsigned long) c; \
++ register unsigned long __a3 asm("$7") = (unsigned long) d; \
++ register unsigned long __a4 asm("$8") = (unsigned long) e; \
++ unsigned long __v0; \
++ \
++ __asm__ volatile ( \
++ ".set\tnoreorder\n\t" \
++ "li\t$2, %6\t\t\t# " #fname "\n\t" \
++ "syscall\n\t" \
++ "move\t%0, $2\n\t" \
++ ".set\treorder" \
++ : "=&r" (__v0), "+r" (__a3) \
++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++ "memory"); \
++ \
++ if (__a3 == 0) \
++ return (type) __v0; \
++ return (type) -1; \
++}
++
++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
++
+Index: libaio-0.3.109/src/libaio.h
+===================================================================
+--- libaio-0.3.109.orig/src/libaio.h
++++ libaio-0.3.109/src/libaio.h
+@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd {
+ #define PADDEDptr(x, y) x; unsigned y
+ #define PADDEDul(x, y) unsigned long x; unsigned y
+ # endif
++#elif defined(__m68k__) /* big endian, 32 bits */
++#define PADDED(x, y) unsigned y; x
++#define PADDEDptr(x, y) unsigned y; x
++#define PADDEDul(x, y) unsigned y; unsigned long x
++#elif defined(__sparc__) /* big endian, 32 bits */
++#define PADDED(x, y) unsigned y; x
++#define PADDEDptr(x, y) unsigned y; x
++#define PADDEDul(x, y) unsigned y; unsigned long x
++#elif defined(__hppa__) /* big endian, 32 bits */
++#define PADDED(x, y) unsigned y; x
++#define PADDEDptr(x, y) unsigned y; x
++#define PADDEDul(x, y) unsigned y; unsigned long x
++#elif defined(__mips__)
++# if defined (__MIPSEB__) /* big endian, 32 bits */
++#define PADDED(x, y) unsigned y; x
++#define PADDEDptr(x, y) unsigned y; x
++#define PADDEDul(x, y) unsigned y; unsigned long x
++# elif defined(__MIPSEL__) /* little endian, 32 bits */
++#define PADDED(x, y) x; unsigned y
++#define PADDEDptr(x, y) x; unsigned y
++#define PADDEDul(x, y) unsigned long x; unsigned y
++# else
++# error "neither mipseb nor mipsel?"
++# endif
+ #else
+ #error endian?
+ #endif
+Index: libaio-0.3.109/src/syscall-parisc.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.109/src/syscall-parisc.h
+@@ -0,0 +1,146 @@
++/*
++ * Linux system call numbers.
++ *
++ * Cary Coutant says that we should just use another syscall gateway
++ * page to avoid clashing with the HPUX space, and I think he's right:
++ * it will would keep a branch out of our syscall entry path, at the
++ * very least. If we decide to change it later, we can ``just'' tweak
++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
++ * 1024 or something. Oh, and recompile libc. =)
++ *
++ * 64-bit HPUX binaries get the syscall gateway address passed in a register
++ * from the kernel at startup, which seems a sane strategy.
++ */
++
++#define __NR_Linux 0
++#define __NR_io_setup (__NR_Linux + 215)
++#define __NR_io_destroy (__NR_Linux + 216)
++#define __NR_io_getevents (__NR_Linux + 217)
++#define __NR_io_submit (__NR_Linux + 218)
++#define __NR_io_cancel (__NR_Linux + 219)
++
++#define SYS_ify(syscall_name) __NR_##syscall_name
++
++/* Assume all syscalls are done from PIC code just to be
++ * safe. The worst case scenario is that you lose a register
++ * and save/restore r19 across the syscall. */
++#define PIC
++
++/* Definition taken from glibc 2.3.3
++ * sysdeps/unix/sysv/linux/hppa/sysdep.h
++ */
++
++#ifdef PIC
++/* WARNING: CANNOT BE USED IN A NOP! */
++# define K_STW_ASM_PIC " copy %%r19, %%r4\n"
++# define K_LDW_ASM_PIC " copy %%r4, %%r19\n"
++# define K_USING_GR4 "%r4",
++#else
++# define K_STW_ASM_PIC " \n"
++# define K_LDW_ASM_PIC " \n"
++# define K_USING_GR4
++#endif
++
++/* GCC has to be warned that a syscall may clobber all the ABI
++ registers listed as "caller-saves", see page 8, Table 2
++ in section 2.2.6 of the PA-RISC RUN-TIME architecture
++ document. However! r28 is the result and will conflict with
++ the clobber list so it is left out. Also the input arguments
++ registers r20 -> r26 will conflict with the list so they
++ are treated specially. Although r19 is clobbered by the syscall
++ we cannot say this because it would violate ABI, thus we say
++ r4 is clobbered and use that register to save/restore r19
++ across the syscall. */
++
++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
++ "%r20", "%r29", "%r31"
++
++#undef K_INLINE_SYSCALL
++#define K_INLINE_SYSCALL(name, nr, args...) ({ \
++ long __sys_res; \
++ { \
++ register unsigned long __res __asm__("r28"); \
++ K_LOAD_ARGS_##nr(args) \
++ /* FIXME: HACK stw/ldw r19 around syscall */ \
++ __asm__ volatile( \
++ K_STW_ASM_PIC \
++ " ble 0x100(%%sr2, %%r0)\n" \
++ " ldi %1, %%r20\n" \
++ K_LDW_ASM_PIC \
++ : "=r" (__res) \
++ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \
++ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \
++ ); \
++ __sys_res = (long)__res; \
++ } \
++ __sys_res; \
++})
++
++#define K_LOAD_ARGS_0()
++#define K_LOAD_ARGS_1(r26) \
++ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
++ K_LOAD_ARGS_0()
++#define K_LOAD_ARGS_2(r26,r25) \
++ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
++ K_LOAD_ARGS_1(r26)
++#define K_LOAD_ARGS_3(r26,r25,r24) \
++ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
++ K_LOAD_ARGS_2(r26,r25)
++#define K_LOAD_ARGS_4(r26,r25,r24,r23) \
++ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
++ K_LOAD_ARGS_3(r26,r25,r24)
++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \
++ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
++ K_LOAD_ARGS_4(r26,r25,r24,r23)
++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
++ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
++ K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
++
++/* Even with zero args we use r20 for the syscall number */
++#define K_ASM_ARGS_0
++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
++
++/* The registers not listed as inputs but clobbered */
++#define K_CLOB_ARGS_6
++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
++
++#define io_syscall1(type,fname,sname,type1,arg1) \
++type fname(type1 arg1) \
++{ \
++ return K_INLINE_SYSCALL(sname, 1, arg1); \
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
++type fname(type1 arg1, type2 arg2) \
++{ \
++ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
++type fname(type1 arg1, type2 arg2, type3 arg3) \
++{ \
++ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
++{ \
++ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \
++}
++
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
++{ \
++ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
++}
++
+Index: libaio-0.3.109/src/syscall-arm.h
+===================================================================
+--- libaio-0.3.109.orig/src/syscall-arm.h
++++ libaio-0.3.109/src/syscall-arm.h
+@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3
+ return (type) __res_r0; \
+ }
+
++/*
++ * linux/include/asm-arm/unistd.h
++ *
++ * Copyright (C) 2001-2005 Russell King
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
++ * no matter what the change is. Thanks!
++ */
++
++#define __NR_OABI_SYSCALL_BASE 0x900000
++
++#if defined(__thumb__) || defined(__ARM_EABI__)
++#define __NR_SYSCALL_BASE 0
++#else
++#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
++#endif
++
++#define __NR_io_setup (__NR_SYSCALL_BASE+243)
++#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
++#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
++#define __NR_io_submit (__NR_SYSCALL_BASE+246)
++#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
++
++#define __sys2(x) #x
++#define __sys1(x) __sys2(x)
++
++#if defined(__thumb__) || defined(__ARM_EABI__)
++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
++#define __syscall(name) "swi\t0"
++#else
++#define __SYS_REG(name)
++#define __SYS_REG_LIST(regs...) regs
++#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
++#endif
++
++#define io_syscall1(type,fname,sname,type1,arg1) \
++type fname(type1 arg1) { \
++ __SYS_REG(sname) \
++ register long __r0 __asm__("r0") = (long)arg1; \
++ register long __res_r0 __asm__("r0"); \
++ __asm__ __volatile__ ( \
++ __syscall(sname) \
++ : "=r" (__res_r0) \
++ : __SYS_REG_LIST( "0" (__r0) ) \
++ : "memory" ); \
++ return (type) __res_r0; \
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
++type fname(type1 arg1,type2 arg2) { \
++ __SYS_REG(sname) \
++ register long __r0 __asm__("r0") = (long)arg1; \
++ register long __r1 __asm__("r1") = (long)arg2; \
++ register long __res_r0 __asm__("r0"); \
++ __asm__ __volatile__ ( \
++ __syscall(sname) \
++ : "=r" (__res_r0) \
++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \
++ : "memory" ); \
++ return (type) __res_r0; \
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
++type fname(type1 arg1,type2 arg2,type3 arg3) { \
++ __SYS_REG(sname) \
++ register long __r0 __asm__("r0") = (long)arg1; \
++ register long __r1 __asm__("r1") = (long)arg2; \
++ register long __r2 __asm__("r2") = (long)arg3; \
++ register long __res_r0 __asm__("r0"); \
++ __asm__ __volatile__ ( \
++ __syscall(sname) \
++ : "=r" (__res_r0) \
++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \
++ : "memory" ); \
++ return (type) __res_r0; \
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
++ __SYS_REG(sname) \
++ register long __r0 __asm__("r0") = (long)arg1; \
++ register long __r1 __asm__("r1") = (long)arg2; \
++ register long __r2 __asm__("r2") = (long)arg3; \
++ register long __r3 __asm__("r3") = (long)arg4; \
++ register long __res_r0 __asm__("r0"); \
++ __asm__ __volatile__ ( \
++ __syscall(sname) \
++ : "=r" (__res_r0) \
++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
++ : "memory" ); \
++ return (type) __res_r0; \
++}
++
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
++ __SYS_REG(sname) \
++ register long __r0 __asm__("r0") = (long)arg1; \
++ register long __r1 __asm__("r1") = (long)arg2; \
++ register long __r2 __asm__("r2") = (long)arg3; \
++ register long __r3 __asm__("r3") = (long)arg4; \
++ register long __r4 __asm__("r4") = (long)arg5; \
++ register long __res_r0 __asm__("r0"); \
++ __asm__ __volatile__ ( \
++ __syscall(sname) \
++ : "=r" (__res_r0) \
++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \
++ "r" (__r3), "r" (__r4) ) \
++ : "memory" ); \
++ return (type) __res_r0; \
++}
++
diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch
new file mode 100644
index 000000000..dad9601c4
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+from openembedded, added by Qing He <qing.he@intel.com>
+
+Index: libaio-0.3.106/Makefile
+===================================================================
+--- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800
++++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700
+@@ -15,7 +15,7 @@
+ @$(MAKE) -C src
+
+ install:
+- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
++ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
+
+
+ clean:
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
new file mode 100644
index 000000000..508f5a12f
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
@@ -0,0 +1,61 @@
+Upstream-Status: Pending
+
+Properly load arguments 5 an 6 for x86-64 syscall
+Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
+syscall so that it works with both x32 and x86-64.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2011/12/02
+
+--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
++++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800
+@@ -1,8 +1,18 @@
++#ifndef __NR_io_setup
+ #define __NR_io_setup 206
++#endif
++#ifndef __NR_io_destroy
+ #define __NR_io_destroy 207
++#endif
++#ifndef __NR_io_getevents
+ #define __NR_io_getevents 208
++#endif
++#ifndef __NR_io_submit
+ #define __NR_io_submit 209
++#endif
++#ifndef __NR_io_cancel
+ #define __NR_io_cancel 210
++#endif
+
+ #define __syscall_clobber "r11","rcx","memory"
+ #define __syscall "syscall"
+@@ -42,10 +52,11 @@ return __res; \
+ type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+ { \
+ long __res; \
+-__asm__ volatile ("movq %5,%%r10 ;" __syscall \
++register long __a4 asm ("r10") = (long) arg4; \
++__asm__ volatile (__syscall \
+ : "=a" (__res) \
+ : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
++ "d" ((long)(arg3)),"r" (__a4)); \
+ return __res; \
+ }
+
+@@ -54,10 +65,11 @@ return __res; \
+ type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
+ { \
+ long __res; \
+-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
++register long __a4 asm ("r10") = (long) arg4; \
++register long __a5 asm ("r8") = (long) arg5; \
++__asm__ volatile ( __syscall \
+ : "=a" (__res) \
+ : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
+- __syscall_clobber,"r8","r10" ); \
++ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
+ return __res; \
+ }
diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch
new file mode 100644
index 000000000..4d88ec167
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/toolchain.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+8/27/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/src/Makefile b/src/Makefile
+index 8d134cc..df8e5b6 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -2,7 +2,6 @@ prefix=/usr
+ includedir=$(prefix)/include
+ libdir=$(prefix)/lib
+
+-ARCH := $(shell uname -m | sed -e s/i.86/i386/)
+ CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
+ SO_CFLAGS=-shared $(CFLAGS)
+ L_CFLAGS=$(CFLAGS)
+@@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
+
+ libaio.a: $(libaio_objs)
+ rm -f libaio.a
+- ar r libaio.a $^
+- ranlib libaio.a
++ $(AR) r libaio.a $^
++ $(RANLIB) libaio.a
+
+ $(libname): $(libaio_sobjs) libaio.map
+ $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.109.bb
new file mode 100644
index 000000000..161b712a4
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Asynchronous I/O library"
+DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface"
+HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
+
+PR = "r1"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
+ file://00_arches.patch \
+ file://toolchain.patch \
+ file://destdir.patch \
+ file://libaio_fix_for_x32.patch"
+
+SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756"
+SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d"
+
+EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
+
+do_install () {
+ oe_runmake install DESTDIR=${D}
+}
diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch b/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch
new file mode 100644
index 000000000..f65f89f46
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch
@@ -0,0 +1,42 @@
+libarchive: Backport patch from upstream (revision 1990)
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
+index 7473c50..27671df 100644
+--- a/libarchive/archive_read_disk_entry_from_file.c
++++ b/libarchive/archive_read_disk_entry_from_file.c
+@@ -163,15 +163,26 @@ archive_read_disk_entry_from_file(struct archive *_a,
+
+ #ifdef HAVE_READLINK
+ if (S_ISLNK(st->st_mode)) {
+- char linkbuffer[PATH_MAX + 1];
+- int lnklen = readlink(path, linkbuffer, PATH_MAX);
++ size_t linkbuffer_len = st->st_size + 1;
++ char *linkbuffer;
++ int lnklen;
++
++ linkbuffer = malloc(linkbuffer_len);
++ if (linkbuffer == NULL) {
++ archive_set_error(&a->archive, ENOMEM,
++ "Couldn't read link data");
++ return (ARCHIVE_FAILED);
++ }
++ lnklen = readlink(path, linkbuffer, linkbuffer_len);
+ if (lnklen < 0) {
+ archive_set_error(&a->archive, errno,
+ "Couldn't read link data");
++ free(linkbuffer);
+ return (ARCHIVE_FAILED);
+ }
+ linkbuffer[lnklen] = 0;
+ archive_entry_set_symlink(entry, linkbuffer);
++ free(linkbuffer);
+ }
+ #endif
+
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch b/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch
new file mode 100644
index 000000000..6ece7f389
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch
@@ -0,0 +1,31 @@
+libarchive: Backport patch from upstream (revision 1991)
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_write_disk.c b/libarchive/archive_write_disk.c
+index caf958e..60699e0 100644
+--- a/libarchive/archive_write_disk.c
++++ b/libarchive/archive_write_disk.c
+@@ -434,7 +434,7 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
+ if (ret != ARCHIVE_OK)
+ goto done;
+ }
+-#ifdef HAVE_FCHDIR
++#if defined(HAVE_FCHDIR) && defined(PATH_MAX)
+ /* If path exceeds PATH_MAX, shorten the path. */
+ edit_deep_directories(a);
+ #endif
+@@ -866,7 +866,7 @@ archive_write_disk_new(void)
+ * object creation is likely to fail, but any error will get handled
+ * at that time.
+ */
+-#ifdef HAVE_FCHDIR
++#if defined(HAVE_FCHDIR) && defined(PATH_MAX)
+ static void
+ edit_deep_directories(struct archive_write_disk *a)
+ {
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch b/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch
new file mode 100644
index 000000000..0193a07d1
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch
@@ -0,0 +1,63 @@
+libarchive: Backport patch from upstream (rev 2516)
+
+Fix Issue 100: Allow a zero for the Type M Path Table Location, since
+WinISO (and probably other programs) set it this way.
+
+http://code.google.com/p/libarchive/source/detail?r=2516
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index 0c640c8..fdef3fb 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -714,11 +714,13 @@ isSVD(struct iso9660 *iso9660, const unsigned char *h)
+ if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
+ return (0);
+
+- /* Location of Occurrence of Type M Path Table must be
+- * available location,
++ /* The Type M Path Table must be at a valid location (WinISO
++ * and probably other programs omit this, so we allow zero)
++ *
+ * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+SVD_type_M_path_table_offset);
+- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
++ || location >= volume_block)
+ return (0);
+
+ /* Read Root Directory Record in Volume Descriptor. */
+@@ -790,7 +792,8 @@ isEVD(struct iso9660 *iso9660, const unsigned char *h)
+ * available location,
+ * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+PVD_type_m_path_table_offset);
+- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
++ || location >= volume_block)
+ return (0);
+
+ /* Reserved field must be 0. */
+@@ -865,11 +868,14 @@ isPVD(struct iso9660 *iso9660, const unsigned char *h)
+ if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
+ return (0);
+
+- /* Location of Occurrence of Type M Path Table must be
+- * available location,
++ /* The Type M Path Table must also be at a valid location
++ * (although ECMA 119 requires a Type M Path Table, WinISO and
++ * probably other programs omit it, so we permit a zero here)
++ *
+ * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */
+ location = archive_be32dec(h+PVD_type_m_path_table_offset);
+- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block)
++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2)
++ || location >= volume_block)
+ return (0);
+
+ /* Reserved field must be 0. */
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch b/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch
new file mode 100644
index 000000000..eaa9ad081
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch
@@ -0,0 +1,33 @@
+libarchive: Backport patch from upstream (rev 2514)
+
+Enable version stripping code in joliet extension support for iso9660.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=587316
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index fdef3fb..8dcfeb4 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -1755,7 +1755,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
+ }
+ *wp = L'\0';
+
+-#if 0 /* untested code, is it at all useful on Joliet? */
+ /* trim trailing first version and dot from filename.
+ *
+ * Remember we where in UTF-16BE land!
+@@ -1775,7 +1774,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
+ /* Chop off trailing '.' from filenames. */
+ if (*(wp-1) == '.')
+ *(--wp) = L'\0';
+-#endif
+
+ /* store the result in the file name field. */
+ archive_strappend_w_utf8(&file->name, wbuff);
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch b/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch
new file mode 100644
index 000000000..dd8ac6a87
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch
@@ -0,0 +1,31 @@
+libarchive: Backport patch from upstream (rev 2520)
+
+Fix version/dot stripping code in joliet extension of iso9660.
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index 8dcfeb4..2d3a855 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -1766,13 +1766,13 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
+ * *, /, :, ;, ? and \.
+ */
+ /* Chop off trailing ';1' from files. */
+- if (*(wp-2) == ';' && *(wp-1) == '1') {
++ if (*(wp-2) == L';' && *(wp-1) == L'1') {
+ wp-=2;
+ *wp = L'\0';
+ }
+
+ /* Chop off trailing '.' from filenames. */
+- if (*(wp-1) == '.')
++ if (*(wp-1) == L'.')
+ *(--wp) = L'\0';
+
+ /* store the result in the file name field. */
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch b/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch
new file mode 100644
index 000000000..b55ae1701
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch
@@ -0,0 +1,28 @@
+libarchive: Backport patch from upstream (rev 2521).
+
+Disable dot stripping code since it's still broken
+and noone has been able to figure it out (yet).
+
+Upstream-Status: Backport
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index 2d3a855..8661532 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -1771,9 +1771,11 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
+ *wp = L'\0';
+ }
+
++#if 0 /* XXX: this somehow manages to strip of single-character file extensions, like '.c'. */
+ /* Chop off trailing '.' from filenames. */
+ if (*(wp-1) == L'.')
+ *(--wp) = L'\0';
++#endif
+
+ /* store the result in the file name field. */
+ archive_strappend_w_utf8(&file->name, wbuff);
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch b/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch
new file mode 100644
index 000000000..b5465a338
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch
@@ -0,0 +1,31 @@
+libarchive: Ignore ENOSYS error when setting up xattrs. (Closes: #588925)
+
+Modestas Vainius found out that HPPA returns errno ENOSYS
+on listxattrs. Currently, ENOTSUP is ignored so we'll do the
+same for ENOSYS as well.
+
+For full debug info about this see Modestas Vainius awesome
+report at:
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588925#10
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
+index 27671df..c49e755 100644
+--- a/libarchive/archive_read_disk_entry_from_file.c
++++ b/libarchive/archive_read_disk_entry_from_file.c
+@@ -398,7 +398,7 @@ setup_xattrs(struct archive_read_disk *a,
+ list_size = listxattr(path, NULL, 0);
+
+ if (list_size == -1) {
+- if (errno == ENOTSUP)
++ if (errno == ENOTSUP || errno == ENOSYS)
+ return (ARCHIVE_OK);
+ archive_set_error(&a->archive, errno,
+ "Couldn't list extended attributes");
+--
+1.7.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive_2.8.5.bb b/meta/recipes-extended/libarchive/libarchive_2.8.5.bb
new file mode 100644
index 000000000..5cf13e6eb
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive_2.8.5.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
+HOMEPAGE = "http://code.google.com/p/libarchive/"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4255e2e6f0349a4ac8fbd68459296e46"
+PR = "r0"
+
+DEPENDS = "libxml2"
+
+SRC_URI = "http://libarchive.googlecode.com/files/libarchive-${PV}.tar.gz \
+ file://0001-Patch-from-upstream-revision-1990.patch \
+ file://0002-Patch-from-upstream-revision-1991.patch \
+ file://0004-Patch-from-upstream-rev-2514.patch \
+ file://0005-Patch-from-upstream-rev-2520.patch \
+ file://0006-Patch-from-upstream-rev-2521.patch \
+ file://0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch \
+ "
+
+SRC_URI[md5sum] = "9caf51dcf6213e9c9f5a1c27448b9c90"
+SRC_URI[sha256sum] = "13993e0ffbd121ccda46ea226b1f8eac218de0fa8da7d8b1f998093d5c32a72d"
+
+inherit autotools lib_package
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb
new file mode 100644
index 000000000..67c9381a9
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+ file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://lib/idna.h;firstline=6;endline=18;md5=6d9d5532eb28b99e860262281c540d02 \
+ file://src/idn.c;firstline=6;endline=18;md5=41b6aec531cc6a9d54a6c4deee251bf5"
+PR = "r0"
+
+inherit pkgconfig autotools gettext
+
+SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz"
+
+EXTRA_OECONF = " --disable-tld"
+
+do_configure_prepend() {
+ # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from
+ # autoconf CVS because atm the autoconf it uses is a bit old
+ # now with cross autotool, that macro is already there and this
+ # local definition causes circular dependency. Actually AC_GNU_SOURCE
+ # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local
+ # references to the latter here.
+ sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4
+ rm -f ${S}/lib/gl/m4/extensions.m4
+}
diff --git a/meta/recipes-extended/libidn/libidn_1.24.bb b/meta/recipes-extended/libidn/libidn_1.24.bb
new file mode 100644
index 000000000..018f1181e
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_1.24.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9c9d9d207a3468a696a03368913d360b \
+ file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://lib/idna.h;endline=21;md5=7364f6a250728ffe16170f5e3ab37512 \
+ file://src/idn.c;endline=20;md5=7d7235e7951ac87d9dfac42e1b69d9cb"
+PR = "r0"
+
+inherit pkgconfig autotools gettext
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "764d7258eeb273941680499fab2c7367"
+SRC_URI[sha256sum] = "da1708c6063ecb7951a0908e67df3eacdfe128b18edaa6cf6867d7b73b5f35ff"
+
+# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
+# so package command into a separate package
+PACKAGES =+ "idn"
+FILES_idn = "${bindir}/*"
+
+EXTRA_OECONF = " --disable-tld"
+
+do_install_append() {
+ rm -rf ${D}${datadir}/emacs
+}
diff --git a/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.1-fortify.patch
new file mode 100644
index 000000000..4a785d344
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.1-fortify.patch
@@ -0,0 +1,26 @@
+Fix a possible overflow (reported by _FORTIFY_SOURCE=2)
+
+Ported from Gentoo
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libtirpc-0.2.1/src/getrpcport.c
+===================================================================
+--- libtirpc-0.2.1.orig/src/getrpcport.c
++++ libtirpc-0.2.1/src/getrpcport.c
+@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto
+
+ if ((hp = gethostbyname(host)) == NULL)
+ return (0);
++ if (hp->h_length != sizeof(addr.sin_addr.s_addr))
++ return (0);
+ memset(&addr, 0, sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_port = 0;
+- if (hp->h_length > sizeof(addr))
+- hp->h_length = sizeof(addr);
+ memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
+ /* Inconsistent interfaces need casts! :-( */
+ return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum,
diff --git a/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.2-rpc-des-prot.patch b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.2-rpc-des-prot.patch
new file mode 100644
index 000000000..c38a55b87
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/libtirpc-0.2.2-rpc-des-prot.patch
@@ -0,0 +1,39 @@
+From f2f43212b33dea42635061c82645287454a70107 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 11 Jun 2011 15:21:55 -0400
+Subject: [PATCH] add multiple inclusion protection to rpc/des.h
+
+If you try to include this file multiple times, you get a build failure
+due to redefinitions of enums and such.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tirpc/rpc/des.h | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+
+Upstream-Status: Backport
+
+diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h
+index e3d6897..d2881ad 100644
+--- a/tirpc/rpc/des.h
++++ b/tirpc/rpc/des.h
+@@ -33,6 +33,9 @@
+ * Copyright (c) 1986 by Sun Microsystems, Inc.
+ */
+
++#ifndef _RPC_DES_H_
++#define _RPC_DES_H_
++
+ #define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */
+ #define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */
+
+@@ -80,3 +83,5 @@ struct desparams {
+ * Software DES.
+ */
+ extern int _des_crypt( char *, int, struct desparams * );
++
++#endif
+--
+1.7.5.3
+
diff --git a/meta/recipes-extended/libtirpc/libtirpc-0.2.2/remove-des-crypt.patch b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/remove-des-crypt.patch
new file mode 100644
index 000000000..d94a5850a
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc-0.2.2/remove-des-crypt.patch
@@ -0,0 +1,17 @@
+http://sourceforge.net/mailarchive/message.php?msg_id=27636466
+
+Upstream-Status: Backport
+
+Index: libtirpc-0.2.2/src/Makefile.am
+===================================================================
+--- libtirpc-0.2.2.orig/src/Makefile.am
++++ libtirpc-0.2.2/src/Makefile.am
+@@ -50,7 +50,7 @@ libtirpc_la_SOURCES = auth_none.c auth_u
+ rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+ rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_generic.c \
+ svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+- auth_time.c auth_des.c authdes_prot.c des_crypt.c
++ auth_time.c auth_des.c authdes_prot.c
+
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.2.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.2.bb
new file mode 100644
index 000000000..8988ca11c
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Transport-Independent RPC library"
+DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
+SECTION = "libs/network"
+HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
+ file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+PR = "r0"
+
+DEPENDS += "xz-native"
+PROVIDES = "virtual/librpc"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2;name=libtirpc \
+ ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
+ file://libtirpc-0.2.1-fortify.patch \
+ file://libtirpc-0.2.2-rpc-des-prot.patch \
+ file://remove-des-crypt.patch \
+ "
+SRC_URI[libtirpc.md5sum] = "74c41c15c2909f7d11d9c7bfa7db6273"
+SRC_URI[libtirpc.sha256sum] = "f05eb17c85d62423858b8f74512cfe66a9ae1cedf93f03c2a0a32e04f0a33705"
+SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
+SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
+inherit autotools pkgconfig
+
+do_configure_prepend () {
+ cp -r ${S}/../tirpc ${S}
+}
+
+do_install_append() {
+ chown root:root ${D}${sysconfdir}/netconfig
+}
diff --git a/meta/recipes-extended/libuser/libuser_0.57.1.bb b/meta/recipes-extended/libuser/libuser_0.57.1.bb
new file mode 100644
index 000000000..355427f48
--- /dev/null
+++ b/meta/recipes-extended/libuser/libuser_0.57.1.bb
@@ -0,0 +1,24 @@
+SUMMARY = "user and group account administration library"
+DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \
+and group accounts"
+HOMEPAGE = "https://fedorahosted.org/libuser/"
+BUGTRACKER = "https://fedorahosted.org/libuser/newticket"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://lib/user.h;endline=19;md5=9bc141f2e0d3e8b97ecdc945b2ed1ec7 \
+ file://samples/testuser.c;endline=19;md5=61e8c05bd37ce1cba5590071f6e17500"
+
+SECTION = "base"
+
+SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "be82c6941264d0b4bd04f95fb342ec7d"
+SRC_URI[sha256sum] = "a61289867581fa715354a3fafe09c3e481173ce0a2dcb33b04588b6ac13cead5"
+PR = "r1"
+
+DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native"
+
+EXTRA_OECONF += "--without-python"
+
+inherit autotools gettext
diff --git a/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch b/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch
new file mode 100644
index 000000000..bfdb29b59
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/arm-workaround-global-constructor.patch
@@ -0,0 +1,71 @@
+Upstream-Status: Pending
+
+Workaround a problem with the C++ global constructors on ARM.
+
+As documented in the Yocto Bugzilla bug 938, the global constructors
+that define DEF_BUILTIN [const IdString _foo ( "foo" );] are not running
+before the usage of _foo during the initialization of the compatibility
+table.
+
+The patch, along with a similar change to the recipe generation of the
+oe-arch.h file, remove the DEF_BUILTIN globals and replace them with
+immediate strings wherever they are used.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: git/zypp/Arch.cc
+===================================================================
+--- git.orig/zypp/Arch.cc 2011-08-04 21:03:31.000000000 -0700
++++ git/zypp/Arch.cc 2011-08-04 21:04:16.635480895 -0700
+@@ -152,13 +152,10 @@
+ // NOTE: Thake care CompatBits::IntT is able to provide one
+ // bit for each architecture.
+ //
+-#define DEF_BUILTIN(A) const IdString _##A( #A );
+- DEF_BUILTIN( all );
+- DEF_BUILTIN( any );
+- DEF_BUILTIN( noarch );
++/* Global constructors are not working properly on ARM, avoid the
++ * known bad case and merge constructors in with the usages
++ */
+
+-#include "oe-arch.h"
+-#undef DEF_BUILTIN
+
+ ///////////////////////////////////////////////////////////////////
+ //
+@@ -227,9 +224,9 @@
+ // _noarch must have _idBit 0.
+ // Other builtins have 1-bit set
+ // and are initialized done on the fly.
+- _compatSet.insert( Arch::CompatEntry( _all, 0 ) );
+- _compatSet.insert( Arch::CompatEntry( _any, 0 ) );
+- _compatSet.insert( Arch::CompatEntry( _noarch, 0 ) );
++ _compatSet.insert( Arch::CompatEntry( IdString ( "all" ), 0 ) );
++ _compatSet.insert( Arch::CompatEntry( IdString ( "any" ), 0 ) );
++ _compatSet.insert( Arch::CompatEntry( IdString ( "noarch" ), 0 ) );
+ ///////////////////////////////////////////////////////////////////
+ // Define the CompatibleWith relation:
+ //
+@@ -331,9 +328,9 @@
+ ///////////////////////////////////////////////////////////////////
+
+ const Arch Arch_empty ( IdString::Empty );
+- const Arch Arch_all( _all );
+- const Arch Arch_any( _any );
+- const Arch Arch_noarch( _noarch );
++ const Arch Arch_all( IdString ( "all" ) );
++ const Arch Arch_any( IdString ( "any" ) );
++ const Arch Arch_noarch( IdString ( "noarch" ) );
+
+ #define OE_PROTO 1
+ #include "oe-arch.h"
+@@ -345,7 +342,7 @@
+ // METHOD TYPE : Ctor
+ //
+ Arch::Arch()
+- : _entry( &ArchCompatSet::instance().assertDef( _noarch ) )
++ : _entry( &ArchCompatSet::instance().assertDef( IdString ( "noarch" ) ) )
+ {}
+
+ Arch::Arch( IdString::IdType id_r )
diff --git a/meta/recipes-extended/libzypp/libzypp/close.patch b/meta/recipes-extended/libzypp/libzypp/close.patch
new file mode 100644
index 000000000..0ff182541
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/close.patch
@@ -0,0 +1,32 @@
+close() is used without a protype therefore we include unistd.h
+Fixes compile errors like below
+
+/home/kraj/work/openembedded-core/build/tmp-eglibc/work/qemuppc-oe-linux/libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r18/git/zypp/ExternalProgram.h:239:47: error: '::close' has not been declared
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/zypp/ExternalProgram.h
+===================================================================
+--- git.orig/zypp/ExternalProgram.h 2012-03-23 08:27:31.716438539 -0700
++++ git/zypp/ExternalProgram.h 2012-03-23 08:27:54.520439367 -0700
+@@ -16,6 +16,7 @@
+ #include <map>
+ #include <string>
+ #include <vector>
++#include <unistd.h>
+
+ #include "zypp/base/ExternalDataSource.h"
+ #include "zypp/Pathname.h"
+Index: git/zypp/base/Random.cc
+===================================================================
+--- git.orig/zypp/base/Random.cc 2012-03-23 08:31:09.732449118 -0700
++++ git/zypp/base/Random.cc 2012-03-23 08:31:36.240450324 -0700
+@@ -3,6 +3,7 @@
+ #include <cstdio>
+ #include <iostream>
+ #include <fcntl.h>
++#include <unistd.h>
+ #include "zypp/base/Random.h"
+
+ using namespace std;
diff --git a/meta/recipes-extended/libzypp/libzypp/config-release.patch b/meta/recipes-extended/libzypp/libzypp/config-release.patch
new file mode 100644
index 000000000..b4e7ab02f
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/config-release.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Inappropriate [distribution]
+
+Configure distro version package
+
+We need to configure a package that the system can use to determine the
+system distribution version.
+
+Hack: for now set to task-core-rpm.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/zypp/ZConfig.cc git/zypp/ZConfig.cc
+--- git.orig/zypp/ZConfig.cc 2011-03-14 16:30:07.492786134 -0500
++++ git/zypp/ZConfig.cc 2011-03-15 11:39:15.396801927 -0500
+@@ -821,7 +821,7 @@
+ ///////////////////////////////////////////////////////////////////
+
+ std::string ZConfig::distroverpkg() const
+- { return "redhat-release"; }
++ { return "task-core-rpm"; }
+
+ ///////////////////////////////////////////////////////////////////
+
diff --git a/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch b/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch
new file mode 100644
index 000000000..0f17b489b
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Pending
+
+Fix following compilation errors with gcc 4.6.0
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/09
+
+| i586-poky-linux-g++: error: unrecognized option '--as-needed'
+| make[2]: *** [zypp/libzypp.so.810.1.0] Error 1
+
+
+Index: git/zypp/CMakeLists.txt
+===================================================================
+--- git.orig/zypp/CMakeLists.txt
++++ git/zypp/CMakeLists.txt
+@@ -903,7 +903,7 @@ SET_LOGGROUP( "satsolver" ${zypp_sat_SRC
+ ADD_LIBRARY(zypp SHARED ${zypp_lib_SRCS})
+ SET_TARGET_PROPERTIES( zypp PROPERTIES VERSION "${LIBZYPP_VERSION_INFO}" )
+ SET_TARGET_PROPERTIES( zypp PROPERTIES SOVERSION "${LIBZYPP_SOVERSION_INFO}" )
+-SET_TARGET_PROPERTIES( zypp PROPERTIES LINK_FLAGS "--as-needed" )
++SET_TARGET_PROPERTIES( zypp PROPERTIES LINK_FLAGS "-Wl,--as-needed" )
+ ADD_DEPENDENCIES(zypp schema_header)
+ # System libraries
+ SET(UTIL_LIBRARY util)
diff --git a/meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch b/meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch
new file mode 100644
index 000000000..c11f5c53c
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/hardcode-lib-fix.patch
@@ -0,0 +1,22 @@
+tools/CMakeLists.txt: replace the hardcode "lib"
+
+replace the hardcode "lib" with LIB_INSTALL_DIR
+this will work with non /usr/lib libdir case
+
+Upstream-Status: Pending
+
+Signed-off-by: Yu Ke <ke.yu@intel.com>
+
+Index: libzypp/tools/CMakeLists.txt
+===================================================================
+--- libzypp.orig/tools/CMakeLists.txt
++++ libzypp/tools/CMakeLists.txt
+@@ -1,7 +1,7 @@
+
+ ADD_SUBDIRECTORY( package-manager )
+
+-INSTALL( FILES notify-message DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/zypp" )
++INSTALL( FILES notify-message DESTINATION "${LIB_INSTALL_DIR}/zypp" )
+
+ ## ############################################################
+
diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch
new file mode 100644
index 000000000..8d24ab007
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/libzypp-compatargs.patch
@@ -0,0 +1,54 @@
+zypp/Arch.cc: Add room for additional architecture compatibilities
+
+Upstream-Status: Pending
+
+Increase the size of the compatibility table from 9 to 30. There are already
+existing checks within libzypp to ensure that we don't overflow the 64-bit
+architecture field, so nothing further was required.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc
+--- git.orig/zypp/Arch.cc 2011-08-02 16:40:37.696662889 -0500
++++ git/zypp/Arch.cc 2011-08-04 11:24:18.051745246 -0500
+@@ -280,13 +280,39 @@
+ IdString arch6_r = IdString(),
+ IdString arch7_r = IdString(),
+ IdString arch8_r = IdString(),
+- IdString arch9_r = IdString() )
++ IdString arch9_r = IdString(),
++ IdString arch10_r = IdString(),
++ IdString arch11_r = IdString(),
++ IdString arch12_r = IdString(),
++ IdString arch13_r = IdString(),
++ IdString arch14_r = IdString(),
++ IdString arch15_r = IdString(),
++ IdString arch16_r = IdString(),
++ IdString arch17_r = IdString(),
++ IdString arch18_r = IdString(),
++ IdString arch19_r = IdString(),
++ IdString arch20_r = IdString(),
++ IdString arch21_r = IdString(),
++ IdString arch22_r = IdString(),
++ IdString arch23_r = IdString(),
++ IdString arch24_r = IdString(),
++ IdString arch25_r = IdString(),
++ IdString arch26_r = IdString(),
++ IdString arch27_r = IdString(),
++ IdString arch28_r = IdString(),
++ IdString arch29_r = IdString(),
++ IdString arch30_r = IdString() )
+ {
+ const CompatEntry & target( assertCompatSetEntry( targetArch_r ) );
+ target.addCompatBit( assertCompatSetEntry( arch0_r )._idBit );
+ #define _SETARG(N) if ( arch##N##_r.empty() ) return; target.addCompatBit( assertCompatSetEntry( arch##N##_r )._idBit )
+ _SETARG(1); _SETARG(2); _SETARG(3); _SETARG(4);
+ _SETARG(5); _SETARG(6); _SETARG(7); _SETARG(8); _SETARG(9);
++ _SETARG(10); _SETARG(11); _SETARG(12); _SETARG(13); _SETARG(14);
++ _SETARG(15); _SETARG(16); _SETARG(17); _SETARG(18); _SETARG(19);
++ _SETARG(20); _SETARG(21); _SETARG(22); _SETARG(23); _SETARG(24);
++ _SETARG(25); _SETARG(26); _SETARG(27); _SETARG(28); _SETARG(29);
++ _SETARG(30);
+ #undef _SETARG
+ }
+
diff --git a/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch b/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch
new file mode 100644
index 000000000..9a0e42b70
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/libzypp-oearch.patch
@@ -0,0 +1,500 @@
+Upstream-Status: Inappropriate [distribution]
+
+Disable all of the internal architectures
+
+We disable all of the internal architectures and replace them with ones
+generated by the libzypp recipe as specified in the oe-arch.h.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/tests/lib/TestSetup.h git/tests/lib/TestSetup.h
+--- git.orig/tests/lib/TestSetup.h 2011-03-28 14:24:36.534800770 -0500
++++ git/tests/lib/TestSetup.h 2011-03-28 14:25:04.969912234 -0500
+@@ -66,7 +66,7 @@
+ * // enabls loging fot the scope of this block:
+ * // base::LogControl::TmpLineWriter shutUp( new log::FileLineWriter( "/tmp/YLOG" ) );
+ *
+- * TestSetup test( Arch_x86_64 );
++ * TestSetup test( Arch_machine );
+ * // test.loadTarget(); // initialize and load target
+ * test.loadRepo( TESTS_SRC_DIR"/data/openSUSE-11.1" );
+ *
+@@ -313,7 +313,7 @@
+ * a TestSetup system or a real system. The provided repostitories are
+ * loaded into the pool (without refresh).
+ */
+- static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_x86_64 )
++ static void LoadSystemAt( const Pathname & sysRoot, const Arch & _testSetupArch_r = Arch_machine )
+ {
+ if ( ! PathInfo( sysRoot ).isDir() )
+ ZYPP_THROW( Exception("sysRoot argument needs to be a directory") );
+diff -ur git.orig/tools/DumpSelectable.cc git/tools/DumpSelectable.cc
+--- git.orig/tools/DumpSelectable.cc 2011-03-28 14:24:36.547876951 -0500
++++ git/tools/DumpSelectable.cc 2011-03-28 14:25:04.969912234 -0500
+@@ -78,7 +78,7 @@
+ else if ( TestSetup::isTestSetup( sysRoot ) )
+ {
+ message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl;
+- TestSetup test( sysRoot, Arch_x86_64 );
++ TestSetup test( sysRoot, Arch_machine );
+ test.loadRepos();
+ }
+ else
+diff -ur git.orig/tools/NameReqPrv.cc git/tools/NameReqPrv.cc
+--- git.orig/tools/NameReqPrv.cc 2011-03-28 14:24:36.547876951 -0500
++++ git/tools/NameReqPrv.cc 2011-03-28 14:25:04.970849384 -0500
+@@ -112,7 +112,7 @@
+ else if ( TestSetup::isTestSetup( sysRoot ) )
+ {
+ message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl;
+- TestSetup test( sysRoot, Arch_x86_64 );
++ TestSetup test( sysRoot, Arch_machine );
+ test.loadRepos();
+ dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl;
+ }
+diff -ur git.orig/tools/ToolScanRepos.cc git/tools/ToolScanRepos.cc
+--- git.orig/tools/ToolScanRepos.cc 2011-03-28 14:24:36.547876951 -0500
++++ git/tools/ToolScanRepos.cc 2011-03-28 14:25:04.970849384 -0500
+@@ -46,7 +46,7 @@
+ ///////////////////////////////////////////////////////////////////
+ Pathname mtmp( "/tmp" );
+ Pathname mroot( mtmp/appname );
+- Arch march( Arch_x86_64 );
++ Arch march( Arch_machine );
+ bool oClearRoot = true;
+
+ std::vector<std::string> urls;
+@@ -83,7 +83,7 @@
+ if ( *(argv[0]) ) // empty
+ march = Arch( argv[0] );
+ else
+- march = Arch_x86_64;
++ march = Arch_machine;
+ }
+ else
+ {
+@@ -131,4 +131,4 @@
+
+ INT << "===[END]============================================" << endl << endl;
+ return ret;
+-}
+\ No newline at end of file
++}
+diff -ur git.orig/tools/zypp-list.cc git/tools/zypp-list.cc
+--- git.orig/tools/zypp-list.cc 2011-03-28 14:24:36.547876951 -0500
++++ git/tools/zypp-list.cc 2011-03-28 14:25:04.971901224 -0500
+@@ -56,7 +56,7 @@
+ else if ( TestSetup::isTestSetup( sysRoot ) )
+ {
+ message << str::form( "*** Load TestSetup from '%s'", sysRoot.c_str() ) << endl;
+- TestSetup test( sysRoot, Arch_x86_64 );
++ TestSetup test( sysRoot, Arch_machine );
+ test.loadRepos();
+ dumpRange( message, satpool.reposBegin(), satpool.reposEnd() ) << endl;
+ }
+diff -ur git.orig/zypp/Arch.cc git/zypp/Arch.cc
+--- git.orig/zypp/Arch.cc 2011-03-28 14:24:36.548877414 -0500
++++ git/zypp/Arch.cc 2011-03-28 14:31:13.943786442 -0500
+@@ -153,53 +153,11 @@
+ // bit for each architecture.
+ //
+ #define DEF_BUILTIN(A) const IdString _##A( #A );
++ DEF_BUILTIN( all );
++ DEF_BUILTIN( any );
+ DEF_BUILTIN( noarch );
+
+- DEF_BUILTIN( i386 );
+- DEF_BUILTIN( i486 );
+- DEF_BUILTIN( i586 );
+- DEF_BUILTIN( i686 );
+- DEF_BUILTIN( athlon );
+- DEF_BUILTIN( x86_64 );
+-
+- DEF_BUILTIN( pentium3 );
+- DEF_BUILTIN( pentium4 );
+-
+- DEF_BUILTIN( s390 );
+- DEF_BUILTIN( s390x );
+-
+- DEF_BUILTIN( ppc );
+- DEF_BUILTIN( ppc64 );
+-
+- DEF_BUILTIN( ia64 );
+-
+- DEF_BUILTIN( alphaev67 );
+- DEF_BUILTIN( alphaev6 );
+- DEF_BUILTIN( alphapca56 );
+- DEF_BUILTIN( alphaev56 );
+- DEF_BUILTIN( alphaev5 );
+- DEF_BUILTIN( alpha );
+-
+- DEF_BUILTIN( sparc64v );
+- DEF_BUILTIN( sparcv9v );
+- DEF_BUILTIN( sparc64 );
+- DEF_BUILTIN( sparcv9 );
+- DEF_BUILTIN( sparcv8 );
+- DEF_BUILTIN( sparc );
+-
+- DEF_BUILTIN( armv7l );
+- DEF_BUILTIN( armv6l );
+- DEF_BUILTIN( armv5tejl );
+- DEF_BUILTIN( armv5tel );
+- DEF_BUILTIN( armv5l );
+- DEF_BUILTIN( armv4tl );
+- DEF_BUILTIN( armv4l );
+- DEF_BUILTIN( armv3l );
+-
+- DEF_BUILTIN( sh3 );
+-
+- DEF_BUILTIN( sh4 );
+- DEF_BUILTIN( sh4a );
++#include "oe-arch.h"
+ #undef DEF_BUILTIN
+
+ ///////////////////////////////////////////////////////////////////
+@@ -269,6 +227,8 @@
+ // _noarch must have _idBit 0.
+ // Other builtins have 1-bit set
+ // and are initialized done on the fly.
++ _compatSet.insert( Arch::CompatEntry( _all, 0 ) );
++ _compatSet.insert( Arch::CompatEntry( _any, 0 ) );
+ _compatSet.insert( Arch::CompatEntry( _noarch, 0 ) );
+ ///////////////////////////////////////////////////////////////////
+ // Define the CompatibleWith relation:
+@@ -276,52 +236,9 @@
+ // NOTE: Order of definition is significant! (Arch::compare)
+ // - define compatible (less) architectures first!
+ //
+- defCompatibleWith( _i386, _noarch );
+- defCompatibleWith( _i486, _noarch,_i386 );
+- defCompatibleWith( _i586, _noarch,_i386,_i486 );
+- defCompatibleWith( _i686, _noarch,_i386,_i486,_i586 );
+- defCompatibleWith( _athlon, _noarch,_i386,_i486,_i586,_i686 );
+- defCompatibleWith( _x86_64, _noarch,_i386,_i486,_i586,_i686,_athlon );
+-
+- defCompatibleWith( _pentium3, _noarch,_i386,_i486,_i586,_i686 );
+- defCompatibleWith( _pentium4, _noarch,_i386,_i486,_i586,_i686,_pentium3 );
+-
+- defCompatibleWith( _ia64, _noarch,_i386,_i486,_i586,_i686 );
+- //
+- defCompatibleWith( _s390, _noarch );
+- defCompatibleWith( _s390x, _noarch,_s390 );
+- //
+- defCompatibleWith( _ppc, _noarch );
+- defCompatibleWith( _ppc64, _noarch,_ppc );
+- //
+- defCompatibleWith( _alpha, _noarch );
+- defCompatibleWith( _alphaev5, _noarch,_alpha );
+- defCompatibleWith( _alphaev56, _noarch,_alpha,_alphaev5 );
+- defCompatibleWith( _alphapca56, _noarch,_alpha,_alphaev5,_alphaev56 );
+- defCompatibleWith( _alphaev6, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56 );
+- defCompatibleWith( _alphaev67, _noarch,_alpha,_alphaev5,_alphaev56,_alphapca56,_alphaev6 );
+- //
+- defCompatibleWith( _sparc, _noarch );
+- defCompatibleWith( _sparcv8, _noarch,_sparc );
+- defCompatibleWith( _sparcv9, _noarch,_sparc,_sparcv8 );
+- defCompatibleWith( _sparcv9v, _noarch,_sparc,_sparcv8,_sparcv9 );
+- //
+- defCompatibleWith( _sparc64, _noarch,_sparc,_sparcv8,_sparcv9 );
+- defCompatibleWith( _sparc64v, _noarch,_sparc,_sparcv8,_sparcv9,_sparcv9v,_sparc64 );
+- //
+- defCompatibleWith( _armv3l, _noarch );
+- defCompatibleWith( _armv4l, _noarch,_armv3l );
+- defCompatibleWith( _armv4tl, _noarch,_armv3l,_armv4l );
+- defCompatibleWith( _armv5l, _noarch,_armv3l,_armv4l,_armv4tl );
+- defCompatibleWith( _armv5tel, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l );
+- defCompatibleWith( _armv5tejl, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel );
+- defCompatibleWith( _armv6l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl );
+- defCompatibleWith( _armv7l, _noarch,_armv3l,_armv4l,_armv4tl,_armv5l,_armv5tel,_armv5tejl,_armv6l );
+- //
+- defCompatibleWith( _sh3, _noarch );
+- //
+- defCompatibleWith( _sh4, _noarch );
+- defCompatibleWith( _sh4a, _noarch,_sh4 );
++#define OE_DEF_COMPAT 1
++#include "oe-arch.h"
++#undef OE_DEF_COMPAT
+ //
+ ///////////////////////////////////////////////////////////////////
+ // dumpOn( USR ) << endl;
+@@ -388,53 +305,13 @@
+ ///////////////////////////////////////////////////////////////////
+
+ const Arch Arch_empty ( IdString::Empty );
++ const Arch Arch_all( _all );
++ const Arch Arch_any( _any );
+ const Arch Arch_noarch( _noarch );
+
+- const Arch Arch_i386( _i386 );
+- const Arch Arch_i486( _i486 );
+- const Arch Arch_i586( _i586 );
+- const Arch Arch_i686( _i686 );
+- const Arch Arch_athlon( _athlon );
+- const Arch Arch_x86_64( _x86_64 );
+-
+- const Arch Arch_pentium3( _pentium3 );
+- const Arch Arch_pentium4( _pentium4 );
+-
+- const Arch Arch_s390( _s390 );
+- const Arch Arch_s390x( _s390x );
+-
+- const Arch Arch_ppc( _ppc );
+- const Arch Arch_ppc64( _ppc64 );
+-
+- const Arch Arch_ia64( _ia64 );
+-
+- const Arch Arch_alphaev67( _alphaev67 );
+- const Arch Arch_alphaev6( _alphaev6 );
+- const Arch Arch_alphapca56( _alphapca56 );
+- const Arch Arch_alphaev56( _alphaev56 );
+- const Arch Arch_alphaev5( _alphaev5 );
+- const Arch Arch_alpha( _alpha );
+-
+- const Arch Arch_sparc64v( _sparc64v );
+- const Arch Arch_sparc64( _sparc64 );
+- const Arch Arch_sparcv9v( _sparcv9v );
+- const Arch Arch_sparcv9( _sparcv9 );
+- const Arch Arch_sparcv8( _sparcv8 );
+- const Arch Arch_sparc( _sparc );
+-
+- const Arch Arch_armv7l( _armv7l );
+- const Arch Arch_armv6l( _armv6l );
+- const Arch Arch_armv5tejl( _armv5tejl );
+- const Arch Arch_armv5tel( _armv5tel );
+- const Arch Arch_armv5l( _armv5l );
+- const Arch Arch_armv4tl( _armv4tl );
+- const Arch Arch_armv4l( _armv4l );
+- const Arch Arch_armv3l( _armv3l );
+-
+- const Arch Arch_sh3( _sh3 );
+-
+- const Arch Arch_sh4( _sh4 );
+- const Arch Arch_sh4a( _sh4a );
++#define OE_PROTO 1
++#include "oe-arch.h"
++#undef OE_PROTO
+
+ ///////////////////////////////////////////////////////////////////
+ //
+@@ -504,26 +381,10 @@
+ //
+ Arch Arch::baseArch( ) const
+ {
+- // check the multilib archs:
+- if (Arch_x86_64.compatibleWith(*this))
+- {
+- return Arch_x86_64;
+- }
+- if (Arch_sparc64v.compatibleWith(*this))
+- {
+- return Arch_sparc64v;
+- }
+- if (Arch_sparc64.compatibleWith(*this))
+- {
+- return Arch_sparc64;
+- }
+- if (Arch_ppc64.compatibleWith(*this))
+- {
+- return Arch_ppc64;
+- }
+- if (Arch_s390x.compatibleWith(*this))
++ // Check the multilib arch:
++ if (Arch_machine.compatibleWith(*this))
+ {
+- return Arch_s390x;
++ return Arch_machine;
+ }
+ // Here: no multilib; return arch before noarch
+ CompatSet cset( compatSet( *this ) );
+diff -ur git.orig/zypp/Arch.h git/zypp/Arch.h
+--- git.orig/zypp/Arch.h 2011-03-28 14:24:36.548877414 -0500
++++ git/zypp/Arch.h 2011-03-28 14:25:04.972801208 -0500
+@@ -162,89 +162,13 @@
+ extern const Arch Arch_empty;
+
+ /** \relates Arch */
++ extern const Arch Arch_all;
++ extern const Arch Arch_any;
+ extern const Arch Arch_noarch;
+
+- /** \relates Arch */
+- extern const Arch Arch_pentium4;
+- /** \relates Arch */
+- extern const Arch Arch_pentium3;
+-
+- /** \relates Arch */
+- extern const Arch Arch_x86_64;
+- /** \relates Arch */
+- extern const Arch Arch_athlon;
+- /** \relates Arch */
+- extern const Arch Arch_i686;
+- /** \relates Arch */
+- extern const Arch Arch_i586;
+- /** \relates Arch */
+- extern const Arch Arch_i486;
+- /** \relates Arch */
+- extern const Arch Arch_i386;
+-
+- /** \relates Arch */
+- extern const Arch Arch_s390x;
+- /** \relates Arch */
+- extern const Arch Arch_s390;
+-
+- /** \relates Arch */
+- extern const Arch Arch_ppc64;
+- /** \relates Arch */
+- extern const Arch Arch_ppc;
+-
+- /** \relates Arch */
+- extern const Arch Arch_ia64;
+-
+- /** \relates Arch */
+- extern const Arch Arch_alphaev67;
+- /** \relates Arch */
+- extern const Arch Arch_alphaev6;
+- /** \relates Arch */
+- extern const Arch Arch_alphapca56;
+- /** \relates Arch */
+- extern const Arch Arch_alphaev56;
+- /** \relates Arch */
+- extern const Arch Arch_alphaev5;
+- /** \relates Arch */
+- extern const Arch Arch_alpha;
+-
+- /** \relates Arch */
+- extern const Arch Arch_sparc64v;
+- /** \relates Arch */
+- extern const Arch Arch_sparc64;
+- /** \relates Arch */
+- extern const Arch Arch_sparcv9v;
+- /** \relates Arch */
+- extern const Arch Arch_sparcv9;
+- /** \relates Arch */
+- extern const Arch Arch_sparcv8;
+- /** \relates Arch */
+- extern const Arch Arch_sparc;
+-
+- /** \relates Arch */
+- extern const Arch Arch_armv7l;
+- /** \relates Arch */
+- extern const Arch Arch_armv6l;
+- /** \relates Arch */
+- extern const Arch Arch_armv5tejl;
+- /** \relates Arch */
+- extern const Arch Arch_armv5tel;
+- /** \relates Arch */
+- extern const Arch Arch_armv5l;
+- /** \relates Arch */
+- extern const Arch Arch_armv4tl;
+- /** \relates Arch */
+- extern const Arch Arch_armv4l;
+- /** \relates Arch */
+- extern const Arch Arch_armv3l;
+-
+- /** \relates Arch */
+- extern const Arch Arch_sh3;
+-
+- /** \relates Arch */
+- extern const Arch Arch_sh4;
+- /** \relates Arch */
+- extern const Arch Arch_sh4a;
++#define OE_EXTERN_PROTO 1
++#include "oe-arch.h"
++#undef OE_EXTERN_PROTO
+ //@}
+
+ ///////////////////////////////////////////////////////////////////
+diff -ur git.orig/zypp/CMakeLists.txt git/zypp/CMakeLists.txt
+--- git.orig/zypp/CMakeLists.txt
++++ git/zypp/CMakeLists.txt
+@@ -90,6 +90,7 @@ SET( zypp_EARLY_SRCS
+
+ SET( zypp_HEADERS
+ Arch.h
++ oe-arch.h
+ AutoDispose.h
+ Bit.h
+ ByteCount.h
+diff -ur git.orig/zypp/ZConfig.cc git/zypp/ZConfig.cc
+--- git.orig/zypp/ZConfig.cc 2011-03-28 14:24:37.178989632 -0500
++++ git/zypp/ZConfig.cc 2011-03-28 14:25:04.973971936 -0500
+@@ -48,77 +48,9 @@
+ */
+ Arch _autodetectSystemArchitecture()
+ {
+- struct ::utsname buf;
+- if ( ::uname( &buf ) < 0 )
+- {
+- ERR << "Can't determine system architecture" << endl;
+- return Arch_noarch;
+- }
+-
+- Arch architecture( buf.machine );
+- MIL << "Uname architecture is '" << buf.machine << "'" << endl;
++ /* Define the default architecture, ignore uname! */
++ Arch architecture( Arch_machine );
+
+- if ( architecture == Arch_i686 )
+- {
+- // some CPUs report i686 but dont implement cx8 and cmov
+- // check for both flags in /proc/cpuinfo and downgrade
+- // to i586 if either is missing (cf bug #18885)
+- std::ifstream cpuinfo( "/proc/cpuinfo" );
+- if ( cpuinfo )
+- {
+- for( iostr::EachLine in( cpuinfo ); in; in.next() )
+- {
+- if ( str::hasPrefix( *in, "flags" ) )
+- {
+- if ( in->find( "cx8" ) == std::string::npos
+- || in->find( "cmov" ) == std::string::npos )
+- {
+- architecture = Arch_i586;
+- WAR << "CPU lacks 'cx8' or 'cmov': architecture downgraded to '" << architecture << "'" << endl;
+- }
+- break;
+- }
+- }
+- }
+- else
+- {
+- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl;
+- }
+- }
+- else if ( architecture == Arch_sparc || architecture == Arch_sparc64 )
+- {
+- // Check for sun4[vum] to get the real arch. (bug #566291)
+- std::ifstream cpuinfo( "/proc/cpuinfo" );
+- if ( cpuinfo )
+- {
+- for( iostr::EachLine in( cpuinfo ); in; in.next() )
+- {
+- if ( str::hasPrefix( *in, "type" ) )
+- {
+- if ( in->find( "sun4v" ) != std::string::npos )
+- {
+- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64v : Arch_sparcv9v );
+- WAR << "CPU has 'sun4v': architecture upgraded to '" << architecture << "'" << endl;
+- }
+- else if ( in->find( "sun4u" ) != std::string::npos )
+- {
+- architecture = ( architecture == Arch_sparc64 ? Arch_sparc64 : Arch_sparcv9 );
+- WAR << "CPU has 'sun4u': architecture upgraded to '" << architecture << "'" << endl;
+- }
+- else if ( in->find( "sun4m" ) != std::string::npos )
+- {
+- architecture = Arch_sparcv8;
+- WAR << "CPU has 'sun4m': architecture upgraded to '" << architecture << "'" << endl;
+- }
+- break;
+- }
+- }
+- }
+- else
+- {
+- ERR << "Cant open " << PathInfo("/proc/cpuinfo") << endl;
+- }
+- }
+ return architecture;
+ }
+
diff --git a/meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch b/meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch
new file mode 100644
index 000000000..d01ef70b0
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+# with gcc 4.3.3 and MIPS target, gcc "internal compiler error: segmentation fault" error
+# occurs when compiling Applydeltarpm.cc. I didn't find the exact reason leading to this
+# error, but it should be related to how boost tribool type is interpreted by g++. So provide
+# this mips workaround for now. We'll come back later to check whether it's still required after
+# upgrading to 4.5.0.
+#
+# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-09-08
+
+diff --git a/zypp/repo/Applydeltarpm.cc b/zypp/repo/Applydeltarpm.cc
+index 7b382be..0d7a1f8 100644
+--- a/zypp/repo/Applydeltarpm.cc
++++ b/zypp/repo/Applydeltarpm.cc
+@@ -77,7 +77,8 @@ namespace zypp
+ else
+ {
+ // _last is 'indeterminate' or '!have'
+- if ( (_last = have) )
++ _last = have;
++ if ( _last )
+ MIL << "Found executable " << prog << endl;
+ else
+ WAR << "No executable " << prog << endl;
diff --git a/meta/recipes-extended/libzypp/libzypp/no-doc.patch b/meta/recipes-extended/libzypp/libzypp/no-doc.patch
new file mode 100644
index 000000000..c7e6e921e
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/no-doc.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [configuration]
+
+not building doc (doxygen based)
+
+8/19/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0629b1f..41746cc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -110,13 +110,6 @@ FIND_PACKAGE(EXPAT REQUIRED)
+ FIND_PACKAGE(OpenSSL REQUIRED)
+ FIND_PACKAGE(Udev REQUIRED)
+
+-FIND_PROGRAM( DOXYGEN doxygen )
+-IF ( NOT DOXYGEN )
+- MESSAGE( FATAL_ERROR "doxygen not found: install doxygen to build the documentation." )
+-ELSE ( NOT DOXYGEN )
+- MESSAGE( STATUS "doxygen found: ${DOXYGEN}" )
+-ENDIF ( NOT DOXYGEN )
+-
+ MESSAGE(STATUS "soname: ${LIBZYPP_VERSION_INFO}")
+ MESSAGE(STATUS "version: ${VERSION}")
+
+@@ -154,7 +147,7 @@ ADD_SUBDIRECTORY( devel EXCLUDE_FROM_ALL )
+ ADD_SUBDIRECTORY( tools )
+ ADD_SUBDIRECTORY( examples )
+ ADD_SUBDIRECTORY( po EXCLUDE_FROM_ALL )
+-ADD_SUBDIRECTORY( doc )
++#ADD_SUBDIRECTORY( doc )
+ ADD_SUBDIRECTORY( vendor )
+ ADD_SUBDIRECTORY( tests EXCLUDE_FROM_ALL )
+
diff --git a/meta/recipes-extended/libzypp/libzypp/rpm5-no-rpmdbinit.patch b/meta/recipes-extended/libzypp/libzypp/rpm5-no-rpmdbinit.patch
new file mode 100644
index 000000000..700620331
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/rpm5-no-rpmdbinit.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Pending
+
+diff --git a/zypp/target/rpm/librpmDb.cc b/zypp/target/rpm/librpmDb.cc
+index 1689fbb..4999cd9 100644
+--- a/zypp/target/rpm/librpmDb.cc
++++ b/zypp/target/rpm/librpmDb.cc
+@@ -60,20 +60,6 @@ public:
+ const char * root = ( _root == "/" ? NULL : _root.asString().c_str() );
+ int perms = 0644;
+
+- // check whether to create a new db
+- PathInfo master( _root + _dbPath + "Packages" );
+- if ( ! master.isFile() )
+- {
+- // init database
+- int res = ::rpmdbInit( root, perms );
+- if ( res )
+- {
+- ERR << "rpmdbInit error(" << res << "): " << *this << endl;
+- _error = shared_ptr<RpmInitException>(new RpmInitException(_root, _dbPath));
+- ZYPP_THROW(*_error);
+- }
+- }
+-
+ // open database
+ int res = ::rpmdbOpen( root, &_db, (readonly_r ? O_RDONLY : O_RDWR ), perms );
+ if ( res || !_db )
diff --git a/meta/recipes-extended/libzypp/libzypp/rpm5.patch b/meta/recipes-extended/libzypp/libzypp/rpm5.patch
new file mode 100644
index 000000000..bf3da2496
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/rpm5.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+
+build fix for rpm5
+
+8/19/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/zypp/target/rpm/BinHeader.cc b/zypp/target/rpm/BinHeader.cc
+index e9ad382..86a9c96 100644
+--- a/zypp/target/rpm/BinHeader.cc
++++ b/zypp/target/rpm/BinHeader.cc
+@@ -19,7 +19,7 @@ extern "C"
+
+ #ifndef _RPM_4_4_COMPAT
+ #ifdef _RPM_5
+-typedef rpmuint32_t rpm_count_t;
++typedef uint32_t rpm_count_t;
+ #else
+ typedef int32_t rpm_count_t;
+ #endif
+diff --git a/zypp/target/rpm/librpmDb.cv3.cc b/zypp/target/rpm/librpmDb.cv3.cc
+index bf18e45..5454ea9 100644
+--- a/zypp/target/rpm/librpmDb.cv3.cc
++++ b/zypp/target/rpm/librpmDb.cv3.cc
+@@ -14,7 +14,7 @@ extern "C"
+ {
+ #ifndef _RPM_4_4_COMPAT
+ #ifdef _RPM_5
+-typedef rpmuint32_t rpm_count_t;
++typedef uint32_t rpm_count_t;
+ #else
+ typedef int32_t rpm_count_t;
+ #endif
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
new file mode 100644
index 000000000..3c3a9f09e
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -0,0 +1,152 @@
+HOMEPAGE = "http://en.opensuse.org/Portal:Libzypp"
+DESCRIPTION = "The ZYpp Linux Software management framework"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=11fccc94d26293d78cb4996cb17e5fa7"
+
+inherit cmake gettext
+
+DEPENDS = "rpm boost curl libxml2 zlib sat-solver expat openssl udev libproxy"
+
+S = "${WORKDIR}/git"
+SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433"
+PV = "0.0-git${SRCPV}"
+PR = "r20"
+
+SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \
+ file://no-doc.patch \
+ file://rpm5.patch \
+ file://rpm5-no-rpmdbinit.patch \
+ file://config-release.patch \
+ file://libzypp-oearch.patch \
+ file://libzypp-compatargs.patch \
+ file://fix_for_compile_wth_gcc-4.6.0.patch \
+ file://hardcode-lib-fix.patch \
+ file://close.patch \
+ "
+
+SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
+
+# ARM specific global constructor workaround
+SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch"
+
+# rpmdb2solv from sat-solver is run from libzypp
+RDEPENDS_${PN} = "sat-solver rpm-libs gzip gnupg"
+
+PACKAGES =+ "${PN}-pkgmgt"
+
+FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons"
+FILES_${PN}-dev += "${datadir}/cmake"
+
+FILES_${PN}-pkgmgt = "${bindir}/package-manager \
+ ${bindir}/package-manager-su \
+ ${datadir}/applications/package-manager.desktop \
+ "
+
+EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+AVOID_CONSTRUCTOR = ""
+
+# Due to an ARM specific compiler issue
+AVOID_CONSTRUCTOR_arm = "true"
+
+# Due to a potential conflict with '_mips' being a define
+AVOID_CONSTRUCTOR_mips = "true"
+
+do_archgen () {
+ # We need to dynamically generate our arch file based on the machine
+ # configuration
+ echo "/* Automatically generated by the libzypp recipes */" > zypp/oe-arch.h
+ echo "/* Avoid Constructor: ${AVOID_CONSTRUCTOR} */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+ echo "#ifndef OE_ARCH_H" >> zypp/oe-arch.h
+ echo "#define OE_ARCH_H 1" >> zypp/oe-arch.h
+ echo "#define Arch_machine Arch_${MACHINE_ARCH}" | tr - _ >> zypp/oe-arch.h
+ echo "#endif /* OE_ARCH_H */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+ if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
+ echo "#ifdef DEF_BUILTIN" >> zypp/oe-arch.h
+ echo "/* Specify builtin types */" >> zypp/oe-arch.h
+ for each_arch in ${PACKAGE_ARCHS} ; do
+ case "$each_arch" in
+ all | any | noarch)
+ continue;;
+ esac
+ echo " DEF_BUILTIN( ${each_arch} );" | tr - _ >> zypp/oe-arch.h
+ done
+ echo "#endif /* DEF_BUILTIN */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+ fi
+ echo "#ifdef OE_EXTERN_PROTO" >> zypp/oe-arch.h
+ echo "/* Specify extern prototypes */" >> zypp/oe-arch.h
+ for each_arch in ${PACKAGE_ARCHS} ; do
+ case "$each_arch" in
+ all | any | noarch)
+ continue;;
+ esac
+ echo " extern const Arch Arch_${each_arch};" | tr - _ >> zypp/oe-arch.h
+ done
+ echo "#endif /* OE_EXTERN_PROTO */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+ echo "#ifdef OE_PROTO" >> zypp/oe-arch.h
+ echo "/* Specify prototypes */" >> zypp/oe-arch.h
+ for each_arch in ${PACKAGE_ARCHS} ; do
+ case "$each_arch" in
+ all | any | noarch)
+ continue;;
+ esac
+ if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
+ echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
+ echo "(_${each_arch});" | tr - _ >> zypp/oe-arch.h
+ else
+ echo -n " const Arch Arch_${each_arch} " | tr - _ >> zypp/oe-arch.h
+ echo "( IdString ( \"${each_arch}\" ) );" | tr - _ >> zypp/oe-arch.h
+ fi
+ done
+ echo "#endif /* OE_PROTO */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+ echo "#ifdef OE_DEF_COMPAT" >> zypp/oe-arch.h
+ echo "/* Specify compatibility information */" >> zypp/oe-arch.h
+ INSTALL_PLATFORM_ARCHS=""
+ for each_arch in ${PACKAGE_ARCHS} ; do
+ INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS"
+ done
+
+ COMPAT_WITH=""
+ set -- ${INSTALL_PLATFORM_ARCHS}
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ all | any | noarch)
+ shift ; continue;;
+ esac
+ if [ "${AVOID_CONSTRUCTOR}" != "true" ]; then
+ CARCH="_$1"
+ else
+ CARCH="IdString(\"$1\")"
+ fi
+ shift
+ COMPAT=""
+ for each_arch in "$@"; do
+ if [ -z "${AVOID_CONSTRUCTOR}" ]; then
+ arch_val="_${each_arch}"
+ else
+ arch_val="IdString(\"${each_arch}\")"
+ fi
+ if [ -z "$COMPAT" ]; then
+ COMPAT=${arch_val}
+ else
+ COMPAT="${arch_val},$COMPAT"
+ fi
+ done
+ COMPAT_WITH="${CARCH},${COMPAT} $COMPAT_WITH"
+ done
+ for each_compat in ${COMPAT_WITH} ; do
+ echo " defCompatibleWith( ${each_compat} );" | tr - _ >> zypp/oe-arch.h
+ done
+ echo "#endif /* DEF_COMPAT */" >> zypp/oe-arch.h
+ echo "" >> zypp/oe-arch.h
+}
+
+addtask archgen before do_configure after do_patch
diff --git a/meta/recipes-extended/lighttpd/files/index.html.lighttpd b/meta/recipes-extended/lighttpd/files/index.html.lighttpd
new file mode 100644
index 000000000..cd25bf17b
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/files/index.html.lighttpd
@@ -0,0 +1 @@
+<html><body><h1>It works!</h1></body></html> \ No newline at end of file
diff --git a/meta/recipes-extended/lighttpd/files/lighttpd b/meta/recipes-extended/lighttpd/files/lighttpd
new file mode 100644
index 000000000..bf89a60b7
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/files/lighttpd
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/lighttpd
+NAME=lighttpd
+DESC="Lighttpd Web Server"
+OPTS="-f /etc/lighttpd.conf"
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start -x "$DAEMON" -- $OPTS
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop -x "$DAEMON"
+ echo "$NAME."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop -x "$DAEMON"
+ sleep 1
+ start-stop-daemon --start -x "$DAEMON" -- $OPTS
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-extended/lighttpd/files/lighttpd.conf b/meta/recipes-extended/lighttpd/files/lighttpd.conf
new file mode 100644
index 000000000..3342470ce
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/files/lighttpd.conf
@@ -0,0 +1,328 @@
+# lighttpd configuration file
+#
+# use it as a base for lighttpd 1.0.0 and above
+#
+# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
+
+############ Options you really have to take care of ####################
+
+## modules to load
+# at least mod_access and mod_accesslog should be loaded
+# all other module should only be loaded if really neccesary
+# - saves some time
+# - saves memory
+server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+ "mod_access",
+# "mod_cml",
+# "mod_trigger_b4_dl",
+# "mod_auth",
+# "mod_status",
+# "mod_setenv",
+# "mod_fastcgi",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_evhost",
+# "mod_userdir",
+# "mod_cgi",
+# "mod_compress",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire",
+# "mod_secdownload",
+# "mod_rrdtool",
+# "mod_webdav",
+ "mod_accesslog" )
+
+## a static document-root, for virtual-hosting take look at the
+## server.virtual-* options
+server.document-root = "/www/pages/"
+
+## where to send error-messages to
+server.errorlog = "/www/logs/lighttpd.error.log"
+
+# files to check for if .../ is requested
+index-file.names = ( "index.php", "index.html",
+ "index.htm", "default.htm" )
+
+## set the event-handler (read the performance section in the manual)
+# server.event-handler = "freebsd-kqueue" # needed on OS X
+
+# mimetype mapping
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".sig" => "application/pgp-signature",
+ ".spl" => "application/futuresplash",
+ ".class" => "application/octet-stream",
+ ".ps" => "application/postscript",
+ ".torrent" => "application/x-bittorrent",
+ ".dvi" => "application/x-dvi",
+ ".gz" => "application/x-gzip",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".tar" => "application/x-tar",
+ ".zip" => "application/zip",
+ ".mp3" => "audio/mpeg",
+ ".m3u" => "audio/x-mpegurl",
+ ".wma" => "audio/x-ms-wma",
+ ".wax" => "audio/x-ms-wax",
+ ".ogg" => "application/ogg",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".xbm" => "image/x-xbitmap",
+ ".xpm" => "image/x-xpixmap",
+ ".xwd" => "image/x-xwindowdump",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".asc" => "text/plain",
+ ".c" => "text/plain",
+ ".cpp" => "text/plain",
+ ".log" => "text/plain",
+ ".conf" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".mpeg" => "video/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".qt" => "video/quicktime",
+ ".avi" => "video/x-msvideo",
+ ".asf" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".wmv" => "video/x-ms-wmv",
+ ".bz2" => "application/x-bzip",
+ ".tbz" => "application/x-bzip-compressed-tar",
+ ".tar.bz2" => "application/x-bzip-compressed-tar"
+ )
+
+# Use the "Content-Type" extended attribute to obtain mime type if possible
+#mimetype.use-xattr = "enable"
+
+
+## send a different Server: header
+## be nice and keep it at lighttpd
+# server.tag = "lighttpd"
+
+#### accesslog module
+accesslog.filename = "/www/logs/access.log"
+debug.log-request-handling = "enable"
+
+
+
+
+## deny access the file-extensions
+#
+# ~ is for backupfiles from vi, emacs, joe, ...
+# .inc is often used for code includes which should in general not be part
+# of the document-root
+url.access-deny = ( "~", ".inc" )
+
+$HTTP["url"] =~ "\.pdf$" {
+ server.range-requests = "disable"
+}
+
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+
+######### Options that are good to be but not neccesary to be changed #######
+
+## bind to port (default: 80)
+#server.port = 81
+
+## bind to localhost (default: all interfaces)
+#server.bind = "grisu.home.kneschke.de"
+
+## error-handler for status 404
+#server.error-handler-404 = "/error-handler.html"
+#server.error-handler-404 = "/error-handler.php"
+
+## to help the rc.scripts
+#server.pid-file = "/var/run/lighttpd.pid"
+
+
+###### virtual hosts
+##
+## If you want name-based virtual hosting add the next three settings and load
+## mod_simple_vhost
+##
+## document-root =
+## virtual-server-root + virtual-server-default-host + virtual-server-docroot
+## or
+## virtual-server-root + http-host + virtual-server-docroot
+##
+#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
+#simple-vhost.default-host = "grisu.home.kneschke.de"
+#simple-vhost.document-root = "/pages/"
+
+
+##
+## Format: <errorfile-prefix><status-code>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
+
+## virtual directory listings
+#dir-listing.activate = "enable"
+
+## enable debugging
+#debug.log-request-header = "enable"
+#debug.log-response-header = "enable"
+#debug.log-request-handling = "enable"
+#debug.log-file-not-found = "enable"
+
+### only root can use these options
+#
+# chroot() to directory (default: no chroot() )
+#server.chroot = "/"
+
+## change uid to <uid> (default: don't care)
+#server.username = "wwwrun"
+
+## change uid to <uid> (default: don't care)
+#server.groupname = "wwwrun"
+
+#### compress module
+#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
+#compress.filetype = ("text/plain", "text/html")
+
+#### proxy module
+## read proxy.txt for more info
+#proxy.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+# )
+
+#### fastcgi module
+## read fastcgi.txt for more info
+## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
+#fastcgi.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "socket" => "/tmp/php-fastcgi.socket",
+# "bin-path" => "/usr/local/bin/php"
+# )
+# )
+# )
+
+#### CGI module
+#cgi.assign = ( ".pl" => "/usr/bin/perl",
+# ".cgi" => "/usr/bin/perl" )
+#
+
+#### SSL engine
+#ssl.engine = "enable"
+#ssl.pemfile = "server.pem"
+
+#### status module
+#status.status-url = "/server-status"
+#status.config-url = "/server-config"
+
+#### auth module
+## read authentication.txt for more info
+#auth.backend = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+
+#auth.backend.ldap.hostname = "localhost"
+#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+#auth.backend.ldap.filter = "(uid=$)"
+
+#auth.require = ( "/server-status" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "user=jan"
+# ),
+# "/server-config" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "valid-user"
+# )
+# )
+
+#### url handling modules (rewrite, redirect, access)
+#url.rewrite = ( "^/$" => "/server-status" )
+#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+
+#### both rewrite/redirect support back reference to regex conditional using %n
+#$HTTP["host"] =~ "^www\.(.*)" {
+# url.redirect = ( "^/(.*)" => "http://%1/$1" )
+#}
+
+#
+# define a pattern for the host url finding
+# %% => % sign
+# %0 => domain name + tld
+# %1 => tld
+# %2 => domain name without tld
+# %3 => subdomain 1 name
+# %4 => subdomain 2 name
+#
+#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
+
+#### expire module
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#### ssi
+#ssi.extension = ( ".shtml" )
+
+#### rrdtool
+#rrdtool.binary = "/usr/bin/rrdtool"
+#rrdtool.db-name = "/var/www/lighttpd.rrd"
+
+#### setenv
+#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+## for mod_trigger_b4_dl
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+
+## for mod_cml
+## don't forget to add index.cml to server.indexfiles
+# cml.extension = ".cml"
+# cml.memcache-hosts = ( "127.0.0.1:11211" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb
new file mode 100644
index 000000000..3ae38671f
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+
+SECTION = "net"
+DEPENDS = "zlib libpcre"
+RDEPENDS_${PN} += " \
+ lighttpd-module-access \
+ lighttpd-module-accesslog \
+ lighttpd-module-indexfile \
+ lighttpd-module-dirlisting \
+ lighttpd-module-staticfile \
+"
+
+PR = "r0"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.bz2 \
+ file://index.html.lighttpd \
+ file://lighttpd.conf \
+ file://lighttpd \
+"
+
+SRC_URI[md5sum] = "63f9df52dcae0ab5689a95c99c54e48a"
+SRC_URI[sha256sum] = "0d795597e4666dbf6ffe44b4a42f388ddb44736ddfab0b1ac091e5bb35212c2d"
+
+EXTRA_OECONF = " \
+ --without-bzip2 \
+ --without-ldap \
+ --without-lua \
+ --without-memcache \
+ --with-pcre \
+ --without-webdav-props \
+ --without-webdav-locks \
+ --without-openssl \
+ --disable-static \
+"
+
+inherit autotools pkgconfig update-rc.d gettext
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var
+ install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC = "lighttpd-module-*"
+
+python populate_packages_prepend () {
+ lighttpd_libdir = d.expand('${libdir}')
+ do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
new file mode 100644
index 000000000..c9fb1d252
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
@@ -0,0 +1,107 @@
+Act as the "mv" command when rotate log
+
+Act as the "mv" command when rotate log, first rename, if failed, then
+read and write.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ logrotate.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 53 insertions(+), 6 deletions(-)
+
+diff --git a/logrotate.c b/logrotate.c
+index 537e8d6..b04482f 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -808,6 +808,53 @@ int findNeedRotating(struct logInfo *log, int logNum)
+ return 0;
+ }
+
++/* Act as the "mv" command, if rename failed, then read the old file and
++ * write to new file. The function which invokes the mvFile will use
++ * the strerror(errorno) to handle the error message, so we don't have
++ * to print the error message here */
++
++int mvFile (char *oldName, char *newName, struct logInfo *log)
++{
++ struct stat sbprev;
++ int fd_old, fd_new, n;
++ char buf[BUFSIZ];
++
++ /* Do the rename first */
++ if (!rename(oldName, newName))
++ return 0;
++
++ /* If the errno is EXDEV, then read old file, write newfile and
++ * remove the oldfile */
++ if (errno == EXDEV) {
++ /* Open the old file to read */
++ if ((fd_old = open(oldName, O_RDONLY)) < 0)
++ return 1;
++
++ /* Create the file to write, keep the same attribute as the old file */
++ if (stat(oldName, &sbprev))
++ return 1;
++ else {
++ if ((fd_new = createOutputFile(newName,
++ O_WRONLY | O_CREAT | O_TRUNC, &sbprev)) < 0 )
++ return 1;
++ }
++
++ /* Read and write */
++ while ((n = read(fd_old, buf, BUFSIZ)) > 0)
++ if (write(fd_new, buf, n) != n)
++ return 1;
++
++ if ((close(fd_old) < 0) ||
++ removeLogFile(oldName, log) ||
++ (close(fd_new) < 0))
++ return 1;
++
++ return 0;
++ }
++
++ return 1;
++}
++
+ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ struct logNames *rotNames)
+ {
+@@ -1148,15 +1195,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ rotNames->baseName, i, fileext, compext);
+
+ message(MESS_DEBUG,
+- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n",
++ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n",
+ oldName, newName, rotateCount, logStart, i);
+
+- if (!debug && rename(oldName, newName)) {
++ if (!debug && mvFile(oldName, newName, log)) {
+ if (errno == ENOENT) {
+ message(MESS_DEBUG, "old log %s does not exist\n",
+ oldName);
+ } else {
+- message(MESS_ERROR, "error renaming %s to %s: %s\n",
++ message(MESS_ERROR, "error moving %s to %s: %s\n",
+ oldName, newName, strerror(errno));
+ hasErrors = 1;
+ }
+@@ -1286,11 +1333,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ }
+ }
+ #endif /* WITH_ACL */
+- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
+ rotNames->finalName);
+ if (!debug && !hasErrors &&
+- rename(log->files[logNum], rotNames->finalName)) {
+- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
++ mvFile(log->files[logNum], rotNames->finalName, log)) {
++ message(MESS_ERROR, "failed to move %s to %s: %s\n",
+ log->files[logNum], rotNames->finalName,
+ strerror(errno));
+ hasErrors = 1;
+--
+1.7.4.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
new file mode 100644
index 000000000..5cb603840
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
@@ -0,0 +1,34 @@
+Disable the check for different filesystems
+
+The logrotate supports rotate log across different filesystems now, so
+disable the check for different filesystems.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ config.c | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/config.c b/config.c
+index a85d1df..24575b3 100644
+--- a/config.c
++++ b/config.c
+@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ dirName, strerror(errno));
+ goto error;
+ }
+-
+- if (sb.st_dev != sb2.st_dev) {
+- message(MESS_ERROR,
+- "%s:%d olddir %s and log file %s "
+- "are on different devices\n", configFile,
+- lineNum, newlog->oldDir, newlog->files[i]);
+- goto error;
+- }
+ }
+ }
+
+--
+1.7.4.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
new file mode 100644
index 000000000..5cab64947
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
@@ -0,0 +1,42 @@
+Update the manual
+
+* Update the mannual
+* Fix a bug in the mannual(\f should be \fR)
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ logrotate.8 | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/logrotate.8 b/logrotate.8
+index 8b34167..5f15432 100644
+--- a/logrotate.8
++++ b/logrotate.8
+@@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
+ .TP
+ \fBolddir \fIdirectory\fR
+ Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
+-must be on the same physical device as the log file being rotated,
+-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
++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
+ overridden by the \fBnoolddir\fR option.
+
+ .TP
+@@ -435,7 +434,7 @@ Log files are rotated only if they grow bigger then \fIsize\fR bytes. If
+ \fIsize\fR is followed by \fIk\fR, the size is assumed to be in kilobytes.
+ If the \fIM\fR is used, the size is in megabytes, and if \fIG\fR is used, the
+ size is in gigabytes. So \fBsize 100\fR, \fIsize 100k\fR, \fIsize 100M\fR and
+-\fIsize 100G\f are all valid.
++\fIsize 100G\fR are all valid.
+
+ .TP
+ \fBsharedscripts\fR
+--
+1.7.4.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.1.bb b/meta/recipes-extended/logrotate/logrotate_3.8.1.bb
new file mode 100644
index 000000000..5a8156be5
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.1.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://fedorahosted.org/releases/l/o/logrotate"
+LICENSE = "GPLv2"
+PR = "r0"
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
+ file://act-as-mv-when-rotate.patch \
+ file://disable-check-different-filesystems.patch \
+ file://update-the-manual.patch \
+ "
+
+SRC_URI[md5sum] = "bd2e20d8dc644291b08f9215397d28a5"
+SRC_URI[sha256sum] = "c12471e70ae8bc923bd5c4f25e8fd6483b68c6301f3cd79f7cfe37bc5b370169"
+
+
+EXTRA_OEMAKE = "CC='${CC}'"
+
+do_install(){
+ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
+}
+
+do_install_append(){
+ mkdir -p ${D}${sysconfdir}/logrotate.d
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${localstatedir}/lib
+ install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+ install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+ touch ${D}${localstatedir}/lib/logrotate.status
+}
diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
new file mode 100755
index 000000000..e15827ad5
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/init-functions
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# LSB initscript functions, as defined in the LSB Spec 1.1.0
+#
+# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
+# Updated to the latest LSB 3.1 spec
+# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
+
+start_daemon () {
+ /etc/core-lsb/lsb_start_daemon "$@"
+}
+
+killproc () {
+ /etc/core-lsb/lsb_killproc "$@"
+}
+
+pidofproc () {
+ /etc/core-lsb/lsb_pidofproc "$@"
+}
+
+log_success_msg () {
+ /etc/core-lsb/lsb_log_message success "$@"
+}
+
+log_failure_msg () {
+ /etc/core-lsb/lsb_log_message failure "$@"
+}
+
+log_warning_msg () {
+ /etc/core-lsb/lsb_log_message warning "$@"
+}
+
+log_begin_msg () {
+ /etc/core-lsb/lsb_log_message begin "$@"
+}
+
+log_end_msg () {
+ /etc/core-lsb/lsb_log_message end "$@"
+}
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc
new file mode 100755
index 000000000..e1121e4e8
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_killproc
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+LSB=LSB-1.1 killproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message
new file mode 100755
index 000000000..2995f781e
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+ACTION=$1
+shift
+
+case "$ACTION" in
+ success)
+ echo -n $*
+ success "$*"
+ echo
+ ;;
+ failure)
+ echo -n $*
+ failure "$*"
+ echo
+ ;;
+ warning)
+ echo -n $*
+ warning "$*"
+ echo
+ ;;
+ *)
+ ;;
+esac
+exit 0
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
new file mode 100755
index 000000000..ffc17bbf6
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+pidofproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
new file mode 100755
index 000000000..05b637177
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+nice=
+force=
+pidfile=
+user=
+check=
+RETVAL=
+while [ "$1" != "${1##[-+]}" ]; do
+ case $1 in
+ -f)
+ force="--force"
+ shift
+ ;;
+ -n)
+ nice=$2
+ shift 2
+ ;;
+ -p)
+ pidfile="--pidfile $2"
+ shift 2
+ ;;
+ -u)
+ user="--user $2"
+ shift 2
+ ;;
+ -c)
+ check="--check $2"
+ shift 2
+ ;;
+ *)
+ echo "Unknown Option $1"
+ echo "Options are:"
+ echo "-f"
+ echo "-p {pidfile}"
+ echo "-n [+/-nicelevel]"
+ echo "-u {user}"
+ echo "-c {base}"
+ exit 1;;
+ esac
+done
+LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb_1.4.bb b/meta/recipes-extended/lsb/lsb_1.4.bb
new file mode 100644
index 000000000..15dbeaafd
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb_1.4.bb
@@ -0,0 +1,108 @@
+DESCRIPTION = "LSB support for OpenEmbedded"
+SECTION = "console/utils"
+HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
+LICENSE = "GPLv2+"
+PR = "r3"
+
+# lsb_release needs getopt
+RDEPENDS_${PN} += "util-linux"
+
+LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz \
+ file://init-functions \
+ file://lsb_killproc \
+ file://lsb_log_message \
+ file://lsb_pidofproc \
+ file://lsb_start_daemon \
+ "
+
+SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
+SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+S = "${WORKDIR}/lsb-release-${PV}"
+
+do_install(){
+ oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
+ mkdir -p ${D}/bin
+ mkdir -p ${D}/${baselib}
+ mkdir -p ${D}/etc/lsb-release.d
+ echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}/etc/lsb-release
+
+ if [ "${TARGET_ARCH}" = "i586" ];then
+ echo -n "core-4.1-ia32" >> ${D}/etc/lsb-release
+ else
+ echo -n "core-4.1-${TARGET_ARCH}" >> ${D}/etc/lsb-release
+ fi
+ echo "\"" >> ${D}/etc/lsb-release
+ echo "DISTRIB_ID=${DISTRO}" >> ${D}/etc/lsb-release
+ echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}/etc/lsb-release
+ echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}/etc/lsb-release
+
+ if [ "${TARGET_ARCH}" = "i586" ];then
+ mkdir -p ${D}/etc/lsb-release.d
+ touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+ touch ${D}/etc/lsb-release.d/graphics-${PV}-noarch
+ touch ${D}/etc/lsb-release.d/desktop-${PV}-noarch
+ touch ${D}/etc/lsb-release.d/graphics-4.1-ia32
+ touch ${D}/etc/lsb-release.d/graphics-${PV}-ia32
+ touch ${D}/etc/lsb-release.d/desktop-${PV}-ia32
+ elif [ "${TARGET_ARCH}" = "x86_64" ];then
+ touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+ touch ${D}/etc/lsb-release.d/graphics-4.1-amd64
+ touch ${D}/etc/lsb-release.d/graphics-${PV}-amd64
+ touch ${D}/etc/lsb-release.d/desktop-${PV}-amd64
+ fi
+ if [ "${TARGET_ARCH}" = "powerpc" ];then
+ touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+ touch ${D}/etc/lsb-release.d/graphics-4.1-ppc32
+ touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc32
+ touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc32
+ elif [ "${TARGET_ARCH}" = "powerpc64" ];then
+ touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+ touch ${D}/etc/lsb-release.d/graphics-4.1-ppc64
+ touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc64
+ touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc64
+ fi
+}
+
+do_install_append(){
+ install -d ${D}/etc/core-lsb
+ install -d ${D}/${baselib}/lsb
+ for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
+ do
+ install -m 0755 ${WORKDIR}/${i} ${D}/etc/core-lsb
+ done
+ install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
+ if [ "${TARGET_ARCH}" = "x86_64" ];then
+ cd ${D}
+ if [ "${baselib}" != "lib64" ]; then
+ ln -sf ${baselib} lib64
+ fi
+ cd ${D}/${baselib}
+ ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
+ ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ fi
+ if [ "${TARGET_ARCH}" = "i586" ];then
+ cd ${D}/${baselib}
+ ln -sf ld-linux.so.2 ld-lsb.so.2
+ ln -sf ld-linux.so.2 ld-lsb.so.3
+ fi
+
+ if [ "${TARGET_ARCH}" = "powerpc64" ];then
+ cd ${D}
+ if [ "${baselib}" != "lib64" ]; then
+ ln -sf ${baselib} lib64
+ fi
+ cd ${D}/${baselib}
+ ln -sf ld64.so.1 ld-lsb-ppc64.so.2
+ ln -sf ld64.so.1 ld-lsb-ppc64.so.3
+ fi
+ if [ "${TARGET_ARCH}" = "powerpc" ];then
+ cd ${D}/${baselib}
+ ln -sf ld.so.1 ld-lsb-ppc32.so.2
+ ln -sf ld.so.1 ld-lsb-ppc32.so.3
+ fi
+}
+FILES_${PN} += "/lib64 \
+ ${base_libdir}/lsb/* \
+ "
diff --git a/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh b/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
new file mode 100644
index 000000000..aec185872
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
@@ -0,0 +1,230 @@
+#!/bin/bash
+
+# Copyright (C) 2010-2011 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+##Prepare Steps
+# Confirm the installed LSB Packages
+ARCH=`uname -m`
+APP_FILE=`ls /lsb-Application/*.rpm`
+if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
+then
+ if [ -d /lsb-dist-testkit ];then
+ if [ ${ARCH} == i686 ];then
+ echo "i486-suse" >> /etc/rpm/platform
+ echo "i486-noarch" >> /etc/rpm/platform
+ echo "i486-pc" >> /etc/rpm/platform
+ echo "noarch-suse" >> /etc/rpm/platform
+ else
+ echo "${ARCH}-suse" >> /etc/rpm/platform
+ echo "${ARCH}-noarch" >> /etc/rpm/platform
+ echo "${ARCH}-pc" >> /etc/rpm/platform
+ echo "noarch-suse" >> /etc/rpm/platform
+ fi
+ cd /lsb-dist-testkit && sh install.sh && cd ../lsb-Application
+ for i in ${APP_FILE}
+ do
+ echo "$i" |grep -q "apache"
+ if [ $? -eq 0 ]
+ then
+ rpm -ivh $i --noscripts --nodeps --force
+ else
+ rpm -ivh $i --nodeps --force
+ fi
+ done
+ mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
+ mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
+ cp expect-tests.tar test1.pdf test2.pdf /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
+ cp raptor-tests.tar tcl-tests.tar /var/opt/lsb//test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
+ cd ..
+ else
+ echo "Please install the realted LSB Packages"
+ exit 1
+ fi
+fi
+
+# Deleted existed user tester
+id tester
+if [ $? -eq 0 ]
+then
+ echo "User tester was existed"
+ sleep 1
+ userdel -rf tester
+ if [ $? -eq 0 ] || [ $? -eq 6 ]
+ then
+ echo "Success to delete user tester"
+ else
+ echo "Fail to delete user tester"
+ fi
+else
+ echo "There was not User tester"
+fi
+
+##Funs
+check ()
+{
+if [ $? -eq 0 ]
+then
+ echo "PASS"
+else
+ echo "FAIL"
+ exit 1
+fi
+}
+
+###Start
+# Add tester group
+echo ""
+echo "---------------------------------"
+echo "Step 1:Add Group tester"
+groupadd tester
+check
+
+
+# Add User tester
+echo ""
+echo "---------------------------------"
+echo "Step 2:Add User tester"
+useradd -g tester tester
+check
+
+echo "Check the tester user"
+id tester
+check
+
+# Stop Boa server
+#echo ""
+#echo "---------------------------------"
+#echo "Step 3:Stop BOA server"
+#/etc/init.d/boa stop
+#check
+
+# Create Dirnames file for RPM
+echo ""
+echo "---------------------------------"
+echo "Step 4:Create the Dirnames on target"
+
+mkdir -pv /etc/rpm/sysinfo
+
+cat > /etc/rpm/sysinfo/Dirnames << EOF
+/etc/opt/lsb
+/home/tet/LSB.tools
+/opt/lsb-tet3-lite/lib/ksh
+/opt/lsb-tet3-lite/lib/perl
+/opt/lsb-tet3-lite/lib/posix_sh
+/opt/lsb-tet3-lite/lib/tet3
+/opt/lsb-tet3-lite/lib/xpg3sh
+/opt/lsb/appbat/lib/python2.4/site-packages/qm
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
+/opt/lsb/test/doc
+/opt/lsb/test/lib
+/opt/lsb/test/qm/diagnostics
+/opt/lsb/test/qm/doc
+/opt/lsb/test/qm/doc/test/html
+/opt/lsb/test/qm/doc/test/print
+/opt/lsb/test/qm/dtml
+/opt/lsb/test/qm/dtml/test
+/opt/lsb/test/qm/messages/test
+/opt/lsb/test/qm/tutorial/test/tdb
+/opt/lsb/test/qm/tutorial/test/tdb/QMTest
+/opt/lsb/test/qm/web
+/opt/lsb/test/qm/web/images
+/opt/lsb/test/qm/web/stylesheets
+/opt/lsb/test/qm/xml
+/opt/lsb/test/share
+/usr/share/doc/lsb-runtime-test
+/var/opt/lsb
+/opt/lsb/test/desktop
+/opt/lsb/test/desktop/fontconfig
+/opt/lsb/test/desktop/freetype
+/opt/lsb/test/desktop/gtkvts
+/opt/lsb/test/desktop/libpng
+/opt/lsb/test/desktop/qt3
+/opt/lsb/test/desktop/xft
+/opt/lsb/test/desktop/xml
+/opt/lsb/test/desktop/xrender
+
+
+EOF
+
+if [ -f /etc/rpm/sysinfo/Dirnames ]
+then
+ echo "Success to creat Dirnames file"
+else
+ echo "Fail to creat Dirnames file"
+fi
+
+# ldconfig
+echo ""
+echo "---------------------------------"
+echo "Step 5:"
+ldconfig -v
+check;
+
+
+# Insmod look.ko
+insmod /lib/modules/2.6.*/kernel/drivers/block/loop.ko
+if [ $? != 0 ];then
+ echo "Please insmod loop.ko manully"
+fi
+# Start lsb
+echo ""
+if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then
+ /opt/lsb/test/manager/bin/dist-checker-start.pl
+fi
+
+# Get ip address for target platform
+addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]][[:space:]]Bcast//g`
+echo -e "you should input ${addr}:8888 on your browser"
+
+# Workaround to add part of locales for LSB test
+localedef -i ja_JP -f EUC-JP ja_JP.eucjp
+localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
+localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1
+localedef -i en_US -f ISO-8859-1 en_US
+localedef -i de_DE -f UTF-8 de_DE.UTF-8
+localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+localedef -i en_US -f UTF-8 en_US.UTF-8
+localedef -i se_NO -f UTF-8 se_NO.UTF-8
+localedef -i de_DE -f ISO-8859-1 de_DE
+localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15
+localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
+localedef -i fr_FR -f ISO-8859-1 fr_FR
+localedef -i it_IT -f ISO-8859-1 it_IT
+localedef -i es_MX -f ISO-8859-1 es_MX
+localedef -i en_HK -f ISO-8859-1 en_HK
+localedef -i en_PH -f ISO-8859-1 en_PH
+localedef -i ta_IN -f UTF-8 ta_IN
+
+# Resolve localhost
+LOCALHOST=`hostname`
+if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
+ echo "127.0.0.1 $LOCALHOST" >> /etc/hosts
+fi
+
+# Start avahi-daemon
+/etc/init.d/avahi-daemon start
+ln -s /etc/init.d/avahi-daemon /etc/rc5.d/S88avahi-daemon
+
+# Done
+echo "Done!!"
+
+###End
+
+
diff --git a/meta/recipes-extended/lsb/lsbsetup_1.0.bb b/meta/recipes-extended/lsb/lsbsetup_1.0.bb
new file mode 100644
index 000000000..9172ee3b0
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbsetup_1.0.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "auto-setup environment for lsb test"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+PR = "r3"
+
+LIC_FILES_CHKSUM = "file://LSB_Setup.sh;beginline=3;endline=16;md5=97451c7c0786ce5bbe9ac58042945583"
+
+SRC_URI = "file://LSB_Setup.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # Only install file if it has a contents
+ install -d ${D}/usr/bin
+ install -d ${D}/${sysconfdir}
+ install -m 0755 ${S}/LSB_Setup.sh ${D}/usr/bin
+ install -d ${D}/${libdir}/lsb
+ ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
+ ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
+ ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
+ ln -sf ${datadir}/zoneinfo/Asia/Hong_Kong ${D}${sysconfdir}/localtime
+}
+
+FILES_${PN} += "${libdir}/lsb \
+ ${libdir}/* \
+ "
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
new file mode 100644
index 000000000..f14f48528
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -0,0 +1,510 @@
+#!/bin/bash
+
+# Copyright (C) 2012 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+WORK_DIR="/opt/lsb-test"
+
+if [ `id -u` -ne 0 ]
+then
+ cat << EOF
+ In order to install and run LSB testsuite, you need administrator privileges.
+ You are currently running this script as an unprivileged user.
+
+EOF
+ exit 1
+fi
+
+ARCH=`uname -m`
+if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ]
+then
+ echo "Error: Unsupported architecture"
+ exit 1
+fi
+
+which rpm
+if [ $? -ne 0 ]
+then
+ echo "No rpm command found"
+ exit 1
+fi
+
+RET=0
+
+cd ${WORK_DIR} || exit 1
+# Step 1: Download the LSB Packages
+echo ""
+echo "Download LSB packages..."
+echo ""
+
+if [ ! -e ./packages_list ]
+then
+ echo "Error: Could not find packages list" >&2
+ exit 1
+fi
+
+. ./packages_list
+
+PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
+
+BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
+RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
+RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
+APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
+APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests"
+SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests"
+
+if [ ! -d ${PACKAGES_DIR} ]
+then
+ mkdir -p ${PACKAGES_DIR}
+fi
+
+if [ ! -d ${BASE_PACKAGES_DIR} ]
+then
+ mkdir -p ${BASE_PACKAGES_DIR}
+fi
+
+if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ]
+then
+ mkdir -p ${RUNTIME_BASE_PACKAGES_DIR}
+fi
+
+if [ ! -d ${RUNTIME_PACKAGES_DIR} ]
+then
+ mkdir -p ${RUNTIME_PACKAGES_DIR}
+fi
+
+if [ ! -d ${APP_PACKAGES_DIR} ]
+then
+ mkdir -p ${APP_PACKAGES_DIR}
+fi
+
+if [ ! -d ${APP_TESTFILES_DIR} ]
+then
+ mkdir -p ${APP_TESTFILES_DIR}
+fi
+
+# Official download server list. You can replace them with your own server.
+SERVER_IPADDR="140.211.169.23"
+SERVER_NAME="ftp.linuxfoundation.org"
+
+if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
+ echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts
+fi
+
+#ping -c 5 ${SERVER_NAME}
+#if [ $? -ne 0 ]
+#then
+# echo "The server: ${SERVER_NAME} is unreachable"
+# exit 1
+#fi
+
+SERVER1="\
+ http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary"
+SERVER2="\
+ http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime"
+SERVER3="\
+ http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime"
+SERVER4="\
+ http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
+SERVER5="\
+ http://${SERVER_NAME}/pub/lsb/app-battery/tests"
+
+# We using "curl" as a download tool, "wget" is an alternative.
+CURL=`which curl`
+WGET=`which wget`
+if [ ! -z ${CURL} ]
+then
+ DOWNLOAD_CMD="${CURL} -R -L --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o"
+elif [ ! -z ${WGET} ]
+then
+ DOWNLOAD_CMD="${WGET} -c -t 5 -O"
+else
+ echo "Can not find a download tool, please install curl or wget."
+ exit 1
+fi
+
+cd ${BASE_PACKAGES_DIR}
+for pkg in ${BASE_PACKAGES_LIST}; do
+ if [ ! -f ${pkg} ]
+ then
+ #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1
+ ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg}
+ if [ $? -eq 0 ]
+ then
+ mv -f ${pkg}".#part" ${pkg}
+ echo "Download ${pkg} successfully."
+ else
+ echo "Download ${pkg} failed."
+ RET=1
+ fi
+ fi
+done
+
+cd ${RUNTIME_BASE_PACKAGES_DIR}
+for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do
+ if [ ! -f ${pkg} ]
+ then
+ #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1
+ ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg}
+ if [ $? -eq 0 ]
+ then
+ mv -f ${pkg}".#part" ${pkg}
+ echo "Download ${pkg} successfully."
+ else
+ echo "Download ${pkg} failed."
+ RET=1
+ fi
+ fi
+done
+
+cd ${RUNTIME_PACKAGES_DIR}
+for pkg in ${RUNTIME_PACKAGES_LIST}; do
+ if [ ! -f ${pkg} ]
+ then
+ #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1
+ ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg}
+ if [ $? -eq 0 ]
+ then
+ mv -f ${pkg}".#part" ${pkg}
+ echo "Download ${pkg} successfully."
+ else
+ echo "Download ${pkg} failed."
+ RET=1
+ fi
+ fi
+done
+
+cd ${APP_PACKAGES_DIR}
+for pkg in ${APP_PACKAGES_LIST}; do
+ if [ ! -f ${pkg} ]
+ then
+ #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1
+ ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg}
+ if [ $? -eq 0 ]
+ then
+ mv -f ${pkg}".#part" ${pkg}
+ echo "Download ${pkg} successfully."
+ else
+ echo "Download ${pkg} failed."
+ RET=1
+ fi
+ fi
+done
+
+cd ${APP_TESTFILES_DIR}
+for pkg in ${APP_TESTFILES_LIST}; do
+ if [ ! -f ${pkg} ]
+ then
+ #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1
+ ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg}
+ if [ $? -eq 0 ]
+ then
+ mv -f ${pkg}".#part" ${pkg}
+ echo "Download ${pkg} successfully."
+ else
+ echo "Download ${pkg} failed."
+ RET=1
+ fi
+ fi
+done
+
+if [ ${RET} -ne 0 ]
+then
+ echo "Download some packages failed. Please download them again."
+ exit 1
+fi
+
+# Step 2: Install the LSB Packages
+echo ""
+echo "Install LSB packages..."
+echo ""
+
+# Kill lighttpd
+ps aux | grep "lighttpd" | grep -v -q "grep"
+if [ $? -eq 0 ]
+then
+ killall lighttpd >/dev/null 2>&1
+fi
+
+# Start avahi-daemon
+ps aux | grep "avahi-daemon" | grep -v -q "grep"
+if [ $? -ne 0 ]
+then
+ /etc/init.d/avahi-daemon start >/dev/null 2>&1
+fi
+
+LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl"
+LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl"
+
+PLATFORM_FILE="/etc/rpm/platform"
+
+RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i"
+RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i"
+
+# If the lsb has been started, stop it first.
+if [ -x ${LSB_STOP_CMD} ]
+then
+ ${LSB_STOP_CMD}
+fi
+
+if [ ! -d /etc/rpm ]
+then
+ mkdir -p /etc/rpm
+fi
+
+if [ ! -f ${PLATFORM_FILE} ]
+then
+ touch ${PLATFORM_FILE}
+fi
+
+if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
+ if [ ${ARCH} == i686 ];then
+ echo "i486-suse" >> ${PLATFORM_FILE}
+ echo "i486-noarch" >> ${PLATFORM_FILE}
+ echo "i486-pc" >> ${PLATFORM_FILE}
+ echo "noarch-suse" >> ${PLATFORM_FILE}
+ else
+ echo "${ARCH}-suse" >> ${PLATFORM_FILE}
+ echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
+ echo "${ARCH}-pc" >> ${PLATFORM_FILE}
+ echo "noarch-suse" >> ${PLATFORM_FILE}
+ fi
+fi
+
+if [ -d ${BASE_PACKAGES_DIR} ]
+then
+ cd ${BASE_PACKAGES_DIR}
+ for pkg in ${BASE_PACKAGES_LIST}
+ do
+ rpm --quiet -q ${pkg%\.*}
+ if [ $? -ne 0 ]; then
+ $RPM_INSTALL_CMD ${pkg}
+ fi
+ done
+fi
+
+if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ]
+then
+ cd ${RUNTIME_BASE_PACKAGES_DIR}
+ for pkg in ${RUNTIME_BASE_PACKAGES_LIST}
+ do
+ rpm --quiet -q ${pkg%\.*}
+ if [ $? -ne 0 ]; then
+ $RPM_INSTALL_CMD ${pkg}
+ fi
+ done
+fi
+
+if [ -d ${RUNTIME_PACKAGES_DIR} ]
+then
+ cd ${RUNTIME_PACKAGES_DIR}
+ for pkg in ${RUNTIME_PACKAGES_LIST}
+ do
+ rpm --quiet -q ${pkg%\.*}
+ if [ $? -ne 0 ]; then
+ $RPM_INSTALL_CMD ${pkg}
+ fi
+ done
+fi
+
+if [ -d ${APP_PACKAGES_DIR} ]
+then
+ cd ${APP_PACKAGES_DIR}
+ for pkg in ${APP_PACKAGES_LIST}
+ do
+ echo "${pkg}" | grep -q "apache\|xpdf"
+ if [ $? -eq 0 ]
+ then
+ rpm --quiet -q ${pkg%\.*}
+ if [ $? -ne 0 ]; then
+ $RPM_INSTALL_CMD_NOSCRIPTS ${pkg}
+ fi
+ else
+ rpm --quiet -q ${pkg%\.*}
+ if [ $? -ne 0 ]; then
+ $RPM_INSTALL_CMD ${pkg}
+ fi
+ fi
+ done
+fi
+
+if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ]
+then
+ mkdir -p ${SNAPSHOTS_TESTFILES_DIR}
+fi
+
+if [ -d ${APP_TESTFILES_DIR} ]
+then
+ cd ${APP_TESTFILES_DIR}
+ for pkg in ${APP_TESTFILES_LIST}
+ do
+ cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR}
+ done
+fi
+
+cd ${WORK_DIR}
+
+# Step 3: Set environment
+echo ""
+echo "Set environment..."
+echo ""
+
+check ()
+{
+ if [ $? -eq 0 ]
+ then
+ echo "PASS"
+ else
+ echo "FAIL"
+ exit 1
+ fi
+}
+
+echo ""
+echo "---------------------------------"
+echo "Create the Dirnames on target"
+
+if [ ! -d /etc/rpm/sysinfo ]
+then
+ mkdir -p /etc/rpm/sysinfo
+fi
+
+cat > /etc/rpm/sysinfo/Dirnames << EOF
+/etc/opt/lsb
+/home/tet/LSB.tools
+/opt/lsb-tet3-lite/lib/ksh
+/opt/lsb-tet3-lite/lib/perl
+/opt/lsb-tet3-lite/lib/posix_sh
+/opt/lsb-tet3-lite/lib/tet3
+/opt/lsb-tet3-lite/lib/xpg3sh
+/opt/lsb/appbat/lib/python2.4/site-packages/qm
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
+/opt/lsb/test/doc
+/opt/lsb/test/lib
+/opt/lsb/test/qm/diagnostics
+/opt/lsb/test/qm/doc
+/opt/lsb/test/qm/doc/test/html
+/opt/lsb/test/qm/doc/test/print
+/opt/lsb/test/qm/dtml
+/opt/lsb/test/qm/dtml/test
+/opt/lsb/test/qm/messages/test
+/opt/lsb/test/qm/tutorial/test/tdb
+/opt/lsb/test/qm/tutorial/test/tdb/QMTest
+/opt/lsb/test/qm/web
+/opt/lsb/test/qm/web/images
+/opt/lsb/test/qm/web/stylesheets
+/opt/lsb/test/qm/xml
+/opt/lsb/test/share
+/usr/share/doc/lsb-runtime-test
+/var/opt/lsb
+/opt/lsb/test/desktop
+/opt/lsb/test/desktop/fontconfig
+/opt/lsb/test/desktop/freetype
+/opt/lsb/test/desktop/gtkvts
+/opt/lsb/test/desktop/libpng
+/opt/lsb/test/desktop/qt3
+/opt/lsb/test/desktop/xft
+/opt/lsb/test/desktop/xml
+/opt/lsb/test/desktop/xrender
+
+
+EOF
+
+if [ -f /etc/rpm/sysinfo/Dirnames ]
+then
+ echo "Success to creat Dirnames file"
+else
+ echo "Fail to creat Dirnames file"
+fi
+
+echo ""
+echo "---------------------------------"
+echo "Update cache"
+ldconfig
+check;
+
+# Check loop device
+if [ ! -b /dev/loop0 ]
+then
+ insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko
+ if [ $? != 0 ];then
+ echo "Insmod loop.ko failed."
+ fi
+fi
+
+# Resolve localhost
+LOCALHOST=`hostname`
+if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
+ echo "127.0.0.1 $LOCALHOST" >> /etc/hosts
+fi
+
+# Workaround to add part of locales for LSB test
+localedef -i de_DE -f ISO-8859-1 de_DE
+localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15
+localedef -i de_DE -f UTF-8 de_DE.UTF-8
+localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+localedef -i en_HK -f ISO-8859-1 en_HK
+localedef -i en_PH -f ISO-8859-1 en_PH
+localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
+localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1
+localedef -i en_US -f ISO-8859-1 en_US
+localedef -i en_US -f UTF-8 en_US.UTF-8
+localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
+localedef -i es_MX -f ISO-8859-1 es_MX
+localedef -i fr_FR -f ISO-8859-1 fr_FR
+localedef -i it_IT -f ISO-8859-1 it_IT
+localedef -i ja_JP -f EUC-JP ja_JP.eucjp
+localedef -i se_NO -f UTF-8 se_NO.UTF-8
+localedef -i ta_IN -f UTF-8 ta_IN
+
+echo ""
+echo "Installation done!"
+echo ""
+
+# Step 4: Start LSB test
+if [ -x ${LSB_START_CMD} ]
+then
+ ${LSB_START_CMD}
+fi
+
+echo "---------------------------------"
+echo "Run all the certification version of LSB Tests"
+echo "---------------------------------"
+
+LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl"
+SESSION="${WORK_DIR}/session"
+if [ ! -e ${SESSION} ]
+then
+ echo "Error: Could not find session file."
+ echo "You must run LSB test from webbrower."
+ exit 1
+fi
+
+if [ -x ${LSB_DIST_CHECKER} ]
+then
+ ${LSB_DIST_CHECKER} -v2 -f ${SESSION}
+ check
+fi
+
+echo ""
+echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/"
+echo ""
+
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list
new file mode 100644
index 000000000..9285ed91e
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -0,0 +1,50 @@
+LSB_RELEASE="released-4.1.0"
+LSB_ARCH="lsbarch"
+
+BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
+
+RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-4.1.0.1-2.targetarch.rpm \
+ lsb-tet3-lite-3.7-15.lsb4.targetarch.rpm \
+ lsb-tet3-lite-devel-3.7-15.lsb4.targetarch.rpm \
+ lsb-xvfb-1.2.0-19.targetarch.rpm \
+ "
+
+RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.0-1.targetarch.rpm \
+ lsb-libchk-4.1.0-1.targetarch.rpm \
+ lsb-qm-2.2-8.lsb4.targetarch.rpm \
+ lsb-task-dist-testkit-4.1.0-1.noarch.rpm \
+ lsb-test-core-4.1.0-1.targetarch.rpm \
+ lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \
+ lsb-test-desktop-4.1.0-2.targetarch.rpm \
+ lsb-test-desktop-t2c-4.1.0-1.targetarch.rpm \
+ lsb-test-libstdcpp-4.1.0-13.lsb4.targetarch.rpm \
+ lsb-test-olver-core-4.1.0-1.targetarch.rpm \
+ lsb-test-perl-4.1.0-1.noarch.rpm \
+ lsb-test-printing-4.1.0-1.targetarch.rpm \
+ lsb-test-python-4.1.1-2.targetarch.rpm \
+ lsb-test-qt3-azov-4.1.0-1.targetarch.rpm \
+ lsb-test-qt4-azov-4.1.0-1.targetarch.rpm \
+ lsb-test-xts5-5.1.5-38.lsb4.targetarch.rpm \
+ lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \
+ lsb-test-core-t2c-4.1.0-1.targetarch.rpm \
+ lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \
+ "
+
+APP_PACKAGES_LIST="lsb-python-2.4.6-5.lsb4.targetarch.rpm \
+ lsb-apache-2.2.14-3.lsb4.targetarch.rpm \
+ lsb-tcl-8.5.7-6.lsb4.targetarch.rpm \
+ lsb-expect-5.43.0-11.lsb4.targetarch.rpm \
+ lsb-groff-1.20.1-5.lsb4.targetarch.rpm \
+ lsb-raptor-1.4.19-3.lsb4.targetarch.rpm \
+ lsb-xpdf-1.01-10.lsb4.targetarch.rpm \
+ lsb-samba-3.4.3-5.lsb4.targetarch.rpm \
+ lsb-rsync-3.0.6-3.lsb4.targetarch.rpm \
+ "
+
+APP_TESTFILES_LIST="expect-tests.tar \
+ tcl-tests.tar \
+ raptor-tests.tar \
+ test1.pdf \
+ test2.pdf \
+ "
+
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session
new file mode 100644
index 000000000..85ca2efe9
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/session
@@ -0,0 +1,194 @@
+[GENERAL]
+VERBOSE_LEVEL: 1
+ARCHITECTURE: targetarch
+USE_INTERNET: 1
+STD_VERSION: LSB 4.1
+STD_PROFILE: no
+[cmdchk]
+RUN: 1
+VERSION: local|*
+
+[libchk]
+RUN: 1
+VERSION: local|*
+
+[alsa-t2c]
+RUN: 1
+VERSION: local|*
+
+[alsa-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results
+
+[core]
+RUN: 1
+VERSION: local|*
+
+[core|local|*]
+AUTOREPLY_PROVIDES_BASH: n
+AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_KERNEL_NAME: vmlinuz
+AUTOREPLY_INSTALL_LSBPAM_CONF: y
+AUTOREPLY_PROVIDES_C_SHELL: n
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_SET_PASS_MIN_DAYS: y
+AUTOREPLY_PROVIDES_SYSV_INIT:
+AUTOREPLY_ISNTALL_DEVS: y
+AUTOREPLY_SUPPORTS_FILE_CMD: y
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets
+AUTOREPLY_SUPPORTS_NLS: n
+AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n
+AUTOREPLY_PATH_TO_RC.D:
+AUTOREPLY_ALLOWS_MAKEDEV: n
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results
+
+[core-t2c]
+RUN: 1
+VERSION: local|*
+
+[core-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results
+
+[cpp-t2c]
+RUN: 1
+VERSION: local|*
+
+[cpp-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results
+
+[desktop]
+RUN: 1
+VERSION: local|*
+
+[desktop|local|*]
+AUTOREPLY_DESKTOP_ENVIRONMENT: [default]
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_X_CLIENT_HOSTNAME:
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_SHOW_SUMMARY_REPORT:
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_XVFB_DISPLAY: [default]
+
+[desktop-t2c]
+RUN: 1
+VERSION: local|*
+
+[desktop-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results
+
+[libstdcpp]
+RUN: 1
+VERSION: local|*
+
+[libstdcpp|local|*]
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_GNU_TRIPLET:
+
+[olver]
+RUN: 1
+VERSION: local|*
+
+[olver|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core
+AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core
+
+[perl]
+RUN: 1
+VERSION: local|*
+
+[perl|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results
+
+[printing]
+RUN: 1
+VERSION: local|*
+
+[printing|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results
+
+[python]
+RUN: 1
+VERSION: local|*
+
+[python|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
+
+[qt3-azov]
+RUN: 1
+VERSION: local|*
+
+[qt3-azov|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results
+
+[qt4-azov]
+RUN: 1
+VERSION: local|*
+
+[qt4-azov|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
+
+[xml2-azov]
+RUN: 1
+VERSION: local|*
+
+[xts5]
+RUN: 1
+VERSION: local|*
+
+[xts5|local|*]
+AUTOREPLY_XT_FONTPATH_GOOD: [default]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5
+AUTOREPLY_XVFB_DISPLAY: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results
+AUTOREPLY_XT_FONTPATH: [default]
+AUTOREPLY_X_CLIENT_HOSTNAME:
+
+[apache]
+RUN: 1
+VERSION: local|*
+
+[expect]
+RUN: 1
+VERSION: local|*
+
+[groff]
+RUN: 1
+VERSION: local|*
+
+[raptor]
+RUN: 1
+VERSION: local|*
+
+[rsync]
+RUN: 1
+VERSION: local|*
+
+[samba]
+RUN: 1
+VERSION: local|*
+
+[tcl]
+RUN: 1
+VERSION: local|*
+
+[xpdf]
+RUN: 1
+VERSION: local|*
+
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb
new file mode 100644
index 000000000..11911643b
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "automate test for lsb"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+PR = "r0"
+
+LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"
+
+SRC_URI = "file://LSB_Test.sh \
+ file://packages_list \
+ file://session \
+ "
+RDEPENDS_${PN} = "rpm"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/usr/bin
+ install -m 0755 ${S}/LSB_Test.sh ${D}/usr/bin
+ install -d ${D}/opt/lsb-test
+ install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
+ install -m 0644 ${S}/session ${D}/opt/lsb-test/session
+ if [ "${TARGET_ARCH}" == "i586" ];then
+ sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
+ sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
+ fi
+ if [ "${TARGET_ARCH}" == "x86_64" ];then
+ sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
+ sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
+ fi
+ if [ "${TARGET_ARCH}" == "powerpc" ];then
+ sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
+ sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
+ fi
+}
+
+FILES_${PN} += "/opt/lsb-test/* \
+ "
diff --git a/meta/recipes-extended/lsof/lsof_4.85.bb b/meta/recipes-extended/lsof/lsof_4.85.bb
new file mode 100644
index 000000000..8f25e24a5
--- /dev/null
+++ b/meta/recipes-extended/lsof/lsof_4.85.bb
@@ -0,0 +1,47 @@
+SUMMARY = "LiSt Open Files tool"
+DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
+Its name stands for LiSt Open Files, and it does just that."
+SECTION = "devel"
+LICENSE = "BSD"
+PR = "r0"
+
+SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "102ee2081172bbe76dccaa6cceda8573"
+SRC_URI[sha256sum] = "49aa58e63539c45bada514a6a2e5a1c9f946ada1f4137dc9154cf4bf6054a1c1"
+
+LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
+S = "${WORKDIR}/lsof_${PV}_src"
+
+LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=e0108f7811919035515a97f872eb8ee2"
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ src_uri = d.getVar('SRC_URI')
+ d.setVar('SRC_URI', '${LOCALSRC}')
+ bb.build.exec_func('base_do_unpack', d)
+ d.setVar('SRC_URI', src_uri)
+}
+
+export LSOF_OS = "${TARGET_OS}"
+LSOF_OS_libc-uclibc = "linux"
+LSOF_OS_libc-glibc = "linux"
+export LSOF_INCLUDE = "${STAGING_INCDIR}"
+
+do_configure () {
+ yes | ./Configure ${LSOF_OS}
+}
+
+export I = "${STAGING_INCDIR}"
+export L = "${STAGING_INCDIR}"
+export EXTRA_OEMAKE = ""
+
+do_compile () {
+ oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
+}
+
+do_install () {
+ install -d ${D}${sbindir} ${D}${mandir}/man8
+ install -m 4755 lsof ${D}${sbindir}/lsof
+ install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
+}
diff --git a/meta/recipes-extended/ltp/ltp/uclibc-getcontext.patch b/meta/recipes-extended/ltp/ltp/uclibc-getcontext.patch
new file mode 100644
index 000000000..310e2d4fa
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/uclibc-getcontext.patch
@@ -0,0 +1,78 @@
+Fix building disabled getcontext and profil01 tests for uclibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: ltp-20110915/testcases/kernel/syscalls/getcontext/getcontext01.c
+===================================================================
+--- ltp-20110915.orig/testcases/kernel/syscalls/getcontext/getcontext01.c 2012-01-19 16:39:24.391012507 -0800
++++ ltp-20110915/testcases/kernel/syscalls/getcontext/getcontext01.c 2012-01-19 16:39:24.459012510 -0800
+@@ -34,6 +34,10 @@
+ **********************************************************/
+
+ #include <features.h>
++#include "test.h"
++#include "usctest.h"
++char *TCID = "getcontext01"; /* Test program identifier. */
++
+ #if !defined(__UCLIBC__)
+
+ #include <stdio.h>
+@@ -41,13 +45,9 @@
+ #include <errno.h>
+ #include <ucontext.h>
+
+-#include "test.h"
+-#include "usctest.h"
+-
+ void setup();
+ void cleanup();
+
+-char *TCID = "getcontext01"; /* Test program identifier. */
+ int TST_TOTAL = 1; /* Total number of test cases. */
+
+ int exp_enos[] = { 0 }; /* must be a 0 terminated list */
+@@ -102,4 +102,4 @@
+ {
+ tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
+ }
+-#endif
+\ No newline at end of file
++#endif
+Index: ltp-20110915/testcases/kernel/syscalls/profil/profil01.c
+===================================================================
+--- ltp-20110915.orig/testcases/kernel/syscalls/profil/profil01.c 2012-01-19 16:39:55.975014036 -0800
++++ ltp-20110915/testcases/kernel/syscalls/profil/profil01.c 2012-01-19 16:40:23.475015322 -0800
+@@ -41,6 +41,8 @@
+ #endif
+
+ #include <features.h>
++#include "test.h"
++char *TCID = "profil01";
+ #ifndef __UCLIBC__
+
+ #ifdef __arm__
+@@ -58,7 +60,6 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+-#include "test.h"
+ #include "usctest.h"
+ #define FAILED 0
+ #define PASSED 1
+@@ -73,7 +74,6 @@
+ //char progname[]= "profil1()";
+
+ /***** LTP Port *****/
+-char *TCID = "profil01";
+ int local_flag = PASSED;
+ int block_number;
+ FILE *temp;
+@@ -310,4 +310,4 @@
+ /* uClibc does not have profiling support */
+ tst_exit();
+ }
+-#endif
+\ No newline at end of file
++#endif
diff --git a/meta/recipes-extended/ltp/ltp_20120104.bb b/meta/recipes-extended/ltp/ltp_20120104.bb
new file mode 100644
index 000000000..c82203a76
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp_20120104.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "http://ltp.sourceforge.net"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://testcases/kernel/mce-test/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://testcases/kernel/controllers/freezer/run_freezer.sh;startline=5;endline=17;md5=aeac3f7691caa2e76fd5a732fbd6510d \
+ file://testcases/kernel/fs/ext4-new-features/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+ file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+ file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
+ file://tools/netpipe-2.4/COPYING;md5=18810669f13b87348459e611d31ab760 \
+ file://tools/netpipe-2.4-ipv6/COPYING;md5=18810669f13b87348459e611d31ab760 \
+ file://tools/top-LTP/proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
+ file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ "
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/ltp/ltp-full-${PV}.bz2 \
+ file://uclibc-getcontext.patch \
+ "
+
+SRC_URI[md5sum] = "ac183bbdac67139f049b3755fda37179"
+SRC_URI[sha256sum] = "11b149b821d709e3351ac66f028f1b0dd5337ee9073dc20019ccffdac42d5c2e"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+inherit autotools
+
+FILES_${PN}-dbg += "/opt/ltp/runtest/.debug"
+FILES_${PN}-dbg += "/opt/ltp/testcases/bin/.debug"
+FILES_${PN}-dbg += "/opt/ltp/testcases/bin/*/bin/.debug"
+FILES_${PN}-dbg += "/opt/ltp/testcases/bin/*/test/.debug"
+FILES_${PN}-dbg += "/opt/ltp/scenario_groups/.debug"
+FILES_${PN}-dbg += "/opt/ltp/testscripts/.debug"
+FILES_${PN}-dbg += "/opt/ltp/testscripts/open_posix_testsuite/.debug"
+
+FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_unpack_append() {
+ bb.build.exec_func('do_extract_tarball', d)
+}
+
+do_extract_tarball() {
+ if test -f ${WORKDIR}/ltp-full-${PV} ; then
+ tar x --no-same-owner -f ${WORKDIR}/ltp-full-${PV} -C ${WORKDIR}
+ rm -rf ${WORKDIR}/ltp-${PV}
+ mv ${WORKDIR}/ltp-full-${PV} ${WORKDIR}/ltp-${PV}
+ fi
+}
+
+do_install(){
+ install -d ${D}/opt/ltp/
+ oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+ # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+ cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+
+ # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in poky
+ # We will add expect for enhancement in future
+ find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f
+}
+
+# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
+INHIBIT_PACKAGE_STRIP = "1"
+
diff --git a/meta/recipes-extended/mailx/mailx_12.5.bb b/meta/recipes-extended/mailx/mailx_12.5.bb
new file mode 100644
index 000000000..2a08113bd
--- /dev/null
+++ b/meta/recipes-extended/mailx/mailx_12.5.bb
@@ -0,0 +1,30 @@
+SUMMARY = "mailx is the traditional command-line-mode mail user agent."
+
+DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \
+functionality of the POSIX mailx command with additional support \
+for MIME, IMAP, POP3, SMTP, and S/MIME."
+
+HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html"
+SECTION = "console/network"
+PR = "r2"
+LICENSE = "BSD & MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd"
+
+DEPENDS = "openssl"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}.orig.tar.gz;name=archive \
+ ${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}-1.diff.gz;name=patch \
+ "
+
+SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
+SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
+SRC_URI[patch.md5sum] = "f466281336183be673bf136dd7096662"
+SRC_URI[patch.sha256sum] = "aaf2a4bbf145e5ca9cdeb0843091ec8cc01df6c9568c997207a5e97b4dc5ba43"
+
+S = "${WORKDIR}/heirloom-mailx-${PV}"
+
+inherit autotools
+
+CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT"
+
+PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/man-pages/man-pages_3.36.bb b/meta/recipes-extended/man-pages/man-pages_3.36.bb
new file mode 100644
index 000000000..6025a8757
--- /dev/null
+++ b/meta/recipes-extended/man-pages/man-pages_3.36.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://README;md5=0422377a748010b2b738342e24f141c1"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/man-pages/Archive/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "cfe991b1ce9e0ea5355f29ff9fcac125"
+SRC_URI[sha256sum] = "c0575e31f73cd9dc2761c274217e06e7130fdfee510170957a9d72d012a5437c"
+
+RDEPENDS_${PN} = "man"
+
+do_configure () {
+ :
+}
+
+do_compile() {
+ :
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+FILES_${PN} += "${datadir}/man/"
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man-1.6f/man-1.5g-nonrootbuild.patch
new file mode 100644
index 000000000..6f834bd01
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5g-nonrootbuild.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -u -r man-1.5g.old/configure man-1.5g/configure
+--- man-1.5g.old/configure Wed Apr 7 04:16:05 1999
++++ man-1.5g/configure Mon May 15 15:22:44 2000
+@@ -791,7 +791,7 @@
+ read mode
+ if test "$mode" != ""; then man_mode=$mode; fi
+ fi
+- man_install_flags="-m $man_mode -o $man_user -g $man_group"
++ man_install_flags=""
+ fi
+
+ # What sections do we anticipate?
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man-1.6f/man-1.5h1-gencat.patch
new file mode 100644
index 000000000..044b14c50
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5h1-gencat.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200
++++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100
+@@ -47,6 +47,7 @@ up-to-date. Many thanks.
+ 01/14/91 4 nazgul Off by one on number specified entries
+ */
+
++#undef _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #ifdef SYSV
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5h1-make.patch b/meta/recipes-extended/man/man-1.6f/man-1.5h1-make.patch
new file mode 100644
index 000000000..8631eb2c5
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5h1-make.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
++++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
+@@ -1,8 +1,8 @@
+ # only executed from a subdir
+ MAN1 = man whatis apropos
+-MAN5 = man.conf
++MAN5 = man.config
+ MAN8 = makewhatis
+-ALL = man.1 whatis.1 apropos.1 man.conf.5
++ALL = man.1 whatis.1 apropos.1 man.config.5
+ MAYBE8 = makewhatis
+
+ .SUFFIXES: .man .1 .5 .8
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5i2-initial.patch b/meta/recipes-extended/man/man-1.6f/man-1.5i2-initial.patch
new file mode 100644
index 000000000..fe56c0706
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5i2-initial.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001
++++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001
+@@ -81,8 +81,10 @@
+ continue;;
+ -s) setsections=1
+ continue;;
+- -u) findarg="-newer /var/cache/man/whatis"
+- update=1
++ -u) if [ -e /var/cache/man/whatis ]; then
++ findarg="-newer /var/cache/man/whatis"
++ update=1
++ fi
+ continue;;
+ -v) verbose=1
+ continue;;
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5i2-newline.patch b/meta/recipes-extended/man/man-1.6f/man-1.5i2-newline.patch
new file mode 100644
index 000000000..611df5d25
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5i2-newline.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- src/man.c 2008-12-21 19:17:31.000000000 +0100
++++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100
+@@ -391,7 +391,7 @@ again:
+ beg++;
+
+ end = beg;
+- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
++ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
+ end++; /* note that buf is NUL-terminated */
+ *end = '\0';
+
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man-1.6f/man-1.5i2-overflow.patch
new file mode 100644
index 000000000..52d2881a8
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5i2-overflow.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001
++++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001
+@@ -381,6 +381,9 @@
+ strcat(name, "/");
+ strcat(name, beg);
+ }
++ /* If this is too long, bad things have already happened. *
++ * we should quit IMMEDIATELY. */
++ if(strlen(name)>sizeof(ultname)) _exit(1);
+
+ goto again;
+ }
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5j-i18n.patch b/meta/recipes-extended/man/man-1.6f/man-1.5j-i18n.patch
new file mode 100644
index 000000000..2ae09c0ea
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5j-i18n.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001
++++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001
+@@ -27,8 +27,7 @@
+ for j in $M; do
+ if [ -f $j ]; then
+ i=`echo $j | sed -e 's/mess.//; s/.cat//'`
+- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
+- dest=${PREFIX}$dest
++ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
+ echo "mkdir -p `dirname $dest`"
+ mkdir -p `dirname $dest`;
+ echo "install -c -m 644 $j $dest"
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5j-nocache.patch b/meta/recipes-extended/man/man-1.6f/man-1.5j-nocache.patch
new file mode 100644
index 000000000..751dddd53
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5j-nocache.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001
++++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001
+@@ -81,6 +81,9 @@
+ #
+ #NOCACHE
+ #
++# NOCACHE keeps man from creating cache pages
++NOCACHE
++#
+ # Useful paths - note that COL should not be defined when
+ # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
+ # not only is it superfluous, but it actually damages the output.
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5j-utf8.patch b/meta/recipes-extended/man/man-1.6f/man-1.5j-utf8.patch
new file mode 100644
index 000000000..33d3e4c97
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5j-utf8.patch
@@ -0,0 +1,61 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001
++++ man-1.5j/configure Thu Nov 22 15:03:15 2001
+@@ -408,9 +408,9 @@
+ Fgawk=/bin/gawk
+ Fawk=/bin/gawk
+ Fmawk=missing
+- troff=""
+- nroff=""
+- jnroff=""
++ troff=/usr/bin/troff
++ nroff=/usr/bin/nroff
++ jnroff=/usr/bin/nroff
+ eqn=""
+ neqn=""
+ jneqn=""
+@@ -453,6 +453,8 @@
+ done
+ done
+ Fgroff=/usr/bin/groff
++ Fnroff=/usr/bin/nroff
++ Fjnroff=/usr/bin/nroff
+ Fgeqn=/usr/bin/geqn
+ Fgtbl=/usr/bin/gtbl
+ Fcol=/usr/bin/col
+@@ -485,25 +487,25 @@
+ then
+ if test $Fnroff = "missing"
+ then
+- nroff="nroff -Tlatin1 -mandoc"
++ nroff="nroff -Tutf8 -mandoc"
+ else
+- nroff="$Fnroff -Tlatin1 -mandoc"
++ nroff="$Fnroff -Tutf8 -mandoc"
+ fi
+ troff="troff -mandoc"
+ echo "Warning: could not find groff"
+ else
+ if test $Fnroff = "missing"
+ then
+- nroff="$Fgroff -Tlatin1 -mandoc"
++ nroff="$Fgroff -Tutf8 -mandoc"
+ else
+- nroff="$Fnroff -Tlatin1 -mandoc"
++ nroff="$Fnroff -Tutf8 -mandoc"
+ fi
+ troff="$Fgroff -Tps -mandoc"
+- jnroff="$Fgroff -Tnippon -mandocj"
++ jnroff="$Fjnroff -Tutf8 -mandocj"
+ fi
+ eqn="$Fgeqn -Tps"
+- neqn="$Fgeqn -Tlatin1"
+- jneqn="$Fgeqn -Tnippon"
++ neqn="$Fgeqn -Tutf8"
++ jneqn="$Fgeqn -Tutf8"
+ tbl="$Fgtbl"
+ col="$Fcol"
+ vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5k-confpath.patch b/meta/recipes-extended/man/man-1.6f/man-1.5k-confpath.patch
new file mode 100644
index 000000000..b5746c2df
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5k-confpath.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- configure 2006-05-01 19:56:14.000000000 +0200
++++ configure.oden 2008-12-21 19:16:50.000000000 +0100
+@@ -198,7 +198,7 @@
+ confdir="${confprefix}/share/misc"
+ fi
+ fi
+-conffilename="man.conf"
++conffilename="man.config"
+
+ if test "$RANDOM" = "$RANDOM"; then
+ # Plain old Bourne shell.
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man-1.6f/man-1.5k-nonascii.patch
new file mode 100644
index 000000000..d662d9b6a
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5k-nonascii.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100
++++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200
+@@ -18,9 +18,9 @@
+
+ # When man pages in your favorite locale look to grep like binary files
+ # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
+-aproposgrepopt1='i'
++aproposgrepopt1='ia'
+ aproposgrepopt2=''
+-whatisgrepopt1='iw'
++whatisgrepopt1='iwa'
+ whatisgrepopt2='^'
+ grepopt1=$%apropos_or_whatis%grepopt1
+ grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5k-sofix.patch b/meta/recipes-extended/man/man-1.6f/man-1.5k-sofix.patch
new file mode 100644
index 000000000..50b925288
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5k-sofix.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001
++++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001
+@@ -300,7 +300,7 @@
+
+ if (strlen(name0) >= sizeof(ultname))
+ return name0;
+- strcpy(ultname, name0);
++ strncpy(ultname, name0, BUFSIZE-32);
+ name = ultname;
+
+ again:
+@@ -332,7 +332,7 @@
+ * .so files - we could glob for all possible extensions,
+ * for now: only try .gz
+ */
+- else if (fp == NULL && get_expander(".gz") &&
++ if (fp == NULL && get_expander(".gz") &&
+ strlen(name)+strlen(".gz") < BUFSIZE) {
+ strcat(name, ".gz");
+ fp = fopen (name, "r");
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-bug11621.patch
new file mode 100644
index 000000000..051299906
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-bug11621.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./configure.ad 2003-12-11 19:17:10.000000000 +0100
++++ ./configure 2003-12-11 19:17:27.000000000 +0100
+@@ -26,7 +26,7 @@
+ # (Indeed, -r may cause the terminal to get into funny states.
+ # Very inconvenient. For viewing pages in strange locales, set LC_*.)
+ #
+-DEFAULTLESSOPT="-is"
++DEFAULTLESSOPT="-isr"
+ #
+ # Note that not creating any cat directories (/var/cache/man or so)
+ # and not making man suid or sgid is recommended.
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-buildroot.patch
new file mode 100644
index 000000000..bc97f56b9
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-buildroot.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./configure.less 2003-12-11 19:18:15.000000000 +0100
++++ ./configure 2003-12-11 19:20:03.000000000 +0100
+@@ -401,18 +401,13 @@
+
+ if test "$ans" = "false"
+ then
+- for i in more less cmp cat awk gawk mawk
+- do
+- eval F$i="missing"
+- for j in $DEFPATH
+- do
+- if test -f $j/$i
+- then
+- eval F$i=$j/$i
+- break
+- fi
+- done
+- done
++ Fmore=/bin/more
++ Fless=/usr/bin/less
++ Fcmp=/usr/bin/cmp
++ Fcat=/bin/cat
++ Fgawk=/bin/gawk
++ Fawk=/bin/gawk
++ Fmawk=missing
+ troff=""
+ nroff=""
+ jnroff=""
+@@ -457,6 +452,19 @@
+ fi
+ done
+ done
++ Fgroff=/usr/bin/groff
++ Fgeqn=/usr/bin/geqn
++ Fgtbl=/usr/bin/gtbl
++ Fcol=/usr/bin/col
++ Fgrefer=/usr/bin/grefer
++ Fgpic=/usr/bin/gpic
++ Fmore=/bin/more
++ Fless=/usr/bin/less
++ Fcmp=/usr/bin/cmp
++ Fcat=/bin/cat
++ Fgawk=/bin/gawk
++
++
+ for i in eqn tbl refer pic
+ do
+ if test `eval echo \\$Fg$i` = "missing"
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-multiple.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-multiple.patch
new file mode 100644
index 000000000..ec06ab783
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-multiple.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5m2/src/manfile.c_multiple 2006-12-08 23:42:17.000000000 +0100
++++ man-1.5m2/src/manfile.c 2006-12-09 00:00:01.000000000 +0100
+@@ -25,9 +25,12 @@
+
+ if (a) {
+ if (*head) {
+- p = *head;
+- while(p->next)
+- p = p->next;
++ for (p = *head; p->next; p = p->next) {
++ if(!strcmp (p->filename, a->filename))
++ return;
++ }
++ if(!strcmp (p->filename, a->filename))
++ return;
+ p->next = a;
+ } else
+ *head = a;
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-no-color-for-printing.patch
new file mode 100644
index 000000000..c85ff1d8c
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-no-color-for-printing.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200
++++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200
+@@ -539,6 +539,8 @@
+ troff="$troff -c"
+ nroff="$nroff -c"
+ jnroff="$jnroff -c"
++else
++ troff="$troff -c"
+ fi
+
+ if [ x$default = x ]; then
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-sigpipe.patch
new file mode 100644
index 000000000..8af78eab7
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-sigpipe.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100
++++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100
+@@ -116,11 +116,14 @@
+ static int
+ system1 (const char *command) {
+ void (*prev_handler)(int) = signal (SIGINT,catch_int);
++ signal (SIGPIPE,SIG_IGN);
+ int ret = system(command);
+
+ /* child terminated with signal? */
+ if (WIFSIGNALED(ret) &&
+- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
++ (WTERMSIG(ret) == SIGINT ||
++ WTERMSIG(ret) == SIGPIPE ||
++ WTERMSIG(ret) == SIGQUIT))
+ exit(1);
+
+ /* or we caught an interrupt? */
+@@ -128,6 +131,7 @@
+ exit(1);
+
+ signal(SIGINT,prev_handler);
++ signal(SIGPIPE,SIG_DFL);
+ return ret;
+ }
+
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man-1.6f/man-1.5m2-tv_fhs.patch
new file mode 100644
index 000000000..fe66d7599
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.5m2-tv_fhs.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100
++++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100
+@@ -34,6 +34,15 @@
+ for i in $(MAN8); \
+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
+
++install-l10n: $(ALL)
++ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
++ for i in $(MAN1); \
++ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
++ for i in $(MAN5); \
++ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
++ for i in $(MAN8); \
++ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
++
+ clean:
+ rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
+
+@@ -49,7 +58,7 @@
+ @for i in @languages@; do if test -d $$i; then echo; \
+ echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+ cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+- export SLANG; make -f ../Makefile install; cd ..; \
++ export SLANG; make -f ../Makefile install-l10n; cd ..; \
+ else echo "==== No $$i man pages found. ===="; fi; done
+
+ cleansubdirs:
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-i18n_whatis.patch
new file mode 100644
index 000000000..e321325d6
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-i18n_whatis.patch
@@ -0,0 +1,145 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
+--- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300
++++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300
+@@ -60,16 +60,56 @@
+ esac
+ done
+
++# list of languages to look for
++LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
++DIR_LIST=""
++for d in /var/cache/man $manpath /usr/lib
++do
++ for l in $LANG_LIST
++ do
++ if [ -d $d/$l ]
++ then
++ # check that the path is not already in the list
++ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
++ then
++ DIR_LIST="$DIR_LIST $d/$l"
++ fi
++ fi
++ done
++ DIR_LIST="$DIR_LIST $d"
++ # check that the path is not already in the list
++ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
++ then
++ DIR_LIST="$DIR_LIST $d/$l"
++ fi
++done
++
+ while [ "$1" != "" ]
+ do
+ found=0
+- for d in /var/cache/man $manpath /usr/lib
++ # in order not to display lines in more than one language for
++ # a same man page; we check that a given man page name
++ # hasn't already been displayed
++ BAZ=""
++ for d in $DIR_LIST
+ do
+ if [ -f $d/whatis ]
+ then
+- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
++ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
+ then
+- found=1
++ # the LC_ALL=C is needed in case the text is
++ # in a different encoding than the locale
++ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
++ for i in $BAR
++ do
++ if ! echo "$BAZ" | grep "$i" > /dev/null
++ then
++ BAZ="$BAZ $i"
++ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
++ echo -e "$FOO" | grep "$i"
++ found=1
++ fi
++ done
+ # Some people are satisfied with a single occurrence
+ # But it is better to give all
+ # break
+diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
+--- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300
++++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300
+@@ -41,12 +41,32 @@
+
+ program=`basename $0`
+
++# this allows to define language specific values fro NAME, DESCRIPTION
++# if not defined, using those default values
++if [ -z "$MAN_NAME" ]
++then
++ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟΝΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
++NÉV|NOME|名前|이름|NAAM|NAZWA|NUME|ИМЯ|MENO|НАЗВА|名称|名稱"
++fi
++if [ -z "$MAN_DESCRIPTION" ]
++then
++ MAN_DESCRIPTION="ОПИСАНИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
++ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÍRÁS|DESCRIZIONE|\
++説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|描述"
++fi
++# make them into awk regexp
++MAN_NAME="^(${MAN_NAME})";
++MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
++
+ # In case both /usr/man and /usr/share/man exist, the former is local
+ # and should be first.
+ # It is a bug to add /var/cache/man to DEFCATPATH.
+ dm=
+ for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
+ do
++ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
++ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
++ fi
+ if [ -d $d ]; then
+ if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
+ fi
+@@ -55,6 +75,9 @@
+ dc=
+ for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
+ do
++ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
++ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
++ fi
+ if [ -d $d ]; then
+ if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
+ fi
+@@ -194,7 +217,7 @@
+ section=$i
+ curdir=$mandir/${pages}$i
+ export section verbose curdir
+- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
++ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
+
+ function readline() {
+ if (use_zcat || use_bzcat) {
+@@ -261,13 +284,7 @@
+ gsub(/.\b/, "");
+ if (($1 ~ /^\.[Ss][Hh]/ &&
+ ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
+- $2 ~ /^JMNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
+- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
+- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
+- $2 ~ /^N[E]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾/ ||
+- $2 ~ /^̾/ || $2 ~ /^̸/ || $2 ~ /^NAZWA/ ||
+- $2 ~ /^/ || $2 ~ /^/ || $2 ~ /^W/ ||
+- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^/)) ||
++ $2 ~ MAN_NAME )) ||
+ (pages == "cat" && $1 ~ /^NAME/)) {
+ if (!insh) {
+ insh = 1;
+@@ -278,6 +295,7 @@
+ if ($1 ~ /^\.[Ss][HhYS]/ ||
+ (pages == "cat" &&
+ ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
++ $1 ~ MAN_DESCRIPTION ||
+ $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
+ $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
+ $0 ~ /^[^ ]/))) {
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch
new file mode 100644
index 000000000..aae980fc7
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-lzma+xz-support.patch
@@ -0,0 +1,124 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: man-1.6f/configure
+===================================================================
+--- man-1.6f.orig/configure 2010-12-29 14:00:35.000000000 -0800
++++ man-1.6f/configure 2010-12-29 14:27:57.584431711 -0800
+@@ -1027,7 +1027,7 @@
+ then
+ DO_COMPRESSION=true
+ compress=
+- for i in lzma bzip2 gzip bzip tzip pack compress freeze yabba
++ for i in xz lzma bzip2 gzip bzip tzip pack compress freeze yabba
+ do
+ eval F$i=missing
+ for j in $DEFPATH
+@@ -1080,6 +1080,7 @@
+ fi
+
+ case $compress in
++ *xz*) ext=".xz" ;;
+ *lzma*) ext=".lzma" ;;
+ *bzip2*) ext=".bz2" ;;
+ *gzip*) ext=".gz" ;;
+@@ -1123,7 +1124,7 @@
+ fi
+
+ # unconditionally handle uncompression
+-UNCOMPRESSORS="unlzma gunzip bzip2 pcat zcat fcat unyabba"
++UNCOMPRESSORS="unxz unlzma gunzip bzip2 pcat zcat fcat unyabba"
+ for i in $UNCOMPRESSORS
+ do
+ eval F$i=missing
+@@ -1144,6 +1145,10 @@
+ if [ $Fbzip2 != missing ]; then
+ bzip2="$Fbzip2 -c -d"
+ fi
++unxz=missing
++if [ $Funxz != missing ]; then
++ unxz="$Funxz -c -d"
++fi
+ unlzma=missing
+ if [ $Funlzma != missing ]; then
+ unlzma="$Funlzma -c -d"
+@@ -1176,6 +1181,9 @@
+ bzip2)
+ echo "Command to use for .bz2 files (standard bzip2)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
++ xz)
++ echo "Command to use for .xz files (standard xz)"
++ echo $n "[`eval echo \\$$filter`] $c" ;;
+ lzma)
+ echo "Command to use for .lzma files (standard lzma)"
+ echo $n "[`eval echo \\$$filter`] $c" ;;
+@@ -1240,6 +1248,7 @@
+ case $compress_ext in
+ .gz) decompress=$gunzip ;;
+ .bz2) decompress=$bzip2 ;;
++ .xz) decompress=$unxz ;;
+ .lzma) decompress=$unlzma ;;
+ .z) decompress=$pcat ;;
+ .Z) decompress=$zcat ;;
+@@ -1333,6 +1342,7 @@
+ s,@zcat@,$zcat,
+ s,@gunzip@,$gunzip,
+ s,@bzip2@,$bzip2,
++s,@unxz@,$unxz,
+ s,@unlzma@,$unlzma,
+ s,@unyabba@,$unyabba,
+ s,@compress@,$compress,
+Index: man-1.6f/src/makewhatis.sh
+===================================================================
+--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 14:00:35.000000000 -0800
++++ man-1.6f/src/makewhatis.sh 2010-12-29 14:16:18.821555314 -0800
+@@ -242,7 +242,7 @@
+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
+
+ function readline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ result = (pipe_cmd | getline);
+ if (result < 0) {
+ print "Pipe error: " pipe_cmd " " ERRNO > "/dev/stderr";
+@@ -257,7 +257,7 @@
+ }
+
+ function closeline() {
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ return close(pipe_cmd);
+ } else {
+ return close(filename);
+@@ -278,7 +278,9 @@
+ use_bzcat = match(filename,"\\.bz2");
+ if(!use_bzcat)
+ use_lzcat = match(filename,"\\.lzma");
+- if (use_zcat || use_bzcat || use_lzcat ) {
++ if(!use_xzcat)
++ use_xzcat = match(filename,"\\.xz");
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat ) {
+ filename_no_gz = substr(filename, 0, RSTART - 1);
+ } else {
+ filename_no_gz = filename;
+@@ -291,14 +293,16 @@
+ actual_section = section;
+ }
+ sub(/\..*/, "", progname);
+- if (use_zcat || use_bzcat || use_lzcat) {
++ if (use_zcat || use_bzcat || use_lzcat || use_xzcat) {
+ if (use_zcat) {
+ pipe_cmd = "zcat \"" filename "\"";
+ } else if (use_bzcat) {
+ pipe_cmd = "bzcat \"" filename "\"";
+- } else {
++ } else if (use_lzcat) {
+ pipe_cmd = "lzcat \"" filename "\"";
+- }
++ } else {
++ pipe_cmd = "xzcat \"" filename "\"";
++ }
+ # try to avoid suspicious stuff
+ if (filename ~ /[;&|`$(]/) {
+ print "ignored strange file name " filename " in " curdir > "/dev/stderr";
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-mandirs.patch
new file mode 100644
index 000000000..b240064c9
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-mandirs.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300
++++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300
+@@ -36,11 +36,12 @@
+ #
+ # Every automatically generated MANPATH includes these fields
+ #
+-MANPATH /usr/man
+ MANPATH /usr/share/man
++MANPATH /usr/X11R6/man
+ MANPATH /usr/local/man
+ MANPATH /usr/local/share/man
+-MANPATH /usr/X11R6/man
++MANPATH /usr/kerberos/man
++MANPATH /usr/man
+ #
+ # Uncomment if you want to include one of these by default
+ #
+@@ -67,6 +68,9 @@
+ MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
+ MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
+ MANPATH_MAP /usr/bin/mh /usr/share/man
++MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man
++MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man
++
+ #
+ # NOAUTOPATH keeps man from automatically adding directories that look like
+ # manual page directories to the path.
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-new_sections.patch
new file mode 100644
index 000000000..fb9773c64
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-new_sections.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300
++++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300
+@@ -960,7 +960,7 @@
+
+ # What sections do we anticipate?
+
+-tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
++tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
+
+ if [ x$default = x ]; then
+ echo ""
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-ro_usr.patch
new file mode 100644
index 000000000..1d1cb0c72
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-ro_usr.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: man-1.6f/src/makewhatis.sh
+===================================================================
+--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800
++++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800
+@@ -124,7 +124,7 @@
+ continue;;
+ -s) setsections=1
+ continue;;
+- -u) findarg="-ctime 0"
++ -u) findarg="-newer /var/cache/man/whatis"
+ update=1
+ continue;;
+ -v) verbose=1
+@@ -165,14 +165,7 @@
+ # first truncate all the whatis files that will be created new,
+ # then only update - we might visit the same directory twice
+ if [ x$update = x ]; then
+- for pages in man cat
+- do
+- eval path="\$$pages"path
+- for mandir in $path
+- do
+- cp /dev/null $mandir/whatis
+- done
+- done
++ cp /dev/null /var/cache/man/whatis
+ fi
+
+ for pages in man cat
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-security.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-security.patch
new file mode 100644
index 000000000..312a882f0
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-security.patch
@@ -0,0 +1,62 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
+--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
++++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300
+@@ -45,7 +45,7 @@
+ # and should be first.
+ # It is a bug to add /var/cache/man to DEFCATPATH.
+ dm=
+-for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
++for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
+ do
+ if [ -d $d ]; then
+ if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
+@@ -53,7 +53,7 @@
+ done
+ DEFMANPATH=$dm
+ dc=
+-for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
++for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
+ do
+ if [ -d $d ]; then
+ if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
+@@ -76,12 +76,12 @@
+ # We try here to be careful (and avoid preconstructed symlinks)
+ # in case makewhatis is run as root, by creating a subdirectory of /tmp.
+
+-TMPFILEDIR=/tmp/whatis.tmp.dir.$$
+-rm -rf $TMPFILEDIR
+-if ! mkdir -m 0700 $TMPFILEDIR; then
+- echo Could not create $TMPFILEDIR
+- exit 1;
++TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
++if [ $? -ne 0 ]; then
++ echo "$0: Can't create temp file, exiting..."
++ exit 1
+ fi
++chmod 0700 $TMPFILEDIR
+ TMPFILE=$TMPFILEDIR/w
+
+ # make sure TMPFILEDIR is deleted if program is killed or terminates
+diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
+--- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300
++++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300
+@@ -1234,7 +1234,6 @@
+ #endif
+
+
+-#if 0
+ {
+ /* There are no known cases of buffer overflow caused by
+ excessively long environment variables. In case you find one,
+@@ -1257,7 +1256,6 @@
+ MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
+ MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
+ }
+-#endif
+
+
+ #ifndef __FreeBSD__
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-use_i18n_vars_in_a_std_way.patch
new file mode 100644
index 000000000..568f74210
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-use_i18n_vars_in_a_std_way.patch
@@ -0,0 +1,160 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
+--- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300
++++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300
+@@ -9,22 +9,63 @@
+ extern char *index (const char *, int); /* not always in <string.h> */
+ extern char *my_malloc(int); /* in util.c */
+
++/* if the program has sgid/suid privileges then getenv doesn't return
++ * NLSPATH; so we set here a good default value.
++ */
+ #ifndef DEFAULT_NLSPATH
+ # if __GLIBC__ >= 2
+-# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
++# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
+ # else
+ # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
+ # endif
+ #endif
+
+-static nl_catd my_catopenpath(char *name, char *path);
++static nl_catd my_catopenpath(char *name, char *path, char *lang);
+
+ static /* this source included in gripes.c */
+ nl_catd
+ my_catopen(char *name, int oflag) {
+- nl_catd fd;
++ nl_catd fd = (nl_catd) -1;
++
++ /* using first the my_catopenpath, which looks with LANGUAGE
++ * and only if it fails ressort to catopen, it gives better i18n
++ */
++ {
++ char *nlspath, *lang, *s;
+
+- fd = catopen(name, oflag);
++ /*
++ * "If NLSPATH does not exist in the environment, or if a
++ * message catalog cannot be opened in any of the paths specified
++ * by NLSPATH, then an implementation defined default path is used"
++ */
++ nlspath = getenv("NLSPATH");
++ if (!nlspath)
++ nlspath = DEFAULT_NLSPATH;
++
++ lang = getenv("LANGUAGE");
++ if (!lang)
++ lang = getenv("LC_ALL");
++ if (!lang)
++ lang = getenv("LC_MESSAGES");
++ if (!lang)
++ lang = getenv("LANG");
++ if (!lang)
++ lang = "";
++
++ while(*lang && (fd == (nl_catd) -1)) {
++ s = index(lang, ':');
++ if (s) *s = 0;
++ fd = my_catopenpath(name, nlspath, lang);
++ if (s) lang=s+1;
++ else lang = "";
++ }
++ if (fd == (nl_catd) -1)
++ fd = my_catopenpath(name, nlspath, "en");
++ }
++
++ /* still not found, use the system catopen */
++ if (fd == (nl_catd) -1)
++ fd = catopen(name, oflag);
+
+ if (fd == (nl_catd) -1 && oflag) {
+ oflag = 0;
+@@ -32,8 +73,6 @@
+ }
+
+ if (fd == (nl_catd) -1) {
+- char *nlspath;
+-
+ /* The libc catopen fails - let us see if we can do better */
+ /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
+
+@@ -58,17 +97,6 @@
+ #endif
+ }
+
+- /*
+- * "If NLSPATH does not exist in the environment, or if a
+- * message catalog cannot be opened in any of the paths specified
+- * by NLSPATH, then an implementation defined default path is used"
+- */
+-
+- nlspath = getenv("NLSPATH");
+- if (nlspath)
+- fd = my_catopenpath(name, nlspath);
+- if (fd == (nl_catd) -1)
+- fd = my_catopenpath(name, DEFAULT_NLSPATH);
+ }
+ return fd;
+ }
+@@ -90,15 +118,13 @@
+ *
+ */
+ static nl_catd
+-my_catopenpath(char *name, char *nlspath) {
+- int fd;
++my_catopenpath(char *name, char *nlspath, char *lang) {
+ nl_catd cfd = (nl_catd) -1;
+- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
++ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
+ int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
+
+ namesz = strlen(name);
+
+- lang = getenv("LANG");
+ if (!lang)
+ lang = "";
+ langsz = strlen(lang);
+@@ -194,14 +220,9 @@
+ path = s+1;
+ } else
+ path = 0;
+- fd = open(file, O_RDONLY);
+- if (fd != -1) {
+- /* we found the right catalog - but we don't know the
+- type of nl_catd, so close it again and ask libc */
+- close(fd);
+- cfd = catopen(file, 0);
+- break;
+- }
++ cfd = catopen(file, 0);
++ if (cfd != (nl_catd) -1)
++ break;
+ }
+
+ free(path0);
+diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
+--- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300
++++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300
+@@ -282,13 +282,14 @@
+ /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
+ the return value of setlocale is an opaque string. */
+ /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
+- if((lang = getenv("LC_ALL")) != NULL)
++ /* LANGUAGE is GNU/Linux and overrules all */
++ if((lang = getenv("LANGUAGE")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+- if((lang = getenv("LC_MESSAGES")) != NULL)
++ else if((lang = getenv("LC_ALL")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+- if((lang = getenv("LANG")) != NULL)
++ else if((lang = getenv("LC_MESSAGES")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+- if((lang = getenv("LANGUAGE")) != NULL)
++ else if((lang = getenv("LANG")) != NULL)
+ split2(dir, lang, add_to_mandirlist_x, perrs);
+ add_to_mandirlist_x(dir, 0, perrs);
+ }
diff --git a/meta/recipes-extended/man/man-1.6f/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man-1.6f/man-1.6e-whatis2.patch
new file mode 100644
index 000000000..7f013836c
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man-1.6e-whatis2.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: man-1.6f/src/makewhatis.sh
+===================================================================
+--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800
++++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800
+@@ -164,10 +164,15 @@
+ fi
+ catpath=`echo ${catpath} | tr : ' '`
+
++#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
++WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
++[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
++
+ # first truncate all the whatis files that will be created new,
+ # then only update - we might visit the same directory twice
+ if [ x$update = x ]; then
+- cp /dev/null /var/cache/man/whatis
++ mkdir -p $WHATIS_DIR/
++ /bin/echo -n > $WHATIS_DIR/whatis
+ fi
+
+ for pages in man cat
+@@ -180,13 +185,7 @@
+ echo "about to enter $mandir" > /dev/stderr
+ fi
+
+- # kludge for Slackware's /usr/man/preformat
+- if [ $mandir = /usr/man/preformat ]
+- then
+- mandir1=/usr/man
+- else
+- mandir1=$mandir
+- fi
++ mandir1=$WHATIS_DIR
+
+ # if $mandir is on a readonly partition, and the whatis file
+ # is not a symlink, then let's skip trying to update it
+@@ -207,11 +206,6 @@
+ fi
+ fi
+
+- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
+- if [ x$verbose != x ]; then
+- echo skipping $mandir - we did it already > /dev/stderr
+- fi
+- else
+ here=`pwd`
+ cd $mandir
+ for i in $sections
diff --git a/meta/recipes-extended/man/man-1.6f/man.1.gz b/meta/recipes-extended/man/man-1.6f/man.1.gz
new file mode 100644
index 000000000..c36804515
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man.1.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man-1.6f/man.7.gz b/meta/recipes-extended/man/man-1.6f/man.7.gz
new file mode 100644
index 000000000..e85af8242
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/man.7.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man-1.6f/manpath.5.gz b/meta/recipes-extended/man/man-1.6f/manpath.5.gz
new file mode 100644
index 000000000..c012ff897
--- /dev/null
+++ b/meta/recipes-extended/man/man-1.6f/manpath.5.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man_1.6f.bb b/meta/recipes-extended/man/man_1.6f.bb
new file mode 100644
index 000000000..ee3d648fa
--- /dev/null
+++ b/meta/recipes-extended/man/man_1.6f.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Online documentation tools"
+DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
+SECTION = "console/utils"
+HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
+LICENSE = "GPLv2"
+PR = "r2"
+
+DEPENDS = "groff less"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
+ file://man-1.5k-confpath.patch;striplevel=0 \
+ file://man-1.5h1-make.patch; \
+ file://man-1.5k-nonascii.patch; \
+ file://man-1.6e-security.patch; \
+ file://man-1.6e-mandirs.patch; \
+ file://man-1.5m2-bug11621.patch; \
+ file://man-1.5k-sofix.patch; \
+ file://man-1.5m2-buildroot.patch; \
+ file://man-1.6e-ro_usr.patch; \
+ file://man-1.5i2-newline.patch;striplevel=0 \
+ file://man-1.5j-utf8.patch; \
+ file://man-1.5i2-overflow.patch; \
+ file://man-1.5j-nocache.patch; \
+ file://man-1.5i2-initial.patch; \
+ file://man-1.5h1-gencat.patch;striplevel=0 \
+ file://man-1.5g-nonrootbuild.patch; \
+ file://man-1.5m2-tv_fhs.patch;striplevel=0 \
+ file://man-1.5j-i18n.patch; \
+ file://man-1.6e-whatis2.patch; \
+ file://man-1.6e-use_i18n_vars_in_a_std_way.patch; \
+ file://man-1.5m2-no-color-for-printing.patch; \
+ file://man-1.5m2-sigpipe.patch; \
+ file://man-1.6e-i18n_whatis.patch; \
+ file://man-1.6e-new_sections.patch; \
+ file://man-1.6e-lzma+xz-support.patch; \
+ file://man*"
+
+SRC_URI[md5sum] = "67aaaa6df35215e812fd7d89472c44b6"
+SRC_URI[sha256sum] = "9f208c7e1981371ad4481d6e6c2c566bc726a15778723f94136d220fb9375f6c"
+
+
+do_configure () {
+ ${S}/configure -default -confdir /etc +sgid +fhs +lang all
+}
+
+
+fakeroot do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+do_install_append(){
+ mkdir -p ${D}/etc/
+ mkdir -p ${D}${datadir}/man/man5
+ mkdir -p ${D}${datadir}/man/man7
+ cp ${S}/src/man.conf ${D}/etc/
+ cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
+ cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
+ cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
+}
+
+
+FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.conf"
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb
new file mode 100644
index 000000000..e7ccc77ca
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Midnight Commander is an ncurses based file manager."
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+PR = "r3"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
+SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
+
+FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
+
+do_install_append () {
+ sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+
+}
diff --git a/meta/recipes-extended/mc/mc_4.8.3.bb b/meta/recipes-extended/mc/mc_4.8.3.bb
new file mode 100644
index 000000000..3b777b5b7
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.8.3.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Midnight Commander is an ncurses based file manager."
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+PR = "r0"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "12d38ad4969df3f8bbf66c3967a191ee"
+SRC_URI[sha256sum] = "445f286652b85c3e8e87839bad64c28ad2dc80661778571a0b59c2b920ef60ac"
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
+
+FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
+
+do_install_append () {
+ sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+ rm -rf ${D}${libdir}
+}
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
new file mode 100644
index 000000000..58d54f9d0
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -0,0 +1,24 @@
+Upstream-Status: pending
+
+By hardcoding CC's definition in the Makefile, all the gcc parameters
+set by tune settings are lost. Causing compile failure with x32 toolchain
+
+As the bitbake defined CC is good, there is no need to redfine CC in the
+make file, hence making the CC definition in the Makefile conditional.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
+
+Index: mdadm-3.2.2/Makefile
+===================================================================
+--- mdadm-3.2.2.orig/Makefile
++++ mdadm-3.2.2/Makefile
+@@ -40,7 +40,8 @@ KLIBC=/home/src/klibc/klibc-0.77
+
+ KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
+
+-CC = $(CROSS_COMPILE)gcc
++CC ?= $(CROSS_COMPILE)gcc
++
+ CXFLAGS = -ggdb
+ CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/mdadm_3.2.3.bb b/meta/recipes-extended/mdadm/mdadm_3.2.3.bb
new file mode 100644
index 000000000..17cdd416b
--- /dev/null
+++ b/meta/recipes-extended/mdadm/mdadm_3.2.3.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = " A tool for managing Soft RAID under Linux"
+HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
+BUGTRACKER = "n/a"
+
+# Some files are GPLv2+ while others are GPLv2.
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
+ file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
+
+PR = "r0"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
+ file://mdadm-3.2.2_fix_for_x32.patch \
+ "
+
+SRC_URI[md5sum] = "d789d6ecb9c1d5ebcc64f0fc52bca92f"
+SRC_URI[sha256sum] = "0ff49a04c6250834ce1b5be5a1581532e70e2221a87e1eedec46d6656b37ab40"
+
+CFLAGS += "-fno-strict-aliasing"
+
+inherit autotools
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ export STRIP=""
+ autotools_do_install
+}
+
+FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb
new file mode 100644
index 000000000..fed5dfdab
--- /dev/null
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = " A compact getty program for virtual consoles only"
+SECTION = "console/utils"
+HOMEPAGE = "http://sourceforge.net/projects/mingetty/"
+LICENSE = "GPLv2"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
+SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990"
+SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17"
+
+EXTRA_OEMAKE = "CC='${CC}'"
+
+do_install(){
+ mkdir -p ${D}${mandir}/man8
+ mkdir -p ${D}/sbin
+ oe_runmake install DESTDIR=${D}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_NAME = "getty"
+ALTERNATIVE_LINK = "${base_sbindir}/getty"
+ALTERNATIVE_PATH = "${base_sbindir}/mingetty"
+ALTERNATIVE_PRIORITY = "50"
diff --git a/meta/recipes-extended/minicom/minicom-2.6.1/gcc4-scope.patch b/meta/recipes-extended/minicom/minicom-2.6.1/gcc4-scope.patch
new file mode 100644
index 000000000..0660cb0c1
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom-2.6.1/gcc4-scope.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Inappropriate [others]
+
+--- minicom-2.1/src/window.c.orig 2006-06-14 17:49:53.000000000 +0200
++++ minicom-2.1/src/window.c 2006-06-14 17:50:14.000000000 +0200
+@@ -62,7 +62,7 @@
+ static char *CS, *SF, *SR, *VB, *BL;
+ static char *VE, *VI, *KS, *KE;
+ static char *CD, *CL, *IC, *DC;
+-static char *BC, *CR, *NL;
++static char *mcBC, *CR, *NL;
+ #if ST_LINE
+ static char *TS, *FS, *DS;
+ #endif
+@@ -322,8 +322,8 @@
+ else if (NL != CNULL && x == 0 && x == curx && y == cury + 1)
+ outstr(NL);
+ #endif
+- else if (BC != CNULL && y == cury && x == curx - 1)
+- outstr(BC);
++ else if (mcBC != CNULL && y == cury && x == curx - 1)
++ outstr(mcBC);
+ else
+ outstr(tgoto(CM, x, y));
+ curx = x;
+@@ -1918,7 +1918,7 @@
+ CL = tgetstr("cl", &_tptr);
+ IC = tgetstr("ic", &_tptr);
+ DC = tgetstr("dc", &_tptr);
+- BC = tgetstr("bc", &_tptr);
++ mcBC = tgetstr("bc", &_tptr);
+ CR = tgetstr("cr", &_tptr);
+ NL = tgetstr("nl", &_tptr);
+ AC = tgetstr("ac", &_tptr);
+@@ -1967,10 +1967,10 @@
+ _has_am = tgetflag("am");
+ _mv_standout = tgetflag("ms");
+ if (tgetflag("bs")) {
+- if (BC == CNULL) BC = "\b";
++ if (mcBC == CNULL) mcBC = "\b";
+ }
+ else
+- BC = CNULL;
++ mcBC = CNULL;
+
+ /* Special IBM box-drawing characters */
+ D_UL = 201;
diff --git a/meta/recipes-extended/minicom/minicom-2.6.1/rename-conflicting-functions.patch b/meta/recipes-extended/minicom/minicom-2.6.1/rename-conflicting-functions.patch
new file mode 100644
index 000000000..1a50f1885
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom-2.6.1/rename-conflicting-functions.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+--- minicom-2.3/src/minicom.c-orig 2009-06-08 14:49:07.000000000 +0200
++++ minicom-2.3/src/minicom.c 2009-06-08 14:50:23.000000000 +0200
+@@ -63,6 +63,10 @@
+ }
+ #endif /*DEBUG*/
+
++#ifdef __USE_GNU
++#define getline minicom_getline
++#endif
++
+ /*
+ * Sub - menu's.
+ */
diff --git a/meta/recipes-extended/minicom/minicom_2.6.1.bb b/meta/recipes-extended/minicom/minicom_2.6.1.bb
new file mode 100644
index 000000000..3a9f9340d
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom_2.6.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Text-based modem control and terminal emulation program"
+DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems"
+SECTION = "console/network"
+DEPENDS = "ncurses"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
+ file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
+
+SRC_URI = "http://alioth.debian.org/frs/download.php/3700/minicom-${PV}.tar.gz \
+ file://rename-conflicting-functions.patch \
+ "
+# file://gcc4-scope.patch
+
+SRC_URI[md5sum] = "435fb410a5bfa9bb20d4248b3ca53529"
+SRC_URI[sha256sum] = "a6e7bf533c3796f3a67a7d109f328d46497c687ed13885bd1be4ce0548fc4f56"
+
+inherit autotools gettext
+
+do_install() {
+ for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
+}
+
diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch
new file mode 100644
index 000000000..e06869e3a
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/disable-strip.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [configuration]
+
+diff --git a/Makefile.in b/Makefile.in
+index 37b3cc9..f1026f3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -95,7 +95,7 @@ install-dirs:
+ $(DESTDIR)$(mandir)/man1
+
+ install-binaries: $(PROG)
+- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG)
++ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
+
+ install-man:
+ $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
new file mode 100644
index 000000000..f3b6dcc34
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
@@ -0,0 +1,24 @@
+This fixes the parallel make install failure
+
+Upstream-Status: Accepted
+http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: mktemp-1.7/Makefile.in
+===================================================================
+--- mktemp-1.7.orig/Makefile.in
++++ mktemp-1.7/Makefile.in
+@@ -94,10 +94,10 @@ install-dirs:
+ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(mandir)/man1
+
+-install-binaries: $(PROG)
++install-binaries: install-dirs $(PROG)
+ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
+
+-install-man:
++install-man: install-dirs
+ $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
+ $(DESTDIR)$(mandir)/man1/mktemp.1
+
diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb
new file mode 100644
index 000000000..17b0c6f13
--- /dev/null
+++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Allow safe temporary file creation from shell scripts."
+HOMEPAGE = "http://www.mktemp.org/"
+BUGTRACKER = "http://www.mktemp.org/bugs"
+SECTION = "console/utils"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4"
+
+PR = "r2"
+
+SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \
+ file://disable-strip.patch \
+ file://fix-parallel-make.patch \
+ "
+
+SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172"
+SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "--with-libc"
+
+do_install_append () {
+ mkdir ${D}${base_bindir}
+ mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp.${PN}
+ rmdir ${D}${bindir}
+}
+
+ALTERNATIVE_NAME = "mktemp"
+ALTERNATIVE_LINK = "${base_bindir}/mktemp"
+ALTERNATIVE_PATH = "${base_bindir}/mktemp.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.24.bb b/meta/recipes-extended/msmtp/msmtp_1.4.24.bb
new file mode 100644
index 000000000..2d2ee52d6
--- /dev/null
+++ b/meta/recipes-extended/msmtp/msmtp_1.4.24.bb
@@ -0,0 +1,27 @@
+SUMMARY = "msmtp is an SMTP client."
+DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
+HOMEPAGE = "http://msmtp.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "GPLv3"
+DEPENDS = "zlib gnutls"
+PR = "r2"
+
+
+#COPYING or Licence
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \
+ "
+
+SRC_URI[md5sum] = "3ed704fbd3e7419cab5c65bb7928d9ba"
+SRC_URI[sha256sum] = "f19f3fcc67da448420b3adbd5add09f8fe110664dd64f3c2cd693ef0cb736887"
+
+inherit gettext autotools update-alternatives
+
+EXTRA_OECONF += "--without-gnome-keyring"
+
+ALTERNATIVE_NAME = "sendmail"
+ALTERNATIVE_PATH = "${bindir}/msmtp"
+ALTERNATIVE_LINK = "${sbindir}/sendmail"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.h b/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.h
new file mode 100644
index 000000000..92c527a51
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.h
@@ -0,0 +1,75 @@
+/*
+* config.h Automatically generated configuration includefile
+*
+* NET-TOOLS A collection of programs that form the base set of the
+* NET-3 Networking Distribution for the LINUX operating
+* system.
+*
+* DO NOT EDIT DIRECTLY
+*
+*/
+
+/*
+ *
+ * Internationalization
+ *
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese. Other translations are, of
+ * course, welcome. Answer `n' here if you have no support for
+ * internationalization on your system.
+ *
+ */
+#define I18N 1
+
+/*
+ *
+ * Protocol Families.
+ *
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 0
+#define HAVE_AFATALK 0
+#define HAVE_AFAX25 0
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 0
+#define HAVE_AFX25 0
+#define HAVE_AFECONET 0
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 0
+
+/*
+ *
+ * Device Hardware types.
+ *
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 1
+#define HAVE_HWTR 1
+#define HAVE_HWAX25 0
+#define HAVE_HWROSE 0
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 0
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 0
+#define HAVE_HWFDDI 0
+#define HAVE_HWHIPPI 0
+#define HAVE_HWASH 0
+#define HAVE_HWHDLCLAPB 0
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 0
+#define HAVE_HWIB 0
+
+/*
+ *
+ * Other Features.
+ *
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
diff --git a/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.make b/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.make
new file mode 100644
index 000000000..ec516f27e
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools-1.60-23/net-tools-config.make
@@ -0,0 +1,36 @@
+I18N=1
+HAVE_AFUNIX=1
+HAVE_AFINET=1
+HAVE_AFINET6=1
+# HAVE_AFIPX=0
+# HAVE_AFATALK=0
+# HAVE_AFAX25=0
+HAVE_AFNETROM=1
+# HAVE_AFROSE=0
+# HAVE_AFX25=0
+# HAVE_AFECONET=0
+# HAVE_AFDECnet=0
+# HAVE_AFASH=0
+HAVE_HWETHER=1
+HAVE_HWARC=1
+HAVE_HWSLIP=1
+HAVE_HWPPP=1
+HAVE_HWTUNNEL=1
+HAVE_HWSTRIP=1
+HAVE_HWTR=1
+# HAVE_HWAX25=0
+# HAVE_HWROSE=0
+HAVE_HWNETROM=1
+# HAVE_HWX25=0
+HAVE_HWFR=1
+# HAVE_HWSIT=0
+# HAVE_HWFDDI=0
+# HAVE_HWHIPPI=0
+# HAVE_HWASH=0
+# HAVE_HWHDLCLAPB=0
+HAVE_HWIRDA=1
+# HAVE_HWEC=0
+# HAVE_HWIB=0
+HAVE_FW_MASQUERADE=1
+HAVE_IP_TOOLS=1
+HAVE_MII=1
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-23.bb b/meta/recipes-extended/net-tools/net-tools_1.60-23.bb
new file mode 100644
index 000000000..b9a05c6fe
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-23.bb
@@ -0,0 +1,82 @@
+SUMMARY="Basic networking tools"
+DESCRIPTION="A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
+HOMEPAGE = "http://net-tools.berlios.de/"
+BUGTRACKER = "http://bugs.debian.org/net-tools"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://ifconfig.c;startline=11;endline=15;md5=da4c7bb79a5d0798faa99ef869721f4a"
+PR = "r1"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
+ ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
+ file://net-tools-config.h \
+ file://net-tools-config.make"
+
+S = "${WORKDIR}/net-tools-1.60"
+
+SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
+SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
+
+SRC_URI[patch.md5sum] = "2412e55c20308d5fbd28bfadd18c075f"
+SRC_URI[patch.sha256sum] = "d678b3ea97d6c7ca548918994642bfc6b5511ab02f3a5881dfcca00c88bfd73b"
+
+inherit gettext
+
+# The Makefile is lame, no parallel build
+PARALLEL_MAKE = ""
+
+# Unlike other Debian packages, net-tools *.diff.gz contains another series of
+# patches maintained by quilt. So manually apply them before applying other local
+# patches. Also remove all temp files before leaving, because do_patch() will pop
+# up all previously applied patches in the start
+nettools_do_patch() {
+ cd ${S}
+ quilt pop -a || true
+ if [ -d ${S}/.pc-nettools ]; then
+ mv ${S}/.pc-nettools ${S}/.pc
+ QUILT_PATCHES=${S}/debian/patches quilt pop -a
+ rm -rf ${S}/.pc ${S}/debian
+ fi
+ patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff
+ QUILT_PATCHES=${S}/debian/patches quilt push -a
+ mv ${S}/.pc ${S}/.pc-nettools
+}
+
+do_unpack[cleandirs] += "${S}"
+
+# We invoke base do_patch at end, to incorporate any local patch
+python do_patch() {
+ bb.build.exec_func('nettools_do_patch', d)
+ bb.build.exec_func('patch_do_patch', d)
+}
+
+do_configure() {
+ # net-tools has its own config mechanism requiring "make config"
+ # we pre-generate desired options and copy to source directory instead
+ cp ${WORKDIR}/net-tools-config.h ${S}/config.h
+ cp ${WORKDIR}/net-tools-config.make ${S}/config.make
+}
+
+do_compile() {
+ # net-tools use COPTS/LOPTS to allow adding custom options
+ export COPTS="$CFLAGS"
+ export LOPTS="$LDFLAGS"
+ unset CFLAGS
+ unset LDFLAGS
+
+ oe_runmake
+}
+
+inherit update-alternatives
+
+base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach"
+ALTERNATIVE_LINKS += "${base_sbindir}/${@' ${base_sbindir}/'.join((d.getVar('base_sbindir_progs', True)).split())}"
+
+base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
+ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}"
+
+ALTERNATIVE_PRIORITY = "100"
+
+do_install() {
+ oe_runmake 'BASEDIR=${D}' install
+}
diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
new file mode 100644
index 000000000..779526038
--- /dev/null
+++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Pending
+
+Author: dexuan.cui@intel.com
+Date: Fri Apr 15 16:17:39 CST 2011
+
+The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should
+ensure the directory ${SHAREDDIR} exists.
+
+We need to push the patch to upstream.
+
+Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -114,12 +114,12 @@
+
+ sharedlib: $(LIBNEWTSH)
+
+-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
++$(LIBNEWTSH): $(SHAREDOBJS)
+ $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
+ ln -fs $(LIBNEWTSONAME) libnewt.so
+ ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+
+-$(SHAREDDIR)/%.o : %.c
++$(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+ $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+
+ install: $(LIBNEWT) install-sh whiptail
diff --git a/meta/recipes-extended/newt/files/remove_slang_include.patch b/meta/recipes-extended/newt/files/remove_slang_include.patch
new file mode 100644
index 000000000..a2634ec75
--- /dev/null
+++ b/meta/recipes-extended/newt/files/remove_slang_include.patch
@@ -0,0 +1,16 @@
+
+Upstream-Status: Pending
+
+Index: git/Makefile.in
+===================================================================
+--- git.orig/Makefile.in
++++ git/Makefile.in
+@@ -5,7 +5,7 @@ CC = @CC@
+ CPP = @CPP@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
+ GNU_LD = @GNU_LD@
+
+ VERSION = @VERSION@
diff --git a/meta/recipes-extended/newt/libnewt_0.52.14.bb b/meta/recipes-extended/newt/libnewt_0.52.14.bb
new file mode 100644
index 000000000..8a89eb767
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb
@@ -0,0 +1,41 @@
+SUMMARY = "A library for text mode user interfaces"
+
+DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
+interfaces. Newt can be used to add stacked windows, entry widgets, \
+checkboxes, radio buttons, labels, plain text fields, scrollbars, \
+etc., to text mode user interfaces. This package also contains the \
+shared library needed by programs built with newt, as well as a \
+/usr/bin/dialog replacement called whiptail. Newt is based on the \
+slang library."
+
+HOMEPAGE = "https://fedorahosted.org/newt/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
+
+# slang needs to be >= 2.2
+DEPENDS = "slang popt"
+
+PR = "r0"
+
+SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
+ file://remove_slang_include.patch \
+ file://fix_SHAREDDIR.patch"
+
+SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37"
+SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e"
+
+S = "${WORKDIR}/newt-${PV}"
+
+EXTRA_OECONF = "--without-python --without-tcl"
+
+inherit autotools
+
+PACKAGES_prepend = "whiptail "
+
+do_configure_prepend() {
+ sh autogen.sh
+}
+
+FILES_whiptail = "${bindir}/whiptail"
diff --git a/meta/recipes-extended/pam/libpam/99_pam b/meta/recipes-extended/pam/libpam/99_pam
new file mode 100644
index 000000000..97e990d10
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/99_pam
@@ -0,0 +1 @@
+d root root 0755 /var/run/sepermit none
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
new file mode 100644
index 000000000..be687457f
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -0,0 +1,35 @@
+This patch is used to create a new sub package libpam-xtests to do more checks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+--- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800
++++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800
+@@ -7,7 +7,7 @@
+ AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
+ -L$(top_builddir)/libpam_misc -lpam_misc
+
+-CLEANFILES = *~ $(XTESTS)
++CLEANFILES = *~
+
+ EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
+ tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
+@@ -51,3 +51,18 @@
+
+ xtests: $(XTESTS) run-xtests.sh
+ "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
++
++all: $(XTESTS)
++
++install: install_xtests
++
++install_xtests:
++ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
++ for file in $(EXTRA_DIST) ; do \
++ $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
++ done
++ for file in $(XTESTS); do \
++ $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
++ done
++
++.PHONY: all install_xtests
diff --git a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
new file mode 100644
index 000000000..5e551ac48
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
@@ -0,0 +1,97 @@
+innetgr may not be there so make sure that when innetgr is not present
+then we inform about it and not use it.
+
+-Khem
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c
++++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c
+@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p
+ }
+ /* If buffer starts with @, we are using netgroups */
+ if (buffer[0] == '@')
+- good &= innetgr (&buffer[1], NULL, user, NULL);
++#ifdef HAVE_INNETGR
++ good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
++#endif
+ /* otherwise, if the buffer starts with %, it's a UNIX group */
+ else if (buffer[0] == '%')
+ good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
+Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c
++++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c
+@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
+ }
+ /* If buffer starts with @, we are using netgroups */
+ if (buffer[0] == '@')
+- good &= innetgr (&buffer[1], NULL, user, NULL);
++#ifdef HAVE_INNETGR
++ good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
++#endif
+ else
+- good &= logic_field(pamh, user, buffer, count, is_same);
++ good &= logic_field(pamh, user, buffer, count, is_same);
+ D(("with user: %s", good ? "passes":"fails" ));
+
+ /* here we get the time field */
+Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c
++++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
+@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
+ }
+ /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
+ static int
+-evaluate_innetgr(const char *host, const char *user, const char *group)
++evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ if (innetgr(group, host, user, NULL) == 1)
+ return PAM_SUCCESS;
++#else
++ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#endif
++
+ return PAM_AUTH_ERR;
+ }
+ /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
+ static int
+-evaluate_notinnetgr(const char *host, const char *user, const char *group)
++evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ if (innetgr(group, host, user, NULL) == 0)
+ return PAM_SUCCESS;
++#else
++ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#endif
+ return PAM_AUTH_ERR;
+ }
+
+@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug,
+ const void *rhost;
+ if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
+ rhost = NULL;
+- return evaluate_innetgr(rhost, user, right);
++ return evaluate_innetgr(pamh, rhost, user, right);
+ }
+ /* (Rhost, user) is not in this group. */
+ if (strcasecmp(qual, "notinnetgr") == 0) {
+ const void *rhost;
+ if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
+ rhost = NULL;
+- return evaluate_notinnetgr(rhost, user, right);
++ return evaluate_notinnetgr(pamh, rhost, user, right);
+ }
+ /* Fail closed. */
+ return PAM_SERVICE_ERR;
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-account b/meta/recipes-extended/pam/libpam/pam.d/common-account
new file mode 100644
index 000000000..316b17337
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-account
@@ -0,0 +1,25 @@
+#
+# /etc/pam.d/common-account - authorization settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authorization modules that define
+# the central access policy for use on the system. The default is to
+# only deny service to users whose accounts are expired in /etc/shadow.
+#
+# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
+# To take advantage of this, it is recommended that you configure any
+# local modules either before or after the default block, and use
+# pam-auth-update to manage selection of other modules. See
+# pam-auth-update(8) for details.
+#
+
+# here are the per-package modules (the "Primary" block)
+account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
+# here's the fallback if no module succeeds
+account requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+account required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+# end of pam-auth-update config
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-auth b/meta/recipes-extended/pam/libpam/pam.d/common-auth
new file mode 100644
index 000000000..460b69f19
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-auth
@@ -0,0 +1,18 @@
+#
+# /etc/pam.d/common-auth - authentication settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authentication modules that define
+# the central authentication scheme for use on the system
+# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
+# traditional Unix authentication mechanisms.
+
+# here are the per-package modules (the "Primary" block)
+auth [success=1 default=ignore] pam_unix.so nullok_secure
+# here's the fallback if no module succeeds
+auth requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+auth required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-password b/meta/recipes-extended/pam/libpam/pam.d/common-password
new file mode 100644
index 000000000..389605732
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-password
@@ -0,0 +1,26 @@
+#
+# /etc/pam.d/common-password - password-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define the services to be
+# used to change user passwords. The default is pam_unix.
+
+# Explanation of pam_unix options:
+#
+# The "sha512" option enables salted SHA512 passwords. Without this option,
+# the default is Unix crypt. Prior releases used the option "md5".
+#
+# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
+# login.defs.
+#
+# See the pam_unix manpage for other options.
+
+# here are the per-package modules (the "Primary" block)
+password [success=1 default=ignore] pam_unix.so obscure sha512
+# here's the fallback if no module succeeds
+password requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+password required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session b/meta/recipes-extended/pam/libpam/pam.d/common-session
new file mode 100644
index 000000000..a594dd9d9
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session
@@ -0,0 +1,19 @@
+#
+# /etc/pam.d/common-session - session-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of sessions of *any* kind (both interactive and
+# non-interactive).
+#
+
+# here are the per-package modules (the "Primary" block)
+session [default=1] pam_permit.so
+# here's the fallback if no module succeeds
+session requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+session required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+session required pam_unix.so
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive
new file mode 100644
index 000000000..b110bb2b4
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive
@@ -0,0 +1,19 @@
+#
+# /etc/pam.d/common-session-noninteractive - session-related modules
+# common to all non-interactive services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of all non-interactive sessions.
+#
+
+# here are the per-package modules (the "Primary" block)
+session [default=1] pam_permit.so
+# here's the fallback if no module succeeds
+session requisite pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+session required pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+session required pam_unix.so
diff --git a/meta/recipes-extended/pam/libpam/pam.d/other b/meta/recipes-extended/pam/libpam/pam.d/other
new file mode 100644
index 000000000..6e40cd0c0
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/other
@@ -0,0 +1,27 @@
+#
+# /etc/pam.d/other - specify the PAM fallback behaviour
+#
+# Note that this file is used for any unspecified service; for example
+#if /etc/pam.d/cron specifies no session modules but cron calls
+#pam_open_session, the session module out of /etc/pam.d/other is
+#used.
+
+#If you really want nothing to happen then use pam_permit.so or
+#pam_deny.so as appropriate.
+
+# We use pam_warn.so to generate syslog notes that the 'other'
+#fallback rules are being used (as a hint to suggest you should setup
+#specific PAM rules for the service and aid to debugging). We then
+#fall back to the system default in /etc/pam.d/common-*
+
+auth required pam_warn.so
+auth include common-auth
+
+account required pam_warn.so
+account include common-account
+
+password required pam_warn.so
+password include common-password
+
+session required pam_warn.so
+session include common-session
diff --git a/meta/recipes-extended/pam/libpam_1.1.5.bb b/meta/recipes-extended/pam/libpam_1.1.5.bb
new file mode 100644
index 000000000..08ce1d13b
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam_1.1.5.bb
@@ -0,0 +1,91 @@
+SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
+DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
+HOMEPAGE = "https://fedorahosted.org/linux-pam/"
+BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
+SECTION = "base"
+# PAM is dual licensed under GPL and BSD.
+# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
+# libpam-runtime-1.0.1 is GPLv2+), by openembedded
+LICENSE = "GPLv2+ | BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ca0395de9a86191a078b8b79302e3083"
+
+PR = "r3"
+
+SRC_URI = "https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-${PV}.tar.bz2 \
+ file://99_pam \
+ file://pam.d/* \
+ file://libpam-xtests.patch"
+
+SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch"
+
+SRC_URI[md5sum] = "927ee5585bdec5256c75117e9348aa47"
+SRC_URI[sha256sum] = "65def4df04254dc4c5156859d36c34ad6d7afbcf3adbf2780530ebc4dbf2a116"
+
+DEPENDS = "bison flex flex-native cracklib"
+
+EXTRA_OECONF = "--with-db-uniquename=_pam \
+ --includedir=${includedir}/security \
+ --libdir=${base_libdir} \
+ --disable-regenerate-docu"
+
+CFLAGS_append = " -fPIC "
+
+S = "${WORKDIR}/Linux-PAM-${PV}"
+
+inherit autotools gettext
+
+PACKAGES += "${PN}-runtime ${PN}-xtests"
+FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug \
+ ${base_libdir}/security/pam_filter/.debug \
+ ${datadir}/Linux-PAM/xtests/.debug"
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
+FILES_${PN}-runtime = "${sysconfdir}"
+FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
+
+PACKAGES_DYNAMIC += " pam-plugin-*"
+
+RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix"
+RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils"
+RRECOMMENDS_${PN} = "libpam-runtime"
+
+python populate_packages_prepend () {
+ import os.path
+
+ def pam_plugin_append_file(pn, dir, file):
+ nf = os.path.join(dir, file)
+ of = d.getVar('FILES_' + pn, True)
+ if of:
+ nf = of + " " + nf
+ d.setVar('FILES_' + pn, nf)
+
+ dvar = bb.data.expand('${WORKDIR}/package', d, True)
+ pam_libdir = d.expand('${base_libdir}/security')
+ pam_sbindir = d.expand('${sbindir}')
+ pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
+
+ do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
+ pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_chkpwd')
+ pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_update')
+ pam_plugin_append_file('pam-plugin-tally', pam_sbindir, 'pam_tally')
+ pam_plugin_append_file('pam-plugin-tally2', pam_sbindir, 'pam_tally2')
+ pam_plugin_append_file('pam-plugin-timestamp', pam_sbindir, 'pam_timestamp_check')
+ pam_plugin_append_file('pam-plugin-mkhomedir', pam_sbindir, 'mkhomedir_helper')
+ do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
+}
+
+do_install() {
+ autotools_do_install
+
+ # don't install /var/run when populating rootfs. Do it through volatile
+ rm -rf ${D}/var
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_pam ${D}/etc/default/volatiles
+
+ install -d ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+
+ # The lsb requires unix_chkpwd has setuid permission
+ chmod 4755 ${D}${sbindir}/unix_chkpwd
+}
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch b/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch
new file mode 100644
index 000000000..0711d4e29
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Submitted [bug-parted@gnu.org]
+
+| for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \
+| make $(basename ${po%.pt_BR.po}); \
+| done
+| Makefile:904: *** Recursive variable `mandir' references itself (eventually). Stop.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+--- parted-3.1/doc/po4a.mk.orig 2012-03-15 14:09:11.555831872 +0100
++++ parted-3.1/doc/po4a.mk 2012-03-15 14:10:44.243830985 +0100
+@@ -23,7 +23,7 @@
+ # threshold is 80%), it won't be distributed, and the build won't fail.
+ #
+
+-mandir = $(mandir)/$(lang)
++mandir := $(mandir)/$(lang)
+
+ # Inform automake that we want to install some man pages in section 1, 5
+ # and 8.
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
new file mode 100644
index 000000000..a9f26e978
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Accepted [Expected to be included in parted versions > 3.1]
+Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9
+
+From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Sun, 18 Mar 2012 17:39:14 +0000
+Subject: git-version-gen: don't let "prefix" envvar cause trouble
+
+* build-aux/git-version-gen (prefix): Initialize properly,
+so as not to use a value specified via the environment.
+Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
+---
+diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
+index d5542a2..0fa9063 100755
+--- a/build-aux/git-version-gen
++++ b/build-aux/git-version-gen
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # Print a version string.
+-scriptversion=2012-01-06.07; # UTC
++scriptversion=2012-03-18.17; # UTC
+
+ # Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ #
+@@ -92,6 +92,8 @@ Options:
+
+ Running without arguments will suffice in most cases."
+
++prefix=v
++
+ while test $# -gt 0; do
+ case $1 in
+ --help) echo "$usage"; exit 0;;
+@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then
+ fi
+
+ tag_sed_script="${tag_sed_script:-s/x/x/}"
+-prefix="${prefix:-v}"
+
+ nl='
+ '
+--
+cgit v0.9.0.2
diff --git a/meta/recipes-extended/parted/parted-3.1/no_check.patch b/meta/recipes-extended/parted/parted-3.1/no_check.patch
new file mode 100644
index 000000000..58d8db442
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/no_check.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [configuration]
+
+If check is detected, it makes the builds non-determinstic so just force
+it to be disabled.
+
+RP - 4/11/08
+
+Index: parted-1.9.0/configure.ac
+===================================================================
+--- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100
++++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000
+@@ -477,7 +477,7 @@
+ AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
+
+ dnl check for "check", unit testing library/header
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
++have_check=no
+ if test "$have_check" != "yes"; then
+ AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building])
+ fi
diff --git a/meta/recipes-extended/parted/parted-3.1/syscalls.patch b/meta/recipes-extended/parted/parted-3.1/syscalls.patch
new file mode 100644
index 000000000..e9bbe9a95
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/syscalls.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Pending
+
+---
+ libparted/arch/linux.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+Index: parted-1.9.0/libparted/arch/linux.c
+===================================================================
+--- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
++++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
+@@ -17,6 +17,8 @@
+
+ #define PROC_DEVICES_BUFSIZ 16384
+
++#include <linux/version.h>
++
+ #include <config.h>
+ #include <arch/linux.h>
+
+@@ -1477,12 +1479,14 @@
+
+ #if SIZEOF_OFF_T < 8
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ static _syscall5(int,_llseek,
+ unsigned int, fd,
+ unsigned long, offset_high,
+ unsigned long, offset_low,
+ loff_t*, result,
+ unsigned int, origin)
++#endif
+
+ loff_t
+ llseek (unsigned int fd, loff_t offset, unsigned int whence)
+@@ -1490,11 +1494,20 @@
+ loff_t result;
+ int retval;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ retval = _llseek(fd,
+ ((unsigned long long)offset) >> 32,
+ ((unsigned long long)offset) & 0xffffffff,
+ &result,
+ whence);
++#else
++ retval = syscall(__NR__llseek, fd,
++ ((unsigned long long)offset) >> 32,
++ ((unsigned long long)offset) & 0xffffffff,
++ &result,
++ whence);
++#endif
++
+ return (retval==-1 ? (loff_t) retval : result);
+ }
+
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.1.bb
new file mode 100644
index 000000000..21d3a66b7
--- /dev/null
+++ b/meta/recipes-extended/parted/parted_3.1.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "parted, the GNU partition resizing program"
+HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
+SECTION = "console/tools"
+DEPENDS = "ncurses readline util-linux"
+PR = "r0"
+
+SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
+ file://no_check.patch \
+ file://syscalls.patch \
+ file://fix-git-version-gen.patch \
+ file://fix-doc-mandir.patch"
+
+SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb"
+SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15"
+
+EXTRA_OECONF = "--disable-device-mapper"
+
+inherit autotools pkgconfig gettext
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
new file mode 100644
index 000000000..88779c3bb
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+This patch fixes this compiler error with gcc 4.6.0
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
+
+| fts.c: In function 'pax_fts_set':
+| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
+| cc1: all warnings being treated as errors
+|
+| make[2]: *** [fts.o] Error 1
+
+Index: pax-3.4/lib/fts.c
+===================================================================
+--- pax-3.4.orig/lib/fts.c
++++ pax-3.4/lib/fts.c
+@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts
+ /* ARGSUSED */
+ int
+ fts_set(sp, p, instr)
+- FTS *sp;
++ FTS __attribute__((__unused__)) *sp;
+ FTSENT *p;
+ int instr;
+ {
diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
new file mode 100644
index 000000000..80878f38b
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
@@ -0,0 +1,185 @@
+Upstream-Status: Pending
+
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date: Tue Dec 6 10:34:53 2011 -0800
+
+ Fix pax-3.4 build for x32
+
+ off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and
+ size of off_t to see if file offset is 64bit. This patch adds
+ AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
+
+Index: pax-3.4/configure.in
+===================================================================
+--- pax-3.4.orig/configure.in
++++ pax-3.4/configure.in
+@@ -33,4 +33,7 @@ dnl Checks for header files.
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+
++AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(long)
++
+ AC_OUTPUT([Makefile lib/Makefile src/Makefile])
+Index: pax-3.4/src/ar_io.c
+===================================================================
+--- pax-3.4.orig/src/ar_io.c
++++ pax-3.4/src/ar_io.c
+@@ -378,7 +378,8 @@ ar_close(void)
+ * could have written anything yet.
+ */
+ if (frmt == NULL) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
+ #else
+ (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
+@@ -391,7 +392,8 @@ ar_close(void)
+
+ if (strcmp(NM_CPIO, argv0) == 0)
+ (void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ "%qu blocks\n",
+ #else
+ "%lu blocks\n",
+@@ -399,7 +401,8 @@ ar_close(void)
+ (rdcnt ? rdcnt : wrcnt) / 5120);
+ else if (strcmp(NM_TAR, argv0) != 0)
+ (void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
+ #else
+ "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
+Index: pax-3.4/src/cpio.c
+===================================================================
+--- pax-3.4.orig/src/cpio.c
++++ pax-3.4/src/cpio.c
+@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
+ */
+ if ((arcn->sb.st_size == 0) ||
+ (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ paxwarn (1, "Cpio link name length is invalid: %qu",
+ arcn->sb.st_size);
+ #else
+Index: pax-3.4/src/gen_subs.c
+===================================================================
+--- pax-3.4.orig/src/gen_subs.c
++++ pax-3.4/src/gen_subs.c
+@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+ * print device id's for devices, or sizes for other nodes
+ */
+ if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
+ (unsigned long) MINOR (sbp->st_rdev));
+ #else
+@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+ #endif
+ else
+ {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ (void) fprintf (fp, "%9qu ", sbp->st_size);
+ #else
+ (void) fprintf (fp, "%9lu ", sbp->st_size);
+@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len,
+ return (0);
+ }
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+ * asc_uqd()
+ * convert hex/octal character string into a u_quad_t. We do not have to
+Index: pax-3.4/src/options.c
+===================================================================
+--- pax-3.4.orig/src/options.c
++++ pax-3.4/src/options.c
+@@ -1545,7 +1545,8 @@ str_offt (char *val)
+ char *expr;
+ off_t num, t;
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ num = strtoq (val, &expr, 0);
+ if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
+ #else
+Index: pax-3.4/src/tar.c
+===================================================================
+--- pax-3.4.orig/src/tar.c
++++ pax-3.4/src/tar.c
+@@ -58,7 +58,8 @@
+ static unsigned long tar_chksm (char *, int);
+ static char *name_split (char *, int);
+ static int ul_oct (u_long, char *, int, int);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ static int uqd_oct (u_quad_t, char *, int, int);
+ #endif
+
+@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str,
+ return (0);
+ }
+
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+ * uqd_oct()
+ * convert an u_quad_t to an octal string. one of many oddball field
+@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
+ 0xfff);
+ arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
+ arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+ arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
+ * data follows this file, so set the pad
+ */
+ hd->linkflag = AREGTYPE;
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ sizeof (hd->size), 1))
+ #else
+@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
+ */
+ arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
+ 0xfff);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+ arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
+ else
+ hd->typeflag = REGTYPE;
+ arcn->pad = TAR_PAD (arcn->sb.st_size);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ sizeof (hd->size), 3))
+ {
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
new file mode 100644
index 000000000..0c10688fe
--- /dev/null
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Portable Archive eXchange"
+DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
+HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+BUGTRACKER = "http://www.openbsd.org/query-pr.html"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
+ file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
+ file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
+ file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
+
+SECTION = "base"
+PR = "r2"
+
+SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \
+ file://fix_for_compile_with_gcc-4.6.0.patch \
+ file://pax-3.4_fix_for_x32.patch"
+
+SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
+SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
+
+inherit autotools
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb
new file mode 100644
index 000000000..dc950f19a
--- /dev/null
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.22.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Convert::ASN1 - ASN.1 Encode/Decode library"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=10;endline=12;md5=a64b291b13ffddeef33b14f047ee8b26"
+PR = "r3"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "64a555e44adc79d92072b9fc7a6779c4"
+SRC_URI[sha256sum] = "be63d5cc715d7306e54b41d3c68c3617ca306289cff619a2ca43505e35f2f6ee"
+
+S = "${WORKDIR}/Convert-ASN1-${PV}"
+
+inherit cpan allarch
+
+EXTRA_PERLFLAGS = "-I ${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libtimedate-perl_1.20.bb b/meta/recipes-extended/perl/libtimedate-perl_1.20.bb
new file mode 100644
index 000000000..12439cf72
--- /dev/null
+++ b/meta/recipes-extended/perl/libtimedate-perl_1.20.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "TimeDate - parser for absolute times"
+SECTION = "libs"
+# You can redistribute it and/or modify it under the same terms as Perl itself.
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=21;md5=576b7cb41e5e821501a01ed66f0f9d9e"
+PR = "r4"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.gz"
+
+S = "${WORKDIR}/TimeDate-${PV}"
+
+inherit cpan allarch
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN}_virtclass-native = ""
+RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local"
+
+SRC_URI[md5sum] = "7da7452bce4c684e4238e6d09b390200"
+SRC_URI[sha256sum] = "f8251a791f6692c69952b4af697c01df93981ad1ab133279d034656a03cd3755"
diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
new file mode 100644
index 000000000..cf89cb695
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Perl module for supporting simple generic namespaces"
+DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \
+ It also helps maintain a prefix-to-namespace URI map, and provides a number of \
+ basic checks. "
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+PR = "r2"
+
+LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
+SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da"
+SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea"
+
+
+S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND="native"
+
diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
new file mode 100644
index 000000000..3a0873fe4
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Perl module for using and building Perl SAX2 XML processors"
+DESCRIPTION = "XML::SAX consists of several framework classes for using and \
+building Perl SAX2 XML parsers, filters, and drivers. It is designed \
+around the need to be able to "plug in" different SAX parsers to an \
+application without requiring programmer intervention. Those of you \
+familiar with the DBI will be right at home. Some of the designs \
+come from the Java JAXP specification (SAX part), only without the \
+javaness."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+DEPENDS += "libxml-namespacesupport-perl-native"
+RDEPENDS_${PN} += "libxml-namespacesupport-perl perl-module-file-temp"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24"
+SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84"
+
+S = "${WORKDIR}/XML-SAX-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/pigz/files/ldflags.patch b/meta/recipes-extended/pigz/files/ldflags.patch
new file mode 100644
index 000000000..928c3a577
--- /dev/null
+++ b/meta/recipes-extended/pigz/files/ldflags.patch
@@ -0,0 +1,17 @@
+Link using the bitbake LDFLAGS.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+
+Upstream-Status: Pending
+
+--- pigz-2.2.4/Makefile.orig 2012-01-01 02:46:58.000000000 +0100
++++ pigz-2.2.4/Makefile 2012-03-09 08:47:40.025094863 +0100
+@@ -2,7 +2,7 @@
+ CFLAGS=-O3 -Wall -Wextra
+
+ pigz: pigz.o yarn.o
+- $(CC) -o pigz pigz.o yarn.o -lpthread -lz
++ $(CC) $(LDFLAGS) -o pigz pigz.o yarn.o -lpthread -lz
+ ln -f pigz unpigz
+
+ pigz.o: pigz.c yarn.h
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 000000000..e1cbc8be8
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,32 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/"
+SECTION = "console/utils"
+LICENSE = "Zlib"
+
+SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz \
+ file://ldflags.patch"
+
+PROVIDES_virtclass-native += "gzip-native"
+
+DEPENDS = "zlib"
+
+do_install () {
+ if [ "${PN}" = "${BPN}" ] ; then
+ # Install files into /bin (FHS), which is typical place for gzip
+ install -d ${D}${base_bindir}
+ install ${B}/pigz ${D}${base_bindir}/gzip
+ install ${B}/unpigz ${D}${base_bindir}/gunzip
+ else
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ install ${B}/unpigz ${D}${bindir}/gunzip
+ fi
+}
+
+ALTERNATIVE_LINKS = "${base_bindir}/gzip ${base_bindir}/gunzip"
+ALTERNATIVE_PRIORITY = "80"
+
diff --git a/meta/recipes-extended/pigz/pigz_2.2.4.bb b/meta/recipes-extended/pigz/pigz_2.2.4.bb
new file mode 100644
index 000000000..e76c49c47
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.2.4.bb
@@ -0,0 +1,11 @@
+require pigz.inc
+
+PR = "r2"
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "9df2a3c742524446fa4e797c17e8fd85"
+SRC_URI[sha256sum] = "7e7967c47f66c07be97cbfa25c8816b72f9d35258466ea31eddc7666c914160e"
+LIC_FILES_CHKSUM = "file://pigz.c;md5=53f47c097bbf11b937a421b1816a8dc5"
diff --git a/meta/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch b/meta/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch
new file mode 100644
index 000000000..c021bfb96
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit-0.104/0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch
@@ -0,0 +1,70 @@
+From c46d2d13eac240d2a609b2dd8fc617ea18a78bfa Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz@redhat.com>
+Date: Mon, 6 Feb 2012 11:24:53 -0500
+Subject: [PATCH 1/2] PolkitUnixSession: Set error if we cannot find a session for the given pid
+
+Also, don't treat the integer returned by sd_pid_get_session() as a
+boolean because that's just confusing. Also, don't confuse memory
+supposed to be freed by g_free() and free(3) with each other. See
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=787222
+
+for more details.
+
+Signed-off-by: David Zeuthen <davidz@redhat.com>
+---
+
+Upstream-Status: Accepted
+
+ src/polkit/polkitunixsession-systemd.c | 21 ++++++++++++++++-----
+ 1 files changed, 16 insertions(+), 5 deletions(-)
+
+diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
+index e7e913f..94a7ee4 100644
+--- a/src/polkit/polkitunixsession-systemd.c
++++ b/src/polkit/polkitunixsession-systemd.c
+@@ -23,6 +23,7 @@
+ # include "config.h"
+ #endif
+
++#include <stdlib.h>
+ #include <string.h>
+ #include "polkitunixsession.h"
+ #include "polkitsubject.h"
+@@ -450,9 +451,8 @@ polkit_unix_session_initable_init (GInitable *initable,
+ GError **error)
+ {
+ PolkitUnixSession *session = POLKIT_UNIX_SESSION (initable);
+- gboolean ret;
+-
+- ret = FALSE;
++ gboolean ret = FALSE;
++ char *s;
+
+ if (session->session_id != NULL)
+ {
+@@ -461,8 +461,19 @@ polkit_unix_session_initable_init (GInitable *initable,
+ goto out;
+ }
+
+- if (!sd_pid_get_session (session->pid, &session->session_id))
+- ret = TRUE;
++ if (sd_pid_get_session (session->pid, &s) == 0)
++ {
++ session->session_id = g_strdup (s);
++ free (s);
++ ret = TRUE;
++ goto out;
++ }
++
++ g_set_error (error,
++ POLKIT_ERROR,
++ POLKIT_ERROR_FAILED,
++ "No session for pid %d",
++ (gint) session->pid);
+
+ out:
+ return ret;
+--
+1.7.2.5
+
diff --git a/meta/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch b/meta/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch
new file mode 100644
index 000000000..49f8ce2a0
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit-0.104/0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch
@@ -0,0 +1,46 @@
+From 8fb8b406bab50c5ef8c5d4f743e3f13924bd5f73 Mon Sep 17 00:00:00 2001
+From: David Zeuthen <davidz@redhat.com>
+Date: Mon, 6 Feb 2012 11:26:06 -0500
+Subject: [PATCH 2/2] PolkitUnixSession: Actually return TRUE if a session exists
+
+Also, don't treat the integer returned by sd_session_get_uid() as a
+boolean because that's just confusing.
+
+Signed-off-by: David Zeuthen <davidz@redhat.com>
+---
+
+Upstream-Status: Accepted
+
+ src/polkit/polkitunixsession-systemd.c | 12 +++++-------
+ 1 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/polkit/polkitunixsession-systemd.c b/src/polkit/polkitunixsession-systemd.c
+index 94a7ee4..8a8bf65 100644
+--- a/src/polkit/polkitunixsession-systemd.c
++++ b/src/polkit/polkitunixsession-systemd.c
+@@ -361,17 +361,15 @@ polkit_unix_session_to_string (PolkitSubject *subject)
+
+ static gboolean
+ polkit_unix_session_exists_sync (PolkitSubject *subject,
+- GCancellable *cancellable,
+- GError **error)
++ GCancellable *cancellable,
++ GError **error)
+ {
+ PolkitUnixSession *session = POLKIT_UNIX_SESSION (subject);
+- gboolean ret;
++ gboolean ret = FALSE;
+ uid_t uid;
+
+- ret = FALSE;
+-
+- if (!sd_session_get_uid (session->session_id, &uid))
+- ret = FALSE;
++ if (sd_session_get_uid (session->session_id, &uid) == 0)
++ ret = TRUE;
+
+ return ret;
+ }
+--
+1.7.2.5
+
diff --git a/meta/recipes-extended/polkit/polkit-0.104/introspection.patch b/meta/recipes-extended/polkit/polkit-0.104/introspection.patch
new file mode 100644
index 000000000..58c27abbb
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit-0.104/introspection.patch
@@ -0,0 +1,104 @@
+Copied from gobject-introspection/m4/introspection.m4
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-By: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN polkit-0.101-orig/m4/introspection.m4 polkit-0.101/m4/introspection.m4
+--- polkit-0.101-orig/m4/introspection.m4 1970-01-01 08:00:00.000000000 +0800
++++ polkit-0.101/m4/introspection.m4 2010-12-06 11:08:16.000000000 +0800
+@@ -0,0 +1,94 @@
++dnl -*- mode: autoconf -*-
++dnl Copyright 2009 Johan Dahlin
++dnl
++dnl This file is free software; the author(s) gives unlimited
++dnl permission to copy and/or distribute it, with or without
++dnl modifications, as long as this notice is preserved.
++dnl
++
++# serial 1
++
++m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
++[
++ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
++ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
++ AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
++
++ dnl enable/disable introspection
++ m4_if([$2], [require],
++ [dnl
++ enable_introspection=yes
++ ],[dnl
++ AC_ARG_ENABLE(introspection,
++ AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
++ [Enable introspection for this build]),,
++ [enable_introspection=auto])
++ ])dnl
++
++ AC_MSG_CHECKING([for gobject-introspection])
++
++ dnl presence/version checking
++ AS_CASE([$enable_introspection],
++ [no], [dnl
++ found_introspection="no (disabled, use --enable-introspection to enable)"
++ ],dnl
++ [yes],[dnl
++ PKG_CHECK_EXISTS([gobject-introspection-1.0],,
++ AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
++ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
++ found_introspection=yes,
++ AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
++ ],dnl
++ [auto],[dnl
++ PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
++ ],dnl
++ [dnl
++ AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
++ ])dnl
++
++ AC_MSG_RESULT([$found_introspection])
++
++ INTROSPECTION_SCANNER=
++ INTROSPECTION_COMPILER=
++ INTROSPECTION_GENERATE=
++ INTROSPECTION_GIRDIR=
++ INTROSPECTION_TYPELIBDIR=
++ if test "x$found_introspection" = "xyes"; then
++ INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++ INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++ INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
++ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
++ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
++ INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
++ INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++ fi
++ AC_SUBST(INTROSPECTION_SCANNER)
++ AC_SUBST(INTROSPECTION_COMPILER)
++ AC_SUBST(INTROSPECTION_GENERATE)
++ AC_SUBST(INTROSPECTION_GIRDIR)
++ AC_SUBST(INTROSPECTION_TYPELIBDIR)
++ AC_SUBST(INTROSPECTION_CFLAGS)
++ AC_SUBST(INTROSPECTION_LIBS)
++ AC_SUBST(INTROSPECTION_MAKEFILE)
++
++ AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
++])
++
++
++dnl Usage:
++dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
++
++AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
++[
++ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
++])
++
++dnl Usage:
++dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
++
++
++AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
++[
++ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
++])
diff --git a/meta/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch b/meta/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch
new file mode 100644
index 000000000..74647efce
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit-0.104/polkit-1_pam.patch
@@ -0,0 +1,23 @@
+polkit: No system-auth in OE-Core, we can use common-* in place of it.
+
+Upstream-Status:Inappropriate [configuration]
+
+Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
+
+--- a/configure.ac 2011-03-04 02:26:20.000000000 +0800
++++ b/configure.ac.new 2011-07-18 10:14:12.516818852 +0800
+@@ -350,10 +350,10 @@
+ PAM_FILE_INCLUDE_PASSWORD=system
+ PAM_FILE_INCLUDE_SESSION=system
+ else
+- PAM_FILE_INCLUDE_AUTH=system-auth
+- PAM_FILE_INCLUDE_ACCOUNT=system-auth
+- PAM_FILE_INCLUDE_PASSWORD=system-auth
+- PAM_FILE_INCLUDE_SESSION=system-auth
++ PAM_FILE_INCLUDE_AUTH=common-auth
++ PAM_FILE_INCLUDE_ACCOUNT=common-account
++ PAM_FILE_INCLUDE_PASSWORD=common-password
++ PAM_FILE_INCLUDE_SESSION=common-session
+ fi
+
+ AC_SUBST(PAM_FILE_INCLUDE_AUTH)
diff --git a/meta/recipes-extended/polkit/polkit-gnome_0.102.bb b/meta/recipes-extended/polkit/polkit-gnome_0.102.bb
new file mode 100644
index 000000000..bba917cfa
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit-gnome_0.102.bb
@@ -0,0 +1,27 @@
+SUMMARY = "GNOME Authentication Agent for PolicyKit"
+DESCRIPTION = "PolicyKit-gnome provides an Authentication Agent for PolicyKit that integrates well with the GNOME desktop environment"
+HOMEPAGE = "http://www.packagekit.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/"
+DEPENDS = "polkit dbus-glib gconf gtk+"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=74579fab173e4c5e12aac0cd83ee98ec \
+ file://src/main.c;beginline=1;endline=20;md5=aba145d1802f2329ba561e3e48ecb795"
+
+SRC_URI = "http://hal.freedesktop.org/releases/polkit-gnome-${PV}.tar.bz2 \
+ "
+
+PR = "r1"
+
+EXTRA_OECONF = " --disable-scrollkeeper \
+ --disable-man-pages \
+ --disable-examples \
+ --disable-gtk-doc \
+ --disable-introspection "
+
+inherit autotools pkgconfig
+
+FILES_${PN} += " ${datadir}/dbus-1 \
+ ${datadir}/PolicyKit \
+ "
+SRC_URI[md5sum] = "f6b485ffd7bd605af815fd2747180481"
+SRC_URI[sha256sum] = "81caa6972e651e90ef4ac31d7ed41bc79543d46b850dbd5b14b40f8ef7107d11"
diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
new file mode 100644
index 000000000..6a8fdd690
--- /dev/null
+++ b/meta/recipes-extended/polkit/polkit_0.104.bb
@@ -0,0 +1,40 @@
+SUMMARY = "PolicyKit Authorization Framework"
+DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes."
+HOMEPAGE = "http://code.google.com/p/polkit/"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
+ file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
+ file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
+
+DEPENDS = "expat dbus-glib eggdbus intltool-native"
+
+PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
+
+PR = "r5"
+
+PAM_SRC_URI = "file://polkit-1_pam.patch"
+SRC_URI = "http://hal.freedesktop.org/releases/polkit-${PV}.tar.gz \
+ file://introspection.patch \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://0001-PolkitUnixSession-Set-error-if-we-cannot-find-a-sess.patch \
+ file://0002-PolkitUnixSession-Actually-return-TRUE-if-a-session-.patch \
+ "
+
+SRC_URI[md5sum] = "e380b4c6fb1e7bccf854e92edc0a8ce1"
+SRC_URI[sha256sum] = "6b0a13d8381e4a7b7e37c18a54595191b50757e0fcd186cd9918e9ad0f18c7f9"
+
+EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-gtk-doc --disable-introspection"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+ rm -f ${D}${libdir}/${PN}-1/extensions/*.a
+}
+
+FILES_${PN} += "${libdir}/${PN}-1/extensions/*.so \
+ ${datadir}/${PN}-1/actions/* \
+ ${datadir}/dbus-1/system-services/*"
+FILES_${PN}-dbg += "${libdir}/${PN}-1/extensions/.debug/*.so"
+FILES_${PN}-dev += "${libdir}/${PN}-1/extensions/*.la "
+
diff --git a/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
new file mode 100644
index 000000000..2582857e2
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Inappropriate [not author, no upstream]
+
+Imported from Debian.
+Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50
+Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749
+
+Stops procps utilities from printing a warning when used with
+kernels having only two digit versions, e.g. 3.0.
+
+Author: <csmall@debian.org>
+Description: Rework version parsing so its ok with other OSes
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -35,15 +35,23 @@
+
+ static void init_Linux_version(void) __attribute__((constructor));
+ static void init_Linux_version(void) {
+- static struct utsname uts;
+- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
++ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
++ FILE *fp;
++ char buf[256];
+
+- if (uname(&uts) == -1) /* failure implies impending death */
+- exit(1);
+- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
++ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++ exit(1);
++ if (fgets(buf, 256, fp) == NULL) {
++ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
++ fclose(fp);
++ exit(1);
++ }
++ fclose(fp);
++ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
+ fprintf(stderr, /* *very* unlikely to happen by accident */
+ "Non-standard uts for running kernel:\n"
+- "release %s=%d.%d.%d gives version code %d\n",
+- uts.release, x, y, z, LINUX_VERSION(x,y,z));
++ "release %s=%d.%d.%d gives version code %d\n",
++ buf,
++ x, y, z, LINUX_VERSION(x,y,z));
+ linux_version_code = LINUX_VERSION(x, y, z);
+ }
diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch
new file mode 100644
index 000000000..2a59a5ff6
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/install.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Inappropriate [configuration]
+
+diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile
+--- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800
++++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800
+@@ -29,9 +29,6 @@
+ 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)
+-
+ usr/bin := $(DESTDIR)/usr/bin/
+ bin := $(DESTDIR)/bin/
+ sbin := $(DESTDIR)/sbin/
+@@ -39,8 +36,8 @@
+ man1 := $(DESTDIR)/usr/share/man/man1/
+ man5 := $(DESTDIR)/usr/share/man/man5/
+ man8 := $(DESTDIR)/usr/share/man/man8/
+-lib := $(DESTDIR)/$(lib64)/
+-usr/lib := $(DESTDIR)/usr/$(lib64)/
++lib := $(DESTDIR)/$(base_libdir)/
++usr/lib := $(DESTDIR)/$(libdir)/
+ usr/include := $(DESTDIR)/usr/include/
+
+ #SKIP := $(bin)kill $(man1)kill.1
+@@ -222,10 +219,10 @@
+ ###### install
+
+ $(BINFILES) : all
+- $(install) --mode a=rx $(notdir $@) $@
++ $(install) -m 555 $(notdir $@) $@
+
+ $(MANFILES) : all
+- $(install) --mode a=r $(notdir $@) $@
++ $(install) -m 444 $(notdir $@) $@
+
+ install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
+ cd $(usr/bin) && $(ln_f) skill snice
diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
new file mode 100644
index 000000000..2ca972482
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+diff --git a/pwdx.c b/pwdx.c
+index cb96a52..29ebce2 100644
+--- a/pwdx.c
++++ b/pwdx.c
+@@ -13,7 +13,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <regex.h>
+-#include <limits.h>
++#include <linux/limits.h>
+ #include <unistd.h>
+ #include <errno.h>
+
diff --git a/meta/recipes-extended/procps/procps-3.2.8/pagesz-not-constant.patch b/meta/recipes-extended/procps/procps-3.2.8/pagesz-not-constant.patch
new file mode 100644
index 000000000..b1418518b
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/pagesz-not-constant.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+Index: procps-3.2.1/proc/devname.c
+===================================================================
+--- procps-3.2.1.orig/proc/devname.c 2004-03-18 05:43:50.000000000 +1100
++++ procps-3.2.1/proc/devname.c 2005-04-02 10:40:17.462138000 +1000
+@@ -227,7 +227,7 @@
+
+ /* number --> name */
+ unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags) {
+- static char buf[PAGE_SIZE];
++ static char buf[4096];
+ char *restrict tmp = buf;
+ unsigned dev = dev_t_dev;
+ unsigned i = 0;
+@@ -249,7 +249,7 @@
+ if((flags&ABBREV_TTY) && !strncmp(tmp,"tty", 3) && tmp[3]) tmp += 3;
+ if((flags&ABBREV_PTS) && !strncmp(tmp,"pts/", 4) && tmp[4]) tmp += 4;
+ /* gotta check before we chop or we may chop someone else's memory */
+- if(chop + (unsigned long)(tmp-buf) <= sizeof buf)
++ if(chop + (unsigned long)(tmp-buf) < sizeof buf)
+ tmp[chop] = '\0';
+ /* replace non-ASCII characters with '?' and return the number of chars */
+ for(;;){
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
new file mode 100644
index 000000000..2a65c3509
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Pending
+
+*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005
+--- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005
+***************
+*** 96,102 ****
+ #################### install rules ###########################
+
+ $(lib)$(SOFILE) : proc/$(SONAME)
+! $(install) --mode a=rx $< $@
+
+ ifneq ($(SOLINK),$(SOFILE))
+ .PHONY: $(lib)$(SOLINK)
+--- 96,102 ----
+ #################### install rules ###########################
+
+ $(lib)$(SOFILE) : proc/$(SONAME)
+! $(install) -m 555 $< $@
+
+ ifneq ($(SOLINK),$(SOFILE))
+ .PHONY: $(lib)$(SOLINK)
+***************
+*** 115,121 ****
+ $(ldconfig)
+
+ $(usr/lib)$(ANAME) : proc/$(ANAME)
+! $(install) --mode a=r $< $@
+
+ # Junk anyway... supposed to go in /usr/include/$(NAME)
+ #INSTALL += $(addprefix $(include),$(HDRFILES))
+--- 115,121 ----
+ $(ldconfig)
+
+ $(usr/lib)$(ANAME) : proc/$(ANAME)
+! $(install) -m 444 $< $@
+
+ # Junk anyway... supposed to go in /usr/include/$(NAME)
+ #INSTALL += $(addprefix $(include),$(HDRFILES))
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
new file mode 100644
index 000000000..c8cee26ea
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Backport
+
+Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla:
+http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1
+
+Index: procps-3.2.8/Makefile
+===================================================================
+--- procps-3.2.8.orig/Makefile
++++ procps-3.2.8/Makefile
+@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
+ # want this rule first, use := on ALL, and ALL not filled in yet
+ all: do_all
+
+--include */module.mk
++-include proc/module.mk
++-include ps/module.mk
+
+ do_all: $(ALL)
+
diff --git a/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
new file mode 100644
index 000000000..0775eaba2
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005
+--- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005
+***************
+*** 33,40 ****
+
+
+ $(bin)ps: ps/ps
+! $(install) --mode a=rx $< $@
+
+ $(man1)ps.1 : ps/ps.1
+! $(install) --mode a=r $< $@
+ -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
+--- 33,40 ----
+
+
+ $(bin)ps: ps/ps
+! $(install) -m 555 $< $@
+
+ $(man1)ps.1 : ps/ps.1
+! $(install) -m 444 $< $@
+ -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
new file mode 100644
index 000000000..34e7488bf
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
@@ -0,0 +1,64 @@
+# This configuration file is taken from Debian.
+#
+# /etc/sysctl.conf - Configuration file for setting system variables
+# See sysctl.conf (5) for information.
+#
+
+#kernel.domainname = example.com
+
+# Uncomment the following to stop low-level messages on console
+#kernel.printk = 4 4 1 7
+
+##############################################################3
+# Functions previously found in netbase
+#
+
+# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
+# Turn on Source Address Verification in all interfaces to
+# prevent some spoofing attacks
+net.ipv4.conf.default.rp_filter=1
+net.ipv4.conf.all.rp_filter=1
+
+# Uncomment the next line to enable TCP/IP SYN cookies
+#net.ipv4.tcp_syncookies=1
+
+# Uncomment the next line to enable packet forwarding for IPv4
+#net.ipv4.ip_forward=1
+
+# Uncomment the next line to enable packet forwarding for IPv6
+#net.ipv6.conf.all.forwarding=1
+
+
+###################################################################
+# Additional settings - these settings can improve the network
+# security of the host and prevent against some network attacks
+# including spoofing attacks and man in the middle attacks through
+# redirection. Some network environments, however, require that these
+# settings are disabled so review and enable them as needed.
+#
+# Ignore ICMP broadcasts
+#net.ipv4.icmp_echo_ignore_broadcasts = 1
+#
+# Ignore bogus ICMP errors
+#net.ipv4.icmp_ignore_bogus_error_responses = 1
+#
+# Do not accept ICMP redirects (prevent MITM attacks)
+#net.ipv4.conf.all.accept_redirects = 0
+#net.ipv6.conf.all.accept_redirects = 0
+# _or_
+# Accept ICMP redirects only for gateways listed in our default
+# gateway list (enabled by default)
+# net.ipv4.conf.all.secure_redirects = 1
+#
+# Do not send ICMP redirects (we are not a router)
+#net.ipv4.conf.all.send_redirects = 0
+#
+# Do not accept IP source route packets (we are not a router)
+#net.ipv4.conf.all.accept_source_route = 0
+#net.ipv6.conf.all.accept_source_route = 0
+#
+# Log Martian Packets
+#net.ipv4.conf.all.log_martians = 1
+#
+
+#kernel.shmmax = 141762560
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc
new file mode 100644
index 000000000..ada325762
--- /dev/null
+++ b/meta/recipes-extended/procps/procps.inc
@@ -0,0 +1,18 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "http://procps.sf.net"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+ file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \
+ file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
+ file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812"
+DEPENDS = "ncurses"
+
+FILES_${PN} += "${base_libdir}/libproc-*.so"
+
+SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
+ file://install.patch"
+
+inherit autotools
diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
new file mode 100644
index 000000000..dfae0b8f2
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.2.8.bb
@@ -0,0 +1,35 @@
+require procps.inc
+
+PR = "r7"
+
+inherit update-alternatives
+
+ALTERNATIVE_LINKS = "${bindir}/top ${bindir}/uptime ${bindir}/free ${bindir}/pkill ${bindir}/pmap \
+ ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps \
+ ${bindir}/pgrep ${bindir}/pwdx ${bindir}/watch"
+ALTERNATIVE_PRIORITY = "110"
+
+SRC_URI += "file://procmodule.patch \
+ file://psmodule.patch \
+ file://linux-limits.patch \
+ file://sysctl.conf \
+ file://procps-3.2.8+gmake-3.82.patch \
+ file://gnu-kbsd-version.patch \
+ "
+
+SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"
+SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535"
+
+EXTRA_OEMAKE = "CFLAGS=-I${STAGING_INCDIR} \
+ CPPFLAGS=-I${STAGING_INCDIR} \
+ LDFLAGS="${LDFLAGS}" \
+ CURSES=-lncurses \
+ install='install -D' \
+ ldconfig=echo"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
diff --git a/meta/recipes-extended/psmisc/psmisc.inc b/meta/recipes-extended/psmisc/psmisc.inc
new file mode 100644
index 000000000..4e9aad862
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc.inc
@@ -0,0 +1,58 @@
+SUMMARY = "Utilities for managing processes on your system"
+DESCRIPTION = "The psmisc package contains utilities for managing processes on your \
+system: pstree, killall and fuser. The pstree command displays a tree \
+structure of all of the running processes on your system. The killall \
+command sends a specified signal (SIGTERM if nothing is specified) to \
+processes identified by name. The fuser command identifies the PIDs \
+of processes that are using specified files or filesystems."
+SECTION = "base"
+DEPENDS = "ncurses virtual/libintl"
+LICENSE = "GPLv2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz"
+
+S = "${WORKDIR}/psmisc-${PV}"
+
+inherit autotools gettext
+
+ALLOW_EMPTY = "1"
+
+PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc"
+PACKAGES += "psmisc-extras"
+
+FILES_${PN} = ""
+RDEPENDS_${PN} = "fuser killall pstree"
+
+FILES_fuser = "${bindir}/fuser.${PN}"
+FILES_fuser-doc = "${mandir}/man1/fuser*"
+
+FILES_killall = "${bindir}/killall.${PN}"
+FILES_killall-doc = "${mandir}/man1/killall*"
+
+FILES_pstree = "${bindir}/pstree"
+FILES_pstree-doc = "${mandir}/man1/pstree*"
+
+FILES_psmisc-extras = "${bindir}"
+FILES_psmisc-extras-doc = "${mandir}"
+
+do_install_append() {
+ mv ${D}${bindir}/killall ${D}${bindir}/killall.${PN}
+ mv ${D}${bindir}/fuser ${D}${bindir}/fuser.${PN}
+}
+
+pkg_postinst_killall() {
+ update-alternatives --install ${bindir}/killall killall killall.${PN} 90
+}
+
+pkg_postrm_killall() {
+ update-alternatives --remove ${bindir}/killall killall.${PN}
+}
+
+pkg_postinst_fuser() {
+ update-alternatives --install ${bindir}/fuser fuser fuser.${PN} 90
+}
+
+pkg_postrm_fuser() {
+ update-alternatives --remove ${bindir}/fuser fuser.${PN}
+}
+
diff --git a/meta/recipes-extended/psmisc/psmisc_22.16.bb b/meta/recipes-extended/psmisc/psmisc_22.16.bb
new file mode 100644
index 000000000..ada46d974
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc_22.16.bb
@@ -0,0 +1,7 @@
+require psmisc.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+PR = "r1"
+
+SRC_URI[md5sum] = "d52caf26159c905574c2ce4bd792b9ee"
+SRC_URI[sha256sum] = "ae426d7238e5353fdf51b1d313897c2bbed0023e66e5b4af2be9cd03d87a9d01"
diff --git a/meta/recipes-extended/quota/quota_4.00.bb b/meta/recipes-extended/quota/quota_4.00.bb
new file mode 100644
index 000000000..5fef9cb2b
--- /dev/null
+++ b/meta/recipes-extended/quota/quota_4.00.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "display disk usage and limits"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
+ file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+ file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "975f587ff761a60ac25dbe6c00865925"
+SRC_URI[sha256sum] = "eb2b045f58b98299edc568b8607b95b10735b4a131fa5196f41c89b51fb409ba"
+
+S = "${WORKDIR}/quota-tools"
+
+inherit autotools
+
+EXTRA_OEMAKE += 'STRIP=""'
+
+do_install() {
+ oe_runmake prefix=${D}${prefix} install
+}
diff --git a/meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch b/meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch
new file mode 100644
index 000000000..590b34440
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch
@@ -0,0 +1,16 @@
+This fixes the hardcoded HOST path
+
+Signed-off-by: Saul Wold <saul.wold@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+
+--- rpcbind-0.2.0/src/Makefile.am 2010-09-02 11:47:16.725763886 -0700
++++ rpcbind-0.2.0_fixed/src/Makefile.am 2010-09-02 11:47:36.077763138 -0700
+@@ -29,6 +29,6 @@
+
+ rpcbind_LDFLAGS = -lpthread -ltirpc
+ rpcbind_LDADD = $(LIB_TIRPC)
+-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
++AM_CPPFLAGS = -I=/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
+ -DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
new file mode 100644
index 000000000..62f666734
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Universal Addresses to RPC Program Number Mapper"
+DESCRIPTION = "The rpcbind utility is a server that converts RPC \
+ program numbers into universal addresses."
+SECTION = "console/network"
+HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
+DEPENDS = "libtirpc quota"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
+ file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
+ file://fix_host_path.patch \
+ "
+
+SRC_URI[md5sum] = "1a77ddb1aaea8099ab19c351eeb26316"
+SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3"
+
+PR = "r2"
+
+inherit autotools
diff --git a/meta/recipes-extended/sat-solver/sat-solver/0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch b/meta/recipes-extended/sat-solver/sat-solver/0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch
new file mode 100644
index 000000000..402d16ec5
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch
@@ -0,0 +1,57 @@
+From bbbb4fb9b7c85fde90608710dff09480696c6567 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 9 Feb 2012 16:01:56 -0800
+Subject: [PATCH] sat_xfopen.c: Forward port to zlib 1.2.6 gzFile
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ ext/sat_xfopen.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ext/sat_xfopen.c b/ext/sat_xfopen.c
+index cf943cf..b3d458d 100644
+--- a/ext/sat_xfopen.c
++++ b/ext/sat_xfopen.c
+@@ -16,16 +16,16 @@
+
+ static ssize_t cookie_gzread(void *cookie, char *buf, size_t nbytes)
+ {
+- return gzread((gzFile *)cookie, buf, nbytes);
++ return gzread((gzFile)cookie, buf, nbytes);
+ }
+
+ static int
+ cookie_gzclose(void *cookie)
+ {
+- return gzclose((gzFile *)cookie);
++ return gzclose((gzFile)cookie);
+ }
+
+-static FILE *mygzfopen(gzFile* gzf)
++static FILE *mygzfopen(gzFile gzf)
+ {
+ #ifdef HAVE_FUNOPEN
+ return funopen(
+@@ -49,7 +49,7 @@ FILE *
+ sat_xfopen(const char *fn, const char *mode)
+ {
+ char *suf;
+- gzFile *gzf;
++ gzFile gzf;
+
+ if (!fn)
+ return 0;
+@@ -68,7 +68,7 @@ FILE *
+ sat_xfopen_fd(const char *fn, int fd, const char *mode)
+ {
+ char *suf;
+- gzFile *gzf;
++ gzFile gzf;
+
+ suf = fn ? strrchr(fn, '.') : 0;
+ if (!mode)
+--
+1.7.5.4
+
diff --git a/meta/recipes-extended/sat-solver/sat-solver/cmake.patch b/meta/recipes-extended/sat-solver/sat-solver/cmake.patch
new file mode 100644
index 000000000..c1ec86ad6
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/cmake.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [configuration]
+
+Enable debugging for all builds
+not building docs (need oxygen)
+
+8/19/2010 - created by Qing He <qing.he@intel.com>
+1/24/2011 - Disable Fedora/Debian checking/settings by Mark Hatle <mark.hatle@windriver.com>
+3/15/2011 - Updated to newer version of sat-solver by Mark Hatle <mark.hatle@windriver.com>
+3/16/2011 - Split original patch and simplify by Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig2/CMakeLists.txt git/CMakeLists.txt
+--- git.orig2/CMakeLists.txt 2011-03-16 16:29:43.532032285 -0500
++++ git/CMakeLists.txt 2011-03-16 16:32:59.982034501 -0500
+@@ -177,7 +177,7 @@
+
+ MESSAGE(STATUS "Looking modules in ${CMAKE_MODULE_PATH}")
+
+-set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall" )
++set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -g" )
+ set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -g -O3" )
+ set ( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0" )
+
+@@ -186,7 +186,7 @@
+ ADD_SUBDIRECTORY(tools)
+ ADD_SUBDIRECTORY(tests)
+ ADD_SUBDIRECTORY(examples)
+-ADD_SUBDIRECTORY(doc)
++#ADD_SUBDIRECTORY(doc)
+
+ MESSAGE(STATUS "version: ${VERSION}")
+
diff --git a/meta/recipes-extended/sat-solver/sat-solver/db5.patch b/meta/recipes-extended/sat-solver/sat-solver/db5.patch
new file mode 100644
index 000000000..6b679126d
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/db5.patch
@@ -0,0 +1,26 @@
+Upstream-Status: Pending
+
+RPM no longer includes an internal version of db, it now relies on the system
+version. The system version in Poky is available at /usr/include/db51
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+rebased to sat-solver commit 9e1f2a097965debebc69cebf8ed73c6ff31a5220
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+--- git/ext/repo_rpmdb.c.orig 2011-01-06 10:46:37.369900542 -0600
++++ git/ext/repo_rpmdb.c 2011-01-06 10:48:35.482919434 -0600
+@@ -29,11 +29,7 @@
+ #include <rpm/rpmdb.h>
+
+ #ifndef DB_CREATE
+-# ifdef FEDORA
+-# include <db.h>
+-# else
+-# include <rpm/db.h>
+-# endif
++# include <db.h>
+ #endif
+
+ #include "pool.h"
diff --git a/meta/recipes-extended/sat-solver/sat-solver/fix_gcc-4.6.0_compile_issue.patch b/meta/recipes-extended/sat-solver/sat-solver/fix_gcc-4.6.0_compile_issue.patch
new file mode 100644
index 000000000..0a5506909
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/fix_gcc-4.6.0_compile_issue.patch
@@ -0,0 +1,115 @@
+Upstream-Status: Pending
+
+Fix the following compilation issues with gcc 4.6.0
+
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_updateinfoxml.c: In function 'startElement':
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_updateinfoxml.c:278:25: error: variable 'status' set but not used [-Werror=unused-but-set-variable]
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_updateinfoxml.c:386:36: error: variable 'src' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+|
+| make[2]: *** [ext/CMakeFiles/satsolverext.dir/repo_updateinfoxml.o] Error 1
+| make[2]: *** Waiting for unfinished jobs....
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/src/transaction.c: In function 'transaction_add_obsoleted':
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/src/transaction.c:1933:21: error: variable 'oldcount' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+|
+| make[2]: *** [src/CMakeFiles/satsolver.dir/transaction.o] Error 1
+| make[2]: Leaving directory `/build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git'
+| make[1]: *** [src/CMakeFiles/satsolver.dir/all] Error 2
+| make[1]: *** Waiting for unfinished jobs....
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c: In function 'rpm_byfp':
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c:2406:20: error: variable 'headerend' set but not used [-Werror=unused-but-set-variable]
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c: In function 'parsekeydata':
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c:2833:29: error: variable 'scr' set but not used [-Werror=unused-but-set-variable]
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c:2669:7: error: variable 'useridl' set but not used [-Werror=unused-but-set-variable]
+| /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git/ext/repo_rpmdb.c:2667:7: error: variable 'pubkeyl' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+|
+| make[2]: *** [ext/CMakeFiles/satsolverext.dir/repo_rpmdb.o] Error 1
+| make[2]: Leaving directory `/build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git'
+| make[1]: *** [ext/CMakeFiles/satsolverext.dir/all] Error 2
+| make[1]: Leaving directory `/build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/git'
+| make: *** [all] Error 2
+| FATAL: oe_runmake failed
+| ERROR: Function 'do_compile' failed (see /build_disk/poky_build/build_gcc_4.6.0/tmp/work/qemux86-poky-linux/sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9/temp/log.do_compile.21830 for further information)
+NOTE: package sat-solver-0.0-git1+0a7378d5f482f477a01cf1690d76871ab8bdcc32-r9: task do_compile: Failed
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/05
+
+Index: git/src/transaction.c
+===================================================================
+--- git.orig/src/transaction.c
++++ git/src/transaction.c
+@@ -1930,7 +1930,7 @@ transaction_add_obsoleted(Transaction *t
+ Repo *installed = pool->installed;
+ Id p;
+ Solvable *s;
+- int i, j, k, max, oldcount;
++ int i, j, k, max;
+ Map done;
+ Queue obsq, *steps;
+
+@@ -1945,7 +1945,6 @@ transaction_add_obsoleted(Transaction *t
+ return;
+ /* make room */
+ steps = &trans->steps;
+- oldcount = steps->count;
+ queue_insertn(steps, 0, max);
+
+ /* now add em */
+Index: git/ext/repo_updateinfoxml.c
+===================================================================
+--- git.orig/ext/repo_updateinfoxml.c
++++ git/ext/repo_updateinfoxml.c
+@@ -275,7 +275,7 @@ startElement(void *userData, const char
+ */
+ case STATE_UPDATE:
+ {
+- const char *from = 0, *status = 0, *type = 0, *version = 0;
++ const char *from = 0, __attribute__((__unused__)) *status = 0, *type = 0, *version = 0;
+ for (; *atts; atts += 2)
+ {
+ if (!strcmp(*atts, "from"))
+@@ -383,7 +383,7 @@ startElement(void *userData, const char
+ */
+ case STATE_PACKAGE:
+ {
+- const char *arch = 0, *name = 0, *src = 0;
++ const char *arch = 0, *name = 0, __attribute__((__unused__)) *src = 0;
+ Id evr = makeevr_atts(pool, pd, atts); /* parse "epoch", "version", "release" */
+ Id n, a = 0;
+ Id rel_id;
+Index: git/ext/repo_rpmdb.c
+===================================================================
+--- git.orig/ext/repo_rpmdb.c
++++ git/ext/repo_rpmdb.c
+@@ -2403,7 +2403,7 @@ void *
+ rpm_byfp(FILE *fp, const char *name, void **statep)
+ {
+ struct rpm_by_state *state = *statep;
+- int headerstart, headerend;
++ int headerstart, __attribute__((__unused__))headerend;
+ RpmHead *rpmhead;
+ int sigdsize, sigcnt, l;
+ unsigned char lead[4096];
+@@ -2664,9 +2664,9 @@ parsekeydata(Solvable *s, Repodata *data
+ unsigned char keyid[8];
+ unsigned int kcr = 0, maxex = 0;
+ unsigned char *pubkey = 0;
+- int pubkeyl = 0;
++ int __attribute__((__unused__)) pubkeyl = 0;
+ unsigned char *userid = 0;
+- int useridl = 0;
++ int __attribute__((__unused__)) useridl = 0;
+
+ for (; pl; p += l, pl -= l)
+ {
+@@ -2830,7 +2830,7 @@ parsekeydata(Solvable *s, Repodata *data
+ {
+ int j, ql, haveissuer;
+ unsigned char *q;
+- unsigned int ex = 0, scr = 0;
++ unsigned int ex = 0, __attribute__((__unused__))scr = 0;
+ unsigned char issuer[8];
+
+ // printf("V4 signature packet\n");
diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
new file mode 100644
index 000000000..11bf5b018
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_core.patch
@@ -0,0 +1,127 @@
+Upstream-Status: Inappropriate [distribution]
+
+Fix "arch" integration with Poky.
+
+Add a missing "any" architecture type and update the semantics to use it.
+
+Disable the built-in archpolicies structure, and replace it with one
+we generate in the recipe.
+
+Also add poky semantics option in CMake.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 443281e..4456a87 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,6 +45,11 @@ MESSAGE(STATUS "Building for Debian")
+ ADD_DEFINITIONS( -DDEBIAN -DDEBIAN_SEMANTICS)
+ ENDIF ( DEBIAN )
+
++IF ( OE_CORE )
++MESSAGE(STATUS "Building for OE core")
++ADD_DEFINITIONS( -DOE_CORE -DOE_CORE_SEMANTICS)
++ENDIF ( OE_CORE )
++
+ IF ( MULTI_SEMANTICS )
+ MESSAGE(STATUS "Enabling multi dist support")
+ ADD_DEFINITIONS( -DMULTI_SEMANTICS)
+diff --git a/src/knownid.h b/src/knownid.h
+index 7757ae0..4b8bee7 100644
+--- a/src/knownid.h
++++ b/src/knownid.h
+@@ -57,6 +57,7 @@ KNOWNID(SYSTEM_SYSTEM, "system:system"),
+ KNOWNID(ARCH_SRC, "src"),
+ KNOWNID(ARCH_NOSRC, "nosrc"),
+ KNOWNID(ARCH_NOARCH, "noarch"),
++KNOWNID(ARCH_ANY, "any"),
+ KNOWNID(ARCH_ALL, "all"),
+
+ KNOWNID(REPOSITORY_SOLVABLES, "repository:solvables"),
+diff --git a/src/policy.c b/src/policy.c
+index 55c8677..3356ff8 100644
+--- a/src/policy.c
++++ b/src/policy.c
+@@ -486,6 +486,13 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2)
+ }
+
+ /* we allow changes to/from noarch */
++#ifdef OE_CORE_SEMANTICS
++ if (a1 == a2 ||
++ a1 == ARCH_NOARCH || a2 == ARCH_NOARCH ||
++ a1 == ARCH_ANY || a2 == ARCH_ANY ||
++ a1 == ARCH_ALL || a2 == ARCH_ALL)
++ return 0;
++#else
+ #ifndef DEBIAN_SEMANTICS
+ if (a1 == a2 || a1 == ARCH_NOARCH || a2 == ARCH_NOARCH)
+ return 0;
+@@ -493,6 +500,7 @@ policy_illegal_archchange(Solver *solv, Solvable *s1, Solvable *s2)
+ if (a1 == a2 || a1 == ARCH_ALL || a2 == ARCH_ALL)
+ return 0;
+ #endif
++#endif
+ if (!pool->id2arch)
+ return 0;
+ a1 = a1 <= pool->lastarch ? pool->id2arch[a1] : 0;
+diff --git a/src/poolarch.c b/src/poolarch.c
+index 34a14a3..2d7cd70 100644
+--- a/src/poolarch.c
++++ b/src/poolarch.c
+@@ -20,38 +20,8 @@
+ #include "poolarch.h"
+ #include "util.h"
+
+-const char *archpolicies[] = {
+- "x86_64", "x86_64:i686:i586:i486:i386",
+- "i686", "i686:i586:i486:i386",
+- "i586", "i586:i486:i386",
+- "i486", "i486:i386",
+- "i386", "i386",
+- "s390x", "s390x:s390",
+- "s390", "s390",
+- "ia64", "ia64:i686:i586:i486:i386",
+- "ppc64", "ppc64:ppc",
+- "ppc", "ppc",
+- "armv7nhl", "armv7nhl:armv7hl",
+- "armv7hl", "armv7hl",
+- "armv7l", "armv7l:armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
+- "armv6l", "armv6l:armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
+- "armv5tejl", "armv5tejl:armv5tel:armv5l:armv4tl:armv4l:armv3l",
+- "armv5tel", "armv5tel:armv5l:armv4tl:armv4l:armv3l",
+- "armv5l", "armv5l:armv4tl:armv4l:armv3l",
+- "armv4tl", "armv4tl:armv4l:armv3l",
+- "armv4l", "armv4l:armv3l",
+- "armv3l", "armv3l",
+- "sh3", "sh3",
+- "sh4", "sh4",
+- "sh4a", "sh4a:sh4",
+- "sparc64v", "sparc64v:sparc64:sparcv9v:sparcv9:sparcv8:sparc",
+- "sparc64", "sparc64:sparcv9:sparcv8:sparc",
+- "sparcv9v", "sparcv9v:sparcv9:sparcv8:sparc",
+- "sparcv9", "sparcv9:sparcv8:sparc",
+- "sparcv8", "sparcv8:sparc",
+- "sparc", "sparc",
+- 0
+-};
++/* Provide the const char *archpolicies structure */
++#include "core-arch.h"
+
+ void
+ pool_setarch(Pool *pool, const char *arch)
+@@ -71,10 +41,10 @@ pool_setarch(Pool *pool, const char *arch)
+ pool->lastarch = 0;
+ return;
+ }
+-#ifndef DEBIAN_SEMANTICS
+- id = ARCH_NOARCH;
+-#else
++#if defined(DEBIAN_SEMANTICS) || defined(OE_CORE_SEMANTICS)
+ id = ARCH_ALL;
++#else
++ id = ARCH_NOARCH;
+ #endif
+ lastarch = id + 255;
+ id2arch = sat_calloc(lastarch + 1, sizeof(Id));
diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch
new file mode 100644
index 000000000..60483e951
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_obsolete.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Pending
+
+Fix obsolete settings with RPM5.
+
+The following patch is from Michael Schroeder <mls@suse.de>
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/src/pool.c git/src/pool.c
+--- git.orig/src/pool.c 2011-03-25 15:49:34.885834194 -0500
++++ git/src/pool.c 2011-03-28 10:55:13.138786524 -0500
+@@ -70,6 +70,10 @@
+ pool->disttype = DISTTYPE_DEB;
+ # endif
+ #endif
++#ifdef RPM5
++ pool->obsoleteusesprovides = 1;
++ pool->implicitobsoleteusesprovides = 1;
++#endif
+ return pool;
+ }
+
diff --git a/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch
new file mode 100644
index 000000000..d59c5136e
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/sat-solver_rpm5.patch
@@ -0,0 +1,69 @@
+Upstream-Status: Pending
+
+Add RPM5 configuration support
+
+Update the cmake configuration to detect additional files needed by RPM5.
+
+Original work by Qing He <qing.he@intel.com>.
+
+Merged and updated to make this more likely to be accepted upstream.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur git.orig/CMakeLists.txt git/CMakeLists.txt
+--- git.orig/CMakeLists.txt 2011-03-16 16:16:29.152786178 -0500
++++ git/CMakeLists.txt 2011-03-16 16:29:43.532032285 -0500
+@@ -50,7 +50,16 @@
+ ADD_DEFINITIONS( -DMULTI_SEMANTICS)
+ ENDIF ( MULTI_SEMANTICS )
+
+-IF ( NOT DEBIAN )
++if ( RPM5 )
++MESSAGE(STATUS "Enabling RPM 5 support")
++ADD_DEFINITIONS( -DRPM5)
++
++FIND_PACKAGE(PkgConfig REQUIRED)
++PKG_CHECK_MODULES(RPM REQUIRED rpm)
++INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
++ENDIF ( RPM5 )
++
++IF ( RPM5 OR NOT DEBIAN )
+ FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
+ IF ( NOT RPMDB_LIBRARY )
+ FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
+@@ -59,13 +68,17 @@
+ IF ( RPMIO_LIBRARY )
+ SET( RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY} )
+ ENDIF ( RPMIO_LIBRARY )
+-IF ( FEDORA )
++FIND_LIBRARY(RPMMISC_LIBRARY NAMES rpmmisc)
++IF ( RPMMISC_LIBRARY )
++SET ( RPMDB_LIBRARY ${RPMMISC_LIBRARY} ${RPMDB_LIBRARY} )
++ENDIF ( RPMMISC_LIBRARY )
++IF ( RPM5 OR FEDORA )
+ FIND_LIBRARY(DB_LIBRARY NAMES db)
+ IF ( DB_LIBRARY )
+ SET( RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY} )
+ ENDIF ( DB_LIBRARY )
+-ENDIF ( FEDORA )
+-ENDIF ( NOT DEBIAN )
++ENDIF ( RPM5 OR FEDORA )
++ENDIF ( RPM5 OR NOT DEBIAN )
+
+ INCLUDE ( CheckFunctionExists )
+ INCLUDE ( TestBigEndian )
+diff -ur git.orig/ext/repo_rpmdb.c git/ext/repo_rpmdb.c
+--- git.orig/ext/repo_rpmdb.c 2011-03-16 18:03:55.401907738 -0500
++++ git/ext/repo_rpmdb.c 2011-03-16 18:04:47.472989651 -0500
+@@ -3039,7 +3039,11 @@
+ repodata_set_str(data, s - s->repo->pool->solvables, PUBKEY_KEYID, keyid);
+ if (dig->pubkey.userid)
+ setutf8string(data, s - s->repo->pool->solvables, SOLVABLE_SUMMARY, dig->pubkey.userid);
++#ifndef RPM5
+ (void)pgpFreeDig(dig);
++#else
++ (void)pgpDigFree(dig);
++#endif
+ sat_free((void *)pkts);
+ return 1;
+ }
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
new file mode 100644
index 000000000..9d8422fef
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "Sat Solver"
+HOMEPAGE = "http://http://en.opensuse.org/openSUSE:Libzypp_satsolver"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "libcheck rpm zlib expat db"
+
+SRCREV = "0a7378d5f482f477a01cf1690d76871ab8bdcc32"
+PV = "0.0-git${SRCPV}"
+PR = "r13"
+
+PARALLEL_MAKE=""
+
+SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \
+ file://sat-solver_rpm5.patch \
+ file://sat-solver_obsolete.patch \
+ file://cmake.patch \
+ file://db5.patch \
+ file://sat-solver_core.patch \
+ file://fix_gcc-4.6.0_compile_issue.patch \
+ file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \
+ "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
+
+EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
+
+inherit cmake pkgconfig
+
+RDEPENDS_${PN} = "rpm-libs"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_archgen () {
+ # We need to dynamically generate our arch file based on the machine
+ # configuration
+
+ INSTALL_PLATFORM_ARCHS=""
+ for each_arch in ${PACKAGE_ARCHS} ; do
+ case "$each_arch" in
+ all | any | noarch)
+ continue;;
+ esac
+ INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS"
+ done
+
+ echo "/* Automatically generated by the sat-solver recipe */" > src/core-arch.h
+ echo "const char *archpolicies[] = {" >> src/core-arch.h
+
+ set -- $INSTALL_PLATFORM_ARCHS
+
+ save_IFS=$IFS
+ IFS=:
+ while [ $# -gt 0 ]; do echo " \"$1\", "\""$*"\", >> src/core-arch.h ; shift; done
+ IFS=$save_IFS
+
+ echo " 0" >> src/core-arch.h
+ echo "};" >> src/core-arch.h
+}
+
+addtask archgen before do_configure after do_patch
diff --git a/meta/recipes-extended/screen/screen-4.0.3/configure.patch b/meta/recipes-extended/screen/screen-4.0.3/configure.patch
new file mode 100644
index 000000000..e29bcc663
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/configure.patch
@@ -0,0 +1,979 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+# The patch is borrowed from OE:
+# http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=4ee790cc6974bdfe1c9b06c0567b1c56f56d6615
+# and was rebased to screen-4.0.3's configure.in
+# by Dexuan Cui (dexuan.cui@intel.com).
+#
+# The description of the original patch is:
+#
+# Patch by Hannes Reich (hannes@skynet.ie) 22-Jul-2005
+# Resolves _some_ of the cross-compilation issues in screen's configure.in
+#
+diff --git a/configure.in b/configure.in
+index 34c9372..d5ed48a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -37,6 +37,325 @@ pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVE
+ VERSION="$rev.$vers.$pat"
+ AC_NOTE(this is screen version $VERSION)
+ AC_SUBST(VERSION)
++
++AH_TOP([
++/* Copyright (c) 1993-2000
++ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
++ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
++ * Copyright (c) 1987 Oliver Laumann
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program (see the file COPYING); if not, write to the
++ * Free Software Foundation, Inc.,
++ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
++ *
++ */
++
++
++/**********************************************************************
++ *
++ * User Configuration Section
++ */
++
++/*
++ * Maximum of simultaneously allowed windows per screen session.
++ */
++#ifndef MAXWIN
++# define MAXWIN 40
++#endif
++
++/*
++ * Define SOCKDIR to be the directory to contain the named sockets
++ * screen creates. This should be in a common subdirectory, such as
++ * /usr/local or /tmp. It makes things a little more secure if you
++ * choose a directory which is not writable by everyone or where the
++ * "sticky" bit is on, but this isn't required.
++ * If SOCKDIR is not defined screen will put the named sockets in
++ * the user's home directory. Notice that this can cause you problems
++ * if some user's HOME directories are AFS- or NFS-mounted. Especially
++ * AFS is unlikely to support named sockets.
++ *
++ * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison).
++ */
++#undef SOCKDIR
++
++/*
++ * Define this if the SOCKDIR is not shared between hosts.
++ */
++#define SOCKDIR_IS_LOCAL_TO_HOST
++
++/*
++ * Screen sources two startup files. First a global file with a path
++ * specified here, second your local $HOME/.screenrc
++ * Don't define this, if you don't want it.
++ */
++#ifndef ETCSCREENRC
++# define ETCSCREENRC "/usr/local/etc/screenrc"
++#endif
++
++/*
++ * Screen can look for the environment variable $SYSSCREENRC and -if it
++ * exists- load the file specified in that variable as global screenrc.
++ * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1).
++ * Otherwise ETCSCREENRC is always loaded.
++ */
++#define ALLOW_SYSSCREENRC 1
++
++/*
++ * Screen needs encoding files for the translation of utf8
++ * into some encodings, e.g. JIS, BIG5.
++ * Only needed if FONT, ENCODINGS and UTF8 are defined.
++ */
++#ifndef SCREENENCODINGS
++# define SCREENENCODINGS "/usr/local/lib/screen/encodings"
++#endif
++/*
++ * Define CHECKLOGIN to force Screen users to enter their Unix password
++ * in addition to the screen password.
++ *
++ * Define NOSYSLOG if yo do not have logging facilities. Currently
++ * syslog() will be used to trace ``su'' commands only.
++ */
++#define CHECKLOGIN 1
++#undef NOSYSLOG
++
++
++/*
++ * define PTYMODE if you do not like the default of 0622, which allows
++ * public write to your pty.
++ * define PTYGROUP to some numerical group-id if you do not want the
++ * tty to be in "your" group.
++ * Note, screen is unable to change mode or group of the pty if it
++ * is not installed with sufficient privilege. (e.g. set-uid-root)
++ * define PTYROFS if the /dev/pty devices are mounted on a read-only
++ * filesystem so screen should not even attempt to set mode or group
++ * even if running as root (e.g. on TiVo).
++ */
++#undef PTYMODE
++#undef PTYGROUP
++#undef PTYROFS
++
++/*
++ * If screen is NOT installed set-uid root, screen can provide tty
++ * security by exclusively locking the ptys. While this keeps other
++ * users from opening your ptys, it also keeps your own subprocesses
++ * from being able to open /dev/tty. Define LOCKPTY to add this
++ * exclusive locking.
++ */
++#undef LOCKPTY
++
++/*
++ * If you'd rather see the status line on the first line of your
++ * terminal rather than the last, define TOPSTAT.
++ */
++#undef TOPSTAT
++
++/*
++ * define DETACH can detach a session. An absolute 'must'.
++ */
++#define DETACH
++
++/*
++ * here come the erlangen extensions to screen:
++ * define LOCK if you want to use a lock program for a screenlock.
++ * define PASSWORD for secure reattach of your screen.
++ * define COPY_PASTE to use the famous hacker's treasure zoo.
++ * define POW_DETACH to have a detach_and_logout key (requires DETACH).
++ * define REMOTE_DETACH (-d option) to move screen between terminals.
++ * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking
++ * define PSEUDOS to allow window input/output filtering
++ * define MULTI to allow multiple attaches.
++ * define MULTIUSER to allow other users attach to your session
++ * (if they are in the acl, of course)
++ * define MAPKEYS to include input keyboard translation.
++ * define FONT to support ISO2022/alternet charset support
++ * define COLOR to include ansi color support. This may expose
++ * a bug in x11r6-color-xterm.
++ * define DW_CHARS to include support for double-width character
++ * sets.
++ * define ENCODINGS to include support for encodings like euc or big5.
++ * Needs FONT to work.
++ * define UTF8 if you want support for UTF-8 encoding.
++ * Needs FONT and ENCODINGS to work.
++ * define COLORS16 if you want 16 colors.
++ * Needs COLOR to work.
++ * define BUILTIN_TELNET to add telnet support to screen.
++ * Syntax: screen //telnet host [port]
++ * define RXVT_OSC if you want support for rxvts special
++ * change fgcolor/bgcolor/bgpicture sequences
++ */
++#undef SIMPLESCREEN
++#ifndef SIMPLESCREEN
++# define LOCK
++# define PASSWORD
++# define COPY_PASTE
++# define REMOTE_DETACH
++# define POW_DETACH
++# define AUTO_NUKE
++# define PSEUDOS
++# define MULTI
++# define MULTIUSER
++# define MAPKEYS
++# define COLOR
++# define FONT
++# define DW_CHARS
++# define ENCODINGS
++# define UTF8
++# define COLORS16
++# define ZMODEM
++# define BLANKER_PRG
++#endif /* SIMPLESCREEN */
++
++#undef BUILTIN_TELNET
++#undef RXVT_OSC
++#undef COLORS256
++
++
++/*
++ * If you have a braille display you should define HAVE_BRAILLE.
++ * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi
++ * Rangin (bargi@dots.physics.orst.edu).
++ * WARNING: this is more or less unsupported code, it may be full of
++ * bugs leading to security holes, enable at your own risk!
++ */
++#undef HAVE_BRAILLE
++
++
++/*
++ * As error messages are mostly meaningless to the user, we
++ * try to throw out phrases that are somewhat more familiar
++ * to ...well, at least familiar to us NetHack players.
++ */
++#ifndef NONETHACK
++# define NETHACK
++#endif /* NONETHACK */
++
++/*
++ * If screen is installed with permissions to update /etc/utmp (such
++ * as if it is installed set-uid root), define UTMPOK.
++ */
++#define UTMPOK
++
++/* Set LOGINDEFAULT to one (1)
++ * if you want entries added to /etc/utmp by default, else set it to
++ * zero (0).
++ * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined!
++ */
++#define LOGINDEFAULT 1
++
++/* Set LOGOUTOK to one (1)
++ * if you want the user to be able to log her/his windows out.
++ * (Meaning: They are there, but not visible in /etc/utmp).
++ * Disabling this feature only makes sense if you have a secure /etc/utmp
++ * database.
++ * Negative examples: suns usually have a world writable utmp file,
++ * xterm will run perfectly without s-bit.
++ *
++ * If LOGOUTOK is undefined and UTMPOK is defined, all windows are
++ * initially and permanently logged in.
++ *
++ * Set CAREFULUTMP to one (1) if you want that users have at least one
++ * window per screen session logged in.
++ */
++#define LOGOUTOK 1
++#undef CAREFULUTMP
++
++
++/*
++ * If UTMPOK is defined and your system (incorrectly) counts logins by
++ * counting non-null entries in /etc/utmp (instead of counting non-null
++ * entries with no hostname that are not on a pseudo tty), define USRLIMIT
++ * to have screen put an upper-limit on the number of entries to write
++ * into /etc/utmp. This helps to keep you from exceeding a limited-user
++ * license.
++ */
++#undef USRLIMIT
++
++/*
++ * both must be defined if you want to favor tcsendbreak over
++ * other calls to generate a break condition on serial lines.
++ * (Do not bother, if you are not using plain tty windows.)
++ */
++#define POSIX_HAS_A_GOOD_TCSENDBREAK
++#define SUNOS4_AND_WE_TRUST_TCSENDBREAK
++
++/*
++ * to lower the interrupt load on the host machine, you may want to
++ * adjust the VMIN and VTIME settings used for plain tty windows.
++ * See the termio(4) manual page (Non-Canonical Mode Input Processing)
++ * for details.
++ * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you
++ * best user responsiveness, but highest interrupt frequency.
++ * (Do not bother, if you are not using plain tty windows.)
++ */
++#define TTYVMIN 100
++#define TTYVTIME 2
++
++/*
++ * looks like the above values are ignored by setting FNDELAY.
++ * This is default for all pty/ttys, you may disable it for
++ * ttys here. After playing with it for a while, one may find out
++ * that this feature may cause screen to lock up.
++ */
++#ifdef bsdi
++# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */
++#endif
++
++
++/*
++ * Some terminals, e.g. Wyse 120, use a bitfield to select attributes.
++ * This doesn't work with the standard so/ul/m? terminal entries,
++ * because they will cancel each other out.
++ * On TERMINFO machines, "sa" (sgr) may work. If you want screen
++ * to switch attributes only with sgr, define USE_SGR.
++ * This is *not* recomended, do this only if you must.
++ */
++#undef USE_SGR
++
++
++/*
++ * Define USE_LOCALE if you want screen to use the locale names
++ * for the name of the month and day of the week.
++ */
++#define USE_LOCALE
++
++/*
++ * Define USE_PAM if your system supports PAM (Pluggable Authentication
++ * Modules) and you want screen to use it instead of calling crypt().
++ * (You may also need to add -lpam to LIBS in the Makefile.)
++ */
++#undef USE_PAM
++
++/*
++ * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w
++ * if the terminal width is greater than 131 columns. No longer needed
++ * on modern systems which use $COLUMNS or the tty settings instead.
++ */
++#undef CHECK_SCREEN_W
++
++/**********************************************************************
++ *
++ * End of User Configuration Section
++ *
++ * Rest of this file is modified by 'configure'
++ * Change at your own risk!
++ *
++ */
++])
++# end of AH_TOP
++
++AC_PREFIX_PROGRAM(screen)
++AC_PREFIX_PROGRAM(gzip)
+ AC_PREFIX_PROGRAM(screen)
+ AC_PREFIX_PROGRAM(gzip)
+
+@@ -46,6 +365,7 @@ AC_PROG_CPP
+ AC_PROG_GCC_TRADITIONAL
+ AC_ISC_POSIX
+
++AC_MSG_CHECKING([for compiler sanity])
+ AC_TRY_RUN(main(){exit(0);},,[
+ if test $CC != cc ; then
+ AC_NOTE(Your $CC failed - restarting with CC=cc)
+@@ -54,14 +374,9 @@ CC=cc
+ export CC
+ exec $0 $configure_args
+ fi
+-])
++],AC_MSG_WARN([skipping test due to crosscompilation]))
+
+-AC_TRY_RUN(main(){exit(0);},,
+-exec 5>&2
+-eval $ac_link
+-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+-AC_NOTE($ac_compile)
+-AC_MSG_ERROR(Can't run the compiler - sorry))
++AC_MSG_CHECKING([if compiler sets exit status])
+
+ AC_TRY_RUN([
+ main()
+@@ -69,7 +384,8 @@ main()
+ int __something_strange_();
+ __something_strange_(0);
+ }
+-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
++],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),,
++AC_MSG_WARN(skipping test due to crosscompilation))
+
+ AC_PROG_AWK
+
+@@ -103,6 +419,7 @@ AC_ARG_ENABLE(socket-dir,
+ dnl
+ dnl **** special unix variants ****
+ dnl
++AH_TEMPLATE(ISC,[])
+ if test -n "$ISC"; then
+ AC_DEFINE(ISC) LIBS="$LIBS -linet"
+ fi
+@@ -114,11 +431,13 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
+ dnl fi
+ dnl fi
+
++AH_TEMPLATE([sysV68],[])
+ if test -f /sysV68 ; then
+ AC_DEFINE(sysV68)
+ fi
+
+ AC_CHECKING(for MIPS)
++AH_TEMPLATE([MIPS],[])
+ if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
+ oldlibs="$LIBS"
+ test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha.
+@@ -132,6 +451,8 @@ AC_DEFINE(MIPS)
+ AC_CHECKING(wait3)
+ AC_TRY_LINK(,[wait3();], ,
+ AC_CHECKING(wait2)
++AH_TEMPLATE([USE_WAIT2],[On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com])
++dnl TODO(Hannes) shipped config.h.in wraps the define in #ifdef BSDWAIT
+ AC_TRY_LINK(,[wait2();],
+ dnl John Rouillard (rouilj@sni-usa.com):
+ dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no
+@@ -154,9 +475,11 @@ if test -f /usr/lib/libpyr.a ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpyr"
+ AC_CHECKING(Pyramid OSX)
++AH_TEMPLATE([OSX], [Pyramid OSX])
+ AC_TRY_LINK(,[open_controlling_pty("")], AC_DEFINE(OSX), LIBS="$oldlibs")
+ fi
+
++AH_TEMPLATE([POSIX],[Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).])
+ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
+ dnl BBN butterfly is not POSIX, but a MACH BSD system.
+ dnl Do not define POSIX and TERMIO.
+@@ -183,6 +506,7 @@ main () {
+ fi
+
+ AC_CHECKING(for System V)
++AH_TEMPLATE([SYSV], [Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)])
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+ #include <signal.h>
+@@ -198,6 +522,11 @@ AC_EGREP_CPP(yes,
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
++AH_TEMPLATE([SVR4],[])
++AH_TEMPLATE([BUGGYGETLOGIN],
++[If ttyslot() breaks getlogin() by returning indexes to utmp entries
++ of type DEAD_PROCESS, then our getlogin() replacement should be
++ selected by defining BUGGYGETLOGIN.])
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+ [AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+@@ -235,6 +564,9 @@ dnl **** Job control ****
+ dnl
+
+ AC_CHECKING(BSD job jontrol)
++AH_TEMPLATE([BSDJOBS],
++[Define BSDJOBS if you have BSD-style job control (both process
++ groups and a tty that deals correctly with them)])
+ AC_TRY_LINK(
+ [#include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -255,6 +587,10 @@ dnl
+ dnl **** setreuid(), seteuid() ****
+ dnl
+ AC_CHECKING(setreuid)
++AH_TEMPLATE([HAVE_SETREUID],
++[If your system has the calls setreuid() and setregid(),
++ define HAVE_SETREUID. Otherwise screen will use a forked process to
++ safely create output files without retaining any special privileges.])
+ AC_TRY_LINK(,[
+ #ifdef __hpux
+ setresuid(0, 0, 0);
+@@ -269,6 +605,9 @@ dnl NeXT, AUX, ISC, and ultrix are still broken (no saved uid support)
+ dnl Solaris seteuid doesn't change the saved uid, bad for
+ dnl multiuser screen sessions
+ AC_CHECKING(seteuid)
++AH_TEMPLATE([HAVE_SETEUID],
++[If your system supports BSD4.4's seteuid() and setegid(), define
++ HAVE_SETEUID.])
+ AC_TRY_LINK(,[
+ #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
+ seteuid_is_broken(0);
+@@ -292,7 +631,8 @@ dnl
+ dnl **** FIFO tests ****
+ dnl
+
+-AC_CHECKING(fifos)
++AC_CACHE_CHECK([usable fifos],
++ [screen_cv_sys_fifo_usable],
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -357,12 +697,14 @@ main()
+ exit(1);
+ exit(0);
+ }
+-], AC_NOTE(- your fifos are usable) fifo=1,
+-AC_NOTE(- your fifos are not usable))
+-rm -f /tmp/conftest*
+-
+-if test -n "$fifo"; then
+-AC_CHECKING(for broken fifo implementation)
++], screen_cv_sys_fifo_usable=yes, screen_cv_sys_fifo_usable=no))
++
++if test X"$screen_cv_sys_fifo_usable" = Xyes; then
++AH_TEMPLATE([BROKEN_PIPE],
++[Define this if your system exits select() immediatly if a pipe is
++ opened read-only and no writer has opened it.])
++AC_CACHE_CHECK([broken fifo implementation],
++ [screen_cv_sys_fifo_broken_impl],
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <fcntl.h>
+@@ -407,9 +749,11 @@ main()
+ exit(1);
+ exit(0);
+ }
+-], AC_NOTE(- your implementation is ok),
+-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
+-rm -f /tmp/conftest*
++], screen_cv_sys_fifo_broken_impl=no,
++screen_cv_sys_fifo_broken_impl=yes))
++if test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then
++ AC_DEFINE(BROKEN_PIPE)
++fi
+ fi
+
+ dnl
+@@ -418,7 +762,8 @@ dnl
+ dnl may need LIBS="$LIBS -lsocket" here
+ dnl
+
+-AC_CHECKING(sockets)
++AC_CACHE_CHECK([sockets are usable],
++ [screen_cv_sys_sockets_usable],
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+@@ -469,12 +814,16 @@ main()
+ exit(1);
+ exit(0);
+ }
+-], AC_NOTE(- your sockets are usable) sock=1,
+-AC_NOTE(- your sockets are not usable))
+-rm -f /tmp/conftest*
++], screen_cv_sys_sockets_usable=yes,
++screen_cv_sys_sockets_usable=no))
+
+-if test -n "$sock"; then
++if test X"$screen_cv_sys_sockets_usable" = Xyes; then
+ AC_CHECKING(socket implementation)
++AH_TEMPLATE([SOCK_NOT_IN_FS],
++[Define this if the unix-domain socket implementation doesn't
++ create a socket in the filesystem.])
++AC_CACHE_CHECK([if sockets are not stored in the filesystem],
++ [screen_cv_sys_sockets_nofs],
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -500,22 +849,25 @@ main()
+ close(s);
+ exit(0);
+ }
+-],AC_NOTE(- you are normal),
+-AC_NOTE(- unix domain sockets are not kept in the filesystem)
+-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
+-rm -f /tmp/conftest*
++], screen_cv_sys_sockets_nofs=no,
++screen_cv_sys_sockets_nofs=yes))
++
++if test X"$screen_cv_sys_sockets_nofs" = Xyes; then
++ AC_DEFINE(SOCK_NOT_IN_FS)
++fi
+ fi
+
+
+ dnl
+ dnl **** choose sockets or fifos ****
+ dnl
+-if test -n "$fifo"; then
+- if test -n "$sock"; then
+- if test -n "$nore"; then
++AH_TEMPLATE([NAMEDPIPE], [Define this if your system supports named pipes.])
++if test X"$screen_cv_sys_fifo_usable" = Xyes; then
++ if test X"$screen_cv_sys_sockets_usable" = Xyes; then
++ if test X"$screen_cv_sys_sockets_nofs" = Xyes; then
+ AC_NOTE(- hmmm... better take the fifos)
+ AC_DEFINE(NAMEDPIPE)
+- elif test -n "$fifobr"; then
++ elif test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then
+ AC_NOTE(- as your fifos are broken lets use the sockets.)
+ else
+ AC_NOTE(- both sockets and fifos usable. let's take fifos.)
+@@ -525,7 +877,7 @@ if test -n "$fifo"; then
+ AC_NOTE(- using named pipes, of course)
+ AC_DEFINE(NAMEDPIPE)
+ fi
+-elif test -n "$sock"; then
++elif test X"$screen_cv_sys_sockets_usable" = Xyes; then
+ AC_NOTE(- using unix-domain sockets, of course)
+ else
+ AC_MSG_ERROR(you have neither usable sockets nor usable pipes -> no screen)
+@@ -535,7 +887,11 @@ dnl
+ dnl **** check the select implementation ****
+ dnl
+
+-AC_CHECKING(select return value)
++AH_TEMPLATE([SELECT_BROKEN],
++[If the select return value doesn't treat a descriptor that is
++ usable for reading and writing as two hits, define SELECT_BROKEN.])
++AC_CACHE_CHECK([for broken select return value],
++ [screen_cv_sys_select_broken_retval],
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -634,17 +990,26 @@ main()
+ exit(1);
+ exit(0);
+ }
+-],AC_NOTE(- select is ok),
+-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
++], screen_cv_sys_select_broken_retval=no,
++screen_cv_sys_select_broken_retval=yes))
++if test X"$screen_cv_sys_select_broken_retval" = Xyes; then
++ AC_DEFINE(SELECT_BROKEN)
++fi
+
+ dnl
+ dnl **** termcap or terminfo ****
+ dnl
++AH_TEMPLATE([TERMINFO],
++[Define TERMINFO if your machine emulates the termcap routines
++ with the terminfo database.
++ Thus the .screenrc file is parsed for
++ the command 'terminfo' and not 'termcap'])
+ AC_CHECKING(for tgetent)
+ AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+ olibs="$LIBS"
+ LIBS="-lcurses $olibs"
+ AC_CHECKING(libcurses)
++AC_CHECK_LIB(ncursesw,tgetent)
+ AC_TRY_LINK(,[
+ #ifdef __hpux
+ __sorry_hpux_libcurses_is_totally_broken_in_10_10();
+@@ -662,25 +1027,39 @@ LIBS="-lncurses $olibs"
+ AC_CHECKING(libncurses)
+ AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+ AC_MSG_ERROR(!!! no tgetent - no screen))))))
+-
+-AC_TRY_RUN([
++AC_CACHE_CHECK([using terminfo database],[screen_cv_sys_terminfo_used],
++ AC_TRY_RUN([
+ main()
+ {
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+-}], AC_NOTE(- you use the termcap database),
+-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
++}
++ ], screen_cv_sys_terminfo_used=no,
++ screen_cv_sys_terminfo_used=yes)
++)
++
++if test X"$screen_cv_sys_terminfo_used" = Xyes; then
++ AC_DEFINE(TERMINFO)
++fi
++
+ AC_CHECKING(ospeed)
++AH_TEMPLATE([NEED_OSPEED],[If your library does not define ospeed, define this.])
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+
+ dnl
+ dnl **** PTY specific things ****
+ dnl
++AH_TEMPLATE([HAVE_DEV_PTC],
++[define HAVE_DEV_PTC if you have a /dev/ptc character special
++ device.])
+ AC_CHECKING(for /dev/ptc)
+ if test -r /dev/ptc; then
+ AC_DEFINE(HAVE_DEV_PTC)
+ fi
+
+ AC_CHECKING(for SVR4 ptys)
++AH_TEMPLATE([HAVE_SVR4_PTYS],
++[define HAVE_SVR4_PTYS if you have a /dev/ptmx character special
++ device and support the ptsname(), grantpt(), unlockpt() functions.])
+ sysvr4ptys=
+ if test -c /dev/ptmx ; then
+ AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+@@ -696,6 +1075,13 @@ AC_CHECK_FUNCS(openpty,,
+ fi
+
+ AC_CHECKING(for ptyranges)
++AH_TEMPLATE([PTYRANGE0],
++[define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
++ to unusual environments. E.g. For SunOs the defaults are "qpr" and
++ "0123456789abcdef". For SunOs 4.1.2
++ #define PTYRANGE0 "pqrstuvwxyzPQRST"
++ is recommended by Dan Jacobson.])
++AH_TEMPLATE([PTYRANGE1],[])
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+ else
+@@ -812,6 +1198,9 @@ dnl
+ dnl **** utmp handling ****
+ dnl
+ AC_CHECKING(getutent)
++AH_TEMPLATE([GETUTENT],
++[If your system has getutent(), pututline(), etc. to write to the
++ utmp file, define GETUTENT.])
+ AC_TRY_LINK([
+ #include <time.h> /* to get time_t on SCO */
+ #include <sys/types.h>
+@@ -845,6 +1234,7 @@ AC_TRY_LINK([
+ [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
+ )
+ AC_CHECKING(ut_host)
++AH_TEMPLATE([UTHOST],[Define UTHOST if the utmp file has a host field.])
+ AC_TRY_COMPILE([
+ #include <time.h>
+ #include <sys/types.h>
+@@ -855,8 +1245,9 @@ AC_TRY_COMPILE([
+ #include <utmp.h>
+ #endif
+ ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST))
++AH_TEMPLATE([HAVE_UTEMPTER],[Define if you have the utempter utmp helper program])
+ AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no)
+-if test "$have_utempter" = yes; then
++if test X"$have_utempter" = Xyes; then
+ AC_DEFINE(HAVE_UTEMPTER)
+ LIBS="$LIBS -lutempter"
+ fi
+@@ -864,20 +1255,39 @@ fi
+ dnl
+ dnl **** loadav ****
+ dnl
++
++AH_TEMPLATE([LOADAV],
++[If you want the "time" command to display the current load average
++ define LOADAV. Maybe you must install screen with the needed
++ privileges to read /dev/kmem.
++ Note that NLIST_ stuff is only checked, when getloadavg() is not available.
++])
++AH_TEMPLATE([LOADAV_NUM])
++AH_TEMPLATE([LOADAV_TYPE])
++AH_TEMPLATE([LOADAV_SCALE])
++AH_TEMPLATE([LOADAV_GETLOADAVG])
++AH_TEMPLATE([LOADAV_UNIX])
++AH_TEMPLATE([LOADAV_AVENRUN])
++AH_TEMPLATE([LOADAV_USE_NLIST64])
++
++AH_TEMPLATE([NLIST_DECLARED])
++AH_TEMPLATE([NLIST_STRUCT])
++AH_TEMPLATE([NLIST_NAME_UNION])
++
+ AC_CHECKING(for libutil(s))
+-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
++dnl I have no idea whether "login" is an appropriate symbol to check for here - Hannes
++AC_CHECK_LIB(utils,login)
++AC_CHECK_LIB(util,login)
+
+ AC_CHECKING(getloadavg)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
+-if test -f /usr/lib/libkvm.a ; then
+ olibs="$LIBS"
+-LIBS="$LIBS -lkvm"
++AC_CHECK_LIB(kvm,kvm_open,
+ AC_CHECKING(getloadavg with -lkvm)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
+-fi
++)
+ )
+
+ if test -z "$load" ; then
+@@ -1019,6 +1429,12 @@ if test -n "$loadscale" ; then AC_DEFINE_UNQUOTED(LOADAV_SCALE,$loadscale) fi
+ dnl
+ dnl **** signal handling ****
+ dnl
++
++AH_TEMPLATE([SIGVOID],
++[Define SIGVOID if your signal handlers return void. On older
++ systems, signal returns int, but on newer ones, it returns void.])
++
++
+ if test -n "$posix" ; then
+
+ dnl POSIX has reliable signals with void return type.
+@@ -1036,6 +1452,7 @@ AC_TRY_COMPILE(
+ #endif
+ extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID))
+ AC_CHECKING(sigset)
++AH_TEMPLATE([USESIGSET], [Define USESIGSET if you have sigset for BSD 4.1 reliable signals.])
+ AC_TRY_LINK([
+ #include <sys/types.h>
+ #include <signal.h>
+@@ -1047,6 +1464,9 @@ sigset(0, (int (*)())0);
+ #endif
+ ], AC_DEFINE(USESIGSET))
+ AC_CHECKING(signal implementation)
++AH_TEMPLATE([SYSVSIGS],
++[Define SYSVSIGS if signal handlers must be reinstalled after
++ they have been called.])
+ AC_TRY_RUN([
+ #include <sys/types.h>
+ #include <signal.h>
+@@ -1089,13 +1509,14 @@ dnl **** libraries ****
+ dnl
+
+ AC_CHECKING(for crypt and sec libraries)
+-test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
++dnl I have no idea whether "crypt" is an appropriate symbol to check for here - Hannes
++AC_CHECK_LIB(crypt_d,crypt)
+ oldlibs="$LIBS"
+-LIBS="$LIBS -lcrypt"
+ AC_CHECKING(crypt)
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
+-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
+-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
++AC_CHECK_LIB(crypt,crypt)
++AC_CHECK_LIB(sec,crypt)
++AC_CHECK_LIB(shadow,getspnam)
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lsun"
+ AC_CHECKING(IRIX sun library)
+@@ -1118,6 +1539,13 @@ dnl
+ dnl **** misc things ****
+ dnl
+ AC_CHECKING(wait union)
++AH_TEMPLATE([BSDWAIT],
++[Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h>
++
++ Only allow BSDWAIT i.e. wait3 on nonposix systems, since
++ posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl
++ TODO(Hannes) shipped config.h.in does that with a #ifdef
++])
+ AC_TRY_COMPILE([#include <sys/types.h>
+ #include <sys/wait.h>
+ ],[
+@@ -1128,6 +1556,12 @@ AC_TRY_COMPILE([#include <sys/types.h>
+ #endif
+ ],AC_DEFINE(BSDWAIT))
+
++AH_TEMPLATE([TERMIO],
++[Define TERMIO if you have struct termio instead of struct sgttyb.
++ This is usually the case for SVID systems, where BSD uses sgttyb.
++ POSIX systems should define this anyway, even though they use
++ struct termios.])
++
+ if test -z "$butterfly"; then
+ AC_CHECKING(for termio or termios)
+ AC_TRY_CPP([#include <termio.h>], AC_DEFINE(TERMIO),
+@@ -1137,17 +1571,34 @@ fi
+ )
+ fi
+
++AH_TEMPLATE([CYTERMIO], [Define CYTERMIO if you have cyrillic termio modes.])
+ dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW))
+ AC_CHECKING(getspnam)
++AH_TEMPLATE([SHADOWPW],
++[If the passwords are stored in a shadow file and you want the
++ builtin lock to work properly, define SHADOWPW.])
+ AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW))
+
+ AC_CHECKING(getttyent)
++AH_TEMPLATE([GETTTYENT],
++[If your system has the new format /etc/ttys (like 4.3 BSD) and the
++ getttyent(3) library functions, define GETTTYENT.])
+ AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
+
+ AC_CHECKING(fdwalk)
++AH_TEMPLATE([HAVE_FDWALK],
++[Newer versions of Solaris include fdwalk, which can greatly improve
++ the startup time of screen; otherwise screen spends a lot of time
++ closing file descriptors.])
+ AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
+
+-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
++AH_TEMPLATE([USEBCOPY],
++[Define USEBCOPY if the bcopy/memcpy from your system's C library
++ supports the overlapping of source and destination blocks. When
++ undefined, screen uses its own (probably slower) version of bcopy().])
++
++AC_CACHE_CHECK([if bcopy handles overlap],
++ [screen_cv_sys_bcopy_overlap],
+ AC_TRY_RUN([
+ main() {
+ char buf[10];
+@@ -1160,8 +1611,21 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEBCOPY))
++}], screen_cv_sys_bcopy_overlap=yes,
++screen_cv_sys_bcopy_overlap=no))
++if test X"$screen_cv_sys_bcopy_overlap" = Xyes; then
++ AC_DEFINE(USEBCOPY)
++fi
+
++AH_TEMPLATE([USEMEMMOVE],
++[SYSV machines may have a working memcpy() -- Oh, this is
++ quite unlikely. Tell me if you see one.
++ "But then, memmove() should work, if at all available" he thought...
++ Boing, never say "works everywhere" unless you checked SCO UNIX.
++ Their memove fails the test in the configure script. Sigh. (Juergen)
++])
++AC_CACHE_CHECK([if memmove handles overlap],
++ [screen_cv_sys_memmove_overlap],
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memmove(d,s,l)
+ main() {
+@@ -1175,9 +1639,15 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMMOVE))
+-
++}], screen_cv_sys_memmove_overlap=yes,
++screen_cv_sys_memmove_overlap=no))
++if test X"$screen_cv_sys_memmove_overlap" = Xyes; then
++ AC_DEFINE(USEMEMMOVE)
++fi
+
++AH_TEMPLATE([USEMEMCPY],[])
++AC_CACHE_CHECK([if memcpy handles overlap],
++ [screen_cv_sys_memcpy_overlap],
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memcpy(d,s,l)
+ main() {
+@@ -1191,9 +1661,19 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMCPY))
++}], screen_cv_sys_memcpy_overlap=yes,
++screen_cv_sys_memcpy_overlap=no))
++if test X"$screen_cv_sys_memcpy_overlap" = Xyes; then
++ AC_DEFINE(USEMEMCPY)
++fi
+
+ AC_MSG_CHECKING(long file names)
++AH_TEMPLATE([NAME_MAX],
++[If you are on a SYS V machine that restricts filename length to 14
++ characters, you may need to enforce that by setting NAME_MAX to 14])
++dnl TODO(Hannes) shipped config.h.in has
++dnl #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */
++dnl ahead of this
+ (echo 1 > /tmp/conftest9012345) 2>/dev/null
+ (echo 2 > /tmp/conftest9012346) 2>/dev/null
+ val=`cat /tmp/conftest9012345 2>/dev/null`
+@@ -1206,17 +1686,28 @@ fi
+ rm -f /tmp/conftest*
+
+ AC_MSG_CHECKING(for vsprintf)
++AH_TEMPLATE([USEVARARGS],
++[If your system has vsprintf() and requires the use of the macros in
++ "varargs.h" to use functions with variable arguments,
++ define USEVARARGS.])
+ AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
+
+ AC_HEADER_DIRENT
+
+ AC_MSG_CHECKING(for setenv)
++AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV])
+ AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV),
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(for putenv)
++AH_TEMPLATE([NEEDPUTENV],
++[If your system does not come with a setenv()/putenv()/getenv()
++ functions, you may bring in our own code by defining NEEDPUTENV.])
+ AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)
+ ))
+ AC_MSG_CHECKING([for nl_langinfo(CODESET)])
++AH_TEMPLATE([HAVE_NL_LANGINFO],
++[define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
++ and <langinfo.h> defines CODESET.])
+ AC_TRY_LINK([
+ #include <langinfo.h>
+ ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no))
+@@ -1266,7 +1757,8 @@ fi
+ dnl Ptx bug workaround -- insert -lc after -ltermcap
+ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+
+-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
++AC_MSG_CHECKING(compiler sanity)
++AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.), AC_MSG_WARN(Skipping test due to crosscompilation))
+
+ ETCSCREENRC="\"/usr/local/etc/screenrc\""
+ if test -n "$prefix"; then
diff --git a/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch
new file mode 100644
index 000000000..e0caf5d83
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch
@@ -0,0 +1,19 @@
+This fixes the parallel make install failure
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: screen-4.0.3/Makefile.in
+===================================================================
+--- screen-4.0.3.orig/Makefile.in
++++ screen-4.0.3/Makefile.in
+@@ -70,7 +70,7 @@ screen: $(OFILES)
+ .c.o:
+ $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
+
+-install_bin: .version screen
++install_bin: .version screen installdirs
+ -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
+ then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
+ $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen.pam b/meta/recipes-extended/screen/screen-4.0.3/screen.pam
new file mode 100644
index 000000000..ff657fa07
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/screen.pam
@@ -0,0 +1,2 @@
+#%PAM-1.0
+auth include common-auth
diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
new file mode 100644
index 000000000..1a7eb2031
--- /dev/null
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \
+ file://screen.h;endline=23;md5=9a7ae69a2aafed891bf7c38ddf9f6b7d"
+
+SECTION = "console/utils"
+DEPENDS = "ncurses \
+ ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+PR = "r3"
+
+SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \
+ ${DEBIAN_MIRROR}/main/s/screen/screen_4.0.3-11+lenny1.diff.gz;name=patch \
+ file://configure.patch \
+ file://fix-parallel-make.patch \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://screen.pam"
+
+SRC_URI[tarball.md5sum] = "8506fd205028a96c741e4037de6e3c42"
+SRC_URI[tarball.sha256sum] = "78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77"
+
+SRC_URI[patch.md5sum] = "9bacd9be1d9c57e2e0381df2775b33e0"
+SRC_URI[patch.sha256sum] = "19130d097e9ed897c84a2c640634dd36ee3233c17b0bf5d18549ed1e064b3073"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+ for feature in ${DISTRO_FEATURES}; do
+ if [ "$feature" = "pam" ]; then
+ install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+ break
+ fi
+ done
+}
diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
new file mode 100644
index 000000000..836551ea1
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Change the getline return type to match its declaration.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c
+--- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800
++++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800
+@@ -30,7 +30,7 @@
+ necessary. Returns the number of characters read (not including the
+ null terminator), or -1 on error or EOF. */
+
+-size_t
++ssize_t
+ getline (lineptr, n, stream)
+ char **lineptr;
+ size_t *n;
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
new file mode 100644
index 000000000..8baa180f7
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.1.2.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "sed is a Stream EDitor."
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407"
+SECTION = "console/utils"
+PR = "r5"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
+ file://fix_return_type.patch"
+
+SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0"
+SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab"
+
+inherit autotools update-alternatives gettext
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
+ rmdir ${D}${bindir}/
+}
+
+ALTERNATIVE_NAME = "sed"
+ALTERNATIVE_PATH = "sed.${PN}"
+ALTERNATIVE_LINK = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/sed/sed_4.2.1.bb b/meta/recipes-extended/sed/sed_4.2.1.bb
new file mode 100644
index 000000000..0fceecd6b
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.2.1.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "sed is a Stream EDitor."
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
+SECTION = "console/utils"
+PR = "r3"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "f0fd4d7da574d4707e442285fd2d3b86"
+SRC_URI[sha256sum] = "8773541ce097fdc4c5b9e7da12a82dffbb30cd91f7bc169f52f05f93b7fc3060"
+
+inherit autotools update-alternatives gettext
+
+EXTRA_OECONF = "--disable-acl"
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/sed ${D}${base_bindir}/sed.${PN}
+ rmdir ${D}${bindir}/
+}
+
+ALTERNATIVE_NAME = "sed"
+ALTERNATIVE_PATH = "sed.${PN}"
+ALTERNATIVE_LINK = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
new file mode 100644
index 000000000..5edd3b874
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
@@ -0,0 +1,1374 @@
+Add a --root command option to the following utilties:
+
+* useradd
+* groupadd
+* usermod
+* groupmod
+* userdel
+* groupdel
+* passwd
+* gpasswd
+* pwconv
+* pwunconv
+* grpconv
+* grpunconv
+
+This option allows the utilities to be chrooted when run under pseudo.
+They can then be used to manipulate user and group account information
+in target sysroots.
+
+The useradd utility was also modified to create home directories
+recursively when necessary.
+
+Upstream-Status: Inappropriate [Other]
+Workaround is specific to our build system.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+2011-09-29 Fix the parsing of the --root option in gpasswd, useradd, usermod:
+
+In programs which need to scan the command line in two passes to handle
+--root option separately from the rest of the arguments, replace the first
+calls to getopt_long with a simple iteration over the argument list since
+getopt_long has the bad habit of reordering arguments on the command line.
+
+Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
+
+diff -urN shadow-4.1.4.3.orig//src/gpasswd.c shadow-4.1.4.3//src/gpasswd.c
+--- shadow-4.1.4.3.orig//src/gpasswd.c 2011-09-29 12:00:45.211000091 +0100
++++ shadow-4.1.4.3//src/gpasswd.c 2011-09-29 12:09:54.590000090 +0100
+@@ -63,6 +63,7 @@
+ * (/etc/gshadow present) */
+ static bool is_shadowgrp;
+ #endif
++static const char *newroot = "";
+
+ /* Flags set by options */
+ static bool aflg = false;
+@@ -97,6 +98,7 @@
+ static void usage (void);
+ static RETSIGTYPE catch_signals (int killed);
+ static bool is_valid_user_list (const char *users);
++static void process_root_flag (int argc, char **argv);
+ static void process_flags (int argc, char **argv);
+ static void check_flags (int argc, int opt_index);
+ static void open_files (void);
+@@ -136,6 +138,7 @@
+ "Options:\n"
+ " -a, --add USER add USER to GROUP\n"
+ " -d, --delete USER remove USER from GROUP\n"
++ " -Q --root CHROOT_DIR directory to chroot into\n"
+ " -r, --remove-password remove the GROUP's password\n"
+ " -R, --restrict restrict access to GROUP to its members\n"
+ " -M, --members USER,... set the list of members of GROUP\n"
+@@ -226,6 +229,57 @@
+ }
+
+ /*
++ * process_root_flag - chroot if given the --root option
++ *
++ * We do this outside of process_flags() because
++ * the is_shadow_pwd boolean needs to be set before
++ * process_flags(), and if we do need to chroot() we
++ * must do so before is_shadow_pwd gets set.
++ */
++static void process_root_flag (int argc, char **argv)
++{
++ /*
++ * Parse the command line options.
++ */
++ int i;
++ char *root;
++
++ for (i = 0; i < argc; i++) {
++ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-Q")) {
++ if (i + 1 == argc) {
++ fprintf (stderr,
++ _("%s: option '%s' requires an argument\n"),
++ Prog, argv[i]);
++ exit (E_BAD_ARG);
++ }
++ root = argv[i + 1];
++
++ if ('/' != root[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, root);
++ exit (E_BAD_ARG);
++ }
++ newroot = root;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ }
++ }
++}
++
++/*
+ * process_flags - process the command line options and arguments
+ */
+ static void process_flags (int argc, char **argv)
+@@ -235,6 +289,7 @@
+ static struct option long_options[] = {
+ {"add", required_argument, NULL, 'a'},
+ {"delete", required_argument, NULL, 'd'},
++ {"root", required_argument, NULL, 'Q'},
+ {"remove-password", no_argument, NULL, 'r'},
+ {"restrict", no_argument, NULL, 'R'},
+ {"administrators", required_argument, NULL, 'A'},
+@@ -242,7 +297,7 @@
+ {NULL, 0, NULL, '\0'}
+ };
+
+- while ((flag = getopt_long (argc, argv, "a:A:d:gM:rR", long_options, &option_index)) != -1) {
++ while ((flag = getopt_long (argc, argv, "a:A:d:gM:Q:rR", long_options, &option_index)) != -1) {
+ switch (flag) {
+ case 'a': /* add a user */
+ aflg = true;
+@@ -283,6 +338,9 @@
+ }
+ Mflg = true;
+ break;
++ case 'Q':
++ /* no-op since we handled this in process_root_flag() earlier */
++ break;
+ case 'r': /* remove group password */
+ rflg = true;
+ break;
+@@ -995,6 +1053,8 @@
+ setbuf (stdout, NULL);
+ setbuf (stderr, NULL);
+
++ process_root_flag (argc, argv);
++
+ #ifdef SHADOWGRP
+ is_shadowgrp = sgr_file_present ();
+ #endif
+diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3//src/groupadd.c
+--- shadow-4.1.4.3.orig//src/groupadd.c 2011-09-29 12:00:45.212000091 +0100
++++ shadow-4.1.4.3//src/groupadd.c 2011-09-29 11:59:28.386000092 +0100
+@@ -76,6 +76,7 @@
+ static gid_t group_id;
+ static /*@null@*/char *group_passwd;
+ static /*@null@*/char *empty_list = NULL;
++static const char *newroot = "";
+
+ static bool oflg = false; /* permit non-unique group ID to be specified with -g */
+ static bool gflg = false; /* ID value for the new group */
+@@ -120,6 +121,7 @@
+ (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
+ " (non-unique) GID\n"), stderr);
+ (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
+ (void) fputs (_(" -r, --system create a system account\n"), stderr);
+ (void) fputs ("\n", stderr);
+ exit (E_USAGE);
+@@ -383,12 +385,13 @@
+ {"key", required_argument, NULL, 'K'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
++ {"root", required_argument, NULL, 'R'},
+ {"system", no_argument, NULL, 'r'},
+ {NULL, 0, NULL, '\0'}
+ };
+
+ while ((c =
+- getopt_long (argc, argv, "fg:hK:op:r", long_options,
++ getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
+ &option_index)) != -1) {
+ switch (c) {
+ case 'f':
+@@ -440,6 +443,28 @@
+ pflg = true;
+ group_passwd = optarg;
+ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
+ case 'r':
+ rflg = true;
+ break;
+diff -urN shadow-4.1.4.3.orig//src/groupdel.c shadow-4.1.4.3//src/groupdel.c
+--- shadow-4.1.4.3.orig//src/groupdel.c 2011-09-29 12:00:45.212000091 +0100
++++ shadow-4.1.4.3//src/groupdel.c 2011-09-29 11:59:28.386000092 +0100
+@@ -36,6 +36,7 @@
+
+ #include <ctype.h>
+ #include <fcntl.h>
++#include <getopt.h>
+ #include <grp.h>
+ #include <pwd.h>
+ #ifdef ACCT_TOOLS_SETUID
+@@ -59,6 +60,7 @@
+
+ static char *group_name;
+ static gid_t group_id = -1;
++static const char *newroot = "";
+
+ #ifdef SHADOWGRP
+ static bool is_shadow_grp;
+@@ -70,12 +72,14 @@
+ /*@-exitarg@*/
+ #define E_SUCCESS 0 /* success */
+ #define E_USAGE 2 /* invalid command syntax */
++#define E_BAD_ARG 3 /* invalid argument to option */
+ #define E_NOTFOUND 6 /* specified group doesn't exist */
+ #define E_GROUP_BUSY 8 /* can't remove user's primary group */
+ #define E_GRP_UPDATE 10 /* can't update group file */
+
+ /* local function prototypes */
+ static void usage (void);
++static void process_flags (int argc, char **argv);
+ static void grp_update (void);
+ static void close_files (void);
+ static void open_files (void);
+@@ -86,11 +90,78 @@
+ */
+ static void usage (void)
+ {
+- fputs (_("Usage: groupdel group\n"), stderr);
++ (void) fprintf (stderr,
++ _("Usage: groupdel [options]\n"
++ "\n"
++ "Options:\n"),
++ Prog);
++ (void) fputs (_(" -g, --group GROUP group name to delete\n"), stderr);
++ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
++ (void) fputs ("\n", stderr);
+ exit (E_USAGE);
+ }
+
+ /*
++ * process_flags - perform command line argument setting
++ *
++ * process_flags() interprets the command line arguments and sets
++ * the values that the user will be created with accordingly. The
++ * values are checked for sanity.
++ */
++static void process_flags (int argc, char **argv)
++{
++ {
++ /*
++ * Parse the command line options.
++ */
++ int c;
++ static struct option long_options[] = {
++ {"group", required_argument, NULL, 'g'},
++ {"help", no_argument, NULL, 'h'},
++ {"root", required_argument, NULL, 'R'},
++ {NULL, 0, NULL, '\0'}
++ };
++ while ((c = getopt_long (argc, argv,
++ "g:R:",
++ long_options, NULL)) != -1) {
++ switch (c) {
++ case 'g':
++ group_name = optarg;
++ break;
++ case 'h':
++ usage ();
++ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ default:
++ usage ();
++ }
++ }
++ }
++}
++
++/*
+ * grp_update - update group file entries
+ *
+ * grp_update() writes the new records to the group files.
+@@ -328,14 +399,14 @@
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) textdomain (PACKAGE);
+
+- if (argc != 2) {
++ if (argc == 1) {
+ usage ();
+ }
+
+- group_name = argv[1];
+-
+ OPENLOG ("groupdel");
+
++ process_flags (argc, argv);
++
+ #ifdef ACCT_TOOLS_SETUID
+ #ifdef USE_PAM
+ {
+diff -urN shadow-4.1.4.3.orig//src/groupmod.c shadow-4.1.4.3//src/groupmod.c
+--- shadow-4.1.4.3.orig//src/groupmod.c 2011-09-29 12:00:45.212000091 +0100
++++ shadow-4.1.4.3//src/groupmod.c 2011-09-29 11:59:28.387000092 +0100
+@@ -79,6 +79,7 @@
+ static char *group_passwd;
+ static gid_t group_id;
+ static gid_t group_newid;
++static char *newroot = "";
+
+ struct cleanup_info_mod info_passwd;
+ struct cleanup_info_mod info_group;
+@@ -126,6 +127,7 @@
+ (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
+ (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
+ " PASSWORD\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
+ (void) fputs ("\n", stderr);
+ exit (E_USAGE);
+ }
+@@ -346,10 +348,11 @@
+ {"new-name", required_argument, NULL, 'n'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
++ {"root", required_argument, NULL, 'R'},
+ {NULL, 0, NULL, '\0'}
+ };
+ while ((c =
+- getopt_long (argc, argv, "g:hn:op:",
++ getopt_long (argc, argv, "g:hn:op:R:",
+ long_options, &option_index)) != -1) {
+ switch (c) {
+ case 'g':
+@@ -373,6 +376,28 @@
+ group_passwd = optarg;
+ pflg = true;
+ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
+ default:
+ usage ();
+ }
+diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
+--- shadow-4.1.4.3.orig//src/grpconv.c 2011-09-29 12:00:45.213000091 +0100
++++ shadow-4.1.4.3//src/grpconv.c 2011-09-29 11:59:28.387000092 +0100
+@@ -39,6 +39,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <getopt.h>
+ #include <grp.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -50,6 +51,14 @@
+ #ifdef SHADOWGRP
+ #include "groupio.h"
+ #include "sgroupio.h"
++
++/*
++ * exit status values
++ */
++/*@-exitarg@*/
++#define E_USAGE 2 /* invalid command syntax */
++#define E_BAD_ARG 3 /* invalid argument to option */
++
+ /*
+ * Global variables
+ */
+@@ -57,9 +66,12 @@
+
+ static bool gr_locked = false;
+ static bool sgr_locked = false;
++static const char *newroot = "";
+
+ /* local function prototypes */
+ static void fail_exit (int status);
++static void usage (void);
++static void process_flags (int argc, char **argv);
+
+ static void fail_exit (int status)
+ {
+@@ -82,6 +94,77 @@
+ exit (status);
+ }
+
++/*
++ * usage - display usage message and exit
++ */
++static void usage (void)
++{
++ (void) fprintf (stderr,
++ _("Usage: grpconv [options]\n"
++ "\n"
++ "Options:\n"),
++ Prog);
++ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
++ (void) fputs ("\n", stderr);
++ exit (E_USAGE);
++}
++
++/*
++ * process_flags - perform command line argument setting
++ *
++ * process_flags() interprets the command line arguments and sets
++ * the values that the user will be created with accordingly. The
++ * values are checked for sanity.
++ */
++static void process_flags (int argc, char **argv)
++{
++ {
++ /*
++ * Parse the command line options.
++ */
++ int c;
++ static struct option long_options[] = {
++ {"help", no_argument, NULL, 'h'},
++ {"root", required_argument, NULL, 'R'},
++ {NULL, 0, NULL, '\0'}
++ };
++ while ((c = getopt_long (argc, argv,
++ "R:",
++ long_options, NULL)) != -1) {
++ switch (c) {
++ case 'h':
++ usage ();
++ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ default:
++ usage ();
++ }
++ }
++ }
++}
++
+ int main (int argc, char **argv)
+ {
+ const struct group *gr;
+@@ -100,6 +183,8 @@
+
+ OPENLOG ("grpconv");
+
++ process_flags (argc, argv);
++
+ if (gr_lock () == 0) {
+ fprintf (stderr,
+ _("%s: cannot lock %s; try again later.\n"),
+diff -urN shadow-4.1.4.3.orig//src/grpunconv.c shadow-4.1.4.3//src/grpunconv.c
+--- shadow-4.1.4.3.orig//src/grpunconv.c 2011-09-29 12:00:45.213000091 +0100
++++ shadow-4.1.4.3//src/grpunconv.c 2011-09-29 11:59:28.387000092 +0100
+@@ -43,6 +43,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
++#include <getopt.h>
+ #include <time.h>
+ #include <unistd.h>
+ #include <grp.h>
+@@ -51,6 +52,14 @@
+ #ifdef SHADOWGRP
+ #include "groupio.h"
+ #include "sgroupio.h"
++
++/*
++ * exit status values
++ */
++/*@-exitarg@*/
++#define E_USAGE 2 /* invalid command syntax */
++#define E_BAD_ARG 3 /* invalid argument to option */
++
+ /*
+ * Global variables
+ */
+@@ -58,9 +67,12 @@
+
+ static bool gr_locked = false;
+ static bool sgr_locked = false;
++static const char *newroot = "";
+
+ /* local function prototypes */
+ static void fail_exit (int status);
++static void usage (void);
++static void process_flags (int argc, char **argv);
+
+ static void fail_exit (int status)
+ {
+@@ -83,6 +95,77 @@
+ exit (status);
+ }
+
++/*
++ * usage - display usage message and exit
++ */
++static void usage (void)
++{
++ (void) fprintf (stderr,
++ _("Usage: grpunconv [options]\n"
++ "\n"
++ "Options:\n"),
++ Prog);
++ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
++ (void) fputs ("\n", stderr);
++ exit (E_USAGE);
++}
++
++/*
++ * process_flags - perform command line argument setting
++ *
++ * process_flags() interprets the command line arguments and sets
++ * the values that the user will be created with accordingly. The
++ * values are checked for sanity.
++ */
++static void process_flags (int argc, char **argv)
++{
++ {
++ /*
++ * Parse the command line options.
++ */
++ int c;
++ static struct option long_options[] = {
++ {"help", no_argument, NULL, 'h'},
++ {"root", required_argument, NULL, 'R'},
++ {NULL, 0, NULL, '\0'}
++ };
++ while ((c = getopt_long (argc, argv,
++ "R:",
++ long_options, NULL)) != -1) {
++ switch (c) {
++ case 'h':
++ usage ();
++ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ default:
++ usage ();
++ }
++ }
++ }
++}
++
+ int main (int argc, char **argv)
+ {
+ const struct group *gr;
+@@ -100,6 +183,8 @@
+
+ OPENLOG ("grpunconv");
+
++ process_flags (argc, argv);
++
+ if (sgr_file_present () == 0) {
+ exit (0); /* no /etc/gshadow, nothing to do */
+ }
+diff -urN shadow-4.1.4.3.orig//src/passwd.c shadow-4.1.4.3//src/passwd.c
+--- shadow-4.1.4.3.orig//src/passwd.c 2011-09-29 12:00:45.214000091 +0100
++++ shadow-4.1.4.3//src/passwd.c 2011-09-29 11:59:28.388000092 +0100
+@@ -75,6 +75,7 @@
+ static char *name; /* The name of user whose password is being changed */
+ static char *myname; /* The current user's name */
+ static bool amroot; /* The caller's real UID was 0 */
++static const char *newroot = "";
+
+ static bool
+ aflg = false, /* -a - show status for all users */
+@@ -174,6 +175,7 @@
+ " -n, --mindays MIN_DAYS set minimum number of days before password\n"
+ " change to MIN_DAYS\n"
+ " -q, --quiet quiet mode\n"
++ " -R, --root CHROOT_DIR directory to chroot into\n"
+ " -r, --repository REPOSITORY change password in REPOSITORY repository\n"
+ " -S, --status report password status on the named account\n"
+ " -u, --unlock unlock the password of the named account\n"
+@@ -803,6 +805,7 @@
+ {"lock", no_argument, NULL, 'l'},
+ {"mindays", required_argument, NULL, 'n'},
+ {"quiet", no_argument, NULL, 'q'},
++ {"root", required_argument, NULL, 'R'},
+ {"repository", required_argument, NULL, 'r'},
+ {"status", no_argument, NULL, 'S'},
+ {"unlock", no_argument, NULL, 'u'},
+@@ -811,7 +814,7 @@
+ {NULL, 0, NULL, '\0'}
+ };
+
+- while ((c = getopt_long (argc, argv, "adei:kln:qr:Suw:x:",
++ while ((c = getopt_long (argc, argv, "adei:kln:qR:r:Suw:x:",
+ long_options, &option_index)) != -1) {
+ switch (c) {
+ case 'a':
+@@ -858,6 +861,28 @@
+ case 'q':
+ qflg = true; /* ok for users */
+ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
+ case 'r':
+ /* -r repository (files|nis|nisplus) */
+ /* only "files" supported for now */
+diff -urN shadow-4.1.4.3.orig//src/pwconv.c shadow-4.1.4.3//src/pwconv.c
+--- shadow-4.1.4.3.orig//src/pwconv.c 2011-09-29 12:00:45.214000091 +0100
++++ shadow-4.1.4.3//src/pwconv.c 2011-09-29 11:59:28.388000092 +0100
+@@ -59,6 +59,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <getopt.h>
+ #include <pwd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -79,6 +80,7 @@
+ #define E_SUCCESS 0 /* success */
+ #define E_NOPERM 1 /* permission denied */
+ #define E_USAGE 2 /* invalid command syntax */
++#define E_BAD_ARG 3 /* invalid argument to option */
+ #define E_FAILURE 3 /* unexpected failure, nothing done */
+ #define E_MISSING 4 /* unexpected failure, passwd file missing */
+ #define E_PWDBUSY 5 /* passwd file(s) busy */
+@@ -90,9 +92,12 @@
+
+ static bool spw_locked = false;
+ static bool pw_locked = false;
++static const char *newroot = "";
+
+ /* local function prototypes */
+ static void fail_exit (int status);
++static void usage (void);
++static void process_flags (int argc, char **argv);
+
+ static void fail_exit (int status)
+ {
+@@ -115,6 +120,77 @@
+ exit (status);
+ }
+
++/*
++ * usage - display usage message and exit
++ */
++static void usage (void)
++{
++ (void) fprintf (stderr,
++ _("Usage: pwconv [options]\n"
++ "\n"
++ "Options:\n"),
++ Prog);
++ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
++ (void) fputs ("\n", stderr);
++ exit (E_USAGE);
++}
++
++/*
++ * process_flags - perform command line argument setting
++ *
++ * process_flags() interprets the command line arguments and sets
++ * the values that the user will be created with accordingly. The
++ * values are checked for sanity.
++ */
++static void process_flags (int argc, char **argv)
++{
++ {
++ /*
++ * Parse the command line options.
++ */
++ int c;
++ static struct option long_options[] = {
++ {"help", no_argument, NULL, 'h'},
++ {"root", required_argument, NULL, 'R'},
++ {NULL, 0, NULL, '\0'}
++ };
++ while ((c = getopt_long (argc, argv,
++ "R:",
++ long_options, NULL)) != -1) {
++ switch (c) {
++ case 'h':
++ usage ();
++ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ default:
++ usage ();
++ }
++ }
++ }
++}
++
+ int main (int argc, char **argv)
+ {
+ const struct passwd *pw;
+@@ -122,9 +198,6 @@
+ const struct spwd *sp;
+ struct spwd spent;
+
+- if (1 != argc) {
+- (void) fputs (_("Usage: pwconv\n"), stderr);
+- }
+ Prog = Basename (argv[0]);
+
+ (void) setlocale (LC_ALL, "");
+@@ -133,6 +206,8 @@
+
+ OPENLOG ("pwconv");
+
++ process_flags (argc, argv);
++
+ if (pw_lock () == 0) {
+ fprintf (stderr,
+ _("%s: cannot lock %s; try again later.\n"),
+diff -urN shadow-4.1.4.3.orig//src/pwunconv.c shadow-4.1.4.3//src/pwunconv.c
+--- shadow-4.1.4.3.orig//src/pwunconv.c 2011-09-29 12:00:45.214000091 +0100
++++ shadow-4.1.4.3//src/pwunconv.c 2011-09-29 11:59:28.388000092 +0100
+@@ -35,6 +35,7 @@
+ #ident "$Id: pwunconv.c 2852 2009-04-30 21:44:35Z nekral-guest $"
+
+ #include <fcntl.h>
++#include <getopt.h>
+ #include <pwd.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+@@ -46,15 +47,24 @@
+ #include "shadowio.h"
+
+ /*
++ * exit status values
++ */
++/*@-exitarg@*/
++#define E_USAGE 2 /* invalid command syntax */
++#define E_BAD_ARG 3 /* invalid argument to option */
++/*
+ * Global variables
+ */
+ char *Prog;
+
+ static bool spw_locked = false;
+ static bool pw_locked = false;
++static const char *newroot = "";
+
+ /* local function prototypes */
+ static void fail_exit (int status);
++static void usage (void);
++static void process_flags (int argc, char **argv);
+
+ static void fail_exit (int status)
+ {
+@@ -75,6 +85,76 @@
+ exit (status);
+ }
+
++/*
++ * usage - display usage message and exit
++ */
++static void usage (void)
++{
++ (void) fprintf (stderr,
++ _("Usage: pwunconv [options]\n"
++ "\n"
++ "Options:\n"),
++ Prog);
++ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
++ (void) fputs ("\n", stderr);
++ exit (E_USAGE);
++}
++
++/*
++ * process_flags - perform command line argument setting
++ *
++ * process_flags() interprets the command line arguments and sets
++ * the values that the user will be created with accordingly. The
++ * values are checked for sanity.
++ */
++static void process_flags (int argc, char **argv)
++{
++ {
++ /*
++ * Parse the command line options.
++ */
++ int c;
++ static struct option long_options[] = {
++ {"help", no_argument, NULL, 'h'},
++ {"root", required_argument, NULL, 'R'},
++ {NULL, 0, NULL, '\0'}
++ };
++ while ((c = getopt_long (argc, argv,
++ "R:",
++ long_options, NULL)) != -1) {
++ switch (c) {
++ case 'h':
++ usage ();
++ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ default:
++ usage ();
++ }
++ }
++ }
++}
+
+ int main (int argc, char **argv)
+ {
+@@ -93,6 +173,8 @@
+
+ OPENLOG ("pwunconv");
+
++ process_flags (argc, argv);
++
+ if (!spw_file_present ()) {
+ /* shadow not installed, do nothing */
+ exit (0);
+diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3//src/useradd.c
+--- shadow-4.1.4.3.orig//src/useradd.c 2011-09-29 12:00:45.215000091 +0100
++++ shadow-4.1.4.3//src/useradd.c 2011-09-29 11:59:28.520000092 +0100
+@@ -112,6 +112,7 @@
+ #ifdef WITH_SELINUX
+ static const char *user_selinux = "";
+ #endif
++static const char *newroot = "";
+
+ static long user_expire = -1;
+ static bool is_shadow_pwd;
+@@ -189,6 +190,7 @@
+ static void new_spent (struct spwd *);
+ static void grp_update (void);
+
++static void process_root_flag (int argc, char **argv);
+ static void process_flags (int argc, char **argv);
+ static void close_files (void);
+ static void open_files (void);
+@@ -711,6 +713,7 @@
+ (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
+ " (non-unique) UID\n"), stderr);
+ (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
++ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
+ (void) fputs (_(" -r, --system create a system account\n"), stderr);
+ (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
+ (void) fputs (_(" -u, --uid UID user ID of the new account\n"), stderr);
+@@ -943,6 +946,57 @@
+ }
+
+ /*
++ * process_root_flag - chroot if given the --root option
++ *
++ * We do this outside of process_flags() because
++ * the is_shadow_pwd boolean needs to be set before
++ * process_flags(), and if we do need to chroot() we
++ * must do so before is_shadow_pwd gets set.
++ */
++static void process_root_flag (int argc, char **argv)
++{
++ /*
++ * Parse the command line options.
++ */
++ int i;
++ char *root;
++
++ for (i = 0; i < argc; i++) {
++ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
++ if (i + 1 == argc) {
++ fprintf (stderr,
++ _("%s: option '%s' requires an argument\n"),
++ Prog, argv[i]);
++ exit (E_BAD_ARG);
++ }
++ root = argv[i + 1];
++
++ if ('/' != root[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, root);
++ exit (E_BAD_ARG);
++ }
++ newroot = root;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ }
++ }
++}
++
++/*
+ * process_flags - perform command line argument setting
+ *
+ * process_flags() interprets the command line arguments and sets
+@@ -978,6 +1032,7 @@
+ {"no-user-group", no_argument, NULL, 'N'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
++ {"root", required_argument, NULL, 'R'},
+ {"system", no_argument, NULL, 'r'},
+ {"shell", required_argument, NULL, 's'},
+ #ifdef WITH_SELINUX
+@@ -989,9 +1044,9 @@
+ };
+ while ((c = getopt_long (argc, argv,
+ #ifdef WITH_SELINUX
+- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
++ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
+ #else
+- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
++ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
+ #endif
+ long_options, NULL)) != -1) {
+ switch (c) {
+@@ -1156,6 +1211,9 @@
+ }
+ user_pass = optarg;
+ break;
++ case 'R':
++ /* no-op since we handled this in process_root_flag() earlier */
++ break;
+ case 'r':
+ rflg = true;
+ break;
+@@ -1735,6 +1793,36 @@
+ }
+ }
+ #endif
++
++/*
++ * mkdir_p - create directories, including parent directories when needed
++ *
++ * similar to mkdir -p
++ */
++void mkdir_p(const char *path) {
++ int len = strlen(path);
++ char newdir[len + 1];
++ mode_t mode = 0755;
++ int i = 0;
++
++ if (path[i] == '\0') {
++ return;
++ }
++
++ /* skip the leading '/' */
++ i++;
++
++ while(path[i] != '\0') {
++ if (path[i] == '/') {
++ strncpy(newdir, path, i);
++ newdir[i] = '\0';
++ mkdir(newdir, mode);
++ }
++ i++;
++ }
++ mkdir(path, mode);
++}
++
+ /*
+ * create_home - create the user's home directory
+ *
+@@ -1748,34 +1836,31 @@
+ #ifdef WITH_SELINUX
+ selinux_file_context (user_home);
+ #endif
+- /* XXX - create missing parent directories. --marekm */
+- if (mkdir (user_home, 0) != 0) {
+- fprintf (stderr,
+- _("%s: cannot create directory %s\n"),
+- Prog, user_home);
+-#ifdef WITH_AUDIT
+- audit_logger (AUDIT_ADD_USER, Prog,
+- "adding home directory",
+- user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_FAILURE);
+-#endif
+- fail_exit (E_HOMEDIR);
+- }
+- chown (user_home, user_id, user_gid);
+- chmod (user_home,
+- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+- home_added = true;
++ mkdir_p(user_home);
++ }
++ if (access (user_home, F_OK) != 0) {
+ #ifdef WITH_AUDIT
+ audit_logger (AUDIT_ADD_USER, Prog,
+ "adding home directory",
+ user_name, (unsigned int) user_id,
+- SHADOW_AUDIT_SUCCESS);
++ SHADOW_AUDIT_FAILURE);
++#endif
++ fail_exit (E_HOMEDIR);
++ }
++ chown (user_home, user_id, user_gid);
++ chmod (user_home,
++ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
++ home_added = true;
++#ifdef WITH_AUDIT
++ audit_logger (AUDIT_ADD_USER, Prog,
++ "adding home directory",
++ user_name, (unsigned int) user_id,
++ SHADOW_AUDIT_SUCCESS);
+ #endif
+ #ifdef WITH_SELINUX
+- /* Reset SELinux to create files with default contexts */
+- setfscreatecon (NULL);
++ /* Reset SELinux to create files with default contexts */
++ setfscreatecon (NULL);
+ #endif
+- }
+ }
+
+ /*
+@@ -1861,6 +1946,7 @@
+ */
+ user_groups[0] = (char *) 0;
+
++ process_root_flag (argc, argv);
+
+ is_shadow_pwd = spw_file_present ();
+ #ifdef SHADOWGRP
+diff -urN shadow-4.1.4.3.orig//src/userdel.c shadow-4.1.4.3//src/userdel.c
+--- shadow-4.1.4.3.orig//src/userdel.c 2011-09-29 12:00:45.216000091 +0100
++++ shadow-4.1.4.3//src/userdel.c 2011-09-29 11:59:28.389000092 +0100
+@@ -79,6 +79,7 @@
+ static char *user_name;
+ static uid_t user_id;
+ static char *user_home;
++static const char *newroot = "";
+
+ static bool fflg = false;
+ static bool rflg = false;
+@@ -119,6 +120,7 @@
+ " -f, --force force removal of files,\n"
+ " even if not owned by user\n"
+ " -h, --help display this help message and exit\n"
++ " -R, --root CHROOT_DIR directory to chroot into\n"
+ " -r, --remove remove home directory and mail spool\n"
+ "\n"), stderr);
+ exit (E_USAGE);
+@@ -768,12 +770,34 @@
+ {"remove", no_argument, NULL, 'r'},
+ {NULL, 0, NULL, '\0'}
+ };
+- while ((c = getopt_long (argc, argv, "fhr",
++ while ((c = getopt_long (argc, argv, "fhR:r",
+ long_options, NULL)) != -1) {
+ switch (c) {
+ case 'f': /* force remove even if not owned by user */
+ fflg = true;
+ break;
++ case 'R':
++ if ('/' != optarg[0]) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, optarg);
++ exit (E_BAD_ARG);
++ }
++ newroot = optarg;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
+ case 'r': /* remove home dir and mailbox */
+ rflg = true;
+ break;
+diff -urN shadow-4.1.4.3.orig//src/usermod.c shadow-4.1.4.3//src/usermod.c
+--- shadow-4.1.4.3.orig//src/usermod.c 2011-09-29 12:00:45.216000091 +0100
++++ shadow-4.1.4.3//src/usermod.c 2011-09-29 11:59:28.390000092 +0100
+@@ -110,6 +110,7 @@
+ static long user_newinactive;
+ static long sys_ngroups;
+ static char **user_groups; /* NULL-terminated list */
++static const char *newroot = "";
+
+ static bool
+ aflg = false, /* append to existing secondary group set */
+@@ -164,6 +165,7 @@
+ #endif
+ static void grp_update (void);
+
++static void process_root_flag (int, char **);
+ static void process_flags (int, char **);
+ static void close_files (void);
+ static void open_files (void);
+@@ -323,6 +325,7 @@
+ " new location (use only with -d)\n"
+ " -o, --non-unique allow using duplicate (non-unique) UID\n"
+ " -p, --password PASSWORD use encrypted password for the new password\n"
++ " -R --root CHROOT_DIR directory to chroot into\n"
+ " -s, --shell SHELL new login shell for the user account\n"
+ " -u, --uid UID new UID for the user account\n"
+ " -U, --unlock unlock the user account\n"
+@@ -802,6 +805,58 @@
+ }
+
+ /*
++ * process_root_flag - chroot if given the --root option
++ *
++ * We do this outside of process_flags() because
++ * the is_shadow_pwd boolean needs to be set before
++ * process_flags(), and if we do need to chroot() we
++ * must do so before is_shadow_pwd gets set.
++ */
++static void process_root_flag (int argc, char **argv)
++{
++ /*
++ * Parse the command line options.
++ */
++ int i;
++ char *root;
++
++ for (i = 0; i < argc; i++) {
++ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
++ if (i + 1 == argc) {
++ fprintf (stderr,
++ _("%s: option '%s' requires an argument\n"),
++ Prog, argv[i]);
++ exit (E_BAD_ARG);
++ }
++ root = argv[i + 1];
++
++ if ( (!VALID (root) )
++ || ( ('/' != root[0]) ) ) {
++ fprintf (stderr,
++ _("%s: invalid chroot path '%s'\n"),
++ Prog, root);
++ exit (E_BAD_ARG);
++ }
++ newroot = root;
++
++ if (access (newroot, F_OK) != 0) {
++ fprintf(stderr,
++ _("%s: chroot directory %s does not exist\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ if ( chroot(newroot) != 0 ) {
++ fprintf(stderr,
++ _("%s: unable to chroot to directory %s\n"),
++ Prog, newroot);
++ exit (E_BAD_ARG);
++ }
++ break;
++ }
++ }
++}
++
++/*
+ * process_flags - perform command line argument setting
+ *
+ * process_flags() interprets the command line arguments and sets the
+@@ -895,6 +950,7 @@
+ {"move-home", no_argument, NULL, 'm'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
++ {"root", required_argument, NULL, 'R'},
+ #ifdef WITH_SELINUX
+ {"selinux-user", required_argument, NULL, 'Z'},
+ #endif
+@@ -905,9 +961,9 @@
+ };
+ while ((c = getopt_long (argc, argv,
+ #ifdef WITH_SELINUX
+- "ac:d:e:f:g:G:hl:Lmop:s:u:UZ:",
++ "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
+ #else
+- "ac:d:e:f:g:G:hl:Lmop:s:u:U",
++ "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
+ #endif
+ long_options, NULL)) != -1) {
+ switch (c) {
+@@ -999,6 +1055,9 @@
+ user_pass = optarg;
+ pflg = true;
+ break;
++ case 'R':
++ /* no-op since we handled this in process_root_flag() earlier */
++ break;
+ case 's':
+ if (!VALID (optarg)) {
+ fprintf (stderr,
+@@ -1715,6 +1774,8 @@
+
+ OPENLOG ("usermod");
+
++ process_root_flag (argc, argv);
++
+ is_shadow_pwd = spw_file_present ();
+ #ifdef SHADOWGRP
+ is_shadow_grp = sgr_file_present ();
diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch
new file mode 100644
index 000000000..1943fd6fa
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/disable-syslog.patch
@@ -0,0 +1,34 @@
+Disable use of syslog to prevent sysroot user and group additions from
+writing entries to the host's syslog. This patch should only be used
+with the shadow-native recipe.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
+--- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800
++++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700
+@@ -34,6 +34,9 @@
+
+ #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
+--- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800
++++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700
+@@ -34,6 +34,9 @@
+
+ #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
+
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
diff --git a/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
new file mode 100644
index 000000000..8a68dd341
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
@@ -0,0 +1,386 @@
+#
+# /etc/login.defs - Configuration control definitions for the shadow package.
+#
+# $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $
+#
+
+#
+# Delay in seconds before being allowed another attempt after a login failure
+# Note: When PAM is used, some modules may enfore a minimal delay (e.g.
+# pam_unix enforces a 2s delay)
+#
+FAIL_DELAY 3
+
+#
+# Enable logging and display of /var/log/faillog login failure info.
+#
+#FAILLOG_ENAB yes
+
+#
+# Enable display of unknown usernames when login failures are recorded.
+#
+LOG_UNKFAIL_ENAB no
+
+#
+# Enable logging of successful logins
+#
+LOG_OK_LOGINS no
+
+#
+# Enable logging and display of /var/log/lastlog login time info.
+#
+#LASTLOG_ENAB yes
+
+#
+# Enable checking and display of mailbox status upon login.
+#
+# Disable if the shell startup files already check for mail
+# ("mailx -e" or equivalent).
+#
+##MAIL_CHECK_ENAB yes
+
+#
+# Enable additional checks upon password changes.
+#
+#OBSCURE_CHECKS_ENAB yes
+
+#
+# Enable checking of time restrictions specified in /etc/porttime.
+#
+#PORTTIME_CHECKS_ENAB yes
+
+#
+# Enable setting of ulimit, umask, and niceness from passwd gecos field.
+#
+#QUOTAS_ENAB yes
+
+#
+# Enable "syslog" logging of su activity - in addition to sulog file logging.
+# SYSLOG_SG_ENAB does the same for newgrp and sg.
+#
+SYSLOG_SU_ENAB yes
+SYSLOG_SG_ENAB yes
+
+#
+# If defined, either full pathname of a file containing device names or
+# a ":" delimited list of device names. Root logins will be allowed only
+# upon these devices.
+#
+CONSOLE /etc/securetty
+#CONSOLE console:tty01:tty02:tty03:tty04
+
+#
+# If defined, all su activity is logged to this file.
+#
+#SULOG_FILE /var/log/sulog
+
+#
+# If defined, ":" delimited list of "message of the day" files to
+# be displayed upon login.
+#
+#MOTD_FILE /etc/motd
+#MOTD_FILE /etc/motd:/usr/lib/news/news-motd
+
+#
+# If defined, this file will be output before each login prompt.
+#
+#ISSUE_FILE /etc/issue
+
+#
+# If defined, file which maps tty line to TERM environment parameter.
+# Each line of the file is in a format something like "vt100 tty01".
+#
+#TTYTYPE_FILE /etc/ttytype
+
+#
+# If defined, login failures will be logged here in a utmp format.
+# last, when invoked as lastb, will read /var/log/btmp, so...
+#
+#FTMP_FILE /var/log/btmp
+
+#
+# If defined, name of file whose presence which will inhibit non-root
+# logins. The contents of this file should be a message indicating
+# why logins are inhibited.
+#
+#NOLOGINS_FILE /etc/nologin
+
+#
+# If defined, the command name to display when running "su -". For
+# example, if this is defined as "su" then a "ps" will display the
+# command is "-su". If not defined, then "ps" would display the
+# name of the shell actually being run, e.g. something like "-sh".
+#
+SU_NAME su
+
+#
+# *REQUIRED*
+# Directory where mailboxes reside, _or_ name of file, relative to the
+# home directory. If you _do_ define both, #MAIL_DIR takes precedence.
+#
+#MAIL_DIR /var/spool/mail
+MAIL_FILE .mail
+
+#
+# If defined, file which inhibits all the usual chatter during the login
+# sequence. If a full pathname, then hushed mode will be enabled if the
+# user's name or shell are found in the file. If not a full pathname, then
+# hushed mode will be enabled if the file exists in the user's home directory.
+#
+HUSHLOGIN_FILE .hushlogin
+#HUSHLOGIN_FILE /etc/hushlogins
+
+#
+# If defined, either a TZ environment parameter spec or the
+# fully-rooted pathname of a file containing such a spec.
+#
+#ENV_TZ TZ=CST6CDT
+#ENV_TZ /etc/tzname
+
+#
+# If defined, an HZ environment parameter spec.
+#
+# for Linux/x86
+#ENV_HZ HZ=100
+# For Linux/Alpha...
+#ENV_HZ HZ=1024
+
+#
+# *REQUIRED* The default PATH settings, for superuser and normal users.
+#
+# (they are minimal, add the rest in the shell startup files)
+ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ENV_PATH PATH=/bin:/usr/bin
+
+#
+# Terminal permissions
+#
+# TTYGROUP Login tty will be assigned this group ownership.
+# TTYPERM Login tty will be set to this permission.
+#
+# If you have a "write" program which is "setgid" to a special group
+# which owns the terminals, define TTYGROUP to the group number and
+# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
+# TTYPERM to either 622 or 600.
+#
+TTYGROUP tty
+TTYPERM 0600
+
+#
+# Login configuration initializations:
+#
+# ERASECHAR Terminal ERASE character ('\010' = backspace).
+# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
+# ULIMIT Default "ulimit" value.
+#
+# The ERASECHAR and KILLCHAR are used only on System V machines.
+# The ULIMIT is used only if the system supports it.
+# (now it works with setrlimit too; ulimit is in 512-byte units)
+#
+# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
+#
+ERASECHAR 0177
+KILLCHAR 025
+#ULIMIT 2097152
+
+# Default initial "umask" value for non-PAM enabled systems.
+# UMASK is also used by useradd and newusers to set the mode of new home
+# directories.
+# 022 is the default value, but 027, or even 077, could be considered
+# better for privacy. There is no One True Answer here: each sysadmin
+# must make up her mind.
+UMASK 022
+
+#
+# Password aging controls:
+#
+# PASS_MAX_DAYS Maximum number of days a password may be used.
+# PASS_MIN_DAYS Minimum number of days allowed between password changes.
+# PASS_MIN_LEN Minimum acceptable password length.
+# PASS_WARN_AGE Number of days warning given before a password expires.
+#
+PASS_MAX_DAYS 99999
+PASS_MIN_DAYS 0
+#PASS_MIN_LEN 5
+PASS_WARN_AGE 7
+
+#
+# If "yes", the user must be listed as a member of the first gid 0 group
+# in /etc/group (called "root" on most Linux systems) to be able to "su"
+# to uid 0 accounts. If the group doesn't exist or is empty, no one
+# will be able to "su" to uid 0.
+#
+#SU_WHEEL_ONLY no
+
+#
+# If compiled with cracklib support, where are the dictionaries
+#
+#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict
+
+#
+# Min/max values for automatic uid selection in useradd
+#
+UID_MIN 1000
+UID_MAX 60000
+# System accounts
+SYS_UID_MIN 101
+SYS_UID_MAX 999
+
+#
+# Min/max values for automatic gid selection in groupadd
+#
+GID_MIN 1000
+GID_MAX 60000
+# System accounts
+SYS_GID_MIN 101
+SYS_GID_MAX 999
+
+#
+# Max number of login retries if password is bad
+#
+LOGIN_RETRIES 5
+
+#
+# Max time in seconds for login
+#
+LOGIN_TIMEOUT 60
+
+#
+# Maximum number of attempts to change password if rejected (too easy)
+#
+#PASS_CHANGE_TRIES 5
+
+#
+# Warn about weak passwords (but still allow them) if you are root.
+#
+#PASS_ALWAYS_WARN yes
+
+#
+# Number of significant characters in the password for crypt().
+# Default is 8, don't change unless your crypt() is better.
+# Ignored if MD5_CRYPT_ENAB set to "yes".
+#
+#PASS_MAX_LEN 8
+
+#
+# Require password before chfn/chsh can make any changes.
+#
+#CHFN_AUTH yes
+
+#
+# Which fields may be changed by regular users using chfn - use
+# any combination of letters "frwh" (full name, room number, work
+# phone, home phone). If not defined, no changes are allowed.
+# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
+#
+CHFN_RESTRICT rwh
+
+#
+# Password prompt (%s will be replaced by user name).
+#
+# XXX - it doesn't work correctly yet, for now leave it commented out
+# to use the default which is just "Password: ".
+#LOGIN_STRING "%s's Password: "
+
+#
+# Only works if compiled with MD5_CRYPT defined:
+# If set to "yes", new passwords will be encrypted using the MD5-based
+# algorithm compatible with the one used by recent releases of FreeBSD.
+# It supports passwords of unlimited length and longer salt strings.
+# Set to "no" if you need to copy encrypted passwords to other systems
+# which don't understand the new algorithm. Default is "no".
+#
+# Note: If you use PAM, it is recommended to use a value consistent with
+# the PAM modules configuration.
+#
+# This variable is deprecated. You should use ENCRYPT_METHOD.
+#
+#MD5_CRYPT_ENAB no
+
+#
+# Only works if compiled with ENCRYPTMETHOD_SELECT defined:
+# If set to MD5 , MD5-based algorithm will be used for encrypting password
+# If set to SHA256, SHA256-based algorithm will be used for encrypting password
+# If set to SHA512, SHA512-based algorithm will be used for encrypting password
+# If set to DES, DES-based algorithm will be used for encrypting password (default)
+# Overrides the MD5_CRYPT_ENAB option
+#
+# Note: If you use PAM, it is recommended to use a value consistent with
+# the PAM modules configuration.
+#
+#ENCRYPT_METHOD DES
+
+#
+# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
+#
+# Define the number of SHA rounds.
+# With a lot of rounds, it is more difficult to brute forcing the password.
+# But note also that it more CPU resources will be needed to authenticate
+# users.
+#
+# If not specified, the libc will choose the default number of rounds (5000).
+# The values must be inside the 1000-999999999 range.
+# If only one of the MIN or MAX values is set, then this value will be used.
+# If MIN > MAX, the highest value will be used.
+#
+# SHA_CRYPT_MIN_ROUNDS 5000
+# SHA_CRYPT_MAX_ROUNDS 5000
+
+#
+# List of groups to add to the user's supplementary group set
+# when logging in on the console (as determined by the CONSOLE
+# setting). Default is none.
+#
+# Use with caution - it is possible for users to gain permanent
+# access to these groups, even when not logged in on the console.
+# How to do it is left as an exercise for the reader...
+#
+#CONSOLE_GROUPS floppy:audio:cdrom
+
+#
+# Should login be allowed if we can't cd to the home directory?
+# Default in no.
+#
+DEFAULT_HOME yes
+
+#
+# If this file exists and is readable, login environment will be
+# read from it. Every line should be in the form name=value.
+#
+#ENVIRON_FILE /etc/environment
+
+#
+# If defined, this command is run when removing a user.
+# It should remove any at/cron/print jobs etc. owned by
+# the user to be removed (passed as the first argument).
+#
+#USERDEL_CMD /usr/sbin/userdel_local
+
+#
+# Enable setting of the umask group bits to be the same as owner bits
+# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
+# the same as gid, and username is the same as the primary group name.
+#
+# This also enables userdel to remove user groups if no members exist.
+#
+USERGROUPS_ENAB yes
+
+#
+# If set to a non-nul number, the shadow utilities will make sure that
+# groups never have more than this number of users on one line.
+# This permit to support split groups (groups split into multiple lines,
+# with the same group ID, to avoid limitation of the line length in the
+# group file).
+#
+# 0 is the default value and disables this feature.
+#
+#MAX_MEMBERS_PER_GROUP 0
+
+#
+# If useradd should create home directories for users by default (non
+# system users only)
+# This option is overridden with the -M or -m flags on the useradd command
+# line.
+#
+CREATE_HOME yes
+
diff --git a/meta/recipes-extended/shadow/files/login_defs_pam.sed b/meta/recipes-extended/shadow/files/login_defs_pam.sed
new file mode 100644
index 000000000..0a1f3be4a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login_defs_pam.sed
@@ -0,0 +1,32 @@
+/^FAILLOG_ENAB/b comment
+/^LASTLOG_ENAB/b comment
+/^MAIL_CHECK_ENAB/b comment
+/^OBSCURE_CHECKS_ENAB/b comment
+/^PORTTIME_CHECKS_ENAB/b comment
+/^QUOTAS_ENAB/b comment
+/^MOTD_FILE/b comment
+/^FTMP_FILE/b comment
+/^NOLOGINS_FILE/b comment
+/^ENV_HZ/b comment
+/^ENV_TZ/b comment
+/^PASS_MIN_LEN/b comment
+/^SU_WHEEL_ONLY/b comment
+/^CRACKLIB_DICTPATH/b comment
+/^PASS_CHANGE_TRIES/b comment
+/^PASS_ALWAYS_WARN/b comment
+/^PASS_MAX_LEN/b comment
+/^PASS_MIN_LEN/b comment
+/^CHFN_AUTH/b comment
+/^CHSH_AUTH/b comment
+/^ISSUE_FILE/b comment
+/^LOGIN_STRING/b comment
+/^ULIMIT/b comment
+/^ENVIRON_FILE/b comment
+
+b exit
+
+: comment
+ s:^:#:
+
+: exit
+
diff --git a/meta/recipes-extended/shadow/files/pam.d/chfn b/meta/recipes-extended/shadow/files/pam.d/chfn
new file mode 100644
index 000000000..baf7698bb
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chfn
@@ -0,0 +1,14 @@
+#
+# The PAM configuration file for the Shadow `chfn' service
+#
+
+# This allows root to change user infomation without being
+# prompted for a password
+auth sufficient pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth include common-auth
+account include common-account
+session include common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd
new file mode 100644
index 000000000..9e3efa68b
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd
@@ -0,0 +1,4 @@
+# The PAM configuration file for the Shadow 'chpasswd' service
+#
+
+password include common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/chsh b/meta/recipes-extended/shadow/files/pam.d/chsh
new file mode 100644
index 000000000..8fb169f64
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chsh
@@ -0,0 +1,19 @@
+#
+# The PAM configuration file for the Shadow `chsh' service
+#
+
+# This will not allow a user to change their shell unless
+# their current one is listed in /etc/shells. This keeps
+# accounts with special shells from changing them.
+auth required pam_shells.so
+
+# This allows root to change user shell without being
+# prompted for a password
+auth sufficient pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth include common-auth
+account include common-account
+session include common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/login b/meta/recipes-extended/shadow/files/pam.d/login
new file mode 100644
index 000000000..e4dacc226
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/login
@@ -0,0 +1,84 @@
+#
+# The PAM configuration file for the Shadow `login' service
+#
+
+# Enforce a minimal delay in case of failure (in microseconds).
+# (Replaces the `FAIL_DELAY' setting from login.defs)
+# Note that other modules may require another minimal delay. (for example,
+# to disable any delay, you should add the nodelay option to pam_unix)
+auth optional pam_faildelay.so delay=3000000
+
+# Outputs an issue file prior to each login prompt (Replaces the
+# ISSUE_FILE option from login.defs). Uncomment for use
+# auth required pam_issue.so issue=/etc/issue
+
+# Disallows root logins except on tty's listed in /etc/securetty
+# (Replaces the `CONSOLE' setting from login.defs)
+# Note that it is included as a "requisite" module. No password prompts will
+# be displayed if this module fails to avoid having the root password
+# transmitted on unsecure ttys.
+# You can change it to a "required" module if you think it permits to
+# guess valid user names of your system (invalid user names are considered
+# as possibly being root).
+auth [success=ok ignore=ignore user_unknown=ignore default=die] pam_securetty.so
+
+# Disallows other than root logins when /etc/nologin exists
+# (Replaces the `NOLOGINS_FILE' option from login.defs)
+auth requisite pam_nologin.so
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+#
+# parsing /etc/environment needs "readenv=1"
+session required pam_env.so readenv=1
+# locale variables are also kept into /etc/default/locale in etch
+# reading this file *in addition to /etc/environment* does not hurt
+session required pam_env.so readenv=1 envfile=/etc/default/locale
+
+# Standard Un*x authentication.
+auth include common-auth
+
+# This allows certain extra groups to be granted to a user
+# based on things like time of day, tty, service, and user.
+# Please edit /etc/security/group.conf to fit your needs
+# (Replaces the `CONSOLE_GROUPS' option in login.defs)
+auth optional pam_group.so
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on logins.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account requisite pam_time.so
+
+# Uncomment and edit /etc/security/access.conf if you need to
+# set access limits.
+# (Replaces /etc/login.access file)
+# account required pam_access.so
+
+# Sets up user limits according to /etc/security/limits.conf
+# (Replaces the use of /etc/limits in old login)
+session required pam_limits.so
+
+# Prints the last login info upon succesful login
+# (Replaces the `LASTLOG_ENAB' option from login.defs)
+session optional pam_lastlog.so
+
+# Prints the motd upon succesful login
+# (Replaces the `MOTD_FILE' option in login.defs)
+session optional pam_motd.so
+
+# Prints the status of the user's mailbox upon succesful login
+# (Replaces the `MAIL_CHECK_ENAB' option from login.defs).
+#
+# This also defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+session optional pam_mail.so standard
+
+# Standard Un*x account and session
+account include common-account
+password include common-password
+session include common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers
new file mode 100644
index 000000000..4aa3dde48
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/newusers
@@ -0,0 +1,4 @@
+# The PAM configuration file for the Shadow 'newusers' service
+#
+
+password include common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/passwd b/meta/recipes-extended/shadow/files/pam.d/passwd
new file mode 100644
index 000000000..f53499243
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/passwd
@@ -0,0 +1,5 @@
+#
+# The PAM configuration file for the Shadow `passwd' service
+#
+
+password include common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/su b/meta/recipes-extended/shadow/files/pam.d/su
new file mode 100644
index 000000000..8e35137f3
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/su
@@ -0,0 +1,60 @@
+#
+# The PAM configuration file for the Shadow `su' service
+#
+
+# This allows root to su without passwords (normal operation)
+auth sufficient pam_rootok.so
+
+# Uncomment this to force users to be a member of group root
+# before they can use `su'. You can also add "group=foo"
+# to the end of this line if you want to use a group other
+# than the default "root" (but this may have side effect of
+# denying "root" user, unless she's a member of "foo" or explicitly
+# permitted earlier by e.g. "sufficient pam_rootok.so").
+# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
+# auth required pam_wheel.so
+
+# Uncomment this if you want wheel members to be able to
+# su without a password.
+# auth sufficient pam_wheel.so trust
+
+# Uncomment this if you want members of a specific group to not
+# be allowed to use su at all.
+# auth required pam_wheel.so deny group=nosu
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on su usage.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account requisite pam_time.so
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+#
+# parsing /etc/environment needs "readenv=1"
+session required pam_env.so readenv=1
+# locale variables are also kept into /etc/default/locale in etch
+# reading this file *in addition to /etc/environment* does not hurt
+session required pam_env.so readenv=1 envfile=/etc/default/locale
+
+# Defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+#
+# "nopen" stands to avoid reporting new mail when su'ing to another user
+session optional pam_mail.so nopen
+
+# Sets up user limits, please uncomment and read /etc/security/limits.conf
+# to enable this functionality.
+# (Replaces the use of /etc/limits in old login)
+# session required pam_limits.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth include common-auth
+account include common-account
+session include common-session
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
new file mode 100644
index 000000000..a06dc4450
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -0,0 +1,209 @@
+# /etc/securetty: list of terminals on which root is allowed to login.
+# See securetty(5) and login(1).
+console
+
+# Standard serial ports
+ttyS0
+ttyS1
+ttyS2
+ttyS3
+
+# Samsung ARM SoCs
+ttySAC0
+ttySAC1
+ttySAC2
+ttySAC3
+
+# TI OMAP SoCs
+ttyO0
+ttyO1
+ttyO2
+ttyO3
+
+# USB dongles
+ttyUSB0
+ttyUSB1
+ttyUSB2
+
+# USB serial gadget
+ttyGS0
+
+# PowerMac
+ttyPZ0
+ttyPZ1
+ttyPZ2
+ttyPZ3
+
+# Embedded MPC platforms
+ttyPSC0
+ttyPSC1
+ttyPSC2
+ttyPSC3
+ttyPSC4
+ttyPSC5
+
+# PA-RISC mux ports
+ttyB0
+ttyB1
+
+# Standard hypervisor virtual console
+hvc0
+
+# Oldstyle Xen console
+xvc0
+
+# Standard consoles
+tty1
+tty2
+tty3
+tty4
+tty5
+tty6
+tty7
+tty8
+tty9
+tty10
+tty11
+tty12
+tty13
+tty14
+tty15
+tty16
+tty17
+tty18
+tty19
+tty20
+tty21
+tty22
+tty23
+tty24
+tty25
+tty26
+tty27
+tty28
+tty29
+tty30
+tty31
+tty32
+tty33
+tty34
+tty35
+tty36
+tty37
+tty38
+tty39
+tty40
+tty41
+tty42
+tty43
+tty44
+tty45
+tty46
+tty47
+tty48
+tty49
+tty50
+tty51
+tty52
+tty53
+tty54
+tty55
+tty56
+tty57
+tty58
+tty59
+tty60
+tty61
+tty62
+tty63
+
+# Local X displays (allows empty passwords with pam_unix's nullok_secure)
+:0
+:0.0
+:0.1
+:1
+:1.0
+:1.1
+:2
+:2.0
+:2.1
+:3
+:3.0
+:3.1
+
+# Embedded Freescale i.MX ports
+ttymxc0
+ttymxc1
+ttymxc2
+ttymxc3
+ttymxc4
+ttymxc5
+
+# Standard serial ports, with devfs
+tts/0
+tts/1
+
+# Standard consoles, with devfs
+vc/1
+vc/2
+vc/3
+vc/4
+vc/5
+vc/6
+vc/7
+vc/8
+vc/9
+vc/10
+vc/11
+vc/12
+vc/13
+vc/14
+vc/15
+vc/16
+vc/17
+vc/18
+vc/19
+vc/20
+vc/21
+vc/22
+vc/23
+vc/24
+vc/25
+vc/26
+vc/27
+vc/28
+vc/29
+vc/30
+vc/31
+vc/32
+vc/33
+vc/34
+vc/35
+vc/36
+vc/37
+vc/38
+vc/39
+vc/40
+vc/41
+vc/42
+vc/43
+vc/44
+vc/45
+vc/46
+vc/47
+vc/48
+vc/49
+vc/50
+vc/51
+vc/52
+vc/53
+vc/54
+vc/55
+vc/56
+vc/57
+vc/58
+vc/59
+vc/60
+vc/61
+vc/62
+vc/63
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
new file mode 100644
index 000000000..a7bb0a929
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
@@ -0,0 +1,27 @@
+# commit message copied from openembedded:
+# commit 246c80637b135f3a113d319b163422f98174ee6c
+# Author: Khem Raj <raj.khem@gmail.com>
+# Date: Wed Jun 9 13:37:03 2010 -0700
+#
+# shadow-4.1.4.2: Add patches to support dots in login id.
+#
+# Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: shadow-4.1.4.2/libmisc/chkname.c
+===================================================================
+--- shadow-4.1.4.2.orig/libmisc/chkname.c 2009-04-28 12:14:04.000000000 -0700
++++ shadow-4.1.4.2/libmisc/chkname.c 2010-06-03 17:43:20.638973857 -0700
+@@ -61,6 +61,7 @@ static bool is_valid_name (const char *n
+ ( ('0' <= *name) && ('9' >= *name) ) ||
+ ('_' == *name) ||
+ ('-' == *name) ||
++ ('.' == *name) ||
+ ( ('$' == *name) && ('\0' == *(name + 1)) )
+ )) {
+ return false;
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
new file mode 100644
index 000000000..651474674
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
@@ -0,0 +1,31 @@
+# commit message copied from openembedded:
+# commit 246c80637b135f3a113d319b163422f98174ee6c
+# Author: Khem Raj <raj.khem@gmail.com>
+# Date: Wed Jun 9 13:37:03 2010 -0700
+#
+# shadow-4.1.4.2: Add patches to support dots in login id.
+#
+# Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
+
+http://bugs.gentoo.org/283725
+https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: shadow-4.1.4.2/libmisc/env.c
+===================================================================
+--- shadow-4.1.4.2.orig/libmisc/env.c 2009-04-27 13:07:56.000000000 -0700
++++ shadow-4.1.4.2/libmisc/env.c 2010-06-03 17:44:51.456408474 -0700
+@@ -251,7 +251,7 @@ void sanitize_env (void)
+ if (strncmp (*cur, *bad, strlen (*bad)) != 0) {
+ continue;
+ }
+- if (strchr (*cur, '/') != NULL) {
++ if (strchr (*cur, '/') == NULL) {
+ continue; /* OK */
+ }
+ for (move = cur; NULL != *move; move++) {
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
new file mode 100644
index 000000000..640200b79
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
@@ -0,0 +1,36 @@
+# commit message copied from openembedded:
+# commit 246c80637b135f3a113d319b163422f98174ee6c
+# Author: Khem Raj <raj.khem@gmail.com>
+# Date: Wed Jun 9 13:37:03 2010 -0700
+#
+# shadow-4.1.4.2: Add patches to support dots in login id.
+#
+# Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
+
+http://bugs.gentoo.org/300790
+http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html
+
+2009-11-05 Nicolas François <nicolas.francois@centraliens.net>
+
+ * NEWS, src/groupmod.c: Fixed groupmod when configured with
+ --enable-account-tools-setuid.
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: shadow-4.1.4.2/src/groupmod.c
+===================================================================
+--- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700
++++ shadow-4.1.4.2/src/groupmod.c 2010-06-03 17:45:43.828952613 -0700
+@@ -720,7 +720,7 @@ int main (int argc, char **argv)
+ {
+ struct passwd *pampw;
+ pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
+- if (NULL == pamh) {
++ if (NULL == pampw) {
+ fprintf (stderr,
+ _("%s: Cannot determine your user name.\n"),
+ Prog);
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
new file mode 100644
index 000000000..0dc4d75b9
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
@@ -0,0 +1,31 @@
+# commit message copied from openembedded:
+# commit 246c80637b135f3a113d319b163422f98174ee6c
+# Author: Khem Raj <raj.khem@gmail.com>
+# Date: Wed Jun 9 13:37:03 2010 -0700
+#
+# shadow-4.1.4.2: Add patches to support dots in login id.
+#
+# Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
+
+http://bugs.gentoo.org/show_bug.cgi?id=301957
+https://alioth.debian.org/scm/browser.php?group_id=30580
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: shadow-4.1.4.2/src/su.c
+===================================================================
+--- shadow-4.1.4.2.orig/src/su.c 2009-07-23 13:38:56.000000000 -0700
++++ shadow-4.1.4.2/src/su.c 2010-06-03 17:46:47.718944010 -0700
+@@ -378,7 +378,7 @@ int main (int argc, char **argv)
+ #endif
+ #endif /* !USE_PAM */
+
+- sanitize_env ();
++ /* sanitize_env (); */
+
+ (void) setlocale (LC_ALL, "");
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
diff --git a/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
new file mode 100644
index 000000000..15f8044fa
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
@@ -0,0 +1,91 @@
+The system-auth in the configure files is from Fedora which put all the 4 pam type rules
+in one file.
+In yocto it obey the way with Debian/Ubuntu, and the names are common-auth, common-account,
+common-password and common-session.
+So update them with oe way.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chage shadow-4.1.4.3/etc/pam.d/chage
+--- shadow-4.1.4.3/etc/pam.d.orig/chage 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/chage 2011-07-20 19:03:08.964844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chgpasswd shadow-4.1.4.3/etc/pam.d/chgpasswd
+--- shadow-4.1.4.3/etc/pam.d.orig/chgpasswd 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/chgpasswd 2011-07-20 19:03:26.544844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupadd shadow-4.1.4.3/etc/pam.d/groupadd
+--- shadow-4.1.4.3/etc/pam.d.orig/groupadd 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupadd 2011-07-20 19:04:08.124844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupdel shadow-4.1.4.3/etc/pam.d/groupdel
+--- shadow-4.1.4.3/etc/pam.d.orig/groupdel 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupdel 2011-07-20 19:04:26.114844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmems shadow-4.1.4.3/etc/pam.d/groupmems
+--- shadow-4.1.4.3/etc/pam.d.orig/groupmems 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupmems 2011-07-20 19:04:35.074844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmod shadow-4.1.4.3/etc/pam.d/groupmod
+--- shadow-4.1.4.3/etc/pam.d.orig/groupmod 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupmod 2011-07-20 19:04:44.864844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/useradd shadow-4.1.4.3/etc/pam.d/useradd
+--- shadow-4.1.4.3/etc/pam.d.orig/useradd 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/useradd 2011-07-20 19:07:26.244844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/userdel shadow-4.1.4.3/etc/pam.d/userdel
+--- shadow-4.1.4.3/etc/pam.d.orig/userdel 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/userdel 2011-07-20 19:07:35.734844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/usermod shadow-4.1.4.3/etc/pam.d/usermod
+--- shadow-4.1.4.3/etc/pam.d.orig/usermod 2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/usermod 2011-07-20 19:07:42.024844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth sufficient pam_rootok.so
+ account required pam_permit.so
+-password include system-auth
++password include common-password
diff --git a/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch b/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
new file mode 100644
index 000000000..a793f09a4
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
@@ -0,0 +1,106 @@
+# patch is from openembedded:
+# commit 2db61370333f7a2fc1dbb86385734883387e0217
+# Author: Martin Jansa <Martin.Jansa@gmail.com>
+# Date: Fri Apr 2 07:34:46 2010 +0200
+#
+# shadow: fix do_install with automake-1.11
+#
+# Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>
+
+man_nopan is for !USE_PAM already included in man_MANS and automake-1.11 hates to install some file twice
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -uNr shadow-4.1.4.2.orig/man/Makefile.am shadow-4.1.4.2/man/Makefile.am
+--- shadow-4.1.4.2.orig/man/Makefile.am 2009-03-14 15:40:10.000000000 +0100
++++ shadow-4.1.4.2/man/Makefile.am 2010-04-02 07:31:17.000000000 +0200
+@@ -163,7 +163,6 @@
+ $(man_MANS) \
+ $(man_XMANS) \
+ $(addprefix login.defs.d/,$(login_defs_v)) \
+- $(man_nopam) \
+ id.1 \
+ id.1.xml \
+ sulogin.8 \
+diff -uNr shadow-4.1.4.2.orig/man/fr/Makefile.am shadow-4.1.4.2/man/fr/Makefile.am
+--- shadow-4.1.4.2.orig/man/fr/Makefile.am 2008-09-06 18:44:45.000000000 +0200
++++ shadow-4.1.4.2/man/fr/Makefile.am 2010-04-02 07:42:11.000000000 +0200
+@@ -52,7 +52,6 @@
+
+ EXTRA_DIST = \
+ $(man_MANS) \
+- $(man_nopam) \
+ id.1
+
+ include ../generate_translations.mak
+diff -uNr shadow-4.1.4.2.orig/man/it/Makefile.am shadow-4.1.4.2/man/it/Makefile.am
+--- shadow-4.1.4.2.orig/man/it/Makefile.am 2008-09-06 18:44:45.000000000 +0200
++++ shadow-4.1.4.2/man/it/Makefile.am 2010-04-02 07:42:20.000000000 +0200
+@@ -46,7 +46,6 @@
+
+ EXTRA_DIST = \
+ $(man_MANS) \
+- $(man_nopam) \
+ id.1 \
+ logoutd.8
+
+diff -uNr shadow-4.1.4.2.orig/man/ja/Makefile.am shadow-4.1.4.2/man/ja/Makefile.am
+--- shadow-4.1.4.2.orig/man/ja/Makefile.am 2007-12-31 17:48:28.000000000 +0100
++++ shadow-4.1.4.2/man/ja/Makefile.am 2010-04-02 07:42:17.000000000 +0200
+@@ -49,7 +49,6 @@
+
+ EXTRA_DIST = \
+ $(man_MANS) \
+- $(man_nopam) \
+ id.1 \
+ shadow.3 \
+ sulogin.8
+diff -uNr shadow-4.1.4.2.orig/man/pl/Makefile.am shadow-4.1.4.2/man/pl/Makefile.am
+--- shadow-4.1.4.2.orig/man/pl/Makefile.am 2008-09-06 18:44:45.000000000 +0200
++++ shadow-4.1.4.2/man/pl/Makefile.am 2010-04-02 07:42:07.000000000 +0200
+@@ -49,7 +49,6 @@
+
+ EXTRA_DIST = \
+ $(man_MANS) \
+- $(man_nopam) \
+ getspnam.3 \
+ id.1 \
+ shadow.3 \
+diff -uNr shadow-4.1.4.2.orig/man/ru/Makefile.am shadow-4.1.4.2/man/ru/Makefile.am
+--- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:39:00.000000000 +0200
++++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:42:01.000000000 +0200
+@@ -54,7 +54,6 @@
+
+ EXTRA_DIST = \
+ $(man_MANS) \
+- $(man_nopam) \
+ id.1 \
+ sulogin.8
+
+diff -uNr shadow-4.1.4.2.orig/man/sv/Makefile.am shadow-4.1.4.2/man/sv/Makefile.am
+--- shadow-4.1.4.2.orig/man/sv/Makefile.am 2008-09-06 18:44:45.000000000 +0200
++++ shadow-4.1.4.2/man/sv/Makefile.am 2010-04-02 07:42:24.000000000 +0200
+@@ -53,8 +53,7 @@
+ endif
+
+ EXTRA_DIST = \
+- $(man_MANS) \
+- $(man_nopam)
++ $(man_MANS)
+
+ include ../generate_translations.mak
+
+--- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:54:09.000000000 +0200
++++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:51:57.000000000 +0200
+@@ -1,7 +1,6 @@
+ mandir = @mandir@/ru
+
+ man_MANS = \
+- $(man_nopam) \
+ chage.1 \
+ chfn.1 \
+ chgpasswd.8 \
diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch
new file mode 100644
index 000000000..ff5016c0b
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/useradd.patch
@@ -0,0 +1,17 @@
+Work around a bug introduced with the --root option which was causing
+all other arguments to be ignored.
+
+Upstream-Status: inappropriate
+Signed-off-by: Phil Blundell <philb@gnu.org>
+
+--- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100
++++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100
+@@ -1957,6 +1957,8 @@
+
+ get_defaults ();
+
++ optind = 1;
++
+ process_flags (argc, argv);
+
+ #ifdef ACCT_TOOLS_SETUID
diff --git a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
new file mode 100644
index 000000000..38bb92228
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Tools to change and administer password and group data"
+DESCRIPTION = "Tools to change and administer password and group data"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
+ file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe"
+
+PR = "r4"
+
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
+ file://shadow.automake-1.11.patch \
+ file://shadow-4.1.3-dots-in-usernames.patch \
+ file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+ file://add_root_cmd_options.patch \
+ file://disable-syslog.patch \
+ file://useradd.patch"
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+inherit autotools gettext native
+
+EXTRA_OECONF += "--without-audit \
+ --without-libcrack \
+ --without-libpam \
+ --without-selinux"
+
+do_install_append() {
+ # Enable CREATE_HOME by default.
+ sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
+
+ # As we are on an embedded system, ensure the users mailbox is in
+ # ~/ not /var/spool/mail by default, as who knows where or how big
+ # /var is. The system MDA will set this later anyway.
+ sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
+ sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
+
+ # Disable checking emails.
+ sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+
+ # Now we don't have a mail system. Disable mail creation for now.
+ sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
+ sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
+
+ install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
+ for i in passwd chfn newgrp chsh ; do
+ mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}
+ done
+
+ mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN}
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 200
+ update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 200
+ update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200
+ update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200
+ update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200
+}
+
+pkg_prerm_${PN} () {
+ for i in passwd chpasswd chfn newgrp chsh ; do
+ update-alternatives --remove $i $i.${PN}
+ done
+}
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
new file mode 100644
index 000000000..40b52a963
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Provider of the machine specific securetty file"
+DESCRIPTION = "Provider of the machine specific securetty file"
+SECTION = "base utils"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PR = "r1"
+
+SRC_URI = "file://securetty"
+
+# Since we deduce our arch from ${SERIAL_CONSOLE}
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install () {
+ # Ensure we add a suitable securetty file to the package that has
+ # most common embedded TTYs defined.
+ if [ ! -z "${SERIAL_CONSOLE}" ]; then
+ # Our SERIAL_CONSOLE contains a baud rate and sometimes a -L
+ # option as well. The following pearl :) takes that and converts
+ # it into newline-separated tty's and appends them into
+ # securetty. So if a machine has a weird looking console device
+ # node (e.g. ttyAMA0) that securetty does not know, it will get
+ # appended to securetty and root logins will be allowed on that
+ # console.
+ echo "${SERIAL_CONSOLE}" | sed -e 's/[0-9][0-9]\|\-L//g'|tr "[ ]" "[\n]" >> ${WORKDIR}/securetty
+ fi
+ install -d ${D}${sysconfdir}
+ install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
+}
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
new file mode 100644
index 000000000..d379c1fdd
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Shadow utils requirements for useradd.bbclass"
+DESCRIPTION = "Shadow utils requirements for useradd.bbclass"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
+
+DEPENDS = "base-passwd"
+
+PR = "r3"
+
+# The sole purpose of this recipe is to provide the /etc/login.defs
+# file for the target sysroot - needed so the shadow-native utilities
+# can add custom users/groups for recipes that use inherit useradd.
+SRC_URI = "file://login.defs_shadow-sysroot"
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${sysconfdir}
+ install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
+}
+
+sysroot_stage_all() {
+ sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
+}
+
+# don't create any packages
+# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
+# and this has another copy of /etc/login.defs already provided by shadow
+PACKAGES = ""
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
new file mode 100644
index 000000000..60fb78b37
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -0,0 +1,124 @@
+SUMMARY = "Tools to change and administer password and group data"
+DESCRIPTION = "Tools to change and administer password and group data"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
+ file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe"
+
+DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
+PR = "r9"
+
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
+ file://login_defs_pam.sed \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://shadow.automake-1.11.patch \
+ file://shadow-4.1.3-dots-in-usernames.patch \
+ file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+ file://shadow-4.1.4.2-groupmod-pam-check.patch \
+ file://shadow-4.1.4.2-su_no_sanitize_env.patch \
+ file://shadow-update-pam-conf.patch"
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+inherit autotools gettext
+
+EXTRA_OECONF += "--without-audit \
+ --without-libcrack \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \
+ --without-selinux"
+EXTRA_OECONF_libc-uclibc += "--with-nscd=no"
+
+PAM_PLUGINS = "libpam-runtime \
+ pam-plugin-faildelay \
+ pam-plugin-securetty \
+ pam-plugin-nologin \
+ pam-plugin-env \
+ pam-plugin-group \
+ pam-plugin-limits \
+ pam-plugin-lastlog \
+ pam-plugin-motd \
+ pam-plugin-mail \
+ pam-plugin-shells \
+ pam-plugin-rootok"
+
+# Additional Policy files for PAM
+PAM_SRC_URI = "file://pam.d/chfn \
+ file://pam.d/chpasswd \
+ file://pam.d/chsh \
+ file://pam.d/login \
+ file://pam.d/newusers \
+ file://pam.d/passwd \
+ file://pam.d/su"
+
+do_install_append() {
+ # Ensure that the image has as a /var/spool/mail dir so shadow can
+ # put mailboxes there if the user reconfigures shadow to its
+ # defaults (see sed below).
+ install -d ${D}${localstatedir}/spool/mail
+
+ if [ -e ${WORKDIR}/pam.d ]; then
+ install -d ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+ # Remove defaults that are not used when supporting PAM.
+ sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
+ fi
+
+ # Enable CREATE_HOME by default.
+ sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
+
+ # As we are on an embedded system, ensure the users mailbox is in
+ # ~/ not /var/spool/mail by default, as who knows where or how big
+ # /var is. The system MDA will set this later anyway.
+ sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
+ sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
+
+ # Disable checking emails.
+ sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+
+ # Now we don't have a mail system. Disable mail creation for now.
+ sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
+ sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
+
+ install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
+
+ # Move binaries to the locations we want
+ rm ${D}${sbindir}/vigr
+ ln -sf vipw.${PN} ${D}${base_sbindir}/vigr
+ mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
+ mv ${D}${bindir}/login ${D}${base_bindir}/login
+
+ # Handle link properly after rename, otherwise missing files would
+ # lead rpm failed dependencies.
+ ln -sf newgrp.${PN} ${D}${bindir}/sg
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "200"
+
+bindir_progs = "passwd chfn newgrp chsh groups"
+ALTERNATIVE_LINKS += "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}"
+
+sbindir_progs = "chpasswd"
+ALTERNATIVE_LINKS += "${sbindir}/${@' ${sbindir}/'.join((d.getVar('sbindir_progs', True)).split())}"
+
+base_bindir_progs = "login"
+ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}"
+
+base_sbindir_progs = "vipw vigr"
+ALTERNATIVE_LINKS += "${base_sbindir}/${@' ${base_sbindir}/'.join((d.getVar('base_sbindir_progs', True)).split())}"
+
+pkg_postinst_${PN} () {
+ if [ "x$D" != "x" ]; then
+ rootarg="--root=$D"
+ else
+ rootarg=""
+ fi
+
+ pwconv $rootarg
+ grpconv $rootarg
+}
diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch
new file mode 100644
index 000000000..50cac9264
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/rpathfix.patch
@@ -0,0 +1,70 @@
+Without this patch we see rpaths hardcoded into the build which results in QA
+warnings. These rpaths are not needed so lets turn this off.
+
+Upstream-Status: Inappropriate
+(but could be turned into a proper configure option)
+
+RP 2012/03/14
+
+Index: slang-2.2.4/configure
+===================================================================
+--- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000
++++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000
+@@ -6081,56 +6081,7 @@
+ ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
+ CFLAGS="$CFLAGS $IEEE_CFLAGS"
+
+-
+-if test "X$libdir" != "X"
+-then
+- if test "X$RPATH" = "X"
+- then
+-
+-case "$host_os" in
+- *linux*|*solaris* )
+- if test "X$GCC" = Xyes
+- then
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-Wl,-R,"
+- else
+- RPATH="-Wl,-R"
+- fi
+- else
+- if test "X$ac_R_nospace" = "Xno"
+- then
+- RPATH="-R "
+- else
+- RPATH="-R"
+- fi
+- fi
+- ;;
+- *osf*|*openbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-rpath,"
+- else
+- RPATH="-rpath "
+- fi
+- ;;
+- *netbsd*)
+- if test "X$GCC" = Xyes
+- then
+- RPATH="-Wl,-R"
+- fi
+- ;;
+-esac
+-
+- if test "X$RPATH" != "X"
+- then
+- RPATH="$RPATH$libdir"
+- fi
+- else
+- RPATH="$RPATH:$libdir"
+- fi
+-fi
+-
++RPATH=""
+
+ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
new file mode 100644
index 000000000..40f671ec1
--- /dev/null
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -0,0 +1,36 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language. S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "pcre"
+PR = "r7"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+
+SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
+ file://rpathfix.patch \
+ "
+
+inherit autotools
+
+SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
+SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
+
+EXTRA_OECONF += " --without-z --without-png --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
+}
+
+FILES_${PN} += "${datadir}/slsh/"
+
+PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
new file mode 100644
index 000000000..b7666f065
--- /dev/null
+++ b/meta/recipes-extended/stat/stat_3.3.bb
@@ -0,0 +1,25 @@
+SECTION = "console/utils"
+DESCRIPTION = "Display all information about a file that the stat() call provides and all information a filesystem that statfs() provides."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
+ file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+BBCLASSEXTEND = "native"
+
+PR = "r0"
+
+SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-3.3.tar.gz"
+SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
+SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
+
+do_install() {
+ install -d ${D}${bindir} ${D}${mandir}/man1
+ install -m 755 stat ${D}${bindir}
+ install -m 644 stat.1 ${D}${mandir}/man1
+}
+
+#do_install_virtclass-native() {
+# install -d ${D}${bindir}
+# install -m 755 stat ${D}${bindir}
+#}
+
diff --git a/meta/recipes-extended/sudo/files/libtool.patch b/meta/recipes-extended/sudo/files/libtool.patch
new file mode 100644
index 000000000..b0cd67551
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/libtool.patch
@@ -0,0 +1,24 @@
+Fix path to libtool scripts so autoreconf can succeed.
+
+Upstream-Status: Inappropriate [Other]
+Workaround is specific to our build system.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -urN sudo-1.7.4p4.orig//aclocal.m4 sudo-1.7.4p4//aclocal.m4
+--- sudo-1.7.4p4.orig//aclocal.m4 2010-08-06 07:17:36.000000000 -0700
++++ sudo-1.7.4p4//aclocal.m4 2010-11-22 14:38:20.360957038 -0800
+@@ -368,8 +368,8 @@
+ dnl
+ dnl Pull in libtool macros
+ dnl
+-m4_include([libtool.m4])
+-m4_include([ltoptions.m4])
+-m4_include([ltsugar.m4])
+-m4_include([ltversion.m4])
+-m4_include([lt~obsolete.m4])
++m4_include([m4/libtool.m4])
++m4_include([m4/ltoptions.m4])
++m4_include([m4/ltsugar.m4])
++m4_include([m4/ltversion.m4])
++m4_include([m4/lt~obsolete.m4])
diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam
new file mode 100644
index 000000000..5bc26e702
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/sudo.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth include common-auth
+account include common-account
+password include common-password
+session required pam_keyinit.so revoke
+session required pam_limits.so
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
new file mode 100644
index 000000000..216869052
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -0,0 +1,32 @@
+SUMMARY = "Provide limited super user privileges to specific users"
+DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."
+HOMEPAGE = "http://www.sudo.ws"
+BUGTRACKER = "http://www.sudo.ws/bugs/"
+SECTION = "admin"
+LICENSE = "ISC & BSD & Zlib"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=19f95c610f585c26a836975654807669 \
+ file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=fba1c1dca0951819964dfdc618e81724 \
+ file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
+ file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
+ file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea"
+
+inherit autotools
+
+EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
+
+do_configure_prepend () {
+ if [ ! -e acinclude.m4 ]; then
+ cat aclocal.m4 > acinclude.m4
+ fi
+}
+
+# Explicitly create ${localstatedir}/lib before do_install to ensure
+# the directory is accessible by all users. Otherwise the mkinstalldirs
+# script (from sudo) will recursively create ${localstatedir}/lib/sudo
+# and then chmod each directory with 0700 permissions, which isn't what
+# we want (i.e, users would not be able to access /var/lib).
+do_install_prepend (){
+ mkdir -p ${D}/${localstatedir}/lib
+}
+
diff --git a/meta/recipes-extended/sudo/sudo_1.8.4p4.bb b/meta/recipes-extended/sudo/sudo_1.8.4p4.bb
new file mode 100644
index 000000000..23153223c
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo_1.8.4p4.bb
@@ -0,0 +1,29 @@
+require sudo.inc
+
+PR = "r0"
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+ file://libtool.patch \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "b9be6df7ecefedff2263052ed9fc5e93"
+SRC_URI[sha256sum] = "bf965b09bde9b0cf7fd2355c53a81884d02d522af2d539cf40218436e9a5051e"
+
+DEPENDS += " ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
+
+do_install_append () {
+ for feature in ${DISTRO_FEATURES}; do
+ if [ "$feature" = "pam" ]; then
+ install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ break
+ fi
+ done
+
+ chmod 4111 $D/usr/bin/sudo
+ chmod 0440 $D/etc/sudoers
+}
diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
new file mode 100644
index 000000000..00fba7101
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: sysklogd-1.5/Makefile
+===================================================================
+--- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200
++++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200
+@@ -127,8 +127,8 @@
+ rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
+
+ install_exec: syslogd klogd
+- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd
+- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
++ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd
++ ${INSTALL} -m 500 klogd ${BINDIR}/klogd
+
+ install_man:
+ ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
new file mode 100644
index 000000000..c1cc042c9
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate
+
+The compiler should not be generating vectorized instructions on this target.
+This is a work around until I can determine why this is occuring on this
+particular recipe
+
+Index: sysklogd-1.5/Makefile
+===================================================================
+--- sysklogd-1.5.orig/Makefile
++++ sysklogd-1.5/Makefile
+@@ -20,7 +20,8 @@
+ CC= gcc
+ #SKFLAGS= -g -DSYSV -Wall
+ #LDFLAGS= -g
+-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
++SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \
++ -fno-tree-vectorize
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+ # $(shell getconf LFS_SKFLAGS)
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd
new file mode 100755
index 000000000..dcbc81e5a
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -0,0 +1,140 @@
+#! /bin/sh
+# /etc/init.d/sysklogd: start the system log daemon.
+
+### BEGIN INIT INFO
+# Provides: sysklogd
+# Required-Start: $remote_fs $time
+# Required-Stop: $remote_fs $time
+# Should-Start: $network
+# Should-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: System logger
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+pidfile_syslogd=/var/run/syslogd.pid
+pidfile_klogd=/var/run/klogd.pid
+binpath_syslogd=/sbin/syslogd
+binpath_klogd=/sbin/klogd
+
+test -x $binpath || exit 0
+
+test ! -r /etc/default/syslogd || . /etc/default/syslogd
+
+create_xconsole()
+{
+ # Only proceed if /dev/xconsole is used at all
+ if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf
+ then
+ return
+ fi
+
+ if [ ! -e /dev/xconsole ]; then
+ mknod -m 640 /dev/xconsole p
+ else
+ chmod 0640 /dev/xconsole
+ fi
+ chown root:adm /dev/xconsole
+ test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole
+}
+
+log_begin_msg () {
+ echo -n $1
+}
+
+log_end_msg () {
+ echo $1
+}
+
+log_success_msg () {
+ echo $1
+}
+
+running()
+{
+ # No pidfile, probably no daemon present
+ #
+ if [ ! -f $pidfile ]
+ then
+ return 1
+ fi
+
+ pid=`cat $pidfile_syslogd`
+
+ # No pid, probably no daemon present
+ #
+ if [ -z "$pid" ]
+ then
+ return 1
+ fi
+
+ if [ ! -d /proc/$pid ]
+ then
+ return 1
+ fi
+
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1`
+
+ # No syslogd?
+ #
+ if [ "$cmd" != "$binpath" ]
+ then
+ return 1
+ fi
+
+ return 0
+}
+
+case "$1" in
+ start)
+ log_begin_msg "Starting system log daemon..."
+ create_xconsole
+ start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
+ log_end_msg $?
+ log_begin_msg "Starting kernel log daemon..."
+ start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+ log_end_msg $?
+ ;;
+ stop)
+ log_begin_msg "Stopping system log daemon..."
+ start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd
+ log_end_msg $?
+ log_begin_msg "Stopping kernel log daemon..."
+ start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+ log_end_msg $?
+ ;;
+ reload|force-reload)
+ log_begin_msg "Reloading system log daemon..."
+ start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
+ log_end_msg $?
+ log_begin_msg "Reloading kernel log daemon..."
+ start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+ start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+ log_end_msg $?
+ ;;
+ restart)
+ log_begin_msg "Restarting system log daemon..."
+ start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd
+ start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
+ log_end_msg $?
+ log_begin_msg "Reloading kernel log daemon..."
+ start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+ start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+ log_end_msg $?
+ ;;
+ reload-or-restart)
+ if running
+ then
+ $0 reload
+ else
+ $0 start
+ fi
+ ;;
+ *)
+ log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart}"
+ exit 1
+esac
+
+exit 0
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf
new file mode 100644
index 000000000..7d1858ca5
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/syslog.conf
@@ -0,0 +1,70 @@
+# /etc/syslog.conf Configuration file for syslogd.
+#
+# Ported from debian by Yu Ke <ke.yu@intel.com>
+#
+
+#
+# First some standard logfiles. Log by facility.
+#
+
+auth,authpriv.* /var/log/auth.log
+*.*;auth,authpriv.none -/var/log/syslog
+#cron.* /var/log/cron.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+lpr.* -/var/log/lpr.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+
+#
+# Logging for the mail system. Split it up so that
+# it is easy to write scripts to parse these files.
+#
+mail.info -/var/log/mail.info
+mail.warn -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+# Logging for INN news system
+#
+news.crit /var/log/news.crit
+news.err /var/log/news.err
+news.notice -/var/log/news.notice
+
+#
+# Some `catch-all' logfiles.
+#
+*.=debug;\
+ auth,authpriv.none;\
+ news.none;mail.none -/var/log/debug
+*.=info;*.=notice;*.=warn;\
+ auth,authpriv.none;\
+ cron,daemon.none;\
+ mail,news.none -/var/log/messages
+
+#
+# Emergencies are sent to everybody logged in.
+#
+*.emerg *
+
+#
+# I like to have messages displayed on the console, but only on a virtual
+# console I usually leave idle.
+#
+#daemon,mail.*;\
+# news.=crit;news.=err;news.=notice;\
+# *.=debug;*.=info;\
+# *.=notice;*.=warn /dev/tty8
+
+# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
+# you must invoke `xconsole' with the `-file' option:
+#
+# $ xconsole -file /dev/xconsole [...]
+#
+# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
+# busy site..
+#
+daemon.*;mail.*;\
+ news.err;\
+ *.=debug;*.=info;\
+ *.=notice;*.=warn |/dev/xconsole
+
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
new file mode 100644
index 000000000..fb2ddb201
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -0,0 +1,98 @@
+SUMMARY = "System Log Daemons"
+DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd"
+HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
+SECTION = "base"
+
+LICENSE = "GPLv2+ & BSD"
+LICENSE_syslogd = "BSD"
+LICENSE_klogd = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
+ file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
+ "
+
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important (see below)
+DEPENDS_append = " update-rc.d update-rc.d-native"
+RDEPENDS_${PN}_append = " update-rc.d"
+
+SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
+ file://no-strip-install.patch \
+ file://sysklogd \
+ file://syslog.conf \
+ "
+
+SRC_URI_append_e500v2 = " file://no-vectorization.patch"
+
+INITSCRIPT_NAME = "syslog"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}"
+
+CFLAGS_append = " -DSYSV"
+
+do_install () {
+ install -d ${D}${mandir}/man8 \
+ ${D}${mandir}/man5 \
+ ${D}${base_sbindir}
+ oe_runmake 'BINDIR=${D}${base_sbindir}' \
+ 'MANDIR=${D}${mandir}' install
+ mv ${D}${base_sbindir}/syslogd ${D}${base_sbindir}/syslogd.${PN}
+ mv ${D}${base_sbindir}/klogd ${D}${base_sbindir}/klogd.${PN}
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${PN}
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
+}
+
+pkg_preinst_${PN} () {
+ # all this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst
+ ETC=$D${sysconfdir}
+
+ if [ -e $ETC/init.d/syslog -a ! -L $ETC/init.d/syslog ]; then
+ echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old"
+ mv $ETC/init.d/syslog $ETC/init.d/syslog.old
+ fi
+ if [ ! -e $ETC/init.d/syslog ]; then
+ ln -s dummy $ETC/init.d/syslog
+ fi
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
+ update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
+ update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 100
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove syslogd syslogd.${PN}
+ update-alternatives --remove klogd klogd.${PN}
+
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+ update-alternatives --remove syslog-init syslog.${PN}
+ update-alternatives --remove syslog-conf syslog.conf.${PN}
+}
+
+pkg_postrm_${PN} () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
+}
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
new file mode 100644
index 000000000..b58094e69
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
@@ -0,0 +1,5 @@
+require sysklogd.inc
+PR = "r5"
+
+SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
+SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"
diff --git a/meta/recipes-extended/sysstat/files/99_sysstat b/meta/recipes-extended/sysstat/files/99_sysstat
new file mode 100644
index 000000000..0b0ec30de
--- /dev/null
+++ b/meta/recipes-extended/sysstat/files/99_sysstat
@@ -0,0 +1 @@
+d root root 0755 /var/log/sa none
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
new file mode 100644
index 000000000..9da40a706
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -0,0 +1,38 @@
+SUMMARY = "System performance tools"
+DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
+HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
+LICENSE = "GPLv2+"
+SECTION = "console/utils"
+
+SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \
+ file://99_sysstat"
+
+inherit autotools gettext
+
+EXTRA_OEMAKE += 'LFLAGS=""'
+
+do_install() {
+ autotools_do_install
+
+ # don't install /var/log/sa when populating rootfs. Do it through volatile
+
+ rm -rf ${D}/var
+ install -d ${D}/etc/default/volatiles
+ install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+}
+
+pkg_postinst_${PN} () {
+ if [ -n "$D" ]; then
+ exit 0
+ fi
+ if [ -e /etc/init.d/populate-volatile.sh ]; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
+
+
+FILES_${PN} += "${libdir}/sa"
+FILES_${PN}-dbg += "${libdir}/sa/.debug/"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/meta/recipes-extended/sysstat/sysstat_10.0.4.bb b/meta/recipes-extended/sysstat/sysstat_10.0.4.bb
new file mode 100644
index 000000000..7a5bcdca4
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_10.0.4.bb
@@ -0,0 +1,8 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+PR = "r0"
+
+SRC_URI[md5sum] = "c84fd7774080dae34f47257175a0b187"
+SRC_URI[sha256sum] = "66dbef6e5583c320d5aa5a47a7407b8bf2c20f2cf0d171d36ffa21db034f34ba"
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
new file mode 100644
index 000000000..da2ae3cb0
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+
+ sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+ if (do_command (handle, command_buffer) == -1
+- || (status = get_status (handle)) == SAFE_READ_ERROR)
++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+ return SAFE_READ_ERROR;
+
+ for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
new file mode 100644
index 000000000..f8059a0a8
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Fix errors when built with gcc 4.3
+# Patch taken from Debian bug #452096
+
+diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h
+--- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800
++++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700
+@@ -198,7 +198,11 @@
+ #endif
+
+ #ifndef ARGP_FS_EI
+-#define ARGP_FS_EI extern inline
++ #if defined __GNUC_STDC_INLINE__
++ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__))
++ #else
++ #define ARGP_FS_EI extern inline
++ #endif
+ #endif
+
+ ARGP_FS_EI size_t
+diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h
+--- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700
++++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700
+@@ -580,7 +580,11 @@
+ # endif
+
+ # ifndef ARGP_EI
+-# define ARGP_EI extern __inline__
++# if defined __GNUC_STDC_INLINE__
++# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__))
++# else
++# define ARGP_EI extern __inline__
++# endif
+ # endif
+
+ ARGP_EI void
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
new file mode 100644
index 000000000..30534c29c
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+--- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700
++++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4 -*- Autoconf -*-
++# serial 5 -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.26.bb b/meta/recipes-extended/tar/tar-replacement-native_1.26.bb
new file mode 100644
index 000000000..071ede765
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-replacement-native_1.26.bb
@@ -0,0 +1,6 @@
+require tar_${PV}.bb
+
+inherit native
+
+BPN = "tar"
+EXTRAINSTALL = ""
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
new file mode 100644
index 000000000..0533b82d2
--- /dev/null
+++ b/meta/recipes-extended/tar/tar.inc
@@ -0,0 +1,34 @@
+SUMMARY = "GNU file archiving program"
+DESCRIPTION = "GNU tar saves many files together into a single tape \
+or disk archive, and can restore individual files from the archive."
+HOMEPAGE = "http://www.gnu.org/software/tar/"
+SECTION = "base"
+
+SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
+
+inherit autotools gettext
+
+EXTRAINSTALL = "do_install_extra"
+
+do_install () {
+ autotools_do_install
+ ${EXTRAINSTALL}
+}
+
+do_install_extra () {
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN}
+ rmdir ${D}${bindir}/
+ rmdir ${D}${sbindir}/
+ mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN}
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100
+ update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove tar tar.${PN}
+ update-alternatives --remove rmt rmt.${PN}
+}
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb
new file mode 100644
index 000000000..138ea7141
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.17.bb
@@ -0,0 +1,14 @@
+require tar.inc
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+PR = "r1"
+
+SRC_URI += "file://m4extensions.patch \
+ file://gcc43build.patch \
+ file://avoid_heap_overflow.patch \
+ "
+
+SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"
+SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492"
diff --git a/meta/recipes-extended/tar/tar_1.26.bb b/meta/recipes-extended/tar/tar_1.26.bb
new file mode 100644
index 000000000..e679ccbf0
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.26.bb
@@ -0,0 +1,9 @@
+require tar.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PR = "r1"
+
+SRC_URI[md5sum] = "2cee42a2ff4f1cd4f9298eeeb2264519"
+SRC_URI[sha256sum] = "5a5369f464502a598e938029c310d4b3abd51e6bb8dfd045663e61c8ea9f6d41"
diff --git a/meta/recipes-extended/tasks/task-core-basic.bb b/meta/recipes-extended/tasks/task-core-basic.bb
new file mode 100644
index 000000000..8bab0db7a
--- /dev/null
+++ b/meta/recipes-extended/tasks/task-core-basic.bb
@@ -0,0 +1,157 @@
+#
+# Copyright (C) 2010 Intel Corporation
+#
+
+DESCRIPTION = "Create Basic Image Tasks"
+PR = "r4"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGES = "\
+ task-core-basic \
+ task-core-base-utils \
+ task-core-base-utils-dbg \
+ task-core-base-utils-dev \
+ task-core-basic-libs \
+ task-core-basic-libs-dbg \
+ task-core-basic-libs-dev \
+ task-core-basic-utils \
+ task-core-basic-utils-dbg \
+ task-core-basic-utils-dev \
+ task-core-basic-extended \
+ task-core-basic-extended-dbg \
+ task-core-basic-extended-dev \
+ task-core-dev-utils \
+ task-core-dev-utils-dbg \
+ task-core-dev-utils-dev \
+ task-core-multiuser \
+ task-core-multiuser-dbg \
+ task-core-multiuser-dev \
+ task-core-initscripts \
+ task-core-initscripts-dbg \
+ task-core-initscripts-dev \
+ task-core-rpm \
+ task-core-rpm-dbg \
+ task-core-rpm-dev \
+ task-core-sys-services \
+ task-core-sys-services-dbg \
+ task-core-sys-services-dev \
+ "
+
+ALLOW_EMPTY = "1"
+
+RDEPENDS_task-core-basic = "\
+ task-core-base-utils \
+ task-core-basic-libs \
+ task-core-basic-utils \
+ task-core-basic-extended \
+ task-core-dev-utils \
+ task-core-multiuser \
+ task-core-initscripts \
+ task-core-rpm \
+ task-core-sys-services \
+ "
+
+RDEPENDS_task-core-base-utils = "\
+ busybox \
+ "
+
+RDEPENDS_task-core-basic-libs = "\
+ glib-2.0 \
+ "
+
+RDEPENDS_task-core-basic-utils = "\
+ bash \
+ acl \
+ attr \
+ bc \
+ coreutils \
+ cpio \
+ e2fsprogs \
+ ed \
+ file \
+ findutils \
+ gawk \
+ gmp \
+ grep \
+ makedevs \
+ mc \
+ mktemp \
+ ncurses \
+ net-tools \
+ pax \
+ popt \
+ procps \
+ psmisc \
+ sed \
+ tar \
+ time \
+ udev \
+ util-linux \
+ zlib \
+ "
+
+RDEPENDS_task-core-basic-extended = "\
+ iproute2 \
+ iputils \
+ iptables \
+ module-init-tools \
+ openssl \
+ "
+
+RDEPENDS_task-core-dev-utils = "\
+ byacc \
+ diffutils \
+ m4 \
+ make \
+ patch \
+ "
+
+RDEPENDS_task-core-initscripts = "\
+ initscripts \
+ sysvinit \
+ ethtool \
+ mingetty \
+ sysklogd \
+ "
+
+RDEPENDS_task-core-multiuser = "\
+ cracklib \
+ gzip \
+ libuser \
+ libpam \
+ shadow \
+ sudo \
+ "
+
+RDEPENDS_task-core-rpm = "\
+ beecrypt \
+ rpm \
+ zypper \
+ "
+
+RDEPENDS_task-core-sys-services = "\
+ at \
+ bzip2 \
+ cronie \
+ dbus \
+ dbus-glib \
+ python-dbus \
+ elfutils \
+ gzip \
+ less \
+ libcap \
+ libevent \
+ lighttpd \
+ logrotate \
+ nfs-utils \
+ pciutils \
+ libpcre \
+ portmap \
+ rpcbind \
+ sysfsutils \
+ tcp-wrappers \
+ tzdata \
+ "
+
diff --git a/meta/recipes-extended/tasks/task-core-lsb.bb b/meta/recipes-extended/tasks/task-core-lsb.bb
new file mode 100644
index 000000000..99ca83977
--- /dev/null
+++ b/meta/recipes-extended/tasks/task-core-lsb.bb
@@ -0,0 +1,198 @@
+#
+# Copyright (C) 2010 Intel Corporation
+#
+
+DESCRIPTION = "Create Small Image Tasks"
+PR = "r8"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGES = "\
+ task-core-lsb \
+ task-core-sys-extended \
+ task-core-sys-extended-dbg \
+ task-core-sys-extended-dev \
+ task-core-db \
+ task-core-db-dbg \
+ task-core-db-dev \
+ task-core-misc \
+ task-core-misc-dbg \
+ task-core-misc-dev \
+ task-core-perl \
+ task-core-perl-dbg \
+ task-core-perl-dev \
+ task-core-python \
+ task-core-python-dbg \
+ task-core-python-dev \
+ task-core-tcl \
+ task-core-tcl-dbg \
+ task-core-tcl-dev \
+ task-core-lsb-perl-add \
+ task-core-lsb-python-add \
+ task-core-lsb-graphic-add \
+ task-core-lsb-runtime-add \
+ task-core-lsb-command-add \
+ "
+
+
+ALLOW_EMPTY = "1"
+
+RDEPENDS_task-core-lsb = "\
+ task-core-sys-extended \
+ task-core-db \
+ task-core-misc \
+ task-core-perl \
+ task-core-python \
+ task-core-tcl \
+ task-core-lsb-perl-add \
+ task-core-lsb-python-add \
+ task-core-lsb-graphic-add \
+ task-core-lsb-runtime-add \
+ task-core-lsb-command-add \
+ "
+
+RDEPENDS_task-core-sys-extended = "\
+ binutils \
+ binutils-symlinks \
+ chkconfig \
+ curl \
+ dhcp-client \
+ diffutils \
+ gamin \
+ hdparm \
+ libaio \
+ libxml2 \
+ lrzsz \
+ lzo \
+ mc \
+ mdadm \
+ minicom \
+ neon \
+ parted \
+ pth \
+ quota \
+ screen \
+ setserial \
+ sysstat \
+ unzip \
+ watchdog \
+ which \
+ xinetd \
+ zip \
+ "
+
+RDEPENDS_task-core-db = "\
+ db \
+ sqlite3 \
+ "
+
+RDEPENDS_task-core-perl = "\
+ gdbm \
+ perl \
+ zlib \
+ "
+
+
+RDEPENDS_task-core-python = "\
+ expat \
+ gdbm \
+ gmp \
+ ncurses \
+ openssl \
+ python \
+ readline \
+ zip \
+ "
+
+RDEPENDS_task-core-tcl = "\
+ tcl \
+ "
+
+RDEPENDS_task-core-misc = "\
+ elfutils \
+ gettext \
+ gettext-runtime \
+ groff \
+ lsb \
+ lsbsetup \
+ lsbtest \
+ lsof \
+ man \
+ man-pages \
+ ncurses \
+ strace \
+ libusb1 \
+ usbutils \
+ zlib \
+ "
+
+RDEPENDS_task-core-lsb-command-add = "\
+ localedef \
+ fontconfig-utils \
+ mailx \
+ msmtp \
+ chkconfig \
+ xdg-utils \
+ foomatic-filters \
+ cups \
+ ghostscript \
+"
+
+RDEPENDS_task-core-lsb-perl-add = "\
+ perl-modules \
+ perl-misc \
+ perl-pod \
+"
+
+RDEPENDS_task-core-lsb-python-add = "\
+ python-modules \
+ python-misc \
+"
+
+RDEPENDS_task-core-lsb-graphic-add = "\
+ libqtcore4 \
+ libqtgui4 \
+ libqtsql4 \
+ libqtsvg4 \
+ libqtxml4 \
+ libqtnetwork4 \
+ libxt \
+ libxxf86vm \
+ libdrm \
+ libglu \
+ libxi \
+ libxtst \
+ qt4-plugin-sqldriver-sqlite \
+ libx11-locale \
+ xorg-minimal-fonts \
+ gdk-pixbuf-loader-ico \
+ gdk-pixbuf-loader-bmp \
+ gdk-pixbuf-loader-ani \
+ gdk-pixbuf-xlib \
+ liberation-fonts \
+ gtk+ \
+ atk \
+ libasound \
+ ${@base_contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
+"
+
+RDEPENDS_task-core-lsb-runtime-add = "\
+ ldd \
+ pam-plugin-wheel \
+ e2fsprogs-mke2fs \
+ mkfontdir \
+ liburi-perl \
+ libxml-parser-perl \
+ libxml-perl \
+ libxml-sax-perl \
+ eglibc-localedatas \
+ eglibc-gconvs \
+ eglibc-charmaps \
+ eglibc-binaries \
+ eglibc-localedata-posix \
+ eglibc-extra-nss \
+ eglibc-pcprofile \
+ eglibc-pic \
+ eglibc-utils \
+"
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
new file mode 100644
index 000000000..16d6719cb
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
@@ -0,0 +1,77 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 1995-01-30 19:51:47.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5 2004-04-09 16:59:45.000000000 +0200
+@@ -173,7 +173,7 @@
+ Patterns like these can be used when the machine has different internet
+ addresses with different internet hostnames. Service providers can use
+ this facility to offer FTP, GOPHER or WWW archives with internet names
+-that may even belong to different organizations. See also the `twist'
++that may even belong to different organizations. See also the `twist\'
+ option in the hosts_options(5) document. Some systems (Solaris,
+ FreeBSD) can have more than one internet address on one physical
+ interface; with other systems you may have to resort to SLIP or PPP
+@@ -236,10 +236,10 @@
+ Before accepting a client request, the wrappers can use the IDENT
+ service to find out that the client did not send the request at all.
+ When the client host provides IDENT service, a negative IDENT lookup
+-result (the client matches `UNKNOWN@host') is strong evidence of a host
++result (the client matches `UNKNOWN@host\') is strong evidence of a host
+ spoofing attack.
+ .PP
+-A positive IDENT lookup result (the client matches `KNOWN@host') is
++A positive IDENT lookup result (the client matches `KNOWN@host\') is
+ less trustworthy. It is possible for an intruder to spoof both the
+ client connection and the IDENT lookup, although doing so is much
+ harder than spoofing just a client connection. It may also be that
+diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
+--- tcp_wrappers_7.6.orig/hosts_options.5 1994-12-28 17:42:29.000000000 +0100
++++ tcp_wrappers_7.6/hosts_options.5 2004-04-09 16:59:49.000000000 +0200
+@@ -124,7 +124,7 @@
+ value is taken.
+ .SH MISCELLANEOUS
+ .IP "banners /some/directory"
+-Look for a file in `/some/directory' with the same name as the daemon
++Look for a file in `/some/directory\' with the same name as the daemon
+ process (for example in.telnetd for the telnet service), and copy its
+ contents to the client. Newline characters are replaced by
+ carriage-return newline, and %<letter> sequences are expanded (see
+diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
+--- tcp_wrappers_7.6.orig/tcpdmatch.8 1996-02-11 17:01:36.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.8 2004-04-09 17:00:49.000000000 +0200
+@@ -26,7 +26,7 @@
+ A daemon process name. Typically, the last component of a daemon
+ executable pathname.
+ .IP client
+-A host name or network address, or one of the `unknown' or `paranoid'
++A host name or network address, or one of the `unknown\' or `paranoid\'
+ wildcard patterns.
+ .sp
+ When a client host name is specified, \fItcpdmatch\fR gives a
+@@ -37,13 +37,13 @@
+ .PP
+ Optional information specified with the \fIdaemon@server\fR form:
+ .IP server
+-A host name or network address, or one of the `unknown' or `paranoid'
+-wildcard patterns. The default server name is `unknown'.
++A host name or network address, or one of the `unknown\' or `paranoid\'
++wildcard patterns. The default server name is `unknown\'.
+ .PP
+ Optional information specified with the \fIuser@client\fR form:
+ .IP user
+ A client user identifier. Typically, a login name or a numeric userid.
+-The default user name is `unknown'.
++The default user name is `unknown\'.
+ .SH OPTIONS
+ .IP -d
+ Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
+@@ -70,7 +70,7 @@
+ .ti +5
+ tcpdmatch in.telnetd paranoid
+ .PP
+-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR
++On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR
+ may need some help to locate the inetd configuration file.
+ .SH FILES
+ .PP
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
new file mode 100644
index 000000000..9a735bff6
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
@@ -0,0 +1,250 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
+--- tcp_wrappers_7.6.orig/hosts_access.3 2005-03-09 18:30:25.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.3 2005-03-09 18:27:03.000000000 +0100
+@@ -3,7 +3,7 @@
+ hosts_access, hosts_ctl, request_init, request_set \- access control library
+ .SH SYNOPSIS
+ .nf
+-#include "tcpd.h"
++#include <tcpd.h>
+
+ extern int allow_severity;
+ extern int deny_severity;
+diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2005-03-09 18:30:25.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5 2005-03-09 18:30:18.000000000 +0100
+@@ -8,9 +8,9 @@ name, host name/address) patterns. Exam
+ impatient reader is encouraged to skip to the EXAMPLES section for a
+ quick introduction.
+ .PP
+-An extended version of the access control language is described in the
+-\fIhosts_options\fR(5) document. The extensions are turned on at
+-program build time by building with -DPROCESS_OPTIONS.
++The extended version of the access control language is described in the
++\fIhosts_options\fR(5) document. \fBNote that this language supersedes
++the meaning of \fIshell_command\fB as documented below.\fR
+ .PP
+ In the following text, \fIdaemon\fR is the the process name of a
+ network daemon process, and \fIclient\fR is the name and/or address of
+@@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain
+ /etc/hosts.deny:
+ .in +3
+ .nf
+-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
+- /usr/ucb/mail -s %d-%h root) &
++in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
++ /usr/bin/mail -s %d-%h root) &
+ .fi
+ .PP
+ The safe_finger command comes with the tcpd wrapper and should be
+@@ -383,6 +383,7 @@ that shouldn\'t. All problems are repor
+ .fi
+ .SH SEE ALSO
+ .nf
++hosts_options(5) extended syntax.
+ tcpd(8) tcp/ip daemon wrapper program.
+ tcpdchk(8), tcpdmatch(8), test programs.
+ .SH BUGS
+diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
+--- tcp_wrappers_7.6.orig/hosts_options.5 2005-03-09 18:30:24.000000000 +0100
++++ tcp_wrappers_7.6/hosts_options.5 2005-03-09 18:27:03.000000000 +0100
+@@ -2,10 +2,8 @@
+ .SH NAME
+ hosts_options \- host access control language extensions
+ .SH DESCRIPTION
+-This document describes optional extensions to the language described
+-in the hosts_access(5) document. The extensions are enabled at program
+-build time. For example, by editing the Makefile and turning on the
+-PROCESS_OPTIONS compile-time option.
++This document describes extensions to the language described
++in the hosts_access(5) document.
+ .PP
+ The extensible language uses the following format:
+ .sp
+@@ -58,12 +56,12 @@ Notice the leading dot on the domain nam
+ Execute, in a child process, the specified shell command, after
+ performing the %<letter> expansions described in the hosts_access(5)
+ manual page. The command is executed with stdin, stdout and stderr
+-connected to the null device, so that it won\'t mess up the
++connected to the null device, so that it won't mess up the
+ conversation with the client host. Example:
+ .sp
+ .nf
+ .ti +3
+-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
++spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
+ .fi
+ .sp
+ executes, in a background child process, the shell command "safe_finger
+diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
+--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 02:13:24.000000000 +0100
++++ tcp_wrappers_7.6/inetcf.c 2005-03-09 18:27:03.000000000 +0100
+@@ -26,13 +26,17 @@ extern void exit();
+ * guesses. Shorter names follow longer ones.
+ */
+ char *inet_files[] = {
++#if 0
+ "/private/etc/inetd.conf", /* NEXT */
+ "/etc/inet/inetd.conf", /* SYSV4 */
+ "/usr/etc/inetd.conf", /* IRIX?? */
++#endif
+ "/etc/inetd.conf", /* BSD */
++#if 0
+ "/etc/net/tlid.conf", /* SYSV4?? */
+ "/etc/saf/tlid.conf", /* SYSV4?? */
+ "/etc/tlid.conf", /* SYSV4?? */
++#endif
+ 0,
+ };
+
+diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8
+--- tcp_wrappers_7.6.orig/tcpd.8 1996-02-21 16:39:16.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.8 2005-03-09 18:27:03.000000000 +0100
+@@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s
+ TLI. Functionality may be limited when the protocol underneath TLI is
+ not an internet protocol.
+ .PP
+-Operation is as follows: whenever a request for service arrives, the
++There are two possible modes of operation: execution of \fItcpd\fP
++before a service started by \fIinetd\fP, or linking a daemon with
++the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3)
++manual page. Operation when started by \fIinetd\fP
++is as follows: whenever a request for service arrives, the
+ \fIinetd\fP daemon is tricked into running the \fItcpd\fP program
+ instead of the desired server. \fItcpd\fP logs the request and does
+ some additional checks. When all is well, \fItcpd\fP runs the
+@@ -88,11 +92,11 @@ configuration files.
+ .sp
+ .in +5
+ # mkdir /other/place
+-# mv /usr/etc/in.fingerd /other/place
+-# cp tcpd /usr/etc/in.fingerd
++# mv /usr/sbin/in.fingerd /other/place
++# cp tcpd /usr/sbin/in.fingerd
+ .fi
+ .PP
+-The example assumes that the network daemons live in /usr/etc. On some
++The example assumes that the network daemons live in /usr/sbin. On some
+ systems, network daemons live in /usr/sbin or in /usr/libexec, or have
+ no `in.\' prefix to their name.
+ .SH EXAMPLE 2
+@@ -101,35 +105,34 @@ are left in their original place.
+ .PP
+ In order to monitor access to the \fIfinger\fR service, perform the
+ following edits on the \fIinetd\fR configuration file (usually
+-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):
++\fI/etc/inetd.conf\fR):
+ .nf
+ .sp
+ .ti +5
+-finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd
++finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
+ .sp
+ becomes:
+ .sp
+ .ti +5
+-finger stream tcp nowait nobody /some/where/tcpd in.fingerd
++finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd
+ .sp
+ .fi
+ .PP
+-The example assumes that the network daemons live in /usr/etc. On some
++The example assumes that the network daemons live in /usr/sbin. On some
+ systems, network daemons live in /usr/sbin or in /usr/libexec, the
+ daemons have no `in.\' prefix to their name, or there is no userid
+ field in the inetd configuration file.
+ .PP
+ Similar changes will be needed for the other services that are to be
+ covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)
+-process to make the changes effective. AIX users may also have to
+-execute the `inetimp\' command.
++process to make the changes effective.
+ .SH EXAMPLE 3
+ In the case of daemons that do not live in a common directory ("secret"
+ or otherwise), edit the \fIinetd\fR configuration file so that it
+ specifies an absolute path name for the process name field. For example:
+ .nf
+ .sp
+- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
++ ntalk dgram udp wait root /usr/sbin/tcpd /usr/local/lib/ntalkd
+ .sp
+ .fi
+ .PP
+@@ -164,6 +167,7 @@ The default locations of the host access
+ .SH SEE ALSO
+ .na
+ .nf
++hosts_access(3), functions provided by the libwrap library.
+ hosts_access(5), format of the tcpd access control tables.
+ syslog.conf(5), format of the syslogd control file.
+ inetd.conf(5), format of the inetd control file.
+diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8
+--- tcp_wrappers_7.6.orig/tcpdchk.8 1995-01-08 17:00:31.000000000 +0100
++++ tcp_wrappers_7.6/tcpdchk.8 2005-03-09 18:27:03.000000000 +0100
+@@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v]
+ potential and real problems it can find. The program examines the
+ \fItcpd\fR access control files (by default, these are
+ \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the
+-entries in these files against entries in the \fIinetd\fR or \fItlid\fR
+-network configuration files.
++entries in these files against entries in the \fIinetd\fR
++network configuration file.
+ .PP
+ \fItcpdchk\fR reports problems such as non-existent pathnames; services
+ that appear in \fItcpd\fR access control rules, but are not controlled
+@@ -26,14 +26,13 @@ problem.
+ .SH OPTIONS
+ .IP -a
+ Report access control rules that permit access without an explicit
+-ALLOW keyword. This applies only when the extended access control
+-language is enabled (build with -DPROCESS_OPTIONS).
++ALLOW keyword.
+ .IP -d
+ Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
+ directory instead of the default ones.
+ .IP "-i inet_conf"
+ Specify this option when \fItcpdchk\fR is unable to find your
+-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
++\fIinetd.conf\fR network configuration file, or when
+ you suspect that the program uses the wrong one.
+ .IP -v
+ Display the contents of each access control rule. Daemon lists, client
+@@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do
+ hosts_access(5), format of the tcpd access control tables.
+ hosts_options(5), format of the language extensions.
+ inetd.conf(5), format of the inetd control file.
+-tlid.conf(5), format of the tlid control file.
+ .SH AUTHORS
+ .na
+ .nf
+diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
+--- tcp_wrappers_7.6.orig/tcpdmatch.8 2005-03-09 18:30:24.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.8 2005-03-09 18:27:03.000000000 +0100
+@@ -13,7 +13,7 @@ request for service. Examples are given
+ The program examines the \fItcpd\fR access control tables (default
+ \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its
+ conclusion. For maximal accuracy, it extracts additional information
+-from your \fIinetd\fR or \fItlid\fR network configuration file.
++from your \fIinetd\fR network configuration file.
+ .PP
+ When \fItcpdmatch\fR finds a match in the access control tables, it
+ identifies the matched rule. In addition, it displays the optional
+@@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d
+ directory instead of the default ones.
+ .IP "-i inet_conf"
+ Specify this option when \fItcpdmatch\fR is unable to find your
+-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
++\fIinetd.conf\fR network configuration file, or when
+ you suspect that the program uses the wrong one.
+ .SH EXAMPLES
+ To predict how \fItcpd\fR would handle a telnet request from the local
+@@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker
+ hosts_access(5), format of the tcpd access control tables.
+ hosts_options(5), format of the language extensions.
+ inetd.conf(5), format of the inetd control file.
+-tlid.conf(5), format of the tlid control file.
+ .SH AUTHORS
+ .na
+ .nf
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
new file mode 100644
index 000000000..9e188027f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
@@ -0,0 +1,105 @@
+Upstream-Status: Backport
+
+See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 18:54:33.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 18:54:27.000000000 +0200
+@@ -89,6 +89,10 @@
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
++.IP \(bu
++Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
++method of matching cannot be used in conjunction with `net/mask\' matching,
++hostname matching beginning with `.\' or IP address matching ending with `.\'.
+ .SH WILDCARDS
+ The access control language supports explicit wildcards:
+ .IP ALL
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c 1997-02-12 02:13:23.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 18:52:21.000000000 +0200
+@@ -289,6 +289,11 @@
+ {
+ int n;
+
++#ifndef DISABLE_WILDCARD_MATCHING
++ if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
++ return (match_pattern_ylo(string,tok));
++ } else
++#endif
+ if (tok[0] == '.') { /* suffix */
+ n = strlen(string) - strlen(tok);
+ return (n > 0 && STR_EQ(tok, string + n));
+@@ -329,3 +334,71 @@
+ }
+ return ((addr & mask) == net);
+ }
++
++#ifndef DISABLE_WILDCARD_MATCHING
++/* Note: this feature has been adapted in a pretty straightforward way
++ from Tatu Ylonen's last SSH version under free license by
++ Pekka Savola <pekkas@netcore.fi>.
++
++ Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
++*/
++
++/* Returns true if the given string matches the pattern (which may contain
++ ? and * as wildcards), and zero if it does not match. */
++
++int match_pattern_ylo(const char *s, const char *pattern)
++{
++ while (1)
++ {
++ /* If at end of pattern, accept if also at end of string. */
++ if (!*pattern)
++ return !*s;
++
++ /* Process '*'. */
++ if (*pattern == '*')
++ {
++ /* Skip the asterisk. */
++ pattern++;
++
++ /* If at end of pattern, accept immediately. */
++ if (!*pattern)
++ return 1;
++
++ /* If next character in pattern is known, optimize. */
++ if (*pattern != '?' && *pattern != '*')
++ {
++ /* Look instances of the next character in pattern, and try
++ to match starting from those. */
++ for (; *s; s++)
++ if (*s == *pattern &&
++ match_pattern_ylo(s + 1, pattern + 1))
++ return 1;
++ /* Failed. */
++ return 0;
++ }
++
++ /* Move ahead one character at a time and try to match at each
++ position. */
++ for (; *s; s++)
++ if (match_pattern_ylo(s, pattern))
++ return 1;
++ /* Failed. */
++ return 0;
++ }
++
++ /* There must be at least one more character in the string. If we are
++ at the end, fail. */
++ if (!*s)
++ return 0;
++
++ /* Check if the next character of the string is acceptable. */
++ if (*pattern != '?' && *pattern != *s)
++ return 0;
++
++ /* Move to the next character, both in string and in pattern. */
++ s++;
++ pattern++;
++ }
++ /*NOTREACHED*/
++}
++#endif /* DISABLE_WILDCARD_MATCHING */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
new file mode 100644
index 000000000..725f4b595
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+
+* Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
+- fix gethostbyname to work better with dot "." notation (#16949)
+
+--- tcp_wrappers_7.6/socket.c.fixgethostbyname Fri Mar 21 13:27:25 1997
++++ tcp_wrappers_7.6/socket.c Mon Feb 5 14:09:40 2001
+@@ -52,7 +52,8 @@
+ char *name;
+ {
+ char dot_name[MAXHOSTNAMELEN + 1];
+-
++ struct hostent *hp;
++
+ /*
+ * Don't append dots to unqualified names. Such names are likely to come
+ * from local hosts files or from NIS.
+@@ -61,8 +62,12 @@
+ if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
+ return (gethostbyname(name));
+ } else {
+- sprintf(dot_name, "%s.", name);
+- return (gethostbyname(dot_name));
++ sprintf(dot_name, "%s.", name);
++ hp = gethostbyname(dot_name);
++ if (hp)
++ return hp;
++ else
++ return (gethostbyname(name));
+ }
+ }
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
new file mode 100644
index 000000000..96d47c39f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
@@ -0,0 +1,1255 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
+--- tcp_wrappers_7.6.orig/fix_options.c 1997-04-08 02:29:19.000000000 +0200
++++ tcp_wrappers_7.6/fix_options.c 2004-04-10 19:07:43.000000000 +0200
+@@ -11,6 +11,9 @@
+
+ #include <sys/types.h>
+ #include <sys/param.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/ip.h>
+@@ -41,6 +44,22 @@
+ unsigned int opt;
+ int optlen;
+ struct in_addr dummy;
++#ifdef INET6
++ struct sockaddr_storage ss;
++ int sslen;
++
++ /*
++ * check if this is AF_INET socket
++ * XXX IPv6 support?
++ */
++ sslen = sizeof(ss);
++ if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) {
++ syslog(LOG_ERR, "getpeername: %m");
++ clean_exit(request);
++ }
++ if (ss.ss_family != AF_INET)
++ return;
++#endif
+
+ if ((ip = getprotobyname("ip")) != 0)
+ ipproto = ip->p_proto;
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:07:43.000000000 +0200
+@@ -85,11 +85,18 @@
+ for daemon process names or for client user names.
+ .IP \(bu
+ An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
+-`net/mask\' pair. A host address is matched if `net\' is equal to the
++`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
+ .IP \(bu
++An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
++`[net]/prefixlen\' pair. An IPv6 host address is matched if
++`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
++address. For example, the [net]/prefixlen pattern
++`[3ffe:505:2:1::]/64\' matches every address in the range
++`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
++.IP \(bu
+ Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
+ method of matching cannot be used in conjunction with `net/mask\' matching,
+ hostname matching beginning with `.\' or IP address matching ending with `.\'.
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:07:43.000000000 +0200
+@@ -24,7 +24,13 @@
+ /* System libraries. */
+
+ #include <sys/types.h>
++#ifdef INT32_T
++ typedef uint32_t u_int32_t;
++#endif
+ #include <sys/param.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+@@ -33,6 +39,9 @@
+ #include <errno.h>
+ #include <setjmp.h>
+ #include <string.h>
++#ifdef INET6
++#include <netdb.h>
++#endif
+
+ extern char *fgets();
+ extern int errno;
+@@ -82,6 +91,10 @@
+ static int host_match();
+ static int string_match();
+ static int masked_match();
++#ifdef INET6
++static int masked_match4();
++static int masked_match6();
++#endif
+
+ /* Size of logical line buffer. */
+
+@@ -289,6 +302,13 @@
+ {
+ int n;
+
++#ifdef INET6
++ /* convert IPv4 mapped IPv6 address to IPv4 address */
++ if (STRN_EQ(string, "::ffff:", 7)
++ && dot_quad_addr(string + 7) != INADDR_NONE) {
++ string += 7;
++ }
++#endif
+ #ifndef DISABLE_WILDCARD_MATCHING
+ if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
+ return (match_pattern_ylo(string,tok));
+@@ -304,20 +324,72 @@
+ } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */
+ return (STRN_EQ(tok, string, n));
+ } else { /* exact match */
++#ifdef INET6
++ struct addrinfo hints, *res;
++ struct sockaddr_in6 pat, addr;
++ int len, ret;
++ char ch;
++
++ len = strlen(tok);
++ if (*tok == '[' && tok[len - 1] == ']') {
++ ch = tok[len - 1];
++ tok[len - 1] = '\0';
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_INET6;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++ if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) {
++ memcpy(&pat, res->ai_addr, sizeof(pat));
++ freeaddrinfo(res);
++ }
++ tok[len - 1] = ch;
++ if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0)
++ return NO;
++ memcpy(&addr, res->ai_addr, sizeof(addr));
++ freeaddrinfo(res);
++#ifdef NI_WITHSCOPEID
++ if (pat.sin6_scope_id != 0 &&
++ addr.sin6_scope_id != pat.sin6_scope_id)
++ return NO;
++#endif
++ return (!memcmp(&pat.sin6_addr, &addr.sin6_addr,
++ sizeof(struct in6_addr)));
++ return (ret);
++ }
++#endif
+ return (STR_EQ(tok, string));
+ }
+ }
+
+ /* masked_match - match address against netnumber/netmask */
+
++#ifdef INET6
+ static int masked_match(net_tok, mask_tok, string)
+ char *net_tok;
+ char *mask_tok;
+ char *string;
+ {
++ return (masked_match4(net_tok, mask_tok, string) ||
++ masked_match6(net_tok, mask_tok, string));
++}
++
++static int masked_match4(net_tok, mask_tok, string)
++#else
++static int masked_match(net_tok, mask_tok, string)
++#endif
++char *net_tok;
++char *mask_tok;
++char *string;
++{
++#ifdef INET6
++ u_int32_t net;
++ u_int32_t mask;
++ u_int32_t addr;
++#else
+ unsigned long net;
+ unsigned long mask;
+ unsigned long addr;
++#endif
+
+ /*
+ * Disallow forms other than dotted quad: the treatment that inet_addr()
+@@ -329,12 +401,78 @@
+ return (NO);
+ if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
+ || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
++#ifndef INET6
+ tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
++#endif
+ return (NO); /* not tcpd_jump() */
+ }
+ return ((addr & mask) == net);
+ }
+
++#ifdef INET6
++static int masked_match6(net_tok, mask_tok, string)
++char *net_tok;
++char *mask_tok;
++char *string;
++{
++ struct addrinfo hints, *res;
++ struct sockaddr_in6 net, addr;
++ u_int32_t mask;
++ int len, mask_len, i = 0;
++ char ch;
++
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_INET6;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++ if (getaddrinfo(string, NULL, &hints, &res) != 0)
++ return NO;
++ memcpy(&addr, res->ai_addr, sizeof(addr));
++ freeaddrinfo(res);
++
++ if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
++ if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
++ || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
++ return (NO);
++ return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
++ }
++
++ /* match IPv6 address against netnumber/prefixlen */
++ len = strlen(net_tok);
++ if (*net_tok != '[' || net_tok[len - 1] != ']')
++ return NO;
++ ch = net_tok[len - 1];
++ net_tok[len - 1] = '\0';
++ if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) {
++ net_tok[len - 1] = ch;
++ return NO;
++ }
++ memcpy(&net, res->ai_addr, sizeof(net));
++ freeaddrinfo(res);
++ net_tok[len - 1] = ch;
++ if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128)
++ return NO;
++
++#ifdef NI_WITHSCOPEID
++ if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id)
++ return NO;
++#endif
++ while (mask_len > 0) {
++ if (mask_len < 32) {
++ mask = htonl(~(0xffffffff >> mask_len));
++ if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask))
++ return NO;
++ break;
++ }
++ if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i])
++ return NO;
++ i += 4;
++ mask_len -= 32;
++ }
++ return YES;
++}
++#endif /* INET6 */
++
+ #ifndef DISABLE_WILDCARD_MATCHING
+ /* Note: this feature has been adapted in a pretty straightforward way
+ from Tatu Ylonen's last SSH version under free license by
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile 1997-03-21 19:27:21.000000000 +0100
++++ tcp_wrappers_7.6/Makefile 2004-04-10 19:22:44.000000000 +0200
+@@ -21,7 +21,7 @@
+ @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
+ @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
+ @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
+- @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
++ @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
+ @echo " uts215 uxp"
+ @echo
+ @echo "If none of these match your environment, edit the system"
+@@ -131,20 +131,34 @@
+ NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
+
+ # Freebsd and linux by default have no NIS.
+-386bsd netbsd bsdos:
++386bsd bsdos:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
+ EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
+
+ freebsd:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++ LIBS="-L/usr/local/v6/lib -linet6" \
+ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
+- EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \
++ VSYSLOG= all
++
++netbsd:
++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all
+
+ linux:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
+- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++ NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
++
++gnu:
++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
+
+ # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
+ hpux hpux8 hpux9 hpux10:
+@@ -196,6 +210,13 @@
+ NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
+ BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
+
++# SunOS 5.8 is another SYSV4 variant, but has IPv6 support
++solaris8:
++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++ LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
++ NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
++ EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all
++
+ # Generic SYSV40
+ esix sysv4:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c 1996-02-11 17:01:30.000000000 +0100
++++ tcp_wrappers_7.6/misc.c 2004-04-10 19:07:43.000000000 +0200
+@@ -58,9 +58,31 @@
+ {
+ char *cp;
+
++#ifdef INET6
++ int bracket = 0;
++
++ for (cp = string; cp && *cp; cp++) {
++ switch (*cp) {
++ case '[':
++ bracket++;
++ break;
++ case ']':
++ bracket--;
++ break;
++ default:
++ if (bracket == 0 && *cp == delimiter) {
++ *cp++ = 0;
++ return cp;
++ }
++ break;
++ }
++ }
++ return (NULL);
++#else
+ if ((cp = strchr(string, delimiter)) != 0)
+ *cp++ = 0;
+ return (cp);
++#endif
+ }
+
+ /* dot_quad_addr - convert dotted quad to internal form */
+diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
+--- tcp_wrappers_7.6.orig/refuse.c 1994-12-28 17:42:40.000000000 +0100
++++ tcp_wrappers_7.6/refuse.c 2004-04-10 19:07:43.000000000 +0200
+@@ -25,7 +25,12 @@
+ void refuse(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++ syslog(deny_severity, "refused connect from %s (%s)",
++ eval_client(request), eval_hostaddr(request->client));
++#else
+ syslog(deny_severity, "refused connect from %s", eval_client(request));
++#endif
+ clean_exit(request);
+ /* NOTREACHED */
+ }
+diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100
++++ tcp_wrappers_7.6/rfc931.c 2004-04-10 19:07:43.000000000 +0200
+@@ -68,20 +68,50 @@
+ /* rfc931 - return remote user name, given socket structures */
+
+ void rfc931(rmt_sin, our_sin, dest)
++#ifdef INET6
++struct sockaddr *rmt_sin;
++struct sockaddr *our_sin;
++#else
+ struct sockaddr_in *rmt_sin;
+ struct sockaddr_in *our_sin;
++#endif
+ char *dest;
+ {
+ unsigned rmt_port;
+ unsigned our_port;
++#ifdef INET6
++ struct sockaddr_storage rmt_query_sin;
++ struct sockaddr_storage our_query_sin;
++ int alen;
++#else
+ struct sockaddr_in rmt_query_sin;
+ struct sockaddr_in our_query_sin;
++#endif
+ char user[256]; /* XXX */
+ char buffer[512]; /* XXX */
+ char *cp;
+ char *result = unknown;
+ FILE *fp;
+
++#ifdef INET6
++ /* address family must be the same */
++ if (rmt_sin->sa_family != our_sin->sa_family) {
++ STRN_CPY(dest, result, STRING_LENGTH);
++ return;
++ }
++ switch (our_sin->sa_family) {
++ case AF_INET:
++ alen = sizeof(struct sockaddr_in);
++ break;
++ case AF_INET6:
++ alen = sizeof(struct sockaddr_in6);
++ break;
++ default:
++ STRN_CPY(dest, result, STRING_LENGTH);
++ return;
++ }
++#endif
++
+ /*
+ * Use one unbuffered stdio stream for writing to and for reading from
+ * the RFC931 etc. server. This is done because of a bug in the SunOS
+@@ -92,7 +122,11 @@
+ * sockets.
+ */
+
++#ifdef INET6
++ if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) {
++#else
+ if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) {
++#endif
+ setbuf(fp, (char *) 0);
+
+ /*
+@@ -112,6 +146,25 @@
+ * addresses from the query socket.
+ */
+
++#ifdef INET6
++ memcpy(&our_query_sin, our_sin, alen);
++ memcpy(&rmt_query_sin, rmt_sin, alen);
++ switch (our_sin->sa_family) {
++ case AF_INET:
++ ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT);
++ ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT);
++ break;
++ case AF_INET6:
++ ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT);
++ ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT);
++ break;
++ }
++
++ if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
++ alen) >= 0 &&
++ connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
++ alen) >= 0) {
++#else
+ our_query_sin = *our_sin;
+ our_query_sin.sin_port = htons(ANY_PORT);
+ rmt_query_sin = *rmt_sin;
+@@ -121,6 +174,7 @@
+ sizeof(our_query_sin)) >= 0 &&
+ connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
+ sizeof(rmt_query_sin)) >= 0) {
++#endif
+
+ /*
+ * Send query to server. Neglect the risk that a 13-byte
+@@ -129,8 +183,13 @@
+ */
+
+ fprintf(fp, "%u,%u\r\n",
++#ifdef INET6
++ ntohs(((struct sockaddr_in *)rmt_sin)->sin_port),
++ ntohs(((struct sockaddr_in *)our_sin)->sin_port));
++#else
+ ntohs(rmt_sin->sin_port),
+ ntohs(our_sin->sin_port));
++#endif
+ fflush(fp);
+
+ /*
+@@ -144,8 +203,13 @@
+ && ferror(fp) == 0 && feof(fp) == 0
+ && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s",
+ &rmt_port, &our_port, user) == 3
++#ifdef INET6
++ && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port
++ && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) {
++#else
+ && ntohs(rmt_sin->sin_port) == rmt_port
+ && ntohs(our_sin->sin_port) == our_port) {
++#endif
+
+ /*
+ * Strip trailing carriage return. It is part of the
+diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c 1997-03-21 19:27:24.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.c 2004-04-10 19:07:43.000000000 +0200
+@@ -25,7 +25,9 @@
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+ #endif
+
++#ifndef INET6
+ extern char *malloc();
++#endif
+
+ /* Application-specific. */
+
+@@ -39,6 +41,7 @@
+ int deny_severity = LOG_WARNING;
+ int rfc931_timeout = RFC931_TIMEOUT;
+
++#ifndef INET6
+ /* dup_hostent - create hostent in one memory block */
+
+ static struct hostent *dup_hostent(hp)
+@@ -73,9 +76,46 @@
+ }
+ return (&hb->host);
+ }
++#endif
+
+ /* find_inet_addr - find all addresses for this host, result to free() */
+
++#ifdef INET6
++struct addrinfo *find_inet_addr(host)
++char *host;
++{
++ struct addrinfo hints, *res;
++
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = PF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++ if (getaddrinfo(host, NULL, &hints, &res) == 0)
++ return (res);
++
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = PF_UNSPEC;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
++ if (getaddrinfo(host, NULL, &hints, &res) != 0) {
++ tcpd_warn("%s: host not found", host);
++ return (0);
++ }
++ if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) {
++ tcpd_warn("%d: not an internet host", res->ai_family);
++ freeaddrinfo(res);
++ return (0);
++ }
++ if (!res->ai_canonname) {
++ tcpd_warn("%s: hostname alias", host);
++ tcpd_warn("(cannot obtain official name)", res->ai_canonname);
++ } else if (STR_NE(host, res->ai_canonname)) {
++ tcpd_warn("%s: hostname alias", host);
++ tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname);
++ }
++ return (res);
++}
++#else
+ struct hostent *find_inet_addr(host)
+ char *host;
+ {
+@@ -118,6 +158,7 @@
+ }
+ return (dup_hostent(hp));
+ }
++#endif
+
+ /* check_dns - give each address thorough workout, return address count */
+
+@@ -125,8 +166,13 @@
+ char *host;
+ {
+ struct request_info request;
++#ifdef INET6
++ struct sockaddr_storage sin;
++ struct addrinfo *hp, *res;
++#else
+ struct sockaddr_in sin;
+ struct hostent *hp;
++#endif
+ int count;
+ char *addr;
+
+@@ -134,11 +180,18 @@
+ return (0);
+ request_init(&request, RQ_CLIENT_SIN, &sin, 0);
+ sock_methods(&request);
++#ifndef INET6
+ memset((char *) &sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
++#endif
+
++#ifdef INET6
++ for (res = hp, count = 0; res; res = res->ai_next, count++) {
++ memcpy(&sin, res->ai_addr, res->ai_addrlen);
++#else
+ for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
+ memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr));
++#endif
+
+ /*
+ * Force host name and address conversions. Use the request structure
+@@ -151,7 +204,11 @@
+ tcpd_warn("host address %s->name lookup failed",
+ eval_hostaddr(request.client));
+ }
++#ifdef INET6
++ freeaddrinfo(hp);
++#else
+ free((char *) hp);
++#endif
+ return (count);
+ }
+
+diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h
+--- tcp_wrappers_7.6.orig/scaffold.h 1994-12-31 18:19:20.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.h 2004-04-10 19:07:43.000000000 +0200
+@@ -4,6 +4,10 @@
+ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
+ */
+
++#ifdef INET6
++extern struct addrinfo *find_inet_addr();
++#else
+ extern struct hostent *find_inet_addr();
++#endif
+ extern int check_dns();
+ extern int check_path();
+diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
+--- tcp_wrappers_7.6.orig/socket.c 2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/socket.c 2004-04-10 19:07:43.000000000 +0200
+@@ -24,13 +24,22 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#ifdef INT32_T
++typedef uint32_t u_int32_t;
++#endif
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
+
++#ifdef INET6
++#ifndef NI_WITHSCOPEID
++#define NI_WITHSCOPEID 0
++#endif
++#else
+ extern char *inet_ntoa();
++#endif
+
+ /* Local stuff. */
+
+@@ -79,8 +88,13 @@
+ void sock_host(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++ static struct sockaddr_storage client;
++ static struct sockaddr_storage server;
++#else
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
++#endif
+ int len;
+ char buf[BUFSIZ];
+ int fd = request->fd;
+@@ -109,7 +123,11 @@
+ memset(buf, 0 sizeof(buf));
+ #endif
+ }
++#ifdef INET6
++ request->client->sin = (struct sockaddr *)&client;
++#else
+ request->client->sin = &client;
++#endif
+
+ /*
+ * Determine the server binding. This is used for client username
+@@ -122,7 +140,11 @@
+ tcpd_warn("getsockname: %m");
+ return;
+ }
++#ifdef INET6
++ request->server->sin = (struct sockaddr *)&server;
++#else
+ request->server->sin = &server;
++#endif
+ }
+
+ /* sock_hostaddr - map endpoint address to printable form */
+@@ -130,10 +152,26 @@
+ void sock_hostaddr(host)
+ struct host_info *host;
+ {
++#ifdef INET6
++ struct sockaddr *sin = host->sin;
++ int salen;
++
++ if (!sin)
++ return;
++#ifdef SIN6_LEN
++ salen = sin->sa_len;
++#else
++ salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in)
++ : sizeof(struct sockaddr_in6);
++#endif
++ getnameinfo(sin, salen, host->addr, sizeof(host->addr),
++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
+ struct sockaddr_in *sin = host->sin;
+
+ if (sin != 0)
+ STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr));
++#endif
+ }
+
+ /* sock_hostname - map endpoint address to host name */
+@@ -141,6 +179,160 @@
+ void sock_hostname(host)
+ struct host_info *host;
+ {
++#ifdef INET6
++ struct sockaddr *sin = host->sin;
++ struct sockaddr_in sin4;
++ struct addrinfo hints, *res, *res0 = NULL;
++ int salen, alen, err = 1;
++ char *ap = NULL, *rap, hname[NI_MAXHOST];
++
++ if (sin != NULL) {
++ if (sin->sa_family == AF_INET6) {
++ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin;
++
++ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
++ memset(&sin4, 0, sizeof(sin4));
++#ifdef SIN6_LEN
++ sin4.sin_len = sizeof(sin4);
++#endif
++ sin4.sin_family = AF_INET;
++ sin4.sin_port = sin6->sin6_port;
++ sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12];
++ sin = (struct sockaddr *)&sin4;
++ }
++ }
++ switch (sin->sa_family) {
++ case AF_INET:
++ ap = (char *)&((struct sockaddr_in *)sin)->sin_addr;
++ alen = sizeof(struct in_addr);
++ salen = sizeof(struct sockaddr_in);
++ break;
++ case AF_INET6:
++ ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
++ alen = sizeof(struct in6_addr);
++ salen = sizeof(struct sockaddr_in6);
++ break;
++ default:
++ break;
++ }
++ if (ap)
++ err = getnameinfo(sin, salen, hname, sizeof(hname),
++ NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD);
++ }
++ if (!err) {
++
++ STRN_CPY(host->name, hname, sizeof(host->name));
++
++ /* reject numeric addresses */
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = sin->sa_family;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
++ if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
++ freeaddrinfo(res0);
++ res0 = NULL;
++ tcpd_warn("host name/name mismatch: "
++ "reverse lookup results in non-FQDN %s",
++ host->name);
++ strcpy(host->name, paranoid); /* name is bad, clobber it */
++ }
++ err = !err;
++ }
++ if (!err) {
++ /* we are now sure that this is non-numeric */
++
++ /*
++ * Verify that the address is a member of the address list returned
++ * by gethostbyname(hostname).
++ *
++ * Verify also that gethostbyaddr() and gethostbyname() return the same
++ * hostname, or rshd and rlogind may still end up being spoofed.
++ *
++ * On some sites, gethostbyname("localhost") returns "localhost.domain".
++ * This is a DNS artefact. We treat it as a special case. When we
++ * can't believe the address list from gethostbyname("localhost")
++ * we're in big trouble anyway.
++ */
++
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = sin->sa_family;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
++ if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) {
++
++ /*
++ * Unable to verify that the host name matches the address. This
++ * may be a transient problem or a botched name server setup.
++ */
++
++ tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed",
++ host->name,
++ (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6");
++
++ } else if ((res0->ai_canonname == NULL
++ || STR_NE(host->name, res0->ai_canonname))
++ && STR_NE(host->name, "localhost")) {
++
++ /*
++ * The gethostbyaddr() and gethostbyname() calls did not return
++ * the same hostname. This could be a nameserver configuration
++ * problem. It could also be that someone is trying to spoof us.
++ */
++
++ tcpd_warn("host name/name mismatch: %s != %.*s",
++ host->name, STRING_LENGTH,
++ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
++
++ } else {
++
++ /*
++ * The address should be a member of the address list returned by
++ * gethostbyname(). We should first verify that the h_addrtype
++ * field is AF_INET, but this program has already caused too much
++ * grief on systems with broken library code.
++ */
++
++ for (res = res0; res; res = res->ai_next) {
++ if (res->ai_family != sin->sa_family)
++ continue;
++ switch (res->ai_family) {
++ case AF_INET:
++ rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr;
++ break;
++ case AF_INET6:
++ /* need to check scope_id */
++ if (((struct sockaddr_in6 *)sin)->sin6_scope_id !=
++ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) {
++ continue;
++ }
++ rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
++ break;
++ default:
++ continue;
++ }
++ if (memcmp(rap, ap, alen) == 0) {
++ freeaddrinfo(res0);
++ return; /* name is good, keep it */
++ }
++ }
++
++ /*
++ * The host name does not map to the initial address. Perhaps
++ * someone has messed up. Perhaps someone compromised a name
++ * server.
++ */
++
++ getnameinfo(sin, salen, hname, sizeof(hname),
++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++ tcpd_warn("host name/address mismatch: %s != %.*s",
++ hname, STRING_LENGTH,
++ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
++ }
++ strcpy(host->name, paranoid); /* name is bad, clobber it */
++ if (res0)
++ freeaddrinfo(res0);
++ }
++#else /* INET6 */
+ struct sockaddr_in *sin = host->sin;
+ struct hostent *hp;
+ int i;
+@@ -220,6 +412,7 @@
+ }
+ strcpy(host->name, paranoid); /* name is bad, clobber it */
+ }
++#endif /* INET6 */
+ }
+
+ /* sock_sink - absorb unreceived IP datagram */
+@@ -228,7 +421,11 @@
+ int fd;
+ {
+ char buf[BUFSIZ];
++#ifdef INET6
++ struct sockaddr_storage sin;
++#else
+ struct sockaddr_in sin;
++#endif
+ int size = sizeof(sin);
+
+ /*
+diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
+--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-11 17:01:33.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.c 2004-04-10 19:07:43.000000000 +0200
+@@ -120,7 +120,12 @@
+
+ /* Report request and invoke the real daemon program. */
+
++#ifdef INET6
++ syslog(allow_severity, "connect from %s (%s)",
++ eval_client(&request), eval_hostaddr(request.client));
++#else
+ syslog(allow_severity, "connect from %s", eval_client(&request));
++#endif
+ closelog();
+ (void) execv(path, argv);
+ syslog(LOG_ERR, "error: cannot execute %s: %m", path);
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c 1997-02-12 02:13:25.000000000 +0100
++++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:07:43.000000000 +0200
+@@ -22,6 +22,9 @@
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+@@ -397,6 +400,31 @@
+ }
+ }
+
++#ifdef INET6
++static int is_inet6_addr(pat)
++ char *pat;
++{
++ struct addrinfo hints, *res;
++ int len, ret;
++ char ch;
++
++ if (*pat != '[')
++ return (0);
++ len = strlen(pat);
++ if ((ch = pat[len - 1]) != ']')
++ return (0);
++ pat[len - 1] = '\0';
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_INET6;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++ if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0)
++ freeaddrinfo(res);
++ pat[len - 1] = ch;
++ return (ret == 0);
++}
++#endif
++
+ /* check_host - criticize host pattern */
+
+ static int check_host(pat)
+@@ -423,14 +451,27 @@
+ #endif
+ #endif
+ } else if (mask = split_at(pat, '/')) { /* network/netmask */
++#ifdef INET6
++ int mask_len;
++
++ if ((dot_quad_addr(pat) == INADDR_NONE
++ || dot_quad_addr(mask) == INADDR_NONE)
++ && (!is_inet6_addr(pat)
++ || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
++#else
+ if (dot_quad_addr(pat) == INADDR_NONE
+ || dot_quad_addr(mask) == INADDR_NONE)
++#endif
+ tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+ } else if (STR_EQ(pat, "FAIL")) { /* obsolete */
+ tcpd_warn("FAIL is no longer recognized");
+ tcpd_warn("(use EXCEPT or DENY instead)");
+ } else if (reserved_name(pat)) { /* other reserved */
+ /* void */ ;
++#ifdef INET6
++ } else if (is_inet6_addr(pat)) { /* IPv6 address */
++ addr_count = 1;
++#endif
+ } else if (NOT_INADDR(pat)) { /* internet name */
+ if (pat[strlen(pat) - 1] == '.') {
+ tcpd_warn("%s: domain or host name ends in dot", pat);
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h 1996-03-19 16:22:25.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h 2004-04-10 19:07:43.000000000 +0200
+@@ -11,7 +11,11 @@
+ struct host_info {
+ char name[STRING_LENGTH]; /* access via eval_hostname(host) */
+ char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */
++#ifdef INET6
++ struct sockaddr *sin; /* socket address or 0 */
++#else
+ struct sockaddr_in *sin; /* socket address or 0 */
++#endif
+ struct t_unitdata *unit; /* TLI transport address or 0 */
+ struct request_info *request; /* for shared information */
+ };
+diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
+--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-11 17:01:36.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.c 2004-04-10 19:07:43.000000000 +0200
+@@ -57,7 +57,11 @@
+ int argc;
+ char **argv;
+ {
++#ifdef INET6
++ struct addrinfo hints, *hp, *res;
++#else
+ struct hostent *hp;
++#endif
+ char *myname = argv[0];
+ char *client;
+ char *server;
+@@ -68,8 +72,13 @@
+ int ch;
+ char *inetcf = 0;
+ int count;
++#ifdef INET6
++ struct sockaddr_storage server_sin;
++ struct sockaddr_storage client_sin;
++#else
+ struct sockaddr_in server_sin;
+ struct sockaddr_in client_sin;
++#endif
+ struct stat st;
+
+ /*
+@@ -172,13 +181,20 @@
+ if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) {
+ if ((hp = find_inet_addr(server)) == 0)
+ exit(1);
++#ifndef INET6
+ memset((char *) &server_sin, 0, sizeof(server_sin));
+ server_sin.sin_family = AF_INET;
++#endif
+ request_set(&request, RQ_SERVER_SIN, &server_sin, 0);
+
++#ifdef INET6
++ for (res = hp, count = 0; res; res = res->ai_next, count++) {
++ memcpy(&server_sin, res->ai_addr, res->ai_addrlen);
++#else
+ for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
+ memcpy((char *) &server_sin.sin_addr, addr,
+ sizeof(server_sin.sin_addr));
++#endif
+
+ /*
+ * Force evaluation of server host name and address. Host name
+@@ -194,7 +210,11 @@
+ fprintf(stderr, "Please specify an address instead\n");
+ exit(1);
+ }
++#ifdef INET6
++ freeaddrinfo(hp);
++#else
+ free((char *) hp);
++#endif
+ } else {
+ request_set(&request, RQ_SERVER_NAME, server, 0);
+ }
+@@ -208,6 +228,18 @@
+ tcpdmatch(&request);
+ exit(0);
+ }
++#ifdef INET6
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_family = AF_INET6;
++ hints.ai_socktype = SOCK_STREAM;
++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++ if (getaddrinfo(client, NULL, &hints, &res) == 0) {
++ freeaddrinfo(res);
++ request_set(&request, RQ_CLIENT_ADDR, client, 0);
++ tcpdmatch(&request);
++ exit(0);
++ }
++#endif
+
+ /*
+ * Perhaps they are testing special client hostname patterns that aren't
+@@ -229,6 +261,34 @@
+ */
+ if ((hp = find_inet_addr(client)) == 0)
+ exit(1);
++#ifdef INET6
++ request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
++
++ for (res = hp, count = 0; res; res = res->ai_next, count++) {
++ memcpy(&client_sin, res->ai_addr, res->ai_addrlen);
++
++ /*
++ * getnameinfo() doesn't do reverse lookup against link-local
++ * address. So, we pass through host name evaluation against
++ * such addresses.
++ */
++ if (res->ai_family != AF_INET6 ||
++ !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) {
++ /*
++ * Force evaluation of client host name and address. Host name
++ * conflicts will be reported while eval_hostname() does its job.
++ */
++ request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0);
++ if (STR_EQ(eval_hostname(request.client), unknown))
++ tcpd_warn("host address %s->name lookup failed",
++ eval_hostaddr(request.client));
++ }
++ tcpdmatch(&request);
++ if (res->ai_next)
++ printf("\n");
++ }
++ freeaddrinfo(hp);
++#else
+ memset((char *) &client_sin, 0, sizeof(client_sin));
+ client_sin.sin_family = AF_INET;
+ request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
+@@ -250,6 +310,7 @@
+ printf("\n");
+ }
+ free((char *) hp);
++#endif
+ exit(0);
+ }
+
+diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
+--- tcp_wrappers_7.6.orig/tli.c 1997-03-21 19:27:26.000000000 +0100
++++ tcp_wrappers_7.6/tli.c 2004-04-10 19:07:43.000000000 +0200
+@@ -65,8 +65,13 @@
+ void tli_host(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++ static struct sockaddr_storage client;
++ static struct sockaddr_storage server;
++#else
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
++#endif
+
+ /*
+ * If we discover that we are using an IP transport, pretend we never
+@@ -76,14 +81,29 @@
+
+ tli_endpoints(request);
+ if ((request->config = tli_transport(request->fd)) != 0
++#ifdef INET6
++ && (STR_EQ(request->config->nc_protofmly, "inet") ||
++ STR_EQ(request->config->nc_protofmly, "inet6"))) {
++#else
+ && STR_EQ(request->config->nc_protofmly, "inet")) {
++#endif
+ if (request->client->unit != 0) {
++#ifdef INET6
++ client = *(struct sockaddr_storage *) request->client->unit->addr.buf;
++ request->client->sin = (struct sockaddr *) &client;
++#else
+ client = *(struct sockaddr_in *) request->client->unit->addr.buf;
+ request->client->sin = &client;
++#endif
+ }
+ if (request->server->unit != 0) {
++#ifdef INET6
++ server = *(struct sockaddr_storage *) request->server->unit->addr.buf;
++ request->server->sin = (struct sockaddr *) &server;
++#else
+ server = *(struct sockaddr_in *) request->server->unit->addr.buf;
+ request->server->sin = &server;
++#endif
+ }
+ tli_cleanup(request);
+ sock_methods(request);
+@@ -187,7 +207,15 @@
+ }
+ while (config = getnetconfig(handlep)) {
+ if (stat(config->nc_device, &from_config) == 0) {
++#ifdef NO_CLONE_DEVICE
++ /*
++ * If the network devices are not cloned (as is the case for
++ * Solaris 8 Beta), we must compare the major device numbers.
++ */
++ if (major(from_config.st_rdev) == major(from_client.st_rdev))
++#else
+ if (minor(from_config.st_rdev) == major(from_client.st_rdev))
++#endif
+ break;
+ }
+ }
+diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
+--- tcp_wrappers_7.6.orig/update.c 1994-12-28 17:42:56.000000000 +0100
++++ tcp_wrappers_7.6/update.c 2004-04-10 19:07:43.000000000 +0200
+@@ -46,10 +46,18 @@
+ request->fd = va_arg(ap, int);
+ continue;
+ case RQ_CLIENT_SIN:
++#ifdef INET6
++ request->client->sin = va_arg(ap, struct sockaddr *);
++#else
+ request->client->sin = va_arg(ap, struct sockaddr_in *);
++#endif
+ continue;
+ case RQ_SERVER_SIN:
++#ifdef INET6
++ request->server->sin = va_arg(ap, struct sockaddr *);
++#else
+ request->server->sin = va_arg(ap, struct sockaddr_in *);
++#endif
+ continue;
+
+ /*
+diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c
+--- tcp_wrappers_7.6.orig/workarounds.c 1996-03-19 16:22:26.000000000 +0100
++++ tcp_wrappers_7.6/workarounds.c 2004-04-10 19:07:43.000000000 +0200
+@@ -166,11 +166,22 @@
+ int *len;
+ {
+ int ret;
++#ifdef INET6
++ struct sockaddr *sin = sa;
++#else
+ struct sockaddr_in *sin = (struct sockaddr_in *) sa;
++#endif
+
+ if ((ret = getpeername(sock, sa, len)) >= 0
++#ifdef INET6
++ && ((sin->su_si.si_family == AF_INET6
++ && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr))
++ || (sin->su_si.si_family == AF_INET
++ && sin->su_sin.sin_addr.s_addr == 0))) {
++#else
+ && sa->sa_family == AF_INET
+ && sin->sin_addr.s_addr == 0) {
++#endif
+ errno = ENOTCONN;
+ return (-1);
+ } else {
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
new file mode 100644
index 000000000..226106f4f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
@@ -0,0 +1,153 @@
+Upstream-Status: Backport
+
+Path: news.porcupine.org!news.porcupine.org!not-for-mail
+From: Wietse Venema <wietse@((no)(spam)(please))wzv.win.tue.nl>
+Newsgroups: comp.mail.sendmail,comp.security.unix
+Subject: TCP Wrapper Blacklist Extension
+Followup-To: poster
+Date: 8 Sep 1997 18:53:13 -0400
+Organization: Wietse's hangout while on sabattical in the USA
+Lines: 147
+Sender: wietse@spike.porcupine.org
+Message-ID: <5v1vkp$h4f$1@spike.porcupine.org>
+NNTP-Posting-Host: spike.porcupine.org
+Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158
+
+The patch below adds a new host pattern to the TCP Wrapper access
+control language. Instead of a host name or address pattern, you
+can specify an external /file/name with host name or address
+patterns. The feature can be used recursively.
+
+The /file/name extension makes it easy to blacklist bad sites, for
+example, to block unwanted electronic mail when libwrap is linked
+into sendmail. Adding hosts to a simple text file is much easier
+than having to edit a more complex hosts.allow/deny file.
+
+I developed this a year or so ago as a substitute for NIS netgroups.
+At that time, I did not consider it of sufficient interest for
+inclusion in the TCP Wrapper distribution. How times have changed.
+
+The patch is relative to TCP Wrappers version 7.6. The main archive
+site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz
+
+Thanks to the Debian LINUX folks for expressing their interest in
+this patch.
+
+ Wietse
+
+
+[diff updated by Md]
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:28:01.000000000 +0200
+@@ -97,6 +97,13 @@
+ `[3ffe:505:2:1::]/64\' matches every address in the range
+ `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
+ .IP \(bu
++A string that begins with a `/\' character is treated as a file
++name. A host name or address is matched if it matches any host name
++or address pattern listed in the named file. The file format is
++zero or more lines with zero or more host name or address patterns
++separated by whitespace. A file name pattern can be used anywhere
++a host name or address pattern can be used.
++.IP \(bu
+ Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
+ method of matching cannot be used in conjunction with `net/mask\' matching,
+ hostname matching beginning with `.\' or IP address matching ending with `.\'.
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:27:05.000000000 +0200
+@@ -253,6 +253,26 @@
+ }
+ }
+
++/* hostfile_match - look up host patterns from file */
++
++static int hostfile_match(path, host)
++char *path;
++struct hosts_info *host;
++{
++ char tok[BUFSIZ];
++ int match = NO;
++ FILE *fp;
++
++ if ((fp = fopen(path, "r")) != 0) {
++ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
++ /* void */ ;
++ fclose(fp);
++ } else if (errno != ENOENT) {
++ tcpd_warn("open %s: %m", path);
++ }
++ return (match);
++}
++
+ /* host_match - match host name and/or address against pattern */
+
+ static int host_match(tok, host)
+@@ -280,6 +300,8 @@
+ tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */
+ return (NO);
+ #endif
++ } else if (tok[0] == '/') { /* /file hack */
++ return (hostfile_match(tok, host));
+ } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */
+ char *name = eval_hostname(host);
+ return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c 2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:27:05.000000000 +0200
+@@ -353,6 +353,8 @@
+ {
+ if (pat[0] == '@') {
+ tcpd_warn("%s: daemon name begins with \"@\"", pat);
++ } else if (pat[0] == '/') {
++ tcpd_warn("%s: daemon name begins with \"/\"", pat);
+ } else if (pat[0] == '.') {
+ tcpd_warn("%s: daemon name begins with dot", pat);
+ } else if (pat[strlen(pat) - 1] == '.') {
+@@ -385,6 +387,8 @@
+ {
+ if (pat[0] == '@') { /* @netgroup */
+ tcpd_warn("%s: user name begins with \"@\"", pat);
++ } else if (pat[0] == '/') {
++ tcpd_warn("%s: user name begins with \"/\"", pat);
+ } else if (pat[0] == '.') {
+ tcpd_warn("%s: user name begins with dot", pat);
+ } else if (pat[strlen(pat) - 1] == '.') {
+@@ -430,8 +434,13 @@
+ static int check_host(pat)
+ char *pat;
+ {
++ char buf[BUFSIZ];
+ char *mask;
+ int addr_count = 1;
++ FILE *fp;
++ struct tcpd_context saved_context;
++ char *cp;
++ char *wsp = " \t\r\n";
+
+ if (pat[0] == '@') { /* @netgroup */
+ #ifdef NO_NETGRENT
+@@ -450,6 +459,21 @@
+ tcpd_warn("netgroup support disabled");
+ #endif
+ #endif
++ } else if (pat[0] == '/') { /* /path/name */
++ if ((fp = fopen(pat, "r")) != 0) {
++ saved_context = tcpd_context;
++ tcpd_context.file = pat;
++ tcpd_context.line = 0;
++ while (fgets(buf, sizeof(buf), fp)) {
++ tcpd_context.line++;
++ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
++ check_host(cp);
++ }
++ tcpd_context = saved_context;
++ fclose(fp);
++ } else if (errno != ENOENT) {
++ tcpd_warn("open %s: %m", pat);
++ }
+ } else if (mask = split_at(pat, '/')) { /* network/netmask */
+ #ifdef INET6
+ int mask_len;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
new file mode 100644
index 000000000..260e8d313
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Backport
+
+diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
+--- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002
++++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002
+@@ -448,6 +448,15 @@
+ int len, mask_len, i = 0;
+ char ch;
+
++ /*
++ * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
++ * different between KAME and Solaris8. While KAME returns
++ * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here.
++ */
++ if (STRN_EQ(string, "::ffff:", 7)
++ && dot_quad_addr(string + 7) != INADDR_NONE)
++ return (masked_match4(net_tok, mask_tok, string + 7));
++
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_INET6;
+ hints.ai_socktype = SOCK_STREAM;
+@@ -457,13 +466,6 @@
+ memcpy(&addr, res->ai_addr, sizeof(addr));
+ freeaddrinfo(res);
+
+- if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
+- if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
+- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
+- return (NO);
+- return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
+- }
+-
+ /* match IPv6 address against netnumber/prefixlen */
+ len = strlen(net_tok);
+ if (*net_tok != '[' || net_tok[len - 1] != ']')
+diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
+--- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002
++++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002
+@@ -228,7 +228,7 @@
+ hints.ai_family = sin->sa_family;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
+- if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
++ if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
+ freeaddrinfo(res0);
+ res0 = NULL;
+ tcpd_warn("host name/name mismatch: "
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
new file mode 100644
index 000000000..e8289e44d
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -0,0 +1,83 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200
++++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200
+@@ -45,7 +45,7 @@
+ #
+ # SysV.4 Solaris 2.x OSF AIX
+ #REAL_DAEMON_DIR=/usr/sbin
+-#
++REAL_DAEMON_DIR=/usr/sbin
+ # BSD 4.4
+ #REAL_DAEMON_DIR=/usr/libexec
+ #
+@@ -512,6 +519,7 @@
+ # (examples: allow, deny, banners, twist and spawn).
+ #
+ #STYLE = -DPROCESS_OPTIONS # Enable language extensions.
++STYLE = -DPROCESS_OPTIONS
+
+ ################################################################
+ # Optional: Changing the default disposition of logfile records
+@@ -535,6 +543,7 @@
+ # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
+
+ FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
++FACILITY= LOG_DAEMON
+
+ # The syslog priority at which successful connections are logged.
+
+@@ -631,6 +640,7 @@
+ # lookups altogether, see the next section.
+
+ PARANOID= -DPARANOID
++PARANOID=
+
+ ########################################
+ # Optional: turning off hostname lookups
+@@ -644,6 +654,7 @@
+ # mode (see previous section) and comment out the following definition.
+
+ HOSTNAME= -DALWAYS_HOSTNAME
++HOSTNAME=
+
+ #############################################
+ # Optional: Turning on host ADDRESS checking
+@@ -670,6 +681,7 @@
+ # Solaris 2.x, and Linux. See your system documentation for details.
+ #
+ # KILL_OPT= -DKILL_IP_OPTIONS
++KILL_OPT= -DKILL_IP_OPTIONS
+
+ ## End configuration options
+ ############################
+@@ -677,9 +689,10 @@
+ # Protection against weird shells or weird make programs.
+
+ SHELL = /bin/sh
+-.c.o:; $(CC) $(CFLAGS) -c $*.c
++.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c
+
+-CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
++COPTS = -O2 -g
++CFLAGS = $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
+ $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
+ -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
+ -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
+@@ -712,10 +725,11 @@
+
+ config-check:
+ @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
+- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
+- if cmp cflags /tmp/cflags.$$$$ ; \
+- then rm /tmp/cflags.$$$$ ; \
+- else mv /tmp/cflags.$$$$ cflags ; \
++ @set +e; echo $(CFLAGS) >cflags.new ; \
++ if cmp cflags cflags.new ; \
++ then rm cflags.new ; \
++ else mv cflags.new cflags ; \
+ fi >/dev/null 2>/dev/null
++ @if [ ! -d shared ]; then mkdir shared; fi
+
+ $(LIB): $(LIB_OBJ)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
new file mode 100644
index 000000000..bd1396bc7
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
@@ -0,0 +1,255 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile 2004-05-02 15:37:59.000000000 +0200
++++ tcp_wrappers_7.6/Makefile 2004-05-02 15:31:09.000000000 +0200
+@@ -150,15 +150,15 @@
+
+ linux:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
+ NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
+- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
+
+ gnu:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
+- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all
+
+ # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
+ hpux hpux8 hpux9 hpux10:
+@@ -713,7 +713,22 @@
+
+ LIB = libwrap.a
+
+-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
++shared/%.o: %.c
++ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
++
++SOMAJOR = 0
++SOMINOR = 7.6
++
++SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
++SHLIBSOMAJ = shared/libwrap.so.$(SOMAJOR)
++SHLIBSO = shared/libwrap.so
++SHLIBFLAGS = -Lshared -lwrap
++
++SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
++SHCFLAGS = -fPIC -shared -D_REENTRANT
++SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
++
++all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
+
+ # Invalidate all object files when the compiler options (CFLAGS) have changed.
+
+@@ -731,27 +746,33 @@
+ $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
+ -$(RANLIB) $(LIB)
+
+-tcpd: tcpd.o $(LIB)
+- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
++$(SHLIB): $(SHLIB_OBJ)
++ rm -f $(SHLIB)
++ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
++ ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
++ ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
++
++tcpd: tcpd.o $(SHLIB)
++ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
+
+ miscd: miscd.o $(LIB)
+ $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
+
+-safe_finger: safe_finger.o $(LIB)
+- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
++safe_finger: safe_finger.o $(SHLIB)
++ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
+
+ TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
+
+-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
+- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
++tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
++ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
+
+-try-from: try-from.o fakelog.o $(LIB)
+- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
++try-from: try-from.o fakelog.o $(SHLIB)
++ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
+
+ TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
+
+-tcpdchk: $(TCPDCHK_OBJ) $(LIB)
+- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
++tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
++ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
+
+ shar: $(KIT)
+ @shar $(KIT)
+@@ -767,7 +788,9 @@
+
+ clean:
+ rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
++ libwrap*.so* \
+ cflags
++ rm -rf shared/
+
+ tidy: clean
+ chmod -R a+r .
+@@ -913,5 +936,6 @@
+ update.o: mystdarg.h
+ update.o: tcpd.h
+ vfprintf.o: cflags
++weak_symbols.o: tcpd.h
+ workarounds.o: cflags
+ workarounds.o: tcpd.h
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h 2004-05-02 15:37:59.000000000 +0200
++++ tcp_wrappers_7.6/tcpd.h 2004-05-02 15:37:49.000000000 +0200
+@@ -4,6 +4,15 @@
+ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
+ */
+
++#ifndef _TCPWRAPPERS_TCPD_H
++#define _TCPWRAPPERS_TCPD_H
++
++/* Need definitions of struct sockaddr_in and FILE. */
++#include <netinet/in.h>
++#include <stdio.h>
++
++__BEGIN_DECLS
++
+ /* Structure to describe one communications endpoint. */
+
+ #define STRING_LENGTH 128 /* hosts, users, processes */
+@@ -29,10 +38,10 @@
+ char pid[10]; /* access via eval_pid(request) */
+ struct host_info client[1]; /* client endpoint info */
+ struct host_info server[1]; /* server endpoint info */
+- void (*sink) (); /* datagram sink function or 0 */
+- void (*hostname) (); /* address to printable hostname */
+- void (*hostaddr) (); /* address to printable address */
+- void (*cleanup) (); /* cleanup function or 0 */
++ void (*sink) (int); /* datagram sink function or 0 */
++ void (*hostname) (struct host_info *); /* address to printable hostname */
++ void (*hostaddr) (struct host_info *); /* address to printable address */
++ void (*cleanup) (struct request_info *); /* cleanup function or 0 */
+ struct netconfig *config; /* netdir handle */
+ };
+
+@@ -70,20 +79,27 @@
+ #define fromhost sock_host /* no TLI support needed */
+ #endif
+
+-extern int hosts_access(); /* access control */
+-extern void shell_cmd(); /* execute shell command */
+-extern char *percent_x(); /* do %<char> expansion */
+-extern void rfc931(); /* client name from RFC 931 daemon */
+-extern void clean_exit(); /* clean up and exit */
+-extern void refuse(); /* clean up and exit */
+-extern char *xgets(); /* fgets() on steroids */
+-extern char *split_at(); /* strchr() and split */
+-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
++extern int hosts_access(struct request_info *request); /* access control */
++extern void shell_cmd(char *); /* execute shell command */
++extern char *percent_x(char *, int, char *, struct request_info *);
++ /* do %<char> expansion */
++extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
++ /* client name from RFC 931 daemon */
++extern void clean_exit(struct request_info *); /* clean up and exit */
++extern void refuse(struct request_info *); /* clean up and exit */
++extern char *xgets(char *, int, FILE *); /* fgets() on steroids */
++extern char *split_at(char *, int); /* strchr() and split */
++extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
+
+ /* Global variables. */
+
++#ifdef HAVE_WEAKSYMS
++extern int allow_severity __attribute__ ((weak)); /* for connection logging */
++extern int deny_severity __attribute__ ((weak)); /* for connection logging */
++#else
+ extern int allow_severity; /* for connection logging */
+ extern int deny_severity; /* for connection logging */
++#endif
+ extern char *hosts_allow_table; /* for verification mode redirection */
+ extern char *hosts_deny_table; /* for verification mode redirection */
+ extern int hosts_access_verbose; /* for verbose matching mode */
+@@ -98,6 +114,8 @@
+ #ifdef __STDC__
+ extern struct request_info *request_init(struct request_info *,...);
+ extern struct request_info *request_set(struct request_info *,...);
++extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
++ char *client_user);
+ #else
+ extern struct request_info *request_init(); /* initialize request */
+ extern struct request_info *request_set(); /* update request structure */
+@@ -121,20 +139,23 @@
+ * host_info structures serve as caches for the lookup results.
+ */
+
+-extern char *eval_user(); /* client user */
+-extern char *eval_hostname(); /* printable hostname */
+-extern char *eval_hostaddr(); /* printable host address */
+-extern char *eval_hostinfo(); /* host name or address */
+-extern char *eval_client(); /* whatever is available */
+-extern char *eval_server(); /* whatever is available */
++extern char *eval_user(struct request_info *); /* client user */
++extern char *eval_hostname(struct host_info *); /* printable hostname */
++extern char *eval_hostaddr(struct host_info *); /* printable host address */
++extern char *eval_hostinfo(struct host_info *); /* host name or address */
++extern char *eval_client(struct request_info *);/* whatever is available */
++extern char *eval_server(struct request_info *);/* whatever is available */
+ #define eval_daemon(r) ((r)->daemon) /* daemon process name */
+ #define eval_pid(r) ((r)->pid) /* process id */
+
+ /* Socket-specific methods, including DNS hostname lookups. */
+
+-extern void sock_host(); /* look up endpoint addresses */
+-extern void sock_hostname(); /* translate address to hostname */
+-extern void sock_hostaddr(); /* address to printable address */
++/* look up endpoint addresses */
++extern void sock_host(struct request_info *);
++/* translate address to hostname */
++extern void sock_hostname(struct host_info *);
++/* address to printable address */
++extern void sock_hostaddr(struct host_info *);
+ #define sock_methods(r) \
+ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
+
+@@ -182,7 +203,7 @@
+ * behavior.
+ */
+
+-extern void process_options(); /* execute options */
++extern void process_options(char *, struct request_info *);/* execute options */
+ extern int dry_run; /* verification flag */
+
+ /* Bug workarounds. */
+@@ -221,3 +242,7 @@
+ #define strtok my_strtok
+ extern char *my_strtok();
+ #endif
++
++__END_DECLS
++
++#endif
+diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c
+--- tcp_wrappers_7.6.orig/weak_symbols.c 1970-01-01 01:00:00.000000000 +0100
++++ tcp_wrappers_7.6/weak_symbols.c 2004-05-02 15:31:09.000000000 +0200
+@@ -0,0 +1,11 @@
++ /*
++ * @(#) weak_symbols.h 1.5 99/12/29 23:50
++ *
++ * Author: Anthony Towns <ajt@debian.org>
++ */
++
++#ifdef HAVE_WEAKSYMS
++#include <syslog.h>
++int deny_severity = LOG_WARNING;
++int allow_severity = SEVERITY;
++#endif
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
new file mode 100644
index 000000000..eb5685c57
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
@@ -0,0 +1,68 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5 2003-08-21 03:15:31.000000000 +0200
+@@ -90,6 +90,10 @@
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
+ .IP \(bu
++An expression of the form `n.n.n.n/mm' is interpreted as a
++`net/masklength' pair, where `mm' is the number of consecutive `1'
++bits in the netmask applied to the `n.n.n.n' address.
++.IP \(bu
+ An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
+ `[net]/prefixlen\' pair. An IPv6 host address is matched if
+ `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c 2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c 2003-08-21 03:09:30.000000000 +0200
+@@ -417,7 +417,8 @@
+ if ((addr = dot_quad_addr(string)) == INADDR_NONE)
+ return (NO);
+ if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
+- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
++ || ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE
++ && (mask = cidr_mask_addr(mask_tok)) == 0)) {
+ #ifndef INET6
+ tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
+ #endif
+diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c 2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/misc.c 2003-08-21 03:09:30.000000000 +0200
+@@ -107,3 +107,17 @@
+ }
+ return (runs == 4 ? inet_addr(str) : INADDR_NONE);
+ }
++
++/* cidr_mask_addr - convert cidr netmask length to internal form */
++
++unsigned long cidr_mask_addr(str)
++char *str;
++{
++ int maskbits;
++
++ maskbits = atoi(str);
++ if (maskbits < 1 || maskbits > 32)
++ return (0);
++ return htonl(0xFFFFFFFF << (32 - maskbits));
++}
++
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 03:09:30.000000000 +0200
+@@ -497,12 +497,12 @@
+ int mask_len;
+
+ if ((dot_quad_addr(pat) == INADDR_NONE
+- || dot_quad_addr(mask) == INADDR_NONE)
++ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
+ && (!is_inet6_addr(pat)
+ || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
+ #else
+ if (dot_quad_addr(pat) == INADDR_NONE
+- || dot_quad_addr(mask) == INADDR_NONE)
++ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
+ #endif
+ tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+ } else if (STR_EQ(pat, "FAIL")) { /* obsolete */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
new file mode 100644
index 000000000..3ca687411
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-25 12:17:59.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5 2004-04-25 12:17:53.000000000 +0200
+@@ -89,6 +89,8 @@
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
++`255.255.255.255\' is not a valid mask value, so a single host can be
++matched just by its IP.
+ .IP \(bu
+ An expression of the form `n.n.n.n/mm' is interpreted as a
+ `net/masklength' pair, where `mm' is the number of consecutive `1'
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
new file mode 100644
index 000000000..308737797
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
@@ -0,0 +1,73 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
+--- tcp_wrappers_7.6.orig/eval.c 1995-01-30 19:51:46.000000000 +0100
++++ tcp_wrappers_7.6/eval.c 2004-11-04 13:59:01.000000000 +0100
+@@ -98,6 +98,28 @@
+ }
+ }
+
++/* eval_port - return string with the port */
++char *eval_port(saddr)
++#ifdef INET6
++struct sockaddr *saddr;
++#else
++struct sockaddr_in *saddr;
++#endif
++{
++ static char port[16];
++ if (saddr != 0) {
++ sprintf(port, "%u",
++#ifdef INET6
++ ntohs(((struct sockaddr_in *)saddr)->sin_port));
++#else
++ ntohs(saddr->sin_port));
++#endif
++ } else {
++ strcpy(port, "0");
++ }
++ return (port);
++}
++
+ /* eval_client - return string with as much about the client as we know */
+
+ char *eval_client(request)
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5 2004-11-04 13:17:45.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5 2004-11-04 13:55:32.000000000 +0100
+@@ -175,6 +175,8 @@
+ unavailable.
+ .IP "%n (%N)"
+ The client (server) host name (or "unknown" or "paranoid").
++.IP "%r (%R)"
++The clients (servers) port number (or "0").
+ .IP %p
+ The daemon process id.
+ .IP %s
+diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
+--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-28 17:42:38.000000000 +0100
++++ tcp_wrappers_7.6/percent_x.c 2004-11-04 13:19:29.000000000 +0100
+@@ -63,6 +63,8 @@
+ ch == 'n' ? eval_hostname(request->client) :
+ ch == 'N' ? eval_hostname(request->server) :
+ ch == 'p' ? eval_pid(request) :
++ ch == 'r' ? eval_port(request->client->sin) :
++ ch == 'R' ? eval_port(request->server->sin) :
+ ch == 's' ? eval_server(request) :
+ ch == 'u' ? eval_user(request) :
+ ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), "");
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h 2004-11-04 13:17:45.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h 2004-11-04 13:19:13.000000000 +0100
+@@ -145,6 +145,11 @@
+ extern char *eval_hostinfo(struct host_info *); /* host name or address */
+ extern char *eval_client(struct request_info *);/* whatever is available */
+ extern char *eval_server(struct request_info *);/* whatever is available */
++#ifdef INET6
++extern char *eval_port(struct sockaddr *);
++#else
++extern char *eval_port(struct sockaddr_in *);
++#endif
+ #define eval_daemon(r) ((r)->daemon) /* daemon process name */
+ #define eval_pid(r) ((r)->pid) /* process id */
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
new file mode 100644
index 000000000..4cc554fc3
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
+--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
++++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
+@@ -29,11 +29,15 @@
+
+ while (*bp = *cp)
+ if (*cp == '%' && cp[1] == 'm') {
++#ifdef HAVE_STRERROR
++ strcpy(bp, strerror(errno));
++#else
+ if (errno < sys_nerr && errno > 0) {
+ strcpy(bp, sys_errlist[errno]);
+ } else {
+ sprintf(bp, "Unknown error %d", errno);
+ }
++#endif
+ bp += strlen(bp);
+ cp += 2;
+ } else {
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
new file mode 100644
index 000000000..3ba214d24
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
@@ -0,0 +1,45 @@
+Upstream-Status: Backport
+
+Index: tcp_wrappers_7.6.orig/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig.orig/Makefile 2009-04-06 10:55:47.000000000 +0000
++++ tcp_wrappers_7.6.orig/Makefile 2009-04-06 10:57:04.000000000 +0000
+@@ -748,31 +748,31 @@
+
+ $(SHLIB): $(SHLIB_OBJ)
+ rm -f $(SHLIB)
+- $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
++ $(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
+ ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
+ ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
+
+ tcpd: tcpd.o $(SHLIB)
+- $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
+
+ miscd: miscd.o $(LIB)
+- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
+
+ safe_finger: safe_finger.o $(SHLIB)
+- $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
+
+ TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
+
+ tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
+- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
+
+ try-from: try-from.o fakelog.o $(SHLIB)
+- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
+
+ TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
+
+ tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
+- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
+
+ shar: $(KIT)
+ @shar $(KIT)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
new file mode 100644
index 000000000..19bd7d3c0
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
+--- tcp_wrappers_7.6.orig/hosts_access.3 2004-04-25 00:10:48.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.3 2004-04-25 00:09:36.000000000 +0200
+@@ -14,6 +14,9 @@
+ struct request_info *request_set(request, key, value, ..., 0)
+ struct request_info *request;
+
++void fromhost(request)
++struct request_info *request;
++
+ int hosts_access(request)
+ struct request_info *request;
+
+@@ -60,6 +63,7 @@
+ is available, host names and client user names are looked up on demand,
+ using the request structure as a cache. hosts_access() returns zero if
+ access should be denied.
++fromhost() must be called before hosts_access().
+ .PP
+ hosts_ctl() is a wrapper around the request_init() and hosts_access()
+ routines with a perhaps more convenient interface (though it does not
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
new file mode 100644
index 000000000..5875b81b2
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200
++++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200
+@@ -92,6 +92,8 @@
+ char *cp;
+ char *result = unknown;
+ FILE *fp;
++ unsigned saved_timeout;
++ struct sigaction nact, oact;
+
+ #ifdef INET6
+ /* address family must be the same */
+@@ -134,7 +136,12 @@
+ */
+
+ if (setjmp(timebuf) == 0) {
+- signal(SIGALRM, timeout);
++ /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
++ saved_timeout = alarm(0);
++ nact.sa_handler = timeout;
++ nact.sa_flags = 0;
++ (void) sigemptyset(&nact.sa_mask);
++ (void) sigaction(SIGALRM, &nact, &oact);
+ alarm(rfc931_timeout);
+
+ /*
+@@ -223,6 +230,10 @@
+ }
+ alarm(0);
+ }
++ /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
++ (void) sigaction(SIGALRM, &oact, NULL);
++ if (saved_timeout > 0)
++ alarm(saved_timeout);
+ fclose(fp);
+ }
+ STRN_CPY(dest, result, STRING_LENGTH);
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
new file mode 100644
index 000000000..723f4f136
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
@@ -0,0 +1,41 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100
+@@ -237,10 +237,17 @@ struct request_info *request;
+
+ /* ARGSUSED */
+
+-void rfc931(request)
+-struct request_info *request;
++void rfc931(rmt_sin, our_sin, dest)
++#ifdef INET6
++struct sockaddr *rmt_sin;
++struct sockaddr *our_sin;
++#else
++struct sockaddr_in *rmt_sin;
++struct sockaddr_in *our_sin;
++#endif
++char *dest;
+ {
+- strcpy(request->user, unknown);
++ strcpy(dest, unknown);
+ }
+
+ /* check_path - examine accessibility */
+diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100
+@@ -83,7 +83,11 @@ extern int hosts_access(struct request_i
+ extern void shell_cmd(char *); /* execute shell command */
+ extern char *percent_x(char *, int, char *, struct request_info *);
+ /* do %<char> expansion */
++#ifdef INET6
+ extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
++#else
++extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *);
++#endif
+ /* client name from RFC 931 daemon */
+ extern void clean_exit(struct request_info *); /* clean up and exit */
+ extern void refuse(struct request_info *); /* clean up and exit */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
new file mode 100644
index 000000000..875616b9e
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
@@ -0,0 +1,34 @@
+.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+safe_finger \- finger client wrapper that protects against nasty stuff
+from finger servers
+.SH SYNOPSIS
+.B safe_finger [finger_options]
+.SH DESCRIPTION
+The
+.B safe_finger
+command protects against nasty stuff from finger servers. Use this
+program for automatic reverse finger probes from the
+.B tcp_wrapper
+.B (tcpd)
+, not the raw finger command. The
+.B safe_finger
+command makes sure that the finger client is not run with root
+privileges. It also runs the finger client with a defined PATH
+environment.
+.B safe_finger
+will also protect you from problems caused by the output of some
+finger servers. The problem: some programs may react to stuff in
+the first column. Other programs may get upset by thrash anywhere
+on a line. File systems may fill up as the finger server keeps
+sending data. Text editors may bomb out on extremely long lines.
+The finger server may take forever because it is somehow wedged.
+.B safe_finger
+takes care of all this badness.
+.SH SEE ALSO
+.BR hosts_access (5),
+.BR hosts_options (5),
+.BR tcpd (8)
+.SH AUTHOR
+Wietse Venema, Eindhoven University of Technology, The Netherlands.
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
new file mode 100644
index 000000000..fc2afeef1
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Backport
+
+--- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c
++++ tcp-wrappers-7.6-ipv6.1/safe_finger.c
+@@ -26,21 +26,24 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <pwd.h>
++#include <syslog.h>
+
+ extern void exit();
+
+ /* Local stuff */
+
+-char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
++char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
+
+ #define TIME_LIMIT 60 /* Do not keep listinging forever */
+ #define INPUT_LENGTH 100000 /* Do not keep listinging forever */
+ #define LINE_LENGTH 128 /* Editors can choke on long lines */
+ #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
+ #define UNPRIV_NAME "nobody" /* Preferred privilege level */
+-#define UNPRIV_UGID 32767 /* Default uid and gid */
++#define UNPRIV_UGID 65534 /* Default uid and gid */
+
+ int finger_pid;
++int allow_severity = SEVERITY;
++int deny_severity = LOG_WARNING;
+
+ void cleanup(sig)
+ int sig;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
new file mode 100644
index 000000000..9d7ea042b
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Backport
+
+* Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
+- added security patch tcp_wrappers-7.6-sig.patch
+
+--- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100
+@@ -66,6 +66,7 @@
+
+ #define YES 1
+ #define NO 0
++#define ERR -1
+
+ /*
+ * These variables are globally visible so that they can be redirected in
+@@ -129,9 +129,9 @@
+ return (verdict == AC_PERMIT);
+ if (table_match(hosts_allow_table, request))
+ return (YES);
+- if (table_match(hosts_deny_table, request))
+- return (NO);
+- return (YES);
++ if (table_match(hosts_deny_table, request) == NO)
++ return (YES);
++ return (NO);
+ }
+
+ /* table_match - match table entries with (daemon, client) pair */
+@@ -175,6 +175,7 @@
+ (void) fclose(fp);
+ } else if (errno != ENOENT) {
+ tcpd_warn("cannot open %s: %m", table);
++ match = ERR;
+ }
+ if (match) {
+ if (hosts_access_verbose > 1)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
new file mode 100644
index 000000000..76dd6340b
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:42:25.000000000 +0200
++++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:41:04.000000000 +0200
+@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
+
+ int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
+
+-static jmp_buf timebuf;
++static sigjmp_buf timebuf;
+
+ /* fsocket - open stdio stream on top of socket */
+
+@@ -62,7 +62,7 @@ int protocol;
+ static void timeout(sig)
+ int sig;
+ {
+- longjmp(timebuf, sig);
++ siglongjmp(timebuf, sig);
+ }
+
+ /* rfc931 - return remote user name, given socket structures */
+@@ -135,7 +135,7 @@ char *dest;
+ * Set up a timer so we won't get stuck while waiting for the server.
+ */
+
+- if (setjmp(timebuf) == 0) {
++ if (sigsetjmp(timebuf, 0) == 0) {
+ /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
+ saved_timeout = alarm(0);
+ nact.sa_handler = timeout;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
new file mode 100644
index 000000000..8373e8aa5
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
+--- tcp_wrappers_7.6.orig/fix_options.c 2003-08-21 03:41:33.000000000 +0200
++++ tcp_wrappers_7.6/fix_options.c 2003-08-21 03:41:27.000000000 +0200
+@@ -38,7 +38,11 @@
+ #ifdef IP_OPTIONS
+ unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+ char lbuf[BUFFER_SIZE], *lp;
++#ifdef __GLIBC__
++ size_t optsize = sizeof(optbuf), ipproto;
++#else
+ int optsize = sizeof(optbuf), ipproto;
++#endif
+ struct protoent *ip;
+ int fd = request->fd;
+ unsigned int opt;
+diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
+--- tcp_wrappers_7.6.orig/socket.c 2003-08-21 03:41:33.000000000 +0200
++++ tcp_wrappers_7.6/socket.c 2003-08-21 03:40:51.000000000 +0200
+@@ -90,7 +90,11 @@
+ static struct sockaddr_in client;
+ static struct sockaddr_in server;
+ #endif
++#ifdef __GLIBC__
++ size_t len;
++#else
+ int len;
++#endif
+ char buf[BUFSIZ];
+ int fd = request->fd;
+
+@@ -421,7 +425,11 @@
+ #else
+ struct sockaddr_in sin;
+ #endif
++#ifdef __GLIBC__
++ size_t size = sizeof(sin);
++#else
+ int size = sizeof(sin);
++#endif
+
+ /*
+ * Eat up the not-yet received datagram. Some systems insist on a
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
new file mode 100644
index 000000000..be29bdcfa
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200
+@@ -53,6 +53,24 @@
+ #include "inetcf.h"
+ #include "scaffold.h"
+
++/* list of programs which are known to be linked with libwrap in debian */
++static const char *const libwrap_programs[] = {
++ "portmap", "mountd", "statd", "ugidd",
++ "redir", "rlinetd",
++ "sshd",
++ "atftpd",
++ "diald",
++ "esound",
++ "gdm", "gnome-session",
++ "icecast", "icecast_admin", "icecast_client", "icecast_source",
++ "mysqld",
++ "ntop",
++ "pptpd",
++ "rquotad",
++ "sendmail", "smail",
++ NULL
++};
++
+ /*
+ * Stolen from hosts_access.c...
+ */
+@@ -147,8 +165,8 @@
+ /*
+ * These are not run from inetd but may have built-in access control.
+ */
+- inet_set("portmap", WR_NOT);
+- inet_set("rpcbind", WR_NOT);
++ for (c = 0; libwrap_programs[c]; c++)
++ inet_set(libwrap_programs[c], WR_YES);
+
+ /*
+ * Check accessibility of access control files.
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8
new file mode 100644
index 000000000..9c8f30543
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8
@@ -0,0 +1,28 @@
+.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+try-from \- test program for the tcp_wrapper
+.SH SYNOPSIS
+.B try-from
+.SH DESCRIPTION
+The
+.B try-from
+command can be called via a remote shell command to find out
+if the hostname and address are properly recognized
+by the
+.B tcp_wrapper
+library, if username lookup works, and (SysV only) if the TLI
+on top of IP heuristics work. Diagnostics are reported through
+.BR syslog (3)
+and redirected to stderr.
+
+Example:
+
+rsh host /some/where/try-from
+
+.SH SEE ALSO
+.BR hosts_access (5),
+.BR hosts_options (5),
+.BR tcpd (8)
+.SH AUTHOR
+Wietse Venema, Eindhoven University of Technology, The Netherlands.
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
new file mode 100644
index 000000000..9b865ba80
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -0,0 +1,120 @@
+SUMMARY = "Security tool that is a wrapper for TCP daemons"
+DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
+ services."
+SECTION = "console/network"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
+PR ="r9"
+
+
+PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
+FILES_libwrap = "${base_libdir}/lib*${SOLIBS}"
+FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
+FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
+FILES_libwrap-staticdev = "${libdir}/lib*.a"
+FILES_${PN} = "${sbindir}"
+FILES_${PN}-doc = "${mandir}/man8"
+
+SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
+ file://00_man_quoting.diff \
+ file://01_man_portability.patch \
+ file://05_wildcard_matching.patch \
+ file://06_fix_gethostbyname.patch \
+ file://10_usagi-ipv6.patch \
+ file://11_tcpd_blacklist.patch \
+ file://11_usagi_fix.patch \
+ file://12_makefile_config.patch \
+ file://13_shlib_weaksym.patch \
+ file://14_cidr_support.patch \
+ file://15_match_clarify.patch \
+ file://expand_remote_port.patch \
+ file://have_strerror.patch \
+ file://man_fromhost.patch \
+ file://restore_sigalarm.patch \
+ file://rfc931.diff \
+ file://safe_finger.patch \
+ file://sig_fix.patch \
+ file://siglongjmp.patch \
+ file://size_t.patch \
+ file://tcpdchk_libwrapped.patch \
+ file://ldflags.patch \
+ \
+ file://try-from.8 \
+ file://safe_finger.8"
+
+SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
+SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d"
+
+S = "${WORKDIR}/tcp_wrappers_${PV}"
+
+PARALLEL_MAKE = ""
+EXTRA_OEMAKE = "'CC=${CC}' \
+ 'AR=${AR}' \
+ 'RANLIB=${RANLIB}' \
+ 'REAL_DAEMON_DIR=${sbindir}' \
+ 'STYLE=-DPROCESS_OPTIONS' \
+ 'FACILITY=LOG_DAEMON' \
+ 'SEVERITY=LOG_INFO' \
+ 'BUGS=' \
+ 'VSYSLOG=' \
+ 'RFC931_TIMEOUT=10' \
+ 'ACCESS=-DHOSTS_ACCESS' \
+ 'KILL_OPT=-DKILL_IP_OPTIONS' \
+ 'UMASK=-DDAEMON_UMASK=022' \
+ 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
+ 'LIBS=-lnsl' \
+ 'ARFLAGS=rv' \
+ 'AUX_OBJ=weak_symbols.o' \
+ 'TLI=' \
+ 'COPTS=' \
+ 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
+
+EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
+EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
+
+do_compile () {
+ oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
+ all
+}
+
+BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch"
+MANS3 = "hosts_access"
+MANS5 = "hosts_options"
+MANS8 = "tcpd tcpdchk tcpdmatch"
+do_install () {
+ oe_libinstall -a libwrap ${D}${libdir}
+ oe_libinstall -C shared -so libwrap ${D}${base_libdir}
+
+ rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+ libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
+ ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
+ rm -f ${D}${base_libdir}/libwrap.so
+
+ install -d ${D}${sbindir}
+ for b in ${BINS}; do
+ install -m 0755 $b ${D}${sbindir}/ || exit 1
+ done
+
+ install -d ${D}${mandir}/man3
+ for m in ${MANS3}; do
+ install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1
+ done
+
+ install -d ${D}${mandir}/man5
+ for m in ${MANS5}; do
+ install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1
+ done
+
+ install -d ${D}${mandir}/man8
+ for m in ${MANS8}; do
+ install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
+ done
+
+ install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/
+ install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/
+
+ install -d ${D}${includedir}
+ install -m 0644 tcpd.h ${D}${includedir}/
+}
+
diff --git a/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
new file mode 100644
index 000000000..35c119b73
--- /dev/null
+++ b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
@@ -0,0 +1,44 @@
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: texi2html-5.0/po_document/Makefile.in.in
+===================================================================
+--- texi2html-5.0.orig/po_document/Makefile.in.in
++++ texi2html-5.0/po_document/Makefile.in.in
+@@ -9,7 +9,7 @@
+ # General Public License and is *not* in the public domain.
+ #
+ # Origin: gettext-0.17
+-GETTEXT_MACRO_VERSION = 0.17
++GETTEXT_MACRO_VERSION = 0.18
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+Index: texi2html-5.0/po_messages/Makefile.in.in
+===================================================================
+--- texi2html-5.0.orig/po_messages/Makefile.in.in
++++ texi2html-5.0/po_messages/Makefile.in.in
+@@ -9,7 +9,7 @@
+ # General Public License and is *not* in the public domain.
+ #
+ # Origin: gettext-0.17
+-GETTEXT_MACRO_VERSION = 0.17
++GETTEXT_MACRO_VERSION = 0.18
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+Index: texi2html-5.0/m4/po.m4
+===================================================================
+--- texi2html-5.0.orig/m4/po.m4
++++ texi2html-5.0/m4/po.m4
+@@ -29,7 +29,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
++ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb
new file mode 100644
index 000000000..9785ad5c5
--- /dev/null
+++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Perl script that converts Texinfo to HTML"
+HOMEPAGE = "http://www.nongnu.org/texi2html/"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+PR = "r1"
+
+SRC_URI = "http://download.savannah.gnu.org/releases/texi2html/${BPN}-${PV}.tar.bz2 \
+ file://fix_gettext_version.patch"
+
+SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
+SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
+
+inherit autotools gettext
+
+do_configure_prepend() {
+ # Make a directory for the old gettext setup
+ mkdir ${S}/po
+}
+
+do_configure_append() {
+ # Clean up the phony po directory
+ rm -rf ${S}/po
+}
+
+FILES_${PN}-doc += "${datadir}/texinfo"
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/disable-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/disable-native-tools.patch
new file mode 100644
index 000000000..ab6f1658a
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/disable-native-tools.patch
@@ -0,0 +1,43 @@
+We already DEPEND on the native texinfo being present before building so
+there isn't any need to try and build the required native texinfo binaries
+before cross-compiling. This simplifies the recipe somewhat!
+
+Upstream-Status: Inappropriate oe specific
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+
+Index: texinfo-4.13/configure.ac
+===================================================================
+--- texinfo-4.13.orig/configure.ac
++++ texinfo-4.13/configure.ac
+@@ -100,29 +100,7 @@ AC_CANONICAL_BUILD
+ # $native_tools is also added to SUBDIRS in the main Makefile.am,
+ # so that make compiles the native tools first.
+ #
+-if test "$cross_compiling" = no; then
+- native_tools=
+-else
+- native_tools=tools
+- test -d "$native_tools" || mkdir "$native_tools"
+- confdir=`(cd "$srcdir";pwd)`
+- # Make sure the secondary configure won't fail with
+- # "error: source directory already configured".
+- rm -f config.status
+- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
+- cd "$native_tools" || exit 1
+- # Run secondary configure in alternate environment or
+- # it gets the wrong CC etc.
+- # env -i gives this build host configure a clean environment;
+- # consequently, we have to re-initialize $PATH.
+- env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \
+- PATH="$PATH" \
+- tools_only=1 \
+- ${confdir}/configure --build=${build} --host=${build} \
+- --disable-rpath --disable-nls
+- cd .. || exit 1
+- AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
+-fi
++native_tools=
+ AC_SUBST(native_tools)
+ AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/gettext-macros.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/gettext-macros.patch
new file mode 100644
index 000000000..6adeba568
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/gettext-macros.patch
@@ -0,0 +1,61 @@
+Bump gettext macro numbers as required by newer gettext built by OE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: texinfo-4.13/configure.ac
+===================================================================
+--- texinfo-4.13.orig/configure.ac
++++ texinfo-4.13/configure.ac
+@@ -193,7 +193,7 @@ AM_CONDITIONAL(INSTALL_WARNINGS,
+
+ # i18n support. To update to a new version of gettext, run:
+ # gettextize -f -c
+-AM_GNU_GETTEXT_VERSION([0.17])
++AM_GNU_GETTEXT_VERSION([0.18])
+ AM_GNU_GETTEXT([external])
+
+ # The test suite.
+Index: texinfo-4.13/po/Makefile.in.in
+===================================================================
+--- texinfo-4.13.orig/po/Makefile.in.in
++++ texinfo-4.13/po/Makefile.in.in
+@@ -8,8 +8,8 @@
+ # Please note that the actual code of GNU gettext is covered by the GNU
+ # General Public License and is *not* in the public domain.
+ #
+-# Origin: gettext-0.17
+-GETTEXT_MACRO_VERSION = 0.17
++# Origin: gettext-0.18
++GETTEXT_MACRO_VERSION = 0.18
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+Index: texinfo-4.13/gnulib/m4/gnulib-comp.m4
+===================================================================
+--- texinfo-4.13.orig/gnulib/m4/gnulib-comp.m4
++++ texinfo-4.13/gnulib/m4/gnulib-comp.m4
+@@ -56,7 +56,7 @@ AC_DEFUN([gl_INIT],
+ gl_EXITFAIL
+ gl_GETOPT
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+- AM_GNU_GETTEXT_VERSION([0.17])
++ AM_GNU_GETTEXT_VERSION([0.18])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_GETTIMEOFDAY
+Index: texinfo-4.13/gnulib/m4/po.m4
+===================================================================
+--- texinfo-4.13.orig/gnulib/m4/po.m4
++++ texinfo-4.13/gnulib/m4/po.m4
+@@ -29,7 +29,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
++ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/link-zip.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/link-zip.patch
new file mode 100644
index 000000000..629d329d7
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/link-zip.patch
@@ -0,0 +1,16 @@
+install-info uses symbols from zlib so must link against it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+
+Index: texinfo-4.13/install-info/Makefile.am
+===================================================================
+--- texinfo-4.13.orig/install-info/Makefile.am
++++ texinfo-4.13/install-info/Makefile.am
+@@ -28,4 +28,4 @@ AM_CPPFLAGS = \
+ -I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
+ -DLOCALEDIR=\"$(localedir)\"
+-LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
++LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch
new file mode 100644
index 000000000..05208311f
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.12-zlib.patch
@@ -0,0 +1,171 @@
+Upstream-Status: Pending
+
+diff -up texinfo-4.12/install-info/Makefile.in_old texinfo-4.12/install-info/Makefile.in
+--- texinfo-4.12/install-info/Makefile.in_old 2008-05-13 13:33:55.000000000 +0200
++++ texinfo-4.12/install-info/Makefile.in 2008-05-13 13:52:35.000000000 +0200
+@@ -114,7 +114,7 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+ PROGRAMS = $(bin_PROGRAMS)
+ am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
+ ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
+-ginstall_info_LDADD = $(LDADD)
++ginstall_info_LDADD = $(LDADD) -lz
+ am__DEPENDENCIES_1 =
+ ginstall_info_DEPENDENCIES = ../lib/libtxi.a \
+ $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1)
+diff -up texinfo-4.12/install-info/install-info.c_old texinfo-4.12/install-info/install-info.c
+--- texinfo-4.12/install-info/install-info.c_old 2008-05-13 13:52:44.000000000 +0200
++++ texinfo-4.12/install-info/install-info.c 2008-05-14 10:30:53.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <getopt.h>
+ #include <regex.h>
+ #include <argz.h>
++#include <zlib.h>
+
+ #define TAB_WIDTH 8
+
+@@ -638,7 +639,7 @@ The first time you invoke Info you start
+ COMPRESSION_PROGRAM. The compression program is determined by the
+ magic number, not the filename. */
+
+-FILE *
++void *
+ open_possibly_compressed_file (char *filename,
+ void (*create_callback) (char *),
+ char **opened_filename, char **compression_program, int *is_pipe)
+@@ -646,7 +647,7 @@ open_possibly_compressed_file (char *fil
+ char *local_opened_filename, *local_compression_program;
+ int nread;
+ char data[13];
+- FILE *f;
++ gzFile *f;
+
+ /* We let them pass NULL if they don't want this info, but it's easier
+ to always determine it. */
+@@ -654,22 +655,22 @@ open_possibly_compressed_file (char *fil
+ opened_filename = &local_opened_filename;
+
+ *opened_filename = filename;
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ if (!f)
+ {
+ *opened_filename = concat (filename, ".gz", "");
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ if (!f)
+ {
+ free (*opened_filename);
+ *opened_filename = concat (filename, ".bz2", "");
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ }
+ if (!f)
+ {
+ free (*opened_filename);
+ *opened_filename = concat (filename, ".lzma", "");
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ }
+
+ #ifdef __MSDOS__
+@@ -677,13 +678,13 @@ open_possibly_compressed_file (char *fil
+ {
+ free (*opened_filename);
+ *opened_filename = concat (filename, ".igz", "");
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ }
+ if (!f)
+ {
+ free (*opened_filename);
+ *opened_filename = concat (filename, ".inz", "");
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ }
+ #endif
+ if (!f)
+@@ -695,7 +696,7 @@ open_possibly_compressed_file (char *fil
+ /* And try opening it again. */
+ free (*opened_filename);
+ *opened_filename = filename;
+- f = fopen (*opened_filename, FOPEN_RBIN);
++ f = gzopen (*opened_filename, FOPEN_RBIN);
+ if (!f)
+ pfatal_with_name (filename);
+ }
+@@ -706,12 +707,12 @@ open_possibly_compressed_file (char *fil
+
+ /* Read first few bytes of file rather than relying on the filename.
+ If the file is shorter than this it can't be usable anyway. */
+- nread = fread (data, sizeof (data), 1, f);
+- if (nread != 1)
++ nread = gzread (f, data, sizeof (data));
++ if (nread != sizeof (data))
+ {
+ /* Empty files don't set errno, so we get something like
+ "install-info: No error for foo", which is confusing. */
+- if (nread == 0)
++ if (nread >= 0)
+ fatal (_("%s: empty file"), *opened_filename, 0);
+ pfatal_with_name (*opened_filename);
+ }
+@@ -758,20 +759,22 @@ open_possibly_compressed_file (char *fil
+
+ if (*compression_program)
+ { /* It's compressed, so fclose the file and then open a pipe. */
++ FILE *p;
+ char *command = concat (*compression_program," -cd <", *opened_filename);
+- if (fclose (f) < 0)
++ if (gzclose (f) < 0)
+ pfatal_with_name (*opened_filename);
+- f = popen (command, "r");
+- if (f)
++ p = popen (command, "r");
++ if (p)
+ *is_pipe = 1;
+ else
+ pfatal_with_name (command);
++ return p;
+ }
+ else
+ { /* It's a plain file, seek back over the magic bytes. */
+- if (fseek (f, 0, 0) < 0)
++ if (gzseek (f, 0, SEEK_SET) < 0)
+ pfatal_with_name (*opened_filename);
+-#if O_BINARY
++#if 0 && O_BINARY
+ /* Since this is a text file, and we opened it in binary mode,
+ switch back to text mode. */
+ f = freopen (*opened_filename, "r", f);
+@@ -796,7 +799,7 @@ readfile (char *filename, int *sizep,
+ char **compression_program)
+ {
+ char *real_name;
+- FILE *f;
++ void *f;
+ int pipe_p;
+ int filled = 0;
+ int data_size = 8192;
+@@ -810,7 +813,12 @@ readfile (char *filename, int *sizep,
+
+ for (;;)
+ {
+- int nread = fread (data + filled, 1, data_size - filled, f);
++ int nread;
++
++ if (pipe_p)
++ nread = fread (data + filled, 1, data_size - filled, f);
++ else
++ nread = gzread (f, data + filled, data_size - filled);
+ if (nread < 0)
+ pfatal_with_name (real_name);
+ if (nread == 0)
+@@ -832,7 +840,7 @@ readfile (char *filename, int *sizep,
+ if (pipe_p)
+ pclose (f);
+ else
+- fclose (f);
++ gzclose (f);
+
+ *sizep = filled;
+ return data;
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch
new file mode 100644
index 000000000..50fa4b6c6
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-data_types.patch
@@ -0,0 +1,34 @@
+Upstream-Status: Pending
+
+diff -up texinfo-4.13/info/window.c_old texinfo-4.13/info/window.c
+--- texinfo-4.13/info/window.c_old 2009-08-04 13:46:15.000000000 +0200
++++ texinfo-4.13/info/window.c 2009-08-04 13:47:29.000000000 +0200
+@@ -1581,7 +1581,7 @@ process_node_text (WINDOW *win, char *st
+ const char *carried_over_ptr;
+ size_t carried_over_len, carried_over_count;
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
++ size_t cur_len = mb_len (mbi_cur (iter));
+ int replen;
+ int delim = 0;
+ int rc;
+@@ -1754,7 +1754,7 @@ clean_manpage (char *manpage)
+ mbi_advance (iter))
+ {
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
++ size_t cur_len = mb_len (mbi_cur (iter));
+
+ if (cur_len == 1)
+ {
+@@ -1852,8 +1852,8 @@ window_scan_line (WINDOW *win, int line,
+ mbi_advance (iter))
+ {
+ const char *cur_ptr = mbi_cur_ptr (iter);
+- int cur_len = mb_len (mbi_cur (iter));
+- int replen;
++ size_t cur_len = mb_len (mbi_cur (iter));
++ size_t replen;
+
+ if (cur_ptr >= endp)
+ break;
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch
new file mode 100644
index 000000000..aee21ffec
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-help-index-segfault.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+diff -up texinfo-4.13/info/indices.c.orig texinfo-4.13/info/indices.c
+--- texinfo-4.13/info/indices.c.orig 2010-08-31 12:04:38.317462471 +0200
++++ texinfo-4.13/info/indices.c 2010-08-31 12:11:49.322624552 +0200
+@@ -192,6 +192,7 @@ do_info_index_search (WINDOW *window, in
+ index for, build and remember an index now. */
+ fb = file_buffer_of_window (window);
+ if (!initial_index_filename ||
++ !fb ||
+ (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
+ {
+ info_free_references (index_index);
+@@ -287,8 +288,9 @@ index_entry_exists (WINDOW *window, char
+ return 0;
+
+ fb = file_buffer_of_window (window);
+- if (!initial_index_filename
+- || (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
++ if (!initial_index_filename ||
++ !fb ||
++ (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
+ {
+ info_free_references (index_index);
+ index_index = info_indices_of_file_buffer (fb);
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch
new file mode 100644
index 000000000..49b568fa1
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-mosdo-crash.patch
@@ -0,0 +1,13 @@
+Upstream-Status: Pending
+
+--- texinfo-4.13/install-info/install-info.c.mosdo-crash 2009-09-02 20:18:44.000000000 -0400
++++ texinfo-4.13/install-info/install-info.c 2009-09-02 20:19:53.000000000 -0400
+@@ -1765,7 +1765,7 @@
+ err = argz_add (&argz, &argz_len, opt);
+ free (opt); opt = NULL;
+
+- opt = xmalloc (strlen (regex) + sizeof ("--section="));
++ opt = xmalloc (strlen (title) + sizeof ("--section="));
+ if (sprintf (opt, "--section=%s", title) == -1)
+ err = 1;
+ if (!err)
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch
new file mode 100644
index 000000000..312430f5a
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/texinfo-4.13a-powerpc.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+diff -up texinfo-4.13/install-info/install-info.c.patch texinfo-4.13/install-info/install-info.c
+--- texinfo-4.13/install-info/install-info.c.patch 2010-01-11 14:46:32.000000000 +0100
++++ texinfo-4.13/install-info/install-info.c 2010-01-11 14:48:47.162152695 +0100
+@@ -772,7 +772,7 @@ open_possibly_compressed_file (char *fil
+ }
+ else
+ { /* It's a plain file, seek back over the magic bytes. */
+- if (gzseek (f, 0, SEEK_SET) < 0)
++ if (gzseek (f, 0, SEEK_SET) == -1)
+ pfatal_with_name (*opened_filename);
+ #if 0 && O_BINARY
+ /* Since this is a text file, and we opened it in binary mode,
diff --git a/meta/recipes-extended/texinfo/texinfo-4.13a/use_host_makedoc.patch b/meta/recipes-extended/texinfo/texinfo-4.13a/use_host_makedoc.patch
new file mode 100644
index 000000000..db41f1a47
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.13a/use_host_makedoc.patch
@@ -0,0 +1,37 @@
+This patch requires that we also enable building of the
+texinfo-native recipe which will install the makedoc tool
+for the host machine.
+
+This patch simply uses the newly installed makedoc tool from
+sysroot.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: texinfo-4.13/info/Makefile.am
+===================================================================
+--- texinfo-4.13.orig/info/Makefile.am 2008-05-22 05:11:33.000000000 -0700
++++ texinfo-4.13/info/Makefile.am 2011-12-10 12:55:53.604440118 -0800
+@@ -75,7 +75,7 @@
+ # more than once.
+ funs.h: makedoc$(EXEEXT) $(cmd_sources)
+ rm -f $(generated_sources)
+- $(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources)
++ makedoc $(cmd_sources)
+
+ # The following hack is necessary to hint make before the automatic
+ # dependencies are built.
+Index: texinfo-4.13/doc/Makefile.am
+===================================================================
+--- texinfo-4.13.orig/doc/Makefile.am 2008-09-18 11:31:56.000000000 -0700
++++ texinfo-4.13/doc/Makefile.am 2011-12-10 13:04:09.216457601 -0800
+@@ -19,7 +19,7 @@
+
+ # Use the programs built in our distribution, taking account of possible
+ # cross-compiling.
+-MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo
++MAKEINFO = makeinfo
+
+ # We'd also like to use something like this, but Automake calls
+ # "install-info" directly.
diff --git a/meta/recipes-extended/texinfo/texinfo_4.13a.bb b/meta/recipes-extended/texinfo/texinfo_4.13a.bb
new file mode 100644
index 000000000..f9e566b2c
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_4.13a.bb
@@ -0,0 +1,64 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
+PR = "r4"
+
+DEPENDS = "zlib ncurses texinfo-native"
+DEPENDS_virtclass-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch"
+TARGET_PATCH_virtclass-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/texinfo-${PV}.tar.gz \
+ file://texinfo-4.12-zlib.patch \
+ file://texinfo-4.13a-data_types.patch \
+ file://texinfo-4.13a-mosdo-crash.patch \
+ file://texinfo-4.13a-powerpc.patch \
+ file://texinfo-4.13a-help-index-segfault.patch \
+ file://disable-native-tools.patch \
+ file://link-zip.patch \
+ file://gettext-macros.patch \
+ ${TARGET_PATCH}"
+
+SRC_URI[md5sum] = "71ba711519209b5fb583fed2b3d86fcb"
+SRC_URI[sha256sum] = "1303e91a1c752b69a32666a407e9fbdd6e936def4b09bc7de30f416301530d68"
+
+S = "${WORKDIR}/texinfo-4.13"
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+do_compile_prepend() {
+ if [ -d tools ];then
+ oe_runmake -C tools/gnulib/lib
+ fi
+}
+
+do_install_append() {
+ mkdir -p ${D}${datadir}/${tex_texinfo}
+ install -p -m644 doc/texinfo.tex doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+}
+do_install_append_virtclass-native() {
+ install -m 755 info/makedoc ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
+ ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+ ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi"
+FILES_${PN}-doc = "${datadir}/texinfo ${infodir}/texinfo* \
+ ${datadir}/${tex_texinfo} \
+ ${mandir}/man1/makeinfo.1* ${mandir}/man5/texinfo.5* \
+ ${mandir}/man1/texindex.1* ${mandir}/man1/texi2dvi.1* \
+ ${mandir}/man1/texi2pdf.1* ${mandir}/man1/pdftexi2dvi.1*"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch
new file mode 100644
index 000000000..23ea0e3eb
--- /dev/null
+++ b/meta/recipes-extended/time/time-1.7/debian.patch
@@ -0,0 +1,1301 @@
+Upstream-Status: Backport
+
+--- time-1.7.orig/configure.in
++++ time-1.7/configure.in
+@@ -1,11 +1,8 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(time.c)
+-VERSION=1.7
+-AC_SUBST(VERSION)
+-PACKAGE=time
+-AC_SUBST(PACKAGE)
++AM_INIT_AUTOMAKE(time, 1.7)
+
+-AC_ARG_PROGRAM
++AM_MAINTAINER_MODE
+
+ dnl Checks for programs.
+ AC_PROG_CC
+@@ -15,7 +12,7 @@
+ dnl Checks for header files.
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
++AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+--- time-1.7.orig/version.texi
++++ time-1.7/version.texi
+@@ -1,3 +1,3 @@
+-@set UPDATED 12 June 1996
++@set UPDATED 9 May 2002
+ @set EDITION 1.7
+ @set VERSION 1.7
+--- time-1.7.orig/time.c
++++ time-1.7/time.c
+@@ -147,6 +147,10 @@
+ NULL
+ };
+
++
++/* If true, do not show the exit message */
++static boolean quiet;
++
+ /* If true, show an English description next to each statistic. */
+ static boolean verbose;
+
+@@ -172,6 +176,7 @@
+ {"help", no_argument, NULL, 'h'},
+ {"output-file", required_argument, NULL, 'o'},
+ {"portability", no_argument, NULL, 'p'},
++ {"quiet", no_argument,NULL, 'q'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
+ {NULL, no_argument, NULL, 0}
+@@ -333,7 +338,8 @@
+ else if (WIFSIGNALED (resp->waitstatus))
+ fprintf (fp, "Command terminated by signal %d\n",
+ WTERMSIG (resp->waitstatus));
+- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
++ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
++ && !quiet)
+ fprintf (fp, "Command exited with non-zero status %d\n",
+ WEXITSTATUS (resp->waitstatus));
+
+@@ -523,6 +529,7 @@
+ char *format; /* Format found in environment. */
+
+ /* Initialize the option flags. */
++ quiet = false;
+ verbose = false;
+ outfile = NULL;
+ outfp = stderr;
+@@ -536,7 +543,7 @@
+ if (format)
+ output_format = format;
+
+- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
++ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
+ != EOF)
+ {
+ switch (optc)
+@@ -555,6 +562,9 @@
+ case 'p':
+ output_format = posix_format;
+ break;
++ case 'q':
++ quiet = true;
++ break;
+ case 'v':
+ verbose = true;
+ break;
+@@ -642,9 +652,9 @@
+ fflush (outfp);
+
+ if (WIFSTOPPED (res.waitstatus))
+- exit (WSTOPSIG (res.waitstatus));
++ exit (WSTOPSIG (res.waitstatus) + 128);
+ else if (WIFSIGNALED (res.waitstatus))
+- exit (WTERMSIG (res.waitstatus));
++ exit (WTERMSIG (res.waitstatus) + 128);
+ else if (WIFEXITED (res.waitstatus))
+ exit (WEXITSTATUS (res.waitstatus));
+ }
+@@ -657,7 +667,7 @@
+ fprintf (stream, "\
+ Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
+ [--portability] [--format=format] [--output=file] [--version]\n\
+- [--help] command [arg...]\n",
++ [--quiet] [--help] command [arg...]\n",
+ program_name);
+ exit (status);
+ }
+--- time-1.7.orig/resuse.h
++++ time-1.7/resuse.h
+@@ -36,19 +36,8 @@
+ # include <sys/rusage.h>
+ #else
+ # define TV_MSEC tv_usec / 1000
+-# if HAVE_WAIT3
++# if HAVE_SYS_RESOURCE_H
+ # include <sys/resource.h>
+-# else
+-/* Process resource usage structure. */
+-struct rusage
+-{
+- struct timeval ru_utime; /* User time used. */
+- struct timeval ru_stime; /* System time used. */
+- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
+- ru_minflt, ru_majflt, ru_nswap, ru_inblock,
+- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
+- ru_nvcsw, ru_nivcsw;
+-};
+ # endif
+ #endif
+
+--- time-1.7.orig/time.texi
++++ time-1.7/time.texi
+@@ -11,6 +11,12 @@
+ @finalout
+ @end iftex
+
++@dircategory Individual utilities
++@direntry
++* time: (time). Run programs and summarize
++ system resource usage.
++@end direntry
++
+ @ifinfo
+ This file documents the the GNU @code{time} command for running programs
+ and summarizing the system resources they use.
+@@ -185,6 +191,10 @@
+ sys %S
+ @end example
+
++@item -q
++@itemx --quiet
++Suppress non-zero error code from the executed program.
++
+ @item -v
+ @itemx --verbose
+ @cindex format
+--- time-1.7.orig/time.info
++++ time-1.7/time.info
+@@ -1,5 +1,10 @@
+-This is Info file ./time.info, produced by Makeinfo-1.55 from the input
+-file time.texi.
++This is time.info, produced by makeinfo version 4.1 from time.texi.
++
++INFO-DIR-SECTION Individual utilities
++START-INFO-DIR-ENTRY
++* time: (time). Run programs and summarize
++ system resource usage.
++END-INFO-DIR-ENTRY
+
+ This file documents the the GNU `time' command for running programs
+ and summarizing the system resources they use.
+@@ -31,7 +36,7 @@
+
+ * Resource Measurement:: Measuring program resource use.
+
+- -- The Detailed Node Listing --
++ --- The Detailed Node Listing ---
+
+ Measuring Program Resource Use
+
+@@ -58,14 +63,14 @@
+ The `time' command runs another program, then displays information
+ about the resources used by that program, collected by the system while
+ the program was running. You can select which information is reported
+-and the format in which it is shown (*note Setting Format::.), or have
++and the format in which it is shown (*note Setting Format::), or have
+ `time' save the information in a file instead of displaying it on the
+-screen (*note Redirecting::.).
++screen (*note Redirecting::).
+
+ The resources that `time' can report on fall into the general
+ categories of time, memory, and I/O and IPC calls. Some systems do not
+ provide much information about program resource use; `time' reports
+-unavailable information as zero values (*note Accuracy::.).
++unavailable information as zero values (*note Accuracy::).
+
+ The format of the `time' command is:
+
+@@ -132,6 +137,10 @@
+ user %U
+ sys %S
+
++`-q'
++`--quiet'
++ Suppress non-zero error code from the executed program.
++
+ `-v'
+ `--verbose'
+ Use the built-in verbose format, which displays each available
+@@ -174,7 +183,7 @@
+ The resource specifiers, which are a superset of those recognized by
+ the `tcsh' builtin `time' command, are listed below. Not all resources
+ are measured by all versions of Unix, so some of the values might be
+-reported as zero (*note Accuracy::.).
++reported as zero (*note Accuracy::).
+
+ * Menu:
+
+@@ -308,11 +317,11 @@
+ `-o FILE'
+ `--output=FILE'
+ Write the resource use statistics to FILE. By default, this
+- *overwrites* the file, destroying the file's previous contents.
++ _overwrites_ the file, destroying the file's previous contents.
+
+ `-a'
+ `--append'
+- *Append* the resource use information to the output file instead
++ _Append_ the resource use information to the output file instead
+ of overwriting it. This option is only useful with the `-o' or
+ `--output' option.
+
+@@ -437,7 +446,7 @@
+
+ `-a'
+ `--append'
+- *Append* the resource use information to the output file instead
++ _Append_ the resource use information to the output file instead
+ of overwriting it.
+
+ `-f FORMAT'
+@@ -462,17 +471,17 @@
+
+ 
+ Tag Table:
+-Node: Top934
+-Node: Resource Measurement1725
+-Node: Setting Format3678
+-Node: Format String4907
+-Node: Time Resources6214
+-Node: Memory Resources6844
+-Node: I/O Resources7549
+-Node: Command Info8747
+-Node: Redirecting8964
+-Node: Examples9754
+-Node: Accuracy12064
+-Node: Invoking time13586
++Node: Top1115
++Node: Resource Measurement1908
++Node: Setting Format3858
++Node: Format String5164
++Node: Time Resources6470
++Node: Memory Resources7100
++Node: I/O Resources7805
++Node: Command Info9003
++Node: Redirecting9220
++Node: Examples10010
++Node: Accuracy12320
++Node: Invoking time13842
+ 
+ End Tag Table
+--- time-1.7.orig/time.html
++++ time-1.7/time.html
+@@ -0,0 +1,1021 @@
++<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
++ "http://www.w3.org/TR/html40/loose.dtd">
++<HTML>
++<!-- Created on September, 1 2003 by texi2html 1.66 -->
++<!--
++Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
++ Karl Berry <karl@freefriends.org>
++ Olaf Bachmann <obachman@mathematik.uni-kl.de>
++ and many others.
++Maintained by: Many creative people <dev@texi2html.cvshome.org>
++Send bugs and suggestions to <users@texi2html.cvshome.org>
++
++-->
++<HEAD>
++<TITLE>Measuring Program Resource Use</TITLE>
++
++<META NAME="description" CONTENT="Measuring Program Resource Use">
++<META NAME="keywords" CONTENT="Measuring Program Resource Use">
++<META NAME="resource-type" CONTENT="document">
++<META NAME="distribution" CONTENT="global">
++<META NAME="Generator" CONTENT="texi2html 1.66">
++
++</HEAD>
++
++<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
++
++<A NAME="SEC_Top"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Measuring Program Resource Use</H1>
++
++<P>
++
++This file documents the the GNU <CODE>time</CODE> command for running programs
++and summarizing the system resources they use.
++This is edition 1.7, for version 1.7.
++</P>
++<P>
++
++</P>
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++</TABLE>
++<P>
++
++<HR SIZE=1>
++<A NAME="SEC1"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<A NAME="Resource Measurement"></A>
++<H1> 1. Measuring Program Resource Use </H1>
++<!--docid::SEC1::-->
++<P>
++
++The <CODE>time</CODE> command runs another program, then displays information
++about the resources used by that program, collected by the system while
++the program was running. You can select which information is reported
++and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
++<CODE>time</CODE> save the information in a file instead of displaying it on the
++screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
++</P>
++<P>
++
++The resources that <CODE>time</CODE> can report on fall into the general
++categories of time, memory, and I/O and IPC calls. Some systems do not
++provide much information about program resource use; <CODE>time</CODE>
++reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
++</P>
++<P>
++
++The format of the <CODE>time</CODE> command is:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
++</pre></td></tr></table><P>
++
++<A NAME="IDX1"></A>
++<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
++<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
++information about resources used by <VAR>command</VAR>.
++</P>
++<P>
++
++Here is an example of using <CODE>time</CODE> to measure the time and other
++resources used by running the program <CODE>grep</CODE>:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time grep nobody /etc/aliases
++nobody:/dev/null
++etc-files:nobody
++misc-group:nobody
++0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
++46inputs+7outputs (43major+251minor)pagefaults 0swaps
++</pre></td></tr></table><P>
++
++Mail suggestions and bug reports for GNU <CODE>time</CODE> to
++<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of
++<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
++operating system and C compiler you used.
++</P>
++<P>
++
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
++</TABLE>
++<P>
++
++<A NAME="Setting Format"></A>
++<HR SIZE="6">
++<A NAME="SEC2"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.1 Setting the Output Format </H2>
++<!--docid::SEC2::-->
++<P>
++
++<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
++display about the resources used by the command it runs. See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents.
++</P>
++<P>
++
++You can specify a format string with the command line options listed
++below. If no format is specified on the command line, but the
++<CODE>TIME</CODE> environment variable is set, its value is used as the format
++string. Otherwise, the default format built into <CODE>time</CODE> is used:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
++%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
++</pre></td></tr></table><P>
++
++The command line options to set the format are:
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-f <VAR>format</VAR></CODE>
++<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
++<DD>Use <VAR>format</VAR> as the format string.
++<P>
++
++</P>
++<DT><CODE>-p</CODE>
++<DD><DT><CODE>--portability</CODE>
++<DD>Use the following format string, for conformance with POSIX standard
++1003.2:
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>real %e
++user %U
++sys %S
++</pre></td></tr></table><P>
++
++</P>
++<DT><CODE>-q</CODE>
++<DD><DT><CODE>--quiet</CODE>
++<DD>Suppress non-zero error code from the executed program.
++<P>
++
++</P>
++<DT><CODE>-v</CODE>
++<DD><DT><CODE>--verbose</CODE>
++<DD><A NAME="IDX2"></A>
++Use the built-in verbose format, which displays each available piece of
++information on the program's resource use on its own line, with an
++English description of its meaning.
++</DL>
++<P>
++
++<A NAME="Format String"></A>
++<HR SIZE="6">
++<A NAME="SEC3"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.2 The Format String </H2>
++<!--docid::SEC3::-->
++<P>
++
++<A NAME="IDX3"></A>
++<A NAME="IDX4"></A>
++The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
++It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
++with plain text.
++</P>
++<P>
++
++A backslash introduces an <EM>escape</EM>, which is translated
++into a single printing character upon output. The valid escapes are
++listed below. An invalid escape is output as a question mark followed
++by a backslash.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>\t</CODE>
++<DD>a tab character
++<P>
++
++</P>
++<DT><CODE>\n</CODE>
++<DD>a newline
++<P>
++
++</P>
++<DT><CODE>\\</CODE>
++<DD>a literal backslash
++</DL>
++<P>
++
++<CODE>time</CODE> always prints a newline after printing the resource use
++information, so normally format strings do not end with a newline
++character (or `<SAMP>\n</SAMP>').
++</P>
++<P>
++
++A resource specifier consists of a percent sign followed by another
++character. An invalid resource specifier is output as a question mark
++followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal
++percent sign.
++</P>
++<P>
++
++The resource specifiers, which are a superset of those recognized by the
++<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all
++resources are measured by all versions of Unix, so some of the values
++might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
++</P>
++<P>
++
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++</TABLE>
++<P>
++
++<A NAME="Time Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC4"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.1 Time Resources </H3>
++<!--docid::SEC4::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>E</CODE>
++<DD>Elapsed real (wall clock) time used by the process, in
++[hours:]minutes:seconds.
++<P>
++
++</P>
++<DT><CODE>e</CODE>
++<DD>Elapsed real (wall clock) time used by the process, in
++seconds.
++<P>
++
++</P>
++<DT><CODE>S</CODE>
++<DD>Total number of CPU-seconds used by the system on behalf of the process
++(in kernel mode), in seconds.
++<P>
++
++</P>
++<DT><CODE>U</CODE>
++<DD>Total number of CPU-seconds that the process used directly (in user
++mode), in seconds.
++<P>
++
++</P>
++<DT><CODE>P</CODE>
++<DD>Percentage of the CPU that this job got. This is just user + system
++times divied by the total running time.
++</DL>
++<P>
++
++<A NAME="Memory Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC5"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.2 Memory Resources </H3>
++<!--docid::SEC5::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>M</CODE>
++<DD>Maximum resident set size of the process during its lifetime, in
++Kilobytes.
++<P>
++
++</P>
++<DT><CODE>t</CODE>
++<DD>Average resident set size of the process, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>K</CODE>
++<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>D</CODE>
++<DD>Average size of the process's unshared data area, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>p</CODE>
++<DD>Average size of the process's unshared stack, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>X</CODE>
++<DD>Average size of the process's shared text, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>Z</CODE>
++<DD>System's page size, in bytes. This is a per-system constant, but
++varies between systems.
++</DL>
++<P>
++
++<A NAME="I/O Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC6"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.3 I/O Resources </H3>
++<!--docid::SEC6::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>F</CODE>
++<DD>Number of major, or I/O-requiring, page faults that occurred while the
++process was running. These are faults where the page has actually
++migrated out of primary memory.
++<P>
++
++</P>
++<DT><CODE>R</CODE>
++<DD>Number of minor, or recoverable, page faults. These are pages that are
++not valid (so they fault) but which have not yet been claimed by other
++virtual pages. Thus the data in the page is still valid but the system
++tables must be updated.
++<P>
++
++</P>
++<DT><CODE>W</CODE>
++<DD>Number of times the process was swapped out of main memory.
++<P>
++
++</P>
++<DT><CODE>c</CODE>
++<DD>Number of times the process was context-switched involuntarily (because
++the time slice expired).
++<P>
++
++</P>
++<DT><CODE>w</CODE>
++<DD>Number of times that the program was context-switched voluntarily, for
++instance while waiting for an I/O operation to complete.
++<P>
++
++</P>
++<DT><CODE>I</CODE>
++<DD>Number of file system inputs by the process.
++<P>
++
++</P>
++<DT><CODE>O</CODE>
++<DD>Number of file system outputs by the process.
++<P>
++
++</P>
++<DT><CODE>r</CODE>
++<DD>Number of socket messages received by the process.
++<P>
++
++</P>
++<DT><CODE>s</CODE>
++<DD>Number of socket messages sent by the process.
++<P>
++
++</P>
++<DT><CODE>k</CODE>
++<DD>Number of signals delivered to the process.
++</DL>
++<P>
++
++<A NAME="Command Info"></A>
++<HR SIZE="6">
++<A NAME="SEC7"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.4 Command Info </H3>
++<!--docid::SEC7::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>C</CODE>
++<DD>Name and command line arguments of the command being timed.
++<P>
++
++</P>
++<DT><CODE>x</CODE>
++<DD>Exit status of the command.
++</DL>
++<P>
++
++<A NAME="Redirecting"></A>
++<HR SIZE="6">
++<A NAME="SEC8"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.3 Redirecting Output </H2>
++<!--docid::SEC8::-->
++<P>
++
++By default, <CODE>time</CODE> writes the resource use statistics to the
++standard error stream. The options below make it write the statistics
++to a file instead. Doing this can be useful if the program you're
++running writes to the standard error or you're running <CODE>time</CODE>
++noninteractively or in the background.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-o <VAR>file</VAR></CODE>
++<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
++<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this
++<EM>overwrites</EM> the file, destroying the file's previous contents.
++<P>
++
++</P>
++<DT><CODE>-a</CODE>
++<DD><DT><CODE>--append</CODE>
++<DD><EM>Append</EM> the resource use information to the output file instead
++of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or
++`<SAMP>--output</SAMP>' option.
++</DL>
++<P>
++
++<A NAME="Examples"></A>
++<HR SIZE="6">
++<A NAME="SEC9"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.4 Examples </H2>
++<!--docid::SEC9::-->
++<P>
++
++Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time wc /etc/hosts
++ 35 111 1134 /etc/hosts
++0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
++1inputs+1outputs (0major+0minor)pagefaults 0swaps
++</pre></td></tr></table><P>
++
++Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
++wall-clock time:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -f &quot;\t%E real,\t%U user,\t%S sys&quot; ls -Fs
++total 16
++1 account/ 1 db/ 1 mail/ 1 run/
++1 backups/ 1 emacs/ 1 msgs/ 1 rwho/
++1 crash/ 1 games/ 1 preserve/ 1 spool/
++1 cron/ 1 log/ 1 quotas/ 1 tmp/
++ 0:00.03 real, 0.00 user, 0.01 sys
++</pre></td></tr></table><P>
++
++Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
++and number of signals to the file `<TT>log</TT>', reading the format string
++from the environment variable <CODE>TIME</CODE>:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ export TIME=&quot;\t%E,\t%k&quot; # If using bash or ksh
++eg$ setenv TIME &quot;\t%E,\t%k&quot; # If using csh or tcsh
++eg$ time -a -o log emacs .bashrc
++eg$ cat log
++ 0:16.55, 726
++</pre></td></tr></table><P>
++
++Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
++verbosely:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -v sleep 4
++ Command being timed: &quot;sleep 4&quot;
++ User time (seconds): 0.00
++ System time (seconds): 0.05
++ Percent of CPU this job got: 1%
++ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
++ Average shared text size (kbytes): 36
++ Average unshared data size (kbytes): 24
++ Average stack size (kbytes): 0
++ Average total size (kbytes): 60
++ Maximum resident set size (kbytes): 32
++ Average resident set size (kbytes): 24
++ Major (requiring I/O) page faults: 3
++ Minor (reclaiming a frame) page faults: 0
++ Voluntary context switches: 11
++ Involuntary context switches: 0
++ Swaps: 0
++ File system inputs: 3
++ File system outputs: 1
++ Socket messages sent: 0
++ Socket messages received: 0
++ Signals delivered: 1
++ Page size (bytes): 4096
++ Exit status: 0
++</pre></td></tr></table><P>
++
++<A NAME="Accuracy"></A>
++<HR SIZE="6">
++<A NAME="SEC10"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.5 Accuracy </H2>
++<!--docid::SEC10::-->
++<P>
++
++The elapsed time is not collected atomically with the execution of the
++program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
++command gets stopped or swapped out in between when the program being
++timed exits and when <CODE>time</CODE> calculates how long it took to run), it
++could be much larger than the actual execution time.
++</P>
++<P>
++
++When the running time of a command is very nearly zero, some values
++(e.g., the percentage of CPU used) may be reported as either zero (which
++is wrong) or a question mark.
++</P>
++<P>
++
++Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
++system call. The numbers are only as good as those returned by
++<CODE>wait3</CODE>. Many systems do not measure all of the resources that
++<CODE>time</CODE> can report on; those resources are reported as zero. The
++systems that measure most or all of the resources are based on 4.2 or
++4.3BSD. Later BSD releases use different memory management code that
++measures fewer resources.
++</P>
++<P>
++
++On systems that do not have a <CODE>wait3</CODE> call that returns status
++information, the <CODE>times</CODE> system call is used instead. It provides
++much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
++reports most of the resources as zero.
++</P>
++<P>
++
++The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only &quot;real&quot; input
++and output and do not include those supplied by caching devices. The
++meaning of &quot;real&quot; I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
++muddled for workstations, especially diskless ones.
++</P>
++<P>
++
++<A NAME="Invoking time"></A>
++<HR SIZE="6">
++<A NAME="SEC11"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
++<!--docid::SEC11::-->
++<P>
++
++The format of the <CODE>time</CODE> command is:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
++</pre></td></tr></table><P>
++
++<A NAME="IDX5"></A>
++<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
++<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
++information about resources used by <VAR>command</VAR> (on the standard error
++output, by default). If <VAR>command</VAR> exits with non-zero status or is
++terminated by a signal, <CODE>time</CODE> displays a warning message and the
++exit status or signal number.
++</P>
++<P>
++
++Options to <CODE>time</CODE> must appear on the command line before
++<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is
++passed as arguments to <VAR>command</VAR>.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-o <VAR>file</VAR></CODE>
++<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
++<DD>Write the resource use statistics to <VAR>file</VAR>.
++<P>
++
++</P>
++<DT><CODE>-a</CODE>
++<DD><DT><CODE>--append</CODE>
++<DD><EM>Append</EM> the resource use information to the output file instead
++of overwriting it.
++<P>
++
++</P>
++<DT><CODE>-f <VAR>format</VAR></CODE>
++<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
++<DD>Use <VAR>format</VAR> as the format string.
++<P>
++
++</P>
++<DT><CODE>--help</CODE>
++<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
++<P>
++
++</P>
++<DT><CODE>-p</CODE>
++<DD><DT><CODE>--portability</CODE>
++<DD>Use the POSIX format.
++<P>
++
++</P>
++<DT><CODE>-v</CODE>
++<DD><DT><CODE>--verbose</CODE>
++<DD><A NAME="IDX6"></A>
++Use the built-in verbose format.
++<P>
++
++</P>
++<DT><CODE>-V</CODE>
++<DD><DT><CODE>--version</CODE>
++<DD><A NAME="IDX7"></A>
++Print the version number of <CODE>time</CODE> and exit.
++</DL>
++<P>
++
++<HR SIZE="6">
++<A NAME="SEC_Contents"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Table of Contents</H1>
++<BLOCKQUOTE>
++<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
++<BR>
++<BLOCKQUOTE>
++<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
++<BR>
++<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
++<BR>
++<BLOCKQUOTE>
++<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
++<BR>
++<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
++<BR>
++<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
++<BR>
++<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
++<BR>
++</BLOCKQUOTE>
++<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
++<BR>
++<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
++<BR>
++<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
++<BR>
++<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
++<BR>
++</BLOCKQUOTE>
++</BLOCKQUOTE>
++<HR SIZE=1>
++<A NAME="SEC_OVERVIEW"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Short Table of Contents</H1>
++<BLOCKQUOTE>
++<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
++<BR>
++
++</BLOCKQUOTE>
++<HR SIZE=1>
++<A NAME="SEC_About"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>About this document</H1>
++This document was generated
++by
++using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
++<P></P>
++The buttons in the navigation panels have the following meaning:
++<P></P>
++<table border = "1">
++<TR>
++<TH> Button </TH>
++<TH> Name </TH>
++<TH> Go to </TH>
++<TH> From 1.2.3 go to</TH>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &lt; ] </TD>
++<TD ALIGN="CENTER">
++Back
++</TD>
++<TD>
++previous section in reading order
++</TD>
++<TD>
++1.2.2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &gt; ] </TD>
++<TD ALIGN="CENTER">
++Forward
++</TD>
++<TD>
++next section in reading order
++</TD>
++<TD>
++1.2.4
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &lt;&lt; ] </TD>
++<TD ALIGN="CENTER">
++FastBack
++</TD>
++<TD>
++beginning of this chapter or previous chapter
++</TD>
++<TD>
++1
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ Up ] </TD>
++<TD ALIGN="CENTER">
++Up
++</TD>
++<TD>
++up section
++</TD>
++<TD>
++1.2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &gt;&gt; ] </TD>
++<TD ALIGN="CENTER">
++FastForward
++</TD>
++<TD>
++next chapter
++</TD>
++<TD>
++2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Top] </TD>
++<TD ALIGN="CENTER">
++Top
++</TD>
++<TD>
++cover (top) of document
++</TD>
++<TD>
++ &nbsp;
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Contents] </TD>
++<TD ALIGN="CENTER">
++Contents
++</TD>
++<TD>
++table of contents
++</TD>
++<TD>
++ &nbsp;
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Index] </TD>
++<TD ALIGN="CENTER">
++Index
++</TD>
++<TD>
++concept index
++</TD>
++<TD>
++ &nbsp;
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ ? ] </TD>
++<TD ALIGN="CENTER">
++About
++</TD>
++<TD>
++this page
++</TD>
++<TD>
++ &nbsp;
++</TD>
++</TR>
++</TABLE>
++ <P>
++ where the <STRONG> Example </STRONG> assumes that the current position
++ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
++ the following structure:</P>
++ <UL>
++ <LI> 1. Section One
++ <UL>
++ <LI>1.1 Subsection One-One
++ <UL>
++ <LI>...</LI>
++ </UL>
++ <LI>1.2 Subsection One-Two
++ <UL>
++ <LI>1.2.1 Subsubsection One-Two-One</LI>
++ <LI>1.2.2 Subsubsection One-Two-Two</LI>
++ <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
++ <STRONG>&lt;== Current Position </STRONG></LI>
++ <LI>1.2.4 Subsubsection One-Two-Four</LI>
++ </UL>
++ </LI>
++ <LI>1.3 Subsection One-Three
++ <UL>
++ <LI>...</LI>
++ </UL>
++ </LI>
++ <LI>1.4 Subsection One-Four</LI>
++ </UL>
++ </LI>
++ </UL>
++
++<HR SIZE=1>
++<BR>
++<FONT SIZE="-1">
++This document was generated
++by <I>root</I> on <I>September, 1 2003</I>
++using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
++</FONT>
++
++</BODY>
++</HTML>
diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc
new file mode 100644
index 000000000..401288b0c
--- /dev/null
+++ b/meta/recipes-extended/time/time.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Tool that measures CPU resources"
+DESCRIPTION = "time measures many of the CPU resources, such as time and \
+memory, that other programs use."
+HOMEPAGE = "http://www.gnu.org/software/time/"
+SECTION = "utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+inherit update-alternatives
+
+do_install_append () {
+ mv ${D}${bindir}/time ${D}${bindir}/time.${PN}
+}
+
+ALTERNATIVE_NAME = "time"
+ALTERNATIVE_LINK = "${bindir}/time"
+ALTERNATIVE_PATH = "${bindir}/time.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb
new file mode 100644
index 000000000..c38608fd9
--- /dev/null
+++ b/meta/recipes-extended/time/time_1.7.bb
@@ -0,0 +1,11 @@
+require time.inc
+
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
+ file://debian.patch"
+
+SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
+SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
+
+inherit autotools
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2011i.bb b/meta/recipes-extended/tzcode/tzcode-native_2011i.bb
new file mode 100644
index 000000000..a23a5d524
--- /dev/null
+++ b/meta/recipes-extended/tzcode/tzcode-native_2011i.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=3ae8198f82258417ce29066d3b034035"
+
+SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
+ ftp://ftp.iana.org/tz/releases/tzdata2011n.tar.gz;name=tzdata"
+
+SRC_URI[tzcode.md5sum] = "cf7f4335b7c8682899fa2814e711c1b2"
+SRC_URI[tzcode.sha256sum] = "f0dd991de3f8d6c599c104e294377c9befa1ef40aa5a1d09e2e295a453f3c1ec"
+SRC_URI[tzdata.md5sum] = "20dbfb28efa008ddbf6dd34601ea40fa"
+SRC_URI[tzdata.sha256sum] = "a343e542486b2b8ebdeca474eed79f1c04f69420ca943c2b9bdea1d2385e38cd"
+
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 755 zic ${D}${bindir}/
+ install -m 755 zdump ${D}${bindir}/
+ install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/meta/recipes-extended/tzdata/tzdata_2012b.bb b/meta/recipes-extended/tzdata/tzdata_2012b.bb
new file mode 100644
index 000000000..7cb1c237e
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2012b.bb
@@ -0,0 +1,222 @@
+DESCRIPTION = "Timezone data"
+HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
+SECTION = "base"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234"
+DEPENDS = "tzcode-native"
+
+PR = "r0"
+
+RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
+ timezone-arctic timezone-asia timezone-atlantic \
+ timezone-australia timezone-europe timezone-indian \
+ timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzdata.md5sum] = "0615fd29def380a917e528433c820368"
+SRC_URI[tzdata.sha256sum] = "2f9f8e2d1ae087be5917f60c3946e8dc3fe1068d7738c3395f2125135309e745"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica \
+ factory solar87 solar88 solar89 etcetera backward systemv \
+ "
+# pacificnew
+
+do_compile () {
+ for zone in ${TZONES}; do \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ done
+}
+
+do_install () {
+ install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+ cp -pPR ${S}/$exec_prefix ${D}/
+ # libc is removing zoneinfo files from package
+ cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+ # Install default timezone
+ install -d ${D}${sysconfdir}
+ echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+
+ chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+
+# code taken from Gentoo's tzdata ebuild
+
+ etc_lt="$D${sysconfdir}/localtime"
+ src="$D${sysconfdir}/timezone"
+
+ if [ -e ${src} ] ; then
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+ else
+ tz="FUBAR"
+ fi
+
+ if [ -z ${tz} ] ; then
+ return 0
+ fi
+
+ if [ ${tz} = "FUBAR" ] ; then
+ echo "You do not have TIMEZONE set in ${src}."
+
+ if [ ! -e ${etc_lt} ] ; then
+ # if /etc/localtime is a symlink somewhere, assume they
+ # know what they're doing and they're managing it themselves
+ if [ ! -L ${etc_lt} ] ; then
+ cp -f "$D${datadir}/zoneinfo/Universal" "${etc_lt}"
+ echo "Setting ${etc_lt} to Universal."
+ else
+ echo "Assuming your ${etc_lt} symlink is what you want; skipping update."
+ fi
+ else
+ echo "Skipping auto-update of ${etc_lt}."
+ fi
+ return 0
+ fi
+
+ if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+ echo "You have an invalid TIMEZONE setting in ${src}"
+ echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+ tz="Universal"
+ fi
+ echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+ if [ -L ${etc_lt} ] ; then
+ rm -f "${etc_lt}"
+ fi
+ cp -f "$D${datadir}/zoneinfo/${tz}" "${etc_lt}"
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+ tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+ tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
+ ${datadir}/zoneinfo/US/* \
+ ${datadir}/zoneinfo/Brazil/* \
+ ${datadir}/zoneinfo/Canada/* \
+ ${datadir}/zoneinfo/Mexico/* \
+ ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
+ ${datadir}/zoneinfo/Indian/* \
+ ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
+ ${datadir}/zoneinfo/Egypt \
+ ${datadir}/zoneinfo/Eire \
+ ${datadir}/zoneinfo/Factory \
+ ${datadir}/zoneinfo/GB-Eire \
+ ${datadir}/zoneinfo/Hongkong \
+ ${datadir}/zoneinfo/Iceland \
+ ${datadir}/zoneinfo/Iran \
+ ${datadir}/zoneinfo/Israel \
+ ${datadir}/zoneinfo/Jamaica \
+ ${datadir}/zoneinfo/Japan \
+ ${datadir}/zoneinfo/Kwajalein \
+ ${datadir}/zoneinfo/Libya \
+ ${datadir}/zoneinfo/Navajo \
+ ${datadir}/zoneinfo/Poland \
+ ${datadir}/zoneinfo/Portugal \
+ ${datadir}/zoneinfo/Singapore \
+ ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
+ ${datadir}/zoneinfo/America/Anchorage \
+ ${datadir}/zoneinfo/America/Los_Angeles \
+ ${datadir}/zoneinfo/America/Denver \
+ ${datadir}/zoneinfo/America/Chicago \
+ ${datadir}/zoneinfo/America/New_York \
+ ${datadir}/zoneinfo/America/Caracas \
+ ${datadir}/zoneinfo/America/Sao_Paulo \
+ ${datadir}/zoneinfo/Europe/London \
+ ${datadir}/zoneinfo/Europe/Paris \
+ ${datadir}/zoneinfo/Africa/Cairo \
+ ${datadir}/zoneinfo/Europe/Moscow \
+ ${datadir}/zoneinfo/Asia/Dubai \
+ ${datadir}/zoneinfo/Asia/Karachi \
+ ${datadir}/zoneinfo/Asia/Dhaka \
+ ${datadir}/zoneinfo/Asia/Bankok \
+ ${datadir}/zoneinfo/Asia/Hong_Kong \
+ ${datadir}/zoneinfo/Asia/Tokyo \
+ ${datadir}/zoneinfo/Australia/Darwin \
+ ${datadir}/zoneinfo/Australia/Adelaide \
+ ${datadir}/zoneinfo/Australia/Brisbane \
+ ${datadir}/zoneinfo/Australia/Sydney \
+ ${datadir}/zoneinfo/Pacific/Noumea \
+ ${datadir}/zoneinfo/CET \
+ ${datadir}/zoneinfo/CST6CDT \
+ ${datadir}/zoneinfo/EET \
+ ${datadir}/zoneinfo/EST \
+ ${datadir}/zoneinfo/EST5EDT \
+ ${datadir}/zoneinfo/GB \
+ ${datadir}/zoneinfo/GMT \
+ ${datadir}/zoneinfo/GMT+0 \
+ ${datadir}/zoneinfo/GMT-0 \
+ ${datadir}/zoneinfo/GMT0 \
+ ${datadir}/zoneinfo/Greenwich \
+ ${datadir}/zoneinfo/HST \
+ ${datadir}/zoneinfo/MET \
+ ${datadir}/zoneinfo/MST \
+ ${datadir}/zoneinfo/MST7MDT \
+ ${datadir}/zoneinfo/NZ \
+ ${datadir}/zoneinfo/NZ-CHAT \
+ ${datadir}/zoneinfo/PRC \
+ ${datadir}/zoneinfo/PST8PDT \
+ ${datadir}/zoneinfo/ROC \
+ ${datadir}/zoneinfo/ROK \
+ ${datadir}/zoneinfo/UCT \
+ ${datadir}/zoneinfo/UTC \
+ ${datadir}/zoneinfo/Universal \
+ ${datadir}/zoneinfo/W-SU \
+ ${datadir}/zoneinfo/WET \
+ ${datadir}/zoneinfo/Zulu \
+ ${datadir}/zoneinfo/zone.tab \
+ ${datadir}/zoneinfo/iso3166.tab \
+ ${datadir}/zoneinfo/Etc/*"
diff --git a/meta/recipes-extended/unzip/unzip/avoid-strip.patch b/meta/recipes-extended/unzip/unzip/avoid-strip.patch
new file mode 100644
index 000000000..8f30e4267
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/avoid-strip.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Pending
+
+unix/Makefile: remove hard coded strip commands
+
+Remove the hard coded strip commands, both LF2 (used in linking) and
+STRIP used alone.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur unzip60.orig/unix/configure unzip60/unix/configure
+--- unzip60.orig/unix/configure 2009-04-16 14:25:12.000000000 -0500
++++ unzip60/unix/configure 2011-06-21 11:23:36.822849960 -0500
+@@ -17,7 +17,7 @@
+ IZ_BZIP2=${3}
+ CFLAGS="${CFLAGS} -I. -DUNIX"
+ LFLAGS1=""
+-LFLAGS2="-s"
++LFLAGS2=""
+ LN="ln -s"
+
+ CFLAGS_OPT=''
+diff -ur unzip60.orig/unix/Makefile unzip60/unix/Makefile
+--- unzip60.orig/unix/Makefile 2009-01-18 16:41:18.000000000 -0600
++++ unzip60/unix/Makefile 2011-06-21 11:12:22.900003388 -0500
+@@ -52,7 +52,7 @@
+ CF = $(CFLAGS) $(CF_NOOPT)
+ LFLAGS1 =
+ LF = -o unzip$E $(LFLAGS1)
+-LF2 = -s
++LF2 =
+
+ # UnZipSFX flags
+ SL = -o unzipsfx$E $(LFLAGS1)
+@@ -70,7 +70,7 @@
+ CHMOD = chmod
+ BINPERMS = 755
+ MANPERMS = 644
+-STRIP = strip
++STRIP =
+ E =
+ O = .o
+ M = unix
+@@ -776,7 +776,6 @@
+ #
+ gcc: unix_make
+ $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2=""
+- $(STRIP) $(UNZIPS)
+
+ # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
+ hk68: unix_make
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb
new file mode 100644
index 000000000..e11f9f778
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "A (de)compression library for the ZIP format"
+HOMEPAGE = "http://www.info-zip.org"
+SECTION = "console/utils"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
+PE = "1"
+PR = "r3"
+
+SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
+ file://avoid-strip.patch"
+
+SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
+SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
+S = "${WORKDIR}/unzip60"
+
+EXTRA_OEMAKE += "STRIP=true LF2=''"
+
+export LD = "${CC}"
+LD_virtclass-native = "${CC}"
+
+do_compile() {
+ oe_runmake -f unix/Makefile generic
+}
+
+do_install() {
+ oe_runmake -f unix/Makefile install prefix=${D}${prefix}
+ install -d ${D}${mandir}
+ mv ${D}${prefix}/man/* ${D}${mandir}
+ rmdir ${D}${prefix}/man/
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/watchdog/watchdog_5.11.bb b/meta/recipes-extended/watchdog/watchdog_5.11.bb
new file mode 100644
index 000000000..3c4f77b14
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog_5.11.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Software watchdog"
+DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
+working. If programs in user space are not longer executed \
+it will reboot the system."
+HOMEPAGE = "http://watchdog.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
+
+LICENSE = "GPL-1.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8a7258c60a71a2f04b67fb01f495889c"
+
+PR = "r0"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog_${PV}.tar.gz"
+
+SRC_URI[md5sum] = "02c764219b3bdb2373091cbd67109eb6"
+SRC_URI[sha256sum] = "723a7966e0c3d58e3f4df20943a5c9aa1553381f46aa0dbcf832016756e62792"
+
+inherit autotools
+
+RRECOMMENDS_${PN} = "kernel-module-softdog"
diff --git a/meta/recipes-extended/wget/wget-1.13.4/fix_makefile.patch b/meta/recipes-extended/wget/wget-1.13.4/fix_makefile.patch
new file mode 100644
index 000000000..b76a017df
--- /dev/null
+++ b/meta/recipes-extended/wget/wget-1.13.4/fix_makefile.patch
@@ -0,0 +1,46 @@
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: wget-1.12/po/Makefile.in.in
+===================================================================
+--- wget-1.12.orig/po/Makefile.in.in 2009-09-04 09:31:54.000000000 -0700
++++ wget-1.12/po/Makefile.in.in 2011-10-19 20:32:53.714812160 -0700
+@@ -8,8 +8,8 @@
+ # Please note that the actual code of GNU gettext is covered by the GNU
+ # General Public License and is *not* in the public domain.
+ #
+-# Origin: gettext-0.17
+-GETTEXT_MACRO_VERSION = 0.17
++# Origin: gettext-0.18
++GETTEXT_MACRO_VERSION = 0.18
+
+ PACKAGE = @PACKAGE@
+ VERSION = @VERSION@
+Index: wget-1.12/configure.ac
+===================================================================
+--- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700
++++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700
+@@ -110,7 +110,7 @@
+ dnl Gettext
+ dnl
+ AM_GNU_GETTEXT([external],[need-ngettext])
+-AM_GNU_GETTEXT_VERSION([0.17])
++AM_GNU_GETTEXT_VERSION([0.18])
+
+ AC_PROG_RANLIB
+
+Index: wget-1.12/m4/po.m4
+===================================================================
+--- wget-1.12.orig/m4/po.m4 2009-09-04 09:31:54.000000000 -0700
++++ wget-1.12/m4/po.m4 2011-10-19 20:33:53.426812176 -0700
+@@ -30,7 +30,7 @@
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
++ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
new file mode 100644
index 000000000..d56216f07
--- /dev/null
+++ b/meta/recipes-extended/wget/wget.inc
@@ -0,0 +1,20 @@
+DESCRIPTION = "A console URL download utility featuring HTTP, FTP, and more."
+SECTION = "console/network"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "openssl"
+
+INC_PR = "r14"
+
+inherit autotools gettext update-alternatives
+
+EXTRA_OECONF = "--with-libc --enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} --with-ssl=openssl --disable-rpath"
+
+do_install_append () {
+ mv ${D}${bindir}/wget ${D}${bindir}/wget.${PN}
+}
+
+ALTERNATIVE_NAME = "wget"
+ALTERNATIVE_LINK = "${bindir}/wget"
+ALTERNATIVE_PATH = "${bindir}/wget.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/wget/wget_1.13.4.bb b/meta/recipes-extended/wget/wget_1.13.4.bb
new file mode 100644
index 000000000..e20ff48a7
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.13.4.bb
@@ -0,0 +1,9 @@
+PR = "${INC_PR}.2"
+
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://fix_makefile.patch \
+ "
+SRC_URI[md5sum] = "1df489976a118b9cbe1b03502adbfc27"
+SRC_URI[sha256sum] = "24c7710bc9f220ce23d8a9e0f5673b0efc1cace62db6de0239b5863ecc934dcd"
+
+require wget.inc
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
new file mode 100644
index 000000000..fb9b1a408
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
@@ -0,0 +1,53 @@
+Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
+
+# glibc also implements the function group_member. To avoid name conflict,
+# here let us append a "_" to which's version.
+#
+# Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
+# (this patch is licensed under GPLv2)
+
+--- which-2.18/bash.c
++++ which-2.18/bash.c
+@@ -45,7 +45,12 @@
+ * - changed all occurences of 'gid_t' into 'GID_T'.
+ * - exported functions needed in which.c
+ */
+-static int group_member (GID_T gid);
++
++/*
++ * glibc also implements the function group_member. To avoid name conflict,
++ * here let us append a "_" to which's version.
++ */
++static int _group_member (GID_T gid);
+ static char* extract_colon_unit (char const* string, int *p_index);
+
+ /*===========================================================================
+@@ -200,8 +205,8 @@
+
+ /* From bash-2.05b / general.c / line 805 */
+ /* Return non-zero if GID is one that we have in our groups list. */
+-int
+-group_member (GID_T gid)
++static int
++_group_member (GID_T gid)
+ {
+ #if defined (HAVE_GETGROUPS)
+ register int i;
+@@ -290,7 +295,7 @@
+ return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
+
+ /* Otherwise, if we are in the owning group, the group permissions apply. */
+- if (group_member (finfo.st_gid))
++ if (_group_member (finfo.st_gid))
+ return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
+
+ /* Otherwise, if we are in the other group, the other permissions apply. */
+@@ -331,7 +336,7 @@
+ /* Given a string containing units of information separated by colons,
+ return the next one pointed to by (P_INDEX), or NULL if there are no more.
+ Advance (P_INDEX) to the character after the colon. */
+-char*
++static char*
+ extract_colon_unit (char const* string, int* p_index)
+ {
+ int i, start, len;
diff --git a/meta/recipes-extended/which/which-2.20/remove-declaration.patch b/meta/recipes-extended/which/which-2.20/remove-declaration.patch
new file mode 100644
index 000000000..d3340a353
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/remove-declaration.patch
@@ -0,0 +1,18 @@
+Remove the declaration of group_member since it has already been
+declared in unistd.h
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+
+diff -ruN which-2.20-orig/bash.c which-2.20/bash.c
+--- which-2.20-orig/bash.c 2010-08-03 12:59:08.897088878 +0800
++++ which-2.20/bash.c 2010-08-03 13:17:23.406097212 +0800
+@@ -46,7 +46,6 @@
+ * - changed all occurences of 'gid_t' into 'GID_T'.
+ * - exported functions needed in which.c
+ */
+-static int group_member (GID_T gid);
+ static char* extract_colon_unit (char const* string, int* p_index);
+
+ /*===========================================================================
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
new file mode 100644
index 000000000..f87929b33
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Displays the full path of executables that bash would execute"
+DESCRIPTION = "Which is a utility that prints out the full path of the \
+executables that bash(1) would execute when the passed \
+program names would have been entered on the shell prompt. \
+It does this by using the exact same algorithm as bash."
+HOMEPAGE = "http://www.xs4all.nl/~carlo17/which/"
+BUGTRACKER = "n/a"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+PR = "r1"
+
+SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
+ file://fix_name_conflict_group_member.patch"
+
+SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
+SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
+
+DEPENDS = "cwautomacros-native"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ OLD="@ACLOCAL_CWFLAGS@"
+ NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
+ sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
+}
+do_install_append() {
+ mv ${D}/${bindir}/which ${D}/${bindir}/which.${PN}
+}
+
+ALTERNATIVE_NAME = "which"
+ALTERNATIVE_PATH = "which.${PN}"
+ALTERNATIVE_PRIORITY = "100"
+
diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb
new file mode 100644
index 000000000..a4e860b6c
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "which - shows the full path of (shell) commands."
+SECTION = "libs"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2"
+HOMEPAGE = "http://ftp.gnu.org/gnu/which/"
+DEPENDS = "cwautomacros-native"
+
+inherit autotools update-alternatives
+
+PR = "r2"
+
+EXTRA_OECONF = "--disable-iberty"
+
+SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
+ file://remove-declaration.patch"
+
+SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744"
+SRC_URI[sha256sum] = "d417b65c650d88ad26a208293c1c6e3eb60d4b6d847f01ff8f66aca63e2857f8"
+
+do_configure_prepend() {
+ sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am
+}
+
+do_install() {
+ autotools_do_install
+ mv ${D}${bindir}/which ${D}${bindir}/which.${PN}
+}
+
+ALTERNATIVE_NAME = "which"
+ALTERNATIVE_PATH = "which.${PN}"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.0.2.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.0.2.bb
new file mode 100644
index 000000000..f54d591c2
--- /dev/null
+++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.0.2.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Basic desktop integration functions"
+
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
+xdg-icon-resource \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
+"
+
+PR="r0"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tgz"
+
+inherit autotools
+
+SRC_URI[md5sum] = "348a5b91dc66426505022c74a64b2940"
+SRC_URI[sha256sum] = "21aeb7d16b2529b8d3975118f59eec09953e09f9a68d718159e98c90474b01ac"
diff --git a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
new file mode 100644
index 000000000..cd6e6c107
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
@@ -0,0 +1,86 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001
+From: Pierre Habouzit <madcoder@debian.org>
+Date: Wed, 28 Nov 2007 10:13:08 +0100
+Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists.
+
+ This way, if a service is enabled in /etc/xinetd* _and_ in
+/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes
+precedence.
+
+Signed-off-by: Pierre Habouzit <madcoder@debian.org>
+---
+ xinetd/inet.c | 22 +++++++++++++++++++---
+ 1 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/xinetd/inet.c b/xinetd/inet.c
+index 1cb2ba2..8caab45 100644
+--- a/xinetd/inet.c
++++ b/xinetd/inet.c
+@@ -23,6 +23,8 @@
+ #include "parsesup.h"
+ #include "nvlists.h"
+
++static psi_h iter ;
++
+ static int get_next_inet_entry( int fd, pset_h sconfs,
+ struct service_config *defaults);
+
+@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp )
+ struct service_config *default_config = CNF_DEFAULTS( confp );
+
+ line_count = 0;
++ iter = psi_create (sconfs);
+
+ for( ;; )
+ {
+ if (get_next_inet_entry(fd, sconfs, default_config) == -2)
+ break;
+ }
++
++ psi_destroy(iter);
+ }
+
+ static int get_next_inet_entry( int fd, pset_h sconfs,
+@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+ char *p;
+ str_h strp;
+ char *line = next_line(fd);
+- struct service_config *scp;
++ struct service_config *scp, *tmp;
+ unsigned u, i;
+ const char *func = "get_next_inet_entry";
+ char *name = NULL, *rpcvers = NULL, *rpcproto = NULL;
+@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+ SC_SPECIFY( scp, A_SOCKET_TYPE );
+ SC_SPECIFY( scp, A_WAIT );
+
+- if( ! pset_add(sconfs, scp) )
++ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){
++ if (EQ(SC_ID(scp), SC_ID(tmp))) {
++ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp));
++ sc_free(scp);
++ scp = NULL;
++ break;
++ }
++ }
++
++ if( scp && ! pset_add(sconfs, scp) )
+ {
+ out_of_memory( func );
+ pset_destroy(args);
+@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+ }
+
+ pset_destroy(args);
+- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
++ if (scp) {
++ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
++ }
+ return 0;
+ }
+
+--
+1.5.3.6.2040.g15e6
+
diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
new file mode 100644
index 000000000..8e59cdcaa
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001
+From: Pierre Habouzit <madcoder@debian.org>
+Date: Mon, 26 Nov 2007 16:02:04 +0100
+Subject: [PATCH] Various fixes from the previous maintainer.
+
+---
+ xinetd/child.c | 20 +++++++++++++++++---
+ xinetd/service.c | 8 ++++----
+ 2 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/xinetd/child.c b/xinetd/child.c
+index 89ee54c..48e9615 100644
+--- a/xinetd/child.c
++++ b/xinetd/child.c
+@@ -284,6 +284,7 @@ void child_process( struct server *serp )
+ connection_s *cp = SERVER_CONNECTION( serp ) ;
+ struct service_config *scp = SVC_CONF( sp ) ;
+ const char *func = "child_process" ;
++ int fd, null_fd;
+
+ signal_default_state();
+
+@@ -296,9 +297,22 @@ void child_process( struct server *serp )
+ signals_pending[0] = -1;
+ signals_pending[1] = -1;
+
+- Sclose(0);
+- Sclose(1);
+- Sclose(2);
++ if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 )
++ {
++ msg( LOG_ERR, func, "open('/dev/null') failed: %m") ;
++ _exit( 1 ) ;
++ }
++
++ for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ )
++ {
++ if ( fd != null_fd && dup2( null_fd, fd ) == -1 )
++ {
++ msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ;
++ _exit( 1 ) ;
++ }
++ }
++ if ( null_fd > MAX_PASS_FD )
++ (void) Sclose( null_fd ) ;
+
+
+ #ifdef DEBUG_SERVER
+diff --git a/xinetd/service.c b/xinetd/service.c
+index 3d68d78..0132d6c 100644
+--- a/xinetd/service.c
++++ b/xinetd/service.c
+@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp,
+ return FAILED;
+
+ if ( last == NULL ) {
+- last = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
+- SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last;
++ SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
++ last = SAIN( SVC_LAST_DGRAM_ADDR(sp) );
+ }
+
+ (void) time( &current_time ) ;
+@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp,
+ return FAILED;
+
+ if( last == NULL ) {
+- last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
+- SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last;
++ SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
++ last = SAIN6(SVC_LAST_DGRAM_ADDR(sp));
+ }
+
+ (void) time( &current_time ) ;
+--
+1.5.3.6.2040.g15e6
+
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
new file mode 100644
index 000000000..2365ca123
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
@@ -0,0 +1,112 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001
+From: David Madore <david@pleiades.stars>
+Date: Mon, 24 Mar 2008 12:45:36 +0100
+Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode
+
+xinetd does not bind to IPv6 addresses (and does not seem to have an
+option to do so) when used in -inetd_compat mode. As current inetd's
+are IPv6-aware, this is a problem: this means xinetd cannot be used as
+a drop-in inetd replacement.
+
+The attached patch is a suggestion: it adds a -inetd_ipv6 global
+option that, if used, causes inetd-compatibility lines to have an
+implicit "IPv6" option. Perhaps this is not the best solution, but
+there should definitely be a way to get inetd.conf to be read in
+IPv6-aware mode.
+---
+ xinetd/confparse.c | 1 +
+ xinetd/inet.c | 17 +++++++++++++++++
+ xinetd/options.c | 3 +++
+ xinetd/xinetd.man | 6 ++++++
+ 4 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/xinetd/confparse.c b/xinetd/confparse.c
+index db9f431..d7b0bcc 100644
+--- a/xinetd/confparse.c
++++ b/xinetd/confparse.c
+@@ -40,6 +40,7 @@
+ #include "inet.h"
+ #include "main.h"
+
++extern int inetd_ipv6;
+ extern int inetd_compat;
+
+ /*
+diff --git a/xinetd/inet.c b/xinetd/inet.c
+index 8caab45..2e617ae 100644
+--- a/xinetd/inet.c
++++ b/xinetd/inet.c
+@@ -25,6 +25,8 @@
+
+ static psi_h iter ;
+
++extern int inetd_ipv6;
++
+ static int get_next_inet_entry( int fd, pset_h sconfs,
+ struct service_config *defaults);
+
+@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+ }
+ SC_SERVER_ARGV(scp)[u] = p;
+ }
++
++ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */
++ if ( inetd_ipv6 )
++ {
++ nvp = nv_find_value( service_flags, "IPv6" );
++ if ( nvp == NULL )
++ {
++ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ;
++ pset_destroy(args);
++ sc_free(scp);
++ return -1;
++ }
++ M_SET(SC_XFLAGS(scp), nvp->value);
++ }
++
+ /* Set the reuse flag, as this is the default for inetd */
+ nvp = nv_find_value( service_flags, "REUSE" );
+ if ( nvp == NULL )
+diff --git a/xinetd/options.c b/xinetd/options.c
+index b058b6a..dc2f3a0 100644
+--- a/xinetd/options.c
++++ b/xinetd/options.c
+@@ -30,6 +30,7 @@ int logprocs_option ;
+ unsigned logprocs_option_arg ;
+ int stayalive_option=0;
+ char *program_name ;
++int inetd_ipv6 = 0 ;
+ int inetd_compat = 0 ;
+ int dont_fork = 0;
+
+@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] )
+ fprintf(stderr, "\n");
+ exit(0);
+ }
++ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 )
++ inetd_ipv6 = 1;
+ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 )
+ inetd_compat = 1;
+ }
+diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man
+index c76c3c6..c9dd803 100644
+--- a/xinetd/xinetd.man
++++ b/xinetd/xinetd.man
+@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the
+ standard xinetd config files. /etc/inetd.conf is read after the
+ standard xinetd config files.
+ .TP
++.BI \-inetd_ipv6
++This option causes xinetd to bind to IPv6 (AF_INET6) addresses for
++inetd compatibility lines (see previous option). This only affects
++how /etc/inetd.conf is interpreted and thus only has any effect if
++the \-inetd_compat option is also used.
++.TP
+ .BI \-cc " interval"
+ This option instructs
+ .B xinetd
+--
+1.5.5.rc0.127.gb4337
+
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
new file mode 100644
index 000000000..9e6ea2577
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
@@ -0,0 +1,11 @@
+# Simple configuration file for xinetd
+#
+# Some defaults, and include /etc/xinetd.d/
+
+defaults
+{
+
+
+}
+
+includedir /etc/xinetd.d
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.init b/meta/recipes-extended/xinetd/xinetd/xinetd.init
new file mode 100644
index 000000000..26dbea741
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.init
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# /etc/init.d/xinetd -- script to start and stop xinetd.
+
+if test -f /etc/default/xinetd; then
+ . /etc/default/xinetd
+fi
+
+
+test -x /usr/sbin/xinetd || exit 0
+
+checkportmap () {
+ if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
+ if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
+ echo
+ echo "WARNING: portmapper inactive - RPC services unavailable!"
+ echo " Commenting out or removing the RPC services from"
+ echo " the /etc/xinetd.conf file will remove this message."
+ echo
+ fi
+ fi
+}
+
+case "$1" in
+ start)
+ checkportmap
+ echo -n "Starting internet superserver: xinetd"
+ start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping internet superserver: xinetd"
+ start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
+ echo "."
+ ;;
+ reload)
+ echo -n "Reloading internet superserver configuration: xinetd"
+ start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
+ echo "."
+ ;;
+ force-reload)
+ echo "$0 force-reload: Force Reload is deprecated"
+ echo -n "Forcefully reloading internet superserver configuration: xinetd"
+ start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
+ echo "."
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
new file mode 100644
index 000000000..3d55e9971
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -0,0 +1,49 @@
+DESCRIPTION = "Highly configurable, modular and secure inetd"
+HOMEPAGE = "http://www.xinetd.org"
+
+# xinetd is a BSD-like license
+# Apple and Gentoo say BSD here.
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
+
+DEPENDS = ""
+PR = "r0"
+
+SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
+ file://xinetd.init \
+ file://xinetd.conf \
+ file://Various-fixes-from-the-previous-maintainer.patch \
+ file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
+ file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
+ "
+
+SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c"
+SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3"
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "xinetd"
+INITSCRIPT_PARAMS = "defaults"
+
+EXTRA_OECONF="--disable-nls"
+
+do_configure() {
+ # Looks like configure.in is broken, so we are skipping
+ # rebuilding configure and are just using the shipped one
+ oe_runconf
+}
+
+do_install() {
+ # Same here, the Makefile does some really stupid things,
+ # but since we only want two files why not override
+ # do_install from autotools and doing it ourselfs?
+ install -d "${D}/usr/sbin"
+ install -d "${D}/etc/init.d"
+ install -d "${D}/etc/xinetd.d"
+ install -m 644 "${WORKDIR}/xinetd.conf" "${D}/etc"
+ install -m 755 "${WORKDIR}/xinetd.init" "${D}/etc/init.d/xinetd"
+ install -m 755 "${S}/xinetd/xinetd" "${D}/usr/sbin"
+ install -m 755 "${S}/xinetd/itox" "${D}/usr/sbin"
+}
+
+CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
diff --git a/meta/recipes-extended/xz/xz_5.0.3.bb b/meta/recipes-extended/xz/xz_5.0.3.bb
new file mode 100644
index 000000000..e8f96b67c
--- /dev/null
+++ b/meta/recipes-extended/xz/xz_5.0.3.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "utils for managing LZMA compressed files"
+HOMEPAGE = "http://tukaani.org/xz/"
+SECTION = "base"
+
+LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
+ file://COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=fbc093901857fcd118f065f900982c24 \
+ file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
+
+SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "fefe52f9ecd521de2a8ce38c21a27574"
+SRC_URI[sha256sum] = "10eb4df72dffb2fb14c3d2d82b450e72282ffcb9ee3908a8e5b392b8f09681bf"
+
+PR = "r1"
+
+inherit autotools gettext
+
+PACKAGES =+ "liblzma liblzma-dev liblzma-staticdev liblzma-dbg"
+
+FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
+FILES_liblzma-dev = "${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir}/liblzma.la ${libdir}/pkgconfig/liblzma.pc"
+FILES_liblzma-staticdev = "${libdir}/liblzma.a"
+FILES_liblzma-dbg = "${libdir}/.debug/liblzma*"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/zip/zip.inc b/meta/recipes-extended/zip/zip.inc
new file mode 100644
index 000000000..a3bbc934e
--- /dev/null
+++ b/meta/recipes-extended/zip/zip.inc
@@ -0,0 +1,24 @@
+DESCRIPTION = "Archiver for .zip files"
+HOMEPAGE = "http://www.info-zip.org"
+SECTION = "console/utils"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
+
+SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
+ 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
+ 'BINFLAGS=0755' 'INSTALL_D=install -d'"
+
+do_compile() {
+ oe_runmake -f unix/Makefile generic
+}
+
+do_install() {
+ oe_runmake -f unix/Makefile prefix=${D}${prefix} \
+ BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
+ install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
new file mode 100644
index 000000000..12380715d
--- /dev/null
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -0,0 +1,9 @@
+require zip.inc
+
+PR="r1"
+
+# zip-2.32 still uses directory name of zip-2.30
+S = "${WORKDIR}/zip30"
+
+SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
+SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
diff --git a/meta/recipes-extended/zypper/zypper/cmake.patch b/meta/recipes-extended/zypper/zypper/cmake.patch
new file mode 100644
index 000000000..8312a97dc
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/cmake.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Inappropriate [configuration]
+
+without the patch, /usr/include/rpm/ won't be added
+in cppflags
+
+8/19/2010 - created by Qing He <qing.he@intel.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6b040a6..04a1595 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,6 +21,10 @@ SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -fstack-protector" )
+
+ GENERATE_PACKAGING(${PACKAGE} ${VERSION})
+
++FIND_PACKAGE(PkgConfig REQUIRED)
++PKG_CHECK_MODULES(RPM REQUIRED rpm)
++INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
++
+ FIND_PACKAGE( Zypp REQUIRED )
+ IF( ZYPP_FOUND )
+ INCLUDE_DIRECTORIES(${ZYPP_INCLUDE_DIR})
diff --git a/meta/recipes-extended/zypper/zypper/cmake_libxml2.patch b/meta/recipes-extended/zypper/zypper/cmake_libxml2.patch
new file mode 100644
index 000000000..8cda7a496
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/cmake_libxml2.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: git/CMakeLists.txt
+===================================================================
+--- git.orig/CMakeLists.txt 2011-12-20 15:13:59.851209493 -0800
++++ git/CMakeLists.txt 2011-12-20 15:14:51.167211302 -0800
+@@ -25,6 +25,9 @@
+ PKG_CHECK_MODULES(RPM REQUIRED rpm)
+ INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
+
++PKG_CHECK_MODULES(LIBXML REQUIRED libxml-2.0)
++INCLUDE_DIRECTORIES( ${LIBXML_INCLUDE_DIRS} )
++
+ FIND_PACKAGE( Zypp REQUIRED )
+ IF( ZYPP_FOUND )
+ INCLUDE_DIRECTORIES(${ZYPP_INCLUDE_DIR})
+@@ -70,6 +73,9 @@
+ INCLUDE(CTest)
+ ENABLE_TESTING()
+
++# New Augeas requires libxml now
++PKG_CHECK_MODULES(LIBXML REQUIRED libxml-2.0)
++INCLUDE_DIRECTORIES( ${LIBXML_INCLUDE_DIRS} )
+
+ # documentation too important to be hidden in doc:
+ INSTALL(
diff --git a/meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch b/meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch
new file mode 100644
index 000000000..085762d54
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch
@@ -0,0 +1,60 @@
+Upstream-Status: Pending
+
+after gcc linking has changed, all the libraries must be explicitely specified
+This patch avoids these linking errors:
+
+| Linking CXX executable zypp-refresh
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r2/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypp-refresh.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++ -march=i586 --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypp-refresh.dir/zypp-refresh.cc.o -o zypp-refresh -rdynamic -lzypp
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/libpthread.so.0: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypp-refresh] Error 1
+| make[2]: Leaving directory `/build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r2/git'
+| make[1]: *** [src/CMakeFiles/zypp-refresh.dir/all] Error 2
+
+
+| Linking CXX executable zypper
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r3/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypper.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++ -march=i586 --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypper.dir/main.cc.o -o zypper -rdynamic libzypper_lib.a -lzypp -lreadline -laugeas -laugeas
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/libpthread.so.0: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypper] Error 1
+
+
+| Linking CXX executable zypper
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r3/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypper.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++ -march=i586 --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypper.dir/main.cc.o -o zypper -rdynamic libzypper_lib.a -lzypp -lreadline -laugeas -laugeas -lpthread
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `clock_gettime@@GLIBC_2.2' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/librt.so.1: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypper] Error 1
+
+
+Nitin A Kamble <nitin.a.kamble@intel.com>
+Date: 2011/01/19
+
+
+Index: git/src/CMakeLists.txt
+===================================================================
+--- git.orig/src/CMakeLists.txt 2010-12-20 00:02:02.000000000 -0800
++++ git/src/CMakeLists.txt 2011-01-19 09:23:13.432758255 -0800
+@@ -93,7 +93,7 @@
+ TARGET_LINK_LIBRARIES( zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} )
+
+ ADD_EXECUTABLE( zypper main.cc )
+-TARGET_LINK_LIBRARIES( zypper zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} -lrt )
++TARGET_LINK_LIBRARIES( zypper zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} -lrt -lpthread )
+
+
+ INSTALL(
+@@ -115,7 +115,7 @@
+
+ # zypp-refresh utility
+ ADD_EXECUTABLE( zypp-refresh zypp-refresh.cc )
+-TARGET_LINK_LIBRARIES( zypp-refresh ${ZYPP_LIBRARY} )
++TARGET_LINK_LIBRARIES( zypp-refresh ${ZYPP_LIBRARY} -lpthread )
+ INSTALL(
+ TARGETS zypp-refresh
+ RUNTIME DESTINATION ${INSTALL_PREFIX}/sbin
diff --git a/meta/recipes-extended/zypper/zypper/gcc-scope.patch b/meta/recipes-extended/zypper/zypper/gcc-scope.patch
new file mode 100644
index 000000000..a35c0d91d
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/gcc-scope.patch
@@ -0,0 +1,20 @@
+Fix errors like below
+
+| /home/kraj/work/openembedded-core/build/tmp-eglibc/work/qemumips-oe-linux/zypper-1.5.3-git1+2c5bb6ceb99ecd950ef993e43d77bf0569ea0582-r1/git/src/utils/console.cc:55:8: error: '::isatty' has not been declared
+| /home/kraj/work/openembedded-core/build/tmp-eglibc/work/qemumips-oe-linux/zypper-1.5.3-git1+2c5bb6ceb99ecd950ef993e43d77bf0569ea0582-r1/git/src/utils/console.cc:55:17: error: 'STDOUT_FILENO' was not declared in this scope
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: git/src/utils/console.cc
+===================================================================
+--- git.orig/src/utils/console.cc 2012-03-27 19:12:06.171036356 -0700
++++ git/src/utils/console.cc 2012-03-27 19:12:52.887038622 -0700
+@@ -15,6 +15,7 @@
+ #include <readline/readline.h>
+ #include <readline/history.h>
+ #include <cstdlib>
++#include <unistd.h>
+
+ using namespace std;
+
diff --git a/meta/recipes-extended/zypper/zypper/rpm5-flag.patch b/meta/recipes-extended/zypper/zypper/rpm5-flag.patch
new file mode 100644
index 000000000..89564a60f
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/rpm5-flag.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Inappropriate [configuration]
+
+It's required by libzypp headers
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6b040a6..84431c8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,6 +15,7 @@ INCLUDE( ${ZYPPER_SOURCE_DIR}/VERSION.cmake )
+ SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
+ ADD_DEFINITIONS( -D_FILE_OFFSET_BITS=64 )
+ ADD_DEFINITIONS( -DVERSION="${VERSION}" )
++ADD_DEFINITIONS( -D_RPM_5 )
+
+ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Woverloaded-virtual -fstack-protector" )
+ SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -fstack-protector" )
diff --git a/meta/recipes-extended/zypper/zypper_git.bb b/meta/recipes-extended/zypper/zypper_git.bb
new file mode 100644
index 000000000..56ccc8622
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper_git.bb
@@ -0,0 +1,27 @@
+HOMEPAGE = "http://gitorious.org/opensuse/zypper"
+DESCRIPTION = "The ZYpp Linux Software management framework"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3201406e350b39e05a82e28b5020f413"
+
+DEPENDS = "libzypp augeas"
+PR = "r2"
+SRCREV = "2c5bb6ceb99ecd950ef993e43d77bf0569ea0582"
+
+inherit cmake
+
+SRC_URI = "git://github.com/openSUSE/zypper.git;protocol=git \
+ file://cmake.patch \
+ file://cmake_libxml2.patch \
+ file://dso_linking_change_build_fix.patch \
+ file://rpm5-flag.patch \
+ file://gcc-scope.patch \
+ "
+S = "${WORKDIR}/git"
+
+PV = "1.5.3-git${SRCPV}"
+
+RDEPENDS_${PN} = "rpm-libs"
+RRECOMMENDS_${PN} = "procps util-linux-uuidgen"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"