summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-extended
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/at/at_3.1.14.bb68
-rw-r--r--meta/recipes-extended/at/files/S99at45
-rw-r--r--meta/recipes-extended/at/files/atd.service9
-rw-r--r--meta/recipes-extended/at/files/configure-add-enable-pam.patch25
-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/augeas/augeas.inc32
-rw-r--r--meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch20
-rw-r--r--meta/recipes-extended/augeas/augeas/sepbuildfix.patch22
-rw-r--r--meta/recipes-extended/augeas/augeas_1.2.0.bb5
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/build-tests.patch44
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch29
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/run-ptest2
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/test-output.patch25
-rw-r--r--meta/recipes-extended/bash/bash.inc54
-rw-r--r--meta/recipes-extended/bash/bash/build-tests.patch55
-rw-r--r--meta/recipes-extended/bash/bash/execute_cmd.patch17
-rw-r--r--meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch26
-rw-r--r--meta/recipes-extended/bash/bash/run-ptest2
-rw-r--r--meta/recipes-extended/bash/bash/test-output.patch25
-rw-r--r--meta/recipes-extended/bash/bash_3.2.48.bb28
-rw-r--r--meta/recipes-extended/bash/bash_4.3.bb18
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb26
-rw-r--r--meta/recipes-extended/bc/files/fix-segment-fault.patch28
-rw-r--r--meta/recipes-extended/blktool/blktool_4-6.1.bb24
-rw-r--r--meta/recipes-extended/byacc/byacc.inc19
-rw-r--r--meta/recipes-extended/byacc/byacc_20140101.bb11
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am71
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac14
-rw-r--r--meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest2
-rw-r--r--meta/recipes-extended/bzip2/bzip2_1.0.6.bb54
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb43
-rw-r--r--meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb63
-rw-r--r--meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch20
-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.bb12
-rw-r--r--meta/recipes-extended/cpio/cpio_2.8.bb16
-rw-r--r--meta/recipes-extended/cpio/cpio_v2.inc40
-rw-r--r--meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch332
-rw-r--r--meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch53
-rw-r--r--meta/recipes-extended/cracklib/cracklib_2.9.1.bb25
-rwxr-xr-xmeta/recipes-extended/cronie/cronie/crond.init58
-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/fix-out-of-tree-build.patch31
-rw-r--r--meta/recipes-extended/cronie/cronie_1.4.11.bb75
-rw-r--r--meta/recipes-extended/cups/cups.inc113
-rw-r--r--meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch70
-rw-r--r--meta/recipes-extended/cups/cups/cups_serverbin.patch32
-rw-r--r--meta/recipes-extended/cups/cups/use_echo_only_in_init.patch15
-rw-r--r--meta/recipes-extended/cups/cups_1.7.1.bb6
-rw-r--r--meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb17
-rw-r--r--meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch27
-rw-r--r--meta/recipes-extended/diffutils/diffutils-3.3/run-ptest3
-rw-r--r--meta/recipes-extended/diffutils/diffutils.inc18
-rw-r--r--meta/recipes-extended/diffutils/diffutils_2.8.1.bb16
-rw-r--r--meta/recipes-extended/diffutils/diffutils_3.3.bb34
-rw-r--r--meta/recipes-extended/ed/ed_0.5.bb21
-rw-r--r--meta/recipes-extended/ed/ed_1.9.bb29
-rw-r--r--meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch18
-rw-r--r--meta/recipes-extended/ethtool/ethtool/run-ptest2
-rw-r--r--meta/recipes-extended/ethtool/ethtool_3.13.bb30
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch53
-rw-r--r--meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch23
-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_doc.patch84
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch22
-rw-r--r--meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch40
-rw-r--r--meta/recipes-extended/findutils/findutils.inc24
-rw-r--r--meta/recipes-extended/findutils/findutils_4.2.31.bb13
-rw-r--r--meta/recipes-extended/findutils/findutils_4.4.2.bb25
-rw-r--r--meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb37
-rw-r--r--meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch23
-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.bb36
-rw-r--r--meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch41
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch33
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/run-ptest10
-rw-r--r--meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk32
-rw-r--r--meta/recipes-extended/gawk/gawk_3.1.5.bb42
-rw-r--r--meta/recipes-extended/gawk/gawk_4.0.2.bb52
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch28
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch929
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch96
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch44
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch50
-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/mips64/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h40
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mipsel/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.07.bb130
-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.bb5
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/Makevars25
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch13
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch17
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/gettext.patch15
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch32
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch52
-rw-r--r--meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch55
-rw-r--r--meta/recipes-extended/grep/grep_2.18.bb38
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb49
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch39
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch36
-rw-r--r--meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch36
-rw-r--r--meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch32
-rw-r--r--meta/recipes-extended/groff/groff_1.18.1.4.bb39
-rw-r--r--meta/recipes-extended/groff/groff_1.22.2.bb74
-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.inc29
-rw-r--r--meta/recipes-extended/gzip/gzip_1.3.12.bb39
-rw-r--r--meta/recipes-extended/gzip/gzip_1.6.bb9
-rw-r--r--meta/recipes-extended/hdparm/hdparm_9.43.bb36
-rw-r--r--meta/recipes-extended/images/core-image-full-cmdline.bb12
-rw-r--r--meta/recipes-extended/images/core-image-lsb-dev.bb7
-rw-r--r--meta/recipes-extended/images/core-image-lsb-sdk.bb10
-rw-r--r--meta/recipes-extended/images/core-image-lsb.bb14
-rw-r--r--meta/recipes-extended/images/core-image-testmaster-initramfs.bb19
-rw-r--r--meta/recipes-extended/images/core-image-testmaster.bb18
-rw-r--r--meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch47
-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.21.bb46
-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/fix-build-command-line-argument-with-gnutls.patch37
-rw-r--r--meta/recipes-extended/iputils/files/nsgmls-path-fix.patch27
-rw-r--r--meta/recipes-extended/iputils/iputils_s20121221.bb69
-rw-r--r--meta/recipes-extended/less/less_458.bb39
-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-aarch64.patch28
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio-generic.patch65
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch62
-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.bb31
-rw-r--r--meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch38
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.1.2.bb38
-rw-r--r--meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch25
-rw-r--r--meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch23
-rw-r--r--meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch26
-rw-r--r--meta/recipes-extended/libidn/libidn_0.6.14.bb32
-rw-r--r--meta/recipes-extended/libidn/libidn_1.28.bb34
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch26
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch38
-rw-r--r--meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb35
-rw-r--r--meta/recipes-extended/libuser/libuser/fixsepbuild.patch35
-rw-r--r--meta/recipes-extended/libuser/libuser_0.60.bb30
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd1
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd34
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf331
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd/lighttpd.service12
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb76
-rw-r--r--meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch134
-rw-r--r--meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch34
-rw-r--r--meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch43
-rw-r--r--meta/recipes-extended/logrotate/logrotate/update-the-manual.patch32
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.8.7.bb29
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/init-functions44
-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_4.1.bb121
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts/functions.patch26
-rw-r--r--meta/recipes-extended/lsb/lsbinitscripts_9.52.bb30
-rw-r--r--meta/recipes-extended/lsb/lsbtest/LSB_Test.sh526
-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.bb49
-rw-r--r--meta/recipes-extended/lsof/lsof_4.87.bb53
-rw-r--r--meta/recipes-extended/ltp/files/periodic_output.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch202
-rw-r--r--meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch15
-rw-r--r--meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch31
-rw-r--r--meta/recipes-extended/ltp/ltp/regen-makefile.patch22
-rw-r--r--meta/recipes-extended/ltp/ltp_20140115.bb85
-rw-r--r--meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch46
-rw-r--r--meta/recipes-extended/mailx/mailx_12.5.bb32
-rw-r--r--meta/recipes-extended/man-pages/man-pages_3.60.bb29
-rw-r--r--meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5h1-gencat.patch14
-rw-r--r--meta/recipes-extended/man/man/man-1.5h1-make.patch17
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-initial.patch19
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-newline.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5i2-overflow.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-i18n.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-nocache.patch16
-rw-r--r--meta/recipes-extended/man/man/man-1.5j-utf8.patch61
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-confpath.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-nonascii.patch18
-rw-r--r--meta/recipes-extended/man/man/man-1.5k-sofix.patch24
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-bug11621.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-buildroot.patch52
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch30
-rw-r--r--meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch31
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch145
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-mandirs.patch31
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-new_sections.patch15
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-ro_usr.patch33
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-security.patch62
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch160
-rw-r--r--meta/recipes-extended/man/man/man-1.6e-whatis2.patch52
-rw-r--r--meta/recipes-extended/man/man/man.1.gzbin0 -> 12323 bytes
-rw-r--r--meta/recipes-extended/man/man/man.7.gzbin0 -> 6192 bytes
-rw-r--r--meta/recipes-extended/man/man/man.conf140
-rw-r--r--meta/recipes-extended/man/man/manpath.5.gzbin0 -> 2133 bytes
-rw-r--r--meta/recipes-extended/man/man_1.6g.bb66
-rw-r--r--meta/recipes-extended/mc/mc_4.7.5.2.bb47
-rw-r--r--meta/recipes-extended/mc/mc_4.8.10.bb44
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch23
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.bb44
-rw-r--r--meta/recipes-extended/mingetty/mingetty_1.08.bb28
-rw-r--r--meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch35
-rw-r--r--meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch21
-rw-r--r--meta/recipes-extended/minicom/minicom_2.7.bb25
-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.bb30
-rw-r--r--meta/recipes-extended/msmtp/msmtp_1.4.31.bb25
-rw-r--r--meta/recipes-extended/net-tools/net-tools/net-tools-config.h75
-rw-r--r--meta/recipes-extended/net-tools/net-tools/net-tools-config.make36
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-25.bb86
-rw-r--r--meta/recipes-extended/newt/files/cross_ar.patch51
-rw-r--r--meta/recipes-extended/newt/files/fix_SHAREDDIR.patch29
-rw-r--r--meta/recipes-extended/newt/files/fix_python_fpic.patch24
-rw-r--r--meta/recipes-extended/newt/files/remove_slang_include.patch16
-rw-r--r--meta/recipes-extended/newt/libnewt-python_0.52.14.bb27
-rw-r--r--meta/recipes-extended/newt/libnewt_0.52.14.bb49
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb163
-rw-r--r--meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb266
-rw-r--r--meta/recipes-extended/pam/libpam/99_pam1
-rw-r--r--meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch63
-rw-r--r--meta/recipes-extended/pam/libpam/destdirfix.patch24
-rw-r--r--meta/recipes-extended/pam/libpam/fixsepbuild.patch24
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch41
-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-security-abstract-securetty-handling.patch200
-rw-r--r--meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch222
-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/other24
-rw-r--r--meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch35
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb143
-rw-r--r--meta/recipes-extended/parted/parted-3.1/Makefile285
-rw-r--r--meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch34
-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-dvh-overflows.patch35
-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/run-ptest3
-rw-r--r--meta/recipes-extended/parted/parted-3.1/syscalls.patch55
-rw-r--r--meta/recipes-extended/parted/parted_3.1.bb45
-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.26.bb17
-rw-r--r--meta/recipes-extended/perl/libtimedate-perl_2.30.bb19
-rw-r--r--meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb22
-rw-r--r--meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb23
-rw-r--r--meta/recipes-extended/perl/libxml-sax-perl_0.99.bb27
-rw-r--r--meta/recipes-extended/pigz/pigz.inc32
-rw-r--r--meta/recipes-extended/pigz/pigz_2.3.1.bb10
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch54
-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/procmodule.patch38
-rw-r--r--meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch111
-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/procps-3.2.8-ps-cgroup.patch82
-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.inc31
-rw-r--r--meta/recipes-extended/procps/procps_3.2.8.bb36
-rw-r--r--meta/recipes-extended/psmisc/psmisc.inc44
-rw-r--r--meta/recipes-extended/psmisc/psmisc_22.21.bb6
-rw-r--r--meta/recipes-extended/quota/quota/config-tcpwrappers.patch75
-rw-r--r--meta/recipes-extended/quota/quota_4.01.bb30
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch34
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch30
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch60
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/init.d87
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf3
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service14
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb63
-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.bb50
-rw-r--r--meta/recipes-extended/sed/sed-4.1.2/Makevars25
-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/sed-4.1.2_fix_for_automake-1.12.patch37
-rw-r--r--meta/recipes-extended/sed/sed_4.1.2.bb34
-rw-r--r--meta/recipes-extended/sed/sed_4.2.2.bb28
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch75
-rw-r--r--meta/recipes-extended/shadow/files/add_root_cmd_options.patch1384
-rw-r--r--meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch208
-rw-r--r--meta/recipes-extended/shadow/files/disable-syslog.patch34
-rw-r--r--meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch36
-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/login81
-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/su57
-rw-r--r--meta/recipes-extended/shadow/files/securetty207
-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/shadow_fix_for_automake-1.12.patch23
-rw-r--r--meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch63
-rw-r--r--meta/recipes-extended/shadow/files/useradd.patch17
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb36
-rw-r--r--meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb34
-rw-r--r--meta/recipes-extended/shadow/shadow.inc175
-rw-r--r--meta/recipes-extended/shadow/shadow_4.1.4.3.bb10
-rw-r--r--meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch218
-rw-r--r--meta/recipes-extended/slang/slang/fix-check-pcre.patch108
-rw-r--r--meta/recipes-extended/slang/slang/rpathfix.patch70
-rw-r--r--meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch42
-rw-r--r--meta/recipes-extended/slang/slang_2.2.4.bb48
-rw-r--r--meta/recipes-extended/stat/stat-3.3/fix-error-return.patch16
-rw-r--r--meta/recipes-extended/stat/stat_3.3.bb21
-rw-r--r--meta/recipes-extended/sudo/files/sudo.pam6
-rw-r--r--meta/recipes-extended/sudo/sudo.inc41
-rw-r--r--meta/recipes-extended/sudo/sudo_1.8.9p5.bb23
-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/sysklogd151
-rw-r--r--meta/recipes-extended/sysklogd/files/syslog.conf71
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc58
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_1.5.bb5
-rw-r--r--meta/recipes-extended/sysstat/sysstat.inc44
-rw-r--r--meta/recipes-extended/sysstat/sysstat/99_sysstat1
-rw-r--r--meta/recipes-extended/sysstat/sysstat_10.2.1.bb6
-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.27.1.bb6
-rw-r--r--meta/recipes-extended/tar/tar.inc45
-rw-r--r--meta/recipes-extended/tar/tar/remove-gets.patch22
-rw-r--r--meta/recipes-extended/tar/tar_1.17.bb14
-rw-r--r--meta/recipes-extended/tar/tar_1.27.1.bb10
-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/rename_strings_variable.patch35
-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/socklen_t.patch59
-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.bb121
-rw-r--r--meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch31
-rw-r--r--meta/recipes-extended/texi2html/texi2html_5.0.bb33
-rw-r--r--meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch43
-rw-r--r--meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch49
-rw-r--r--meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch51
-rw-r--r--meta/recipes-extended/texinfo/texinfo/link-zip.patch16
-rw-r--r--meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch187
-rw-r--r--meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch14
-rw-r--r--meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch17
-rw-r--r--meta/recipes-extended/texinfo/texinfo_5.2.bb62
-rw-r--r--meta/recipes-extended/time/time-1.7/debian.patch1301
-rw-r--r--meta/recipes-extended/time/time.inc12
-rw-r--r--meta/recipes-extended/time/time_1.7.bb11
-rw-r--r--meta/recipes-extended/tzcode/tzcode-native_2013i.bb26
-rw-r--r--meta/recipes-extended/tzdata/tzdata_2013i.bb206
-rw-r--r--meta/recipes-extended/unzip/unzip/avoid-strip.patch50
-rw-r--r--meta/recipes-extended/unzip/unzip/define-ldflags.patch18
-rw-r--r--meta/recipes-extended/unzip/unzip_6.0.bb38
-rw-r--r--meta/recipes-extended/watchdog/files/fix-ping-failure.patch65
-rw-r--r--meta/recipes-extended/watchdog/files/fixsepbuild.patch27
-rw-r--r--meta/recipes-extended/watchdog/watchdog_5.13.bb19
-rw-r--r--meta/recipes-extended/wget/wget-1.14/fix_doc.patch71
-rw-r--r--meta/recipes-extended/wget/wget-1.14/fix_makefile.patch33
-rw-r--r--meta/recipes-extended/wget/wget.inc20
-rw-r--r--meta/recipes-extended/wget/wget_1.14.bb10
-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.bb32
-rw-r--r--meta/recipes-extended/which/which_2.20.bb31
-rw-r--r--meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.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-CVE-2013-4342.patch32
-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.default12
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.init64
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb57
-rw-r--r--meta/recipes-extended/xz/xz_5.1.3alpha.bb40
-rw-r--r--meta/recipes-extended/zip/zip.inc26
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb15
441 files changed, 28134 insertions, 0 deletions
diff --git a/meta/recipes-extended/at/at_3.1.14.bb b/meta/recipes-extended/at/at_3.1.14.bb
new file mode 100644
index 0000000000..1b87d4ad41
--- /dev/null
+++ b/meta/recipes-extended/at/at_3.1.14.bb
@@ -0,0 +1,68 @@
1SUMMARY = "Delayed job execution and batch processing"
2DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
3the system load levels drop to a particular level."
4SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
7DEPENDS = "flex flex-native \
8 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
9
10VIRTUAL-RUNTIME_initscripts ?= "initscripts"
11RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
12 ${VIRTUAL-RUNTIME_initscripts} \
13"
14
15PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
16
17RCONFLICTS_${PN} = "atd"
18RREPLACES_${PN} = "atd"
19
20SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
21 file://fix_parallel_build_error.patch \
22 file://posixtm.c \
23 file://posixtm.h \
24 file://file_replacement_with_gplv2.patch \
25 file://S99at \
26 file://atd.service \
27 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
28
29PAM_SRC_URI = "file://pam.conf.patch \
30 file://configure-add-enable-pam.patch"
31
32SRC_URI[md5sum] = "d41cfd79033b6e49a8838add59a42ac6"
33SRC_URI[sha256sum] = "cd092bf05d29c25b286f55a960ce8b8c3c5beb571d86ed8eb1dfb3b61291b3ae"
34
35EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
36 --with-daemon_username=root \
37 --with-daemon_groupname=root \
38 --with-jobdir=/var/spool/at/jobs \
39 --with-atspool=/var/spool/at/spool \
40 ac_cv_header_security_pam_appl_h=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
41
42inherit autotools-brokensep systemd
43
44SYSTEMD_SERVICE_${PN} = "atd.service"
45
46PARALLEL_MAKE = ""
47
48do_compile_prepend () {
49 cp -f ${WORKDIR}/posixtm.[ch] ${S}
50}
51
52do_install () {
53 oe_runmake -e "IROOT=${D}" install
54
55 install -d ${D}${sysconfdir}/init.d
56 install -d ${D}${sysconfdir}/rcS.d
57 install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
58 ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
59
60 # install systemd unit files
61 install -d ${D}${systemd_unitdir}/system
62 install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
63 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
64
65 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
66 install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
67 fi
68}
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/files/S99at
new file mode 100644
index 0000000000..eca379b3cd
--- /dev/null
+++ b/meta/recipes-extended/at/files/S99at
@@ -0,0 +1,45 @@
1#!/bin/sh
2#
3# Starts at daemon
4#
5
6umask 077
7
8# Source function library.
9. /etc/init.d/functions
10
11start() {
12 echo -n "Starting atd: "
13 start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
14 echo "OK"
15}
16stop() {
17 echo -n "Stopping atd: "
18 start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
19 echo "OK"
20}
21restart() {
22 stop
23 start
24}
25
26case "$1" in
27 start)
28 start
29 ;;
30 stop)
31 stop
32 ;;
33 restart|reload)
34 restart
35 ;;
36 status)
37 status /usr/sbin/atd
38 ;;
39 *)
40 echo $"Usage: $0 {start|stop|restart|status}"
41 exit 1
42esac
43
44exit $?
45
diff --git a/meta/recipes-extended/at/files/atd.service b/meta/recipes-extended/at/files/atd.service
new file mode 100644
index 0000000000..6dc844504a
--- /dev/null
+++ b/meta/recipes-extended/at/files/atd.service
@@ -0,0 +1,9 @@
1[Unit]
2Description=Job spooling tools
3After=syslog.target
4
5[Service]
6ExecStart=@SBINDIR@/atd -f
7
8[Install]
9WantedBy=multi-user.target
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 0000000000..1e5efef128
--- /dev/null
+++ b/meta/recipes-extended/at/files/configure-add-enable-pam.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Pending
2
3--- at-3.1.12/configure.ac 2011-06-23 14:51:03.653572945 +0800
4+++ at-3.1.12/configure.ac.new 2011-06-27 16:12:14.903572945 +0800
5@@ -81,10 +81,18 @@
6 AC_FUNC_VPRINTF
7 AC_FUNC_GETLOADAVG
8 AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
9+
10+AC_ARG_WITH([pam],
11+ [AS_HELP_STRING([--without-pam], [without PAM support])])
12+
13+if test "x$with_pam" != xno; then
14 AC_CHECK_HEADERS(security/pam_appl.h, [
15 PAMLIB="-lpam"
16- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
17-])
18+ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])],
19+ [if test "x$with_pam" = xyes; then
20+ AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
21+ fi])
22+fi
23
24 dnl Checking for programs
25
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 0000000000..d5ef0032be
--- /dev/null
+++ b/meta/recipes-extended/at/files/file_replacement_with_gplv2.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Inappropriate [licensing]
2
3posixtm.[ch] files are replaced with gplv2 version from these locations:
4
5http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
6http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
7
8update the Copyright file information to reflect the replaced files.
9
10Date: 2010/08/31
11Nitin A Kamble nitin.a.kamble@intel.com
12
13Index: at-3.1.12/Copyright
14===================================================================
15--- at-3.1.12.orig/Copyright
16+++ at-3.1.12/Copyright
17@@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t
18 Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
19 2005, 2006, 2007 Free Software Foundation Inc.
20
21- This program is free software: you can redistribute it and/or modify
22+ This program is free software; you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24- the Free Software Foundation; either version 3 of the License, or
25- (at your option) any later version.
26+ the Free Software Foundation; either version 2, or (at your option)
27+ any later version.
28
29 This program is distributed in the hope that it will be useful,
30 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 0000000000..66ff3e1c11
--- /dev/null
+++ b/meta/recipes-extended/at/files/fix_parallel_build_error.patch
@@ -0,0 +1,28 @@
1make -j was failing sometimesa like this
2| 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
3| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory
4| compilation terminated.
5| make: *** [lex.yy.o] Error 1
6| make: *** Waiting for unfinished jobs....
7
8Fixed the issue by adding a dependency in the makefile.
9Nitin <nitin.a.kamble@intel.com>
102010/09/02
11
12Upstream-Status: Pending
13
14Signed-off-by: Scott Garman <scott.a.garman@intel.com>
15
16Index: at-3.1.12/Makefile.in
17===================================================================
18--- at-3.1.12.orig/Makefile.in
19+++ at-3.1.12/Makefile.in
20@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
21 lex.yy.c: parsetime.l
22 $(LEX) -i parsetime.l
23
24+parsetime.l: y.tab.h
25+
26 atrun: atrun.in
27 configure
28
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 0000000000..dfe76d7487
--- /dev/null
+++ b/meta/recipes-extended/at/files/pam.conf.patch
@@ -0,0 +1,21 @@
1oe doesn't support "@include", use the concrete directive instead.
2
3Upstream-Status: Pending
4
5Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
6--- at-3.1.12/pam.conf.orig 2009-11-23 23:11:52.000000000 +0800
7+++ at-3.1.12/pam.conf 2011-07-15 11:14:04.132818950 +0800
8@@ -2,8 +2,8 @@
9 # The PAM configuration file for the at daemon
10 #
11
12-auth required pam_env.so
13-@include common-auth
14-@include common-account
15-@include common-session-noninteractive
16-session required pam_limits.so
17+auth required pam_env.so
18+auth include common-auth
19+account include common-account
20+session include common-session-noninteractive
21+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 0000000000..5514ba4fe2
--- /dev/null
+++ b/meta/recipes-extended/at/files/posixtm.c
@@ -0,0 +1,328 @@
1/* Parse dates for touch and date.
2
3 Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007 Free Software Foundation Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19
20/* Yacc-based version written by Jim Kingdon and David MacKenzie.
21 Rewritten by Jim Meyering. */
22
23#include <config.h>
24
25#include "posixtm.h"
26
27#include <stdio.h>
28#include <stdlib.h>
29#include <sys/types.h>
30#include <string.h>
31
32#if USE_UNLOCKED_IO
33# include "unlocked-io.h"
34#endif
35
36/* ISDIGIT differs from isdigit, as follows:
37 - Its arg may be any int or unsigned int; it need not be an unsigned char
38 or EOF.
39 - It's typically faster.
40 POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
41 isdigit unless it's important to use the locale's definition
42 of `digit' even when the host does not conform to POSIX. */
43#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
44
45time_t mktime ();
46
47/*
48 POSIX requires:
49
50 touch -t [[CC]YY]mmddhhmm[.ss] FILE...
51 8, 10, or 12 digits, followed by optional .ss
52 (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)
53
54 touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001)
55 8 or 10 digits, YY (if present) must be in the range 69-99
56 (PDS_TRAILING_YEAR | PDS_PRE_2000)
57
58 date mmddhhmm[[CC]YY]
59 8, 10, or 12 digits
60 (PDS_TRAILING_YEAR | PDS_CENTURY)
61
62*/
63
64static int
65year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits)
66{
67 switch (n)
68 {
69 case 1:
70 tm->tm_year = *digit_pair;
71 /* Deduce the century based on the year.
72 POSIX requires that 00-68 be interpreted as 2000-2068,
73 and that 69-99 be interpreted as 1969-1999. */
74 if (digit_pair[0] <= 68)
75 {
76 if (syntax_bits & PDS_PRE_2000)
77 return 1;
78 tm->tm_year += 100;
79 }
80 break;
81
82 case 2:
83 if (! (syntax_bits & PDS_CENTURY))
84 return 1;
85 tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900;
86 break;
87
88 case 0:
89 {
90 time_t now;
91 struct tm *tmp;
92
93 /* Use current year. */
94 time (&now);
95 tmp = localtime (&now);
96 if (! tmp)
97 return 1;
98 tm->tm_year = tmp->tm_year;
99 }
100 break;
101
102 default:
103 abort ();
104 }
105
106 return 0;
107}
108
109static int
110posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
111{
112 const char *dot = NULL;
113 int pair[6];
114 int *p;
115 size_t i;
116
117 size_t s_len = strlen (s);
118 size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.')))
119 ? (size_t) (dot - s)
120 : s_len);
121
122 if (len != 8 && len != 10 && len != 12)
123 return 1;
124
125 if (dot)
126 {
127 if (!(syntax_bits & PDS_SECONDS))
128 return 1;
129
130 if (s_len - len != 3)
131 return 1;
132 }
133
134 for (i = 0; i < len; i++)
135 if (!ISDIGIT (s[i]))
136 return 1;
137
138 len /= 2;
139 for (i = 0; i < len; i++)
140 pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0';
141
142 p = pair;
143 if (syntax_bits & PDS_LEADING_YEAR)
144 {
145 if (year (tm, p, len - 4, syntax_bits))
146 return 1;
147 p += len - 4;
148 len = 4;
149 }
150
151 /* Handle 8 digits worth of `MMDDhhmm'. */
152 tm->tm_mon = *p++ - 1;
153 tm->tm_mday = *p++;
154 tm->tm_hour = *p++;
155 tm->tm_min = *p++;
156 len -= 4;
157
158 /* Handle any trailing year. */
159 if (syntax_bits & PDS_TRAILING_YEAR)
160 {
161 if (year (tm, p, len, syntax_bits))
162 return 1;
163 }
164
165 /* Handle seconds. */
166 if (!dot)
167 {
168 tm->tm_sec = 0;
169 }
170 else
171 {
172 int seconds;
173
174 ++dot;
175 if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1]))
176 return 1;
177 seconds = 10 * (dot[0] - '0') + dot[1] - '0';
178
179 tm->tm_sec = seconds;
180 }
181
182 return 0;
183}
184
185/* Parse a POSIX-style date, returning true if successful. */
186
187bool
188posixtime (time_t *p, const char *s, unsigned int syntax_bits)
189{
190 struct tm tm0
191#ifdef lint
192 /* Placate gcc-4's -Wuninitialized.
193 posix_time_parse fails to set all of tm0 only when it returns
194 nonzero (due to year() returning nonzero), and in that case,
195 this code doesn't use the tm0 at all. */
196 = { 0, }
197#endif
198 ;
199 struct tm tm1;
200 struct tm const *tm;
201 time_t t;
202
203 if (posix_time_parse (&tm0, s, syntax_bits))
204 return false;
205
206 tm1 = tm0;
207 tm1.tm_isdst = -1;
208 t = mktime (&tm1);
209
210 if (t != (time_t) -1)
211 tm = &tm1;
212 else
213 {
214 /* mktime returns -1 for errors, but -1 is also a valid time_t
215 value. Check whether an error really occurred. */
216 tm = localtime (&t);
217 if (! tm)
218 return false;
219 }
220
221 /* Reject dates like "September 31" and times like "25:61". */
222 if ((tm0.tm_year ^ tm->tm_year)
223 | (tm0.tm_mon ^ tm->tm_mon)
224 | (tm0.tm_mday ^ tm->tm_mday)
225 | (tm0.tm_hour ^ tm->tm_hour)
226 | (tm0.tm_min ^ tm->tm_min)
227 | (tm0.tm_sec ^ tm->tm_sec))
228 return false;
229
230 *p = t;
231 return true;
232}
233
234#ifdef TEST_POSIXTIME
235/*
236 Test mainly with syntax_bits == 13
237 (aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS))
238
239 This test data assumes Universal Time, e.g., TZ="UTC0".
240
241 This test data also assumes that time_t is signed and is at least
242 39 bits wide, so that it can represent all years from 0000 through
243 9999. A host with 32-bit signed time_t can represent only time
244 stamps in the range 1901-12-13 20:45:52 through 2038-01-18
245 03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test
246 cases outside this range will not work on such a host.
247
248 Also, the first two lines of test data assume that the current
249 year is 2002.
250
251BEGIN-DATA
25212131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
25312131415.16 13 1039788916 Fri Dec 13 14:15:16 2002
254000001010000.00 13 -62167132800 Sun Jan 1 00:00:00 0000
255190112132045.52 13 -2147483648 Fri Dec 13 20:45:52 1901
256190112132045.53 13 -2147483647 Fri Dec 13 20:45:53 1901
257190112132046.52 13 -2147483588 Fri Dec 13 20:46:52 1901
258190112132145.52 13 -2147480048 Fri Dec 13 21:45:52 1901
259190112142045.52 13 -2147397248 Sat Dec 14 20:45:52 1901
260190201132045.52 13 -2144805248 Mon Jan 13 20:45:52 1902
261196912312359.59 13 -1 Wed Dec 31 23:59:59 1969
262197001010000.00 13 0 Thu Jan 1 00:00:00 1970
263197001010000.01 13 1 Thu Jan 1 00:00:01 1970
264197001010001.00 13 60 Thu Jan 1 00:01:00 1970
265197001010100.00 13 3600 Thu Jan 1 01:00:00 1970
266197001020000.00 13 86400 Fri Jan 2 00:00:00 1970
267197002010000.00 13 2678400 Sun Feb 1 00:00:00 1970
268197101010000.00 13 31536000 Fri Jan 1 00:00:00 1971
269197001000000.00 13 * *
270197000010000.00 13 * *
271197001010000.60 13 * *
272197001010060.00 13 * *
273197001012400.00 13 * *
274197001320000.00 13 * *
275197013010000.00 13 * *
276203801190314.06 13 2147483646 Tue Jan 19 03:14:06 2038
277203801190314.07 13 2147483647 Tue Jan 19 03:14:07 2038
278203801190314.08 13 2147483648 Tue Jan 19 03:14:08 2038
279999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999
2801112131415 13 1323785700 Tue Dec 13 14:15:00 2011
2811112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
282201112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011
283191112131415.16 13 -1831974284 Wed Dec 13 14:15:16 1911
284203712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
2853712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037
2866812131415.16 13 3122633716 Thu Dec 13 14:15:16 2068
2876912131415.16 13 -1590284 Sat Dec 13 14:15:16 1969
2887012131415.16 13 29945716 Sun Dec 13 14:15:16 1970
2891213141599 2 945094500 Mon Dec 13 14:15:00 1999
2901213141500 2 976716900 Wed Dec 13 14:15:00 2000
291END-DATA
292
293*/
294
295# define MAX_BUFF_LEN 1024
296
297int
298main (void)
299{
300 char buff[MAX_BUFF_LEN + 1];
301
302 buff[MAX_BUFF_LEN] = 0;
303 while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
304 {
305 char time_str[MAX_BUFF_LEN];
306 unsigned int syntax_bits;
307 time_t t;
308 if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2)
309 printf ("*\n");
310 else
311 {
312 printf ("%-15s %2u ", time_str, syntax_bits);
313 if (posixtime (&t, time_str, syntax_bits))
314 printf ("%12ld %s", (long int) t, ctime (&t));
315 else
316 printf ("%12s %s", "*", "*\n");
317 }
318 }
319 exit (0);
320
321}
322#endif
323
324/*
325Local Variables:
326compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c"
327End:
328*/
diff --git a/meta/recipes-extended/at/files/posixtm.h b/meta/recipes-extended/at/files/posixtm.h
new file mode 100644
index 0000000000..e91749d736
--- /dev/null
+++ b/meta/recipes-extended/at/files/posixtm.h
@@ -0,0 +1,37 @@
1/* Parse dates for touch and date.
2
3 Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18
19/* Yacc-based version written by Jim Kingdon and David MacKenzie.
20 Rewritten by Jim Meyering. */
21
22#ifndef POSIXTM_H_
23# define POSIXTM_H_
24
25# include <stdbool.h>
26# include <time.h>
27
28/* POSIX Date Syntax flags. */
29# define PDS_LEADING_YEAR 1
30# define PDS_TRAILING_YEAR 2
31# define PDS_CENTURY 4
32# define PDS_SECONDS 8
33# define PDS_PRE_2000 16
34
35bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
36
37#endif
diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc
new file mode 100644
index 0000000000..61f81b084c
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas.inc
@@ -0,0 +1,32 @@
1SUMMARY = "Augeas configuration API"
2HOMEPAGE = "http://augeas.net/"
3BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
4
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
7
8SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
9 file://add-missing-argz-conditional.patch \
10 file://sepbuildfix.patch \
11 "
12
13DEPENDS = "readline libxml2"
14
15inherit autotools
16
17PACKAGES =+ "${PN}-lenses lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-dbg"
18
19FILES_${PN}-lenses = "${datadir}/augeas/lenses"
20FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
21FILES_lib${BPN}-dev = "${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${includedir} ${libdir}/pkgconfig"
22FILES_lib${BPN}-staticdev = "${libdir}/*.a"
23FILES_lib${BPN}-dbg = "${libdir}/.debug"
24
25RDEPENDS_lib${BPN} += "${PN}-lenses"
26RRECOMMENDS_lib${BPN} += "${PN}"
27
28LEAD_SONAME = "libaugeas.so"
29
30do_install_append() {
31 rm -fr ${D}${datadir}/vim
32}
diff --git a/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
new file mode 100644
index 0000000000..abbdbaa63b
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
@@ -0,0 +1,20 @@
1Add missing GL_GENERATE_ARGZ_H conditional
2
3- GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am
4
5Upstream-Status: Pending
6Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
7
8Index: augeas-1.0.0/configure.ac
9===================================================================
10--- augeas-1.0.0.orig/configure.ac
11+++ augeas-1.0.0/configure.ac
12@@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc],
13
14 AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno])
15
16+AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"])
17+
18 dnl --enable-debug=(yes|no)
19 AC_ARG_ENABLE([debug],
20 [AC_HELP_STRING([--enable-debug=no/yes],
diff --git a/meta/recipes-extended/augeas/augeas/sepbuildfix.patch b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
new file mode 100644
index 0000000000..b82a3ee2cb
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
@@ -0,0 +1,22 @@
1Ensure that builds in separate builddirs (${B} != ${S}) correctly install the
2lenses files.
3
4Upstream-Status: Pending
5
6RP 2013/4/17
7
8Index: augeas-1.0.0/Makefile.am
9===================================================================
10--- augeas-1.0.0.orig/Makefile.am 2012-11-02 15:20:11.000000000 +0000
11+++ augeas-1.0.0/Makefile.am 2013-04-17 10:36:24.033400125 +0000
12@@ -5,8 +5,8 @@
13 lensdir=$(datadir)/augeas/lenses/dist
14 lenstestdir=$(datadir)/augeas/lenses/dist/tests
15
16-dist_lens_DATA=$(wildcard lenses/*.aug)
17-dist_lenstest_DATA=$(wildcard lenses/tests/*.aug)
18+dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug)
19+dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug)
20
21 EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING
22
diff --git a/meta/recipes-extended/augeas/augeas_1.2.0.bb b/meta/recipes-extended/augeas/augeas_1.2.0.bb
new file mode 100644
index 0000000000..67b3941395
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas_1.2.0.bb
@@ -0,0 +1,5 @@
1require augeas.inc
2
3
4SRC_URI[md5sum] = "dce2f52cbd20f72c7da48e014ad48076"
5SRC_URI[sha256sum] = "f4aeb28ebe0b0921920fe1c9b4c016739c25261a15de04cb97db02d669f481e0"
diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
new file mode 100644
index 0000000000..91341ee696
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
@@ -0,0 +1,44 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
7--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500
8+++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500
9@@ -803,17 +803,31 @@
10 fi
11
12 recho$(EXEEXT): $(SUPPORT_SRC)recho.c
13- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
14+ @$(CC) $(CCFLAGS) -o $@ $<
15
16 zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
17- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
18+ @$(CC) $(CCFLAGS) -o $@ $<
19
20 printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
21- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
22+ @$(CC) $(CCFLAGS) -o $@ $<
23
24-test tests check: force $(Program) $(TESTS_SUPPORT)
25+test tests check:
26+ @$(MAKE) install-test
27+ @$(MAKE) runtest
28+
29+install-test: buildtest
30+ifeq ($(origin INSTALL_TEST_DIR), undefined)
31 @-test -d tests || mkdir tests
32 @cp $(TESTS_SUPPORT) tests
33+else
34+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
35+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
36+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
37+endif
38+
39+buildtest: force $(Program) $(TESTS_SUPPORT)
40+
41+runtest:
42 @( cd $(srcdir)/tests && \
43 PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
44
diff --git a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
new file mode 100644
index 0000000000..c4229a7ed9
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
@@ -0,0 +1,29 @@
1On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
2the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
3use the STRING() macro from unistd.h. A header in the bash sources overrides
4the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
5wrappers to generate calls to 'xread' and 'xopen', which do not exist,
6resulting in a failure to link.
7
8Assume we have stringize support when cross-compiling, which works around the
9issue.
10
11It may be best for upstream to either give up on supporting compilers without
12stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
13defined, letting the unistd.h one be used, instead.
14
15Upstream-Status: Pending
16
17Signed-off-by: Christopher Larson <chris_larson@mentor.com>
18Signed-off-by: Saul Wold <sgw@linux.intel.com>
19
20--- bash-4.2.orig/builtins/mkbuiltins.c
21+++ bash-4.2/builtins/mkbuiltins.c
22@@ -28,6 +28,7 @@
23 # define HAVE_STDLIB_H
24
25 # define HAVE_RENAME
26+# define HAVE_STRINGIZE
27 #endif /* CROSS_COMPILING */
28
29 #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
new file mode 100644
index 0000000000..8dd3b9981d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
new file mode 100644
index 0000000000..2b09b7d977
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
@@ -0,0 +1,25 @@
1Add FAIL/PASS output to test output.
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5---
6diff -uNr a/tests/run-all b/tests/run-all
7--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
8+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
9@@ -22,7 +22,15 @@
10 case $x in
11 $0|run-minimal|run-gprof) ;;
12 *.orig|*~) ;;
13- *) echo $x ; sh $x ;;
14+ *) echo $x
15+ output=`sh $x`
16+ if [ -n "$output" ]; then
17+ echo "$output"
18+ echo "FAIL: $x"
19+ else
20+ echo "PASS: $x"
21+ fi
22+ ;;
23 esac
24 done
25
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
new file mode 100644
index 0000000000..2bb2df9584
--- /dev/null
+++ b/meta/recipes-extended/bash/bash.inc
@@ -0,0 +1,54 @@
1SUMMARY = "An sh-compatible command language interpreter"
2HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
3SECTION = "base/shell"
4
5DEPENDS = "ncurses bison-native"
6
7inherit autotools-brokensep gettext update-alternatives ptest
8
9PARALLEL_MAKE = ""
10
11EXTRA_OECONF = "--enable-job-control"
12
13ALTERNATIVE_${PN} = "sh"
14ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
15ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
16ALTERNATIVE_PRIORITY = "100"
17
18export AUTOHEADER = "true"
19
20RDEPENDS_${PN} += "base-files"
21RDEPENDS_${PN}_class-nativesdk = ""
22RDEPENDS_${PN}-ptest += "make"
23
24do_configure_prepend () {
25 if [ ! -e ${S}/acinclude.m4 ]; then
26 cat ${S}/aclocal.m4 > ${S}/acinclude.m4
27 fi
28}
29
30do_compile_ptest () {
31 oe_runmake buildtest
32}
33
34do_install_append () {
35 # Move /usr/bin/bash to /bin/bash, if need
36 if [ "${base_bindir}" != "${bindir}" ]; then
37 mkdir -p ${D}${base_bindir}
38 mv ${D}${bindir}/bash ${D}${base_bindir}
39 fi
40}
41
42do_install_ptest () {
43 make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
44 cp ${B}/Makefile ${D}${PTEST_PATH}
45 sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
46}
47
48pkg_postinst_${PN} () {
49 grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
50}
51
52pkg_postrm_${PN} () {
53 printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
54}
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch
new file mode 100644
index 0000000000..73a81b60da
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/build-tests.patch
@@ -0,0 +1,55 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2
3Upstream-Status: Pending
4Signed-off-by: Anders Roxell <anders.roxell@enea.com>
5Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
6---
7 Makefile.in | 24 +++++++++++++++++++-----
8 1 file changed, 19 insertions(+), 5 deletions(-)
9
10diff --git a/Makefile.in b/Makefile.in
11--- a/Makefile.in
12+++ b/Makefile.in
13@@ -848,20 +848,34 @@ maybe-clean:
14 fi
15
16 recho$(EXEEXT): $(SUPPORT_SRC)recho.c
17- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
18+ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
19
20 zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
21- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
22+ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
23
24 printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
25- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
26+ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
27
28 xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c
29- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD}
30+ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
31
32-test tests check: force $(Program) $(TESTS_SUPPORT)
33+test tests check:
34+ @$(MAKE) install-test
35+ @$(MAKE) runtest
36+
37+install-test: buildtest
38+ifeq ($(origin INSTALL_TEST_DIR), undefined)
39 @-test -d tests || mkdir tests
40 @cp $(TESTS_SUPPORT) tests
41+else
42+ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
43+ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
44+ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
45+endif
46+
47+buildtest: force $(Program) $(TESTS_SUPPORT)
48+
49+runtest:
50 @( cd $(srcdir)/tests && \
51 PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
52
53--
541.8.1.2
55
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch
new file mode 100644
index 0000000000..81f8f0a9cd
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3--- execute_cmd.c.orig Fri Jun 3 13:34:42 2011
4+++ execute_cmd.c Fri Jun 3 13:36:41 2011
5@@ -2202,7 +2202,11 @@
6 /* If the `lastpipe' option is set with shopt, and job control is not
7 enabled, execute the last element of non-async pipelines in the
8 current shell environment. */
9- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
10+ if (lastpipe_opt &&
11+#if defined(JOB_CONTROL)
12+ job_control == 0 &&
13+#endif
14+ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
15 {
16 lstdin = move_to_high_fd (0, 0, 255);
17 if (lstdin > 0)
diff --git a/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch
new file mode 100644
index 0000000000..a9391d6cac
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch
@@ -0,0 +1,26 @@
1On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
2the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
3use the STRING() macro from unistd.h. A header in the bash sources overrides
4the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
5wrappers to generate calls to 'xread' and 'xopen', which do not exist,
6resulting in a failure to link.
7
8Assume we have stringize support when cross-compiling, which works around the
9issue.
10
11It may be best for upstream to either give up on supporting compilers without
12stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
13defined, letting the unistd.h one be used, instead.
14
15Upstream-Status: Pending
16
17--- bash-4.2.orig/builtins/mkbuiltins.c
18+++ bash-4.2/builtins/mkbuiltins.c
19@@ -28,6 +28,7 @@
20 # define HAVE_STDLIB_H
21
22 # define HAVE_RENAME
23+# define HAVE_STRINGIZE
24 #endif /* CROSS_COMPILING */
25
26 #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
new file mode 100644
index 0000000000..8dd3b9981d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch
new file mode 100644
index 0000000000..2b09b7d977
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/test-output.patch
@@ -0,0 +1,25 @@
1Add FAIL/PASS output to test output.
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5---
6diff -uNr a/tests/run-all b/tests/run-all
7--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200
8+++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200
9@@ -22,7 +22,15 @@
10 case $x in
11 $0|run-minimal|run-gprof) ;;
12 *.orig|*~) ;;
13- *) echo $x ; sh $x ;;
14+ *) echo $x
15+ output=`sh $x`
16+ if [ -n "$output" ]; then
17+ echo "$output"
18+ echo "FAIL: $x"
19+ else
20+ echo "PASS: $x"
21+ fi
22+ ;;
23 esac
24 done
25
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 0000000000..fe04b28e7c
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -0,0 +1,28 @@
1require bash.inc
2
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
5
6PR = "r11"
7
8SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
9 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch001 \
10 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch002 \
11 ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch003 \
12 file://mkbuiltins_have_stringize.patch \
13 file://build-tests.patch \
14 file://test-output.patch \
15 file://run-ptest \
16 "
17
18SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
19SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
20SRC_URI[patch001.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
21SRC_URI[patch001.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
22SRC_URI[patch002.md5sum] = "8443d4385d73ec835abe401d90591377"
23SRC_URI[patch002.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
24SRC_URI[patch003.md5sum] = "15c6653042e9814aa87120098fc7a849"
25SRC_URI[patch003.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
26
27SRC_URI[md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
28SRC_URI[sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
diff --git a/meta/recipes-extended/bash/bash_4.3.bb b/meta/recipes-extended/bash/bash_4.3.bb
new file mode 100644
index 0000000000..25b7410c52
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_4.3.bb
@@ -0,0 +1,18 @@
1require bash.inc
2
3# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6
7SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
8 file://execute_cmd.patch;striplevel=0 \
9 file://mkbuiltins_have_stringize.patch \
10 file://build-tests.patch \
11 file://test-output.patch \
12 file://run-ptest \
13 "
14
15SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1"
16SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4"
17
18BBCLASSEXTEND = "nativesdk"
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 0000000000..89d8bee667
--- /dev/null
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Arbitrary precision calculator language"
2HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
3
4LICENSE = "GPLv2+ & LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
7 file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
8 file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
9 file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
10
11SECTION = "base"
12DEPENDS = "flex"
13PR = "r2"
14
15SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
16 file://fix-segment-fault.patch "
17
18SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
19SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
20
21inherit autotools-brokensep update-alternatives
22
23ALTERNATIVE_${PN} = "dc"
24ALTERNATIVE_PRIORITY = "100"
25
26BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch
new file mode 100644
index 0000000000..20c0da2ebe
--- /dev/null
+++ b/meta/recipes-extended/bc/files/fix-segment-fault.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Pending
2
3when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
4This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
5
6Signed-off-by: Kai Kang <kai.kang@windriver.com>
7
8--- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000
9+++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000
10@@ -34,6 +34,7 @@
11 #include <number.h>
12 #include <assert.h>
13 #include <stdlib.h>
14+#include <string.h>
15 #include <ctype.h>/* Prototypes needed for external utility routines. */
16
17 #define bc_rt_warn rt_warn
18--- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000
19+++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000
20@@ -156,7 +156,7 @@
21 long label_no;
22 long vaf_name; /* variable, array or function number. */
23 long func;
24- program_counter save_adr;
25+ static program_counter save_adr;
26
27 /* Initialize. */
28 str = code;
diff --git a/meta/recipes-extended/blktool/blktool_4-6.1.bb b/meta/recipes-extended/blktool/blktool_4-6.1.bb
new file mode 100644
index 0000000000..8bd1bae650
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool_4-6.1.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Tune low-level block device parameters"
2DESCRIPTION = "blktool is used for querying and/or changing settings \
3of a block device. It is like hdparm but a more general tool, as it \
4works on SCSI, IDE and SATA devices."
5HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8 file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
9
10DEPENDS = "glib-2.0"
11PR = "r1"
12
13SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
14 ${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.1.diff.gz;apply=yes;name=patch"
15
16SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
17SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
18
19SRC_URI[patch.md5sum] = "cf605a683d54d1fbcb35b940076ddb0c"
20SRC_URI[patch.sha256sum] = "d7923527e1a00984620ab307c9047a653d7ae2856cd20a82de8a33328f381ae3"
21
22S = "${WORKDIR}/${BPN}-4.orig"
23
24inherit autotools
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
new file mode 100644
index 0000000000..fae9e2504a
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc.inc
@@ -0,0 +1,19 @@
1SUMMARY = "Berkeley LALR Yacc parser generator"
2DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
3parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
4programming language."
5SECTION = "devel"
6LICENSE = "PD"
7
8SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz"
9EXTRA_OECONF += "--program-transform-name='s,^,b,'"
10
11BBCLASSEXTEND = "native"
12
13inherit autotools
14
15do_configure() {
16 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
17 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
18 oe_runconf
19}
diff --git a/meta/recipes-extended/byacc/byacc_20140101.bb b/meta/recipes-extended/byacc/byacc_20140101.bb
new file mode 100644
index 0000000000..dff315ebf4
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc_20140101.bb
@@ -0,0 +1,11 @@
1# Sigh. This is one of those places where everyone licenses it differently. Someone
2# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
3# "I've found no reliable source which states that byacc must bear a UCB copyright."
4# Setting to PD as this is what the upstream has it as.
5
6LICENSE = "PD"
7LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3"
8require byacc.inc
9
10SRC_URI[md5sum] = "05aeba2369b90fa63bac5e7425090f9d"
11SRC_URI[sha256sum] = "78aea5a34ccb6c9f1ff673a94cd3e66b0f669b7a042c2fcfdada85f0f399421c"
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 0000000000..1d163b6c98
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -0,0 +1,71 @@
1
2lib_LTLIBRARIES = libbz2.la
3
4libbz2_la_SOURCES = blocksort.c \
5 huffman.c \
6 crctable.c \
7 randtable.c \
8 compress.c \
9 decompress.c \
10 bzlib.c
11
12bin_PROGRAMS = bzip2 bzip2recover
13
14bzip2_SOURCES = bzip2.c
15bzip2_LDADD = libbz2.la
16bzip2_DEPENDENCIES = libbz2.la
17
18include_HEADERS = bzlib.h
19
20bzip2recover_SOURCES = bzip2recover.c
21bzip2recover_LDADD = libbz2.la
22bzip2recover_DEPENDENCIES = libbz2.la
23
24bin_SCRIPTS = bzgrep bzmore bzdiff
25
26man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
27EXTRA_DIST = $(man_MANS)
28
29runtest:
30 ./bzip2 -1 < sample1.ref > sample1.rb2
31 ./bzip2 -2 < sample2.ref > sample2.rb2
32 ./bzip2 -3 < sample3.ref > sample3.rb2
33 ./bzip2 -d < sample1.bz2 > sample1.tst
34 ./bzip2 -d < sample2.bz2 > sample2.tst
35 ./bzip2 -ds < sample3.bz2 > sample3.tst
36 @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
37 else echo "FAIL: sample1 compress"; fi
38 @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
39 else echo "FAIL: sample2 compress"; fi
40 @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
41 else echo "FAIL: sample3 compress"; fi
42 @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
43 else echo "FAIL: sample1 decompress"; fi
44 @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
45 else echo "FAIL: sample2 decompress"; fi
46 @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
47 else echo "FAIL: sample3 decompress"; fi
48
49install-ptest:
50 cp $(srcdir)/Makefile $(DESTDIR)/
51 cp $(srcdir)/sample1.ref $(DESTDIR)/
52 cp $(srcdir)/sample2.ref $(DESTDIR)/
53 cp $(srcdir)/sample3.ref $(DESTDIR)/
54 cp $(srcdir)/sample1.bz2 $(DESTDIR)/
55 cp $(srcdir)/sample2.bz2 $(DESTDIR)/
56 cp $(srcdir)/sample3.bz2 $(DESTDIR)/
57 ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2
58
59install-exec-hook:
60 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
61 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
62 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
63 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
64 ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
65 ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
66
67install-data-hook:
68 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
69 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
70 echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
71 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 0000000000..14b1d1809d
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -0,0 +1,14 @@
1AC_PREREQ([2.57])
2
3AC_INIT(bzip2, 2.0.5, , libXrender)
4AM_INIT_AUTOMAKE()
5AM_MAINTAINER_MODE
6
7#AM_CONFIG_HEADER(config.h)
8
9# Check for progs
10AC_PROG_CC
11AC_PROG_LIBTOOL
12
13AC_OUTPUT([Makefile])
14
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
new file mode 100644
index 0000000000..3b20fce1ee
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k runtest
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 0000000000..53aad3fd2a
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -0,0 +1,54 @@
1SUMMARY = "Very high-quality data compression program"
2DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
3Huffman coding. Compression is generally considerably better than that achieved by more conventional \
4LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
5HOMEPAGE = "http://www.bzip.org/"
6SECTION = "console/utils"
7LICENSE = "bzip2"
8LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
9PR = "r5"
10
11SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \
12 file://configure.ac \
13 file://run-ptest \
14 file://Makefile.am"
15
16SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
17SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
18
19PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev"
20
21CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
22
23inherit autotools update-alternatives ptest
24
25ALTERNATIVE_PRIORITY = "100"
26ALTERNATIVE_${PN} = "bunzip2 bzcat"
27
28#install binaries to bzip2-native under sysroot for replacement-native
29EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
30do_extraunpack () {
31 cp ${WORKDIR}/configure.ac ${S}/
32 cp ${WORKDIR}/Makefile.am ${S}/
33}
34
35addtask extraunpack after do_unpack before do_patch
36
37do_install_ptest () {
38 cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
39 sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
40}
41
42FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
43
44FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}"
45SECTION_libbz2-dev = "devel"
46RDEPENDS_libbz2-dev = "libbz2 (= ${EXTENDPKGV})"
47
48FILES_libbz2-staticdev = "${libdir}/*.a"
49SECTION_libbz2-staticdev = "devel"
50RDEPENDS_libbz2-staticdev = "libbz2-dev (= ${EXTENDPKGV})"
51
52PROVIDES_append_class-native = " bzip2-replacement-native"
53BBCLASSEXTEND = "native nativesdk"
54
diff --git a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
new file mode 100644
index 0000000000..7fd34aa05f
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -0,0 +1,43 @@
1require recipes-extended/chkconfig/chkconfig_1.3.58.bb
2
3SUMMARY = "${SUMMARY_chkconfig-alternatives}"
4DESCRIPTION = "${DESCRIPTION_chkconfig-alternatives}"
5DEPENDS = ""
6PROVIDES += "virtual/update-alternatives-native"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
8
9# The sysroot branch is 1.3.59 + some git commits from master + --sysroot
10# support for alternatives.
11SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot"
12S = "${WORKDIR}/git"
13
14SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee"
15PV = "1.3.59+${SRCPV}"
16
17inherit native
18
19# We want our native recipes to build using the target paths rather than paths
20# into the sysroot, as we may use them to construct the rootfs. As such, we
21# only adjust the paths to match the metadata for the target, not native.
22obey_variables () {
23 sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c
24}
25
26do_compile () {
27 oe_runmake alternatives
28}
29
30do_install () {
31 install -d ${D}${sysconfdir}/alternatives \
32 ${D}${localstatedir}/lib/alternatives
33
34 install -D -m 0755 alternatives ${D}${bindir}/alternatives
35 install -D -m 0644 alternatives.8 ${D}${mandir}/man8/alternatives.8
36
37 ln -s alternatives ${D}${bindir}/update-alternatives
38 ln -s alternatives.8 ${D}${mandir}/man8/update-alternatives.8
39}
40
41do_install_append_linuxstdbase() {
42 rm -rf ${D}${libdir}/lsb
43}
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 0000000000..d285c5047c
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -0,0 +1,63 @@
1SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy"
2DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \
3information for system services. Chkconfig manipulates the numerous \
4symbolic links in /etc/rc.d, to relieve system administrators of some \
5of the drudgery of manually editing the symbolic links."
6
7HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
8
9LICENSE = "GPLv2"
10LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
11
12DEPENDS = "libnewt popt"
13PROVIDES += "virtual/update-alternatives"
14
15PR = "r7"
16
17SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
18
19SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
20SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
21
22inherit gettext
23
24# Makefile uses RPM_OPT_FLAGS to construct CFLAGS
25#
26EXTRA_OEMAKE = "\
27 'RPM_OPT_FLAGS=${CFLAGS}' \
28 'LDFLAGS=${LDFLAGS}' \
29 'BINDIR=${base_sbindir}' \
30 'SBINDIR=${sbindir}' \
31 'MANDIR=${mandir}' \
32 'ALTDIR=${localstatedir}/lib/alternatives' \
33 'ALTDATADIR=${sysconfdir}/alternatives' \
34"
35
36do_unpack[postfuncs] += "obey_variables"
37do_unpack[vardeps] += "obey_variables"
38obey_variables () {
39 sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' leveldb.h
40 sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \
41 -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \
42 -e 's,/usr/share/locale,${datadir}/locale,' alternatives.c
43}
44
45do_install() {
46 oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \
47 'BINDIR=${sbindir}' install
48 install -d ${D}${sysconfdir}/chkconfig.d
49}
50
51PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
52SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands"
53DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \
54information about the symbolic links comprising the alternatives system."
55SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files"
56DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \
57This package contains documentation."
58RPROVIDES_${PN}-alternatives += "update-alternatives"
59RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg"
60FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \
61 ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives"
62FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \
63 ${mandir}/man8/update-alternatives.8"
diff --git a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
new file mode 100644
index 0000000000..b4d113d3a5
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
@@ -0,0 +1,20 @@
1ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4
5Upstream-Status: Pending
6Index: cpio-2.11/gnu/stdio.in.h
7===================================================================
8--- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700
9+++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700
10@@ -138,8 +138,10 @@
11 /* It is very rare that the developer ever has full control of stdin,
12 so any use of gets warrants an unconditional warning. Assume it is
13 always declared, since it is required by C89. */
14+#if defined gets
15 #undef gets
16 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
17+#endif
18
19 #if @GNULIB_FOPEN@
20 # if @REPLACE_FOPEN@
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 0000000000..a6b8e82a0b
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
@@ -0,0 +1,17 @@
1Avoid multiple stat definitions
2Patch taken from cpio mailing list posting 2010-03-19
3
4Upstream-Status: Pending
5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
9--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
10+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
11@@ -82,4 +82,6 @@
12 #define lstat stat
13 #endif
14 int lstat ();
15+#ifndef stat
16 int stat ();
17+#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 0000000000..49a7cf52a6
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
2
3This patch avoids heap overflow reported by :
4http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
5
6This is a clean patch for the GPLv2 tar recipe.
7
8the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio
9recipe, as they share code.
10
11Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
12
13Index: tar-1.17/lib/rtapelib.c
14===================================================================
15--- tar-1.17.orig/lib/rtapelib.c
16+++ tar-1.17/lib/rtapelib.c
17@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
18
19 sprintf (command_buffer, "R%lu\n", (unsigned long) length);
20 if (do_command (handle, command_buffer) == -1
21- || (status = get_status (handle)) == SAFE_READ_ERROR)
22+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
23 return SAFE_READ_ERROR;
24
25 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 0000000000..e16585dd3f
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
4# This is needed to configure correctly with newer versions of autoconf.
5
6diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
7--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700
8+++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700
9@@ -1,4 +1,4 @@
10-# serial 4 -*- Autoconf -*-
11+# serial 5 -*- Autoconf -*-
12 # Enable extensions on systems that normally disable them.
13
14 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
15@@ -16,6 +16,7 @@
16 # ------------------------
17 # Enable extensions on systems that normally disable them,
18 # typically due to standards-conformance issues.
19+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
20 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
21 [
22 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
23@@ -48,7 +49,7 @@
24 AC_DEFINE([__EXTENSIONS__])
25 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
26 AC_DEFINE([_TANDEM_SOURCE])
27-])
28+])])
29
30 # gl_USE_SYSTEM_EXTENSIONS
31 # ------------------------
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 0000000000..a00799fea9
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Avoid multiple stat definitions
4# Patch taken from cpio mailing list posting 2010-03-19
5
6diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
7--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800
8+++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700
9@@ -82,4 +82,6 @@
10 #define lstat stat
11 #endif
12 int lstat ();
13+#ifndef stat
14 int stat ();
15+#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 0000000000..5f88b30f1e
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -0,0 +1,12 @@
1include cpio_v2.inc
2
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
5
6PR = "r4"
7
8SRC_URI += "file://remove-gets.patch \
9 "
10
11SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
12SRC_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 0000000000..b6da207b92
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -0,0 +1,16 @@
1require cpio_v2.inc
2
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
5
6PR = "r3"
7
8SRC_URI += "file://m4extensions.patch \
9 file://avoid_heap_overflow.patch \
10 "
11
12SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
13SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
14
15# Required to build with gcc 4.3 and later:
16CFLAGS += "-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 0000000000..30446b0ced
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -0,0 +1,40 @@
1SUMMARY = "GNU cpio is a program to manage archives of files"
2DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
3another. It handles a number of cpio formats as well as reading and writing tar files."
4HOMEPAGE = "http://www.gnu.org/software/cpio/"
5SECTION = "base"
6
7DEPENDS = "texinfo-native"
8
9SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
10 file://statdef.patch \
11 "
12
13inherit autotools gettext
14
15S = "${WORKDIR}/cpio-${PV}"
16
17EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
18
19do_install () {
20 autotools_do_install
21 install -d ${D}${base_bindir}/
22 mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
23 rmdir ${D}${bindir}/
24}
25
26PACKAGES =+ "${PN}-rmt"
27
28FILES_${PN}-rmt = "${base_sbindir}/rmt*"
29
30inherit update-alternatives
31
32ALTERNATIVE_PRIORITY = "100"
33
34ALTERNATIVE_${PN} = "cpio"
35ALTERNATIVE_${PN}-rmt = "rmt"
36
37ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
38
39ALTERNATIVE_PRIORITY[rmt] = "50"
40ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
new file mode 100644
index 0000000000..8e0f40642a
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
@@ -0,0 +1,332 @@
1From dae29a98c066bc67bb5ba12219d5fd68a8675514 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 26 Apr 2013 20:44:10 +0800
4Subject: [PATCH] packlib.c: support dictionary byte-order dependent
5
6The previous dict files are NOT byte-order independent, in fact they are
7probably ARCHITECTURE SPECIFIC.
8Create the dict files in big endian, and convert to host endian while
9load them. This could fix the endian issue on multiple platform.
10
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12Upstream-Status: Pending
13
14We can't use the endian.h, htobe* and be*toh functions because they are
15not available on older versions of glibc, such as that found in RHEL
165.9.
17
18Change to checking endian and directly calling bswap_* as defined in
19byteswap.h.
20
21Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
22
23---
24 lib/packlib.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
25 1 file changed, 204 insertions(+), 4 deletions(-)
26
27Index: cracklib-2.8.22/lib/packlib.c
28===================================================================
29--- cracklib-2.8.22.orig/lib/packlib.c
30+++ cracklib-2.8.22/lib/packlib.c
31@@ -16,6 +16,12 @@
32 #ifdef HAVE_STDINT_H
33 #include <stdint.h>
34 #endif
35+
36+#ifndef _BSD_SOURCE
37+#define _BSD_SOURCE /* See feature_test_macros(7) */
38+#endif
39+#include <endian.h>
40+#include <byteswap.h>
41 #include "packer.h"
42
43 static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993";
44@@ -45,6 +51,182 @@ typedef struct
45 char data_get[NUMWORDS][MAXWORDLEN];
46 } PWDICT64;
47
48+enum{
49+ en_is32,
50+ en_is64
51+};
52+
53+static int
54+IheaderHostToBigEndian(char *pHeader, int nBitType)
55+{
56+ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
57+ {
58+ struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
59+
60+ pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
61+ pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
62+ pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
63+ pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
64+
65+#if DEBUG
66+ printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
67+ pHeader64->pih_magic, pHeader64->pih_numwords,
68+ pHeader64->pih_blocklen, pHeader64->pih_pad);
69+#endif
70+ }
71+ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
72+ {
73+ struct pi_header *pHeader32 = (struct pi_header*)pHeader;
74+
75+ pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
76+ pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
77+ pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
78+ pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
79+
80+#if DEBUG
81+ printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
82+ pHeader32->pih_magic, pHeader32->pih_numwords,
83+ pHeader32->pih_blocklen, pHeader32->pih_pad);
84+#endif
85+ }
86+ else if (__BYTE_ORDER == __LITTLE_ENDIAN)
87+ {
88+ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
89+ return (-1);
90+ }
91+
92+ return 0;
93+}
94+
95+static int
96+IheaderBigEndianToHost(char *pHeader, int nBitType)
97+{
98+ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
99+ {
100+ struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
101+
102+ pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
103+ pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
104+ pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
105+ pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
106+
107+#if DEBUG
108+ printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
109+ pHeader64->pih_magic, pHeader64->pih_numwords,
110+ pHeader64->pih_blocklen, pHeader64->pih_pad);
111+#endif
112+ }
113+ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
114+ {
115+ struct pi_header *pHeader32 = (struct pi_header*)pHeader;
116+
117+ pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
118+ pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
119+ pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
120+ pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
121+
122+#if DEBUG
123+ printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
124+ pHeader32->pih_magic, pHeader32->pih_numwords,
125+ pHeader32->pih_blocklen, pHeader32->pih_pad);
126+#endif
127+ }
128+ else if (__BYTE_ORDER == __LITTLE_ENDIAN)
129+ {
130+ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
131+ return (-1);
132+ }
133+
134+ return 0;
135+}
136+
137+static int
138+HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType)
139+{
140+ int i = 0;
141+
142+ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
143+ {
144+ uint64_t *pHwms64 = (uint64_t*)pHwms;
145+
146+ for (i = 0; i < nLen / sizeof(uint64_t); i++)
147+ {
148+ *pHwms64++ = bswap_64(*pHwms64);
149+ }
150+
151+ }
152+ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
153+ {
154+ uint32_t *pHwms32 = (uint32_t*)pHwms;
155+
156+ for (i = 0; i < nLen / sizeof(uint32_t); i++)
157+ {
158+ *pHwms32++ = bswap_32(*pHwms32);
159+ }
160+
161+ }
162+ else if (__BYTE_ORDER == __LITTLE_ENDIAN)
163+ {
164+ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
165+ return (-1);
166+ }
167+
168+#if DEBUG
169+ for (i = 0; i < nLen; i+=8)
170+ {
171+ printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
172+ nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
173+ pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
174+ pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
175+ }
176+#endif
177+
178+ return 0;
179+}
180+
181+static int
182+HwmsBigEndianToHost(char *pHwms, int nLen, int nBitType)
183+{
184+ int i = 0;
185+
186+ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
187+ {
188+ uint64_t *pHwms64 = (uint64_t*)pHwms;
189+
190+ for (i = 0; i < nLen / sizeof(uint64_t); i++)
191+ {
192+ *pHwms64++ = bswap_64(*pHwms64);
193+ }
194+
195+ }
196+ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
197+ {
198+ uint32_t *pHwms32 = (uint32_t*)pHwms;
199+
200+ for (i = 0; i < nLen / sizeof(uint32_t); i++)
201+ {
202+ *pHwms32++ = bswap_32(*pHwms32);
203+ }
204+
205+ }
206+ else if (__BYTE_ORDER == __LITTLE_ENDIAN)
207+ {
208+ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
209+ return (-1);
210+ }
211+
212+#if DEBUG
213+ for (i = 0; i < nLen; i+=8)
214+ {
215+ printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
216+ nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
217+ pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
218+ pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
219+ }
220+#endif
221+
222+ return 0;
223+}
224
225 static int
226 _PWIsBroken64(FILE *ifp)
227@@ -57,6 +239,7 @@ _PWIsBroken64(FILE *ifp)
228 return 0;
229 }
230
231+ IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
232 return (pdesc64.header.pih_magic == PIH_MAGIC);
233 }
234
235@@ -149,7 +332,11 @@ PWOpen(prefix, mode)
236 pdesc.header.pih_blocklen = NUMWORDS;
237 pdesc.header.pih_numwords = 0;
238
239- fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp);
240+ struct pi_header tmpheader32;
241+
242+ memcpy(&tmpheader32, &pdesc.header, sizeof(pdesc.header));
243+ IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
244+ fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, ifp);
245 } else
246 {
247 pdesc.flags &= ~PFOR_WRITE;
248@@ -173,6 +360,7 @@ PWOpen(prefix, mode)
249 return ((PWDICT *) 0);
250 }
251
252+ IheaderBigEndianToHost((char *) &pdesc.header, en_is32);
253 if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0))
254 {
255 /* uh-oh. either a broken "64-bit" file or a garbage file. */
256@@ -195,6 +383,7 @@ PWOpen(prefix, mode)
257 }
258 return ((PWDICT *) 0);
259 }
260+ IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
261 if (pdesc64.header.pih_magic != PIH_MAGIC)
262 {
263 /* nope, not "64-bit" after all */
264@@ -290,6 +479,7 @@ PWOpen(prefix, mode)
265 {
266 pdesc.flags &= ~PFOR_USEHWMS;
267 }
268+ HwmsBigEndianToHost((char*)pdesc64.hwms, sizeof(pdesc64.hwms), en_is64);
269 for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++)
270 {
271 pdesc.hwms[i] = pdesc64.hwms[i];
272@@ -299,6 +489,7 @@ PWOpen(prefix, mode)
273 {
274 pdesc.flags &= ~PFOR_USEHWMS;
275 }
276+ HwmsBigEndianToHost((char*)pdesc.hwms, sizeof(pdesc.hwms), en_is32);
277 #if DEBUG
278 for (i=1; i<=0xff; i++)
279 {
280@@ -332,7 +523,11 @@ PWClose(pwp)
281 return (-1);
282 }
283
284- if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
285+ struct pi_header tmpheader32;
286+
287+ memcpy(&tmpheader32, &pwp->header, sizeof(pwp->header));
288+ IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
289+ if (!fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, pwp->ifp))
290 {
291 fprintf(stderr, "index magic fwrite failed\n");
292 return (-1);
293@@ -351,7 +546,12 @@ PWClose(pwp)
294 printf("hwm[%02x] = %d\n", i, pwp->hwms[i]);
295 #endif
296 }
297- fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp);
298+
299+ PWDICT tmp_pwp;
300+
301+ memcpy(&tmp_pwp, pwp, sizeof(PWDICT));
302+ HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32);
303+ fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp);
304 }
305 }
306
307@@ -405,7 +605,8 @@ PutPW(pwp, string)
308
309 datum = (uint32_t) ftell(pwp->dfp);
310
311- fwrite((char *) &datum, sizeof(datum), 1, pwp->ifp);
312+ uint32_t tmpdatum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
313+ fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp);
314
315 fputs(pwp->data_put[0], pwp->dfp);
316 putc(0, pwp->dfp);
317@@ -473,6 +674,7 @@ GetPW(pwp, number)
318 perror("(index fread failed)");
319 return ((char *) 0);
320 }
321+ datum64 = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_64(datum64) : datum64;
322 datum = datum64;
323 } else {
324 if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0))
325@@ -486,6 +688,7 @@ GetPW(pwp, number)
326 perror("(index fread failed)");
327 return ((char *) 0);
328 }
329+ datum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
330 }
331
332 int r = 1;
diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
new file mode 100644
index 0000000000..6210e82121
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
@@ -0,0 +1,53 @@
1From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sat, 27 Apr 2013 16:02:30 +0800
4Subject: [PATCH] craklib:fix testnum and teststr failed
5
6Error log:
7...
8$ ./testnum
9(null).pwd.gz: No such file or directory
10PWOpen: No such file or directory
11
12$ ./util/teststr
13(null).pwd.gz: No such file or directory
14PWOpen: No such file or directory
15...
16Set DEFAULT_CRACKLIB_DICT as the path of PWOpen
17
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19Upstream-Status: Pending
20---
21 util/testnum.c | 2 +-
22 util/teststr.c | 2 +-
23 2 files changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/util/testnum.c b/util/testnum.c
26index ae2246d..ca210ff 100644
27--- a/util/testnum.c
28+++ b/util/testnum.c
29@@ -20,7 +20,7 @@ main ()
30 PWDICT *pwp;
31 char buffer[STRINGSIZE];
32
33- if (!(pwp = PWOpen (NULL, "r")))
34+ if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
35 {
36 perror ("PWOpen");
37 return (-1);
38diff --git a/util/teststr.c b/util/teststr.c
39index 2a31fa4..9fb9cda 100644
40--- a/util/teststr.c
41+++ b/util/teststr.c
42@@ -15,7 +15,7 @@ main ()
43 PWDICT *pwp;
44 char buffer[STRINGSIZE];
45
46- if (!(pwp = PWOpen (NULL, "r")))
47+ if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
48 {
49 perror ("PWOpen");
50 return (-1);
51--
521.7.10.4
53
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.1.bb b/meta/recipes-extended/cracklib/cracklib_2.9.1.bb
new file mode 100644
index 0000000000..d70e76f43f
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib_2.9.1.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Password strength checker library"
2HOMEPAGE = "http://sourceforge.net/projects/cracklib"
3
4LICENSE = "LGPLv2.1+"
5LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
6
7DEPENDS = "cracklib-native zlib"
8DEPENDS_class-native = "zlib-native"
9
10EXTRA_OECONF = "--without-python --libdir=${base_libdir}"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
13 file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
14 file://0002-craklib-fix-testnum-and-teststr-failed.patch"
15
16SRC_URI[md5sum] = "90536219c520add2ceb3c26f0d7da404"
17SRC_URI[sha256sum] = "408905c2539a97dc8cbbb6d7cd2046cb5647a345b4bda399220d9471be16d156"
18
19inherit autotools-brokensep gettext
20
21BBCLASSEXTEND = "native"
22
23do_install_append_class-target() {
24 create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
25}
diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init
new file mode 100755
index 0000000000..53b8514caa
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond.init
@@ -0,0 +1,58 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: crond crontab
4# Default-Start: 2345
5# Default-Stop: 016
6# Short-Description: run cron daemon
7# Description: cron is a standard UNIX program that runs user-specified
8# programs at periodic scheduled times. vixie cron adds a
9# number of features to the basic UNIX cron, including better
10# security and more powerful configuration options.
11### END INIT INFO
12
13CROND=/usr/sbin/crond
14CONFIG=/etc/sysconfig/crond
15
16[ -f $CONFIG ] || exit 1
17[ -x $CROND ] || exit 1
18
19. $CONFIG
20
21# Source function library.
22. /etc/init.d/functions
23
24case "$1" in
25 start)
26 echo -n "Starting crond: "
27 start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
28 RETVAL=$?
29 if [ $RETVAL -eq 0 ] ; then
30 echo "OK"
31 else
32 echo "FAIL"
33 fi
34 ;;
35 stop)
36 echo -n "Stopping crond: "
37 start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
38 RETVAL=$?
39 if [ $RETVAL -eq 0 ] ; then
40 echo "OK"
41 else
42 echo "FAIL"
43 fi
44 ;;
45 status)
46 status crond
47 exit $?
48 ;;
49 restart)
50 $0 stop && sleep 1 && $0 start
51 ;;
52 *)
53 echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
54 exit 1
55esac
56
57exit 0
58
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 0000000000..675872c3cf
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -0,0 +1,19 @@
1password-auth is the Fedora's common pam configure file, use oe common pam
2configure files instead.
3
4Upstream-Status: Pending
5
6Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
7--- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800
8+++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800
9@@ -4,7 +4,7 @@
10 #
11 # No PAM authentication called, auth modules not needed
12 account required pam_access.so
13-account include password-auth
14+account include common-account
15 session required pam_loginuid.so
16-session include password-auth
17-auth include password-auth
18+session include common-session-noninteractive
19+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 0000000000..cc9169eda9
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crontab
@@ -0,0 +1,10 @@
1# /etc/crontab: system-wide crontab
2# Unlike any other crontab you don't have to run the `crontab'
3# command to install the new version when you edit this file
4# and files in /etc/cron.d. These files also have username fields,
5# that none of the other crontabs do.
6
7SHELL=/bin/sh
8PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
9
10# m h dom mon dow user command
diff --git a/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
new file mode 100644
index 0000000000..7384a0bad4
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch
@@ -0,0 +1,31 @@
1For an out of tree build, the cronie-common.h file was not being
2found correctly, so point it to the top_srcdir
3
4Upstream-Status: Submitted
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7
8Index: cronie-1.4.11/anacron/Makefile.am
9===================================================================
10--- cronie-1.4.11.orig/anacron/Makefile.am
11+++ cronie-1.4.11/anacron/Makefile.am
12@@ -9,6 +9,7 @@ common_nodist = anacron-paths.h
13 nodist_anacron_SOURCES = $(common_nodist)
14 BUILT_SOURCES = $(common_nodist)
15
16+AM_CFLAGS = -I$(top_srcdir)
17
18 LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
19
20Index: cronie-1.4.11/src/Makefile.am
21===================================================================
22--- cronie-1.4.11.orig/src/Makefile.am
23+++ cronie-1.4.11/src/Makefile.am
24@@ -15,6 +15,7 @@ nodist_crond_SOURCES = $(common_nodist)
25 nodist_crontab_SOURCES = $(common_nodist)
26 BUILT_SOURCES = $(common_nodist)
27
28+AM_CFLAGS = -I$(top_srcdir)
29
30 LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
31
diff --git a/meta/recipes-extended/cronie/cronie_1.4.11.bb b/meta/recipes-extended/cronie/cronie_1.4.11.bb
new file mode 100644
index 0000000000..d98d0d9167
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie_1.4.11.bb
@@ -0,0 +1,75 @@
1SUMMARY = "Cron daemon for executing programs at set times"
2DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
3specified programs at scheduled times and related tools. It is based on the \
4original cron and has security and configuration enhancements like the \
5ability to use pam and SELinux."
6HOMEPAGE = "https://fedorahosted.org/cronie/"
7BUGTRACKER = "mmaslano@redhat.com"
8
9# Internet Systems Consortium License
10LICENSE = "ISC & BSD"
11LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \
12 file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
13 file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
14
15SECTION = "utils"
16
17
18SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
19 file://fix-out-of-tree-build.patch \
20 file://crond.init \
21 file://crontab \
22 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
23
24PAM_SRC_URI = "file://crond_pam_config.patch"
25PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
26
27SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f"
28SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be"
29
30inherit autotools update-rc.d useradd
31
32
33PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
34
35PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
36PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
37
38
39INITSCRIPT_NAME = "crond"
40INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
41
42USERADD_PACKAGES = "${PN}"
43GROUPADD_PARAM_${PN} = "--system crontab"
44
45do_install_append () {
46 install -d ${D}${sysconfdir}/sysconfig/
47 install -d ${D}${sysconfdir}/init.d/
48 install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
49 install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
50
51 # below are necessary for a complete cron environment
52 install -d ${D}${localstatedir}/spool/cron
53 install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
54 mkdir -p ${D}${sysconfdir}/cron.d
55 mkdir -p ${D}${sysconfdir}/cron.hourly
56 mkdir -p ${D}${sysconfdir}/cron.daily
57 mkdir -p ${D}${sysconfdir}/cron.weekly
58 mkdir -p ${D}${sysconfdir}/cron.monthly
59 touch ${D}${sysconfdir}/cron.deny
60
61 # below setting is necessary to allow normal user using crontab
62
63 # setgid for crontab binary
64 chown root:crontab ${D}${bindir}/crontab
65 chmod 2755 ${D}${bindir}/crontab
66
67 # allow 'crontab' group write to /var/spool/cron
68 chown root:crontab ${D}${localstatedir}/spool/cron
69 chmod 770 ${D}${localstatedir}/spool/cron
70
71 chmod 600 ${D}${sysconfdir}/crontab
72}
73
74FILES_${PN} += "${sysconfdir}/cron*"
75
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
new file mode 100644
index 0000000000..e4771f7c80
--- /dev/null
+++ b/meta/recipes-extended/cups/cups.inc
@@ -0,0 +1,113 @@
1SUMMARY = "An Internet printing system for Unix"
2SECTION = "console/utils"
3LICENSE = "GPLv2 & LGPLv2"
4DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
5PROVIDES = "cups14"
6
7SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
8 file://use_echo_only_in_init.patch \
9 file://0001-don-t-try-to-run-generated-binaries.patch \
10 file://cups_serverbin.patch \
11 "
12
13LEAD_SONAME = "libcupsdriver.so"
14
15inherit autotools-brokensep binconfig
16
17PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
18 ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
19PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
20PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
21PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
22
23EXTRA_OECONF = " \
24 --enable-gnutls \
25 --enable-dbus \
26 --enable-browsing \
27 --disable-openssl \
28 --disable-gssapi \
29 --enable-debug \
30 --disable-relro \
31 --enable-libusb \
32 --without-php \
33 --without-perl \
34 --without-python \
35 --without-java \
36 "
37
38
39do_configure() {
40 gnu-configize
41 libtoolize --force
42 DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf
43}
44
45do_compile () {
46 sed -i s:STRIP:NOSTRIP: Makedefs
47 sed -i s:serial:: backend/Makefile
48
49 echo "all:" > man/Makefile
50 echo "libs:" >> man/Makefile
51 echo "install:" >> man/Makefile
52 echo "install-data:" >> man/Makefile
53 echo "install-exec:" >> man/Makefile
54 echo "install-headers:" >> man/Makefile
55 echo "install-libs:" >> man/Makefile
56
57 oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \
58 "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \
59 "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \
60 "LIBZ=-lz -L${STAGING_LIBDIR}" \
61 "-I."
62}
63
64fakeroot do_install () {
65 oe_runmake "DSTROOT=${D}" install
66
67 # Remove /var/run from package as cupsd will populate it on startup
68 rm -fr ${D}/${localstatedir}/run
69 rmdir ${D}/${libdir}/${BPN}/driver
70}
71
72python do_package_append() {
73 import subprocess
74 # Change permissions back the way they were, they probably had a reason...
75 workdir = d.getVar('WORKDIR', True)
76 subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
77}
78
79PACKAGES =+ "${PN}-lib ${PN}-libimage"
80
81FILES_${PN} += "${libdir}/cups/backend \
82 ${libdir}/cups/cgi-bin \
83 ${libdir}/cups/filter \
84 ${libdir}/cups/monitor \
85 ${libdir}/cups/notifier \
86 ${libdir}/cups/daemon \
87 "
88
89FILES_${PN}-lib = "${libdir}/libcups.so.*"
90
91FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
92
93FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
94 ${libdir}/cups/cgi-bin/.debug \
95 ${libdir}/cups/filter/.debug \
96 ${libdir}/cups/monitor/.debug \
97 ${libdir}/cups/notifier/.debug \
98 ${libdir}/cups/daemon/.debug \
99 "
100
101#package the html for the webgui inside the main packages (~1MB uncompressed)
102
103FILES_${PN} += "${datadir}/doc/cups/images \
104 ${datadir}/doc/cups/*html \
105 ${datadir}/doc/cups/*.css \
106 ${datadir}/icons/ \
107 "
108CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
109
110SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
111cups_sysroot_preprocess () {
112 sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
113}
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 0000000000..e6544b5607
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,70 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
4From: Koen Kooi <koen@dominion.thruhere.net>
5Date: Sun, 30 Jan 2011 16:37:27 +0100
6Subject: [PATCH] don't try to run generated binaries
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 ppdc/Makefile | 30 +++++++++++++++---------------
11 1 files changed, 15 insertions(+), 15 deletions(-)
12
13diff --git a/ppdc/Makefile b/ppdc/Makefile
14index 0288d47..fc87f1b 100644
15--- a/ppdc/Makefile
16+++ b/ppdc/Makefile
17@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \
18 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
19 libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \
20 $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
21- echo Generating localization strings...
22- ./genstrings >sample.c
23+# echo Generating localization strings...
24+# ./genstrings >sample.c
25
26
27 #
28@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po
29 $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
30 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
31 $(COMMONLIBS) $(LIBZ)
32- echo Testing PPD compiler...
33- ./ppdc-static -l en,fr -I ../data foo.drv
34- ./ppdc-static -l en,fr -z -I ../data foo.drv
35+# echo Testing PPD compiler...
36+# ./ppdc-static -l en,fr -I ../data foo.drv
37+# ./ppdc-static -l en,fr -z -I ../data foo.drv
38
39
40 #
41@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a
42 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
43 $(COMMONLIBS) $(LIBZ)
44 echo Testing PPD importer...
45- $(RM) -r ppd ppd2 sample-import.drv
46- ./ppdc-static -I ../data sample.drv
47- ./ppdi-static -I ../data -o sample-import.drv ppd/*
48- ./ppdc-static -I ../data -d ppd2 sample-import.drv
49- if diff -r ppd ppd2 >/dev/null; then \
50- echo PPD import OK; \
51- else \
52- echo PPD import FAILED; \
53- exit 1; \
54- fi
55+# $(RM) -r ppd ppd2 sample-import.drv
56+# ./ppdc-static -I ../data sample.drv
57+# ./ppdi-static -I ../data -o sample-import.drv ppd/*
58+# ./ppdc-static -I ../data -d ppd2 sample-import.drv
59+# if diff -r ppd ppd2 >/dev/null; then \
60+# echo PPD import OK; \
61+# else \
62+# echo PPD import FAILED; \
63+# exit 1; \
64+# fi
65
66
67 #
68--
691.6.6.1
70
diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch
new file mode 100644
index 0000000000..f7b44a7bc1
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups_serverbin.patch
@@ -0,0 +1,32 @@
1Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
2e.g. ppc64 where base libdir is lib64 this does not go well
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Inappropriate [OE config specific]
6
7Index: cups-1.4.6/config-scripts/cups-directories.m4
8===================================================================
9--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700
10+++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700
11@@ -397,7 +397,7 @@
12 *)
13 # All others
14 INSTALL_SYSV="install-sysv"
15- CUPS_SERVERBIN="$exec_prefix/lib/cups"
16+ CUPS_SERVERBIN="$libdir/cups"
17 ;;
18 esac
19
20Index: cups-1.4.6/configure
21===================================================================
22--- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700
23+++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700
24@@ -11181,7 +11181,7 @@
25 *)
26 # All others
27 INSTALL_SYSV="install-sysv"
28- CUPS_SERVERBIN="$exec_prefix/lib/cups"
29+ CUPS_SERVERBIN="$libdir/cups"
30 ;;
31 esac
32
diff --git a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
new file mode 100644
index 0000000000..696f1374d9
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: cups-1.6.1/scheduler/cups.sh.in
4===================================================================
5--- cups-1.6.1.orig/scheduler/cups.sh.in
6+++ cups-1.6.1/scheduler/cups.sh.in
7@@ -67,7 +67,7 @@ case "`uname`" in
8 ECHO_ERROR=:
9 ;;
10
11- Linux*)
12+ DisableLinux*)
13 IS_ON=/bin/true
14 if test -f /etc/init.d/functions; then
15 . /etc/init.d/functions
diff --git a/meta/recipes-extended/cups/cups_1.7.1.bb b/meta/recipes-extended/cups/cups_1.7.1.bb
new file mode 100644
index 0000000000..9854a4ddca
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_1.7.1.bb
@@ -0,0 +1,6 @@
1require cups.inc
2
3LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d"
4
5SRC_URI[md5sum] = "55277c40fd4b7183dc3671d39c5c42b7"
6SRC_URI[sha256sum] = "f52bec893d9daf92b6029be79c07e6c516b4c85ffae3e6e01885cc85e9081681"
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
new file mode 100644
index 0000000000..ee4b8900bb
--- /dev/null
+++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
@@ -0,0 +1,17 @@
1SUMMARY = "Collection of autoconf m4 macros"
2SECTION = "base"
3HOMEPAGE = "http://cwautomacros.berlios.de/"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
6
7SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2"
8
9
10SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
11SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
12
13do_install() {
14 oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
15}
16
17BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..cc05d1dc06
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
@@ -0,0 +1,27 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.ac:90: error: automatic de-ANSI-fication support has been removed
8| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
9| /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from...
10| configure.ac:90: the top level
11| autom4te: m4 failed with exit status: 1
12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
142012/05/04
15
16Index: diffutils-2.8.1/m4/prereq.m4
17===================================================================
18--- diffutils-2.8.1.orig/m4/prereq.m4
19+++ diffutils-2.8.1/m4/prereq.m4
20@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG],
21 AC_HEADER_STDC
22 AC_C_BACKSLASH_A
23 AC_MBSTATE_T
24- AM_C_PROTOTYPES
25 ])
26
27 AC_DEFUN([jm_PREREQ_REGEX],
diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest
new file mode 100644
index 0000000000..695c5e8a7b
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -C tests check-TESTS
diff --git a/meta/recipes-extended/diffutils/diffutils.inc b/meta/recipes-extended/diffutils/diffutils.inc
new file mode 100644
index 0000000000..613b538557
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils.inc
@@ -0,0 +1,18 @@
1SUMMARY = "Diffutils contains tools used for finding differences between files"
2DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
3sdiff, and cmp utilities. These programs are usually \
4used for creating patch files."
5SECTION = "base"
6
7inherit autotools update-alternatives gettext
8
9# diffutils assumes non-glibc compilation with uclibc and
10# this causes it to generate its own implementations of
11# standard functionality. regex.c actually breaks compilation
12# because it uses __mempcpy, there are other things (TBD:
13# see diffutils.mk in buildroot)
14EXTRA_OECONF_libc-uclibc = "--without-included-regex"
15
16ALTERNATIVE_${PN} = "diff cmp"
17ALTERNATIVE_PRIORITY = "100"
18
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 0000000000..bf425bbb35
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
@@ -0,0 +1,16 @@
1LICENSE = "GPLv2+"
2LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
3
4require diffutils.inc
5
6PR = "r7.0"
7
8SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \
9 file://diffutils_fix_for_automake-1.12.patch"
10
11SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
12SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
13
14do_configure_prepend () {
15 chmod u+w ${S}/po/Makefile.in.in
16}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb
new file mode 100644
index 0000000000..a467f20aa4
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb
@@ -0,0 +1,34 @@
1LICENSE = "GPLv3+"
2LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
3
4require diffutils.inc
5
6SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
7 file://run-ptest \
8"
9
10do_configure_prepend () {
11 # Need to remove gettext macros with weird mix of versions
12 for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
13 rm -f ${S}/m4/$i
14 done
15}
16
17SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3"
18SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c"
19
20inherit ptest
21
22do_install_ptest() {
23 t=${D}${PTEST_PATH}
24 install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
25 cp -r ${S}/tests $t/
26 install ${B}/tests/Makefile $t/tests/
27 sed -e 's|^Makefile:|_Makefile:|' \
28 -e 's|bash|sh|' \
29 -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
30 -e 's|^srcdir = \(.*\)|srcdir = .|' \
31 -e 's|"`$(built_programs)`"|diff|' \
32 -e 's|gawk|awk|g' \
33 -i $t/tests/Makefile
34}
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 0000000000..a696c0c8fb
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_0.5.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Line-oriented text editor"
2HOMEPAGE = "http://www.gnu.org/software/ed/"
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
6 file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
7
8PR = "r2"
9SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/ed/ed-${PV}.tar.bz2"
10
11SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
12SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
13
14inherit autotools
15
16EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
17
18CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
19CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
20
21
diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb
new file mode 100644
index 0000000000..d1621548dc
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_1.9.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Line-oriented text editor"
2HOMEPAGE = "http://www.gnu.org/software/ed/"
3
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
6 file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \
7 file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96"
8
9SECTION = "base"
10
11# LSB states that ed should be in /bin/
12bindir = "${base_bindir}"
13
14SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz"
15
16SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d"
17SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88"
18
19do_configure() {
20 ${S}/configure
21}
22
23do_install() {
24 oe_runmake 'DESTDIR=${D}' install
25 # Info dir listing isn't interesting at this point so remove it if it exists.
26 if [ -e "${D}${infodir}/dir" ]; then
27 rm -f ${D}${infodir}/dir
28 fi
29}
diff --git a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
new file mode 100644
index 0000000000..ba3c8aac0c
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -0,0 +1,18 @@
1ptest needs buildtest-TESTS and runtest-TESTS targets.
2serial-tests is required to generate those targets.
3
4Signed-off-by: Alexandra Safta <alexandra.safta@enea.com>
5Upstream-Status: Pending
6
7 diff -ruN a/configure.ac b/configure.ac
8--- a/configure.ac 2014-05-26 17:52:40.184221302 +0200
9+++ b/configure.ac 2014-05-26 17:53:04.099222334 +0200
10@@ -2,7 +2,7 @@
11 AC_INIT(ethtool, 3.13, netdev@vger.kernel.org)
12 AC_PREREQ(2.52)
13 AC_CONFIG_SRCDIR([ethtool.c])
14-AM_INIT_AUTOMAKE([gnu])
15+AM_INIT_AUTOMAKE([gnu serial-tests])
16 AC_CONFIG_HEADERS([ethtool-config.h])
17
18 AM_MAINTAINER_MODE
diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest b/meta/recipes-extended/ethtool/ethtool/run-ptest
new file mode 100644
index 0000000000..1e245da112
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -k runtest-TESTS
diff --git a/meta/recipes-extended/ethtool/ethtool_3.13.bb b/meta/recipes-extended/ethtool/ethtool_3.13.bb
new file mode 100644
index 0000000000..6abaae90b9
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool_3.13.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Display or change ethernet card settings"
2DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
3HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
4SECTION = "console/network"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
8
9SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
10 file://run-ptest \
11 file://avoid_parallel_tests.patch \
12 "
13
14SRC_URI[md5sum] = "0c0c0558a403b478cd3f65dadc00470d"
15SRC_URI[sha256sum] = "68f6b6c9417e8ff3d3b5a8bc22fc4fe8846176ee7d7636e365ce6a2e7b1e44e9"
16
17inherit autotools ptest
18RDEPENDS_${PN}-ptest += "make"
19
20do_compile_ptest() {
21 oe_runmake test-cmdline test-features
22}
23
24do_install_ptest () {
25 cp ${B}/Makefile ${D}${PTEST_PATH}
26 install ${B}/test-cmdline ${D}${PTEST_PATH}
27 install ${B}/test-features ${D}${PTEST_PATH}
28 install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
29 sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
30}
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
new file mode 100644
index 0000000000..2076e44097
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
@@ -0,0 +1,53 @@
1From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Tue, 17 Sep 2013 16:11:16 +0800
4Subject: [PATCH] findutils: fix doc build error
5
6Upstream-Status: Backport
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 doc/find.texi | 6 +++---
11 1 files changed, 3 insertions(+), 3 deletions(-)
12
13diff --git a/doc/find.texi b/doc/find.texi
14index 5b5f0cf..b3d9c6b 100644
15--- a/doc/find.texi
16+++ b/doc/find.texi
17@@ -63,7 +63,7 @@ translation approved by the Foundation.
18
19 @page
20 @vskip 0pt plus 1filll
21-@insertcopying{}
22+@insertcopying
23 @end titlepage
24
25 @contents
26@@ -1466,6 +1466,7 @@ no output is ever sent to it.
27 * Escapes::
28 * Format Directives::
29 * Time Formats::
30+* Formatting Flags::
31 @end menu
32
33 @node Escapes
34@@ -1534,7 +1535,6 @@ from the novel you are reading.
35 * Size Directives::
36 * Location Directives::
37 * Time Directives::
38-* Formatting Flags::
39 @end menu
40
41 @node Name Directives
42@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension.
43 @end table
44
45 @node Formatting Flags
46-@subsubsection Formatting Flags
47+@subsection Formatting Flags
48
49 The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
50 and @samp{+} flags, but the other directives do not, even if they
51--
521.7.4.1
53
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..2d0ddb43f5
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.in:75: error: automatic de-ANSI-fication support has been removed
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/04
11
12Index: findutils-4.2.31/configure.in
13===================================================================
14--- findutils-4.2.31.orig/configure.in
15+++ findutils-4.2.31/configure.in
16@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway.
17
18
19 AC_ISC_POSIX
20-AM_C_PROTOTYPES
21
22 AC_PROG_INSTALL
23 AC_PROG_RANLIB
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 0000000000..65bd64277c
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Inappropriate [legacy version]
2
3the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
4
5against 4.2.31
607/08/2010 - qhe
7
8diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
9index 143a9e5..0f27ceb 100644
10--- a/gnulib/m4/extensions.m4
11+++ b/gnulib/m4/extensions.m4
12@@ -12,44 +12,6 @@
13 # enough in this area it's likely we'll need to redefine
14 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
15
16-# AC_USE_SYSTEM_EXTENSIONS
17-# ------------------------
18-# Enable extensions on systems that normally disable them,
19-# typically due to standards-conformance issues.
20-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
21-[
22- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
23- AC_BEFORE([$0], [AC_RUN_IFELSE])
24-
25- AC_REQUIRE([AC_GNU_SOURCE])
26- AC_REQUIRE([AC_AIX])
27- AC_REQUIRE([AC_MINIX])
28-
29- AH_VERBATIM([__EXTENSIONS__],
30-[/* Enable extensions on Solaris. */
31-#ifndef __EXTENSIONS__
32-# undef __EXTENSIONS__
33-#endif
34-#ifndef _POSIX_PTHREAD_SEMANTICS
35-# undef _POSIX_PTHREAD_SEMANTICS
36-#endif
37-#ifndef _TANDEM_SOURCE
38-# undef _TANDEM_SOURCE
39-#endif])
40- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
41- [ac_cv_safe_to_define___extensions__],
42- [AC_COMPILE_IFELSE(
43- [AC_LANG_PROGRAM([
44-# define __EXTENSIONS__ 1
45- AC_INCLUDES_DEFAULT])],
46- [ac_cv_safe_to_define___extensions__=yes],
47- [ac_cv_safe_to_define___extensions__=no])])
48- test $ac_cv_safe_to_define___extensions__ = yes &&
49- AC_DEFINE([__EXTENSIONS__])
50- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
51- AC_DEFINE([_TANDEM_SOURCE])
52-])
53-
54 # gl_USE_SYSTEM_EXTENSIONS
55 # ------------------------
56 # 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 0000000000..69c1486cf7
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch
@@ -0,0 +1,781 @@
1Upstream-Status: Backport
2
3commit af974034b68bf59337c7a384e488a518a77dfecd
4Author: James Youngman <jay@gnu.org>
5Date: Sat Jul 11 19:55:27 2009 +0100
6
7 Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump.
8
9 Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
10 coredumps.
11 * find/tree.c (set_new_parent): Initialise struct
12 predicate->arg_text to NULL (instead of leaving it uninitialised).
13 (get_new_pred_noarg): Likewise.
14 (get_new_pred): Initialise predicate->arg_text to
15 "ThisShouldBeSetToSomethingElse" to make it easier to notice
16 bugs.
17 (get_new_pred_chk_op): Use get_new_pred_noarg.
18 (print_predicate): Use an if statement instead of
19 two ternary operators.
20 * find/util.c (insert_primary_withpred): Accept new argument, arg,
21 being the argument (if any) of this predicate. Pass it to
22 get_new_pred_chk_op.
23 (insert_primary): Likewise (pass arg to insert_primary_withpred).
24 (insert_primary_noarg): New function; calls insert_primary with
25 arg=NULL.
26 * find/parser.c (collect_arg_stat_info): Add an output parameter;
27 the filename from which we collected the stat information.
28 (parse_closeparen, parse_delete, parse_and, parse_or,
29 parse_comma): Use get_new_pred_noarg.
30 (parse_cnewer, parse_newer, parse_anewer): Use new
31 collect_arg_stat_info and insert_primary interface.
32 (parse_print, parse_prune, parse_nouser, parse_empty): Use
33 insert_primary_noarg.
34 (parse_accesscheck, parse_false): Use insert_primary_noarg.
35 (parse_used, parse_iname, parse_fprint, insert_fprint,
36 parse_fstype, parse_ilname): Use new collect_arg and
37 insert_primary interfaces.
38 (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
39 parse_perm, parse_size, parse_user, parse_time): Use new
40 collect_arg and insert_primary_withpred interface.
41 (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
42 (parse_newerXY, parse_nogroup): Use new insert_primary interface.
43 (insert_regex, parse_samefile): Use new insert_primary_withpred
44 interface.
45 (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
46 new insert_primary_withpred interface.
47 * find/defs.h (struct predicate.arg_text): make const.
48 Add declarations for new function get_new_pred_noarg and
49 insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
50 and insert_primary_withpred.
51
52diff --git a/ChangeLog b/ChangeLog
53index 6e346b8..e8ba0f8 100644
54--- a/ChangeLog
55+++ b/ChangeLog
56@@ -1,0 +1,45 @@
57+2009-07-11 James Youngman <jay@gnu.org>
58+
59+ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
60+ coredumps.
61+ * find/tree.c (set_new_parent): Initialise struct
62+ predicate->arg_text to NULL (instead of leaving it uninitialised).
63+ (get_new_pred_noarg): Likewise.
64+ (get_new_pred): Initialise predicate->arg_text to
65+ "ThisShouldBeSetToSomethingElse" to make it easier to notice
66+ bugs.
67+ (get_new_pred_chk_op): Use get_new_pred_noarg.
68+ (print_predicate): Use an if statement instead of
69+ two ternary operators.
70+ * find/util.c (insert_primary_withpred): Accept new argument, arg,
71+ being the argument (if any) of this predicate. Pass it to
72+ get_new_pred_chk_op.
73+ (insert_primary): Likewise (pass arg to insert_primary_withpred).
74+ (insert_primary_noarg): New function; calls insert_primary with
75+ arg=NULL.
76+ * find/parser.c (collect_arg_stat_info): Add an output parameter;
77+ the filename from which we collected the stat information.
78+ (parse_closeparen, parse_delete, parse_and, parse_or,
79+ parse_comma): Use get_new_pred_noarg.
80+ (parse_cnewer, parse_newer, parse_anewer): Use new
81+ collect_arg_stat_info and insert_primary interface.
82+ (parse_print, parse_prune, parse_nouser, parse_empty): Use
83+ insert_primary_noarg.
84+ (parse_accesscheck, parse_false): Use insert_primary_noarg.
85+ (parse_used, parse_iname, parse_fprint, insert_fprint,
86+ parse_fstype, parse_ilname): Use new collect_arg and
87+ insert_primary interfaces.
88+ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
89+ parse_perm, parse_size, parse_user, parse_time): Use new
90+ collect_arg and insert_primary_withpred interface.
91+ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
92+ (parse_newerXY, parse_nogroup): Use new insert_primary interface.
93+ (insert_regex, parse_samefile): Use new insert_primary_withpred
94+ interface.
95+ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
96+ new insert_primary_withpred interface.
97+ * find/defs.h (struct predicate.arg_text): make const.
98+ Add declarations for new function get_new_pred_noarg and
99+ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
100+ and insert_primary_withpred.
101+
102diff --git a/find/defs.h b/find/defs.h
103index 1708d83..4539fd9 100644
104--- a/find/defs.h
105+++ b/find/defs.h
106@@ -297,7 +297,7 @@ struct predicate
107 boolean artificial;
108
109 /* The raw text of the argument of this predicate. */
110- char *arg_text;
111+ const char *arg_text;
112
113 /* Information needed by the predicate processor.
114 Next to each member are listed the predicates that use it. */
115@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node);
116 /* tree.c */
117 struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options));
118 struct predicate * get_eval_tree PARAMS((void));
119+struct predicate *get_new_pred_noarg (const struct parser_table *entry);
120 struct predicate *get_new_pred PARAMS((const struct parser_table *entry));
121-struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry));
122+struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry,
123+ const char *arg));
124 float calculate_derived_rates PARAMS((struct predicate *p));
125
126 /* util.c */
127-struct predicate *insert_primary PARAMS((const struct parser_table *entry));
128-struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr));
129+struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg));
130+struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry));
131+struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg));
132 void usage PARAMS((FILE *fp, int status, char *msg));
133 extern boolean check_nofollow(void);
134 void complete_pending_execs(struct predicate *p);
135diff --git a/find/parser.c b/find/parser.c
136index 534b670..2e6b989 100644
137--- a/find/parser.c
138+++ b/find/parser.c
139@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg)
140 }
141
142 static boolean
143-collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
144+collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p,
145+ const char **argument)
146 {
147 const char *filename;
148 if (collect_arg(argv, arg_ptr, &filename))
149 {
150+ *argument = filename;
151 if (0 == (options.xstat)(filename, p))
152 {
153 return true;
154@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p)
155 }
156 else
157 {
158+ *argument = NULL;
159 return false;
160 }
161 }
162@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr)
163 (void) argv;
164 (void) arg_ptr;
165
166- our_pred = get_new_pred (entry);
167+ our_pred = get_new_pred_noarg (entry);
168 our_pred->pred_func = pred_and;
169 our_pred->p_type = BI_OP;
170 our_pred->p_prec = AND_PREC;
171@@ -691,11 +694,12 @@ static boolean
172 parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr)
173 {
174 struct stat stat_newer;
175+ const char *arg;
176
177 set_stat_placeholders(&stat_newer);
178- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
179+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
180 {
181- struct predicate *our_pred = insert_primary (entry);
182+ struct predicate *our_pred = insert_primary (entry, arg);
183 our_pred->args.reftime.xval = XVAL_ATIME;
184 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
185 our_pred->args.reftime.kind = COMP_GT;
186@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr)
187 (void) argv;
188 (void) arg_ptr;
189
190- our_pred = get_new_pred (entry);
191+ our_pred = get_new_pred_noarg (entry);
192 our_pred->pred_func = pred_closeparen;
193 our_pred->p_type = CLOSE_PAREN;
194 our_pred->p_prec = NO_PREC;
195@@ -725,11 +729,12 @@ static boolean
196 parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr)
197 {
198 struct stat stat_newer;
199+ const char *arg;
200
201 set_stat_placeholders(&stat_newer);
202- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
203+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
204 {
205- struct predicate *our_pred = insert_primary (entry);
206+ struct predicate *our_pred = insert_primary (entry, arg);
207 our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */
208 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
209 our_pred->args.reftime.kind = COMP_GT;
210@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr)
211 (void) argv;
212 (void) arg_ptr;
213
214- our_pred = get_new_pred (entry);
215+ our_pred = get_new_pred_noarg (entry);
216 our_pred->pred_func = pred_comma;
217 our_pred->p_type = BI_OP;
218 our_pred->p_prec = COMMA_PREC;
219@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr)
220 (void) argv;
221 (void) arg_ptr;
222
223- our_pred = insert_primary (entry);
224+ our_pred = insert_primary_noarg (entry);
225 our_pred->side_effects = our_pred->no_default_print = true;
226 /* -delete implies -depth */
227 options.do_dir_first = false;
228@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr)
229 (void) argv;
230 (void) arg_ptr;
231
232- our_pred = insert_primary (entry);
233+ our_pred = insert_primary_noarg (entry);
234 our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */
235 return true;
236 }
237@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
238 (void) argv;
239 (void) arg_ptr;
240
241- our_pred = insert_primary (entry);
242+ our_pred = insert_primary_noarg (entry);
243 our_pred->need_stat = our_pred->need_type = false;
244 our_pred->side_effects = our_pred->no_default_print = false;
245 our_pred->est_success_rate = 0.0f;
246@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr)
247 static boolean
248 insert_fls (const struct parser_table* entry, const char *filename)
249 {
250- struct predicate *our_pred = insert_primary (entry);
251+ struct predicate *our_pred = insert_primary_noarg (entry);
252 if (filename)
253 open_output_file (filename, &our_pred->args.printf_vec);
254 else
255@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
256 const char *filename;
257 if (collect_arg(argv, arg_ptr, &filename))
258 {
259- our_pred = insert_primary (entry);
260+ our_pred = insert_primary (entry, filename);
261 open_output_file (filename, &our_pred->args.printf_vec);
262 our_pred->side_effects = our_pred->no_default_print = true;
263 our_pred->need_stat = our_pred->need_type = false;
264@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr)
265 static boolean
266 insert_fprint(const struct parser_table* entry, const char *filename)
267 {
268- struct predicate *our_pred = insert_primary (entry);
269+ struct predicate *our_pred = insert_primary (entry, filename);
270 if (filename)
271 open_output_file (filename, &our_pred->args.printf_vec);
272 else
273@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr)
274 const char *typename;
275 if (collect_arg(argv, arg_ptr, &typename))
276 {
277- struct predicate *our_pred = insert_primary (entry);
278+ struct predicate *our_pred = insert_primary (entry, typename);
279 our_pred->args.str = typename;
280
281 /* This is an expensive operation, so although there are
282@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
283 return false;
284 }
285 }
286- our_pred = insert_primary (entry);
287+ our_pred = insert_primary (entry, groupname);
288 our_pred->args.gid = gid;
289 our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2;
290 return true;
291@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr)
292 const char *name;
293 if (collect_arg(argv, arg_ptr, &name))
294 {
295- struct predicate *our_pred = insert_primary (entry);
296+ struct predicate *our_pred = insert_primary (entry, name);
297 our_pred->args.str = name;
298 /* Use the generic glob pattern estimator to figure out how many
299 * links will match, but bear in mind that most files won't be links.
300@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr)
301 {
302 if (check_name_arg("-iname", name))
303 {
304- struct predicate *our_pred = insert_primary (entry);
305+ struct predicate *our_pred = insert_primary (entry, name);
306 our_pred->need_stat = our_pred->need_type = false;
307 our_pred->args.str = name;
308 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
309@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr)
310 fnmatch_sanitycheck ();
311 if (collect_arg (argv, arg_ptr, &name))
312 {
313- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath);
314+ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name);
315 our_pred->need_stat = our_pred->need_type = false;
316 our_pred->args.str = name;
317 our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
318@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr)
319 fnmatch_sanitycheck();
320 if (collect_arg(argv, arg_ptr, &name))
321 {
322- struct predicate *our_pred = insert_primary (entry);
323+ struct predicate *our_pred = insert_primary (entry, name);
324 our_pred->args.str = name;
325 our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0);
326 return true;
327@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry,
328 "arithmetic overflow while converting %s "
329 "minutes to a number of seconds"))
330 {
331- struct predicate *our_pred = insert_primary (entry);
332+ struct predicate *our_pred = insert_primary (entry, minutes);
333 our_pred->args.reftime = tval;
334 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
335 return true;
336@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
337 fnmatch_sanitycheck();
338 if (check_name_arg("-name", name))
339 {
340- struct predicate *our_pred = insert_primary (entry);
341+ struct predicate *our_pred = insert_primary (entry, name);
342 our_pred->need_stat = our_pred->need_type = false;
343 our_pred->args.str = name;
344 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
345@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr)
346 (void) &argv;
347 (void) &arg_ptr;
348
349- our_pred = get_new_pred_chk_op (entry);
350+ our_pred = get_new_pred_chk_op (entry, NULL);
351 our_pred->pred_func = pred_negate;
352 our_pred->p_type = UNI_OP;
353 our_pred->p_prec = NEGATE_PREC;
354@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr)
355 {
356 struct predicate *our_pred;
357 struct stat stat_newer;
358+ const char *arg;
359
360 set_stat_placeholders(&stat_newer);
361- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer))
362+ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg))
363 {
364- our_pred = insert_primary (entry);
365+ our_pred = insert_primary (entry, arg);
366 our_pred->args.reftime.ts = get_stat_mtime(&stat_newer);
367 our_pred->args.reftime.xval = XVAL_MTIME;
368 our_pred->args.reftime.kind = COMP_GT;
369@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr)
370 (*arg_ptr)++;
371 }
372
373- our_pred = insert_primary (entry);
374+ our_pred = insert_primary (entry, argv[*arg_ptr]);
375
376
377 switch (x)
378@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr)
379 (void) &argv;
380 (void) &arg_ptr;
381
382- our_pred = insert_primary (entry);
383+ our_pred = insert_primary (entry, NULL);
384 our_pred->est_success_rate = 1e-4;
385 #ifdef CACHE_IDS
386 if (gid_unused == NULL)
387@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr)
388 (void) arg_ptr;
389
390
391- our_pred = insert_primary (entry);
392+ our_pred = insert_primary_noarg (entry);
393 our_pred->est_success_rate = 1e-3;
394 #ifdef CACHE_IDS
395 if (uid_unused == NULL)
396@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr)
397 (void) argv;
398 (void) arg_ptr;
399
400- our_pred = get_new_pred_chk_op (entry);
401+ our_pred = get_new_pred_chk_op (entry, NULL);
402 our_pred->pred_func = pred_openparen;
403 our_pred->p_type = OPEN_PAREN;
404 our_pred->p_prec = NO_PREC;
405@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr)
406 (void) argv;
407 (void) arg_ptr;
408
409- our_pred = get_new_pred (entry);
410+ our_pred = get_new_pred_noarg (entry);
411 our_pred->pred_func = pred_or;
412 our_pred->p_type = BI_OP;
413 our_pred->p_prec = OR_PREC;
414@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr)
415 const char *name;
416 if (collect_arg(argv, arg_ptr, &name))
417 {
418- struct predicate *our_pred = insert_primary_withpred (entry, pred_path);
419+ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name);
420 our_pred->need_stat = our_pred->need_type = false;
421 our_pred->args.str = name;
422 our_pred->est_success_rate = estimate_pattern_match_rate (name, 0);
423@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr)
424 rate = 0.9986; /* probably matches anything but a broken symlink */
425 }
426
427- our_pred = insert_primary (entry);
428+ our_pred = insert_primary (entry, perm_expr);
429 our_pred->est_success_rate = rate;
430 if (havekind)
431 {
432@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr)
433 (void) argv;
434 (void) arg_ptr;
435
436- our_pred = insert_primary (entry);
437+ our_pred = insert_primary_noarg (entry);
438 /* -print has the side effect of printing. This prevents us
439 from doing undesired multiple printing when the user has
440 already specified -print. */
441@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
442 (void) argv;
443 (void) arg_ptr;
444
445- our_pred = insert_primary (entry);
446+ our_pred = insert_primary_noarg (entry);
447 if (options.do_dir_first == false)
448 our_pred->need_stat = our_pred->need_type = false;
449 /* -prune has a side effect that it does not descend into
450@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr)
451 static boolean
452 parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr)
453 {
454- struct predicate *our_pred = insert_primary (entry);
455+ struct predicate *our_pred = insert_primary_noarg (entry);
456 (void) argv;
457 (void) arg_ptr;
458 our_pred->need_stat = our_pred->need_type = false;
459@@ -2036,7 +2042,7 @@ insert_regex (char **argv,
460 {
461 struct re_pattern_buffer *re;
462 const char *error_message;
463- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex);
464+ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx);
465 our_pred->need_stat = our_pred->need_type = false;
466 re = xmalloc (sizeof (struct re_pattern_buffer));
467 our_pred->args.regex = re;
468@@ -2061,6 +2067,7 @@ static boolean
469 parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
470 {
471 struct predicate *our_pred;
472+ char *arg;
473 uintmax_t num;
474 char suffix;
475 enum comparison_type c_type;
476@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
477 */
478 if ((argv == NULL) || (argv[*arg_ptr] == NULL))
479 return false;
480+ arg = argv[*arg_ptr];
481
482- len = strlen (argv[*arg_ptr]);
483+ len = strlen (arg);
484 if (len == 0)
485 error (1, 0, _("invalid null argument to -size"));
486
487- suffix = argv[*arg_ptr][len - 1];
488+ suffix = arg[len - 1];
489 switch (suffix)
490 {
491 case 'b':
492 blksize = 512;
493- argv[*arg_ptr][len - 1] = '\0';
494+ arg[len - 1] = '\0';
495 break;
496
497 case 'c':
498 blksize = 1;
499- argv[*arg_ptr][len - 1] = '\0';
500+ arg[len - 1] = '\0';
501 break;
502
503 case 'k':
504 blksize = 1024;
505- argv[*arg_ptr][len - 1] = '\0';
506+ arg[len - 1] = '\0';
507 break;
508
509 case 'M': /* Megabytes */
510 blksize = 1024*1024;
511- argv[*arg_ptr][len - 1] = '\0';
512+ arg[len - 1] = '\0';
513 break;
514
515 case 'G': /* Gigabytes */
516 blksize = 1024*1024*1024;
517- argv[*arg_ptr][len - 1] = '\0';
518+ arg[len - 1] = '\0';
519 break;
520
521 case 'w':
522 blksize = 2;
523- argv[*arg_ptr][len - 1] = '\0';
524+ arg[len - 1] = '\0';
525 break;
526
527 case '0':
528@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr)
529 error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]);
530 }
531 /* TODO: accept fractional megabytes etc. ? */
532- if (!get_num (argv[*arg_ptr], &num, &c_type))
533+ if (!get_num (arg, &num, &c_type))
534 {
535 error(1, 0,
536 _("Invalid argument `%s%c' to -size"),
537- argv[*arg_ptr], (int)suffix);
538+ arg, (int)suffix);
539 return false;
540 }
541- our_pred = insert_primary (entry);
542+our_pred = insert_primary (entry, arg);
543 our_pred->args.size.kind = c_type;
544 our_pred->args.size.blocksize = blksize;
545 our_pred->args.size.size = num;
546@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
547 struct predicate *our_pred;
548 struct stat st, fst;
549 int fd, openflags;
550+ const char *filename;
551
552 set_stat_placeholders(&st);
553- if (!collect_arg_stat_info(argv, arg_ptr, &st))
554+ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename))
555 return false;
556
557 set_stat_placeholders(&fst);
558@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr)
559 }
560 }
561
562- our_pred = insert_primary (entry);
563+ our_pred = insert_primary (entry, filename);
564 our_pred->args.samefileid.ino = st.st_ino;
565 our_pred->args.samefileid.dev = st.st_dev;
566 our_pred->args.samefileid.fd = fd;
567@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr)
568 (void) argv;
569 (void) arg_ptr;
570
571- our_pred = insert_primary (entry);
572+ our_pred = insert_primary_noarg (entry);
573 our_pred->need_stat = our_pred->need_type = false;
574 our_pred->est_success_rate = 1.0f;
575 return true;
576@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr)
577 struct predicate *our_pred;
578 (void) argv;
579 (void) arg_ptr;
580- our_pred = insert_primary (entry);
581+ our_pred = insert_primary_noarg (entry);
582 our_pred->need_stat = our_pred->need_type = false;
583 our_pred->side_effects = our_pred->no_default_print = false;
584 if (pred_is(our_pred, pred_executable))
585@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
586 struct timespec zero = {0,0};
587 if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg))
588 {
589- our_pred = insert_primary (entry);
590+ our_pred = insert_primary (entry, offset_str);
591 our_pred->args.reftime = tval;
592 our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS);
593 return true;
594@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr)
595 return false;
596 }
597 }
598- our_pred = insert_primary (entry);
599+ our_pred = insert_primary (entry, username);
600 our_pred->args.uid = uid;
601 our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2;
602 return true;
603@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr,
604 error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
605 return false;
606 }
607- our_pred = insert_primary_withpred (entry, which_pred);
608+ our_pred = insert_primary_withpred (entry, which_pred, typeletter);
609 our_pred->est_success_rate = rate;
610
611 /* Figure out if we will need to stat the file, because if we don't
612@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec,
613 struct segment **segmentp; /* Address of current segment. */
614 struct predicate *our_pred;
615
616- our_pred = insert_primary_withpred (entry, func);
617+ our_pred = insert_primary_withpred (entry, func, format_const);
618 our_pred->side_effects = our_pred->no_default_print = true;
619 our_pred->args.printf_vec = *vec;
620 our_pred->need_type = false;
621@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action,
622 if ((argv == NULL) || (argv[*arg_ptr] == NULL))
623 return false;
624
625- our_pred = insert_primary_withpred (entry, func);
626+ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)");
627 our_pred->side_effects = our_pred->no_default_print = true;
628 our_pred->need_type = our_pred->need_stat = false;
629
630@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
631 if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
632 return false;
633
634- our_pred = insert_primary (entry);
635+ our_pred = insert_primary (entry, orig_timearg);
636 our_pred->args.reftime = tval;
637 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
638
639@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry)
640
641 if (get_num (numstr, &num, &c_type))
642 {
643- struct predicate *our_pred = insert_primary (entry);
644+ struct predicate *our_pred = insert_primary (entry, numstr);
645 our_pred->args.numinfo.kind = c_type;
646 our_pred->args.numinfo.l_val = num;
647
648diff --git a/find/tree.c b/find/tree.c
649index 7420c60..60a0601 100644
650--- a/find/tree.c
651+++ b/find/tree.c
652@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p)
653 /* Prints a predicate */
654 void print_predicate(FILE *fp, const struct predicate *p)
655 {
656- fprintf (fp, "%s%s%s",
657- p->p_name,
658- p->arg_text ? " " : "",
659- p->arg_text ? p->arg_text : "");
660+ if (p->arg_text)
661+ {
662+ fprintf (fp, "%s %s", p->p_name, p->arg_text);
663+ }
664+ else
665+ {
666+ fprintf (fp, "%s", p->p_name);
667+ }
668 }
669
670
671@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str
672 new_parent->need_stat = false;
673 new_parent->need_type = false;
674 new_parent->p_cost = NeedsNothing;
675-
676+ new_parent->arg_text = NULL;
677+
678 switch (high_prec)
679 {
680 case COMMA_PREC:
681@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred)
682 p->visits = p->successes = 0;
683 }
684
685+
686+struct predicate *
687+get_new_pred_noarg (const struct parser_table *entry)
688+{
689+ struct predicate *p = get_new_pred(entry);
690+ if (p)
691+ {
692+ p->arg_text = NULL;
693+ }
694+ return p;
695+}
696+
697
698 /* Return a pointer to a new predicate structure, which has been
699 linked in as the last one in the predicates list.
700@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry)
701 last_pred->no_default_print = false;
702 last_pred->need_stat = true;
703 last_pred->need_type = true;
704+ last_pred->p_cost = NeedsUnknown;
705+ last_pred->arg_text = "ThisShouldBeSetToSomethingElse";
706 last_pred->args.str = NULL;
707 last_pred->pred_next = NULL;
708 last_pred->pred_left = NULL;
709@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry)
710 predicate is an operator. If it isn't, the AND operator is inserted. */
711
712 struct predicate *
713-get_new_pred_chk_op (const struct parser_table *entry)
714+get_new_pred_chk_op (const struct parser_table *entry,
715+ const char *arg)
716 {
717 struct predicate *new_pred;
718 static const struct parser_table *entry_and = NULL;
719@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry)
720 case PRIMARY_TYPE:
721 case CLOSE_PAREN:
722 /* We need to interpose the and operator. */
723- new_pred = get_new_pred (entry_and);
724+ new_pred = get_new_pred_noarg (entry_and);
725 new_pred->pred_func = pred_and;
726 new_pred->p_name = "-a";
727 new_pred->p_type = BI_OP;
728 new_pred->p_prec = AND_PREC;
729 new_pred->need_stat = false;
730 new_pred->need_type = false;
731+ new_pred->arg_text = NULL;
732 new_pred->args.str = NULL;
733 new_pred->side_effects = false;
734 new_pred->no_default_print = false;
735@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry)
736 }
737
738 new_pred = get_new_pred (entry);
739+ new_pred->arg_text = arg;
740 new_pred->parser_entry = entry;
741 return new_pred;
742 }
743diff --git a/find/util.c b/find/util.c
744index a06eada..cc9a3eb 100644
745--- a/find/util.c
746+++ b/find/util.c
747@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] =
748 operator. */
749
750 struct predicate *
751-insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
752+insert_primary_withpred (const struct parser_table *entry,
753+ PRED_FUNC pred_func,
754+ const char *arg)
755 {
756 struct predicate *new_pred;
757
758- new_pred = get_new_pred_chk_op (entry);
759+ new_pred = get_new_pred_chk_op (entry, arg);
760 new_pred->pred_func = pred_func;
761 new_pred->p_name = entry->parser_name;
762 new_pred->args.str = NULL;
763@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func)
764 either not there at all (we are the very first node) or is an
765 operator. */
766 struct predicate *
767-insert_primary (const struct parser_table *entry)
768+insert_primary (const struct parser_table *entry, const char *arg)
769 {
770 assert (entry->pred_func != NULL);
771- return insert_primary_withpred(entry, entry->pred_func);
772+ return insert_primary_withpred(entry, entry->pred_func, arg);
773+}
774+
775+struct predicate *
776+insert_primary_noarg (const struct parser_table *entry)
777+{
778+ return insert_primary(entry, NULL);
779 }
780
781
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 0000000000..c0ff3ff1c0
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch
@@ -0,0 +1,294 @@
1Upstream-Status: Backport
2
3commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b
4Author: James Youngman <jay@gnu.org>
5Date: Sat Feb 20 13:11:45 2010 +0000
6
7 Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'".
8
9 * find/parser.c (parse_fls): If the argument is invalid, reverse
10 the change that collect_arg() made to *arg_ptr (that is, don't
11 consume the argument).
12 (parse_fprint0): Likewise.
13 (parse_gid): Likewise.
14 (parse_group): Likewise.
15 (parse_inum): Likewise.
16 (parse_links): Likewise.
17 (do_parse_xmin): Likewise.
18 (parse_name): Likewise.
19 (parse_printf): Likewise.
20 (parse_uid): Likewise.
21 (parse_used): Likewise.
22 (parse_time): Likewise.
23
24 Signed-off-by: James Youngman <jay@gnu.org>
25
26diff --git a/ChangeLog b/ChangeLog
27index d0ce1fe..13539a4 100644
28--- a/ChangeLog
29+++ b/ChangeLog
30@@ -1,0 +1,19 @@
31+2010-02-20 James Youngman <jay@gnu.org>
32+
33+ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
34+ `-ctime'".
35+ * find/parser.c (parse_fls): If the argument is invalid, reverse
36+ the change that collect_arg() made to *arg_ptr (that is, don't
37+ consume the argument).
38+ (parse_fprint0): Likewise.
39+ (parse_gid): Likewise.
40+ (parse_group): Likewise.
41+ (parse_inum): Likewise.
42+ (parse_links): Likewise.
43+ (do_parse_xmin): Likewise.
44+ (parse_name): Likewise.
45+ (parse_printf): Likewise.
46+ (parse_uid): Likewise.
47+ (parse_used): Likewise.
48+ (parse_time): Likewise.
49+
50diff --git a/NEWS b/NEWS
51index 5394311..4e910df 100644
52--- a/NEWS
53+++ b/NEWS
54@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
55
56 ** Bug Fixes
57
58+#28824: Corrected error message for "-ctime x".
59+ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
60+ -uid, -used, -atime, -mtime, -ctime.
61 #26537: find -prune now makes sure it has valid stat() information.
62
63diff --git a/find/parser.c b/find/parser.c
64index 2e6b989..08758ee 100644
65--- a/find/parser.c
66+++ b/find/parser.c
67@@ -886,8 +886,14 @@ static boolean
68 parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr)
69 {
70 const char *filename;
71- return collect_arg(argv, arg_ptr, &filename)
72- && insert_fls(entry, filename);
73+ if (collect_arg(argv, arg_ptr, &filename))
74+ {
75+ if (insert_fls(entry, filename))
76+ return true;
77+ else
78+ --*arg_ptr; /* don't consume the invalid arg. */
79+ }
80+ return false;
81 }
82
83 static boolean
84@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr)
85 {
86 const char *filename;
87 if (collect_arg(argv, arg_ptr, &filename))
88- return insert_fprint(entry, filename);
89- else
90- return false;
91+ {
92+ if (insert_fprint(entry, filename))
93+ return true;
94+ else
95+ --*arg_ptr; /* don't consume the bad arg. */
96+ }
97+ return false;
98 }
99
100 static float estimate_fstype_success_rate(const char *fsname)
101@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
102 }
103 else
104 {
105+ --*arg_ptr; /* don't consume the invalid argument. */
106 return false;
107 }
108 }
109@@ -1049,6 +1060,7 @@ static boolean
110 parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
111 {
112 const char *groupname;
113+ const int saved_argc = *arg_ptr;
114
115 if (collect_arg(argv, arg_ptr, &groupname))
116 {
117@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
118 "because it has the unexpected suffix %s"),
119 quotearg_n_style(0, options.err_quoting_style, groupname),
120 quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
121+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
122 return false;
123 }
124 }
125@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr)
126 {
127 error(1, 0, _("argument to -group is empty, but should be a group name"));
128 }
129+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
130 return false;
131 }
132 }
133@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
134 }
135 else
136 {
137+ --*arg_ptr; /* don't consume the invalid argument. */
138 return false;
139 }
140 }
141@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
142 }
143 else
144 {
145+ --*arg_ptr; /* don't consume the invalid argument. */
146 return false;
147 }
148 }
149@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr,
150 error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
151 predicate,
152 quotearg_n_style(0, options.err_quoting_style, depthstr));
153+ /* NOTREACHED */
154 return false;
155 }
156 /* missing argument */
157@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry,
158 enum xval xv)
159 {
160 const char *minutes;
161+ const int saved_argc = *arg_ptr;
162
163 if (collect_arg(argv, arg_ptr, &minutes))
164 {
165@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry,
166 our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec);
167 return true;
168 }
169+ else
170+ {
171+ /* Don't consume the invalid argument. */
172+ *arg_ptr = saved_argc;
173+ }
174 }
175 return false;
176 }
177@@ -1427,6 +1450,8 @@ static boolean
178 parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
179 {
180 const char *name;
181+ const int saved_argc = *arg_ptr;
182+
183 if (collect_arg(argv, arg_ptr, &name))
184 {
185 fnmatch_sanitycheck();
186@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr)
187 our_pred->est_success_rate = estimate_pattern_match_rate(name, 0);
188 return true;
189 }
190+ else
191+ {
192+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
193+ }
194 }
195 return false;
196 }
197@@ -1954,11 +1983,21 @@ static boolean
198 parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr)
199 {
200 const char *format;
201+ const int saved_argc = *arg_ptr;
202+
203 if (collect_arg(argv, arg_ptr, &format))
204 {
205 struct format_val fmt;
206 open_stdout(&fmt);
207- return insert_fprintf (&fmt, entry, pred_fprintf, format);
208+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
209+ {
210+ return true;
211+ }
212+ else
213+ {
214+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
215+ return false;
216+ }
217 }
218 return false;
219 }
220@@ -1967,15 +2006,21 @@ static boolean
221 parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr)
222 {
223 const char *format, *filename;
224+ int saved_argc = *arg_ptr;
225+
226 if (collect_arg(argv, arg_ptr, &filename))
227 {
228 if (collect_arg(argv, arg_ptr, &format))
229 {
230 struct format_val fmt;
231 open_output_file (filename, &fmt);
232- return insert_fprintf (&fmt, entry, pred_fprintf, format);
233+ saved_argc = *arg_ptr;
234+
235+ if (insert_fprintf (&fmt, entry, pred_fprintf, format))
236+ return true;
237 }
238 }
239+ *arg_ptr = saved_argc; /* don't consume the invalid argument. */
240 return false;
241 }
242
243@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
244 }
245 else
246 {
247+ --*arg_ptr; /* don't consume the invalid argument. */
248 return false;
249 }
250 }
251@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr)
252 else
253 {
254 error(1, 0, _("Invalid argument %s to -used"), offset_str);
255+ /*NOTREACHED*/
256 return false;
257 }
258 }
259@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr,
260 if (strlen(typeletter) != 1u)
261 {
262 error(1, 0, _("Arguments to -type should contain only one letter"));
263+ /*NOTREACHED*/
264 return false;
265 }
266
267@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr,
268 #endif
269 default: /* None of the above ... nuke 'em. */
270 error(1, 0, _("Unknown argument to -type: %c"), (*typeletter));
271+ /*NOTREACHED*/
272 return false;
273 }
274 our_pred = insert_primary_withpred (entry, which_pred, typeletter);
275@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
276 const char *errmsg = "arithmetic overflow while converting %s "
277 "days to a number of seconds";
278 struct timespec origin;
279+ const int saved_argc = *arg_ptr;
280
281 if (!collect_arg(argv, arg_ptr, &timearg))
282 return false;
283@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr)
284 timearg = orig_timearg;
285
286 if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg))
287- return false;
288+ {
289+ *arg_ptr = saved_argc; /* don't consume the invalid argument */
290+ return false;
291+ }
292
293 our_pred = insert_primary (entry, orig_timearg);
294 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 0000000000..940aaf6ff5
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch
@@ -0,0 +1,58 @@
1Upstream-Status: Backport
2
3commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f
4Author: James Youngman <jay@gnu.org>
5Date: Sat Feb 20 19:53:13 2010 +0000
6
7 Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
8
9 * doc/find.texi (Problems with -exec and filenames): Add missing
10 $0 argument in example for sh -c 'something "$@" sh ...
11 * NEWS: Mention this change.
12
13 Signed-off-by: James Youngman <jay@gnu.org>
14
15diff --git a/ChangeLog b/ChangeLog
16index 13539a4..e94ba96 100644
17--- a/ChangeLog
18+++ b/ChangeLog
19@@ -1,5 +1,10 @@
20 2010-02-20 James Youngman <jay@gnu.org>
21
22+ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
23+ * doc/find.texi (Problems with -exec and filenames): Add missing
24+ $0 argument in example for sh -c 'something "$@" sh ...
25+ * NEWS: Mention this change.
26+
27 Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
28 `-ctime'".
29 * find/parser.c (parse_fls): If the argument is invalid, reverse
30diff --git a/NEWS b/NEWS
31index 4e910df..4c97be9 100644
32--- a/NEWS
33+++ b/NEWS
34@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
35
36 ** Bug Fixes
37
38+#28872: Mistake in "#safer" example in "Problems with -exec and
39+ filenames" section of the Texinfo manual.
40+
41 #28824: Corrected error message for "-ctime x".
42 Likewise for -gid, -inum, -links, -mmin, -cmin, -amin,
43 -uid, -used, -atime, -mtime, -ctime.
44diff --git a/doc/find.texi b/doc/find.texi
45index 2e5958d..391ffa0 100644
46--- a/doc/find.texi
47+++ b/doc/find.texi
48@@ -4830,8 +4830,8 @@ problem:
49
50 @example
51 # safer
52-find -exec sh -c 'something "$@@"' @{@} \;
53-find -execdir sh -c 'something "$@@"' @{@}\;
54+find -exec sh -c 'something "$@@"' sh @{@} \;
55+find -execdir sh -c 'something "$@@"' sh @{@}\;
56 @end example
57
58 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_doc.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
new file mode 100644
index 0000000000..a48cdc221c
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch
@@ -0,0 +1,84 @@
1Fix documentation build errors
2
3This fixes the following errors building the findutils documentation:
4find-maint.texi:45: misplaced {
5find-maint.texi:45: misplaced }
6find-maint.texi:236: warning: node next `Make the Compiler Find the Bugs' in menu `The File System Is Being Modified' and in sectioning `Factor Out Repeated Code' differ
7find-maint.texi:335: warning: node `Debugging is For Users Too' is next for `Factor Out Repeated Code' in sectioning but not in menu
8find-maint.texi:335: warning: node prev `Factor Out Repeated Code' in menu `Debugging is For Users Too' and in sectioning `Make the Compiler Find the Bugs' differ
9find-maint.texi:378: warning: node next `Debugging is For Users Too' in menu `Factor Out Repeated Code' and in sectioning `Don't Trust the File System Contents' differ
10find-maint.texi:378: warning: node prev `Debugging is For Users Too' in menu `Don't Trust the File System Contents' and in sectioning `Factor Out Repeated Code' differ
11find-maint.texi:392: warning: node next `Don't Trust the File System Contents' in menu `Debugging is For Users Too' and in sectioning `The File System Is Being Modified' differ
12find-maint.texi:392: warning: node prev `Don't Trust the File System Contents' in menu `The File System Is Being Modified' and in sectioning `Debugging is For Users Too' differ
13find-maint.texi:417: warning: node `Don't Trust the File System Contents' is next for `The File System Is Being Modified' in menu but not in sectioning
14find-maint.texi:417: warning: node prev `The File System Is Being Modified' in menu `Make the Compiler Find the Bugs' and in sectioning `Don't Trust the File System Contents' differ
15find.texi:53: misplaced {
16find.texi:53: misplaced }
17find.texi:1862: warning: node `Formatting Flags' is next for `Time Directives' in menu but not in sectioning
18find.texi:1975: warning: node `Formatting Flags' is next for `Combined Time Formats' in sectioning but not in menu
19find.texi:2004: warning: node prev `Formatting Flags' in menu `Time Directives' and in sectioning `Combined Time Formats' differ
20find.texi:2004: warning: node up `Formatting Flags' in menu `Format Directives' and in sectioning `Time Formats' differ
21find.texi:1893: node `Time Formats' lacks menu item for `Formatting Flags' despite being its Up target
22
23Upstream-Status: Backport
24Signed-off-by: Jonathan Liu <net147@gmail.com>
25
26--- a/doc/find-maint.texi
27+++ b/doc/find-maint.texi
28@@ -42,7 +42,7 @@ Free Documentation License''.
29
30 @page
31 @vskip 0pt plus 1filll
32-@insertcopying{}
33+@insertcopying
34 @end titlepage
35
36 @contents
37@@ -227,10 +227,10 @@ circumstances.
38
39 @menu
40 * Make the Compiler Find the Bugs::
41+* Factor Out Repeated Code::
42 * The File System Is Being Modified::
43 * Don't Trust the File System Contents::
44 * Debugging is For Users Too::
45-* Factor Out Repeated Code::
46 @end menu
47
48 @node Make the Compiler Find the Bugs
49--- a/doc/find.texi
50+++ b/doc/find.texi
51@@ -50,7 +50,7 @@ Texts. A copy of the license is included in the section entitled
52
53 @page
54 @vskip 0pt plus 1filll
55-@insertcopying{}
56+@insertcopying
57 @end titlepage
58
59 @contents
60@@ -1665,6 +1665,7 @@ no output is ever sent to it.
61 * Escapes::
62 * Format Directives::
63 * Time Formats::
64+* Formatting Flags::
65 @end menu
66
67 @node Escapes
68@@ -1733,7 +1734,6 @@ from the novel you are reading.
69 * Size Directives::
70 * Location Directives::
71 * Time Directives::
72-* Formatting Flags::
73 @end menu
74
75 @node Name Directives
76@@ -2002,7 +2002,7 @@ seconds field includes a fractional part.
77 @end table
78
79 @node Formatting Flags
80-@subsubsection Formatting Flags
81+@subsection Formatting Flags
82
83 The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
84 and @samp{+} flags, but the other directives do not, even if they
diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..d4a7e95728
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Pending
2
3This patch fixes following issue with automake 1.12
4
5| configure.ac:80: error: automatic de-ANSI-fication support has been removed
6
7Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
82012/05/03
9
10Index: findutils-4.4.2/configure.ac
11===================================================================
12--- findutils-4.4.2.orig/configure.ac
13+++ findutils-4.4.2/configure.ac
14@@ -77,8 +77,6 @@ AC_PROG_CPP
15 dnl for gnulib
16 gl_EARLY
17
18-AM_C_PROTOTYPES
19-
20 AC_PROG_INSTALL
21 AC_PROG_RANLIB
22 dnl AC_PROG_LIBTOOL
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 0000000000..b78cc7539c
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch
@@ -0,0 +1,40 @@
1Upstream-Status: Pending
2
3Author: H.J. Lu <hjl.tools@gmail.com>
4
5Work around gnulib time_t assumption in findutils for x32
6
7time_t is 64bit and long int is 32bit on x32. But gnulib used in
8findutils assumes time_t values fit into long int. Such assumption is
9invalid for x32 and should be removed.
10
11This patch is a workaround to compile gnulib for x32.
12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
14
15
16Index: findutils-4.4.2/gnulib/lib/getdate.y
17===================================================================
18--- findutils-4.4.2.orig/gnulib/lib/getdate.y
19+++ findutils-4.4.2/gnulib/lib/getdate.y
20@@ -114,7 +114,6 @@
21 wraps around, but there's no portable way to check for that at
22 compile-time. */
23 verify (TYPE_IS_INTEGER (time_t));
24-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
25
26 /* An integer value, and the number of digits in its textual
27 representation. */
28Index: findutils-4.4.2/gnulib/lib/mktime.c
29===================================================================
30--- findutils-4.4.2.orig/gnulib/lib/mktime.c
31+++ findutils-4.4.2/gnulib/lib/mktime.c
32@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda
33 {
34 verify (C99_integer_division, -1 / 2 == 0);
35 verify (long_int_year_and_yday_are_wide_enough,
36- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
37+ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX);
38
39 /* Compute intervening leap days correctly even if year is negative.
40 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 0000000000..4edb127ba5
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -0,0 +1,24 @@
1SUMMARY = "find, locate, and xargs binaries"
2DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
3These programs are typically used in conjunction with other programs to provide modular and powerful directory \
4search and file locating capabilities to other commands."
5HOMEPAGE = "http://www.gnu.org/software/findutils/"
6BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
7SECTION = "console/utils"
8
9
10SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz"
11
12inherit autotools gettext update-alternatives
13
14ALTERNATIVE_${PN} = "find xargs"
15ALTERNATIVE_PRIORITY = "100"
16
17# diffutils assumes non-glibc compilation with uclibc and
18# this causes it to generate its own implementations of
19# standard functionality. regex.c actually breaks compilation
20# because it uses __mempcpy, there are other things (TBD:
21# see diffutils.mk in buildroot)
22EXTRA_OECONF_libc-uclibc = "--without-included-regex"
23
24BBCLASSEXTEND = "native nativesdk"
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 0000000000..72b657a100
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.2.31.bb
@@ -0,0 +1,13 @@
1LICENSE = "GPLv2+"
2LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
3PR = "r4"
4
5require findutils.inc
6
7SRC_URI += "file://gnulib-extension.patch \
8 file://findutils_fix_for_automake-1.12.patch \
9 file://findutils-fix-doc-build-error.patch \
10 "
11
12SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
13SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"
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 0000000000..ee91945f9f
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.4.2.bb
@@ -0,0 +1,25 @@
1require findutils.inc
2
3# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
6
7PR = "r6"
8
9SRC_URI += "file://01-27017.patch \
10 file://02-28824.patch \
11 file://03-28872.patch \
12 file://findutils_fix_for_x32.patch \
13 file://findutils_fix_for_automake-1.12.patch \
14 file://findutils_fix_doc.patch \
15 "
16
17SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f"
18SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a"
19
20DEPENDS = "bison-native"
21
22# http://savannah.gnu.org/bugs/?27299
23CACHED_CONFIGUREVARS += "${@base_contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
24
25EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
new file mode 100644
index 0000000000..c0290b1918
--- /dev/null
+++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -0,0 +1,37 @@
1SUMMARY = "OpenPrinting printer support - filters"
2DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \
3common printers for use with UNIX-like operating systems.\
4It provides the "glue" between a print spooler (like CUPS or lpr) and \
5the printer, by processing files sent to the printer. \
6 \
7This package consists of filters used by the printer spoolers \
8to convert the incoming PostScript data into the printer's native \
9format using a printer-specific, but spooler-independent PPD file. \
10"
11
12DEPENDS += "cups perl libxml2"
13PR = "r1"
14
15LICENSE = "GPLv2+"
16LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
17
18SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
19
20SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896"
21SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3"
22
23inherit autotools
24
25EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
26
27do_configure_prepend() {
28 export PERL="${bindir}/env perl"
29 export CUPS_SERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir
30}
31
32do_install_append_linuxstdbase() {
33 install -d ${D}${exec_prefix}/lib/cups/filter
34 ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter
35}
36
37FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/"
diff --git a/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch b/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..c4300ca6a0
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=693449]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd gamin-0.1.10/configure.in gamin-0.1.10/configure.in
5--- gamin-0.1.10/configure.in 2008-11-24 17:23:06.000000000 +0200
6+++ gamin-0.1.10/configure.in 2013-02-08 23:11:59.656279992 +0200
7@@ -1,7 +1,7 @@
8 dnl Process this file with autoconf to produce a configure script.
9 AC_PREREQ(2.52)
10 AC_INIT(libgamin)
11-AM_CONFIG_HEADER(config.h)
12+AC_CONFIG_HEADERS(config.h)
13 AC_CANONICAL_SYSTEM
14
15 # get any external flags setting before we start playing with the CFLAGS variable
16@@ -31,7 +31,6 @@
17
18 AC_USE_SYSTEM_EXTENSIONS
19 AC_PROG_CC
20-AM_PROG_CC_STDC
21 AC_HEADER_STDC
22 AC_PROG_INSTALL
23 AC_PROG_MAKE_SET
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 0000000000..cddf2dc93d
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Inappropriate [configuration]
2
3--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200
4+++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200
5@@ -354,51 +354,6 @@
6 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
7 fi
8
9-#### Abstract sockets
10-
11-AC_MSG_CHECKING(abstract socket namespace)
12-AC_LANG_PUSH(C)
13-AC_RUN_IFELSE([AC_LANG_PROGRAM(
14-[[
15-#include <sys/types.h>
16-#include <stdlib.h>
17-#include <string.h>
18-#include <stdio.h>
19-#include <sys/socket.h>
20-#include <sys/un.h>
21-#include <errno.h>
22-]],
23-[[
24- int listen_fd;
25- struct sockaddr_un addr;
26-
27- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
28-
29- if (listen_fd < 0)
30- {
31- fprintf (stderr, "socket() failed: %s\n", strerror (errno));
32- exit (1);
33- }
34-
35- memset (&addr, '\0', sizeof (addr));
36- addr.sun_family = AF_UNIX;
37- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
38- addr.sun_path[0] = '\0'; /* this is what makes it abstract */
39-
40- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
41- {
42- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
43- strerror (errno));
44- exit (1);
45- }
46- else
47- exit (0);
48-]])],
49- [have_abstract_sockets=yes],
50- [have_abstract_sockets=no])
51-AC_LANG_POP(C)
52-AC_MSG_RESULT($have_abstract_sockets)
53-
54 if test x$enable_abstract_sockets = xyes; then
55 if test x$have_abstract_sockets = xno; then
56 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 0000000000..7b2998c279
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin/noconst.patch
@@ -0,0 +1,59 @@
1G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid
2build failures.
3
4RP 2011/10/12
5
6Upstream-Status: Pending
7
8Index: gamin-0.1.10/server/gam_node.c
9===================================================================
10--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100
11+++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100
12@@ -122,7 +122,7 @@
13 * it has finished with the string. If it must keep it longer, it
14 * should makes its own copy. The returned string must not be freed.
15 */
16-G_CONST_RETURN char *
17+const char *
18 gam_node_get_path(GamNode * node)
19 {
20 g_assert(node);
21Index: gamin-0.1.10/server/gam_node.h
22===================================================================
23--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100
24+++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100
25@@ -58,7 +58,7 @@
26 void gam_node_set_is_dir (GamNode *node,
27 gboolean is_dir);
28
29-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
30+const char *gam_node_get_path (GamNode *node);
31
32 GList *gam_node_get_subscriptions (GamNode *node);
33
34Index: gamin-0.1.10/server/gam_subscription.c
35===================================================================
36--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100
37+++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100
38@@ -141,7 +141,7 @@
39 * @param sub the GamSubscription
40 * @returns The path being monitored. It should not be freed.
41 */
42-G_CONST_RETURN char *
43+const char *
44 gam_subscription_get_path(GamSubscription * sub)
45 {
46 if (sub == NULL)
47Index: gamin-0.1.10/server/gam_subscription.h
48===================================================================
49--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100
50+++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100
51@@ -21,7 +21,7 @@
52
53 int gam_subscription_get_reqno (GamSubscription *sub);
54
55-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
56+const char *gam_subscription_get_path (GamSubscription *sub);
57
58 GamListener *gam_subscription_get_listener (GamSubscription *sub);
59
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 0000000000..375d265f57
--- /dev/null
+++ b/meta/recipes-extended/gamin/gamin_0.1.10.bb
@@ -0,0 +1,36 @@
1SUMMARY = "Gamin the File Alteration Monitor"
2DESCRIPTION = "Gamin is a file and directory monitoring system defined to \
3be a subset of the FAM (File Alteration Monitor) system."
4HOMEPAGE = "http://people.gnome.org/~veillard/gamin/"
5
6LICENSE = "LGPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=412a9be54757a155d0b997b52b519f62"
8
9DEPENDS = "glib-2.0"
10PROVIDES = "fam"
11PR = "r5"
12
13SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \
14 file://no-abstract-sockets.patch \
15 file://noconst.patch \
16 file://obsolete_automake_macros.patch \
17"
18
19SRC_URI[md5sum] = "b4ec549e57da470c04edd5ec2876a028"
20SRC_URI[sha256sum] = "28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1"
21
22inherit autotools pkgconfig
23
24EXTRA_OECONF = "--without-python"
25
26PACKAGES += "lib${BPN} lib${BPN}-dev"
27FILES_${PN} = "${libexecdir}"
28FILES_${PN}-dbg += "${libexecdir}/.debug"
29FILES_lib${BPN} = "${libdir}/lib*.so.*"
30FILES_lib${BPN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/lib*.la \
31 ${libdir}/lib*.a ${libdir}/lib*.so"
32
33RDEPENDS_lib${BPN} = "${PN}"
34
35LEAD_SONAME = "libgamin-1.so"
36
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..b3e7987cef
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.ac:127: error: automatic de-ANSI-fication support has been removed
8| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
9| configure.ac:127: the top level
10| autom4te: m4 failed with exit status: 1
11...
12| Makefile.am:27: error: automatic de-ANSI-fication support has been removed
13
14Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
152012/05/04
16
17Index: gawk-3.1.5/configure.ac
18===================================================================
19--- gawk-3.1.5.orig/configure.ac
20+++ gawk-3.1.5/configure.ac
21@@ -124,7 +124,6 @@ fi
22
23 dnl check for C compiler for automake
24 AM_PROG_CC_STDC
25-AM_C_PROTOTYPES
26
27 dnl Cygwin doesn't like to get libs with full paths
28 dnl since that overrides linking against DLLs.
29Index: gawk-3.1.5/Makefile.am
30===================================================================
31--- gawk-3.1.5.orig/Makefile.am
32+++ gawk-3.1.5/Makefile.am
33@@ -24,7 +24,7 @@
34 ## process this file with automake to produce Makefile.in
35
36 # Automatic de-ANSI-fication if needed, make .bz2 files also.
37-AUTOMAKE_OPTIONS = ansi2knr dist-bzip2
38+AUTOMAKE_OPTIONS = dist-bzip2
39
40 # This undocumented variable insures that aclocal runs
41 # correctly after changing configure.ac
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch
new file mode 100644
index 0000000000..b241097571
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch
@@ -0,0 +1,33 @@
1test/fflush.sh: Remove hardcoded gawk path.
2
3Signed-off-by: Anders Roxell <anders.roxell@enea.com>
4Upstream-Status: Pending
5---
6--- a/test/fflush.sh 2012-05-03 20:13:57.000000000 +0200
7+++ b/test/fflush.sh 2013-04-08 16:28:00.170796200 +0200
8@@ -1,16 +1,17 @@
9 #! /bin/sh
10-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'
11+AWK=${AWK-../gawk}
12+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'
13
14-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat
15+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat
16
17-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat
18+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat
19
20-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
21+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
22
23-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
24+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
25
26-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
27+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat
28
29-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat
30+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat
31
32-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat
33+$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest
new file mode 100644
index 0000000000..7d214eafbe
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3cd test
4for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \
5 do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \
6 make -f Maketests $i &>$i.tmp; \
7 grep -q "Error" $i.tmp; \
8 if [ $? == 0 ]; then echo "FAIL: $i"; \
9 else echo "PASS: $i"; rm -f $i.tmp; fi; \
10done
diff --git a/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk
new file mode 100644
index 0000000000..6f651d8105
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk
@@ -0,0 +1,32 @@
1# The awk test suite prints test names prior to running the test and shows
2# results in the form of "make" errors.
3# This script post-processes the output to detect failure and print PASS
4# only if there was no subsequent error message for the test.
5
6function print_prev()
7{
8 if (length(testname))
9 if (fail == 1)
10 printf "FAIL: %s\n", testname
11 else
12 printf "PASS: %s\n", testname
13}
14
15{
16 print $0
17
18 if (match($0, /^(\w+)$/, result)) {
19 print_prev()
20 testname = result[1];
21 fail = 0
22 }
23
24 if (match($0, /^make: \[(.+?)\]/)) {
25 fail = 1
26 }
27
28}
29
30END {
31 print_prev()
32}
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 0000000000..4d9d6e4c43
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -0,0 +1,42 @@
1SUMMARY = "GNU awk text processing utility"
2DESCRIPTION = "The GNU version of awk, a text processing utility. \
3Awk interprets a special-purpose programming language to do \
4quick and easy text pattern matching and reformatting jobs."
5HOMEPAGE = "www.gnu.org/software/gawk"
6BUGTRACKER = "bug-gawk@gnu.org"
7SECTION = "console/utils"
8
9# gawk <= 3.1.5: GPLv2
10# gawk >= 3.1.6: GPLv3
11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
13
14RDEPENDS_gawk += "gawk-common"
15RDEPENDS_pgawk += "gawk-common"
16PR = "r2"
17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://gawk-3.1.5_fix_for_automake-1.12.patch"
20
21SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
22SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
23
24inherit autotools gettext update-alternatives
25
26PACKAGES += "gawk-common pgawk"
27
28FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
29FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
30FILES_pgawk = "${bindir}/pgawk*"
31FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
32
33ALTERNATIVE_${PN} = "awk"
34ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
35ALTERNATIVE_PRIORITY = "100"
36
37CFLAGS += "-D PROTOTYPES"
38
39do_install_append() {
40 # remove the link since we don't package it
41 rm ${D}${bindir}/awk
42}
diff --git a/meta/recipes-extended/gawk/gawk_4.0.2.bb b/meta/recipes-extended/gawk/gawk_4.0.2.bb
new file mode 100644
index 0000000000..eb86af39da
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_4.0.2.bb
@@ -0,0 +1,52 @@
1SUMMARY = "GNU awk text processing utility"
2DESCRIPTION = "The GNU version of awk, a text processing utility. \
3Awk interprets a special-purpose programming language to do \
4quick and easy text pattern matching and reformatting jobs."
5HOMEPAGE = "www.gnu.org/software/gawk"
6BUGTRACKER = "bug-gawk@gnu.org"
7SECTION = "console/utils"
8
9# gawk <= 3.1.5: GPLv2
10# gawk >= 3.1.6: GPLv3
11LICENSE = "GPLv3"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
13
14DEPENDS += "readline"
15
16RDEPENDS_gawk += "gawk-common"
17RDEPENDS_pgawk += "gawk-common"
18
19SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
20 file://run-ptest \
21"
22
23SRC_URI[md5sum] = "4d505dc2c9f1eb3e9f8d6cac87d4bd1a"
24SRC_URI[sha256sum] = "6e0de117c3713aa8d7fa347fc9fd645b10038ae49d8cf947d8c1d51cbb76141a"
25
26inherit autotools gettext update-alternatives
27
28PACKAGES += "gawk-common pgawk dgawk"
29
30FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
31FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
32FILES_pgawk = "${bindir}/pgawk*"
33FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
34FILES_dgawk = "${bindir}/dgawk*"
35
36ALTERNATIVE_${PN} = "awk"
37ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
38ALTERNATIVE_PRIORITY = "100"
39
40do_install_append() {
41 # remove the link since we don't package it
42 rm ${D}${bindir}/awk
43}
44
45inherit ptest
46
47do_install_ptest() {
48 mkdir ${D}${PTEST_PATH}/test
49 for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \
50 do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
51 done
52}
diff --git a/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h
new file mode 100644
index 0000000000..a05de29def
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 8
9#define ARCH_ALIGN_PTR_MOD 8
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 3
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 8
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
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 0000000000..e8772cd958
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 4
9#define ARCH_ALIGN_PTR_MOD 4
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 2
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 4
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#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 0000000000..e28a949bf7
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -0,0 +1,28 @@
1Import patch from windriver linux for cross compilation, and split patches
2into oe way under different directories such as i586, powerpc etc according
3to Richard's opinion.
4
5Upstream-Status: Pending
6
7Signed-off-by: Kang Kai <kai.kang@windriver.com>
8Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
9
10# Author: Chi Xu <chi.xu@windriver.com>
11# Date: Feb 26 2010
12# Summary: Generate arch.h for ppc32
13#
14
15diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
16--- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800
17+++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800
18@@ -67,8 +67,8 @@
19 stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
20 stdint__h=$(GLSRC)stdint_.h $(std_h)
21
22-$(GLGEN)arch.h : $(GENARCH_XE)
23- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
24+##$(GLGEN)arch.h : $(GENARCH_XE)
25+## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
26
27 # Platform interfaces
28
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 0000000000..ec373078d3
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch
@@ -0,0 +1,929 @@
1When parallel make it will fail with multi copy, see
2http://bugzilla.pokylinux.org/show_bug.cgi?id=1202
3
4Upstream-Status: Pending
5
6Signed-off-by: Kang Kai <kai.kang@windriver.com>
7Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
8
9RP: Extended || true to all CP_ operations, they all can race e.g.:
10| cp -f ./obj/gconfxx.h ./obj/gconfig.h
11| cp: cannot create regular file `./obj/gconfig.h': File exists
12
13diff --git a/base/expat.mak b/base/expat.mak
14index 4ee9c8c..2e16a9d 100644
15--- a/base/expat.mak
16+++ b/base/expat.mak
17@@ -82,7 +82,7 @@ $(EXPATOBJ)xmltok.$(OBJ) : $(EXPATSRC)xmltok.c $(expat_xmltok_hdrs)
18 # Copy the target definition we want
19 $(EXPATGEN)expat.dev : $(TOP_MAKEFILES) $(EXPAT_MAK) \
20 $(EXPATGEN)expat_$(SHARE_EXPAT).dev
21- $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev
22+ $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev || true
23
24 # Define the compiled in target
25 $(EXPATGEN)expat_0.dev : $(EXPAT_MAK) $(ECHOGS_XE) $(expat_)
26diff --git a/base/freetype.mak b/base/freetype.mak
27index 16f2b95..409f75b 100644
28--- a/base/freetype.mak
29+++ b/base/freetype.mak
30@@ -195,7 +195,7 @@ ft_winfonts=$(FTOBJ)winfnt.$(OBJ)
31
32 # instantiate the requested build option (shared or compiled in)
33 $(FTGEN)freetype.dev : $(TOP_MAKEFILES) $(FTGEN)freetype_$(SHARE_FT).dev
34- $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev
35+ $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev || true
36
37 # Define the shared version.
38 $(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE)
39diff --git a/base/gs.mak b/base/gs.mak
40index b804a3e..a343190 100644
41--- a/base/gs.mak
42+++ b/base/gs.mak
43@@ -433,7 +433,7 @@ $(gconfxx_h) : $(ld_tr)
44
45 $(gconfig_h) : $(gconfxx_h)
46 $(RM_) $(gconfig_h)
47- $(CP_) $(gconfxx_h) $(gconfig_h)
48+ $(CP_) $(gconfxx_h) $(gconfig_h) || true
49
50 # The line above is an empty command; don't delete.
51
52diff --git a/base/ijs.mak b/base/ijs.mak
53index bc6d549..0139e1c 100644
54--- a/base/ijs.mak
55+++ b/base/ijs.mak
56@@ -66,7 +66,7 @@ $(IJSGEN)ijslib_1.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(ECHOGS_XE)
57
58
59 $(IJSGEN)ijslib.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(IJSGEN)ijslib_$(SHARE_IJS).dev
60- $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev
61+ $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev || true
62
63
64 ijs_h=$(IJSSRC)ijs.h
65diff --git a/base/jbig2.mak b/base/jbig2.mak
66index bb74630..44617a0 100644
67--- a/base/jbig2.mak
68+++ b/base/jbig2.mak
69@@ -98,7 +98,7 @@ JBIG2O_=$(O_)$(JBIG2OBJ)
70
71 # switch in the version of libjbig2.dev we're actually using
72 $(JBIG2GEN)jbig2dec.dev : $(TOP_MAKEFILES) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev
73- $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev
74+ $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev || true
75
76 # dev file for shared (separately built) jbig2dec library
77 $(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE)
78diff --git a/base/jpeg.mak b/base/jpeg.mak
79index 5310a20..43cee63 100644
80--- a/base/jpeg.mak
81+++ b/base/jpeg.mak
82@@ -96,7 +96,7 @@ jconfig_h=$(GLGEN)jconfig.h
83 jmorecfg_h=$(GLGEN)jmorecfg.h
84
85 $(GLGEN)jconfig_.h : $(GLGEN)jconfig$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS)
86- $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h
87+ $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h || true
88
89 $(GLGEN)jconfig0.h : $(ECHOGS_XE) $(GLSRC)gsjconf.h $(stdpre_h) $(MAKEFILE)\
90 $(MAKEDIRS)
91@@ -108,13 +108,13 @@ $(GLGEN)jconfig1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
92 $(RMN_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h
93
94 $(GLGEN)jconfig.h : $(GLGEN)jconfig0.h $(MAKEDIRS)
95- $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h
96+ $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h || true
97
98 $(GLGEN)jmorecf_.h : $(GLGEN)jmorecf$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS)
99- $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h
100+ $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h || true
101
102 $(GLGEN)jmorecf0.h : $(GLSRC)gsjmorec.h $(GLGEN)jmcorig.h $(MAKEDIRS)
103- $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h
104+ $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h || true
105 $(RM_) $(GLGEN)jmorecf1.h
106
107 $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
108@@ -122,10 +122,10 @@ $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
109 $(RMN_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h
110
111 $(GLGEN)jmorecfg.h : $(GLGEN)jmorecf0.h $(MAKEDIRS)
112- $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h
113+ $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h || true
114
115 $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS)
116- $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h
117+ $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h || true
118
119 # Contrary to what some portability bigots assert as fact, C compilers are
120 # not consistent about where they start searching for #included files:
121@@ -141,23 +141,23 @@ $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS)
122 JHCOPY=$(GLGEN)jinclude.h $(GLGEN)jpeglib.h
123
124 $(GLGEN)jinclude.h : $(JSRC)jinclude.h $(MAKEDIRS)
125- $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h
126+ $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h || true
127
128 # jpeglib_.h doesn't really depend on jconfig.h or jmcorig.h,
129 # but we choose to put the dependencies here rather than in the
130 # definition of jpeglib__h.
131 $(GLGEN)jpeglib_.h : $(GLGEN)jpeglib$(SHARE_JPEG).h $(MAKEDIRS)
132- $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h
133+ $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h || true
134
135 $(GLGEN)jpeglib0.h : $(JSRC)jpeglib.h $(jconfig_h) $(jmorecfg_h) $(MAKEDIRS)
136- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h
137+ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h || true
138
139 $(GLGEN)jpeglib1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS)
140 $(EXP)$(ECHOGS_XE) -w $(GLGEN)jpeglib1.h -x 23 include -x 203c jpeglib.h -x 3e
141
142 # We also need jpeglib.h for #includes in the library itself.
143 $(GLGEN)jpeglib.h : $(JSRC)jpeglib.h $(MAKEDIRS)
144- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h
145+ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h || true
146
147 # In order to avoid having to keep the dependency lists for the IJG code
148 # accurate, we simply make all of them depend on the only files that
149@@ -174,40 +174,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_)
150 $(SETMOD) $(JGEN)jpegc0 $(jpegc0_)
151
152 $(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP)
153- $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c
154+ $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c || true
155 $(JCC) $(JO_)jcomapi.$(OBJ) $(C_) $(GLGEN)jcomapi.c
156 $(RM_) $(GLGEN)jcomapi.c
157
158 $(JOBJ)jutils.$(OBJ) : $(JSRC)jutils.c $(JDEP)
159- $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c
160+ $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c || true
161 $(JCC) $(JO_)jutils.$(OBJ) $(C_) $(GLGEN)jutils.c
162 $(RM_) $(GLGEN)jutils.c
163
164 $(JOBJ)jmemmgr.$(OBJ) : $(JSRC)jmemmgr.c $(JDEP)
165- $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c
166+ $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c || true
167 $(JCC) $(JO_)jmemmgr.$(OBJ) $(C_) $(GLGEN)jmemmgr.c
168 $(RM_) $(GLGEN)jmemmgr.c
169
170 $(JOBJ)jerror.$(OBJ) : $(JSRC)jerror.c $(JDEP)
171- $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c
172+ $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c || true
173 $(JCC) $(JO_)jerror.$(OBJ) $(C_) $(GLGEN)jerror.c
174 $(RM_) $(GLGEN)jerror.c
175
176 $(JOBJ)jaricom.$(OBJ) : $(JSRC)jaricom.c $(JDEP)
177- $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c
178+ $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c || true
179 $(JCC) $(JO_)jaricom.$(OBJ) $(C_) $(GLGEN)jaricom.c
180 $(RM_) $(GLGEN)jaricom.c
181
182 # Encoding (compression) code.
183
184 $(JGEN)jpege.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege_$(SHARE_JPEG).dev
185- $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev
186+ $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev || true
187
188 $(JGEN)jpege_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE)
189 $(SETMOD) $(JGEN)jpege_1 -lib $(JPEG_NAME)
190
191 $(JGEN)jpege_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege6.dev
192- $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev
193+ $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev || true
194
195 jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ)
196
197@@ -223,90 +223,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege
198 $(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3)
199
200 $(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP)
201- $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c
202+ $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c || true
203 $(JCC) $(JO_)jcapimin.$(OBJ) $(C_) $(GLGEN)jcapimin.c
204 $(RM_) $(GLGEN)jcapimin.c
205
206 $(JOBJ)jcapistd.$(OBJ) : $(JSRC)jcapistd.c $(JDEP)
207- $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c
208+ $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c || true
209 $(JCC) $(JO_)jcapistd.$(OBJ) $(C_) $(GLGEN)jcapistd.c
210 $(RM_) $(GLGEN)jcapistd.c
211
212 $(JOBJ)jcinit.$(OBJ) : $(JSRC)jcinit.c $(JDEP)
213- $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c
214+ $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c || true
215 $(JCC) $(JO_)jcinit.$(OBJ) $(C_) $(GLGEN)jcinit.c
216 $(RM_) $(GLGEN)jcinit.c
217
218 $(JOBJ)jccoefct.$(OBJ) : $(JSRC)jccoefct.c $(JDEP)
219- $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c
220+ $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c || true
221 $(JCC) $(JO_)jccoefct.$(OBJ) $(C_) $(GLGEN)jccoefct.c
222 $(RM_) $(GLGEN)jccoefct.c
223
224 $(JOBJ)jccolor.$(OBJ) : $(JSRC)jccolor.c $(JDEP)
225- $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c
226+ $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c || true
227 $(JCC) $(JO_)jccolor.$(OBJ) $(C_) $(GLGEN)jccolor.c
228 $(RM_) $(GLGEN)jccolor.c
229
230 $(JOBJ)jcdctmgr.$(OBJ) : $(JSRC)jcdctmgr.c $(JDEP)
231- $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c
232+ $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c || true
233 $(JCC) $(JO_)jcdctmgr.$(OBJ) $(C_) $(GLGEN)jcdctmgr.c
234 $(RM_) $(GLGEN)jcdctmgr.c
235
236 $(JOBJ)jchuff.$(OBJ) : $(JSRC)jchuff.c $(JDEP)
237- $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c
238+ $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c || true
239 $(JCC) $(JO_)jchuff.$(OBJ) $(C_) $(GLGEN)jchuff.c
240 $(RM_) $(GLGEN)jchuff.c
241
242 $(JOBJ)jcmainct.$(OBJ) : $(JSRC)jcmainct.c $(JDEP)
243- $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c
244+ $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c || true
245 $(JCC) $(JO_)jcmainct.$(OBJ) $(C_) $(GLGEN)jcmainct.c
246 $(RM_) $(GLGEN)jcmainct.c
247
248 $(JOBJ)jcmarker.$(OBJ) : $(JSRC)jcmarker.c $(JDEP)
249- $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c
250+ $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c || true
251 $(JCC) $(JO_)jcmarker.$(OBJ) $(C_) $(GLGEN)jcmarker.c
252 $(RM_) $(GLGEN)jcmarker.c
253
254 $(JOBJ)jcmaster.$(OBJ) : $(JSRC)jcmaster.c $(JDEP)
255- $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c
256+ $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c || true
257 $(JCC) $(JO_)jcmaster.$(OBJ) $(C_) $(GLGEN)jcmaster.c
258 $(RM_) $(GLGEN)jcmaster.c
259
260 $(JOBJ)jcparam.$(OBJ) : $(JSRC)jcparam.c $(JDEP)
261- $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c
262+ $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c || true
263 $(JCC) $(JO_)jcparam.$(OBJ) $(C_) $(GLGEN)jcparam.c
264 $(RM_) $(GLGEN)jcparam.c
265
266 $(JOBJ)jcprepct.$(OBJ) : $(JSRC)jcprepct.c $(JDEP)
267- $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c
268+ $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c || true
269 $(JCC) $(JO_)jcprepct.$(OBJ) $(C_) $(GLGEN)jcprepct.c
270 $(RM_) $(GLGEN)jcprepct.c
271
272 $(JOBJ)jcsample.$(OBJ) : $(JSRC)jcsample.c $(JDEP)
273- $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c
274+ $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c || true
275 $(JCC) $(JO_)jcsample.$(OBJ) $(C_) $(GLGEN)jcsample.c
276 $(RM_) $(GLGEN)jcsample.c
277
278 $(JOBJ)jfdctint.$(OBJ) : $(JSRC)jfdctint.c $(JDEP)
279- $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c
280+ $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c || true
281 $(JCC) $(JO_)jfdctint.$(OBJ) $(C_) $(GLGEN)jfdctint.c
282 $(RM_) $(GLGEN)jfdctint.c
283
284 $(JOBJ)jcarith.$(OBJ) : $(JSRC)jcarith.c $(JDEP)
285- $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c
286+ $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c || true
287 $(JCC) $(JO_)jcarith.$(OBJ) $(C_) $(GLGEN)jcarith.c
288 $(RM_) $(GLGEN)jcarith.c
289
290 # Decompression code
291
292 $(JGEN)jpegd.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd_$(SHARE_JPEG).dev
293- $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev
294+ $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev || true
295
296 $(JGEN)jpegd_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE)
297 $(SETMOD) $(JGEN)jpegd_1 -lib $(JPEG_NAME)
298
299 $(JGEN)jpegd_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd6.dev
300- $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev
301+ $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev || true
302
303 jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ)
304
305@@ -322,76 +322,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd
306 $(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3)
307
308 $(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP)
309- $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c
310+ $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c || true
311 $(JCC) $(JO_)jdapimin.$(OBJ) $(C_) $(GLGEN)jdapimin.c
312 $(RM_) $(GLGEN)jdapimin.c
313
314 $(JOBJ)jdapistd.$(OBJ) : $(JSRC)jdapistd.c $(JDEP)
315- $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c
316+ $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c || true
317 $(JCC) $(JO_)jdapistd.$(OBJ) $(C_) $(GLGEN)jdapistd.c
318 $(RM_) $(GLGEN)jdapistd.c
319
320 $(JOBJ)jdcoefct.$(OBJ) : $(JSRC)jdcoefct.c $(JDEP)
321- $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c
322+ $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c || true
323 $(JCC) $(JO_)jdcoefct.$(OBJ) $(C_) $(GLGEN)jdcoefct.c
324 $(RM_) $(GLGEN)jdcoefct.c
325
326 $(JOBJ)jdcolor.$(OBJ) : $(JSRC)jdcolor.c $(JDEP)
327- $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c
328+ $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c || true
329 $(JCC) $(JO_)jdcolor.$(OBJ) $(C_) $(GLGEN)jdcolor.c
330 $(RM_) $(GLGEN)jdcolor.c
331
332 $(JOBJ)jddctmgr.$(OBJ) : $(JSRC)jddctmgr.c $(JDEP)
333- $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c
334+ $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c || true
335 $(JCC) $(JO_)jddctmgr.$(OBJ) $(C_) $(GLGEN)jddctmgr.c
336 $(RM_) $(GLGEN)jddctmgr.c
337
338 $(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP)
339- $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c
340+ $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true
341 $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c
342 $(RM_) $(GLGEN)jdhuff.c
343
344 $(JOBJ)jdinput.$(OBJ) : $(JSRC)jdinput.c $(JDEP)
345- $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c
346+ $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c || true
347 $(JCC) $(JO_)jdinput.$(OBJ) $(C_) $(GLGEN)jdinput.c
348 $(RM_) $(GLGEN)jdinput.c
349
350 $(JOBJ)jdmainct.$(OBJ) : $(JSRC)jdmainct.c $(JDEP)
351- $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c
352+ $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c || true
353 $(JCC) $(JO_)jdmainct.$(OBJ) $(C_) $(GLGEN)jdmainct.c
354 $(RM_) $(GLGEN)jdmainct.c
355
356 $(JOBJ)jdmarker.$(OBJ) : $(JSRC)jdmarker.c $(JDEP)
357- $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c
358+ $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c || true
359 $(JCC) $(JO_)jdmarker.$(OBJ) $(C_) $(GLGEN)jdmarker.c
360 $(RM_) $(GLGEN)jdmarker.c
361
362 $(JOBJ)jdmaster.$(OBJ) : $(JSRC)jdmaster.c $(JDEP)
363- $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c
364+ $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c || true
365 $(JCC) $(JO_)jdmaster.$(OBJ) $(C_) $(GLGEN)jdmaster.c
366 $(RM_) $(GLGEN)jdmaster.c
367
368 #$(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP)
369-# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c
370+# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true
371 # $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c
372 # $(RM_) $(GLGEN)jdhuff.c
373
374 $(JOBJ)jdpostct.$(OBJ) : $(JSRC)jdpostct.c $(JDEP)
375- $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c
376+ $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c || true
377 $(JCC) $(JO_)jdpostct.$(OBJ) $(C_) $(GLGEN)jdpostct.c
378 $(RM_) $(GLGEN)jdpostct.c
379
380 $(JOBJ)jdsample.$(OBJ) : $(JSRC)jdsample.c $(JDEP)
381- $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c
382+ $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c || true
383 $(JCC) $(JO_)jdsample.$(OBJ) $(C_) $(GLGEN)jdsample.c
384 $(RM_) $(GLGEN)jdsample.c
385
386 $(JOBJ)jidctint.$(OBJ) : $(JSRC)jidctint.c $(JDEP)
387- $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c
388+ $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c || true
389 $(JCC) $(JO_)jidctint.$(OBJ) $(C_) $(GLGEN)jidctint.c
390 $(RM_) $(GLGEN)jidctint.c
391
392 $(JOBJ)jdarith.$(OBJ) : $(JSRC)jdarith.c $(JDEP)
393- $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c
394+ $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c || true
395 $(JCC) $(JO_)jdarith.$(OBJ) $(C_) $(GLGEN)jdarith.c
396 $(RM_) $(GLGEN)jdarith.c
397diff --git a/base/jpegxr.mak b/base/jpegxr.mak
398index 0f09a3a..36495dd 100644
399--- a/base/jpegxr.mak
400+++ b/base/jpegxr.mak
401@@ -103,7 +103,7 @@ $(JPEGXR_OBJ)x_strip.$(OBJ) : $(JPEGXR_SRC)x_strip.c $(jpegxr_hdrs)
402 # Copy the target definition we want
403 $(JPEGXR_GEN)jpegxr.dev : $(TOP_MAKEFILES) $(JPEGXR_MAK) \
404 $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev
405- $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev
406+ $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev || true
407
408 # Define the compiled in target
409 $(JPEGXR_GEN)jpegxr_0.dev : $(JPEGXR_MAK) $(ECHOGS_XE) $(jpegxr_objs)
410diff --git a/base/lcms.mak b/base/lcms.mak
411index dc7f9e5..2bccacd 100644
412--- a/base/lcms.mak
413+++ b/base/lcms.mak
414@@ -84,7 +84,7 @@ LCMSO_=$(O_)$(LCMSOBJ)
415
416 # switch in the version of lcms.dev we're actually using
417 $(LCMSGEN)lcms.dev : $(TOP_MAKEFILES) $(LCMSGEN)lcms_$(SHARE_LCMS).dev
418- $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev
419+ $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev || true
420
421 # dev file for shared (separately built) lcms library
422 $(LCMSGEN)lcms_1.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE)
423diff --git a/base/lcms2.mak b/base/lcms2.mak
424index 4e25f2e..be29d06 100644
425--- a/base/lcms2.mak
426+++ b/base/lcms2.mak
427@@ -85,7 +85,7 @@ LCMS2O_=$(O_)$(LCMS2OBJ)
428
429 # switch in the version of lcms2.dev we're actually using
430 $(LCMS2GEN)lcms2.dev : $(TOP_MAKEFILES) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev
431- $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev
432+ $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev || true
433
434 # dev file for shared (separately built) lcms library
435 $(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE)
436diff --git a/base/lcups.mak b/base/lcups.mak
437index 0bfb3ac..fcdb170 100644
438--- a/base/lcups.mak
439+++ b/base/lcups.mak
440@@ -114,7 +114,7 @@ libcups.config-clean :
441
442 # instantiate the requested build option (shared or compiled in)
443 $(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev
444- $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev
445+ $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev || true
446
447 # Define the shared version.
448 $(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE)
449@@ -131,7 +131,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \
450 # for simplicity we have every source file depend on all headers
451
452 $(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h
453- $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h
454+ $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h || true
455
456 $(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h
457 $(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c
458@@ -218,7 +218,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS)
459 $(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c
460
461 $(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS)
462- $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c
463+ $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c || true
464 $(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c
465
466 $(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS)
467@@ -255,7 +255,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS)
468 $(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c
469
470 $(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS)
471- $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c
472+ $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c || true
473 $(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c
474
475 $(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS)
476@@ -271,5 +271,5 @@ $(LIBCUPSOBJ)usersys.$(OBJ) : $(LIBCUPSSRC)usersys.c $(LIBSCUPSHEADERS)
477 $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c
478
479 $(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS)
480- $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c
481+ $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true
482 $(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c
483diff --git a/base/lcupsi.mak b/base/lcupsi.mak
484index ae1ecff..96d4003 100644
485--- a/base/lcupsi.mak
486+++ b/base/lcupsi.mak
487@@ -73,7 +73,7 @@ libcupsi.config-clean :
488
489 # instantiate the requested build option (shared or compiled in)
490 $(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev
491- $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev
492+ $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev || true
493
494 # Define the shared version.
495 $(LIBCUPSIGEN)lcupsi_1.dev : $(TOP_MAKEFILES) $(LCUPSI_MAK) $(ECHOGS_XE)
496diff --git a/base/ldf_jb2.mak b/base/ldf_jb2.mak
497index 3f50892..97c76a0 100644
498--- a/base/ldf_jb2.mak
499+++ b/base/ldf_jb2.mak
500@@ -223,7 +223,7 @@ ldf_jb2_HDRS=$(ldf_jb2_common_HDRS) $(ldf_jb2_compress_HDRS)
501
502 # switch in the selected library .dev
503 $(LDF_JB2_GEN)ldf_jb2.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev
504- $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev
505+ $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev || true
506
507 # external link .dev
508 $(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE)
509diff --git a/base/lib.mak b/base/lib.mak
510index 7c1677b..179fed0 100644
511--- a/base/lib.mak
512+++ b/base/lib.mak
513@@ -328,7 +328,7 @@ md5_=$(GLOBJ)md5.$(OBJ)
514 $(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE)
515 $(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22
516 $(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h
517- $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c
518+ $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c || true
519 $(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c
520 $(RM_) $(GLGEN)md5.c $(GLGEN)md5.h
521
522@@ -598,19 +598,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\
523 $(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\
524 $(MAKEDDIRS)
525 $(RM_) $(GLGEN)gconfig.c
526- $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c
527+ $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c || true
528 $(GLCC) $(GLO_)gconfig.$(OBJ) $(C_) $(GLGEN)gconfig.c
529
530 $(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\
531 $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS)
532 $(RM_) $(GLGEN)gscdefs.c
533- $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c
534+ $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c || true
535 $(GLCC) $(GLO_)gscdefs.$(OBJ) $(C_) $(GLGEN)gscdefs.c
536
537 $(AUX)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\
538 $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS)
539 $(RM_) $(AUX)gscdefs.c
540- $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c
541+ $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c || true
542 $(GLCCAUX) $(AUXO_)gscdefs.$(OBJ) $(C_) $(AUX)gscdefs.c
543
544 $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\
545@@ -1513,7 +1513,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\
546 $(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c
547
548 $(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ)
549- $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ)
550+ $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) || true
551
552 # sdcparam is used by the filter operator and the PS/PDF writer.
553 # It is not included automatically in sdcte/d.
554@@ -1541,7 +1541,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\
555 $(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c
556
557 $(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
558- $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ)
559+ $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) || true
560
561
562 $(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
563@@ -1557,7 +1557,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\
564 $(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c
565
566 $(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
567- $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ)
568+ $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) || true
569
570 # sdeparam is used by the filter operator and the PS/PDF writer.
571 # It is not included automatically in sdcte.
572@@ -1589,7 +1589,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\
573 $(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c
574
575 $(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
576- $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ)
577+ $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) || true
578
579
580 $(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
581@@ -1606,7 +1606,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\
582
583
584 $(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS)
585- $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ)
586+ $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) || true
587
588 # sddparam is used by the filter operator.
589 # It is not included automatically in sdctd.
590@@ -1629,7 +1629,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_)
591
592 # We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory.
593 $(GLD)slzwe.dev : $(GLD)lzwe.dev
594- $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev
595+ $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev || true
596
597 $(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\
598 $(slzwx_h) $(strimpl_h) $(MAKEDIRS)
599@@ -1645,7 +1645,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_)
600
601 # We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory.
602 $(GLD)slzwd.dev : $(GLD)lzwd.dev
603- $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev
604+ $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev || true
605
606 $(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\
607 $(slzwx_h) $(strimpl_h) $(MAKEDIRS)
608@@ -1695,7 +1695,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\
609 # ---------------- JBIG2 compression filter ---------------- #
610
611 $(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev
612- $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev
613+ $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev || true
614
615 # jbig2dec version
616 sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ)
617@@ -1731,7 +1731,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \
618 # ---------------- JPEG 2000 compression filter ---------------- #
619
620 $(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev
621- $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev
622+ $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev || true
623
624 $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
625 $(memory__h) $(gsmalloc_h) \
626@@ -1860,7 +1860,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\
627 $(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c
628
629 $(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
630- $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ)
631+ $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) || true
632
633 szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ)
634 $(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_)
635@@ -1876,7 +1876,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\
636 $(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c
637
638 $(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
639- $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ)
640+ $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) || true
641
642 szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ)
643 $(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_)
644@@ -1892,7 +1892,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\
645 $(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c
646
647 $(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
648- $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ)
649+ $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) || true
650
651 # ---------------- Page devices ---------------- #
652 # We include this here, rather than in devs.mak, because it is more like
653@@ -2843,7 +2843,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\
654 $(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c
655
656 $(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ)
657- $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ)
658+ $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) || true
659
660
661 $(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
662@@ -2855,7 +2855,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\
663 $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c
664
665 $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ)
666- $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ)
667+ $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true
668
669 # Note that gsicc_create requires compile with lcms to obtain icc34.h
670 # header file that is used for creating ICC structures from PS objects.
671@@ -2875,7 +2875,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\
672 $(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
673
674 $(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS)
675- $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ)
676+ $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) || true
677
678
679 #include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */
680@@ -3146,7 +3146,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS)
681 $(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS)
682
683 $(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS)
684- $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c
685+ $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c || true
686
687 # the following module is only included if the romfs.dev FEATURE is enabled
688 $(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
689@@ -3162,7 +3162,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \
690 $(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c
691
692 $(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS)
693- $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ)
694+ $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) || true
695
696 $(GLOBJ)gsromfs1.$(OBJ) : $(GLOBJ)gsromfs1.c $(time__h) $(MAKEDIRS)
697 $(GLCC) $(GLO_)gsromfs1.$(OBJ) $(C_) $(GLOBJ)gsromfs1.c
698diff --git a/base/lwf_jp2.mak b/base/lwf_jp2.mak
699index ca1b7cc..ad6446d 100644
700--- a/base/lwf_jp2.mak
701+++ b/base/lwf_jp2.mak
702@@ -176,7 +176,7 @@ lwf_jp2_HDRS = \
703
704 # switch in the selected library .dev
705 $(LWF_JP2_GEN)lwf_jp2.dev : $(TOP_MAKEFILES) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev
706- $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev
707+ $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev || true
708
709 # external link .dev
710 $(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE)
711diff --git a/base/macos-mcp.mak b/base/macos-mcp.mak
712index 5387a99..725ec73 100644
713--- a/base/macos-mcp.mak
714+++ b/base/macos-mcp.mak
715@@ -380,11 +380,11 @@ CWPROJ_XML=./ghostscript.mcp.xml
716
717 $(CWPROJ_XML): $(gconfigd_h)
718 -mkdir -p obj/sys
719- $(CP_) $(macsystypes_h) $(systypes_h)
720+ $(CP_) $(macsystypes_h) $(systypes_h) || true
721 $(SH) $(GLSRC)macgenmcpxml.sh `$(CAT) $(ld_tr)` > $(CWPROJ_XML)
722- $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c
723- $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c
724- $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c
725+ $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c || true
726+ $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c || true
727+ $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c || true
728 /Developer/Tools/SetFile -c CWIE -t TEXT $(CWPROJ_XML)
729
730 $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
731diff --git a/base/openjpeg.mak b/base/openjpeg.mak
732index 489dd3b..60e2015 100644
733--- a/base/openjpeg.mak
734+++ b/base/openjpeg.mak
735@@ -94,11 +94,11 @@ open_jpeg_HDRS = \
736 $(OPEN_JPEG_SRC)indexbox_manager.h \
737
738 $(OPEN_JPEG_CONFIG_H): $(TOP_MAKEFILES) $(JPXSRCDIR)$(D)opj_config.h.in.user
739- $(CP_) $(JPXSRCDIR)$(D)opj_config.h.in.user $(OPEN_JPEG_CONFIG_H)
740+ $(CP_) $(JPXSRCDIR)$(D)opj_config.h.in.user $(OPEN_JPEG_CONFIG_H) || true
741
742 # switch in the selected library .dev
743 $(OPEN_JPEG_GEN)openjpeg.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev
744- $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev
745+ $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev || true
746
747 # external link .dev
748 $(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE)
749diff --git a/base/openvms.mak b/base/openvms.mak
750index 8e4c3dd..117dca4 100644
751--- a/base/openvms.mak
752+++ b/base/openvms.mak
753@@ -362,7 +362,7 @@ SH=
754
755 # Define generic commands.
756
757-CP_=$$ @$(GLSRCDIR)COPY_ONE
758+CP_=$$ @$(GLSRCDIR)COPY_ONE || true
759
760 # Define the command for deleting (a) file(s) (including wild cards)
761
762diff --git a/base/png.mak b/base/png.mak
763index 66fc3c8..59535be 100644
764--- a/base/png.mak
765+++ b/base/png.mak
766@@ -77,7 +77,7 @@ png.config-clean :
767 $(RM_) $(PNGGEN)lpg*.dev
768
769 $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt
770- $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h)
771+ $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h) || true
772
773 PDEP=$(AK) $(pnglibconf_h)
774
775@@ -132,7 +132,7 @@ $(PNGOBJ)pngget.$(OBJ) : $(PNGSRC)pngget.c $(PDEP)
776
777 # Define the version of libpng.dev that we are actually using.
778 $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev
779- $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev
780+ $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true
781
782 # Define the shared version of libpng.
783 # Note that it requires libz, which must be searched *after* libpng.
784diff --git a/base/tiff.mak b/base/tiff.mak
785index 22e3906..317fb14 100644
786--- a/base/tiff.mak
787+++ b/base/tiff.mak
788@@ -49,11 +49,11 @@ tiff_10=$(TIFFOBJ)tif_zip.$(OBJ)
789
790 $(TIFFSRC)libtiff$(D)tif_config.unix.h : $(TIFFSRC)libtiff$(D)tif_config.h.in
791 cd $(TIFFSRC) && ./configure
792- $(CP_) $(TIFFSRC)libtiff$(D)tif_config.h $(TIFFSRC)libtiff$(D)tif_config.unix.h
793+ $(CP_) $(TIFFSRC)libtiff$(D)tif_config.h $(TIFFSRC)libtiff$(D)tif_config.unix.h || true
794
795 $(TIFFSRC)libtiff$(D)tiffconf.unix.h : $(TIFFSRC)libtiff$(D)tiffconf.h.in
796 cd $(TIFFSRC) && ./configure
797- $(CP_) $(TIFFSRC)libtiff$(D)tiffconf.h $(TIFFSRC)libtiff$(D)tiffconf.unix.h
798+ $(CP_) $(TIFFSRC)libtiff$(D)tiffconf.h $(TIFFSRC)libtiff$(D)tiffconf.unix.h || true
799
800 $(TIFFOBJ)tif_aux.$(OBJ) : $(TIFFSRC)/libtiff/tif_aux.c $(TIFFDEP)
801 $(TIFFCC) $(TIFFO_)tif_aux.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_aux.c
802@@ -179,14 +179,14 @@ $(TIFFOBJ)tif_unix.$(OBJ) : $(TIFFSRC)/libtiff/tif_unix.c $(TIFFDEP)
803 $(TIFFCC) $(TIFFO_)tif_unix.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_unix.c
804
805 $(TIFFGEN)tif_config.h: $(TIFFCONFIG)
806- $(CP_) $(TIFFCONFIG) $(TIFFGEN)tif_config.h
807+ $(CP_) $(TIFFCONFIG) $(TIFFGEN)tif_config.h || true
808
809 $(TIFFGEN)tiffconf.h: $(TIFFCONF)
810- $(CP_) $(TIFFCONF) $(TIFFGEN)tiffconf.h
811+ $(CP_) $(TIFFCONF) $(TIFFGEN)tiffconf.h || true
812
813 # Define the version of libtiff.dev that we are actually using.
814 $(TIFFGEN)libtiff.dev : $(TOP_MAKEFILES) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev
815- $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev
816+ $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev || true
817
818
819 # Define the shared version.
820diff --git a/base/unix-aux.mak b/base/unix-aux.mak
821index 1ddad78..6b24422 100644
822--- a/base/unix-aux.mak
823+++ b/base/unix-aux.mak
824@@ -105,7 +105,7 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
825 # $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
826 #
827 #$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
828-# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
829+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) || true
830
831 # Query the environment to construct gconfig_.h.
832 # These are all defined conditionally (except the JasPER one), so that
833diff --git a/base/unixhead.mak b/base/unixhead.mak
834index 67b5434..c4582c1 100644
835--- a/base/unixhead.mak
836+++ b/base/unixhead.mak
837@@ -55,7 +55,7 @@ SH=$(SHELL)
838
839 # Define generic commands.
840
841-CP_=cp
842+CP_=cp -f
843 RM_=rm -f
844 RMN_=rm -f
845
846diff --git a/base/zlib.mak b/base/zlib.mak
847index 6c50605..7fb8c9b 100644
848--- a/base/zlib.mak
849+++ b/base/zlib.mak
850@@ -83,7 +83,7 @@ $(ZOBJ)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP)
851 # Encoding (compression) code.
852
853 $(ZGEN)zlibe.dev : $(TOP_MAKEFILES) $(ZGEN)zlibe_$(SHARE_ZLIB).dev
854- $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev
855+ $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev || true
856
857 $(ZGEN)zlibe_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
858 $(SETMOD) $(ZGEN)zlibe_1 -lib $(ZLIB_NAME)
859@@ -111,7 +111,7 @@ $(ZOBJ)trees.$(OBJ) : $(ZSRC)trees.c $(ZDEP)
860 # with 0.90 do.
861
862 $(ZGEN)crc32.dev : $(TOP_MAKEFILES) $(ZGEN)crc32_$(SHARE_ZLIB).dev
863- $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev
864+ $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev || true
865
866 $(ZGEN)crc32_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
867 $(SETMOD) $(ZGEN)crc32_1 -lib $(ZLIB_NAME)
868@@ -127,7 +127,7 @@ $(ZOBJ)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP)
869 # Decoding (decompression) code.
870
871 $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev
872- $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev
873+ $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true
874
875 $(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE)
876 $(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME)
877diff --git a/psi/int.mak b/psi/int.mak
878index 92f296e..ee6b136 100644
879--- a/psi/int.mak
880+++ b/psi/int.mak
881@@ -274,7 +274,7 @@ $(PSOBJ)iconfig.$(OBJ) : $(gconfig_h) $(PSSRC)iconf.c $(stdio__h)\
882 $(gconf_h) $(gconfigd_h) $(gsmemory_h) $(gstypes_h)\
883 $(iminst_h) $(iref_h) $(ivmspace_h) $(opdef_h) $(iplugin_h)
884 $(RM_) $(PSGEN)iconfig.c
885- $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c
886+ $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c || true
887 $(PSCC) $(PSO_)iconfig.$(OBJ) $(C_) $(PSGEN)iconfig.c
888
889 $(PSOBJ)iinit.$(OBJ) : $(PSSRC)iinit.c $(GH) $(string__h)\
890@@ -607,7 +607,7 @@ $(PSD)psbase.dev : $(INT_MAK) $(ECHOGS_XE) $(INT_OBJS)\
891
892 # We keep the old name for backward compatibility.
893 $(PSD)level1.dev : $(PSD)psl1.dev
894- $(CP_) $(PSD)psl1.dev $(PSD)level1.dev
895+ $(CP_) $(PSD)psl1.dev $(PSD)level1.dev || true
896
897 $(PSD)psl1.dev : $(INT_MAK) $(ECHOGS_XE)\
898 $(PSD)psbase.dev $(PSD)bcp.dev $(PSD)path1.dev $(PSD)type1.dev
899@@ -934,7 +934,7 @@ $(PSOBJ)zfrsd.$(OBJ) : $(PSSRC)zfrsd.c $(OP) $(memory__h)\
900
901 # We keep the old name for backward compatibility.
902 $(PSD)level2.dev : $(PSD)psl2.dev
903- $(CP_) $(PSD)psl2.dev $(PSD)level2.dev
904+ $(CP_) $(PSD)psl2.dev $(PSD)level2.dev || true
905
906 # We -include dpsand2 first so that geninit will have access to the
907 # system name table as soon as possible.
908@@ -1208,7 +1208,7 @@ $(PSOBJ)zfjbig2_luratech.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\
909 # this can be turned on and off with a FEATURE_DEV
910
911 $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev
912- $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev
913+ $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev || true
914
915 fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
916
917Index: ghostscript-9.07/base/devs.mak
918===================================================================
919--- ghostscript-9.07.orig/base/devs.mak 2013-02-14 07:58:13.000000000 +0000
920+++ ghostscript-9.07/base/devs.mak 2013-09-06 22:50:06.331064815 +0000
921@@ -1511,7 +1511,7 @@
922 png_i_=-include $(PNGGENDIR)$(D)libpng
923
924 $(GLOBJ)gdevpng.$(OBJ) : $(GLSRC)gdevpng.c\
925- $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h)
926+ $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h) $(PDEP)
927 $(CC_) $(I_)$(GLI_) $(II)$(PI_)$(_I) $(PCF_) $(GLF_) $(GLO_)gdevpng.$(OBJ) $(C_) $(GLSRC)gdevpng.c
928
929 $(DD)pngmono.dev : $(DEVS_MAK) $(libpng_dev) $(png_) $(GLD)page.dev $(GDEV)
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 0000000000..db8740affa
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
@@ -0,0 +1,96 @@
1ust use commands provided by ghostscript-native, preventing recompile them when
2compile ghostscript.
3Way to enable cross compile.
4
5Upstream-Status: Pending
6
7Signed-off-by: Kang Kai <kai.kang@windriver.com>
8Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
9
10diff --git a/base/unix-aux.mak b/base/unix-aux.mak
11index c032b3f..1ddad78 100644
12--- a/base/unix-aux.mak
13+++ b/base/unix-aux.mak
14@@ -68,44 +68,44 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
15
16 # -------------------------- Auxiliary programs --------------------------- #
17
18-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
19- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
20-
21-# On the RS/6000 (at least), compiling genarch.c with gcc with -O
22-# produces a buggy executable.
23-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
24- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
25-
26-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
27- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
28-
29-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
30- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
31-
32-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
33- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
34-
35-# To get GS to use the system zlib, you remove/hide the gs/zlib directory
36-# which means that the mkromfs build can't find the zlib source it needs.
37-# So it's split into two targets, one using the zlib source directly.....
38-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
39- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
40- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
41-
42-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
43- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
44-
45-# .... and one using the zlib library linked via the command line
46-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
47- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
48- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
49- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
50-
51-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
52- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
53-
54-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
55- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
56+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
57+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
58+#
59+## On the RS/6000 (at least), compiling genarch.c with gcc with -O
60+## produces a buggy executable.
61+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
62+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
63+#
64+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
65+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
66+#
67+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
68+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
69+#
70+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
71+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
72+#
73+## To get GS to use the system zlib, you remove/hide the gs/zlib directory
74+## which means that the mkromfs build can't find the zlib source it needs.
75+## So it's split into two targets, one using the zlib source directly.....
76+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
77+# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
78+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
79+#
80+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0)
81+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
82+#
83+## .... and one using the zlib library linked via the command line
84+#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
85+# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
86+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
87+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
88+#
89+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1)
90+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
91+#
92+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
93+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
94
95 # Query the environment to construct gconfig_.h.
96 # These are all defined conditionally (except the JasPER one), so that
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 0000000000..14c036e5c5
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.05-NOT-check-endian.patch
@@ -0,0 +1,44 @@
1configure will check endianness of build machine. When cross compile it fails.
2So remove the check for Yocto.
3
4Upstream-Status: Pending
5
6Signed-off-by: Kang Kai <kai.kang@windriver.com>
7Signed-off-by: Sen Zhang <sen.zhang@windriver.com>
8Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
9
10--- ghostscript/base/configure.ac.orig 2013-06-24 03:58:26.224723002 -0400
11+++ ghostscript/base/configure.ac 2013-06-24 04:03:29.730807957 -0400
12@@ -255,13 +255,13 @@
13
14 AC_MSG_CHECKING([for big endian])
15
16-AC_RUN_IFELSE(
17- [AC_LANG_PROGRAM([#include <stdio.h>], [
18- static const int one = 1;
19- return (*(char*)&one == 0 ? 0 : 1);
20- ])],
21- [BIGENDIAN=1;AC_MSG_RESULT(big)],
22- [BIGENDIAN=0;AC_MSG_RESULT(little)])
23+#AC_RUN_IFELSE(
24+# [AC_LANG_PROGRAM([#include <stdio.h>], [
25+# static const int one = 1;
26+# return (*(char*)&one == 0 ? 0 : 1);
27+# ])],
28+# [BIGENDIAN=1;AC_MSG_RESULT(big)],
29+# [BIGENDIAN=0;AC_MSG_RESULT(little)])
30
31
32
33@@ -1922,9 +1922,11 @@
34 if test "x$BIGENDIAN" != "x0"; then
35 LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$BIGENDIAN"
36 LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$BIGENDIAN"
37+ AC_MSG_RESULT(big)
38 else
39 LCMS_ENDIAN=
40 LCMS2_ENDIAN=
41+ AC_MSG_RESULT(little)
42 fi
43
44 AC_SUBST(LCMS_ENDIAN)
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
new file mode 100644
index 0000000000..40afd372d1
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
@@ -0,0 +1,50 @@
1ghostscript-native:fix disable-system-libtiff
2
3Modify configure to add the check to make sure
4ghostscrip could work while system-libtiff is
5disabled.
6
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8Upstream-Status: Pending
9---
10diff --git a/base/configure.ac b/base/configure.ac
11index bb05105..4b817ac 100644
12--- a/base/configure.ac
13+++ b/base/configure.ac
14@@ -951,17 +951,22 @@
15 esac
16
17 if test $SHARE_LIBTIFF -eq 0; then
18- echo
19- echo "Running libtiff configure script..."
20- olddir=`pwd`
21- cd "$LIBTIFFDIR" && ./configure --disable-jbig --disable-lzma $SUBCONFIG_OPTS
22- status=$?
23- if test "$status" -ne 0 ; then
24- AC_MSG_ERROR([libtiff configure script failed], $status)
25- fi
26- cd "$olddir"
27- echo
28- echo "Continuing with Ghostscript configuration..."
29+ if test -e $LIBTIFFDIR/configure; then
30+ echo
31+ echo "Running libtiff configure script..."
32+ olddir=`pwd`
33+ cd "$LIBTIFFDIR" && ./configure --disable-jbig --disable-lzma $SUBCONFIG_OPTS
34+ status=$?
35+ if test "$status" -ne 0 ; then
36+ AC_MSG_ERROR([libtiff configure script failed], $status)
37+ fi
38+ cd "$olddir"
39+ echo
40+ echo "Continuing with Ghostscript configuration..."
41+ else
42+ AC_MSG_NOTICE([Could not find local copy of libtiff.
43+Disabling tiff output devices.])
44+ fi
45 fi
46
47 AC_SUBST(SHARE_LIBTIFF)
48--
491.7.10.4
50
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 0000000000..5817b7a6d7
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h
@@ -0,0 +1,41 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 4
9#define ARCH_ALIGN_PTR_MOD 4
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 4
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 2
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 4
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
41
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686
new file mode 120000
index 0000000000..87aaca5903
--- /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 0000000000..b8b637cca2
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 4
9#define ARCH_ALIGN_PTR_MOD 4
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 2
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 4
21#define ARCH_SIZEOF_PTR 4
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 1
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
new file mode 100644
index 0000000000..0d0a16bfa3
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 8
9#define ARCH_ALIGN_PTR_MOD 8
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 3
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 8
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 1
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
new file mode 100644
index 0000000000..a05de29def
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 8
9#define ARCH_ALIGN_PTR_MOD 8
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 3
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 8
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
new file mode 100644
index 0000000000..29f90ddf85
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 4
9#define ARCH_ALIGN_PTR_MOD 4
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 2
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 4
21#define ARCH_SIZEOF_PTR 4
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#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 0000000000..359097f356
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 4
9#define ARCH_ALIGN_PTR_MOD 4
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 2
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 4
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 1
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#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 0000000000..0d0a16bfa3
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 8
9#define ARCH_ALIGN_PTR_MOD 8
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 3
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 8
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 1
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#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 0000000000..a05de29def
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h
@@ -0,0 +1,40 @@
1/* Parameters derived from machine and compiler architecture. */
2/* This file is generated mechanically by genarch.c. */
3
4 /* ---------------- Scalar alignments ---------------- */
5
6#define ARCH_ALIGN_SHORT_MOD 2
7#define ARCH_ALIGN_INT_MOD 4
8#define ARCH_ALIGN_LONG_MOD 8
9#define ARCH_ALIGN_PTR_MOD 8
10#define ARCH_ALIGN_FLOAT_MOD 4
11#define ARCH_ALIGN_DOUBLE_MOD 8
12
13 /* ---------------- Scalar sizes ---------------- */
14
15#define ARCH_LOG2_SIZEOF_CHAR 0
16#define ARCH_LOG2_SIZEOF_SHORT 1
17#define ARCH_LOG2_SIZEOF_INT 2
18#define ARCH_LOG2_SIZEOF_LONG 3
19#define ARCH_LOG2_SIZEOF_LONG_LONG 3
20#define ARCH_SIZEOF_GX_COLOR_INDEX 8
21#define ARCH_SIZEOF_PTR 8
22#define ARCH_SIZEOF_FLOAT 4
23#define ARCH_SIZEOF_DOUBLE 8
24#define ARCH_FLOAT_MANTISSA_BITS 24
25#define ARCH_DOUBLE_MANTISSA_BITS 53
26
27 /* ---------------- Unsigned max values ---------------- */
28
29#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
30#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
31#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
32#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
33
34 /* ---------------- Miscellaneous ---------------- */
35
36#define ARCH_IS_BIG_ENDIAN 0
37#define ARCH_PTRS_ARE_SIGNED 0
38#define ARCH_FLOATS_ARE_IEEE 1
39#define ARCH_ARITH_RSHIFT 2
40#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.07.bb b/meta/recipes-extended/ghostscript/ghostscript_9.07.bb
new file mode 100644
index 0000000000..64dc6f267f
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.07.bb
@@ -0,0 +1,130 @@
1SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
2DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
3a back-end to a program such as ghostview, it can display PostScript and PDF \
4documents in an X11 environment. \
5\
6Furthermore, it can render PostScript and PDF files as graphics to be printed \
7on non-PostScript printers. Supported printers include common \
8dot-matrix, inkjet and laser models. \
9\
10Package gsfonts contains a set of standard fonts for Ghostscript. \
11"
12HOMEPAGE = "http://www.ghostscript.com"
13SECTION = "console/utils"
14
15LICENSE = "GPLv3"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=a5146dadaa8cd9f5f913b7577d49bf19"
17
18DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
19DEPENDS_class-native = ""
20
21SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz"
22
23SRC_URI = "${SRC_URI_BASE} \
24 file://ghostscript-9.02-prevent_recompiling.patch \
25 file://ghostscript-9.02-genarch.patch \
26 file://objarch.h \
27 file://ghostscript-9.02-parallel-make.patch \
28 file://ghostscript-9.05-NOT-check-endian.patch \
29 "
30
31SRC_URI_class-native = "${SRC_URI_BASE} \
32 file://ghostscript-native-fix-disable-system-libtiff.patch \
33 "
34
35SRC_URI[md5sum] = "57ebf17c5abcf0fc95a386bfff08c1a4"
36SRC_URI[sha256sum] = "44800d004c53f13192d1b5db413119198ddfc8a11c4d2a030aac2f2fda822ebf"
37
38EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
39 --with-fontpath=${datadir}/fonts --with-install-cups \
40 --without-libidn \
41 "
42
43# Explicity disable libtiff, fontconfig,
44# freetype, cups for ghostscript-native
45EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
46 --without-jbig2dec \
47 --with-fontpath=${datadir}/fonts \
48 --without-libidn --disable-fontconfig \
49 --disable-freetype --disable-cups"
50
51# This has been fixed upstream but for now we need to subvert the check for time.h
52# http://bugs.ghostscript.com/show_bug.cgi?id=692443
53# http://bugs.ghostscript.com/show_bug.cgi?id=692426
54CFLAGS += "-DHAVE_SYS_TIME_H=1"
55BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
56
57inherit autotools-brokensep
58
59do_configure_prepend () {
60 mkdir -p obj
61 mkdir -p soobj
62 if [ -e ${WORKDIR}/objarch.h ]; then
63 cp ${WORKDIR}/objarch.h obj/arch.h
64 fi
65 if [ ${SITEINFO_ENDIANNESS} = "le" ]; then
66 export BIGENDIAN="0"
67 export BIGENDIAN="0"
68 else
69 export BIGENDIAN="1"
70 export BIGENDIAN="1"
71 fi
72}
73
74do_configure_append () {
75 # copy tools from the native ghostscript build
76 if [ "${PN}" != "ghostscript-native" ]; then
77 mkdir -p obj/aux soobj
78 for i in genarch genconf mkromfs echogs gendev genht; do
79 cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
80 done
81 fi
82
83 # replace cups paths from sysroots/.../usr/bin/crossscripts/cups-config with target paths
84 # CUPSDATA is compiled into a utility, and CUPSSERVERBIN is used as an install path
85 CUPSSERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir
86 CUPSDATA=${datadir}/cups
87
88 sed -e "s#^CUPSSERVERBIN=.*#CUPSSERVERBIN=${CUPSSERVERBIN}#" -i Makefile
89 sed -e "s#^CUPSDATA=.*#CUPSDATA=${CUPSDATA}#" -i Makefile
90}
91
92do_install_append () {
93 mkdir -p ${D}${datadir}/ghostscript/${PV}/
94 cp -r Resource ${D}${datadir}/ghostscript/${PV}/
95 cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
96
97 chown -R root:lp ${D}${sysconfdir}/cups
98}
99
100do_compile_class-native () {
101 mkdir -p obj
102 for i in genarch genconf mkromfs echogs gendev genht; do
103 oe_runmake obj/aux/$i
104 done
105}
106
107do_install_class-native () {
108 install -d ${D}${bindir}/ghostscript-${PV}
109 for i in genarch genconf mkromfs echogs gendev genht; do
110 install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
111 done
112}
113
114BBCLASSEXTEND = "native"
115
116# Ghostscript install tool 'instcopy' tries to remove already created
117# directories during install and parallel make causes problems.
118PARALLEL_MAKEINST=""
119
120PACKAGES =+ "${PN}-cups"
121
122FILES_${PN}-dbg += "${exec_prefix}/lib/cups/filter/.debug"
123
124FILES_${PN}-cups += "${exec_prefix}/lib/cups/filter/gstoraster \
125 ${exec_prefix}/lib/cups/filter/gstopxl \
126 ${datadir}/cups \
127 ${sysconfdir}/cups \
128 "
129
130RDEPENDS_${PN}-cups = "${PN}"
diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf.inc
new file mode 100644
index 0000000000..a8ce230f65
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf.inc
@@ -0,0 +1,22 @@
1DESCRIPTION = "GNU gperf is a perfect hash function generator"
2HOMEPAGE = "http://www.gnu.org/software/gperf"
3SUMMARY = "Generate a perfect hash function from a set of keywords"
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
6 file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
7
8SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
9
10inherit autotools
11
12# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
13# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
14EXTRA_AUTORECONF += " -I ${S}"
15
16do_configure_prepend() {
17 if [ ! -e ${S}/acinclude.m4 ]; then
18 cat ${S}/aclocal.m4 > ${S}/acinclude.m4
19 fi
20}
21
22BBCLASSEXTEND = "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 0000000000..772886121b
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.3.bb
@@ -0,0 +1,10 @@
1require gperf.inc
2
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
5 file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd"
6
7PR = "r1"
8
9SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00"
10SRC_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 0000000000..64003fc0bb
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.4.bb
@@ -0,0 +1,5 @@
1require gperf.inc
2
3
4SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632"
5SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e"
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
new file mode 100644
index 0000000000..8b09f53b0f
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
@@ -0,0 +1,25 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the list of locale categories, beyond LC_MESSAGES, for which the
24# message catalogs shall be used. It is usually empty.
25EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
new file mode 100644
index 0000000000..02dbd2031d
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
@@ -0,0 +1,13 @@
1Index: grep-2.5.1a/doc/grep.texi
2===================================================================
3--- grep-2.5.1a.orig/doc/grep.texi
4+++ grep-2.5.1a/doc/grep.texi
5@@ -288,7 +288,7 @@ This version number should be included i
6 Print a usage message briefly summarizing these command-line options
7 and the bug-reporting address, then exit.
8
9-@itemx --binary-files=@var{type}
10+@item --binary-files=@var{type}
11 @opindex --binary-files
12 @cindex binary files
13 If the first few bytes of a file indicate that the file contains binary
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
new file mode 100644
index 0000000000..3b91520fb2
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
@@ -0,0 +1,17 @@
1Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
2Upstream-Status: Inappropriate [ old version that will not be maintained ]
3Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
4
5diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
6--- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200
7+++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200
8@@ -38,9 +38,7 @@
9 # endif
10 #endif
11
12-#if HAVE_LOCALE_H
13 # include <locale.h>
14-#endif
15
16 #if HAVE_STRING_H
17 # include <string.h>
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
new file mode 100644
index 0000000000..57463355a7
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
@@ -0,0 +1,15 @@
1Enable operation with later versions of gettext.
2
3Upstream-Status: Inappropriate
4RP 2012/10/19
5
6Index: grep-2.5.1a/configure.in
7===================================================================
8--- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000
9+++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000
10@@ -140,4 +140,4 @@
11 AC_CHECK_LIB(pcre, pcre_exec)
12 fi
13
14-AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h])
15+AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h])
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
new file mode 100644
index 0000000000..059d0687b3
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
@@ -0,0 +1,32 @@
1The patch to fix CVE-2012-5667
2Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff
3
4Multiple integer overflows in GNU Grep before 2.11 might allow
5context-dependent attackers to execute arbitrary code via vectors
6involving a long input line that triggers a heap-based buffer overflow.
7
8http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667
9
10Upstream-Status: Inappropriate [other]
11This version of GNU Grep has been abandoned upstream and they are no longer
12accepting patches. This is not a backport.
13
14Signed-off-by Ming Liu <ming.liu@windriver.com>
15---
16 grep.c | 7 +++----
17 1 file changed, 3 insertions(+), 4 deletions(-)
18
19--- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800
20+++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800
21@@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const
22 int cc = 1;
23 char *readbuf;
24 size_t readsize;
25+ const size_t max_save = INT_MAX / 2;
26+
27+ /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */
28+ if (save > max_save)
29+ error (2, 0, _("line too long"));
30
31 /* Offset from start of buffer to start of old stuff
32 that we want to save. */
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..3ccce5fc36
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Pending
2
3automake 1.12 has depricated automatic de-ANSI-fication support
4
5this patch avoids these kinds of errors:
6
7| configure.in:33: error: automatic de-ANSI-fication support has been removed
8| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
9| configure.in:33: the top level
10| autom4te: m4 failed with exit status: 1
11...
12| lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
13| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
14| autoreconf: automake failed with exit status: 1
15
16Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
172012/05/04
18
19Index: grep-2.5.1a/configure.in
20===================================================================
21--- grep-2.5.1a.orig/configure.in
22+++ grep-2.5.1a/configure.in
23@@ -30,7 +30,6 @@ AC_PROG_RANLIB
24
25 dnl Checks for typedefs, structures, and compiler characteristics.
26 AC_SYS_LARGEFILE
27-AM_C_PROTOTYPES
28 AC_TYPE_SIZE_T
29 AC_CHECK_TYPE(ssize_t, int)
30 AC_C_CONST
31Index: grep-2.5.1a/lib/Makefile.am
32===================================================================
33--- grep-2.5.1a.orig/lib/Makefile.am
34+++ grep-2.5.1a/lib/Makefile.am
35@@ -1,5 +1,5 @@
36 #
37-AUTOMAKE_OPTIONS = ../src/ansi2knr
38+AUTOMAKE_OPTIONS =
39
40 SUBDIRS = posix
41
42Index: grep-2.5.1a/src/Makefile.am
43===================================================================
44--- grep-2.5.1a.orig/src/Makefile.am
45+++ grep-2.5.1a/src/Makefile.am
46@@ -1,5 +1,5 @@
47 ## Process this file with automake to create Makefile.in
48-AUTOMAKE_OPTIONS = ansi2knr no-dependencies
49+AUTOMAKE_OPTIONS = no-dependencies
50
51 LN = ln
52
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 0000000000..de054fc755
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
4# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
5# mempcpy, we'll just use that instead.
6# Patch source: OpenEmbedded
7
8Index: grep-2.5.1/intl/localealias.c
9===================================================================
10--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100
11+++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000
12@@ -65,7 +65,7 @@
13 # define strcasecmp __strcasecmp
14
15 # ifndef mempcpy
16-# define mempcpy __mempcpy
17+# error "mempcpy not detected"
18 # endif
19 # define HAVE_MEMPCPY 1
20 # define HAVE___FSETLOCKING 1
21Index: grep-2.5.1/lib/getopt.c
22===================================================================
23--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100
24+++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000
25@@ -326,7 +326,7 @@
26 nonoption_flags_len = nonoption_flags_max_len = 0;
27 else
28 {
29- memset (__mempcpy (new_str, __getopt_nonoption_flags,
30+ memset (mempcpy (new_str, __getopt_nonoption_flags,
31 nonoption_flags_max_len),
32 '\0', top + 1 - nonoption_flags_max_len);
33 nonoption_flags_max_len = top + 1;
34@@ -437,7 +437,7 @@
35 if (__getopt_nonoption_flags == NULL)
36 nonoption_flags_max_len = -1;
37 else
38- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
39+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
40 '\0', nonoption_flags_max_len - len);
41 }
42 }
43Index: grep-2.5.1/lib/regex.c
44===================================================================
45--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000
46+++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000
47@@ -7842,7 +7842,7 @@
48 if (msg_size > errbuf_size)
49 {
50 #if defined HAVE_MEMPCPY || defined _LIBC
51- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
52+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
53 #else
54 memcpy (errbuf, msg, errbuf_size - 1);
55 errbuf[errbuf_size - 1] = 0;
diff --git a/meta/recipes-extended/grep/grep_2.18.bb b/meta/recipes-extended/grep/grep_2.18.bb
new file mode 100644
index 0000000000..5ffeaf0d99
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.18.bb
@@ -0,0 +1,38 @@
1SUMMARY = "GNU grep utility"
2HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
3BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
4SECTION = "console/utils"
5LICENSE = "GPLv3"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
7
8SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
9
10SRC_URI[md5sum] = "7439f8266f50844b56cc3e2721606541"
11SRC_URI[sha256sum] = "e6436e5077fa1497feccc8feaabd3f507b172369bf120fbc9e4874bba81be720"
12
13inherit autotools gettext
14
15EXTRA_OECONF = "--disable-perl-regexp"
16
17do_configure_prepend () {
18 rm -f ${S}/m4/init.m4
19}
20
21do_install () {
22 autotools_do_install
23 install -d ${D}${base_bindir}
24 mv ${D}${bindir}/grep ${D}${base_bindir}/grep
25 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
26 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
27 rmdir ${D}${bindir}/
28}
29
30inherit update-alternatives
31
32ALTERNATIVE_PRIORITY = "100"
33
34ALTERNATIVE_${PN} = "grep egrep fgrep"
35ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
36ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
37ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
38
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 0000000000..088959c9ca
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -0,0 +1,49 @@
1SUMMARY = "Pattern matching utilities"
2DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \
3files for lines containing a match to a specified pattern."
4SECTION = "console/utils"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
7
8PR = "r2"
9
10SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
11 file://uclibc-fix.patch \
12 file://grep_fix_for_automake-1.12.patch \
13 file://gettext.patch \
14 file://fix64-int-to-pointer.patch \
15 file://Makevars \
16 file://grep-CVE-2012-5667.patch \
17 file://fix-for-texinfo-5.1.patch \
18 "
19
20SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
21SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
22
23inherit autotools gettext
24
25EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
26
27CFLAGS += "-D PROTOTYPES"
28do_configure_prepend () {
29 rm -f ${S}/m4/init.m4
30 cp -f ${WORKDIR}/Makevars ${S}/po/
31}
32
33do_install () {
34 autotools_do_install
35 install -d ${D}${base_bindir}
36 mv ${D}${bindir}/grep ${D}${base_bindir}/grep
37 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
38 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
39 rmdir ${D}${bindir}/
40}
41
42inherit update-alternatives
43
44ALTERNATIVE_PRIORITY = "100"
45
46ALTERNATIVE_${PN} = "grep egrep fgrep"
47ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
48ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
49ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
new file mode 100644
index 0000000000..c24eff9af5
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
@@ -0,0 +1,39 @@
1
2Upstream-Status: Inappropriate [embedded]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5---
6 groff-1.18.1.4/Makefile.in | 7 +------
7 1 file changed, 1 insertion(+), 6 deletions(-)
8
9--- a/Makefile.in
10+++ b/Makefile.in
11@@ -460,27 +460,22 @@ OTHERDIRS=\
12 src/roff/grog \
13 src/roff/nroff \
14 contrib/mm \
15 contrib/pic2graph \
16 contrib/eqn2graph \
17- contrib/groffer \
18- contrib/mom \
19- doc
20+ contrib/groffer
21 ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
22 $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
23 EXTRADIRS=\
24 font/devps/generate \
25 font/devdvi/generate \
26 font/devlj4/generate \
27- src/xditview \
28 doc
29 NOMAKEDIRS=\
30 arch/djgpp \
31 contrib/mm/examples \
32 contrib/mm/mm \
33- contrib/mom/examples \
34- contrib/mom/momdoc \
35 src/libs/snprintf
36 DISTDIRS=\
37 $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \
38 $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
39 TARGETS=all install install_bin install_data clean distclean mostlyclean \
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
new file mode 100644
index 0000000000..e3f1aa6a48
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
@@ -0,0 +1,36 @@
1Upstream-Status: Inappropriate [embedded]
2
3Signed-off-by: Saul Wold <sgw@linux.intel.com>
4
5Index: groff-1.18.1.4/tmac/man.local
6===================================================================
7--- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800
8+++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800
9@@ -1,2 +1,27 @@
10 .\" This file is loaded after an-old.tmac.
11 .\" Put any local modifications to an-old.tmac here.
12+.
13+.if n \{\
14+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
15+. \" than utf8.
16+. if !'\*[.T]'utf8' \
17+. tr \[oq]'
18+.
19+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
20+. \" grotty.
21+. if '\V[GROFF_SGR]'' \
22+. output x X tty: sgr 0
23+.
24+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
25+. \" searching in man pages easier.
26+. if '\*[.T]'utf8' \
27+. char \- \N'45'
28+.
29+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
30+. \" as those in command-line options. This is a bug in those pages, but
31+. \" too many fonts are missing the Unicode HYPHEN character, so we render
32+. \" this as the ASCII-compatible HYPHEN-MINUS instead.
33+. if '\*[.T]'utf8' \
34+. char - \N'45'
35+.\}
36+
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
new file mode 100644
index 0000000000..409c1a5a18
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
@@ -0,0 +1,36 @@
1
2Upstream-Status: Inappropriate [embedded]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: groff-1.18.1.4/tmac/mdoc.local
7===================================================================
8--- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800
9+++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800
10@@ -1,2 +1,26 @@
11 .\" This file is loaded after doc.tmac.
12 .\" Put any local modifications to doc.tmac here.
13+.
14+.if n \{\
15+. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
16+. \" than utf8.
17+. if !'\*[.T]'utf8' \
18+. tr \[oq]'
19+.
20+. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
21+. \" grotty.
22+. if '\V[GROFF_SGR]'' \
23+. output x X tty: sgr 0
24+.
25+. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
26+. \" searching in man pages easier.
27+. if '\*[.T]'utf8' \
28+. char \- \N'45'
29+.
30+. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
31+. \" as those in command-line options. This is a bug in those pages, but
32+. \" too many fonts are missing the Unicode HYPHEN character, so we render
33+. \" this as the ASCII-compatible HYPHEN-MINUS instead.
34+. if '\*[.T]'utf8' \
35+. char - \N'45'
36+.\}
diff --git a/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch b/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch
new file mode 100644
index 0000000000..f7e9a742f5
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch
@@ -0,0 +1,32 @@
1Correct the install path of man.local to fix following error:
2 /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local'
3
4Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
5Upstream-Status: Pending
6
7--- groff-1.22.2/tmac/Makefile.sub.orig 2013-02-07 20:06:08.000000000 +0800
8+++ groff-1.22.2/tmac/Makefile.sub 2013-06-26 19:11:23.572259001 +0800
9@@ -114,9 +114,9 @@
10 rm -f $(DESTDIR)$(mdocdir)/$$f; \
11 $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \
12 done
13- -test -f $(DESTDIR)$(localtmacdir)/man.local || \
14+ -test -f $(DESTDIR)$(tmacdir)/man.local || \
15 $(INSTALL_DATA) $(srcdir)/man.local \
16- $(DESTDIR)$(localtmacdir)/man.local
17+ $(DESTDIR)$(tmacdir)/man.local
18 -test -f $(DESTDIR)$(localtmacdir)/mdoc.local || \
19 $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local
20
21@@ -158,9 +158,9 @@
22 -rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
23 -rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
24 -rm -f $(DESTDIR)$(tmacdir)/www.tmac
25- -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \
26+ -if cmp -s $(DESTDIR)$(tmacdir)/man.local \
27 $(srcdir)/man.local; then \
28- rm -f $(DESTDIR)$(localtmacdir)/man.local; \
29+ rm -f $(DESTDIR)$(tmacdir)/man.local; \
30 fi
31 -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \
32 $(srcdir)/mdoc.local; then \
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
new file mode 100644
index 0000000000..28105f8b43
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -0,0 +1,39 @@
1SUMMARY = "GNU Troff software"
2DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
3formatting commands and produces formatted output."
4SECTION = "console/utils"
5HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/"
6LICENSE = "GPLv2"
7PR = "r1"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
10
11SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
12 file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
13 file://man-local.patch \
14 file://mdoc-local.patch"
15
16inherit autotools
17
18EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}"
19
20SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287"
21SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d"
22PARALLEL_MAKE = ""
23
24do_configure (){
25 oe_runconf
26}
27
28do_install_append() {
29 mkdir -p ${D}${sysconfdir}/groff
30 cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/
31 cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/
32}
33
34pkg_postinst_${PN}() {
35 ln -s tbl $D${bindir}/gtbl
36 echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile
37 echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile
38}
39
diff --git a/meta/recipes-extended/groff/groff_1.22.2.bb b/meta/recipes-extended/groff/groff_1.22.2.bb
new file mode 100644
index 0000000000..9d2a3c75bd
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.22.2.bb
@@ -0,0 +1,74 @@
1SUMMARY = "GNU Troff software"
2DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
3formatting commands and produces formatted output."
4SECTION = "base"
5HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/"
6LICENSE = "GPLv3"
7PR = "r1"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
10
11SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
12 file://groff-1.22.2-correct-man.local-install-path.patch \
13"
14
15SRC_URI[md5sum] = "9f4cd592a5efc7e36481d8d8d8af6d16"
16SRC_URI[sha256sum] = "380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a13d2076"
17
18DEPENDS = "groff-native"
19DEPENDS_class-native = ""
20
21inherit autotools
22
23EXTRA_OECONF = "--without-x"
24PARALLEL_MAKE = ""
25
26do_configure_prepend() {
27 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
28 sed -i \
29 -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
30 -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
31 -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
32 -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
33 ${S}/contrib/*/Makefile.sub \
34 ${S}/doc/Makefile.in \
35 ${S}/doc/Makefile.sub
36 fi
37}
38
39do_configure_append() {
40 # generate gnulib configure script
41 olddir=`pwd`
42 cd ${S}/src/libs/gnulib/
43 ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
44 cd ${olddir}
45}
46
47do_install_append() {
48 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
49 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
50 for i in afmtodit mmroff gropdf pdfmom; do
51 if [ -f ${D}${bindir}/$i ]; then
52 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
53 fi
54 done
55}
56
57do_install_append_class-native() {
58 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
59 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
60 for i in afmtodit mmroff; do
61 if [ -f ${D}${bindir}/$i ]; then
62 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
63 fi
64 done
65
66 create_cmdline_wrapper ${D}/${bindir}/groff \
67 -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
68 -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
69}
70
71FILES_${PN} += "${libdir}/${BPN}/site-tmac \
72 ${libdir}/${BPN}/groffer/"
73
74BBCLASSEXTEND = "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 0000000000..d9e8d212bf
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
@@ -0,0 +1,48 @@
1gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Upstream-Status: Inappropriate [licensing]
6
7Index: gzip-1.3.12/gzip.c
8===================================================================
9--- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800
10+++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800
11@@ -1637,7 +1637,7 @@
12 }
13 }
14
15- if (futimens (ofd, ofname, timespec) != 0)
16+ if (futimens_gnulib (ofd, ofname, timespec) != 0)
17 {
18 int e = errno;
19 WARN ((stderr, "%s: ", program_name));
20Index: gzip-1.3.12/lib/utimens.c
21===================================================================
22--- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800
23+++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800
24@@ -75,7 +75,7 @@
25 Return 0 on success, -1 (setting errno) on failure. */
26
27 int
28-futimens (int fd ATTRIBUTE_UNUSED,
29+futimens_gnulib (int fd ATTRIBUTE_UNUSED,
30 char const *file, struct timespec const timespec[2])
31 {
32 /* Some Linux-based NFS clients are buggy, and mishandle time stamps
33@@ -185,5 +185,5 @@
34 int
35 utimens (char const *file, struct timespec const timespec[2])
36 {
37- return futimens (-1, file, timespec);
38+ return futimens_gnulib (-1, file, timespec);
39 }
40Index: gzip-1.3.12/lib/utimens.h
41===================================================================
42--- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800
43+++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800
44@@ -1,3 +1,3 @@
45 #include <time.h>
46-int futimens (int, char const *, struct timespec const [2]);
47+int futimens_gnulib (int, char const *, struct timespec const [2]);
48 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 0000000000..6b2f69870e
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
@@ -0,0 +1,56 @@
1remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
2dependency of AC_GNU_SOURCE"
3
4Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
5
6Upstream-Status: Inappropriate [licensing]
7
8Index: gzip-1.3.12/m4/extensions.m4
9===================================================================
10--- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800
11+++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800
12@@ -12,44 +12,6 @@
13 # enough in this area it's likely we'll need to redefine
14 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
15
16-# AC_USE_SYSTEM_EXTENSIONS
17-# ------------------------
18-# Enable extensions on systems that normally disable them,
19-# typically due to standards-conformance issues.
20-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
21-[
22- AC_BEFORE([$0], [AC_COMPILE_IFELSE])
23- AC_BEFORE([$0], [AC_RUN_IFELSE])
24-
25- AC_REQUIRE([AC_GNU_SOURCE])
26- AC_REQUIRE([AC_AIX])
27- AC_REQUIRE([AC_MINIX])
28-
29- AH_VERBATIM([__EXTENSIONS__],
30-[/* Enable extensions on Solaris. */
31-#ifndef __EXTENSIONS__
32-# undef __EXTENSIONS__
33-#endif
34-#ifndef _POSIX_PTHREAD_SEMANTICS
35-# undef _POSIX_PTHREAD_SEMANTICS
36-#endif
37-#ifndef _TANDEM_SOURCE
38-# undef _TANDEM_SOURCE
39-#endif])
40- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
41- [ac_cv_safe_to_define___extensions__],
42- [AC_COMPILE_IFELSE(
43- [AC_LANG_PROGRAM([
44-# define __EXTENSIONS__ 1
45- AC_INCLUDES_DEFAULT])],
46- [ac_cv_safe_to_define___extensions__=yes],
47- [ac_cv_safe_to_define___extensions__=no])])
48- test $ac_cv_safe_to_define___extensions__ = yes &&
49- AC_DEFINE([__EXTENSIONS__])
50- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
51- AC_DEFINE([_TANDEM_SOURCE])
52-])
53-
54 # gl_USE_SYSTEM_EXTENSIONS
55 # ------------------------
56 # 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 0000000000..6ec1dae0fd
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -0,0 +1,29 @@
1SUMMARY = "Standard GNU compressor"
2DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
3project. Mark Adler wrote the decompression part"
4HOMEPAGE = "http://www.gnu.org/software/gzip/"
5SECTION = "console/utils"
6# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
9 file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
10
11SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
12
13inherit autotools
14
15do_install_append () {
16 # Rename and move files into /bin (FHS), which is typical place for gzip
17 install -d ${D}${base_bindir}
18 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
19 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
20 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
21}
22
23inherit update-alternatives
24
25ALTERNATIVE_PRIORITY = "100"
26ALTERNATIVE_${PN} = "gunzip gzip zcat"
27ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
28ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
29ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
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 0000000000..7a04b87c59
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.3.12.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Standard GNU compressor"
2DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
3project. Mark Adler wrote the decompression part"
4HOMEPAGE = "http://www.gnu.org/software/gzip"
5SECTION = "base"
6
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
9 file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
10 file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
11
12SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
13 file://m4-extensions-fix.patch \
14 file://dup-def-fix.patch"
15
16SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1"
17SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af"
18
19PR = "r2"
20
21inherit autotools
22
23do_install_append () {
24 # move files into /bin (FHS)
25 install -d ${D}${base_bindir}
26 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
27 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
28 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
29}
30
31inherit update-alternatives
32
33ALTERNATIVE_${PN} = "gzip gunzip zcat"
34ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
35ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
36ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
37ALTERNATIVE_PRIORITY = "100"
38
39BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gzip/gzip_1.6.bb b/meta/recipes-extended/gzip/gzip_1.6.bb
new file mode 100644
index 0000000000..9c728dff5a
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.6.bb
@@ -0,0 +1,9 @@
1require gzip.inc
2
3PROVIDES_append_class-native = " gzip-replacement-native"
4NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
5
6BBCLASSEXTEND = "native"
7
8SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20"
9SRC_URI[sha256sum] = "97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e"
diff --git a/meta/recipes-extended/hdparm/hdparm_9.43.bb b/meta/recipes-extended/hdparm/hdparm_9.43.bb
new file mode 100644
index 0000000000..805f76a6b3
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm_9.43.bb
@@ -0,0 +1,36 @@
1SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
2DESCRIPTION = "hdparm is a Linux shell utility for viewing \
3and manipulating various IDE drive and driver parameters."
4SECTION = "console/utils"
5LICENSE = "BSD"
6LICENSE_wiper = "GPLv2"
7LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
8 file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
9 file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
10 file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
11
12
13PACKAGES =+ "wiper"
14
15FILES_wiper = "${bindir}/wiper.sh"
16
17RDEPENDS_wiper = "bash gawk stat"
18
19SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz "
20
21SRC_URI[md5sum] = "f73233be118d86c779a8463d8b6a3cdb"
22SRC_URI[sha256sum] = "2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a"
23
24EXTRA_OEMAKE += 'STRIP="echo"'
25
26inherit update-alternatives
27
28ALTERNATIVE_${PN} = "hdparm"
29ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
30ALTERNATIVE_PRIORITY = "100"
31
32do_install () {
33 install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
34 oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
35 cp ${S}/wiper/wiper.sh ${D}/${bindir}
36}
diff --git a/meta/recipes-extended/images/core-image-full-cmdline.bb b/meta/recipes-extended/images/core-image-full-cmdline.bb
new file mode 100644
index 0000000000..4d69073d9d
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-full-cmdline.bb
@@ -0,0 +1,12 @@
1DESCRIPTION = "A console-only image with more full-featured Linux system \
2functionality installed."
3
4IMAGE_FEATURES += "splash ssh-server-openssh"
5
6IMAGE_INSTALL = "\
7 packagegroup-core-boot \
8 packagegroup-core-full-cmdline \
9 ${CORE_IMAGE_EXTRA_INSTALL} \
10 "
11
12inherit 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 0000000000..d2dc9e2b53
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-dev.bb
@@ -0,0 +1,7 @@
1require core-image-lsb.bb
2
3DESCRIPTION = "Basic image without X support suitable for development work. It \
4can be used for customization and implementations that conform to Linux \
5Standard Base (LSB)."
6
7IMAGE_FEATURES += "dev-pkgs"
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 0000000000..c77425fc39
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-sdk.bb
@@ -0,0 +1,10 @@
1require core-image-lsb.bb
2
3DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \
4(LSB) implementations. It includes the full meta-toolchain, plus development \
5headers and libraries to form a standalone SDK."
6
7IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
8
9IMAGE_INSTALL += "kernel-dev"
10
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 0000000000..ab61c6e6df
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb.bb
@@ -0,0 +1,14 @@
1DESCRIPTION = "An image containing packages that are required to conform \
2to the Linux Standard Base (LSB) specification."
3
4IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management"
5
6IMAGE_INSTALL = "\
7 ${CORE_IMAGE_BASE_INSTALL} \
8 packagegroup-core-full-cmdline \
9 packagegroup-core-lsb \
10 "
11
12inherit core-image distro_features_check
13
14REQUIRED_DISTRO_FEATURES = "pam"
diff --git a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
new file mode 100644
index 0000000000..563260d3b8
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "Small image capable of booting a device with custom install scripts, \
2adding a second rootfs, used for testing."
3
4# use -testfs live-install scripts
5PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-live-install-efi-testfs busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
6
7# Do not pollute the initrd image with rootfs features
8IMAGE_FEATURES = ""
9
10export IMAGE_BASENAME = "core-image-testmaster-initramfs"
11IMAGE_LINGUAS = ""
12
13LICENSE = "MIT"
14
15IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
16inherit core-image
17
18IMAGE_ROOTFS_SIZE = "8192"
19BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta/recipes-extended/images/core-image-testmaster.bb b/meta/recipes-extended/images/core-image-testmaster.bb
new file mode 100644
index 0000000000..ac2fdbed32
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-testmaster.bb
@@ -0,0 +1,18 @@
1DESCRIPTION = "A master image to be deployed on a target useful for testing other images"
2
3IMAGE_FEATURES += "ssh-server-openssh package-management"
4
5inherit core-image
6
7# the deploy code requires bash and
8# normal linux utilities not busybox ones
9IMAGE_INSTALL += "\
10 bash coreutils util-linux tar gzip kmod \
11 python-modules python-misc \
12 e2fsprogs e2fsprogs-mke2fs parted \
13 "
14# we need a particular initramfs for live images
15# that pulls custom install scripts which take
16# care of partitioning for us
17INITRD_IMAGE = "core-image-testmaster-initramfs"
18
diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
new file mode 100644
index 0000000000..ab609e27e3
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
@@ -0,0 +1,47 @@
1From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 17 Mar 2013 11:21:35 -0700
4Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
5
6This changes the configure behaviour from autodetecting
7for libnfnetlink to having an option to disable it explicitly
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Upstream-Status: Pending
12---
13 configure.ac | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index ba616ab..ce2d315 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq],
21 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
22 [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
23 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
24+AC_ARG_ENABLE([libnfnetlink],
25+ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
26+ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
27
28 libiptc_LDFLAGS2="";
29 AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
30@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
31 AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
32 AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
33
34-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
35- [nfnetlink=1], [nfnetlink=0])
36-AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
37+AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
38+ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
39+ ])
40+
41+AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
42
43 regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
44 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
45--
461.7.9.5
47
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 0000000000..24ee29e2d1
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
@@ -0,0 +1,49 @@
1From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Fri, 23 Mar 2012 14:27:20 -0400
4Subject: [PATCH] types.h: add defines that are required for if_packet.h
5
6The iptables local linux/types.h overrides the kernel/sysroot
7types.h. As such, we need to provide some defines that are required
8to build against 3.2+ kernel headers.
9
10ifndef protection is provided for the defines to ensure that
11configuration that already have these defines are still buildable.
12
13This commit is temporary until a new version of iptables can be
14used that contains the defines.
15
16This is similar to the commit in the iptables git repository:
17
18 https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
19
20Upstream-Status: Backport
21
22Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
23---
24 include/linux/types.h | 10 ++++++++++
25 1 files changed, 10 insertions(+), 0 deletions(-)
26
27diff --git a/include/linux/types.h b/include/linux/types.h
28index 8b483c8..ebf6432 100644
29--- a/include/linux/types.h
30+++ b/include/linux/types.h
31@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
32 typedef __u16 __bitwise __sum16;
33 typedef __u32 __bitwise __wsum;
34
35+#ifndef __aligned_u64
36+#define __aligned_u64 __u64 __attribute__((aligned(8)))
37+#endif
38+#ifndef __aligned_be64
39+#define __aligned_be64 __be64 __attribute__((aligned(8)))
40+#endif
41+#ifndef __aligned_le64
42+#define __aligned_le64 __le64 __attribute__((aligned(8)))
43+#endif
44+
45 #endif /* __ASSEMBLY__ */
46 #endif /* _LINUX_TYPES_H */
47--
481.7.0.4
49
diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb
new file mode 100644
index 0000000000..166457dc46
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb
@@ -0,0 +1,46 @@
1SUMMARY = "Tools for managing kernel packet filtering capabilities"
2DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
3filtering code in Linux."
4HOMEPAGE = "http://www.netfilter.org/"
5BUGTRACKER = "http://bugzilla.netfilter.org/"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
8 file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
9
10RRECOMMENDS_${PN} = "kernel-module-x-tables \
11 kernel-module-ip-tables \
12 kernel-module-iptable-filter \
13 kernel-module-iptable-nat \
14 kernel-module-nf-defrag-ipv4 \
15 kernel-module-nf-conntrack \
16 kernel-module-nf-conntrack-ipv4 \
17 kernel-module-nf-nat \
18 kernel-module-ipt-masquerade"
19FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
20FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
21
22SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
23 file://types.h-add-defines-that-are-required-for-if_packet.patch \
24 file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
25 "
26
27SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
28SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0"
29
30inherit autotools
31
32EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
33 "
34PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
35 "
36
37PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
38
39# libnfnetlink recipe is in meta-networking layer
40PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink"
41
42do_configure_prepend() {
43 # Remove some libtool m4 files
44 # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
45 rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
46}
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 0000000000..2cb5576c62
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/targets.diff
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [disable feature]
2
3Index: iputils-s20121221/Makefile
4===================================================================
5--- iputils-s20121221.orig/Makefile
6+++ iputils-s20121221/Makefile
7@@ -106,7 +106,7 @@ endif
8 endif
9
10 # -------------------------------------
11-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
12+IPV4_TARGETS=tracepath ping clockdiff arping
13 IPV6_TARGETS=tracepath6 traceroute6 ping6
14 TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
15
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 0000000000..d3b18868c0
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
@@ -0,0 +1,31 @@
1Upstream-Status: Pending [from other distro Debian]
2
3Index: iputils-s20121221/tracepath.c
4===================================================================
5--- iputils-s20121221.orig/tracepath.c
6+++ iputils-s20121221/tracepath.c
7@@ -370,9 +370,9 @@ main(int argc, char **argv)
8 }
9 #endif
10
11- he = gethostbyname(p);
12+ he = gethostbyname2(argv[0], AF_INET);
13 if (he == NULL) {
14- herror("gethostbyname");
15+ herror("gethostbyname2");
16 exit(1);
17 }
18
19Index: iputils-s20121221/ping.c
20===================================================================
21--- iputils-s20121221.orig/ping.c
22+++ iputils-s20121221/ping.c
23@@ -279,7 +279,7 @@ main(int argc, char **argv)
24 #else
25 idn = target;
26 #endif
27- hp = gethostbyname(idn);
28+ hp = gethostbyname2(idn, AF_INET);
29 if (!hp) {
30 fprintf(stderr, "ping: unknown host %s\n", target);
31 exit(2);
diff --git a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
new file mode 100644
index 0000000000..b9cd82ee88
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Backport
2
3From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
4From: Arjan van de Ven <arjanvandeven@gmail.com>
5Date: Wed, 16 Jan 2013 03:12:15 +0900
6Subject: [PATCH] ping6: Fix build command line argument with gnutls.
7
8The ping6 command can use either openssl or gnutls...
9and the Makefile has a bunch of setup for defining which of the two to use.
10
11Unfortunately, the final -D define on the commandline to enable gnutls
12inside the ping6.c file didn't actually make it onto the gcc
13commandline.
14This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
15
16Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
17Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18---
19 Makefile | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/Makefile b/Makefile
23index c62d9df..89249f5 100644
24--- a/Makefile
25+++ b/Makefile
26@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
27 DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
28 DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
29 LIB_ping = $(LIB_CAP) $(LIB_IDN)
30-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
31+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
32 LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
33
34 ping: ping_common.o
35--
361.7.2.5
37
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 0000000000..92bf946f2a
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
@@ -0,0 +1,27 @@
1Fix nsgmls path issue
2
3Upstream-Status: Pending
4
5Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
6
7Index: iputils-s20101006/doc/Makefile
8===================================================================
9--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
10+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
11@@ -27,10 +27,15 @@
12 # docbook2man produces utterly ugly output and I did not find
13 # any way to customize this but hacking backend perl script a little.
14 # Well, hence...
15+# nsgmls seems append path to search directory according to the sysid path.
16+# e.g. if input ../index.db, it would search $search_directory/../ rather than
17+# $search_directory, which leads searching failure. Fixing nsgmls probably
18+# introduce some side effects, so use this ugly hack: running nsgmls in current
19+# directory, and running docbook2man in tmp directory.
20
21 $(MANFILES): index.db
22 @-mkdir tmp.db2man
23- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
24+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
25 @-rm -rf tmp.db2man
26
27 clean:
diff --git a/meta/recipes-extended/iputils/iputils_s20121221.bb b/meta/recipes-extended/iputils/iputils_s20121221.bb
new file mode 100644
index 0000000000..46f8903222
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20121221.bb
@@ -0,0 +1,69 @@
1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "http://www.skbuff.net/iputils"
5SECTION = "console/network"
6
7LICENSE = "BSD & GPLv2+"
8
9LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
10 file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
11 file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
12 file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
13
14DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap"
15
16
17SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
18 file://debian/use_gethostbyname2.diff \
19 file://debian/targets.diff \
20 file://nsgmls-path-fix.patch \
21 file://fix-build-command-line-argument-with-gnutls.patch \
22 "
23
24SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171"
25SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f"
26
27do_compile () {
28 oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
29}
30
31do_install () {
32 install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
33 # SUID root programs
34 install -m 4555 ping ${D}${base_bindir}/ping
35 install -m 4555 ping6 ${D}${base_bindir}/ping6
36 install -m 4555 traceroute6 ${D}${base_bindir}/
37 # Other programgs
38 for i in arping tracepath tracepath6; do
39 install -m 0755 $i ${D}${base_bindir}/
40 done
41 # Manual pages for things we build packages for
42 for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
43 install -m 0644 doc/$i ${D}${mandir}/man8/ || true
44 done
45}
46
47inherit update-alternatives
48
49ALTERNATIVE_PRIORITY = "100"
50
51ALTERNATIVE_${PN}-ping = "ping"
52ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
53
54ALTERNATIVE_${PN}-ping6 = "ping6"
55ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
56
57PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
58
59ALLOW_EMPTY_${PN} = "1"
60RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
61
62FILES_${PN} = ""
63FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
64FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
65FILES_${PN}-arping = "${base_bindir}/arping"
66FILES_${PN}-tracepath = "${base_bindir}/tracepath"
67FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
68FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
69FILES_${PN}-doc = "${mandir}/man8"
diff --git a/meta/recipes-extended/less/less_458.bb b/meta/recipes-extended/less/less_458.bb
new file mode 100644
index 0000000000..3e4518a339
--- /dev/null
+++ b/meta/recipes-extended/less/less_458.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Text file viewer similar to more"
2DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
3based program for viewing text files and the output from other \
4programs. Less offers many features beyond those that more does."
5HOMEPAGE = "http://www.greenwoodsoftware.com/"
6SECTION = "console/utils"
7
8# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
9# Including email author giving permissing to use BSD
10#
11# From: Mark Nudelman <markn@greenwoodsoftware.com>
12# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
13# Date: 12/19/11
14#
15# Hi Elizabeth,
16# Using a generic BSD license for less is fine with me.
17# Thanks,
18#
19# --Mark
20#
21
22LICENSE = "GPLv3+ | BSD-2-Clause"
23LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
24 file://LICENSE;md5=866cc220f330b04ae4661fc3cdfedea7"
25DEPENDS = "ncurses"
26
27SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz"
28
29SRC_URI[md5sum] = "935b38aa2e73c888c210dedf8fd94f49"
30SRC_URI[sha256sum] = "e536c7819ede54b3d487f0ffc4c14b3620bed83734d92a81e89f62346db0fcac"
31
32inherit autotools update-alternatives
33
34do_install () {
35 oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
36}
37
38ALTERNATIVE_${PN} = "less"
39ALTERNATIVE_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 0000000000..91f4588cc5
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -0,0 +1,779 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3from openembedded, added by Qing He <qing.he@intel.com>
4
5Index: libaio-0.3.109/src/syscall-m68k.h
6===================================================================
7--- /dev/null
8+++ libaio-0.3.109/src/syscall-m68k.h
9@@ -0,0 +1,78 @@
10+#define __NR_io_setup 241
11+#define __NR_io_destroy 242
12+#define __NR_io_getevents 243
13+#define __NR_io_submit 244
14+#define __NR_io_cancel 245
15+
16+#define io_syscall1(type,fname,sname,atype,a) \
17+type fname(atype a) \
18+{ \
19+register long __res __asm__ ("%d0") = __NR_##sname; \
20+register long __a __asm__ ("%d1") = (long)(a); \
21+__asm__ __volatile__ ("trap #0" \
22+ : "+d" (__res) \
23+ : "d" (__a) ); \
24+return (type) __res; \
25+}
26+
27+#define io_syscall2(type,fname,sname,atype,a,btype,b) \
28+type fname(atype a,btype b) \
29+{ \
30+register long __res __asm__ ("%d0") = __NR_##sname; \
31+register long __a __asm__ ("%d1") = (long)(a); \
32+register long __b __asm__ ("%d2") = (long)(b); \
33+__asm__ __volatile__ ("trap #0" \
34+ : "+d" (__res) \
35+ : "d" (__a), "d" (__b) \
36+ ); \
37+return (type) __res; \
38+}
39+
40+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
41+type fname(atype a,btype b,ctype c) \
42+{ \
43+register long __res __asm__ ("%d0") = __NR_##sname; \
44+register long __a __asm__ ("%d1") = (long)(a); \
45+register long __b __asm__ ("%d2") = (long)(b); \
46+register long __c __asm__ ("%d3") = (long)(c); \
47+__asm__ __volatile__ ("trap #0" \
48+ : "+d" (__res) \
49+ : "d" (__a), "d" (__b), \
50+ "d" (__c) \
51+ ); \
52+return (type) __res; \
53+}
54+
55+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
56+type fname (atype a, btype b, ctype c, dtype d) \
57+{ \
58+register long __res __asm__ ("%d0") = __NR_##sname; \
59+register long __a __asm__ ("%d1") = (long)(a); \
60+register long __b __asm__ ("%d2") = (long)(b); \
61+register long __c __asm__ ("%d3") = (long)(c); \
62+register long __d __asm__ ("%d4") = (long)(d); \
63+__asm__ __volatile__ ("trap #0" \
64+ : "+d" (__res) \
65+ : "d" (__a), "d" (__b), \
66+ "d" (__c), "d" (__d) \
67+ ); \
68+return (type) __res; \
69+}
70+
71+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
72+type fname (atype a,btype b,ctype c,dtype d,etype e) \
73+{ \
74+register long __res __asm__ ("%d0") = __NR_##sname; \
75+register long __a __asm__ ("%d1") = (long)(a); \
76+register long __b __asm__ ("%d2") = (long)(b); \
77+register long __c __asm__ ("%d3") = (long)(c); \
78+register long __d __asm__ ("%d4") = (long)(d); \
79+register long __e __asm__ ("%d5") = (long)(e); \
80+__asm__ __volatile__ ("trap #0" \
81+ : "+d" (__res) \
82+ : "d" (__a), "d" (__b), \
83+ "d" (__c), "d" (__d), "d" (__e) \
84+ ); \
85+return (type) __res; \
86+}
87+
88Index: libaio-0.3.109/src/syscall-sparc.h
89===================================================================
90--- /dev/null
91+++ libaio-0.3.109/src/syscall-sparc.h
92@@ -0,0 +1,130 @@
93+/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
94+
95+/*
96+ * System calls under the Sparc.
97+ *
98+ * Don't be scared by the ugly clobbers, it is the only way I can
99+ * think of right now to force the arguments into fixed registers
100+ * before the trap into the system call with gcc 'asm' statements.
101+ *
102+ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
103+ *
104+ * SunOS compatibility based upon preliminary work which is:
105+ *
106+ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
107+ */
108+
109+
110+#define __NR_io_setup 268
111+#define __NR_io_destroy 269
112+#define __NR_io_submit 270
113+#define __NR_io_cancel 271
114+#define __NR_io_getevents 272
115+
116+
117+#define io_syscall1(type,fname,sname,type1,arg1) \
118+type fname(type1 arg1) \
119+{ \
120+long __res; \
121+register long __g1 __asm__ ("g1") = __NR_##sname; \
122+register long __o0 __asm__ ("o0") = (long)(arg1); \
123+__asm__ __volatile__ ("t 0x10\n\t" \
124+ "bcc 1f\n\t" \
125+ "mov %%o0, %0\n\t" \
126+ "sub %%g0, %%o0, %0\n\t" \
127+ "1:\n\t" \
128+ : "=r" (__res), "=&r" (__o0) \
129+ : "1" (__o0), "r" (__g1) \
130+ : "cc"); \
131+if (__res < -255 || __res >= 0) \
132+ return (type) __res; \
133+return -1; \
134+}
135+
136+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
137+type fname(type1 arg1,type2 arg2) \
138+{ \
139+long __res; \
140+register long __g1 __asm__ ("g1") = __NR_##sname; \
141+register long __o0 __asm__ ("o0") = (long)(arg1); \
142+register long __o1 __asm__ ("o1") = (long)(arg2); \
143+__asm__ __volatile__ ("t 0x10\n\t" \
144+ "bcc 1f\n\t" \
145+ "mov %%o0, %0\n\t" \
146+ "sub %%g0, %%o0, %0\n\t" \
147+ "1:\n\t" \
148+ : "=r" (__res), "=&r" (__o0) \
149+ : "1" (__o0), "r" (__o1), "r" (__g1) \
150+ : "cc"); \
151+if (__res < -255 || __res >= 0) \
152+ return (type) __res; \
153+return -1; \
154+}
155+
156+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
157+type fname(type1 arg1,type2 arg2,type3 arg3) \
158+{ \
159+long __res; \
160+register long __g1 __asm__ ("g1") = __NR_##sname; \
161+register long __o0 __asm__ ("o0") = (long)(arg1); \
162+register long __o1 __asm__ ("o1") = (long)(arg2); \
163+register long __o2 __asm__ ("o2") = (long)(arg3); \
164+__asm__ __volatile__ ("t 0x10\n\t" \
165+ "bcc 1f\n\t" \
166+ "mov %%o0, %0\n\t" \
167+ "sub %%g0, %%o0, %0\n\t" \
168+ "1:\n\t" \
169+ : "=r" (__res), "=&r" (__o0) \
170+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \
171+ : "cc"); \
172+if (__res < -255 || __res>=0) \
173+ return (type) __res; \
174+return -1; \
175+}
176+
177+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
178+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
179+{ \
180+long __res; \
181+register long __g1 __asm__ ("g1") = __NR_##sname; \
182+register long __o0 __asm__ ("o0") = (long)(arg1); \
183+register long __o1 __asm__ ("o1") = (long)(arg2); \
184+register long __o2 __asm__ ("o2") = (long)(arg3); \
185+register long __o3 __asm__ ("o3") = (long)(arg4); \
186+__asm__ __volatile__ ("t 0x10\n\t" \
187+ "bcc 1f\n\t" \
188+ "mov %%o0, %0\n\t" \
189+ "sub %%g0, %%o0, %0\n\t" \
190+ "1:\n\t" \
191+ : "=r" (__res), "=&r" (__o0) \
192+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \
193+ : "cc"); \
194+if (__res < -255 || __res>=0) \
195+ return (type) __res; \
196+return -1; \
197+}
198+
199+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
200+ type5,arg5) \
201+type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
202+{ \
203+long __res; \
204+register long __g1 __asm__ ("g1") = __NR_##sname; \
205+register long __o0 __asm__ ("o0") = (long)(arg1); \
206+register long __o1 __asm__ ("o1") = (long)(arg2); \
207+register long __o2 __asm__ ("o2") = (long)(arg3); \
208+register long __o3 __asm__ ("o3") = (long)(arg4); \
209+register long __o4 __asm__ ("o4") = (long)(arg5); \
210+__asm__ __volatile__ ("t 0x10\n\t" \
211+ "bcc 1f\n\t" \
212+ "mov %%o0, %0\n\t" \
213+ "sub %%g0, %%o0, %0\n\t" \
214+ "1:\n\t" \
215+ : "=r" (__res), "=&r" (__o0) \
216+ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \
217+ : "cc"); \
218+if (__res < -255 || __res>=0) \
219+ return (type) __res; \
220+return -1; \
221+}
222+
223Index: libaio-0.3.109/src/syscall.h
224===================================================================
225--- libaio-0.3.109.orig/src/syscall.h
226+++ libaio-0.3.109/src/syscall.h
227@@ -24,6 +24,14 @@
228 #include "syscall-alpha.h"
229 #elif defined(__arm__)
230 #include "syscall-arm.h"
231+#elif defined(__m68k__)
232+#include "syscall-m68k.h"
233+#elif defined(__sparc__)
234+#include "syscall-sparc.h"
235+#elif defined(__hppa__)
236+#include "syscall-parisc.h"
237+#elif defined(__mips__)
238+#include "syscall-mips.h"
239 #else
240 #error "add syscall-arch.h"
241 #endif
242Index: libaio-0.3.109/src/syscall-mips.h
243===================================================================
244--- /dev/null
245+++ libaio-0.3.109/src/syscall-mips.h
246@@ -0,0 +1,223 @@
247+/*
248+ * This file is subject to the terms and conditions of the GNU General Public
249+ * License. See the file "COPYING" in the main directory of this archive
250+ * for more details.
251+ *
252+ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
253+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
254+ *
255+ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
256+ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
257+ */
258+
259+#ifndef _MIPS_SIM_ABI32
260+#define _MIPS_SIM_ABI32 1
261+#define _MIPS_SIM_NABI32 2
262+#define _MIPS_SIM_ABI64 3
263+#endif
264+
265+#if _MIPS_SIM == _MIPS_SIM_ABI32
266+
267+/*
268+ * Linux o32 style syscalls are in the range from 4000 to 4999.
269+ */
270+#define __NR_Linux 4000
271+#define __NR_io_setup (__NR_Linux + 241)
272+#define __NR_io_destroy (__NR_Linux + 242)
273+#define __NR_io_getevents (__NR_Linux + 243)
274+#define __NR_io_submit (__NR_Linux + 244)
275+#define __NR_io_cancel (__NR_Linux + 245)
276+
277+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
278+
279+#if _MIPS_SIM == _MIPS_SIM_ABI64
280+
281+/*
282+ * Linux 64-bit syscalls are in the range from 5000 to 5999.
283+ */
284+#define __NR_Linux 5000
285+#define __NR_io_setup (__NR_Linux + 200)
286+#define __NR_io_destroy (__NR_Linux + 201)
287+#define __NR_io_getevents (__NR_Linux + 202)
288+#define __NR_io_submit (__NR_Linux + 203)
289+#define __NR_io_cancel (__NR_Linux + 204)
290+#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
291+
292+#if _MIPS_SIM == _MIPS_SIM_NABI32
293+
294+/*
295+ * Linux N32 syscalls are in the range from 6000 to 6999.
296+ */
297+#define __NR_Linux 6000
298+#define __NR_io_setup (__NR_Linux + 200)
299+#define __NR_io_destroy (__NR_Linux + 201)
300+#define __NR_io_getevents (__NR_Linux + 202)
301+#define __NR_io_submit (__NR_Linux + 203)
302+#define __NR_io_cancel (__NR_Linux + 204)
303+#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
304+
305+#define io_syscall1(type,fname,sname,atype,a) \
306+type fname(atype a) \
307+{ \
308+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
309+ register unsigned long __a3 asm("$7"); \
310+ unsigned long __v0; \
311+ \
312+ __asm__ volatile ( \
313+ ".set\tnoreorder\n\t" \
314+ "li\t$2, %3\t\t\t# " #fname "\n\t" \
315+ "syscall\n\t" \
316+ "move\t%0, $2\n\t" \
317+ ".set\treorder" \
318+ : "=&r" (__v0), "=r" (__a3) \
319+ : "r" (__a0), "i" (__NR_##sname) \
320+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
321+ "memory"); \
322+ \
323+ if (__a3 == 0) \
324+ return (type) __v0; \
325+ return (type) -1; \
326+}
327+
328+#define io_syscall2(type,fname,sname,atype,a,btype,b) \
329+type fname(atype a, btype b) \
330+{ \
331+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
332+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
333+ register unsigned long __a3 asm("$7"); \
334+ unsigned long __v0; \
335+ \
336+ __asm__ volatile ( \
337+ ".set\tnoreorder\n\t" \
338+ "li\t$2, %4\t\t\t# " #fname "\n\t" \
339+ "syscall\n\t" \
340+ "move\t%0, $2\n\t" \
341+ ".set\treorder" \
342+ : "=&r" (__v0), "=r" (__a3) \
343+ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
344+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
345+ "memory"); \
346+ \
347+ if (__a3 == 0) \
348+ return (type) __v0; \
349+ return (type) -1; \
350+}
351+
352+#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
353+type fname(atype a, btype b, ctype c) \
354+{ \
355+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
356+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
357+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
358+ register unsigned long __a3 asm("$7"); \
359+ unsigned long __v0; \
360+ \
361+ __asm__ volatile ( \
362+ ".set\tnoreorder\n\t" \
363+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
364+ "syscall\n\t" \
365+ "move\t%0, $2\n\t" \
366+ ".set\treorder" \
367+ : "=&r" (__v0), "=r" (__a3) \
368+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
369+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
370+ "memory"); \
371+ \
372+ if (__a3 == 0) \
373+ return (type) __v0; \
374+ return (type) -1; \
375+}
376+
377+#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
378+type fname(atype a, btype b, ctype c, dtype d) \
379+{ \
380+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
381+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
382+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
383+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
384+ unsigned long __v0; \
385+ \
386+ __asm__ volatile ( \
387+ ".set\tnoreorder\n\t" \
388+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
389+ "syscall\n\t" \
390+ "move\t%0, $2\n\t" \
391+ ".set\treorder" \
392+ : "=&r" (__v0), "+r" (__a3) \
393+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
394+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
395+ "memory"); \
396+ \
397+ if (__a3 == 0) \
398+ return (type) __v0; \
399+ return (type) -1; \
400+}
401+
402+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
403+
404+/*
405+ * Using those means your brain needs more than an oil change ;-)
406+ */
407+
408+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
409+type fname(atype a, btype b, ctype c, dtype d, etype e) \
410+{ \
411+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
412+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
413+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
414+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
415+ unsigned long __v0; \
416+ \
417+ __asm__ volatile ( \
418+ ".set\tnoreorder\n\t" \
419+ "lw\t$2, %6\n\t" \
420+ "subu\t$29, 32\n\t" \
421+ "sw\t$2, 16($29)\n\t" \
422+ "li\t$2, %5\t\t\t# " #fname "\n\t" \
423+ "syscall\n\t" \
424+ "move\t%0, $2\n\t" \
425+ "addiu\t$29, 32\n\t" \
426+ ".set\treorder" \
427+ : "=&r" (__v0), "+r" (__a3) \
428+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \
429+ "m" ((unsigned long)e) \
430+ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
431+ "memory"); \
432+ \
433+ if (__a3 == 0) \
434+ return (type) __v0; \
435+ return (type) -1; \
436+}
437+
438+#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
439+
440+#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
441+
442+#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
443+type fname (atype a,btype b,ctype c,dtype d,etype e) \
444+{ \
445+ register unsigned long __a0 asm("$4") = (unsigned long) a; \
446+ register unsigned long __a1 asm("$5") = (unsigned long) b; \
447+ register unsigned long __a2 asm("$6") = (unsigned long) c; \
448+ register unsigned long __a3 asm("$7") = (unsigned long) d; \
449+ register unsigned long __a4 asm("$8") = (unsigned long) e; \
450+ unsigned long __v0; \
451+ \
452+ __asm__ volatile ( \
453+ ".set\tnoreorder\n\t" \
454+ "li\t$2, %6\t\t\t# " #fname "\n\t" \
455+ "syscall\n\t" \
456+ "move\t%0, $2\n\t" \
457+ ".set\treorder" \
458+ : "=&r" (__v0), "+r" (__a3) \
459+ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
460+ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
461+ "memory"); \
462+ \
463+ if (__a3 == 0) \
464+ return (type) __v0; \
465+ return (type) -1; \
466+}
467+
468+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
469+
470Index: libaio-0.3.109/src/libaio.h
471===================================================================
472--- libaio-0.3.109.orig/src/libaio.h
473+++ libaio-0.3.109/src/libaio.h
474@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd {
475 #define PADDEDptr(x, y) x; unsigned y
476 #define PADDEDul(x, y) unsigned long x; unsigned y
477 # endif
478+#elif defined(__m68k__) /* big endian, 32 bits */
479+#define PADDED(x, y) unsigned y; x
480+#define PADDEDptr(x, y) unsigned y; x
481+#define PADDEDul(x, y) unsigned y; unsigned long x
482+#elif defined(__sparc__) /* big endian, 32 bits */
483+#define PADDED(x, y) unsigned y; x
484+#define PADDEDptr(x, y) unsigned y; x
485+#define PADDEDul(x, y) unsigned y; unsigned long x
486+#elif defined(__hppa__) /* big endian, 32 bits */
487+#define PADDED(x, y) unsigned y; x
488+#define PADDEDptr(x, y) unsigned y; x
489+#define PADDEDul(x, y) unsigned y; unsigned long x
490+#elif defined(__mips__)
491+# if defined (__MIPSEB__) /* big endian, 32 bits */
492+#define PADDED(x, y) unsigned y; x
493+#define PADDEDptr(x, y) unsigned y; x
494+#define PADDEDul(x, y) unsigned y; unsigned long x
495+# elif defined(__MIPSEL__) /* little endian, 32 bits */
496+#define PADDED(x, y) x; unsigned y
497+#define PADDEDptr(x, y) x; unsigned y
498+#define PADDEDul(x, y) unsigned long x; unsigned y
499+# else
500+# error "neither mipseb nor mipsel?"
501+# endif
502 #else
503 #error endian?
504 #endif
505Index: libaio-0.3.109/src/syscall-parisc.h
506===================================================================
507--- /dev/null
508+++ libaio-0.3.109/src/syscall-parisc.h
509@@ -0,0 +1,146 @@
510+/*
511+ * Linux system call numbers.
512+ *
513+ * Cary Coutant says that we should just use another syscall gateway
514+ * page to avoid clashing with the HPUX space, and I think he's right:
515+ * it will would keep a branch out of our syscall entry path, at the
516+ * very least. If we decide to change it later, we can ``just'' tweak
517+ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
518+ * 1024 or something. Oh, and recompile libc. =)
519+ *
520+ * 64-bit HPUX binaries get the syscall gateway address passed in a register
521+ * from the kernel at startup, which seems a sane strategy.
522+ */
523+
524+#define __NR_Linux 0
525+#define __NR_io_setup (__NR_Linux + 215)
526+#define __NR_io_destroy (__NR_Linux + 216)
527+#define __NR_io_getevents (__NR_Linux + 217)
528+#define __NR_io_submit (__NR_Linux + 218)
529+#define __NR_io_cancel (__NR_Linux + 219)
530+
531+#define SYS_ify(syscall_name) __NR_##syscall_name
532+
533+/* Assume all syscalls are done from PIC code just to be
534+ * safe. The worst case scenario is that you lose a register
535+ * and save/restore r19 across the syscall. */
536+#define PIC
537+
538+/* Definition taken from glibc 2.3.3
539+ * sysdeps/unix/sysv/linux/hppa/sysdep.h
540+ */
541+
542+#ifdef PIC
543+/* WARNING: CANNOT BE USED IN A NOP! */
544+# define K_STW_ASM_PIC " copy %%r19, %%r4\n"
545+# define K_LDW_ASM_PIC " copy %%r4, %%r19\n"
546+# define K_USING_GR4 "%r4",
547+#else
548+# define K_STW_ASM_PIC " \n"
549+# define K_LDW_ASM_PIC " \n"
550+# define K_USING_GR4
551+#endif
552+
553+/* GCC has to be warned that a syscall may clobber all the ABI
554+ registers listed as "caller-saves", see page 8, Table 2
555+ in section 2.2.6 of the PA-RISC RUN-TIME architecture
556+ document. However! r28 is the result and will conflict with
557+ the clobber list so it is left out. Also the input arguments
558+ registers r20 -> r26 will conflict with the list so they
559+ are treated specially. Although r19 is clobbered by the syscall
560+ we cannot say this because it would violate ABI, thus we say
561+ r4 is clobbered and use that register to save/restore r19
562+ across the syscall. */
563+
564+#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
565+ "%r20", "%r29", "%r31"
566+
567+#undef K_INLINE_SYSCALL
568+#define K_INLINE_SYSCALL(name, nr, args...) ({ \
569+ long __sys_res; \
570+ { \
571+ register unsigned long __res __asm__("r28"); \
572+ K_LOAD_ARGS_##nr(args) \
573+ /* FIXME: HACK stw/ldw r19 around syscall */ \
574+ __asm__ volatile( \
575+ K_STW_ASM_PIC \
576+ " ble 0x100(%%sr2, %%r0)\n" \
577+ " ldi %1, %%r20\n" \
578+ K_LDW_ASM_PIC \
579+ : "=r" (__res) \
580+ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \
581+ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \
582+ ); \
583+ __sys_res = (long)__res; \
584+ } \
585+ __sys_res; \
586+})
587+
588+#define K_LOAD_ARGS_0()
589+#define K_LOAD_ARGS_1(r26) \
590+ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
591+ K_LOAD_ARGS_0()
592+#define K_LOAD_ARGS_2(r26,r25) \
593+ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
594+ K_LOAD_ARGS_1(r26)
595+#define K_LOAD_ARGS_3(r26,r25,r24) \
596+ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
597+ K_LOAD_ARGS_2(r26,r25)
598+#define K_LOAD_ARGS_4(r26,r25,r24,r23) \
599+ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
600+ K_LOAD_ARGS_3(r26,r25,r24)
601+#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \
602+ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
603+ K_LOAD_ARGS_4(r26,r25,r24,r23)
604+#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
605+ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
606+ K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
607+
608+/* Even with zero args we use r20 for the syscall number */
609+#define K_ASM_ARGS_0
610+#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
611+#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
612+#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
613+#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
614+#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
615+#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
616+
617+/* The registers not listed as inputs but clobbered */
618+#define K_CLOB_ARGS_6
619+#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
620+#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
621+#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
622+#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
623+#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
624+#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
625+
626+#define io_syscall1(type,fname,sname,type1,arg1) \
627+type fname(type1 arg1) \
628+{ \
629+ return K_INLINE_SYSCALL(sname, 1, arg1); \
630+}
631+
632+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
633+type fname(type1 arg1, type2 arg2) \
634+{ \
635+ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \
636+}
637+
638+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
639+type fname(type1 arg1, type2 arg2, type3 arg3) \
640+{ \
641+ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \
642+}
643+
644+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
645+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
646+{ \
647+ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \
648+}
649+
650+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
651+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
652+{ \
653+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
654+}
655+
656Index: libaio-0.3.109/src/syscall-arm.h
657===================================================================
658--- libaio-0.3.109.orig/src/syscall-arm.h
659+++ libaio-0.3.109/src/syscall-arm.h
660@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3
661 return (type) __res_r0; \
662 }
663
664+/*
665+ * linux/include/asm-arm/unistd.h
666+ *
667+ * Copyright (C) 2001-2005 Russell King
668+ *
669+ * This program is free software; you can redistribute it and/or modify
670+ * it under the terms of the GNU General Public License version 2 as
671+ * published by the Free Software Foundation.
672+ *
673+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
674+ * no matter what the change is. Thanks!
675+ */
676+
677+#define __NR_OABI_SYSCALL_BASE 0x900000
678+
679+#if defined(__thumb__) || defined(__ARM_EABI__)
680+#define __NR_SYSCALL_BASE 0
681+#else
682+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
683+#endif
684+
685+#define __NR_io_setup (__NR_SYSCALL_BASE+243)
686+#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
687+#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
688+#define __NR_io_submit (__NR_SYSCALL_BASE+246)
689+#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
690+
691+#define __sys2(x) #x
692+#define __sys1(x) __sys2(x)
693+
694+#if defined(__thumb__) || defined(__ARM_EABI__)
695+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
696+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
697+#define __syscall(name) "swi\t0"
698+#else
699+#define __SYS_REG(name)
700+#define __SYS_REG_LIST(regs...) regs
701+#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
702+#endif
703+
704+#define io_syscall1(type,fname,sname,type1,arg1) \
705+type fname(type1 arg1) { \
706+ __SYS_REG(sname) \
707+ register long __r0 __asm__("r0") = (long)arg1; \
708+ register long __res_r0 __asm__("r0"); \
709+ __asm__ __volatile__ ( \
710+ __syscall(sname) \
711+ : "=r" (__res_r0) \
712+ : __SYS_REG_LIST( "0" (__r0) ) \
713+ : "memory" ); \
714+ return (type) __res_r0; \
715+}
716+
717+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
718+type fname(type1 arg1,type2 arg2) { \
719+ __SYS_REG(sname) \
720+ register long __r0 __asm__("r0") = (long)arg1; \
721+ register long __r1 __asm__("r1") = (long)arg2; \
722+ register long __res_r0 __asm__("r0"); \
723+ __asm__ __volatile__ ( \
724+ __syscall(sname) \
725+ : "=r" (__res_r0) \
726+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \
727+ : "memory" ); \
728+ return (type) __res_r0; \
729+}
730+
731+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
732+type fname(type1 arg1,type2 arg2,type3 arg3) { \
733+ __SYS_REG(sname) \
734+ register long __r0 __asm__("r0") = (long)arg1; \
735+ register long __r1 __asm__("r1") = (long)arg2; \
736+ register long __r2 __asm__("r2") = (long)arg3; \
737+ register long __res_r0 __asm__("r0"); \
738+ __asm__ __volatile__ ( \
739+ __syscall(sname) \
740+ : "=r" (__res_r0) \
741+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \
742+ : "memory" ); \
743+ return (type) __res_r0; \
744+}
745+
746+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
747+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
748+ __SYS_REG(sname) \
749+ register long __r0 __asm__("r0") = (long)arg1; \
750+ register long __r1 __asm__("r1") = (long)arg2; \
751+ register long __r2 __asm__("r2") = (long)arg3; \
752+ register long __r3 __asm__("r3") = (long)arg4; \
753+ register long __res_r0 __asm__("r0"); \
754+ __asm__ __volatile__ ( \
755+ __syscall(sname) \
756+ : "=r" (__res_r0) \
757+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
758+ : "memory" ); \
759+ return (type) __res_r0; \
760+}
761+
762+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
763+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
764+ __SYS_REG(sname) \
765+ register long __r0 __asm__("r0") = (long)arg1; \
766+ register long __r1 __asm__("r1") = (long)arg2; \
767+ register long __r2 __asm__("r2") = (long)arg3; \
768+ register long __r3 __asm__("r3") = (long)arg4; \
769+ register long __r4 __asm__("r4") = (long)arg5; \
770+ register long __res_r0 __asm__("r0"); \
771+ __asm__ __volatile__ ( \
772+ __syscall(sname) \
773+ : "=r" (__res_r0) \
774+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \
775+ "r" (__r3), "r" (__r4) ) \
776+ : "memory" ); \
777+ return (type) __res_r0; \
778+}
779+
diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch
new file mode 100644
index 0000000000..dad9601c49
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3from openembedded, added by Qing He <qing.he@intel.com>
4
5Index: libaio-0.3.106/Makefile
6===================================================================
7--- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800
8+++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700
9@@ -15,7 +15,7 @@
10 @$(MAKE) -C src
11
12 install:
13- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
14+ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
15
16
17 clean:
diff --git a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
new file mode 100644
index 0000000000..e3d10585de
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch
@@ -0,0 +1,28 @@
1Upstream-Status: Submitted
2
3Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
4
5---
6 harness/cases/16.t | 2 ++
7 src/libaio.h | 10 ++++++++++
8 2 files changed, 12 insertions(+)
9
10--- a/src/libaio.h
11+++ b/src/libaio.h
12@@ -107,6 +107,16 @@
13 # else
14 # error "neither mipseb nor mipsel?"
15 # endif
16+#elif defined(__aarch64__)
17+# if defined (__AARCH64EB__) /* big endian, 64 bits */
18+#define PADDED(x, y) unsigned y; x
19+#define PADDEDptr(x,y) x
20+#define PADDEDul(x, y) unsigned long x
21+# elif defined(__AARCH64EL__) /* little endian, 64 bits */
22+#define PADDED(x, y) x, y
23+#define PADDEDptr(x, y) x
24+#define PADDEDul(x, y) unsigned long x
25+# endif
26 #else
27 #error endian?
28 #endif
diff --git a/meta/recipes-extended/libaio/libaio/libaio-generic.patch b/meta/recipes-extended/libaio/libaio/libaio-generic.patch
new file mode 100644
index 0000000000..3fcf541626
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio-generic.patch
@@ -0,0 +1,65 @@
1From 5e96c73d5dfbdea8d0be82b7f3fc8d6735e5dfa7 Mon Sep 17 00:00:00 2001
2From: Mike Frysinger <vapier@gentoo.org>
3Date: Sun, 17 Jan 2010 17:07:48 -0500
4Subject: [PATCH] add a generic syscall() fallback
5
6Upstream-Status: Pending
7
8Signed-off-by: Mike Frysinger <vapier@gentoo.org>
9Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
10---
11 src/syscall-generic.h | 29 +++++++++++++++++++++++++++++
12 src/syscall.h | 3 ++-
13 2 files changed, 31 insertions(+), 1 deletions(-)
14 create mode 100644 src/syscall-generic.h
15
16diff --git a/src/syscall-generic.h b/src/syscall-generic.h
17new file mode 100644
18index 0000000..24d7c7c
19--- /dev/null
20+++ b/src/syscall-generic.h
21@@ -0,0 +1,29 @@
22+#include <errno.h>
23+#include <unistd.h>
24+#include <sys/syscall.h>
25+
26+#define _body_io_syscall(sname, args...) \
27+{ \
28+ int ret = syscall(__NR_##sname, ## args); \
29+ return ret < 0 ? -errno : ret; \
30+}
31+
32+#define io_syscall1(type,fname,sname,type1,arg1) \
33+type fname(type1 arg1) \
34+_body_io_syscall(sname, (long)arg1)
35+
36+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
37+type fname(type1 arg1,type2 arg2) \
38+_body_io_syscall(sname, (long)arg1, (long)arg2)
39+
40+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
41+type fname(type1 arg1,type2 arg2,type3 arg3) \
42+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3)
43+
44+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
45+type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
46+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4)
47+
48+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \
49+type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
50+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5)
51diff --git a/src/syscall.h b/src/syscall.h
52index 78becfe..d954af0 100644
53--- a/src/syscall.h
54+++ b/src/syscall.h
55@@ -25,5 +25,6 @@
56 #elif defined(__arm__)
57 #include "syscall-arm.h"
58 #else
59-#error "add syscall-arch.h"
60+#warning "using generic syscall method"
61+#include "syscall-generic.h"
62 #endif
63--
641.7.3.1
65
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
new file mode 100644
index 0000000000..022276af83
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
@@ -0,0 +1,62 @@
1Upstream status: Inappropriate [embedded specific]
2
3Signed-off-by: Phil Staub <Phil.Staub@windriver.com>
4
5Index: libaio-0.3.109/src/syscall-mips.h
6===================================================================
7--- libaio-0.3.109.orig/src/syscall-mips.h
8+++ libaio-0.3.109/src/syscall-mips.h
9@@ -76,7 +76,7 @@ type fname(atype a) \
10 \
11 if (__a3 == 0) \
12 return (type) __v0; \
13- return (type) -1; \
14+ return (type) (-(__v0)); \
15 }
16
17 #define io_syscall2(type,fname,sname,atype,a,btype,b) \
18@@ -100,7 +100,7 @@ type fname(atype a, btype b) \
19 \
20 if (__a3 == 0) \
21 return (type) __v0; \
22- return (type) -1; \
23+ return (type) (-(__v0)); \
24 }
25
26 #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
27@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \
28 \
29 if (__a3 == 0) \
30 return (type) __v0; \
31- return (type) -1; \
32+ return (type) (-(__v0)); \
33 }
34
35 #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
36@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt
37 \
38 if (__a3 == 0) \
39 return (type) __v0; \
40- return (type) -1; \
41+ return (type) (-(__v0)); \
42 }
43
44 #if (_MIPS_SIM == _MIPS_SIM_ABI32)
45@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt
46 \
47 if (__a3 == 0) \
48 return (type) __v0; \
49- return (type) -1; \
50+ return (type) (-(__v0)); \
51 }
52
53 #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
54@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp
55 \
56 if (__a3 == 0) \
57 return (type) __v0; \
58- return (type) -1; \
59+ return (type) (-(__v0)); \
60 }
61
62 #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
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 0000000000..508f5a12f1
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
@@ -0,0 +1,61 @@
1Upstream-Status: Pending
2
3Properly load arguments 5 an 6 for x86-64 syscall
4Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
5syscall so that it works with both x32 and x86-64.
6
7Received this patch from H.J. Lu <hjl.tools@gmail.com>
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102011/12/02
11
12--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
13+++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800
14@@ -1,8 +1,18 @@
15+#ifndef __NR_io_setup
16 #define __NR_io_setup 206
17+#endif
18+#ifndef __NR_io_destroy
19 #define __NR_io_destroy 207
20+#endif
21+#ifndef __NR_io_getevents
22 #define __NR_io_getevents 208
23+#endif
24+#ifndef __NR_io_submit
25 #define __NR_io_submit 209
26+#endif
27+#ifndef __NR_io_cancel
28 #define __NR_io_cancel 210
29+#endif
30
31 #define __syscall_clobber "r11","rcx","memory"
32 #define __syscall "syscall"
33@@ -42,10 +52,11 @@ return __res; \
34 type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
35 { \
36 long __res; \
37-__asm__ volatile ("movq %5,%%r10 ;" __syscall \
38+register long __a4 asm ("r10") = (long) arg4; \
39+__asm__ volatile (__syscall \
40 : "=a" (__res) \
41 : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
42- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
43+ "d" ((long)(arg3)),"r" (__a4)); \
44 return __res; \
45 }
46
47@@ -54,10 +65,11 @@ return __res; \
48 type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
49 { \
50 long __res; \
51-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
52+register long __a4 asm ("r10") = (long) arg4; \
53+register long __a5 asm ("r8") = (long) arg5; \
54+__asm__ volatile ( __syscall \
55 : "=a" (__res) \
56 : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
57- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
58- __syscall_clobber,"r8","r10" ); \
59+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
60 return __res; \
61 }
diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch
new file mode 100644
index 0000000000..4d88ec167b
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/toolchain.patch
@@ -0,0 +1,27 @@
1Upstream-Status: Inappropriate [embedded specific]
2
38/27/2010 - created by Qing He <qing.he@intel.com>
4
5diff --git a/src/Makefile b/src/Makefile
6index 8d134cc..df8e5b6 100644
7--- a/src/Makefile
8+++ b/src/Makefile
9@@ -2,7 +2,6 @@ prefix=/usr
10 includedir=$(prefix)/include
11 libdir=$(prefix)/lib
12
13-ARCH := $(shell uname -m | sed -e s/i.86/i386/)
14 CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
15 SO_CFLAGS=-shared $(CFLAGS)
16 L_CFLAGS=$(CFLAGS)
17@@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
18
19 libaio.a: $(libaio_objs)
20 rm -f libaio.a
21- ar r libaio.a $^
22- ranlib libaio.a
23+ $(AR) r libaio.a $^
24+ $(RANLIB) libaio.a
25
26 $(libname): $(libaio_sobjs) libaio.map
27 $(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 0000000000..978f5f5fb5
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Asynchronous I/O library"
2DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface"
3HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
4
5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
7
8PR = "r2"
9
10SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
11 file://00_arches.patch \
12 file://toolchain.patch \
13 file://destdir.patch \
14 file://libaio_fix_for_x32.patch \
15 file://libaio-generic.patch \
16 file://libaio-aarch64.patch \
17 file://libaio_fix_for_mips_syscalls.patch \
18"
19
20SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756"
21SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d"
22
23EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
24
25do_configure () {
26 sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile
27}
28
29do_install () {
30 oe_runmake install DESTDIR=${D}
31}
diff --git a/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
new file mode 100644
index 0000000000..126f80e044
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
@@ -0,0 +1,38 @@
1From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sat, 22 Feb 2014 14:35:59 +0800
4Subject: [PATCH] Fix CVE-2013-0211
5
6This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
7
8Upstream-Status: Backport
9
10Signed-off-by: Baogen shang <baogen.shang@windriver.com>
11
12Update the patch because of uprev on 20140222
13
14Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
15---
16 libarchive/archive_write.c | 4 ++++
17 1 file changed, 4 insertions(+)
18
19diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c
20index a3d1a33..a323588 100644
21--- a/libarchive/archive_write.c
22+++ b/libarchive/archive_write.c
23@@ -671,8 +671,12 @@ static ssize_t
24 _archive_write_data(struct archive *_a, const void *buff, size_t s)
25 {
26 struct archive_write *a = (struct archive_write *)_a;
27+ const size_t max_write = INT_MAX;
28 archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
29 ARCHIVE_STATE_DATA, "archive_write_data");
30+ /* In particular, this catches attempts to pass negative values. */
31+ if (s > max_write)
32+ s = max_write;
33 archive_clear_error(&a->archive);
34 return ((a->format_write_data)(a, buff, s));
35 }
36--
371.8.2.1
38
diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
new file mode 100644
index 0000000000..f90dc022dc
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Support for reading various archive formats"
2DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
3HOMEPAGE = "http://www.libarchive.org/"
4SECTION = "devel"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841"
7
8PACKAGECONFIG ?= "libxml2 zlib bz2"
9
10PACKAGECONFIG_append_class-target = "\
11 ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
12 ${@base_contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
13 ${@base_contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
14"
15
16PACKAGECONFIG_append_class-nativesdk = " largefile"
17
18PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
19PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
20PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
21PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
22PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
23PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
24PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
25PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
26PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
27PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
28
29SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
30 file://libarchive-CVE-2013-0211.patch \
31 "
32
33SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
34SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
35
36inherit autotools-brokensep lib_package
37
38BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
new file mode 100644
index 0000000000..3476bb9596
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Inappropriate
2
3automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that,
4and the warnings are treated as errors because of the -Werror parameter.
5
6These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not
7eliminated these deprecated macros yet. So disable the treatment of warnings
8as errors until gettext is updated to remove the deprecated macros.
9
10Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
112012/07/10
12
13Index: libidn-1.24/configure.ac
14===================================================================
15--- libidn-1.24.orig/configure.ac
16+++ libidn-1.24/configure.ac
17@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si
18 AC_CONFIG_AUX_DIR([build-aux])
19 AC_CONFIG_MACRO_DIR([m4])
20 AC_CONFIG_HEADERS(config.h)
21-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
22+AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override])
23 AM_SILENT_RULES([yes])
24
25 # Library code modified: REVISION++
diff --git a/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch
new file mode 100644
index 0000000000..0863530f29
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Inappropriate [disable feature]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am
5--- libidn-1.26/doc/Makefile.am 2012-09-18 11:25:45.000000000 +0300
6+++ libidn-1.26/doc/Makefile.am 2013-02-08 07:41:24.591431462 +0200
7@@ -49,15 +49,9 @@
8
9 # Man pages.
10
11-dist_man_MANS = idn.1 $(gdoc_MANS)
12+dist_man_MANS = $(gdoc_MANS)
13 MAINTAINERCLEANFILES = $(dist_man_MANS)
14
15-idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \
16- $(top_srcdir)/configure.ac
17- $(HELP2MAN) \
18- --name="Internationalized Domain Names command line tool" \
19- --output=$@ $(top_builddir)/src/idn$(EXEEXT)
20-
21 # GDOC
22
23 GDOC_BIN = $(srcdir)/gdoc
diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..20afd257be
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Pending
2
3This patch fixes following issue with automake 1.12
4
5| automake: warnings are treated as errors
6| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libidn.la': linking libtool libraries using a non-POSIX
7| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/03
11
12Index: libidn-1.24/configure.ac
13===================================================================
14--- libidn-1.24.orig/configure.ac
15+++ libidn-1.24/configure.ac
16@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
17 AC_SUBST(LT_REVISION, 7)
18 AC_SUBST(LT_AGE, 6)
19
20+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
21+m4_pattern_allow([AM_PROG_AR])
22+AM_PROG_AR
23+
24 AC_PROG_CC
25 gl_EARLY
26 lgl_EARLY
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 0000000000..a13ed27135
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Internationalized Domain Name support library"
2DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
3HOMEPAGE = "http://www.gnu.org/software/libidn/"
4SECTION = "libs"
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
7 file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
8 file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \
9 file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4"
10PR = "r1"
11
12inherit pkgconfig autotools gettext
13
14SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz"
15
16SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d"
17SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3"
18
19do_configure_prepend() {
20 # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from
21 # autoconf CVS because atm the autoconf it uses is a bit old
22 # now with cross autotool, that macro is already there and this
23 # local definition causes circular dependency. Actually AC_GNU_SOURCE
24 # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local
25 # references to the latter here.
26 sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4
27 rm -f ${S}/lib/gl/m4/extensions.m4
28}
29
30do_install_append() {
31 rm -rf ${D}${libdir}/Libidn.dll
32}
diff --git a/meta/recipes-extended/libidn/libidn_1.28.bb b/meta/recipes-extended/libidn/libidn_1.28.bb
new file mode 100644
index 0000000000..effd5ea0bd
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_1.28.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Internationalized Domain Name support library"
2DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
3HOMEPAGE = "http://www.gnu.org/software/libidn/"
4SECTION = "libs"
5LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=3231f57e8fce0f62f81b03107e788888 \
7 file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
8 file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
9 file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
11 file://lib/idna.h;endline=21;md5=f73089b7f52dd2cb3540e274bd76106d \
12 file://src/idn.c;endline=20;md5=d7797e6cc3a7b48e6050fc0d27104595"
13
14inherit pkgconfig autotools gettext
15
16SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
17 file://libidn_fix_for_automake-1.12.patch \
18 file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
19 file://dont-depend-on-help2man.patch \
20"
21
22SRC_URI[md5sum] = "43a6f14b16559e10a492acc65c4b0acc"
23SRC_URI[sha256sum] = "dd357a968449abc97c7e5fa088a4a384de57cb36564f9d4e0d898ecc6373abfb"
24
25# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
26# so package command into a separate package
27PACKAGES =+ "idn"
28FILES_idn = "${bindir}/*"
29
30EXTRA_OECONF = "--disable-csharp"
31
32do_install_append() {
33 rm -rf ${D}${datadir}/emacs
34}
diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
new file mode 100644
index 0000000000..4a785d344a
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
@@ -0,0 +1,26 @@
1Fix a possible overflow (reported by _FORTIFY_SOURCE=2)
2
3Ported from Gentoo
4
5Upstream-Status: Pending
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Index: libtirpc-0.2.1/src/getrpcport.c
10===================================================================
11--- libtirpc-0.2.1.orig/src/getrpcport.c
12+++ libtirpc-0.2.1/src/getrpcport.c
13@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto
14
15 if ((hp = gethostbyname(host)) == NULL)
16 return (0);
17+ if (hp->h_length != sizeof(addr.sin_addr.s_addr))
18+ return (0);
19 memset(&addr, 0, sizeof(addr));
20 addr.sin_family = AF_INET;
21 addr.sin_port = 0;
22- if (hp->h_length > sizeof(addr))
23- hp->h_length = sizeof(addr);
24 memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
25 /* Inconsistent interfaces need casts! :-( */
26 return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum,
diff --git a/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
new file mode 100644
index 0000000000..d003348af9
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
@@ -0,0 +1,38 @@
1uclibc does not provide des functionality unlike eglibc so lets disable ssl support
2
3Upstream-Status: Inappropriate [uclibc specific]
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5
6Index: libtirpc-0.2.3/src/rpc_soc.c
7===================================================================
8--- libtirpc-0.2.3.orig/src/rpc_soc.c 2013-03-10 16:00:51.355282153 -0700
9+++ libtirpc-0.2.3/src/rpc_soc.c 2013-03-10 16:00:51.703282148 -0700
10@@ -520,6 +520,7 @@
11 (resultproc_t) rpc_wrap_bcast, "udp");
12 }
13
14+#if 0
15 /*
16 * Create the client des authentication object. Obsoleted by
17 * authdes_seccreate().
18@@ -551,6 +552,7 @@
19 dummy = authdes_seccreate(servername, window, NULL, ckey);
20 return (dummy);
21 }
22+#endif
23
24 /*
25 * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
26Index: libtirpc-0.2.3/src/Makefile.am
27===================================================================
28--- libtirpc-0.2.3.orig/src/Makefile.am 2013-03-10 16:00:51.355282153 -0700
29+++ libtirpc-0.2.3/src/Makefile.am 2013-03-10 16:00:51.703282148 -0700
30@@ -50,7 +50,7 @@
31 rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
32 rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
33 svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
34- auth_time.c auth_des.c authdes_prot.c
35+ auth_time.c
36
37 ## XDR
38 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.4.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb
new file mode 100644
index 0000000000..88e2d820ee
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.4.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Transport-Independent RPC library"
2DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
3SECTION = "libs/network"
4HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
5BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
8 file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
9
10DEPENDS += "xz-native"
11PROVIDES = "virtual/librpc"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2;name=libtirpc \
14 ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
15 file://libtirpc-0.2.1-fortify.patch \
16 "
17
18SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch"
19
20SRC_URI[libtirpc.md5sum] = "847995e8d002cbf1387bda05947be086"
21SRC_URI[libtirpc.sha256sum] = "45c3e21dfc23a5ba501f9dfc6671678316fdfdb8355a1ec404ae2aa2f81943a1"
22SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
23SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
24
25inherit autotools pkgconfig
26
27EXTRA_OECONF = "--disable-gssapi"
28
29do_configure_prepend () {
30 cp -r ${S}/../tirpc ${S}
31}
32
33do_install_append() {
34 chown root:root ${D}${sysconfdir}/netconfig
35}
diff --git a/meta/recipes-extended/libuser/libuser/fixsepbuild.patch b/meta/recipes-extended/libuser/libuser/fixsepbuild.patch
new file mode 100644
index 0000000000..893ca1490b
--- /dev/null
+++ b/meta/recipes-extended/libuser/libuser/fixsepbuild.patch
@@ -0,0 +1,35 @@
1Fix out of tree build errors and parallel make issues. The mkdir commands
2can race each other. The srcdir variable is a complete path so a ../ prefix makes
3no sense.
4
5Upstream-Status: Pending
6
7RP 2013/03/21
8
9Index: libuser-0.58/docs/Makefile.am
10===================================================================
11--- libuser-0.58.orig/docs/Makefile.am 2012-11-07 18:25:58.000000000 -0800
12+++ libuser-0.58/docs/Makefile.am 2013-03-22 23:32:06.843518069 -0700
13@@ -8,14 +8,14 @@
14
15 all: sgml/libuser.txt sgml/libuser.html
16
17-libuser.conf.5: $(srcdir)/libuser.conf.5.in Makefile
18+libuser.conf.5: $(abs_srcdir)/libuser.conf.5.in Makefile
19 sed 's,@sysconfdir\@,$(sysconfdir),g' \
20- < $(srcdir)/libuser.conf.5.in > $@
21+ < $(abs_srcdir)/libuser.conf.5.in > $@
22
23-sgml/libuser.txt: $(srcdir)/sgml/libuser.sgml
24- [ -d sgml ] || mkdir sgml
25- cd sgml; sgml2txt ../$(srcdir)/sgml/libuser.sgml
26+sgml/libuser.txt: $(abs_srcdir)/sgml/libuser.sgml
27+ [ -d sgml ] || mkdir sgml || true
28+ cd sgml; sgml2txt $(abs_srcdir)/sgml/libuser.sgml
29
30-sgml/libuser.html: $(srcdir)/sgml/libuser.sgml
31- [ -d sgml ] || mkdir sgml
32- cd sgml; sgml2html ../$(srcdir)/sgml/libuser.sgml
33+sgml/libuser.html: $(abs_srcdir)/sgml/libuser.sgml
34+ [ -d sgml ] || mkdir sgml || true
35+ cd sgml; sgml2html $(abs_srcdir)/sgml/libuser.sgml
diff --git a/meta/recipes-extended/libuser/libuser_0.60.bb b/meta/recipes-extended/libuser/libuser_0.60.bb
new file mode 100644
index 0000000000..ca608c7466
--- /dev/null
+++ b/meta/recipes-extended/libuser/libuser_0.60.bb
@@ -0,0 +1,30 @@
1SUMMARY = "user and group account administration library"
2DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \
3and group accounts"
4HOMEPAGE = "https://fedorahosted.org/libuser/"
5BUGTRACKER = "https://fedorahosted.org/libuser/newticket"
6
7LICENSE = "LGPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
9 file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \
10 file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1"
11
12SECTION = "base"
13
14SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
15 file://fixsepbuild.patch"
16
17SRC_URI[md5sum] = "5c549724999ccca65ceaaecc4eb8cb98"
18SRC_URI[sha256sum] = "b1f73408ebfee79eb01a47c5879a2cdef6a00b75ee24870de7df1b816ff483eb"
19
20DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python"
21
22inherit autotools gettext pythonnative python-dir
23
24EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}"
25
26PACKAGES += "${PN}-python "
27
28FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
29FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
30
diff --git a/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd
new file mode 100644
index 0000000000..cd25bf17b3
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/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/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
new file mode 100644
index 0000000000..bf89a60b7d
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
@@ -0,0 +1,34 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4DAEMON=/usr/sbin/lighttpd
5NAME=lighttpd
6DESC="Lighttpd Web Server"
7OPTS="-f /etc/lighttpd.conf"
8
9case "$1" in
10 start)
11 echo -n "Starting $DESC: "
12 start-stop-daemon --start -x "$DAEMON" -- $OPTS
13 echo "$NAME."
14 ;;
15 stop)
16 echo -n "Stopping $DESC: "
17 start-stop-daemon --stop -x "$DAEMON"
18 echo "$NAME."
19 ;;
20 restart|force-reload)
21 echo -n "Restarting $DESC: "
22 start-stop-daemon --stop -x "$DAEMON"
23 sleep 1
24 start-stop-daemon --start -x "$DAEMON" -- $OPTS
25 echo "$NAME."
26 ;;
27 *)
28 N=/etc/init.d/$NAME
29 echo "Usage: $N {start|stop|restart|force-reload}" >&2
30 exit 1
31 ;;
32esac
33
34exit 0
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
new file mode 100644
index 0000000000..6e8402d242
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
@@ -0,0 +1,331 @@
1# lighttpd configuration file
2#
3# use it as a base for lighttpd 1.0.0 and above
4#
5# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
6
7############ Options you really have to take care of ####################
8
9## modules to load
10# at least mod_access and mod_accesslog should be loaded
11# all other module should only be loaded if really neccesary
12# - saves some time
13# - saves memory
14server.modules = (
15# "mod_rewrite",
16# "mod_redirect",
17# "mod_alias",
18 "mod_access",
19# "mod_cml",
20# "mod_trigger_b4_dl",
21# "mod_auth",
22# "mod_status",
23# "mod_setenv",
24# "mod_fastcgi",
25# "mod_proxy",
26# "mod_simple_vhost",
27# "mod_evhost",
28# "mod_userdir",
29# "mod_cgi",
30# "mod_compress",
31# "mod_ssi",
32# "mod_usertrack",
33# "mod_expire",
34# "mod_secdownload",
35# "mod_rrdtool",
36# "mod_webdav",
37 "mod_accesslog" )
38
39## a static document-root, for virtual-hosting take look at the
40## server.virtual-* options
41server.document-root = "/www/pages/"
42
43## where to send error-messages to
44server.errorlog = "/www/logs/lighttpd.error.log"
45
46# files to check for if .../ is requested
47index-file.names = ( "index.php", "index.html",
48 "index.htm", "default.htm" )
49
50## set the event-handler (read the performance section in the manual)
51# server.event-handler = "freebsd-kqueue" # needed on OS X
52
53# mimetype mapping
54mimetype.assign = (
55 ".pdf" => "application/pdf",
56 ".sig" => "application/pgp-signature",
57 ".spl" => "application/futuresplash",
58 ".class" => "application/octet-stream",
59 ".ps" => "application/postscript",
60 ".torrent" => "application/x-bittorrent",
61 ".dvi" => "application/x-dvi",
62 ".gz" => "application/x-gzip",
63 ".pac" => "application/x-ns-proxy-autoconfig",
64 ".swf" => "application/x-shockwave-flash",
65 ".tar.gz" => "application/x-tgz",
66 ".tgz" => "application/x-tgz",
67 ".tar" => "application/x-tar",
68 ".zip" => "application/zip",
69 ".mp3" => "audio/mpeg",
70 ".m3u" => "audio/x-mpegurl",
71 ".wma" => "audio/x-ms-wma",
72 ".wax" => "audio/x-ms-wax",
73 ".ogg" => "application/ogg",
74 ".wav" => "audio/x-wav",
75 ".gif" => "image/gif",
76 ".jpg" => "image/jpeg",
77 ".jpeg" => "image/jpeg",
78 ".png" => "image/png",
79 ".xbm" => "image/x-xbitmap",
80 ".xpm" => "image/x-xpixmap",
81 ".xwd" => "image/x-xwindowdump",
82 ".css" => "text/css",
83 ".html" => "text/html",
84 ".htm" => "text/html",
85 ".js" => "text/javascript",
86 ".asc" => "text/plain",
87 ".c" => "text/plain",
88 ".cpp" => "text/plain",
89 ".log" => "text/plain",
90 ".conf" => "text/plain",
91 ".text" => "text/plain",
92 ".txt" => "text/plain",
93 ".dtd" => "text/xml",
94 ".xml" => "text/xml",
95 ".mpeg" => "video/mpeg",
96 ".mpg" => "video/mpeg",
97 ".mov" => "video/quicktime",
98 ".qt" => "video/quicktime",
99 ".avi" => "video/x-msvideo",
100 ".asf" => "video/x-ms-asf",
101 ".asx" => "video/x-ms-asf",
102 ".wmv" => "video/x-ms-wmv",
103 ".bz2" => "application/x-bzip",
104 ".tbz" => "application/x-bzip-compressed-tar",
105 ".tar.bz2" => "application/x-bzip-compressed-tar"
106 )
107
108# Use the "Content-Type" extended attribute to obtain mime type if possible
109#mimetype.use-xattr = "enable"
110
111
112## send a different Server: header
113## be nice and keep it at lighttpd
114# server.tag = "lighttpd"
115
116#### accesslog module
117accesslog.filename = "/www/logs/access.log"
118debug.log-request-handling = "enable"
119
120
121
122
123## deny access the file-extensions
124#
125# ~ is for backupfiles from vi, emacs, joe, ...
126# .inc is often used for code includes which should in general not be part
127# of the document-root
128url.access-deny = ( "~", ".inc" )
129
130$HTTP["url"] =~ "\.pdf$" {
131 server.range-requests = "disable"
132}
133
134##
135# which extensions should not be handle via static-file transfer
136#
137# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
138static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
139
140######### Options that are good to be but not neccesary to be changed #######
141
142## bind to port (default: 80)
143#server.port = 81
144
145## bind to localhost (default: all interfaces)
146#server.bind = "grisu.home.kneschke.de"
147
148## error-handler for status 404
149#server.error-handler-404 = "/error-handler.html"
150#server.error-handler-404 = "/error-handler.php"
151
152## to help the rc.scripts
153#server.pid-file = "/var/run/lighttpd.pid"
154
155
156###### virtual hosts
157##
158## If you want name-based virtual hosting add the next three settings and load
159## mod_simple_vhost
160##
161## document-root =
162## virtual-server-root + virtual-server-default-host + virtual-server-docroot
163## or
164## virtual-server-root + http-host + virtual-server-docroot
165##
166#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
167#simple-vhost.default-host = "grisu.home.kneschke.de"
168#simple-vhost.document-root = "/pages/"
169
170
171##
172## Format: <errorfile-prefix><status-code>.html
173## -> ..../status-404.html for 'File not found'
174#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
175
176## virtual directory listings
177#dir-listing.activate = "enable"
178
179## enable debugging
180#debug.log-request-header = "enable"
181#debug.log-response-header = "enable"
182#debug.log-request-handling = "enable"
183#debug.log-file-not-found = "enable"
184
185### only root can use these options
186#
187# chroot() to directory (default: no chroot() )
188#server.chroot = "/"
189
190## change uid to <uid> (default: don't care)
191#server.username = "wwwrun"
192
193## change uid to <uid> (default: don't care)
194#server.groupname = "wwwrun"
195
196#### compress module
197#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
198#compress.filetype = ("text/plain", "text/html")
199
200#### proxy module
201## read proxy.txt for more info
202#proxy.server = ( ".php" =>
203# ( "localhost" =>
204# (
205# "host" => "192.168.0.101",
206# "port" => 80
207# )
208# )
209# )
210
211#### fastcgi module
212## read fastcgi.txt for more info
213## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
214#fastcgi.server = ( ".php" =>
215# ( "localhost" =>
216# (
217# "socket" => "/tmp/php-fastcgi.socket",
218# "bin-path" => "/usr/local/bin/php"
219# )
220# )
221# )
222
223#### CGI module
224#cgi.assign = ( ".pl" => "/usr/bin/perl",
225# ".cgi" => "/usr/bin/perl" )
226#
227
228#### SSL engine
229#ssl.engine = "enable"
230#ssl.pemfile = "server.pem"
231
232#### status module
233#status.status-url = "/server-status"
234#status.config-url = "/server-config"
235
236#### auth module
237## read authentication.txt for more info
238#auth.backend = "plain"
239#auth.backend.plain.userfile = "lighttpd.user"
240#auth.backend.plain.groupfile = "lighttpd.group"
241
242#auth.backend.ldap.hostname = "localhost"
243#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
244#auth.backend.ldap.filter = "(uid=$)"
245
246#auth.require = ( "/server-status" =>
247# (
248# "method" => "digest",
249# "realm" => "download archiv",
250# "require" => "user=jan"
251# ),
252# "/server-config" =>
253# (
254# "method" => "digest",
255# "realm" => "download archiv",
256# "require" => "valid-user"
257# )
258# )
259
260#### url handling modules (rewrite, redirect, access)
261#url.rewrite = ( "^/$" => "/server-status" )
262#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
263
264#### both rewrite/redirect support back reference to regex conditional using %n
265#$HTTP["host"] =~ "^www\.(.*)" {
266# url.redirect = ( "^/(.*)" => "http://%1/$1" )
267#}
268
269#
270# define a pattern for the host url finding
271# %% => % sign
272# %0 => domain name + tld
273# %1 => tld
274# %2 => domain name without tld
275# %3 => subdomain 1 name
276# %4 => subdomain 2 name
277#
278#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
279
280#### expire module
281#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
282
283#### ssi
284#ssi.extension = ( ".shtml" )
285
286#### rrdtool
287#rrdtool.binary = "/usr/bin/rrdtool"
288#rrdtool.db-name = "/var/www/lighttpd.rrd"
289
290#### setenv
291#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
292#setenv.add-response-header = ( "X-Secret-Message" => "42" )
293
294## for mod_trigger_b4_dl
295# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
296# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
297# trigger-before-download.trigger-url = "^/trigger/"
298# trigger-before-download.download-url = "^/download/"
299# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
300# trigger-before-download.trigger-timeout = 10
301
302## for mod_cml
303## don't forget to add index.cml to server.indexfiles
304# cml.extension = ".cml"
305# cml.memcache-hosts = ( "127.0.0.1:11211" )
306
307#### variable usage:
308## variable name without "." is auto prefixed by "var." and becomes "var.bar"
309#bar = 1
310#var.mystring = "foo"
311
312## integer add
313#bar += 1
314## string concat, with integer cast as string, result: "www.foo1.com"
315#server.name = "www." + mystring + var.bar + ".com"
316## array merge
317#index-file.names = (foo + ".php") + index-file.names
318#index-file.names += (foo + ".php")
319
320#### include
321#include /etc/lighttpd/lighttpd-inc.conf
322## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
323#include "lighttpd-inc.conf"
324
325#### include_shell
326#include_shell "echo var.a=1"
327## the above is same as:
328#var.a=1
329
330# include other config file fragments from lighttpd.d subdir
331include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;"
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
new file mode 100644
index 0000000000..66a907aa17
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Lightning Fast Webserver With Light System Requirements
3After=network.target
4
5[Service]
6ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf
7ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf
8ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
9
10[Install]
11WantedBy=multi-user.target
12
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
new file mode 100644
index 0000000000..2ea5f85b15
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.33.bb
@@ -0,0 +1,76 @@
1SUMMARY = "Lightweight high-performance web server"
2HOMEPAGE = "http://www.lighttpd.net/"
3BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
7
8PR = "r1"
9
10SECTION = "net"
11DEPENDS = "zlib libpcre"
12RDEPENDS_${PN} += " \
13 lighttpd-module-access \
14 lighttpd-module-accesslog \
15 lighttpd-module-indexfile \
16 lighttpd-module-dirlisting \
17 lighttpd-module-staticfile \
18"
19
20
21SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.bz2 \
22 file://index.html.lighttpd \
23 file://lighttpd.conf \
24 file://lighttpd \
25 file://lighttpd.service \
26 "
27
28SRC_URI[md5sum] = "e66b8164e5fc5a6beec0823b697fbe1d"
29SRC_URI[sha256sum] = "2ff2324658c0f90e7d39afd40f08f11ca230903b9019c31a2bbecd8f087f235e"
30
31EXTRA_OECONF = " \
32 --without-bzip2 \
33 --without-ldap \
34 --without-lua \
35 --without-memcache \
36 --with-pcre \
37 --without-webdav-props \
38 --without-webdav-locks \
39 --without-openssl \
40 --disable-static \
41"
42
43inherit autotools pkgconfig update-rc.d gettext systemd
44
45INITSCRIPT_NAME = "lighttpd"
46INITSCRIPT_PARAMS = "defaults 70"
47
48SYSTEMD_SERVICE_${PN} = "lighttpd.service"
49
50do_install_append() {
51 install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
52 install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
53 install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
54 install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
55
56 install -d ${D}${systemd_unitdir}/system
57 install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
58 sed -i -e 's,@SBINDIR@,${sbindir},g' \
59 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
60 -e 's,@BASE_BINDIR@,${base_bindir},g' \
61 ${D}${systemd_unitdir}/system/lighttpd.service
62 #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
63 ln -sf ${localstatedir}/log ${D}/www/logs
64 ln -sf ${localstatedir}/tmp ${D}/www/var
65}
66
67FILES_${PN} += "${sysconfdir} /www"
68
69CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
70
71PACKAGES_DYNAMIC += "^lighttpd-module-.*"
72
73python populate_packages_prepend () {
74 lighttpd_libdir = d.expand('${libdir}')
75 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
76}
diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
new file mode 100644
index 0000000000..ce64040d5f
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
@@ -0,0 +1,134 @@
1Act as the "mv" command when rotate log
2
3Act as the "mv" command when rotate log, first rename, if failed, then
4read and write.
5
6Upstream-Status: Submitted
7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9---
10 logrotate.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
11 1 file changed, 56 insertions(+), 9 deletions(-)
12
13diff --git a/logrotate.c b/logrotate.c
14index 174a26b..b18b629 100644
15--- a/logrotate.c
16+++ b/logrotate.c
17@@ -906,6 +906,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force)
18 return 0;
19 }
20
21+/* Act as the "mv" command, if rename failed, then read the old file and
22+ * write to new file. The function which invokes the mvFile will use
23+ * the strerror(errorno) to handle the error message, so we don't have
24+ * to print the error message here */
25+
26+int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl)
27+{
28+ struct stat sbprev;
29+ int fd_old, fd_new, n;
30+ char buf[BUFSIZ];
31+
32+ /* Do the rename first */
33+ if (!rename(oldName, newName))
34+ return 0;
35+
36+ /* If the errno is EXDEV, then read old file, write newfile and
37+ * remove the oldfile */
38+ if (errno == EXDEV) {
39+ /* Open the old file to read */
40+ if ((fd_old = open(oldName, O_RDONLY)) < 0)
41+ return 1;
42+
43+ /* Create the file to write, keep the same attribute as the old file */
44+ if (stat(oldName, &sbprev))
45+ return 1;
46+ else {
47+ if ((fd_new = createOutputFile(newName,
48+ O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 )
49+ return 1;
50+ }
51+
52+ /* Read and write */
53+ while ((n = read(fd_old, buf, BUFSIZ)) > 0)
54+ if (write(fd_new, buf, n) != n)
55+ return 1;
56+
57+ if ((close(fd_old) < 0) ||
58+ removeLogFile(oldName, log) ||
59+ (close(fd_new) < 0))
60+ return 1;
61+
62+ return 0;
63+ }
64+
65+ return 1;
66+}
67+
68 int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
69 struct logNames *rotNames)
70 {
71@@ -1268,15 +1315,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
72 }
73
74 message(MESS_DEBUG,
75- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n",
76+ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n",
77 oldName, newName, rotateCount, logStart, i);
78
79- if (!debug && rename(oldName, newName)) {
80+ if (!debug && mvFile(oldName, newName, log, prev_acl)) {
81 if (errno == ENOENT) {
82 message(MESS_DEBUG, "old log %s does not exist\n",
83 oldName);
84 } else {
85- message(MESS_ERROR, "error renaming %s to %s: %s\n",
86+ message(MESS_ERROR, "error moving %s to %s: %s\n",
87 oldName, newName, strerror(errno));
88 hasErrors = 1;
89 }
90@@ -1408,11 +1455,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
91 }
92 }
93 #endif /* WITH_ACL */
94- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
95+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
96 rotNames->finalName);
97 if (!debug && !hasErrors &&
98- rename(log->files[logNum], rotNames->finalName)) {
99- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
100+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
101+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
102 log->files[logNum], rotNames->finalName,
103 strerror(errno));
104 hasErrors = 1;
105@@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force)
106 return hasErrors;
107 }
108
109-static int writeState(char *stateFilename)
110+static int writeState(struct logInfo *log, char *stateFilename)
111 {
112 struct logState *p;
113 FILE *f;
114@@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename)
115 fclose(f);
116
117 if (error == 0) {
118- if (rename(tmpFilename, stateFilename)) {
119+ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) {
120 unlink(tmpFilename);
121 error = 1;
122 message(MESS_ERROR, "error renaming temp state file %s\n",
123@@ -2223,7 +2270,7 @@ int main(int argc, const char **argv)
124 rc |= rotateLogSet(log, force);
125
126 if (!debug)
127- rc |= writeState(stateFile);
128+ rc |= writeState(log, stateFile);
129
130 return (rc != 0);
131 }
132--
1331.7.10.4
134
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
new file mode 100644
index 0000000000..43068bdbd7
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -0,0 +1,34 @@
1Disable the check for different filesystems
2
3The logrotate supports rotate log across different filesystems now, so
4disable the check for different filesystems.
5
6Upstream-Status: Submitted
7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9---
10 config.c | 8 --------
11 1 files changed, 0 insertions(+), 8 deletions(-)
12
13diff --git a/config.c b/config.c
14index a85d1df..24575b3 100644
15--- a/config.c
16+++ b/config.c
17@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
18 dirName, strerror(errno));
19 goto error;
20 }
21-
22- if (sb.st_dev != sb2.st_dev) {
23- message(MESS_ERROR,
24- "%s:%d olddir %s and log file %s "
25- "are on different devices\n", configFile,
26- lineNum, newlog->oldDir, newlog->files[i]);
27- goto error;
28- }
29 }
30 }
31
32--
331.7.4.1
34
diff --git a/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
new file mode 100644
index 0000000000..ed2750e9c3
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Backport
2
3logrotate: fix for CVE-2011-1548
4
5If a logfile is a symlink, it may be read when being compressed, being
6copied (copy, copytruncate) or mailed. Secure data (eg. password files)
7may be exposed.
8
9Portback nofollow.patch from:
10http://logrotate.sourcearchive.com/downloads/3.8.1-5/logrotate_3.8.1-5.debian.tar.gz
11
12Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
13
14---
15--- a/logrotate.c 2012-09-06 13:25:08.000000000 +0800
16+++ b/logrotate.c 2012-09-06 13:35:57.000000000 +0800
17@@ -390,7 +390,7 @@
18 compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2);
19 sprintf(compressedName, "%s%s", name, log->compress_ext);
20
21- if ((inFile = open(name, O_RDWR)) < 0) {
22+ if ((inFile = open(name, O_RDWR | O_NOFOLLOW)) < 0) {
23 message(MESS_ERROR, "unable to open %s for compression\n", name);
24 return 1;
25 }
26@@ -470,7 +470,7 @@
27 char *mailArgv[] = { mailCommand, "-s", subject, address, NULL };
28 int rc = 0;
29
30- if ((mailInput = open(logFile, O_RDONLY)) < 0) {
31+ if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) {
32 message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile,
33 strerror(errno));
34 return 1;
35@@ -561,7 +561,7 @@
36 message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog);
37
38 if (!debug) {
39- if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) {
40+ if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) {
41 message(MESS_ERROR, "error opening %s: %s\n", currLog,
42 strerror(errno));
43 return 1;
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
new file mode 100644
index 0000000000..517acdd27e
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
@@ -0,0 +1,32 @@
1Update the manual
2
3Update the manual for rotating on different filesystems.
4
5Upstream-Status: Submitted
6
7Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
8---
9 logrotate.8 | 7 +++----
10 1 files changed, 3 insertions(+), 4 deletions(-)
11
12diff --git a/logrotate.8 b/logrotate.8
13index 8b34167..5f15432 100644
14--- a/logrotate.8
15+++ b/logrotate.8
16@@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
17 .TP
18 \fBolddir \fIdirectory\fR
19 Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
20-must be on the same physical device as the log file being rotated,
21-and is assumed to be relative to the directory holding the log file
22-unless an absolute path name is specified. When this option is used all
23-old versions of the log end up in \fIdirectory\fR. This option may be
24+is assumed to be relative to the directory holding the log file unless
25+an absolute path name is specified. When this option is used all old
26+versions of the log end up in \fIdirectory\fR. This option may be
27 overridden by the \fBnoolddir\fR option.
28
29 .TP
30--
311.7.4.1
32
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.7.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
new file mode 100644
index 0000000000..b386b85bf6
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Rotates, compresses, removes and mails system log files"
2SECTION = "console/utils"
3HOMEPAGE = "https://fedorahosted.org/logrotate/"
4LICENSE = "GPLv2"
5
6DEPENDS="coreutils popt"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
9
10SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
11 file://act-as-mv-when-rotate.patch \
12 file://disable-check-different-filesystems.patch \
13 file://update-the-manual.patch \
14 "
15
16SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213"
17SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64"
18
19EXTRA_OEMAKE = ""
20
21do_install(){
22 oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir}
23 mkdir -p ${D}${sysconfdir}/logrotate.d
24 mkdir -p ${D}${sysconfdir}/cron.daily
25 mkdir -p ${D}${localstatedir}/lib
26 install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
27 install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
28 touch ${D}${localstatedir}/lib/logrotate.status
29}
diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
new file mode 100755
index 0000000000..7c1dce24cf
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/init-functions
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3# LSB initscript functions, as defined in the LSB Spec 1.1.0
4#
5# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
6# Updated to the latest LSB 3.1 spec
7# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
8
9start_daemon () {
10 /etc/core-lsb/lsb_start_daemon "$@"
11}
12
13killproc () {
14 /etc/core-lsb/lsb_killproc "$@"
15}
16
17pidofproc () {
18 /etc/core-lsb/lsb_pidofproc "$@"
19}
20
21log_success_msg () {
22 /etc/core-lsb/lsb_log_message success "$@"
23}
24
25log_failure_msg () {
26 /etc/core-lsb/lsb_log_message failure "$@"
27}
28
29log_warning_msg () {
30 /etc/core-lsb/lsb_log_message warning "$@"
31}
32
33# int log_begin_message (char *message)
34log_begin_msg () {
35 if [ -z "$1" ]; then
36 return 1
37 fi
38 echo " * $@"
39}
40
41
42log_end_msg () {
43 /etc/core-lsb/lsb_log_message end "$@"
44}
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc
new file mode 100755
index 0000000000..866c1a9c63
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_killproc
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3. /etc/init.d/functions
4
5LSB=LSB-1.1 killproc $*
6exit $?
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 0000000000..10343b0819
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3. /etc/init.d/functions
4
5ACTION=$1
6shift
7
8case "$ACTION" in
9 success)
10 echo -n $*
11 success "$*"
12 echo
13 ;;
14 failure)
15 echo -n $*
16 failure "$*"
17 echo
18 ;;
19 warning)
20 echo -n $*
21 warning "$*"
22 echo
23 ;;
24 *)
25 ;;
26esac
27exit 0
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
new file mode 100755
index 0000000000..6d1fd0f249
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3. /etc/init.d/functions
4
5pidofproc $*
6exit $?
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 0000000000..de62c2344d
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
1#!/bin/sh
2
3. /etc/init.d/functions
4
5nice=
6force=
7pidfile=
8user=
9check=
10RETVAL=
11while [ "$1" != "${1##[-+]}" ]; do
12 case $1 in
13 -f)
14 force="--force"
15 shift
16 ;;
17 -n)
18 nice=$2
19 shift 2
20 ;;
21 -p)
22 pidfile="--pidfile $2"
23 shift 2
24 ;;
25 -u)
26 user="--user $2"
27 shift 2
28 ;;
29 -c)
30 check="--check $2"
31 shift 2
32 ;;
33 *)
34 echo "Unknown Option $1"
35 echo "Options are:"
36 echo "-f"
37 echo "-p {pidfile}"
38 echo "-n [+/-nicelevel]"
39 echo "-u {user}"
40 echo "-c {base}"
41 exit 1;;
42 esac
43done
44LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
45exit $?
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
new file mode 100644
index 0000000000..d265731e04
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -0,0 +1,121 @@
1SUMMARY = "LSB support for OpenEmbedded"
2SECTION = "console/utils"
3HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
4LICENSE = "GPLv2+"
5PR = "r2"
6
7# lsb_release needs getopt
8RDEPENDS_${PN} += "util-linux"
9
10LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
13 file://init-functions \
14 file://lsb_killproc \
15 file://lsb_log_message \
16 file://lsb_pidofproc \
17 file://lsb_start_daemon \
18 "
19
20SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
21SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
22S = "${WORKDIR}/lsb-release-1.4"
23
24do_install(){
25 oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
26
27 # this 2 dirs are needed by package lsb-dist-checker
28 mkdir -p ${D}${sysconfdir}/opt
29 mkdir -p ${D}${localstatedir}/opt
30
31 mkdir -p ${D}${base_bindir}
32 mkdir -p ${D}/${baselib}
33 mkdir -p ${D}${sysconfdir}/lsb-release.d
34 printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
35
36 if [ "${TARGET_ARCH}" = "i586" ];then
37 printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release
38 else
39 printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release
40 fi
41 echo "\"" >> ${D}${sysconfdir}/lsb-release
42 echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
43 echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
44 if [ -n "${DISTRO_CODENAME}" ]; then
45 echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
46 fi
47 echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
48
49 if [ "${TARGET_ARCH}" = "i586" ];then
50 mkdir -p ${D}${sysconfdir}/lsb-release.d
51 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
52 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
53 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
54 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
55 elif [ "${TARGET_ARCH}" = "x86_64" ];then
56 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
57 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
58 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
59 fi
60 if [ "${TARGET_ARCH}" = "powerpc" ];then
61 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
62 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
63 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
64 elif [ "${TARGET_ARCH}" = "powerpc64" ];then
65 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
66 touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
67 touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
68 fi
69}
70
71do_install_append(){
72 install -d ${D}${sysconfdir}/core-lsb
73 install -d ${D}/${baselib}/lsb
74 for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
75 do
76 install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
77 done
78 install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
79
80 # creat links for LSB test
81 install -d ${D}/usr/lib/lsb
82 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
83 ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
84 install -d ${D}/${libdir}
85 ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
86
87 if [ "${TARGET_ARCH}" = "x86_64" ];then
88 cd ${D}
89 if [ "${baselib}" != "lib64" ]; then
90 ln -sf ${baselib} lib64
91 fi
92 cd ${D}/${baselib}
93 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
94 ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
95 fi
96 if [ "${TARGET_ARCH}" = "i586" ];then
97 cd ${D}/${baselib}
98 ln -sf ld-linux.so.2 ld-lsb.so.2
99 ln -sf ld-linux.so.2 ld-lsb.so.3
100 fi
101
102 if [ "${TARGET_ARCH}" = "powerpc64" ];then
103 cd ${D}
104 if [ "${baselib}" != "lib64" ]; then
105 ln -sf ${baselib} lib64
106 fi
107 cd ${D}/${baselib}
108 ln -sf ld64.so.1 ld-lsb-ppc64.so.2
109 ln -sf ld64.so.1 ld-lsb-ppc64.so.3
110 fi
111 if [ "${TARGET_ARCH}" = "powerpc" ];then
112 cd ${D}/${baselib}
113 ln -sf ld.so.1 ld-lsb-ppc32.so.2
114 ln -sf ld.so.1 ld-lsb-ppc32.so.3
115 fi
116}
117FILES_${PN} += "/lib64 \
118 /usr/lib/lsb \
119 ${base_libdir}/lsb/* \
120 ${libdir}/sendmail \
121 "
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
new file mode 100644
index 0000000000..a756d047ef
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Inappropriate [configuration]
2
3Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: initscripts-9.43/rc.d/init.d/functions
7===================================================================
8--- initscripts-9.43.orig/rc.d/init.d/functions
9+++ initscripts-9.43/rc.d/init.d/functions
10@@ -13,6 +13,7 @@ umask 022
11 PATH="/sbin:/usr/sbin:/bin:/usr/bin"
12 export PATH
13
14+
15 if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \
16 ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then
17 case "$0" in
18@@ -54,7 +55,7 @@ systemctl_redirect () {
19 [ -z "${COLUMNS:-}" ] && COLUMNS=80
20
21 if [ -z "${CONSOLETYPE:-}" ]; then
22- if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
23+ if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then
24 CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
25 else
26 CONSOLETYPE="serial"
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.52.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.52.bb
new file mode 100644
index 0000000000..11deae28c9
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbinitscripts_9.52.bb
@@ -0,0 +1,30 @@
1SUMMARY = "SysV init scripts which are only used in an LSB image"
2SECTION = "base"
3LICENSE = "GPLv2"
4DEPENDS = "popt glib-2.0"
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
7
8S="${WORKDIR}/initscripts-${PV}"
9SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/2453811ec27a781a77f309f356663d9e/initscripts-${PV}.tar.bz2 \
10 file://functions.patch \
11 "
12
13SRC_URI[md5sum] = "2453811ec27a781a77f309f356663d9e"
14SRC_URI[sha256sum] = "0b3bb828a5d3a3f210b8e606c0416813ba0d021a859658af14810865d2ee8867"
15
16inherit update-alternatives
17
18ALTERNATIVE_PRIORITY = "100"
19ALTERNATIVE_${PN} = "functions"
20ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
21
22# Since we are only taking the patched version of functions, no need to
23# configure or compile anything so do not execute these
24do_configure[noexec] = "1"
25do_compile[noexec] = "1"
26
27do_install(){
28 install -d ${D}${sysconfdir}/init.d/
29 install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
30}
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 0000000000..ab79985b1b
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -0,0 +1,526 @@
1#!/bin/bash
2
3# Copyright (C) 2012 Wind River Systems, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 2 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12# See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19WORK_DIR="/opt/lsb-test"
20
21if [ `id -u` -ne 0 ]
22then
23 cat << EOF
24 In order to install and run LSB testsuite, you need administrator privileges.
25 You are currently running this script as an unprivileged user.
26
27EOF
28 exit 1
29fi
30
31ARCH=`uname -m`
32if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ]
33then
34 echo "Error: Unsupported architecture"
35 exit 1
36fi
37
38which rpm
39if [ $? -ne 0 ]
40then
41 echo "No rpm command found"
42 exit 1
43fi
44
45RET=0
46
47cd ${WORK_DIR} || exit 1
48# Step 1: Download the LSB Packages
49echo ""
50echo "Download LSB packages..."
51echo ""
52
53if [ ! -e ./packages_list ]
54then
55 echo "Error: Could not find packages list" >&2
56 exit 1
57fi
58
59. ./packages_list
60
61PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
62
63BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
64RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
65RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
66APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
67APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests"
68SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests"
69
70if [ ! -d ${PACKAGES_DIR} ]
71then
72 mkdir -p ${PACKAGES_DIR}
73fi
74
75if [ ! -d ${BASE_PACKAGES_DIR} ]
76then
77 mkdir -p ${BASE_PACKAGES_DIR}
78fi
79
80if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ]
81then
82 mkdir -p ${RUNTIME_BASE_PACKAGES_DIR}
83fi
84
85if [ ! -d ${RUNTIME_PACKAGES_DIR} ]
86then
87 mkdir -p ${RUNTIME_PACKAGES_DIR}
88fi
89
90if [ ! -d ${APP_PACKAGES_DIR} ]
91then
92 mkdir -p ${APP_PACKAGES_DIR}
93fi
94
95if [ ! -d ${APP_TESTFILES_DIR} ]
96then
97 mkdir -p ${APP_TESTFILES_DIR}
98fi
99
100# Official download server list. You can replace them with your own server.
101SERVER_IPADDR="140.211.169.23"
102SERVER_NAME="ftp.linuxfoundation.org"
103
104if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
105 echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts
106fi
107
108#ping -c 5 ${SERVER_NAME}
109#if [ $? -ne 0 ]
110#then
111# echo "The server: ${SERVER_NAME} is unreachable"
112# exit 1
113#fi
114
115SERVER1="\
116 http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary"
117SERVER2="\
118 http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime"
119SERVER3="\
120 http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime"
121SERVER4="\
122 http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
123SERVER5="\
124 http://${SERVER_NAME}/pub/lsb/app-battery/tests"
125
126# We using "curl" as a download tool, "wget" is an alternative.
127CURL=`which curl`
128WGET=`which wget`
129if [ ! -z ${CURL} ]
130then
131 DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o"
132elif [ ! -z ${WGET} ]
133then
134 DOWNLOAD_CMD="${WGET} -c -t 5 -O"
135else
136 echo "Can not find a download tool, please install curl or wget."
137 exit 1
138fi
139
140cd ${BASE_PACKAGES_DIR}
141for pkg in ${BASE_PACKAGES_LIST}; do
142 if [ ! -f ${pkg} ]
143 then
144 #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1
145 ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg}
146 if [ $? -eq 0 ]
147 then
148 mv -f ${pkg}".#part" ${pkg}
149 echo "Download ${pkg} successfully."
150 else
151 echo "Download ${pkg} failed."
152 RET=1
153 fi
154 fi
155done
156
157cd ${RUNTIME_BASE_PACKAGES_DIR}
158for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do
159 if [ ! -f ${pkg} ]
160 then
161 #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1
162 ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg}
163 if [ $? -eq 0 ]
164 then
165 mv -f ${pkg}".#part" ${pkg}
166 echo "Download ${pkg} successfully."
167 else
168 echo "Download ${pkg} failed."
169 RET=1
170 fi
171 fi
172done
173
174cd ${RUNTIME_PACKAGES_DIR}
175for pkg in ${RUNTIME_PACKAGES_LIST}; do
176 if [ ! -f ${pkg} ]
177 then
178 #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1
179 ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg}
180 if [ $? -eq 0 ]
181 then
182 mv -f ${pkg}".#part" ${pkg}
183 echo "Download ${pkg} successfully."
184 else
185 echo "Download ${pkg} failed."
186 RET=1
187 fi
188 fi
189done
190
191cd ${APP_PACKAGES_DIR}
192for pkg in ${APP_PACKAGES_LIST}; do
193 if [ ! -f ${pkg} ]
194 then
195 #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1
196 ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg}
197 if [ $? -eq 0 ]
198 then
199 mv -f ${pkg}".#part" ${pkg}
200 echo "Download ${pkg} successfully."
201 else
202 echo "Download ${pkg} failed."
203 RET=1
204 fi
205 fi
206done
207
208cd ${APP_TESTFILES_DIR}
209for pkg in ${APP_TESTFILES_LIST}; do
210 if [ ! -f ${pkg} ]
211 then
212 #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1
213 ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg}
214 if [ $? -eq 0 ]
215 then
216 mv -f ${pkg}".#part" ${pkg}
217 echo "Download ${pkg} successfully."
218 else
219 echo "Download ${pkg} failed."
220 RET=1
221 fi
222 fi
223done
224
225if [ ${RET} -ne 0 ]
226then
227 echo "Download some packages failed. Please download them again."
228 exit 1
229fi
230
231# Step 2: Install the LSB Packages
232echo ""
233echo "Install LSB packages..."
234echo ""
235
236# Kill lighttpd
237ps aux | grep "lighttpd" | grep -v -q "grep"
238if [ $? -eq 0 ]
239then
240 killall lighttpd >/dev/null 2>&1
241fi
242
243# Start avahi-daemon
244ps aux | grep "avahi-daemon" | grep -v -q "grep"
245if [ $? -ne 0 ]
246then
247 /etc/init.d/avahi-daemon start >/dev/null 2>&1
248fi
249
250LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl"
251LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl"
252
253PLATFORM_FILE="/etc/rpm/platform"
254
255RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i"
256RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i"
257
258# If the lsb has been started, stop it first.
259if [ -x ${LSB_STOP_CMD} ]
260then
261 ${LSB_STOP_CMD}
262fi
263
264if [ ! -d /etc/rpm ]
265then
266 mkdir -p /etc/rpm
267fi
268
269if [ ! -f ${PLATFORM_FILE} ]
270then
271 touch ${PLATFORM_FILE}
272fi
273
274if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
275 if [ ${ARCH} = i686 ];then
276 echo "i486-suse" >> ${PLATFORM_FILE}
277 echo "i486-noarch" >> ${PLATFORM_FILE}
278 echo "i486-pc" >> ${PLATFORM_FILE}
279 echo "noarch-suse" >> ${PLATFORM_FILE}
280 elif [ ${ARCH} = x86_64 ]; then
281 echo "i486-suse" >> ${PLATFORM_FILE}
282 echo "i486-noarch" >> ${PLATFORM_FILE}
283 echo "i486-pc" >> ${PLATFORM_FILE}
284 echo "i486-.*-linux.*" >> ${PLATFORM_FILE}
285 echo "noarch-suse" >> ${PLATFORM_FILE}
286 echo "${ARCH}-suse" >> ${PLATFORM_FILE}
287 echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
288 echo "${ARCH}-pc" >> ${PLATFORM_FILE}
289 else
290 echo "${ARCH}-suse" >> ${PLATFORM_FILE}
291 echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
292 echo "${ARCH}-pc" >> ${PLATFORM_FILE}
293 echo "noarch-suse" >> ${PLATFORM_FILE}
294 fi
295fi
296
297if [ -d ${BASE_PACKAGES_DIR} ]
298then
299 cd ${BASE_PACKAGES_DIR}
300 for pkg in ${BASE_PACKAGES_LIST}
301 do
302 rpm --quiet -q ${pkg%\.*}
303 if [ $? -ne 0 ]; then
304 $RPM_INSTALL_CMD ${pkg}
305 fi
306 done
307fi
308
309if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ]
310then
311 cd ${RUNTIME_BASE_PACKAGES_DIR}
312 for pkg in ${RUNTIME_BASE_PACKAGES_LIST}
313 do
314 rpm --quiet -q ${pkg%\.*}
315 if [ $? -ne 0 ]; then
316 $RPM_INSTALL_CMD ${pkg}
317 fi
318 done
319fi
320
321if [ -d ${RUNTIME_PACKAGES_DIR} ]
322then
323 cd ${RUNTIME_PACKAGES_DIR}
324 for pkg in ${RUNTIME_PACKAGES_LIST}
325 do
326 rpm --quiet -q ${pkg%\.*}
327 if [ $? -ne 0 ]; then
328 $RPM_INSTALL_CMD ${pkg}
329 fi
330 done
331fi
332
333if [ -d ${APP_PACKAGES_DIR} ]
334then
335 cd ${APP_PACKAGES_DIR}
336 for pkg in ${APP_PACKAGES_LIST}
337 do
338 echo "${pkg}" | grep -q "apache\|xpdf"
339 if [ $? -eq 0 ]
340 then
341 rpm --quiet -q ${pkg%\.*}
342 if [ $? -ne 0 ]; then
343 $RPM_INSTALL_CMD_NOSCRIPTS ${pkg}
344 fi
345 else
346 rpm --quiet -q ${pkg%\.*}
347 if [ $? -ne 0 ]; then
348 $RPM_INSTALL_CMD ${pkg}
349 fi
350 fi
351 done
352fi
353
354if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ]
355then
356 mkdir -p ${SNAPSHOTS_TESTFILES_DIR}
357fi
358
359if [ -d ${APP_TESTFILES_DIR} ]
360then
361 cd ${APP_TESTFILES_DIR}
362 for pkg in ${APP_TESTFILES_LIST}
363 do
364 cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR}
365 done
366fi
367
368cd ${WORK_DIR}
369
370# Step 3: Set environment
371echo ""
372echo "Set environment..."
373echo ""
374
375check ()
376{
377 if [ $? -eq 0 ]
378 then
379 echo "PASS"
380 else
381 echo "FAIL"
382 exit 1
383 fi
384}
385
386echo ""
387echo "---------------------------------"
388echo "Create the Dirnames on target"
389
390if [ ! -d /etc/rpm/sysinfo ]
391then
392 mkdir -p /etc/rpm/sysinfo
393fi
394
395cat > /etc/rpm/sysinfo/Dirnames << EOF
396/etc/opt/lsb
397/home/tet/LSB.tools
398/opt/lsb-tet3-lite/lib/ksh
399/opt/lsb-tet3-lite/lib/perl
400/opt/lsb-tet3-lite/lib/posix_sh
401/opt/lsb-tet3-lite/lib/tet3
402/opt/lsb-tet3-lite/lib/xpg3sh
403/opt/lsb/appbat/lib/python2.4/site-packages/qm
404/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
405/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
406/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
407/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
408/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
409/opt/lsb/test/doc
410/opt/lsb/test/lib
411/opt/lsb/test/qm/diagnostics
412/opt/lsb/test/qm/doc
413/opt/lsb/test/qm/doc/test/html
414/opt/lsb/test/qm/doc/test/print
415/opt/lsb/test/qm/dtml
416/opt/lsb/test/qm/dtml/test
417/opt/lsb/test/qm/messages/test
418/opt/lsb/test/qm/tutorial/test/tdb
419/opt/lsb/test/qm/tutorial/test/tdb/QMTest
420/opt/lsb/test/qm/web
421/opt/lsb/test/qm/web/images
422/opt/lsb/test/qm/web/stylesheets
423/opt/lsb/test/qm/xml
424/opt/lsb/test/share
425/usr/share/doc/lsb-runtime-test
426/var/opt/lsb
427/opt/lsb/test/desktop
428/opt/lsb/test/desktop/fontconfig
429/opt/lsb/test/desktop/freetype
430/opt/lsb/test/desktop/gtkvts
431/opt/lsb/test/desktop/libpng
432/opt/lsb/test/desktop/qt3
433/opt/lsb/test/desktop/xft
434/opt/lsb/test/desktop/xml
435/opt/lsb/test/desktop/xrender
436
437
438EOF
439
440if [ -f /etc/rpm/sysinfo/Dirnames ]
441then
442 echo "Success to creat Dirnames file"
443else
444 echo "Fail to creat Dirnames file"
445fi
446
447[ -x /sbin/ldconfig ] && {
448echo ""
449echo "---------------------------------"
450echo "Update cache"
451/sbin/ldconfig
452check;
453}
454
455# Check loop device
456if [ ! -b /dev/loop0 ]
457then
458 insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko
459 if [ $? != 0 ];then
460 echo "Insmod loop.ko failed."
461 fi
462fi
463
464# Resolve localhost
465LOCALHOST=`hostname`
466if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
467 echo "127.0.0.1 $LOCALHOST" >> /etc/hosts
468fi
469
470# Workaround to add part of locales for LSB test
471localedef -i de_DE -f ISO-8859-1 de_DE
472localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15
473localedef -i de_DE -f UTF-8 de_DE.UTF-8
474localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
475localedef -i en_HK -f ISO-8859-1 en_HK
476localedef -i en_PH -f ISO-8859-1 en_PH
477localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
478localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1
479localedef -i en_US -f ISO-8859-1 en_US
480localedef -i en_US -f UTF-8 en_US.UTF-8
481localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
482localedef -i es_MX -f ISO-8859-1 es_MX
483localedef -i fr_FR -f ISO-8859-1 fr_FR
484localedef -i it_IT -f ISO-8859-1 it_IT
485localedef -i ja_JP -f EUC-JP ja_JP.eucjp
486localedef -i se_NO -f UTF-8 se_NO.UTF-8
487localedef -i ta_IN -f UTF-8 ta_IN
488localedef -i es_ES -f ISO-8859-1 es_ES
489localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro
490localedef -i is_IS -f UTF-8 is_IS.UTF-8
491localedef -i zh_TW -f BIG5 zh_TW.BIG5
492localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
493
494echo ""
495echo "Installation done!"
496echo ""
497
498# Step 4: Start LSB test
499if [ -x ${LSB_START_CMD} ]
500then
501 ${LSB_START_CMD}
502fi
503
504echo "---------------------------------"
505echo "Run all the certification version of LSB Tests"
506echo "---------------------------------"
507
508LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl"
509SESSION="${WORK_DIR}/session"
510if [ ! -e ${SESSION} ]
511then
512 echo "Error: Could not find session file."
513 echo "You must run LSB test from webbrower."
514 exit 1
515fi
516
517if [ -x ${LSB_DIST_CHECKER} ]
518then
519 ${LSB_DIST_CHECKER} -v2 -f ${SESSION}
520 check
521fi
522
523echo ""
524echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/"
525echo ""
526
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list
new file mode 100644
index 0000000000..99f83c150f
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -0,0 +1,50 @@
1LSB_RELEASE="released-4.1.0"
2LSB_ARCH="lsbarch"
3
4BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
5
6RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-4.1.0.12-1.targetarch.rpm \
7 lsb-tet3-lite-3.7-23.lsb4.targetarch.rpm \
8 lsb-tet3-lite-devel-3.7-23.lsb4.targetarch.rpm \
9 lsb-xvfb-1.2.0-21.targetarch.rpm \
10 "
11
12RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \
13 lsb-libchk-4.1.4-5.targetarch.rpm \
14 lsb-qm-2.2-8.lsb4.targetarch.rpm \
15 lsb-task-dist-testkit-4.1.9-1.noarch.rpm \
16 lsb-test-core-4.1.15-1.targetarch.rpm \
17 lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \
18 lsb-test-desktop-4.1.9-1.targetarch.rpm \
19 lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \
20 lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \
21 lsb-test-olver-core-4.1.4-1.targetarch.rpm \
22 lsb-test-perl-4.1.8-1.noarch.rpm \
23 lsb-test-printing-4.1.2-1.targetarch.rpm \
24 lsb-test-python-4.1.5-1.targetarch.rpm \
25 lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \
26 lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \
27 lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \
28 lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \
29 lsb-test-core-t2c-4.1.2-3.targetarch.rpm \
30 lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \
31 "
32
33APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \
34 lsb-apache-2.2.14-8.lsb4.targetarch.rpm \
35 lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \
36 lsb-expect-5.43.0-13.lsb4.targetarch.rpm \
37 lsb-groff-1.20.1-7.lsb4.targetarch.rpm \
38 lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \
39 lsb-xpdf-1.01-14.lsb4.targetarch.rpm \
40 lsb-samba-3.4.3-9.lsb4.targetarch.rpm \
41 lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \
42 "
43
44APP_TESTFILES_LIST="expect-tests.tar \
45 tcl-tests.tar \
46 raptor-tests.tar \
47 test1.pdf \
48 test2.pdf \
49 "
50
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session
new file mode 100644
index 0000000000..85ca2efe92
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/session
@@ -0,0 +1,194 @@
1[GENERAL]
2VERBOSE_LEVEL: 1
3ARCHITECTURE: targetarch
4USE_INTERNET: 1
5STD_VERSION: LSB 4.1
6STD_PROFILE: no
7[cmdchk]
8RUN: 1
9VERSION: local|*
10
11[libchk]
12RUN: 1
13VERSION: local|*
14
15[alsa-t2c]
16RUN: 1
17VERSION: local|*
18
19[alsa-t2c|local|*]
20AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c
21AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results
22
23[core]
24RUN: 1
25VERSION: local|*
26
27[core|local|*]
28AUTOREPLY_PROVIDES_BASH: n
29AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets
30AUTOREPLY_PERSON: Automated
31AUTOREPLY_KERNEL_NAME: vmlinuz
32AUTOREPLY_INSTALL_LSBPAM_CONF: y
33AUTOREPLY_PROVIDES_C_SHELL: n
34AUTOREPLY_ORGANISATION: N/A
35AUTOREPLY_SET_PASS_MIN_DAYS: y
36AUTOREPLY_PROVIDES_SYSV_INIT:
37AUTOREPLY_ISNTALL_DEVS: y
38AUTOREPLY_SUPPORTS_FILE_CMD: y
39AUTOREPLY_TEST_SYSTEM: Distribution Checker
40AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets
41AUTOREPLY_SUPPORTS_NLS: n
42AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n
43AUTOREPLY_PATH_TO_RC.D:
44AUTOREPLY_ALLOWS_MAKEDEV: n
45AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results
46
47[core-t2c]
48RUN: 1
49VERSION: local|*
50
51[core-t2c|local|*]
52AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c
53AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results
54
55[cpp-t2c]
56RUN: 1
57VERSION: local|*
58
59[cpp-t2c|local|*]
60AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c
61AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results
62
63[desktop]
64RUN: 1
65VERSION: local|*
66
67[desktop|local|*]
68AUTOREPLY_DESKTOP_ENVIRONMENT: [default]
69AUTOREPLY_PERSON: Automated
70AUTOREPLY_X_CLIENT_HOSTNAME:
71AUTOREPLY_TEST_SYSTEM: Distribution Checker
72AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop
73AUTOREPLY_X11_FONT_PATH: [default]
74AUTOREPLY_SHOW_SUMMARY_REPORT:
75AUTOREPLY_ORGANISATION: N/A
76AUTOREPLY_XVFB_DISPLAY: [default]
77
78[desktop-t2c]
79RUN: 1
80VERSION: local|*
81
82[desktop-t2c|local|*]
83AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c
84AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results
85
86[libstdcpp]
87RUN: 1
88VERSION: local|*
89
90[libstdcpp|local|*]
91AUTOREPLY_TEST_SYSTEM: Distribution Checker
92AUTOREPLY_PERSON: Automated
93AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0
94AUTOREPLY_ORGANISATION: N/A
95AUTOREPLY_GNU_TRIPLET:
96
97[olver]
98RUN: 1
99VERSION: local|*
100
101[olver|local|*]
102AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core
103AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core
104
105[perl]
106RUN: 1
107VERSION: local|*
108
109[perl|local|*]
110AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl
111AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results
112
113[printing]
114RUN: 1
115VERSION: local|*
116
117[printing|local|*]
118AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing
119AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results
120
121[python]
122RUN: 1
123VERSION: local|*
124
125[python|local|*]
126AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
127AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
128
129[qt3-azov]
130RUN: 1
131VERSION: local|*
132
133[qt3-azov|local|*]
134AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov
135AUTOREPLY_X11_FONT_PATH: [default]
136AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results
137
138[qt4-azov]
139RUN: 1
140VERSION: local|*
141
142[qt4-azov|local|*]
143AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
144AUTOREPLY_X11_FONT_PATH: [default]
145AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
146
147[xml2-azov]
148RUN: 1
149VERSION: local|*
150
151[xts5]
152RUN: 1
153VERSION: local|*
154
155[xts5|local|*]
156AUTOREPLY_XT_FONTPATH_GOOD: [default]
157AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5
158AUTOREPLY_XVFB_DISPLAY: [default]
159AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results
160AUTOREPLY_XT_FONTPATH: [default]
161AUTOREPLY_X_CLIENT_HOSTNAME:
162
163[apache]
164RUN: 1
165VERSION: local|*
166
167[expect]
168RUN: 1
169VERSION: local|*
170
171[groff]
172RUN: 1
173VERSION: local|*
174
175[raptor]
176RUN: 1
177VERSION: local|*
178
179[rsync]
180RUN: 1
181VERSION: local|*
182
183[samba]
184RUN: 1
185VERSION: local|*
186
187[tcl]
188RUN: 1
189VERSION: local|*
190
191[xpdf]
192RUN: 1
193VERSION: local|*
194
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 0000000000..f61251e2aa
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -0,0 +1,49 @@
1SUMMARY = "Automates Linux Standard Base (LSB) tests"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4PR = "r3"
5
6LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"
7
8SRC_URI = "file://LSB_Test.sh \
9 file://packages_list \
10 file://session \
11 "
12RDEPENDS_${PN} = "rpm"
13
14S = "${WORKDIR}"
15
16do_install() {
17 install -d ${D}${bindir}
18 install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
19 install -d ${D}/opt/lsb-test
20 install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
21 install -m 0644 ${S}/session ${D}/opt/lsb-test/session
22 if [ "${TARGET_ARCH}" = "i586" ];then
23 sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
24 sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
25 fi
26 if [ "${TARGET_ARCH}" = "x86_64" ];then
27 sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
28 sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
29 fi
30 if [ "${TARGET_ARCH}" = "powerpc" ];then
31 sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
32 sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
33 fi
34
35 # For a ppc64 target. the default userspace is 32b.
36 # Therefore, only change the lsbarch and targetarch
37 # in the package_list when MLIB=lib64 is being used.
38 # Otherwise, by default, the ppc32 LSB packages
39 # will be downloaded by LSB_Test.sh
40 if [ "${TARGET_ARCH}" = "powerpc64" ];then
41 if [ "${PN}" != "${BPN}" ];then
42 sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
43 sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
44 fi
45 fi
46}
47
48FILES_${PN} += "/opt/lsb-test/* \
49 "
diff --git a/meta/recipes-extended/lsof/lsof_4.87.bb b/meta/recipes-extended/lsof/lsof_4.87.bb
new file mode 100644
index 0000000000..5676cd9822
--- /dev/null
+++ b/meta/recipes-extended/lsof/lsof_4.87.bb
@@ -0,0 +1,53 @@
1SUMMARY = "LiSt Open Files tool"
2DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
3Its name stands for LiSt Open Files, and it does just that."
4SECTION = "devel"
5LICENSE = "BSD"
6
7SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
8
9SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c"
10SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c"
11
12LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
13S = "${WORKDIR}/lsof_${PV}_src"
14
15LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
16
17python do_unpack () {
18 bb.build.exec_func('base_do_unpack', d)
19 src_uri = d.getVar('SRC_URI')
20 d.setVar('SRC_URI', '${LOCALSRC}')
21 bb.build.exec_func('base_do_unpack', d)
22 d.setVar('SRC_URI', src_uri)
23}
24
25export LSOF_OS = "${TARGET_OS}"
26LSOF_OS_libc-uclibc = "linux"
27LSOF_OS_libc-glibc = "linux"
28export LSOF_INCLUDE = "${STAGING_INCDIR}"
29
30do_configure () {
31 export LSOF_AR="${AR} cr"
32 export LSOF_RANLIB="${RANLIB}"
33 if [ "x${EGLIBCVERSION}" != "x" ];then
34 LINUX_CLIB=`echo ${EGLIBCVERSION} |sed -e 's,\.,,g'`
35 LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
36 export LINUX_CLIB
37 fi
38 yes | ./Configure ${LSOF_OS}
39}
40
41export I = "${STAGING_INCDIR}"
42export L = "${STAGING_INCDIR}"
43export EXTRA_OEMAKE = ""
44
45do_compile () {
46 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
47}
48
49do_install () {
50 install -d ${D}${sbindir} ${D}${mandir}/man8
51 install -m 4755 lsof ${D}${sbindir}/lsof
52 install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
53}
diff --git a/meta/recipes-extended/ltp/files/periodic_output.patch b/meta/recipes-extended/ltp/files/periodic_output.patch
new file mode 100644
index 0000000000..153fe83524
--- /dev/null
+++ b/meta/recipes-extended/ltp/files/periodic_output.patch
@@ -0,0 +1,31 @@
1Add periodic output for long time test.
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
7--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100
8+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100
9@@ -37,7 +37,8 @@
10 exit 0
11 fi
12
13-RUN_TIME=$(( 60 * 60 ))
14+ONE_MINUTE=60
15+RUN_TIME=60
16
17 cleanup()
18 {
19@@ -81,7 +82,11 @@
20 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
21 done
22
23- sleep $4
24+ for i in $(seq 0 $RUN_TIME-1)
25+ do
26+ eval echo "Started $i min ago. Still alive... "
27+ sleep $ONE_MINUTE
28+ done
29
30 for i in $(seq 0 $(($1-1)))
31 do
diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
new file mode 100644
index 0000000000..1b4d2324a5
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
@@ -0,0 +1,202 @@
1From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 7 Dec 2013 18:24:32 +0100
4Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
5
6* they are installed in the same target path
7 /opt/ltp/testcases/bin/runtests_noltp.sh
8 and overwrite each other in non-deterministic way
9 when multiple processes are used in "make install"
10
11 ./temp/log.do_install:install -m 00775
12 "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
13 "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
14 ./temp/log.do_install:install -m 00775
15 "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
16 "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
17
18Upstream-Status: Pending
19
20Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
21---
22 .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++
23 .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ----------------
24 .../kernel/containers/utsname/runtests_noltp.sh | 41 ----------------------
25 .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++
26 4 files changed, 72 insertions(+), 72 deletions(-)
27 create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh
28 delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh
29 delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh
30 create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh
31
32diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
33new file mode 100644
34index 0000000..84f398f
35--- /dev/null
36+++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
37@@ -0,0 +1,31 @@
38+#!/bin/sh
39+################################################################################
40+## ##
41+## Copyright (c) International Business Machines Corp., 2007 ##
42+## ##
43+## This program is free software; you can redistribute it and#or modify ##
44+## it under the terms of the GNU General Public License as published by ##
45+## the Free Software Foundation; either version 2 of the License, or ##
46+## (at your option) any later version. ##
47+## ##
48+## This program is distributed in the hope that it will be useful, but ##
49+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
50+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
51+## for more details. ##
52+## ##
53+## You should have received a copy of the GNU General Public License ##
54+## along with this program; if not, write to the Free Software ##
55+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
56+## ##
57+################################################################################
58+
59+exit_code=0
60+echo "sysvipc tests"
61+for type in none clone unshare; do
62+ echo "**sysvipc $type"
63+ ./shmnstest_noltp $type
64+ if [ $? -ne 0 ]; then
65+ exit_code=$?
66+ fi
67+done
68+exit $exit_code
69diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh
70deleted file mode 100644
71index 84f398f..0000000
72--- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh
73+++ /dev/null
74@@ -1,31 +0,0 @@
75-#!/bin/sh
76-################################################################################
77-## ##
78-## Copyright (c) International Business Machines Corp., 2007 ##
79-## ##
80-## This program is free software; you can redistribute it and#or modify ##
81-## it under the terms of the GNU General Public License as published by ##
82-## the Free Software Foundation; either version 2 of the License, or ##
83-## (at your option) any later version. ##
84-## ##
85-## This program is distributed in the hope that it will be useful, but ##
86-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
87-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
88-## for more details. ##
89-## ##
90-## You should have received a copy of the GNU General Public License ##
91-## along with this program; if not, write to the Free Software ##
92-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
93-## ##
94-################################################################################
95-
96-exit_code=0
97-echo "sysvipc tests"
98-for type in none clone unshare; do
99- echo "**sysvipc $type"
100- ./shmnstest_noltp $type
101- if [ $? -ne 0 ]; then
102- exit_code=$?
103- fi
104-done
105-exit $exit_code
106diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh
107deleted file mode 100755
108index 43cb7e2..0000000
109--- a/testcases/kernel/containers/utsname/runtests_noltp.sh
110+++ /dev/null
111@@ -1,41 +0,0 @@
112-#!/bin/sh
113-################################################################################
114-## ##
115-## Copyright (c) International Business Machines Corp., 2007 ##
116-## ##
117-## This program is free software; you can redistribute it and#or modify ##
118-## it under the terms of the GNU General Public License as published by ##
119-## the Free Software Foundation; either version 2 of the License, or ##
120-## (at your option) any later version. ##
121-## ##
122-## This program is distributed in the hope that it will be useful, but ##
123-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
124-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
125-## for more details. ##
126-## ##
127-## You should have received a copy of the GNU General Public License ##
128-## along with this program; if not, write to the Free Software ##
129-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
130-## ##
131-################################################################################
132-
133-oldhostname=`hostname`
134-exit_code=0
135-echo "unshare tests"
136-for i in `seq 1 5`; do
137- echo "test $i (unshare)"
138- ./utstest_noltp unshare $i
139- if [ $? -ne 0 ]; then
140- exit_code=$?
141- fi
142-done
143-echo "clone tests"
144-for i in `seq 1 5`; do
145- echo "test $i (clone)"
146- ./utstest_noltp clone $i
147- if [ $? -ne 0 ]; then
148- exit_code=$?
149- fi
150-done
151-hostname "$oldhostname"
152-exit $exit_code
153diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
154new file mode 100755
155index 0000000..43cb7e2
156--- /dev/null
157+++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh
158@@ -0,0 +1,41 @@
159+#!/bin/sh
160+################################################################################
161+## ##
162+## Copyright (c) International Business Machines Corp., 2007 ##
163+## ##
164+## This program is free software; you can redistribute it and#or modify ##
165+## it under the terms of the GNU General Public License as published by ##
166+## the Free Software Foundation; either version 2 of the License, or ##
167+## (at your option) any later version. ##
168+## ##
169+## This program is distributed in the hope that it will be useful, but ##
170+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
171+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
172+## for more details. ##
173+## ##
174+## You should have received a copy of the GNU General Public License ##
175+## along with this program; if not, write to the Free Software ##
176+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
177+## ##
178+################################################################################
179+
180+oldhostname=`hostname`
181+exit_code=0
182+echo "unshare tests"
183+for i in `seq 1 5`; do
184+ echo "test $i (unshare)"
185+ ./utstest_noltp unshare $i
186+ if [ $? -ne 0 ]; then
187+ exit_code=$?
188+ fi
189+done
190+echo "clone tests"
191+for i in `seq 1 5`; do
192+ echo "test $i (clone)"
193+ ./utstest_noltp clone $i
194+ if [ $? -ne 0 ]; then
195+ exit_code=$?
196+ fi
197+done
198+hostname "$oldhostname"
199+exit $exit_code
200--
2011.8.4.3
202
diff --git a/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
new file mode 100644
index 0000000000..9f02711070
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
@@ -0,0 +1,15 @@
1Get rid of the hardcoded configure call preventing cross-compilation
2
3Upstream-Status: Pending
4Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
5
6--- a/utils/Makefile
7+++ b/utils/Makefile
8@@ -29,7 +29,6 @@ FILTER_OUT_DIRS := $(FFSBDIR)
9 FFSB := $(FFSBDIR)/ffsb
10
11 $(FFSB): $(FFSBDIR)
12- cd $^; ./configure
13 $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
14 cp $(FFSBDIR)/ffsb ffsb
15
diff --git a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
new file mode 100644
index 0000000000..3e4aa7308d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
@@ -0,0 +1,31 @@
1From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
2From: Chong Lu <Chong.Lu@windriver.com>
3Date: Tue, 11 Mar 2014 14:47:22 +0800
4Subject: [PATCH] ltp: Don't link against libfl
5
6We have already defined yywrap function in scan.l file. After this, we no longer need to
7link against libfl and so no longer get errors about undefined references to yylex.
8
9Upstream-status: Pending
10
11Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
12---
13 pan/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/pan/Makefile b/pan/Makefile
17index 4cc6466..a4b575b 100644
18--- a/pan/Makefile
19+++ b/pan/Makefile
20@@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error
21
22 CPPFLAGS += -I$(abs_srcdir)
23
24-LDLIBS += -lm $(LEXLIB)
25+LDLIBS += -lm
26
27 LFLAGS += -l
28
29--
301.7.9.5
31
diff --git a/meta/recipes-extended/ltp/ltp/regen-makefile.patch b/meta/recipes-extended/ltp/ltp/regen-makefile.patch
new file mode 100644
index 0000000000..3e114a1d85
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/regen-makefile.patch
@@ -0,0 +1,22 @@
1Fix the dependencies for linux_syscall_numbers.h where in a parallel build it was
2finding the temporary file linux_syscall_numbers.h.[pid].sh (where sh is an
3architecture name). Instead don't wildcard *.sh as the only .sh we care about
4here is regen.sh, so hard-code that.
5
6Upstream-Status: Pending
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8
9diff --git a/testcases/kernel/include/Makefile b/testcases/kernel/include/Makefile
10index db21a2a..585eb5e 100644
11--- a/testcases/kernel/include/Makefile
12+++ b/testcases/kernel/include/Makefile
13@@ -28,7 +28,7 @@ INSTALL_DIR := $(includedir)
14
15 MAKE_TARGETS := linux_syscall_numbers.h
16
17-linux_syscall_numbers.h: $(wildcard $(abs_srcdir)/*.sh $(abs_srcdir)/*.in)
18- $(SHELL) "$(abs_srcdir)/regen.sh"
19+linux_syscall_numbers.h: $(abs_srcdir)/regen.sh $(wildcard $(abs_srcdir)/*.in)
20+ $(SHELL) "$<"
21
22 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/meta/recipes-extended/ltp/ltp_20140115.bb b/meta/recipes-extended/ltp/ltp_20140115.bb
new file mode 100644
index 0000000000..76c22cb960
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp_20140115.bb
@@ -0,0 +1,85 @@
1SUMMARY = "Linux Test Project"
2DESCRIPTION = "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."
3HOMEPAGE = "http://ltp.sourceforge.net"
4SECTION = "console/utils"
5LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
6LIC_FILES_CHKSUM = "\
7 file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
8 file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
9 file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
10 file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
11 file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
12 file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
13 file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
15 file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
16 file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
17 file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
18 file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
19 file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
20"
21
22DEPENDS = "attr libaio libcap acl openssl"
23SRCREV = "c8b3e28097e7d3208df9daceaf92c25eae87ebf0"
24
25SRC_URI = "git://github.com/linux-test-project/ltp.git \
26 file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
27 file://regen-makefile.patch \
28 file://ffsb-remove-hardcoded-configure.patch \
29 file://periodic_output.patch \
30 file://ltp-Do-not-link-against-libfl.patch \
31"
32
33S = "${WORKDIR}/git"
34
35inherit autotools-brokensep
36
37TARGET_CC_ARCH += "${LDFLAGS}"
38
39export prefix = "/opt/ltp"
40export exec_prefix = "/opt/ltp"
41
42# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
43# we explicitly force regeneration of that directory and pass configure options.
44do_configure_append() {
45 (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
46}
47
48# The makefiles make excessive use of make -C and several include testcases.mk
49# which triggers a build of the syscall header. To reproduce, build ltp,
50# then delete the header, then "make -j XX" and watch regen.sh run multiple
51# times. Its easier to generate this once here instead.
52do_compile_prepend () {
53 ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
54}
55
56do_install(){
57 install -d ${D}/opt/ltp/
58 oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
59
60 # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
61 cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
62
63 # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core
64 # We will add expect for enhancement in future
65 find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f
66}
67
68RDEPENDS_${PN} = "perl e2fsprogs-mke2fs"
69
70FILES_${PN}-dbg += "\
71 /opt/ltp/runtest/.debug \
72 /opt/ltp/testcases/bin/.debug \
73 /opt/ltp/testcases/bin/*/bin/.debug \
74 /opt/ltp/testcases/bin/*/test/.debug \
75 /opt/ltp/scenario_groups/.debug \
76 /opt/ltp/testscripts/.debug \
77 /opt/ltp/testscripts/open_posix_testsuite/.debug \
78"
79
80FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
81
82FILES_${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/*"
83
84# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
85INHIBIT_PACKAGE_STRIP = "1"
diff --git a/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch b/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch
new file mode 100644
index 0000000000..8c7178bf8c
--- /dev/null
+++ b/meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch
@@ -0,0 +1,46 @@
1krb5 support is autodetected from sysroot making builds undeterministic
2feel free to improve this to support explicitly enabling/disabling it
3
4Upstream-Status: Penging
5
6Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
7
8--- a/makeconfig 2013-07-21 15:06:11.177792334 +0200
9+++ b/makeconfig 2013-07-21 15:07:20.028793994 +0200
10@@ -424,36 +424,6 @@
11 }
12 !
13
14-<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \
15- '#define USE_GSSAPI' '-lgss' ||
16- <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \
17- '#define USE_GSSAPI' '-lgssapi_krb5' ||
18- link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \
19- '#define USE_GSSAPI
20-#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \
21- link_check gssapi 'for GSSAPI in libgssapi' \
22- '#define USE_GSSAPI
23-#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\%
24-#include <gssapi/gssapi.h>
25-#include <gssapi/gssapi_generic.h>
26-
27-int main(void)
28-{
29- gss_import_name(0, 0, gss_nt_service_name, 0);
30- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
31- return 0;
32-}
33-!
34-#include <gssapi.h>
35-
36-int main(void)
37-{
38- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0);
39- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
40- return 0;
41-}
42-%
43-
44 cat >$tmp2.c <<\!
45 #include "config.h"
46 #ifdef HAVE_NL_LANGINFO
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 0000000000..cc0b6bfd3a
--- /dev/null
+++ b/meta/recipes-extended/mailx/mailx_12.5.bb
@@ -0,0 +1,32 @@
1SUMMARY = "mailx is the traditional command-line-mode mail user agent"
2
3DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \
4functionality of the POSIX mailx command with additional support \
5for MIME, IMAP, POP3, SMTP, and S/MIME."
6
7HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html"
8SECTION = "console/network"
9PR = "r2"
10LICENSE = "BSD & MPL-1"
11LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd"
12
13DEPENDS = "openssl"
14
15SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}.orig.tar.gz;name=archive \
16 ${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}-1.diff.gz;name=patch \
17 file://explicitly.disable.krb5.support.patch \
18 "
19
20SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
21SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
22SRC_URI[patch.md5sum] = "f466281336183be673bf136dd7096662"
23SRC_URI[patch.sha256sum] = "aaf2a4bbf145e5ca9cdeb0843091ec8cc01df6c9568c997207a5e97b4dc5ba43"
24
25S = "${WORKDIR}/heirloom-mailx-${PV}"
26
27inherit autotools-brokensep
28
29CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT"
30EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail"
31
32PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/man-pages/man-pages_3.60.bb b/meta/recipes-extended/man-pages/man-pages_3.60.bb
new file mode 100644
index 0000000000..a54d9b0a9c
--- /dev/null
+++ b/meta/recipes-extended/man-pages/man-pages_3.60.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Linux man-pages"
2DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
3SECTION = "console/utils"
4HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
5LICENSE = "GPLv2+"
6
7LIC_FILES_CHKSUM = "file://README;md5=0422377a748010b2b738342e24f141c1"
8SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
9
10SRC_URI[md5sum] = "5e64e4361b5ee1991e0ec5d44b6c5d69"
11SRC_URI[sha256sum] = "d62d10f2d75257c883118d388021e06d2193a61ae8951f94492ac53a07d83387"
12
13RDEPENDS_${PN} = "man"
14
15do_configure () {
16 :
17}
18
19do_compile() {
20 :
21}
22
23do_install() {
24 oe_runmake install DESTDIR=${D}
25}
26
27# Only deliveres man-pages so FILES_${PN} gets everything
28FILES_${PN}-doc = ""
29FILES_${PN} = "${mandir}/*"
diff --git a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
new file mode 100644
index 0000000000..6f834bd01b
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5diff -u -r man-1.5g.old/configure man-1.5g/configure
6--- man-1.5g.old/configure Wed Apr 7 04:16:05 1999
7+++ man-1.5g/configure Mon May 15 15:22:44 2000
8@@ -791,7 +791,7 @@
9 read mode
10 if test "$mode" != ""; then man_mode=$mode; fi
11 fi
12- man_install_flags="-m $man_mode -o $man_user -g $man_group"
13+ man_install_flags=""
14 fi
15
16 # What sections do we anticipate?
diff --git a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
new file mode 100644
index 0000000000..044b14c509
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200
6+++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100
7@@ -47,6 +47,7 @@ up-to-date. Many thanks.
8 01/14/91 4 nazgul Off by one on number specified entries
9 */
10
11+#undef _GNU_SOURCE
12 #include <stdio.h>
13 #include <stdlib.h>
14 #ifdef SYSV
diff --git a/meta/recipes-extended/man/man/man-1.5h1-make.patch b/meta/recipes-extended/man/man/man-1.5h1-make.patch
new file mode 100644
index 0000000000..8631eb2c53
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5h1-make.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999
6+++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999
7@@ -1,8 +1,8 @@
8 # only executed from a subdir
9 MAN1 = man whatis apropos
10-MAN5 = man.conf
11+MAN5 = man.config
12 MAN8 = makewhatis
13-ALL = man.1 whatis.1 apropos.1 man.conf.5
14+ALL = man.1 whatis.1 apropos.1 man.config.5
15 MAYBE8 = makewhatis
16
17 .SUFFIXES: .man .1 .5 .8
diff --git a/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/meta/recipes-extended/man/man/man-1.5i2-initial.patch
new file mode 100644
index 0000000000..fe56c0706c
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-initial.patch
@@ -0,0 +1,19 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001
6+++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001
7@@ -81,8 +81,10 @@
8 continue;;
9 -s) setsections=1
10 continue;;
11- -u) findarg="-newer /var/cache/man/whatis"
12- update=1
13+ -u) if [ -e /var/cache/man/whatis ]; then
14+ findarg="-newer /var/cache/man/whatis"
15+ update=1
16+ fi
17 continue;;
18 -v) verbose=1
19 continue;;
diff --git a/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/meta/recipes-extended/man/man/man-1.5i2-newline.patch
new file mode 100644
index 0000000000..611df5d259
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-newline.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- src/man.c 2008-12-21 19:17:31.000000000 +0100
6+++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100
7@@ -391,7 +391,7 @@ again:
8 beg++;
9
10 end = beg;
11- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
12+ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
13 end++; /* note that buf is NUL-terminated */
14 *end = '\0';
15
diff --git a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
new file mode 100644
index 0000000000..52d2881a89
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001
6+++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001
7@@ -381,6 +381,9 @@
8 strcat(name, "/");
9 strcat(name, beg);
10 }
11+ /* If this is too long, bad things have already happened. *
12+ * we should quit IMMEDIATELY. */
13+ if(strlen(name)>sizeof(ultname)) _exit(1);
14
15 goto again;
16 }
diff --git a/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/meta/recipes-extended/man/man/man-1.5j-i18n.patch
new file mode 100644
index 0000000000..2ae09c0ea4
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-i18n.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001
6+++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001
7@@ -27,8 +27,7 @@
8 for j in $M; do
9 if [ -f $j ]; then
10 i=`echo $j | sed -e 's/mess.//; s/.cat//'`
11- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
12- dest=${PREFIX}$dest
13+ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
14 echo "mkdir -p `dirname $dest`"
15 mkdir -p `dirname $dest`;
16 echo "install -c -m 644 $j $dest"
diff --git a/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/meta/recipes-extended/man/man/man-1.5j-nocache.patch
new file mode 100644
index 0000000000..751dddd53b
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-nocache.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001
6+++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001
7@@ -81,6 +81,9 @@
8 #
9 #NOCACHE
10 #
11+# NOCACHE keeps man from creating cache pages
12+NOCACHE
13+#
14 # Useful paths - note that COL should not be defined when
15 # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
16 # not only is it superfluous, but it actually damages the output.
diff --git a/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/meta/recipes-extended/man/man/man-1.5j-utf8.patch
new file mode 100644
index 0000000000..33d3e4c974
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-utf8.patch
@@ -0,0 +1,61 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001
6+++ man-1.5j/configure Thu Nov 22 15:03:15 2001
7@@ -408,9 +408,9 @@
8 Fgawk=/bin/gawk
9 Fawk=/bin/gawk
10 Fmawk=missing
11- troff=""
12- nroff=""
13- jnroff=""
14+ troff=/usr/bin/troff
15+ nroff=/usr/bin/nroff
16+ jnroff=/usr/bin/nroff
17 eqn=""
18 neqn=""
19 jneqn=""
20@@ -453,6 +453,8 @@
21 done
22 done
23 Fgroff=/usr/bin/groff
24+ Fnroff=/usr/bin/nroff
25+ Fjnroff=/usr/bin/nroff
26 Fgeqn=/usr/bin/geqn
27 Fgtbl=/usr/bin/gtbl
28 Fcol=/usr/bin/col
29@@ -485,25 +487,25 @@
30 then
31 if test $Fnroff = "missing"
32 then
33- nroff="nroff -Tlatin1 -mandoc"
34+ nroff="nroff -Tutf8 -mandoc"
35 else
36- nroff="$Fnroff -Tlatin1 -mandoc"
37+ nroff="$Fnroff -Tutf8 -mandoc"
38 fi
39 troff="troff -mandoc"
40 echo "Warning: could not find groff"
41 else
42 if test $Fnroff = "missing"
43 then
44- nroff="$Fgroff -Tlatin1 -mandoc"
45+ nroff="$Fgroff -Tutf8 -mandoc"
46 else
47- nroff="$Fnroff -Tlatin1 -mandoc"
48+ nroff="$Fnroff -Tutf8 -mandoc"
49 fi
50 troff="$Fgroff -Tps -mandoc"
51- jnroff="$Fgroff -Tnippon -mandocj"
52+ jnroff="$Fjnroff -Tutf8 -mandocj"
53 fi
54 eqn="$Fgeqn -Tps"
55- neqn="$Fgeqn -Tlatin1"
56- jneqn="$Fgeqn -Tnippon"
57+ neqn="$Fgeqn -Tutf8"
58+ jneqn="$Fgeqn -Tutf8"
59 tbl="$Fgtbl"
60 col="$Fcol"
61 vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/meta/recipes-extended/man/man/man-1.5k-confpath.patch
new file mode 100644
index 0000000000..b5746c2df8
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-confpath.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- configure 2006-05-01 19:56:14.000000000 +0200
6+++ configure.oden 2008-12-21 19:16:50.000000000 +0100
7@@ -198,7 +198,7 @@
8 confdir="${confprefix}/share/misc"
9 fi
10 fi
11-conffilename="man.conf"
12+conffilename="man.config"
13
14 if test "$RANDOM" = "$RANDOM"; then
15 # Plain old Bourne shell.
diff --git a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
new file mode 100644
index 0000000000..d662d9b6a7
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100
6+++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200
7@@ -18,9 +18,9 @@
8
9 # When man pages in your favorite locale look to grep like binary files
10 # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
11-aproposgrepopt1='i'
12+aproposgrepopt1='ia'
13 aproposgrepopt2=''
14-whatisgrepopt1='iw'
15+whatisgrepopt1='iwa'
16 whatisgrepopt2='^'
17 grepopt1=$%apropos_or_whatis%grepopt1
18 grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/meta/recipes-extended/man/man/man-1.5k-sofix.patch
new file mode 100644
index 0000000000..50b925288e
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-sofix.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001
6+++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001
7@@ -300,7 +300,7 @@
8
9 if (strlen(name0) >= sizeof(ultname))
10 return name0;
11- strcpy(ultname, name0);
12+ strncpy(ultname, name0, BUFSIZE-32);
13 name = ultname;
14
15 again:
16@@ -332,7 +332,7 @@
17 * .so files - we could glob for all possible extensions,
18 * for now: only try .gz
19 */
20- else if (fp == NULL && get_expander(".gz") &&
21+ if (fp == NULL && get_expander(".gz") &&
22 strlen(name)+strlen(".gz") < BUFSIZE) {
23 strcat(name, ".gz");
24 fp = fopen (name, "r");
diff --git a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
new file mode 100644
index 0000000000..051299906b
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- ./configure.ad 2003-12-11 19:17:10.000000000 +0100
6+++ ./configure 2003-12-11 19:17:27.000000000 +0100
7@@ -26,7 +26,7 @@
8 # (Indeed, -r may cause the terminal to get into funny states.
9 # Very inconvenient. For viewing pages in strange locales, set LC_*.)
10 #
11-DEFAULTLESSOPT="-is"
12+DEFAULTLESSOPT="-isr"
13 #
14 # Note that not creating any cat directories (/var/cache/man or so)
15 # and not making man suid or sgid is recommended.
diff --git a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
new file mode 100644
index 0000000000..bc97f56b9a
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- ./configure.less 2003-12-11 19:18:15.000000000 +0100
6+++ ./configure 2003-12-11 19:20:03.000000000 +0100
7@@ -401,18 +401,13 @@
8
9 if test "$ans" = "false"
10 then
11- for i in more less cmp cat awk gawk mawk
12- do
13- eval F$i="missing"
14- for j in $DEFPATH
15- do
16- if test -f $j/$i
17- then
18- eval F$i=$j/$i
19- break
20- fi
21- done
22- done
23+ Fmore=/bin/more
24+ Fless=/usr/bin/less
25+ Fcmp=/usr/bin/cmp
26+ Fcat=/bin/cat
27+ Fgawk=/bin/gawk
28+ Fawk=/bin/gawk
29+ Fmawk=missing
30 troff=""
31 nroff=""
32 jnroff=""
33@@ -457,6 +452,19 @@
34 fi
35 done
36 done
37+ Fgroff=/usr/bin/groff
38+ Fgeqn=/usr/bin/geqn
39+ Fgtbl=/usr/bin/gtbl
40+ Fcol=/usr/bin/col
41+ Fgrefer=/usr/bin/grefer
42+ Fgpic=/usr/bin/gpic
43+ Fmore=/bin/more
44+ Fless=/usr/bin/less
45+ Fcmp=/usr/bin/cmp
46+ Fcat=/bin/cat
47+ Fgawk=/bin/gawk
48+
49+
50 for i in eqn tbl refer pic
51 do
52 if test `eval echo \\$Fg$i` = "missing"
diff --git a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
new file mode 100644
index 0000000000..c85ff1d8c7
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200
6+++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200
7@@ -539,6 +539,8 @@
8 troff="$troff -c"
9 nroff="$nroff -c"
10 jnroff="$jnroff -c"
11+else
12+ troff="$troff -c"
13 fi
14
15 if [ x$default = x ]; then
diff --git a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
new file mode 100644
index 0000000000..8af78eab7b
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100
6+++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100
7@@ -116,11 +116,14 @@
8 static int
9 system1 (const char *command) {
10 void (*prev_handler)(int) = signal (SIGINT,catch_int);
11+ signal (SIGPIPE,SIG_IGN);
12 int ret = system(command);
13
14 /* child terminated with signal? */
15 if (WIFSIGNALED(ret) &&
16- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
17+ (WTERMSIG(ret) == SIGINT ||
18+ WTERMSIG(ret) == SIGPIPE ||
19+ WTERMSIG(ret) == SIGQUIT))
20 exit(1);
21
22 /* or we caught an interrupt? */
23@@ -128,6 +131,7 @@
24 exit(1);
25
26 signal(SIGINT,prev_handler);
27+ signal(SIGPIPE,SIG_DFL);
28 return ret;
29 }
30
diff --git a/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
new file mode 100644
index 0000000000..fe66d7599a
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100
6+++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100
7@@ -34,6 +34,15 @@
8 for i in $(MAN8); \
9 do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
10
11+install-l10n: $(ALL)
12+ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
13+ for i in $(MAN1); \
14+ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
15+ for i in $(MAN5); \
16+ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
17+ for i in $(MAN8); \
18+ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
19+
20 clean:
21 rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
22
23@@ -49,7 +58,7 @@
24 @for i in @languages@; do if test -d $$i; then echo; \
25 echo "==== Installing the `cat $$i.txt` man pages. ===="; \
26 cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
27- export SLANG; make -f ../Makefile install; cd ..; \
28+ export SLANG; make -f ../Makefile install-l10n; cd ..; \
29 else echo "==== No $$i man pages found. ===="; fi; done
30
31 cleansubdirs:
diff --git a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
new file mode 100644
index 0000000000..e321325d63
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
@@ -0,0 +1,145 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
6--- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300
7+++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300
8@@ -60,16 +60,56 @@
9 esac
10 done
11
12+# list of languages to look for
13+LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
14+DIR_LIST=""
15+for d in /var/cache/man $manpath /usr/lib
16+do
17+ for l in $LANG_LIST
18+ do
19+ if [ -d $d/$l ]
20+ then
21+ # check that the path is not already in the list
22+ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
23+ then
24+ DIR_LIST="$DIR_LIST $d/$l"
25+ fi
26+ fi
27+ done
28+ DIR_LIST="$DIR_LIST $d"
29+ # check that the path is not already in the list
30+ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
31+ then
32+ DIR_LIST="$DIR_LIST $d/$l"
33+ fi
34+done
35+
36 while [ "$1" != "" ]
37 do
38 found=0
39- for d in /var/cache/man $manpath /usr/lib
40+ # in order not to display lines in more than one language for
41+ # a same man page; we check that a given man page name
42+ # hasn't already been displayed
43+ BAZ=""
44+ for d in $DIR_LIST
45 do
46 if [ -f $d/whatis ]
47 then
48- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
49+ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
50 then
51- found=1
52+ # the LC_ALL=C is needed in case the text is
53+ # in a different encoding than the locale
54+ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
55+ for i in $BAR
56+ do
57+ if ! echo "$BAZ" | grep "$i" > /dev/null
58+ then
59+ BAZ="$BAZ $i"
60+ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
61+ echo -e "$FOO" | grep "$i"
62+ found=1
63+ fi
64+ done
65 # Some people are satisfied with a single occurrence
66 # But it is better to give all
67 # break
68diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
69--- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300
70+++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300
71@@ -41,12 +41,32 @@
72
73 program=`basename $0`
74
75+# this allows to define language specific values fro NAME, DESCRIPTION
76+# if not defined, using those default values
77+if [ -z "$MAN_NAME" ]
78+then
79+ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
80+NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱"
81+fi
82+if [ -z "$MAN_DESCRIPTION" ]
83+then
84+ MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
85+ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\
86+説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°"
87+fi
88+# make them into awk regexp
89+MAN_NAME="^(${MAN_NAME})";
90+MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
91+
92 # In case both /usr/man and /usr/share/man exist, the former is local
93 # and should be first.
94 # It is a bug to add /var/cache/man to DEFCATPATH.
95 dm=
96 for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
97 do
98+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
99+ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
100+ fi
101 if [ -d $d ]; then
102 if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
103 fi
104@@ -55,6 +75,9 @@
105 dc=
106 for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
107 do
108+ if [ -n "$LANG" -a -d "$d/$LANG" ]; then
109+ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
110+ fi
111 if [ -d $d ]; then
112 if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
113 fi
114@@ -194,7 +217,7 @@
115 section=$i
116 curdir=$mandir/${pages}$i
117 export section verbose curdir
118- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
119+ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
120
121 function readline() {
122 if (use_zcat || use_bzcat) {
123@@ -261,13 +284,7 @@
124 gsub(/.\b/, "");
125 if (($1 ~ /^\.[Ss][Hh]/ &&
126 ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
127- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
128- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
129- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
130- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
131- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
132- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
133- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
134+ $2 ~ MAN_NAME )) ||
135 (pages == "cat" && $1 ~ /^NAME/)) {
136 if (!insh) {
137 insh = 1;
138@@ -278,6 +295,7 @@
139 if ($1 ~ /^\.[Ss][HhYS]/ ||
140 (pages == "cat" &&
141 ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
142+ $1 ~ MAN_DESCRIPTION ||
143 $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
144 $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
145 $0 ~ /^[^ ]/))) {
diff --git a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
new file mode 100644
index 0000000000..b240064c98
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300
6+++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300
7@@ -36,11 +36,12 @@
8 #
9 # Every automatically generated MANPATH includes these fields
10 #
11-MANPATH /usr/man
12 MANPATH /usr/share/man
13+MANPATH /usr/X11R6/man
14 MANPATH /usr/local/man
15 MANPATH /usr/local/share/man
16-MANPATH /usr/X11R6/man
17+MANPATH /usr/kerberos/man
18+MANPATH /usr/man
19 #
20 # Uncomment if you want to include one of these by default
21 #
22@@ -67,6 +68,9 @@
23 MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
24 MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
25 MANPATH_MAP /usr/bin/mh /usr/share/man
26+MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man
27+MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man
28+
29 #
30 # NOAUTOPATH keeps man from automatically adding directories that look like
31 # manual page directories to the path.
diff --git a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
new file mode 100644
index 0000000000..fb9773c646
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5--- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300
6+++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300
7@@ -960,7 +960,7 @@
8
9 # What sections do we anticipate?
10
11-tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
12+tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
13
14 if [ x$default = x ]; then
15 echo ""
diff --git a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
new file mode 100644
index 0000000000..1d1cb0c724
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5Index: man-1.6f/src/makewhatis.sh
6===================================================================
7--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800
8+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800
9@@ -124,7 +124,7 @@
10 continue;;
11 -s) setsections=1
12 continue;;
13- -u) findarg="-ctime 0"
14+ -u) findarg="-newer /var/cache/man/whatis"
15 update=1
16 continue;;
17 -v) verbose=1
18@@ -165,14 +165,7 @@
19 # first truncate all the whatis files that will be created new,
20 # then only update - we might visit the same directory twice
21 if [ x$update = x ]; then
22- for pages in man cat
23- do
24- eval path="\$$pages"path
25- for mandir in $path
26- do
27- cp /dev/null $mandir/whatis
28- done
29- done
30+ cp /dev/null /var/cache/man/whatis
31 fi
32
33 for pages in man cat
diff --git a/meta/recipes-extended/man/man/man-1.6e-security.patch b/meta/recipes-extended/man/man/man-1.6e-security.patch
new file mode 100644
index 0000000000..312a882f06
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-security.patch
@@ -0,0 +1,62 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
6--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
7+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300
8@@ -45,7 +45,7 @@
9 # and should be first.
10 # It is a bug to add /var/cache/man to DEFCATPATH.
11 dm=
12-for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
13+for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
14 do
15 if [ -d $d ]; then
16 if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
17@@ -53,7 +53,7 @@
18 done
19 DEFMANPATH=$dm
20 dc=
21-for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
22+for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
23 do
24 if [ -d $d ]; then
25 if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
26@@ -76,12 +76,12 @@
27 # We try here to be careful (and avoid preconstructed symlinks)
28 # in case makewhatis is run as root, by creating a subdirectory of /tmp.
29
30-TMPFILEDIR=/tmp/whatis.tmp.dir.$$
31-rm -rf $TMPFILEDIR
32-if ! mkdir -m 0700 $TMPFILEDIR; then
33- echo Could not create $TMPFILEDIR
34- exit 1;
35+TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
36+if [ $? -ne 0 ]; then
37+ echo "$0: Can't create temp file, exiting..."
38+ exit 1
39 fi
40+chmod 0700 $TMPFILEDIR
41 TMPFILE=$TMPFILEDIR/w
42
43 # make sure TMPFILEDIR is deleted if program is killed or terminates
44diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
45--- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300
46+++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300
47@@ -1234,7 +1234,6 @@
48 #endif
49
50
51-#if 0
52 {
53 /* There are no known cases of buffer overflow caused by
54 excessively long environment variables. In case you find one,
55@@ -1257,7 +1256,6 @@
56 MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
57 MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
58 }
59-#endif
60
61
62 #ifndef __FreeBSD__
diff --git a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
new file mode 100644
index 0000000000..568f742100
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
@@ -0,0 +1,160 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
6--- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300
7+++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300
8@@ -9,22 +9,63 @@
9 extern char *index (const char *, int); /* not always in <string.h> */
10 extern char *my_malloc(int); /* in util.c */
11
12+/* if the program has sgid/suid privileges then getenv doesn't return
13+ * NLSPATH; so we set here a good default value.
14+ */
15 #ifndef DEFAULT_NLSPATH
16 # if __GLIBC__ >= 2
17-# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
18+# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
19 # else
20 # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
21 # endif
22 #endif
23
24-static nl_catd my_catopenpath(char *name, char *path);
25+static nl_catd my_catopenpath(char *name, char *path, char *lang);
26
27 static /* this source included in gripes.c */
28 nl_catd
29 my_catopen(char *name, int oflag) {
30- nl_catd fd;
31+ nl_catd fd = (nl_catd) -1;
32+
33+ /* using first the my_catopenpath, which looks with LANGUAGE
34+ * and only if it fails ressort to catopen, it gives better i18n
35+ */
36+ {
37+ char *nlspath, *lang, *s;
38
39- fd = catopen(name, oflag);
40+ /*
41+ * "If NLSPATH does not exist in the environment, or if a
42+ * message catalog cannot be opened in any of the paths specified
43+ * by NLSPATH, then an implementation defined default path is used"
44+ */
45+ nlspath = getenv("NLSPATH");
46+ if (!nlspath)
47+ nlspath = DEFAULT_NLSPATH;
48+
49+ lang = getenv("LANGUAGE");
50+ if (!lang)
51+ lang = getenv("LC_ALL");
52+ if (!lang)
53+ lang = getenv("LC_MESSAGES");
54+ if (!lang)
55+ lang = getenv("LANG");
56+ if (!lang)
57+ lang = "";
58+
59+ while(*lang && (fd == (nl_catd) -1)) {
60+ s = index(lang, ':');
61+ if (s) *s = 0;
62+ fd = my_catopenpath(name, nlspath, lang);
63+ if (s) lang=s+1;
64+ else lang = "";
65+ }
66+ if (fd == (nl_catd) -1)
67+ fd = my_catopenpath(name, nlspath, "en");
68+ }
69+
70+ /* still not found, use the system catopen */
71+ if (fd == (nl_catd) -1)
72+ fd = catopen(name, oflag);
73
74 if (fd == (nl_catd) -1 && oflag) {
75 oflag = 0;
76@@ -32,8 +73,6 @@
77 }
78
79 if (fd == (nl_catd) -1) {
80- char *nlspath;
81-
82 /* The libc catopen fails - let us see if we can do better */
83 /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
84
85@@ -58,17 +97,6 @@
86 #endif
87 }
88
89- /*
90- * "If NLSPATH does not exist in the environment, or if a
91- * message catalog cannot be opened in any of the paths specified
92- * by NLSPATH, then an implementation defined default path is used"
93- */
94-
95- nlspath = getenv("NLSPATH");
96- if (nlspath)
97- fd = my_catopenpath(name, nlspath);
98- if (fd == (nl_catd) -1)
99- fd = my_catopenpath(name, DEFAULT_NLSPATH);
100 }
101 return fd;
102 }
103@@ -90,15 +118,13 @@
104 *
105 */
106 static nl_catd
107-my_catopenpath(char *name, char *nlspath) {
108- int fd;
109+my_catopenpath(char *name, char *nlspath, char *lang) {
110 nl_catd cfd = (nl_catd) -1;
111- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
112+ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
113 int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
114
115 namesz = strlen(name);
116
117- lang = getenv("LANG");
118 if (!lang)
119 lang = "";
120 langsz = strlen(lang);
121@@ -194,14 +220,9 @@
122 path = s+1;
123 } else
124 path = 0;
125- fd = open(file, O_RDONLY);
126- if (fd != -1) {
127- /* we found the right catalog - but we don't know the
128- type of nl_catd, so close it again and ask libc */
129- close(fd);
130- cfd = catopen(file, 0);
131- break;
132- }
133+ cfd = catopen(file, 0);
134+ if (cfd != (nl_catd) -1)
135+ break;
136 }
137
138 free(path0);
139diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
140--- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300
141+++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300
142@@ -282,13 +282,14 @@
143 /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
144 the return value of setlocale is an opaque string. */
145 /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
146- if((lang = getenv("LC_ALL")) != NULL)
147+ /* LANGUAGE is GNU/Linux and overrules all */
148+ if((lang = getenv("LANGUAGE")) != NULL)
149 split2(dir, lang, add_to_mandirlist_x, perrs);
150- if((lang = getenv("LC_MESSAGES")) != NULL)
151+ else if((lang = getenv("LC_ALL")) != NULL)
152 split2(dir, lang, add_to_mandirlist_x, perrs);
153- if((lang = getenv("LANG")) != NULL)
154+ else if((lang = getenv("LC_MESSAGES")) != NULL)
155 split2(dir, lang, add_to_mandirlist_x, perrs);
156- if((lang = getenv("LANGUAGE")) != NULL)
157+ else if((lang = getenv("LANG")) != NULL)
158 split2(dir, lang, add_to_mandirlist_x, perrs);
159 add_to_mandirlist_x(dir, 0, perrs);
160 }
diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
new file mode 100644
index 0000000000..7f013836c0
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
@@ -0,0 +1,52 @@
1Upstream-Status: Pending
2
3Signed-off-by: Scott Garman <scott.a.garman@intel.com>
4
5Index: man-1.6f/src/makewhatis.sh
6===================================================================
7--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800
8+++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800
9@@ -164,10 +164,15 @@
10 fi
11 catpath=`echo ${catpath} | tr : ' '`
12
13+#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
14+WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
15+[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
16+
17 # first truncate all the whatis files that will be created new,
18 # then only update - we might visit the same directory twice
19 if [ x$update = x ]; then
20- cp /dev/null /var/cache/man/whatis
21+ mkdir -p $WHATIS_DIR/
22+ /bin/echo -n > $WHATIS_DIR/whatis
23 fi
24
25 for pages in man cat
26@@ -180,13 +185,7 @@
27 echo "about to enter $mandir" > /dev/stderr
28 fi
29
30- # kludge for Slackware's /usr/man/preformat
31- if [ $mandir = /usr/man/preformat ]
32- then
33- mandir1=/usr/man
34- else
35- mandir1=$mandir
36- fi
37+ mandir1=$WHATIS_DIR
38
39 # if $mandir is on a readonly partition, and the whatis file
40 # is not a symlink, then let's skip trying to update it
41@@ -207,11 +206,6 @@
42 fi
43 fi
44
45- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
46- if [ x$verbose != x ]; then
47- echo skipping $mandir - we did it already > /dev/stderr
48- fi
49- else
50 here=`pwd`
51 cd $mandir
52 for i in $sections
diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz
new file mode 100644
index 0000000000..c368045153
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.1.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.7.gz b/meta/recipes-extended/man/man/man.7.gz
new file mode 100644
index 0000000000..e85af82426
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.7.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf
new file mode 100644
index 0000000000..bb3c69720e
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.conf
@@ -0,0 +1,140 @@
1#
2# Generated automatically from man.conf.in by the
3# configure script.
4#
5# man.conf from man-1.5p
6#
7# For more information about this file, see the man pages man(1)
8# and man.conf(5).
9#
10# This file is read by man to configure the default manpath (also used
11# when MANPATH contains an empty substring), to find out where the cat
12# pages corresponding to given man pages should be stored,
13# and to map each PATH element to a manpath element.
14# It may also record the pathname of the man binary. [This is unused.]
15# The format is:
16#
17# MANBIN pathname
18# MANPATH manpath_element [corresponding_catdir]
19# MANPATH_MAP path_element manpath_element
20#
21# If no catdir is given, it is assumed to be equal to the mandir
22# (so that this dir has both man1 etc. and cat1 etc. subdirs).
23# This is the traditional Unix setup.
24# Certain versions of the FSSTND recommend putting formatted versions
25# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
26# The keyword FSSTND will cause this behaviour.
27# Certain versions of the FHS recommend putting formatted versions of
28# /usr/.../share/man/[locale/]manx/page.x into
29# /var/cache/man/.../[locale/]catx/page.x.
30# The keyword FHS will cause this behaviour (and overrides FSSTND).
31# Explicitly given catdirs override.
32#
33# FSSTND
34FHS
35#
36# This file is also read by man in order to find how to call nroff, less, etc.,
37# and to determine the correspondence between extensions and decompressors.
38#
39# MANBIN /usr/local/bin/man
40#
41# Every automatically generated MANPATH includes these fields
42#
43MANPATH /usr/man
44MANPATH /usr/share/man
45MANPATH /usr/local/man
46MANPATH /usr/local/share/man
47MANPATH /usr/X11R6/man
48#
49# Uncomment if you want to include one of these by default
50#
51# MANPATH /opt/*/man
52# MANPATH /usr/lib/*/man
53# MANPATH /usr/share/*/man
54# MANPATH /usr/kerberos/man
55#
56# Set up PATH to MANPATH mapping
57#
58# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
59# and the docs are found in "/dir/man", then no mapping is required.
60#
61# The below mappings are superfluous when the right hand side is
62# in the mandatory manpath already, but will keep man from statting
63# lots of other nearby files and directories.
64#
65MANPATH_MAP /bin /usr/share/man
66MANPATH_MAP /sbin /usr/share/man
67MANPATH_MAP /usr/bin /usr/share/man
68MANPATH_MAP /usr/sbin /usr/share/man
69MANPATH_MAP /usr/local/bin /usr/local/share/man
70MANPATH_MAP /usr/local/sbin /usr/local/share/man
71MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
72MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
73MANPATH_MAP /usr/bin/mh /usr/share/man
74#
75# NOAUTOPATH keeps man from automatically adding directories that look like
76# manual page directories to the path.
77#
78#NOAUTOPATH
79#
80# NOCACHE keeps man from creating cache pages ("cat pages")
81# (generally one enables/disable cat page creation by creating/deleting
82# the directory they would live in - man never does mkdir)
83#
84#NOCACHE
85#
86# Useful paths - note that COL should not be defined when
87# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
88# not only is it superfluous, but it actually damages the output.
89# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
90# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
91#
92# If you have a new troff (version 1.18.1?) and its colored output
93# causes problems, add the -c option to TROFF, NROFF, JNROFF.
94#
95TROFF /usr/bin/groff -Tps -mandoc
96NROFF /usr/bin/nroff -Tlatin1 -mandoc
97JNROFF /usr/bin/groff -Tnippon -mandocj
98EQN /usr/bin/eqn -Tps
99NEQN /usr/bin/eqn -Tlatin1
100JNEQN /usr/bin/eqn -Tnippon
101TBL /usr/bin/tbl
102# COL /usr/bin/col
103REFER /usr/bin/refer
104PIC /usr/bin/pic
105VGRIND
106GRAP
107PAGER /usr/bin/less -isR
108CAT /bin/cat
109#
110# The command "man -a xyzzy" will show all man pages for xyzzy.
111# When CMP is defined man will try to avoid showing the same
112# text twice. (But compressed pages compare unequal.)
113#
114CMP /usr/bin/cmp -s
115#
116# Compress cat pages
117#
118COMPRESS /bin/bzip2
119COMPRESS_EXT .bz2
120#
121# Default manual sections (and order) to search if -S is not specified
122# and the MANSECT environment variable is not set.
123#
124MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
125#
126# Default options to use when man is invoked without options
127# This is mainly for the benefit of those that think -a should be the default
128# Note that some systems have /usr/man/allman, causing pages to be shown twice.
129#
130#MANDEFOPTIONS -a
131#
132# Decompress with given decompressor when input file has given extension
133# The command given must act as a filter.
134#
135.gz /bin/gunzip -c
136.bz2 /bin/bzip2 -c -d
137.z
138.Z /bin/zcat
139.F
140.Y
diff --git a/meta/recipes-extended/man/man/manpath.5.gz b/meta/recipes-extended/man/man/manpath.5.gz
new file mode 100644
index 0000000000..c012ff8976
--- /dev/null
+++ b/meta/recipes-extended/man/man/manpath.5.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
new file mode 100644
index 0000000000..a66e01cb9a
--- /dev/null
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -0,0 +1,66 @@
1SUMMARY = "Online documentation tools"
2DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
3SECTION = "console/utils"
4HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
7
8PR = "r1"
9
10DEPENDS = "groff less"
11
12SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
13 file://man-1.5k-confpath.patch;striplevel=0 \
14 file://man-1.5h1-make.patch \
15 file://man-1.5k-nonascii.patch \
16 file://man-1.6e-security.patch \
17 file://man-1.6e-mandirs.patch \
18 file://man-1.5m2-bug11621.patch \
19 file://man-1.5k-sofix.patch \
20 file://man-1.5m2-buildroot.patch \
21 file://man-1.6e-ro_usr.patch \
22 file://man-1.5i2-newline.patch;striplevel=0 \
23 file://man-1.5j-utf8.patch \
24 file://man-1.5i2-overflow.patch \
25 file://man-1.5j-nocache.patch \
26 file://man-1.5i2-initial.patch \
27 file://man-1.5h1-gencat.patch;striplevel=0 \
28 file://man-1.5g-nonrootbuild.patch \
29 file://man-1.5m2-tv_fhs.patch;striplevel=0 \
30 file://man-1.5j-i18n.patch \
31 file://man-1.6e-whatis2.patch \
32 file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
33 file://man-1.5m2-no-color-for-printing.patch \
34 file://man-1.5m2-sigpipe.patch \
35 file://man-1.6e-i18n_whatis.patch \
36 file://man-1.6e-new_sections.patch \
37 file://man.1.gz;unpack=false \
38 file://man.7.gz;unpack=false \
39 file://man.conf \
40 file://manpath.5.gz;unpack=false"
41
42SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
43SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
44
45do_configure () {
46 ${S}/configure -default -confdir /etc +sgid +fhs +lang all
47}
48
49
50fakeroot do_install() {
51 oe_runmake install DESTDIR=${D}
52}
53
54do_install_append(){
55 mkdir -p ${D}${sysconfdir}
56 mkdir -p ${D}${datadir}/man/man5
57 mkdir -p ${D}${datadir}/man/man7
58 cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config
59 cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
60 cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
61 cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
62}
63
64
65RDEPENDS_${PN} = "less groff"
66FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config"
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 0000000000..0e4434c7d9
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -0,0 +1,47 @@
1SUMMARY = "Midnight Commander is an ncurses based file manager"
2HOMEPAGE = "http://www.midnight-commander.org/"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
5SECTION = "console/utils"
6DEPENDS = "ncurses glib-2.0"
7RDEPENDS_${PN} = "ncurses-terminfo"
8
9PR = "r3"
10
11SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
12
13SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
14SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
15
16inherit autotools gettext pkgconfig
17
18EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
19
20FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
21
22do_install_append () {
23 sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
24 sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
25}
26
27PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
28
29SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
30FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
31 ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
32 ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
33 ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
34 ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
35 ${libexecdir}/mc/extfs.d/uzip"
36RDEPENDS_${BPN}-helpers-perl = "perl"
37
38SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
39FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
40RDEPENDS_${BPN}-helpers-python = "python"
41
42SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
43FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
44
45SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
46FILES_${BPN}-fish = "${libexecdir}/mc/fish"
47
diff --git a/meta/recipes-extended/mc/mc_4.8.10.bb b/meta/recipes-extended/mc/mc_4.8.10.bb
new file mode 100644
index 0000000000..511771a1d3
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.8.10.bb
@@ -0,0 +1,44 @@
1SUMMARY = "Midnight Commander is an ncurses based file manager"
2HOMEPAGE = "http://www.midnight-commander.org/"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
5SECTION = "console/utils"
6DEPENDS = "ncurses glib-2.0"
7RDEPENDS_${PN} = "ncurses-terminfo"
8
9SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2"
10
11SRC_URI[md5sum] = "eb4bdc23abd4fdfa14911d53d65c8186"
12SRC_URI[sha256sum] = "5f4166fe78fbf4b42f51ed526ca7f79fea8c77d04355c2b97d4df2a6bd2a1b1a"
13
14inherit autotools gettext pkgconfig
15
16EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
17
18FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
19
20do_install_append () {
21 sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
22 sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
23}
24
25PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
26
27SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
28FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
29 ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
30 ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
31 ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
32 ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
33 ${libexecdir}/mc/extfs.d/uzip"
34RDEPENDS_${BPN}-helpers-perl = "perl"
35
36SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
37FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
38RDEPENDS_${BPN}-helpers-python = "python"
39
40SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
41FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
42
43SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
44FILES_${BPN}-fish = "${libexecdir}/mc/fish"
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 0000000000..3b3db0a7f0
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -0,0 +1,23 @@
1Upstream-Status: pending
2
3By hardcoding CC's definition in the Makefile, all the gcc parameters
4set by tune settings are lost. Causing compile failure with x32 toolchain
5
6As the bitbake defined CC is good, there is no need to redfine CC in the
7make file, hence making the CC definition in the Makefile conditional.
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
10
11Index: mdadm-3.3/Makefile
12===================================================================
13--- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300
14+++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300
15@@ -41,7 +41,7 @@
16
17 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
18
19-CC = $(CROSS_COMPILE)gcc
20+CC ?= $(CROSS_COMPILE)gcc
21 CXFLAGS ?= -ggdb
22 CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
23 ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.bb b/meta/recipes-extended/mdadm/mdadm_3.3.bb
new file mode 100644
index 0000000000..5ef418e170
--- /dev/null
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.bb
@@ -0,0 +1,44 @@
1SUMMARY = "Tool for managing software RAID under Linux"
2HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
3
4# Some files are GPLv2+ while others are GPLv2.
5LICENSE = "GPLv2 & GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
8 file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
9
10
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
12 file://mdadm-3.2.2_fix_for_x32.patch \
13 "
14
15SRC_URI[md5sum] = "8ac04259cdd74b4566c3b6dea9414b57"
16SRC_URI[sha256sum] = "9c07e518bdf3392ebac8874eb686258e10ea3ae0ff7a8acb6d014718a9c3ed45"
17
18CFLAGS += "-fno-strict-aliasing"
19
20inherit autotools-brokensep
21
22# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
23do_configure_prepend () {
24 sed -i -e '/.*ansidecl.h.*/d' ${S}/sha1.h
25}
26
27EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
28# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
29# prevents 64-bit userland from seeing this definition, instead defaulting
30# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
31# int-ll64.h included
32EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
33EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
34
35do_compile() {
36 oe_runmake
37}
38
39do_install() {
40 export STRIP=""
41 autotools_do_install
42}
43
44FILES_${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 0000000000..f1936afd23
--- /dev/null
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Compact getty terminal handler for virtual consoles only"
2SECTION = "console/utils"
3HOMEPAGE = "http://sourceforge.net/projects/mingetty/"
4LICENSE = "GPLv2"
5PR = "r3"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
8SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz"
9
10SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990"
11SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17"
12
13# substitute our CFLAGS for "-O2 -Wall -W -pipe"
14#
15EXTRA_OEMAKE = "CC='${CC}' \
16 CFLAGS='${CFLAGS} -D_GNU_SOURCE'"
17
18do_install(){
19 install -d ${D}${mandir}/man8 ${D}/${base_sbindir}
20 oe_runmake install DESTDIR=${D}
21}
22
23inherit update-alternatives
24
25ALTERNATIVE_${PN} = "getty"
26ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
27ALTERNATIVE_TARGET[getty] = "${base_sbindir}/mingetty"
28ALTERNATIVE_PRIORITY = "10"
diff --git a/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch
new file mode 100644
index 0000000000..bd8261c979
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch
@@ -0,0 +1,35 @@
1Subject: [PATCH] fix minicom -h/-v return value is not 0
2
3Upstream-Status: Pending
4
5Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
6
7---
8 src/minicom.c | 6 ++----
9 1 file changed, 2 insertions(+), 4 deletions(-)
10
11diff --git a/src/minicom.c b/src/minicom.c
12index e1a557b..730da7c 100644
13--- a/src/minicom.c
14+++ b/src/minicom.c
15@@ -1166,15 +1166,13 @@ int main(int argc, char **argv)
16 "modify it under the terms of the GNU General Public License\n"
17 "as published by the Free Software Foundation; either version\n"
18 "2 of the License, or (at your option) any later version.\n\n");
19- exit(1);
20- break;
21+ exit(0);
22 case 's': /* setup mode */
23 dosetup = 1;
24 break;
25 case 'h':
26 helpthem();
27- exit(1);
28- break;
29+ exit(0);
30 case 'p': /* Pseudo terminal to use. */
31 if (strncmp(optarg, "/dev/", 5) == 0)
32 optarg += 5;
33--
341.7.9.5
35
diff --git a/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch
new file mode 100644
index 0000000000..f5c08896ff
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Pending
2
3Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4
5--- a/configure.in 2013-02-06 18:18:13.000000000 +0100
6+++ b/configure.in 2013-07-21 15:31:27.614828894 +0200
7@@ -40,7 +40,13 @@
8 fi
9
10 PKG_PROG_PKG_CONFIG
11-if test -n "$PKG_CONFIG"; then
12+
13+AC_ARG_ENABLE([lockdev],
14+ AS_HELP_STRING([--enable-lockdev],
15+ [Enable lockdev support (def: enabled)]),
16+ [], [enable_lockdev="yes"])
17+
18+if test -n "$PKG_CONFIG" && test "x$enable_lockdev" = xyes; then
19 PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev]),[:])
20 fi
21
diff --git a/meta/recipes-extended/minicom/minicom_2.7.bb b/meta/recipes-extended/minicom/minicom_2.7.bb
new file mode 100644
index 0000000000..8b20ece80a
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom_2.7.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Text-based modem control and terminal emulation program"
2DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems"
3SECTION = "console/network"
4DEPENDS = "ncurses virtual/libiconv"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
7 file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
8
9SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \
10 file://allow.to.disable.lockdev.patch \
11 file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
12 "
13
14SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d"
15SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4"
16
17PACKAGECONFIG ??= ""
18PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
19
20inherit autotools gettext
21
22do_install() {
23 for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
24}
25
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 0000000000..e06869e3ad
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/disable-strip.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [configuration]
2
3diff --git a/Makefile.in b/Makefile.in
4index 37b3cc9..f1026f3 100644
5--- a/Makefile.in
6+++ b/Makefile.in
7@@ -95,7 +95,7 @@ install-dirs:
8 $(DESTDIR)$(mandir)/man1
9
10 install-binaries: $(PROG)
11- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG)
12+ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
13
14 install-man:
15 $(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 0000000000..f3b6dcc34a
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
@@ -0,0 +1,24 @@
1This fixes the parallel make install failure
2
3Upstream-Status: Accepted
4http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7
8Index: mktemp-1.7/Makefile.in
9===================================================================
10--- mktemp-1.7.orig/Makefile.in
11+++ mktemp-1.7/Makefile.in
12@@ -94,10 +94,10 @@ install-dirs:
13 $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \
14 $(DESTDIR)$(mandir)/man1
15
16-install-binaries: $(PROG)
17+install-binaries: install-dirs $(PROG)
18 $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
19
20-install-man:
21+install-man: install-dirs
22 $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
23 $(DESTDIR)$(mandir)/man1/mktemp.1
24
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 0000000000..b53fc11b1e
--- /dev/null
+++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Enables safe temporary file creation from shell scripts"
2HOMEPAGE = "http://www.mktemp.org/"
3BUGTRACKER = "http://www.mktemp.org/bugs"
4SECTION = "console/utils"
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4"
7
8PR = "r3"
9
10SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \
11 file://disable-strip.patch \
12 file://fix-parallel-make.patch \
13 "
14
15SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172"
16SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675"
17
18inherit autotools update-alternatives
19
20EXTRA_OECONF = "--with-libc"
21
22do_install_append () {
23 install -d ${D}${base_bindir}
24 mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
25 rmdir ${D}${bindir}
26}
27
28ALTERNATIVE_${PN} = "mktemp"
29ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
30ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.31.bb b/meta/recipes-extended/msmtp/msmtp_1.4.31.bb
new file mode 100644
index 0000000000..57942ed93c
--- /dev/null
+++ b/meta/recipes-extended/msmtp/msmtp_1.4.31.bb
@@ -0,0 +1,25 @@
1SUMMARY = "msmtp is an SMTP client"
2DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
3HOMEPAGE = "http://msmtp.sourceforge.net/"
4SECTION = "console/network"
5
6LICENSE = "GPLv3"
7DEPENDS = "zlib gnutls"
8
9#COPYING or Licence
10LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
11
12SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \
13 "
14
15SRC_URI[md5sum] = "792ac0ffa30dc95ea1889a548128186d"
16SRC_URI[sha256sum] = "247af9a95fa22f506e85109fc4268a5d91ca03af9b17eebcc1e46b7cd64c225f"
17
18inherit gettext autotools update-alternatives
19
20EXTRA_OECONF += "--without-gnome-keyring --without-libidn"
21
22ALTERNATIVE_${PN} = "sendmail"
23ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
24ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
25ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.h b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h
new file mode 100644
index 0000000000..6d39c2a8cb
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h
@@ -0,0 +1,75 @@
1/*
2* config.h Automatically generated configuration includefile
3*
4* NET-TOOLS A collection of programs that form the base set of the
5* NET-3 Networking Distribution for the LINUX operating
6* system.
7*
8* DO NOT EDIT DIRECTLY
9*
10*/
11
12/*
13 *
14 * Internationalization
15 *
16 * The net-tools package has currently been translated to French,
17 * German and Brazilian Portugese. Other translations are, of
18 * course, welcome. Answer `n' here if you have no support for
19 * internationalization on your system.
20 *
21 */
22#define I18N 1
23
24/*
25 *
26 * Protocol Families.
27 *
28 */
29#define HAVE_AFUNIX 1
30#define HAVE_AFINET 1
31#define HAVE_AFINET6 1
32#define HAVE_AFIPX 0
33#define HAVE_AFATALK 0
34#define HAVE_AFAX25 0
35#define HAVE_AFNETROM 1
36#define HAVE_AFROSE 0
37#define HAVE_AFX25 0
38#define HAVE_AFECONET 0
39#define HAVE_AFDECnet 0
40#define HAVE_AFASH 0
41
42/*
43 *
44 * Device Hardware types.
45 *
46 */
47#define HAVE_HWETHER 1
48#define HAVE_HWARC 1
49#define HAVE_HWSLIP 1
50#define HAVE_HWPPP 1
51#define HAVE_HWTUNNEL 1
52#define HAVE_HWSTRIP 0
53#define HAVE_HWTR 0
54#define HAVE_HWAX25 0
55#define HAVE_HWROSE 0
56#define HAVE_HWNETROM 1
57#define HAVE_HWX25 0
58#define HAVE_HWFR 1
59#define HAVE_HWSIT 0
60#define HAVE_HWFDDI 0
61#define HAVE_HWHIPPI 0
62#define HAVE_HWASH 0
63#define HAVE_HWHDLCLAPB 0
64#define HAVE_HWIRDA 1
65#define HAVE_HWEC 0
66#define HAVE_HWIB 0
67
68/*
69 *
70 * Other Features.
71 *
72 */
73#define HAVE_FW_MASQUERADE 1
74#define HAVE_IP_TOOLS 1
75#define HAVE_MII 1
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.make b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make
new file mode 100644
index 0000000000..ec516f27ee
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make
@@ -0,0 +1,36 @@
1I18N=1
2HAVE_AFUNIX=1
3HAVE_AFINET=1
4HAVE_AFINET6=1
5# HAVE_AFIPX=0
6# HAVE_AFATALK=0
7# HAVE_AFAX25=0
8HAVE_AFNETROM=1
9# HAVE_AFROSE=0
10# HAVE_AFX25=0
11# HAVE_AFECONET=0
12# HAVE_AFDECnet=0
13# HAVE_AFASH=0
14HAVE_HWETHER=1
15HAVE_HWARC=1
16HAVE_HWSLIP=1
17HAVE_HWPPP=1
18HAVE_HWTUNNEL=1
19HAVE_HWSTRIP=1
20HAVE_HWTR=1
21# HAVE_HWAX25=0
22# HAVE_HWROSE=0
23HAVE_HWNETROM=1
24# HAVE_HWX25=0
25HAVE_HWFR=1
26# HAVE_HWSIT=0
27# HAVE_HWFDDI=0
28# HAVE_HWHIPPI=0
29# HAVE_HWASH=0
30# HAVE_HWHDLCLAPB=0
31HAVE_HWIRDA=1
32# HAVE_HWEC=0
33# HAVE_HWIB=0
34HAVE_FW_MASQUERADE=1
35HAVE_IP_TOOLS=1
36HAVE_MII=1
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
new file mode 100644
index 0000000000..5a7b3070c8
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
@@ -0,0 +1,86 @@
1SUMMARY = "Basic networking tools"
2DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
3HOMEPAGE = "http://net-tools.berlios.de/"
4BUGTRACKER = "http://bugs.debian.org/net-tools"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
7 file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
10 ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
11 file://net-tools-config.h \
12 file://net-tools-config.make"
13
14S = "${WORKDIR}/net-tools-1.60"
15
16SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
17SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
18
19SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51"
20SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f"
21
22inherit gettext
23
24# The Makefile is lame, no parallel build
25PARALLEL_MAKE = ""
26
27# Unlike other Debian packages, net-tools *.diff.gz contains another series of
28# patches maintained by quilt. So manually apply them before applying other local
29# patches. Also remove all temp files before leaving, because do_patch() will pop
30# up all previously applied patches in the start
31nettools_do_patch() {
32 cd ${S}
33 quilt pop -a || true
34 if [ -d ${S}/.pc-nettools ]; then
35 mv ${S}/.pc-nettools ${S}/.pc
36 QUILT_PATCHES=${S}/debian/patches quilt pop -a
37 rm -rf ${S}/.pc ${S}/debian
38 fi
39 patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff
40 QUILT_PATCHES=${S}/debian/patches quilt push -a
41 mv ${S}/.pc ${S}/.pc-nettools
42}
43
44do_unpack[cleandirs] += "${S}"
45
46# We invoke base do_patch at end, to incorporate any local patch
47python do_patch() {
48 bb.build.exec_func('nettools_do_patch', d)
49 bb.build.exec_func('patch_do_patch', d)
50}
51
52do_configure() {
53 # net-tools has its own config mechanism requiring "make config"
54 # we pre-generate desired options and copy to source directory instead
55 cp ${WORKDIR}/net-tools-config.h ${S}/config.h
56 cp ${WORKDIR}/net-tools-config.make ${S}/config.make
57}
58
59do_compile() {
60 # net-tools use COPTS/LOPTS to allow adding custom options
61 export COPTS="$CFLAGS"
62 export LOPTS="$LDFLAGS"
63 unset CFLAGS
64 unset LDFLAGS
65
66 oe_runmake
67}
68
69do_install() {
70 oe_runmake 'BASEDIR=${D}' install
71}
72
73inherit update-alternatives
74
75base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach"
76base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
77
78ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
79python __anonymous() {
80 for prog in d.getVar('base_sbindir_progs', True).split():
81 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
82 for prog in d.getVar('base_bindir_progs', True).split():
83 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
84}
85ALTERNATIVE_PRIORITY = "100"
86
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch
new file mode 100644
index 0000000000..f67239abda
--- /dev/null
+++ b/meta/recipes-extended/newt/files/cross_ar.patch
@@ -0,0 +1,51 @@
1Fix cross link using autoconf detected AR
2
3If building on 32bit host and creating 64bit libraries, the target
4package builds should not invoke the 32bit hosts's ar. Specifically
5you will get an error message like:
6
7x86_64-linux-gcc -m64 --sysroot=/opt/qemux86-64/tmp/sysroots/qemux86-64 -g -o test test.o libnewt.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lslang
8libnewt.a: could not read symbols: Archive has no index; run ranlib to add one
9collect2: error: ld returned 1 exit status
10
11Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
12
13Upstream-Status: Pending
14
15---
16 Makefile.in | 3 ++-
17 configure.ac | 4 ++++
18 2 files changed, 6 insertions(+), 1 deletion(-)
19
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
23 LDFLAGS = @LDFLAGS@
24 CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
25 GNU_LD = @GNU_LD@
26+AR = @AR@
27
28 VERSION = @VERSION@
29 TAG = r$(subst .,-,$(VERSION))
30@@ -95,7 +96,7 @@ whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
31 $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS)
32
33 $(LIBNEWT): $(LIBOBJS)
34- ar rv $@ $^
35+ $(AR) rv $@ $^
36
37 newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
38
39--- a/configure.ac
40+++ b/configure.ac
41@@ -14,6 +14,10 @@ AC_PROG_CC
42 AC_PROG_INSTALL
43 AC_PROG_LN_S
44 AC_PROG_GREP
45+AN_MAKEVAR([AR], [AC_PROG_AR])
46+AN_PROGRAM([ar], [AC_PROG_AR])
47+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
48+AC_PROG_AR
49
50 # Are we using GNU ld?
51 AC_MSG_CHECKING([for GNU ld])
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 0000000000..7795260388
--- /dev/null
+++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
@@ -0,0 +1,29 @@
1Upstream-Status: Pending
2
3Author: dexuan.cui@intel.com
4Date: Fri Apr 15 16:17:39 CST 2011
5
6The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should
7ensure the directory ${SHAREDDIR} exists.
8
9We need to push the patch to upstream.
10
11Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
12
13--- a/Makefile.in
14+++ b/Makefile.in
15@@ -114,12 +114,12 @@
16
17 sharedlib: $(LIBNEWTSH)
18
19-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
20+$(LIBNEWTSH): $(SHAREDOBJS)
21 $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
22 ln -fs $(LIBNEWTSONAME) libnewt.so
23 ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
24
25-$(SHAREDDIR)/%.o : %.c
26+$(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
27 $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
28
29 install: $(LIBNEWT) install-sh whiptail
diff --git a/meta/recipes-extended/newt/files/fix_python_fpic.patch b/meta/recipes-extended/newt/files/fix_python_fpic.patch
new file mode 100644
index 0000000000..3ef94e0c56
--- /dev/null
+++ b/meta/recipes-extended/newt/files/fix_python_fpic.patch
@@ -0,0 +1,24 @@
1Fix relocations warning when compile python module
2
3After enable python support in newt, bitbake complains warning:
4
5WARNING: QA Issue: ELF binary '/mnt/sda10/poky-all-platform/build/tmp/work/i586-poky-linux/libnewt/0.52.14-r2/packages-split/libnewt-python/usr/lib/python2.7/site-packages/_snackmodule.so' has relocations in .text
6
7Add flag -fPIC to compile _snackmodule.so to fix the warning.
8
9Signed-off-by: Kang Kai <kai.kang@windriver.com>
10
11Upstream-Status: Pending
12
13---
14--- newt-0.52.14/Makefile.in 2012-12-04 17:27:27.578915801 +0800
15+++ newt-0.52.14/Makefile.in.new 2012-12-04 17:28:43.274918472 +0800
16@@ -84,7 +84,7 @@
17 PIFLAGS=`$$ver-config --includes`; \
18 PLDFLAGS=`$$ver-config --ldflags`; \
19 PLFLAGS=`$$ver-config --libs`; \
20- $(CC) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
21+ $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snackmodule.o snackmodule.c ;\
22 $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L. -lnewt $(LIBS);\
23 done || :
24 touch $@
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 0000000000..a2634ec75b
--- /dev/null
+++ b/meta/recipes-extended/newt/files/remove_slang_include.patch
@@ -0,0 +1,16 @@
1
2Upstream-Status: Pending
3
4Index: git/Makefile.in
5===================================================================
6--- git.orig/Makefile.in
7+++ git/Makefile.in
8@@ -5,7 +5,7 @@ CC = @CC@
9 CPP = @CPP@
10 CFLAGS = @CFLAGS@
11 LDFLAGS = @LDFLAGS@
12-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
13+CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
14 GNU_LD = @GNU_LD@
15
16 VERSION = @VERSION@
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.14.bb b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb
new file mode 100644
index 0000000000..871b1958eb
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt-python_0.52.14.bb
@@ -0,0 +1,27 @@
1require recipes-extended/newt/libnewt_${PV}.bb
2
3SUMMARY .= " - python"
4DEPENDS = "libnewt python"
5RDEPENDS_${PN} += "python-core"
6
7inherit pythonnative python-dir
8
9EXTRA_OECONF += "--with-python"
10EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
11
12
13do_compile () {
14 VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
15 oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snackmodule.so
16}
17
18do_install () {
19 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
20 install -m 0755 ${PYTHON_DIR}/_snackmodule.so ${D}${PYTHON_SITEPACKAGES_DIR}/
21 install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
22}
23
24PACKAGES_remove = "whiptail"
25
26FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
27FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
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 0000000000..65bcf40428
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt_0.52.14.bb
@@ -0,0 +1,49 @@
1SUMMARY = "A library for text mode user interfaces"
2
3DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
4interfaces. Newt can be used to add stacked windows, entry widgets, \
5checkboxes, radio buttons, labels, plain text fields, scrollbars, \
6etc., to text mode user interfaces. This package also contains the \
7shared library needed by programs built with newt, as well as a \
8/usr/bin/dialog replacement called whiptail. Newt is based on the \
9slang library."
10
11HOMEPAGE = "https://fedorahosted.org/newt/"
12SECTION = "libs"
13
14LICENSE = "LGPLv2"
15LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
16
17# slang needs to be >= 2.2
18DEPENDS = "slang popt"
19
20PR = "r2"
21
22SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
23 file://remove_slang_include.patch \
24 file://fix_SHAREDDIR.patch \
25 file://cross_ar.patch \
26 file://fix_python_fpic.patch"
27
28SRC_URI[md5sum] = "eb78c6bb658b92ec7198908b5b8d0e37"
29SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b40978e"
30
31S = "${WORKDIR}/newt-${PV}"
32
33EXTRA_OECONF = "--without-tcl --without-python"
34
35inherit autotools-brokensep
36
37export STAGING_INCDIR
38export STAGING_LIBDIR
39
40export BUILD_SYS
41export HOST_SYS
42
43PACKAGES_prepend = "whiptail "
44
45do_configure_prepend() {
46 sh autogen.sh
47}
48
49FILES_whiptail = "${bindir}/whiptail"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
new file mode 100644
index 0000000000..b87213cb99
--- /dev/null
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -0,0 +1,163 @@
1#
2# Copyright (C) 2010 Intel Corporation
3#
4
5SUMMARY = "Standard full-featured Linux system"
6DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system"
7PR = "r6"
8LICENSE = "MIT"
9
10inherit packagegroup
11
12PACKAGES = "\
13 packagegroup-core-full-cmdline \
14 packagegroup-core-full-cmdline-libs \
15 packagegroup-core-full-cmdline-utils \
16 packagegroup-core-full-cmdline-extended \
17 packagegroup-core-full-cmdline-dev-utils \
18 packagegroup-core-full-cmdline-multiuser \
19 packagegroup-core-full-cmdline-initscripts \
20 packagegroup-core-full-cmdline-sys-services \
21 "
22
23python __anonymous () {
24 # For backwards compatibility after rename
25 namemap = {}
26 namemap["packagegroup-core-full-cmdline"] = "packagegroup-core-basic"
27 namemap["packagegroup-core-full-cmdline-libs"] = "packagegroup-core-basic-libs"
28 namemap["packagegroup-core-full-cmdline-utils"] = "packagegroup-core-basic-utils"
29 namemap["packagegroup-core-full-cmdline-extended"] = "packagegroup-core-basic-extended"
30 namemap["packagegroup-core-full-cmdline-dev-utils"] = "packagegroup-core-dev-utils"
31 namemap["packagegroup-core-full-cmdline-multiuser"] = "packagegroup-core-multiuser"
32 namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts"
33 namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services"
34
35 packages = d.getVar("PACKAGES", True).split()
36 for pkg in packages:
37 if pkg.endswith('-dev'):
38 mapped = namemap.get(pkg[:-4], None)
39 if mapped:
40 mapped += '-dev'
41 elif pkg.endswith('-dbg'):
42 mapped = namemap.get(pkg[:-4], None)
43 if mapped:
44 mapped += '-dbg'
45 else:
46 mapped = namemap.get(pkg, None)
47
48 if mapped:
49 oldtaskname = mapped.replace("packagegroup-core", "task-core")
50 mapstr = " %s %s" % (mapped, oldtaskname)
51 d.appendVar("RPROVIDES_%s" % pkg, mapstr)
52 d.appendVar("RREPLACES_%s" % pkg, mapstr)
53 d.appendVar("RCONFLICTS_%s" % pkg, mapstr)
54}
55
56
57RDEPENDS_packagegroup-core-full-cmdline = "\
58 packagegroup-core-full-cmdline-libs \
59 packagegroup-core-full-cmdline-utils \
60 packagegroup-core-full-cmdline-extended \
61 packagegroup-core-full-cmdline-dev-utils \
62 packagegroup-core-full-cmdline-multiuser \
63 packagegroup-core-full-cmdline-initscripts \
64 packagegroup-core-full-cmdline-sys-services \
65 "
66
67RDEPENDS_packagegroup-core-full-cmdline-libs = "\
68 glib-2.0 \
69 "
70
71RDEPENDS_packagegroup-core-full-cmdline-utils = "\
72 bash \
73 acl \
74 attr \
75 bc \
76 coreutils \
77 cpio \
78 e2fsprogs \
79 ed \
80 file \
81 findutils \
82 gawk \
83 gmp \
84 grep \
85 makedevs \
86 mc \
87 mc-fish \
88 mc-helpers \
89 mc-helpers-perl \
90 mc-helpers-python \
91 mktemp \
92 ncurses \
93 net-tools \
94 pax \
95 popt \
96 procps \
97 psmisc \
98 sed \
99 tar \
100 time \
101 util-linux \
102 zlib \
103 "
104
105RDEPENDS_packagegroup-core-full-cmdline-extended = "\
106 iproute2 \
107 iputils \
108 iptables \
109 module-init-tools \
110 openssl \
111 "
112
113RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\
114 byacc \
115 diffutils \
116 m4 \
117 make \
118 patch \
119 "
120
121VIRTUAL-RUNTIME_initscripts ?= "initscripts"
122VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
123VIRTUAL-RUNTIME_login_manager ?= "busybox"
124VIRTUAL-RUNTIME_syslog ?= "sysklogd"
125RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\
126 ${VIRTUAL-RUNTIME_initscripts} \
127 ${VIRTUAL-RUNTIME_init_manager} \
128 ethtool \
129 ${VIRTUAL-RUNTIME_login_manager} \
130 ${VIRTUAL-RUNTIME_syslog} \
131 "
132
133RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\
134 cracklib \
135 gzip \
136 ${@base_contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \
137 shadow \
138 sudo \
139 "
140
141RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\
142 at \
143 bzip2 \
144 cronie \
145 dbus \
146 dbus-glib \
147 python-dbus \
148 elfutils \
149 gzip \
150 less \
151 libcap \
152 libevent \
153 lighttpd \
154 logrotate \
155 nfs-utils \
156 pciutils \
157 libpcre \
158 rpcbind \
159 sysfsutils \
160 tcp-wrappers \
161 tzdata \
162 "
163
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
new file mode 100644
index 0000000000..914a7a9b7e
--- /dev/null
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -0,0 +1,266 @@
1#
2# Copyright (C) 2010 Intel Corporation
3#
4
5SUMMARY = "Linux Standard Base (LSB)"
6DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification"
7PR = "r10"
8LICENSE = "MIT"
9
10inherit packagegroup
11
12PACKAGES = "\
13 packagegroup-core-lsb \
14 packagegroup-core-sys-extended \
15 packagegroup-core-db \
16 packagegroup-core-perl \
17 packagegroup-core-python \
18 packagegroup-core-tcl \
19 packagegroup-core-lsb-misc \
20 packagegroup-core-lsb-core \
21 packagegroup-core-lsb-perl \
22 packagegroup-core-lsb-python \
23 packagegroup-core-lsb-desktop \
24 packagegroup-core-lsb-runtime-add \
25 "
26
27
28RPROVIDES_packagegroup-core-lsb = "task-core-lsb"
29RDEPENDS_packagegroup-core-lsb = "\
30 packagegroup-core-sys-extended \
31 packagegroup-core-db \
32 packagegroup-core-perl \
33 packagegroup-core-python \
34 packagegroup-core-tcl \
35 packagegroup-core-lsb-misc \
36 packagegroup-core-lsb-core \
37 packagegroup-core-lsb-perl \
38 packagegroup-core-lsb-python \
39 packagegroup-core-lsb-desktop \
40 packagegroup-core-lsb-runtime-add \
41 "
42
43
44RDEPENDS_packagegroup-core-sys-extended = "\
45 curl \
46 dhcp-client \
47 gamin \
48 hdparm \
49 libaio \
50 lrzsz \
51 lzo \
52 mc \
53 mc-fish \
54 mc-helpers \
55 mc-helpers-perl \
56 mc-helpers-python \
57 mdadm \
58 minicom \
59 neon \
60 parted \
61 ${PTH} \
62 quota \
63 screen \
64 setserial \
65 sysstat \
66 udev-extraconf \
67 unzip \
68 watchdog \
69 wget \
70 which \
71 xinetd \
72 zip \
73 "
74
75RDEPENDS_packagegroup-core-db = "\
76 db \
77 sqlite3 \
78 "
79
80RDEPENDS_packagegroup-core-perl = "\
81 gdbm \
82 perl \
83 zlib \
84 "
85
86
87RDEPENDS_packagegroup-core-python = "\
88 expat \
89 gdbm \
90 gmp \
91 ncurses \
92 openssl \
93 python \
94 readline \
95 zip \
96 "
97
98RDEPENDS_packagegroup-core-tcl = "\
99 tcl \
100 "
101
102# Miscellaneous packages required by LSB (or LSB tests)
103RDEPENDS_packagegroup-core-lsb-misc = "\
104 chkconfig \
105 gettext \
106 gettext-runtime \
107 groff \
108 lsbinitscripts \
109 lsbtest \
110 lsof \
111 strace \
112 libusb1 \
113 usbutils \
114 rpm \
115 "
116
117SUMMARY_packagegroup-core-lsb-core = "LSB Core"
118DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \
119 specified in the LSB Core specification"
120RDEPENDS_packagegroup-core-lsb-core = "\
121 at \
122 bash \
123 bc \
124 binutils \
125 binutils-symlinks \
126 coreutils \
127 cpio \
128 cronie \
129 cups \
130 diffutils \
131 ed \
132 eglibc-utils \
133 elfutils \
134 file \
135 findutils \
136 fontconfig-utils \
137 foomatic-filters \
138 gawk \
139 ghostscript \
140 grep \
141 gzip \
142 localedef \
143 lsb \
144 m4 \
145 mailx \
146 make \
147 man \
148 man-pages \
149 mktemp \
150 msmtp \
151 patch \
152 pax \
153 procps \
154 psmisc \
155 sed \
156 shadow \
157 tar \
158 time \
159 util-linux \
160 xdg-utils \
161 \
162 eglibc \
163 libgcc \
164 libpam \
165 libxml2 \
166 ncurses \
167 zlib \
168 nspr \
169 libpng12 \
170 nss \
171"
172
173SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)"
174DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \
175 specified in the LSB Runtime languages specification (Perl parts)"
176RDEPENDS_packagegroup-core-lsb-perl = "\
177 perl \
178 perl-modules \
179 perl-misc \
180 perl-pod \
181 perl-dev \
182 perl-doc \
183"
184
185SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)"
186DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \
187 specified in the LSB Runtime languages specification (Python parts)"
188RDEPENDS_packagegroup-core-lsb-python = "\
189 python \
190 python-modules \
191 python-misc \
192"
193
194def get_libqt3(d):
195 if 'linuxstdbase' in d.getVar('DISTROOVERRIDES') or "":
196 if 'qt3' in d.getVar('BBFILE_COLLECTIONS') or "":
197 return 'libqt-mt3'
198
199 bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x')
200 bb.warn('libraries. Its intended use is for passing LSB tests as Qt3 is')
201 bb.warn('a requirement for LSB')
202 return ''
203
204QT4PKGS = " \
205 libqtcore4 \
206 libqtgui4 \
207 libqtsql4 \
208 libqtsvg4 \
209 libqtxml4 \
210 libqtnetwork4 \
211 qt4-plugin-sqldriver-sqlite \
212 ${@base_contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
213 "
214QT4PKGS_mips64 = ""
215
216SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
217DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
218 specified in the LSB Desktop specification"
219RDEPENDS_packagegroup-core-lsb-desktop = "\
220 libxt \
221 libxxf86vm \
222 libdrm \
223 libglu \
224 libxi \
225 libxtst \
226 libx11-locale \
227 xorg-minimal-fonts \
228 gdk-pixbuf-loader-ico \
229 gdk-pixbuf-loader-bmp \
230 gdk-pixbuf-loader-ani \
231 gdk-pixbuf-xlib \
232 liberation-fonts \
233 gtk+ \
234 atk \
235 libasound \
236 ${QT4PKGS} \
237 ${@get_libqt3(d)} \
238"
239
240RDEPENDS_packagegroup-core-lsb-runtime-add = "\
241 ldd \
242 pam-plugin-wheel \
243 e2fsprogs-mke2fs \
244 mkfontdir \
245 liburi-perl \
246 libxml-parser-perl \
247 libxml-perl \
248 libxml-sax-perl \
249 eglibc-localedatas \
250 eglibc-gconvs \
251 eglibc-charmaps \
252 eglibc-binaries \
253 eglibc-localedata-posix \
254 eglibc-extra-nss \
255 eglibc-pcprofile \
256 libclass-isa-perl \
257 libenv-perl \
258 libdumpvalue-perl \
259 libfile-checktree-perl \
260 libi18n-collate-perl \
261 libpod-plainer-perl \
262"
263
264PTH = "pth"
265PTH_libc-uclibc = ""
266
diff --git a/meta/recipes-extended/pam/libpam/99_pam b/meta/recipes-extended/pam/libpam/99_pam
new file mode 100644
index 0000000000..97e990d10b
--- /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/add-checks-for-crypt-returning-NULL.patch b/meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch
new file mode 100644
index 0000000000..d364cea97e
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch
@@ -0,0 +1,63 @@
1Backport from linux-pam git repo.
2
3[YOCTO #4107]
4
5Upstream-Status: Backport
6
7Signed-off-by: Kang Kai <kai.kang@windriver.com>
8
9From 8dc056c1c8bc7acb66c4decc49add2c3a24e6310 Mon Sep 17 00:00:00 2001
10From: Tomas Mraz <tmraz@fedoraproject.org>
11Date: Fri, 8 Feb 2013 15:04:26 +0100
12Subject: [PATCH] Add checks for crypt() returning NULL.
13
14modules/pam_pwhistory/opasswd.c (compare_password): Add check for crypt() NULL return.
15modules/pam_unix/bigcrypt.c (bigcrypt): Likewise.
16---
17 modules/pam_pwhistory/opasswd.c | 2 +-
18 modules/pam_unix/bigcrypt.c | 9 +++++++++
19 2 files changed, 10 insertions(+), 1 deletions(-)
20
21diff --git a/modules/pam_pwhistory/opasswd.c b/modules/pam_pwhistory/opasswd.c
22index 274fdb9..836d713 100644
23--- a/modules/pam_pwhistory/opasswd.c
24+++ b/modules/pam_pwhistory/opasswd.c
25@@ -108,7 +108,7 @@ compare_password(const char *newpass, const char *oldpass)
26 outval = crypt (newpass, oldpass);
27 #endif
28
29- return strcmp(outval, oldpass) == 0;
30+ return outval != NULL && strcmp(outval, oldpass) == 0;
31 }
32
33 /* Check, if the new password is already in the opasswd file. */
34diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c
35index e10d1c5..e1d57a0 100644
36--- a/modules/pam_unix/bigcrypt.c
37+++ b/modules/pam_unix/bigcrypt.c
38@@ -109,6 +109,10 @@ char *bigcrypt(const char *key, const char *salt)
39 #else
40 tmp_ptr = crypt(plaintext_ptr, salt); /* libc crypt() */
41 #endif
42+ if (tmp_ptr == NULL) {
43+ free(dec_c2_cryptbuf);
44+ return NULL;
45+ }
46 /* and place in the static area */
47 strncpy(cipher_ptr, tmp_ptr, 13);
48 cipher_ptr += ESEGMENT_SIZE + SALT_SIZE;
49@@ -130,6 +134,11 @@ char *bigcrypt(const char *key, const char *salt)
50 #else
51 tmp_ptr = crypt(plaintext_ptr, salt_ptr);
52 #endif
53+ if (tmp_ptr == NULL) {
54+ _pam_overwrite(dec_c2_cryptbuf);
55+ free(dec_c2_cryptbuf);
56+ return NULL;
57+ }
58
59 /* skip the salt for seg!=0 */
60 strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE);
61--
621.7.5.4
63
diff --git a/meta/recipes-extended/pam/libpam/destdirfix.patch b/meta/recipes-extended/pam/libpam/destdirfix.patch
new file mode 100644
index 0000000000..52145ecb34
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/destdirfix.patch
@@ -0,0 +1,24 @@
1Avoid the failure:
2
3| mkdir -p /etc/security/namespace.d
4| mkdir: cannot create directory `/etc/security/namespace.d': Permission denied
5
6if /etc/security/namespace.d doesn't exist. The DESTDIR prefix is missing.
7
8RP 2012/8/19
9
10Upstream-Status: Pending
11
12Index: Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am
13===================================================================
14--- Linux-PAM-1.1.6.orig/modules/pam_namespace/Makefile.am 2012-08-15 11:08:43.000000000 +0000
15+++ Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am 2012-08-19 12:25:32.311038943 +0000
16@@ -40,7 +40,7 @@
17 secureconf_SCRIPTS = namespace.init
18
19 install-data-local:
20- mkdir -p $(namespaceddir)
21+ mkdir -p $(DESTDIR)$(namespaceddir)
22 endif
23
24
diff --git a/meta/recipes-extended/pam/libpam/fixsepbuild.patch b/meta/recipes-extended/pam/libpam/fixsepbuild.patch
new file mode 100644
index 0000000000..8a9c3b2fa1
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/fixsepbuild.patch
@@ -0,0 +1,24 @@
1Fix the build error when a separate build directory is used:
2
3Making install in xtestsmake[1]: Entering directory `/media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/build/xtests'/usr/bin/install -c -d /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtestsfor file in run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd tst-pam_dispatch5.pamd tst-pam_cracklib1.pamd tst-pam_cracklib2.pamd tst-pam_unix1.pamd tst-pam_unix2.pamd tst-pam_unix3.pamd tst-pam_unix4.pamd tst-pam_unix1.sh tst-pam_unix2.sh tst-pam_unix3.sh tst-pam_unix4.sh access.conf tst-pam_access1.pamd tst-pam_access1.sh tst-pam_access2.pamd tst-pam_access2.sh tst-pam_access3.pamd tst-pam_access3.sh tst-pam_access4.pamd tst-pam_access4.sh limits.conf tst-pam_limits1.pamd tst-pam_limits1.sh tst-pam_succeed_if1.pamd tst-pam_succeed_if1.sh group.conf tst-pam_group1.pamd tst-pam_group1.sh tst-pam_authfail.pamd tst-pam_authsucceed.pamd tst-pam_substack1.pamd tst-pam_substack1a.pamd tst-pam_substack1.sh tst-pam_substack2.pamd tst-pam_substack2a.pamd tst-pam_substack2.sh tst-pam_substack3.pamd tst-pam_substack3a.pamd tst-pam_substack3.sh tst-pam_substack4.pamd tst-pam_substack4a.pamd tst-pam_substack4.sh tst-pam_substack5.pamd tst-pam_substack5a.pamd tst-pam_substack5.sh tst-pam_assemble_line1.pamd tst-pam_assemble_line1.sh tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh tst-pam_time1.pamd time.conf ; do \/usr/bin/install -c $file /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtests ; \ done
4/usr/bin/install: cannot stat `run-xtests.sh': No such file or directory
5/usr/bin/install: cannot stat `tst-pam_dispatch1.pamd': No such file or directory
6/usr/bin/install: cannot stat `tst-pam_dispatch2.pamd': No such file or directory
7
8Upstream-Status: Pending
9
10RP 2013/03/21
11
12Index: Linux-PAM-1.1.6/xtests/Makefile.am
13===================================================================
14--- Linux-PAM-1.1.6.orig/xtests/Makefile.am 2013-03-08 12:26:30.360266000 +0000
15+++ Linux-PAM-1.1.6/xtests/Makefile.am 2013-03-21 11:39:58.557166650 +0000
16@@ -59,7 +59,7 @@
17 install_xtests:
18 $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
19 for file in $(EXTRA_DIST) ; do \
20- $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
21+ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
22 done
23 for file in $(XTESTS); do \
24 $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
diff --git a/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch b/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch
new file mode 100644
index 0000000000..5d2b69aae0
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Backport
2
3Fix for CVE-2010-4708
4
5Change default for user_readenv to 0 and document the
6new default for user_readenv.
7
8This fix is got from:
9http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env
10/pam_env.c?r1=1.22&r2=1.23&view=patch
11http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env
12/pam_env.8.xml?r1=1.7&r2=1.8&view=patch
13
14Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
15
16---
17--- a/modules/pam_env/pam_env.c 2012-09-05 13:57:47.000000000 +0800
18+++ b/modules/pam_env/pam_env.c 2012-09-05 13:58:05.000000000 +0800
19@@ -10,7 +10,7 @@
20 #define DEFAULT_READ_ENVFILE 1
21
22 #define DEFAULT_USER_ENVFILE ".pam_environment"
23-#define DEFAULT_USER_READ_ENVFILE 1
24+#define DEFAULT_USER_READ_ENVFILE 0
25
26 #include "config.h"
27
28--- a/modules/pam_env/pam_env.8.xml 2012-09-05 13:58:24.000000000 +0800
29+++ b/modules/pam_env/pam_env.8.xml 2012-09-05 13:59:36.000000000 +0800
30@@ -147,7 +147,10 @@
31 <listitem>
32 <para>
33 Turns on or off the reading of the user specific environment
34- file. 0 is off, 1 is on. By default this option is on.
35+ file. 0 is off, 1 is on. By default this option is off as user
36+ supplied environment variables in the PAM environment could affect
37+ behavior of subsequent modules in the stack without the consent
38+ of the system administrator.
39 </para>
40 </listitem>
41 </varlistentry>
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 0000000000..be687457f8
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -0,0 +1,35 @@
1This patch is used to create a new sub package libpam-xtests to do more checks.
2
3Upstream-Status: Pending
4
5Signed-off-by: Kang Kai <kai.kang@windriver.com>
6--- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800
7+++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800
8@@ -7,7 +7,7 @@
9 AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
10 -L$(top_builddir)/libpam_misc -lpam_misc
11
12-CLEANFILES = *~ $(XTESTS)
13+CLEANFILES = *~
14
15 EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
16 tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
17@@ -51,3 +51,18 @@
18
19 xtests: $(XTESTS) run-xtests.sh
20 "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
21+
22+all: $(XTESTS)
23+
24+install: install_xtests
25+
26+install_xtests:
27+ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
28+ for file in $(EXTRA_DIST) ; do \
29+ $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
30+ done
31+ for file in $(XTESTS); do \
32+ $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
33+ done
34+
35+.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 0000000000..5e551ac48f
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
@@ -0,0 +1,97 @@
1innetgr may not be there so make sure that when innetgr is not present
2then we inform about it and not use it.
3
4-Khem
5
6Upstream-Status: Pending
7
8Signed-off-by: Scott Garman <scott.a.garman@intel.com>
9
10Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c
11===================================================================
12--- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c
13+++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c
14@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p
15 }
16 /* If buffer starts with @, we are using netgroups */
17 if (buffer[0] == '@')
18- good &= innetgr (&buffer[1], NULL, user, NULL);
19+#ifdef HAVE_INNETGR
20+ good &= innetgr (&buffer[1], NULL, user, NULL);
21+#else
22+ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
23+#endif
24 /* otherwise, if the buffer starts with %, it's a UNIX group */
25 else if (buffer[0] == '%')
26 good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
27Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c
28===================================================================
29--- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c
30+++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c
31@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
32 }
33 /* If buffer starts with @, we are using netgroups */
34 if (buffer[0] == '@')
35- good &= innetgr (&buffer[1], NULL, user, NULL);
36+#ifdef HAVE_INNETGR
37+ good &= innetgr (&buffer[1], NULL, user, NULL);
38+#else
39+ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
40+#endif
41 else
42- good &= logic_field(pamh, user, buffer, count, is_same);
43+ good &= logic_field(pamh, user, buffer, count, is_same);
44 D(("with user: %s", good ? "passes":"fails" ));
45
46 /* here we get the time field */
47Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
48===================================================================
49--- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c
50+++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
51@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
52 }
53 /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
54 static int
55-evaluate_innetgr(const char *host, const char *user, const char *group)
56+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
57 {
58+#ifdef HAVE_INNETGR
59 if (innetgr(group, host, user, NULL) == 1)
60 return PAM_SUCCESS;
61+#else
62+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
63+#endif
64+
65 return PAM_AUTH_ERR;
66 }
67 /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
68 static int
69-evaluate_notinnetgr(const char *host, const char *user, const char *group)
70+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
71 {
72+#ifdef HAVE_INNETGR
73 if (innetgr(group, host, user, NULL) == 0)
74 return PAM_SUCCESS;
75+#else
76+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
77+#endif
78 return PAM_AUTH_ERR;
79 }
80
81@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug,
82 const void *rhost;
83 if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
84 rhost = NULL;
85- return evaluate_innetgr(rhost, user, right);
86+ return evaluate_innetgr(pamh, rhost, user, right);
87 }
88 /* (Rhost, user) is not in this group. */
89 if (strcasecmp(qual, "notinnetgr") == 0) {
90 const void *rhost;
91 if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
92 rhost = NULL;
93- return evaluate_notinnetgr(rhost, user, right);
94+ return evaluate_notinnetgr(pamh, rhost, user, right);
95 }
96 /* Fail closed. */
97 return PAM_SERVICE_ERR;
diff --git a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
new file mode 100644
index 0000000000..f1834f6ce3
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
@@ -0,0 +1,200 @@
1Description: extract the securetty logic for use with the "nullok_secure" option
2 introduced in the "055_pam_unix_nullok_secure" patch.
3
4Upstream-Status: Pending
5
6Signed-off-by: Ming Liu <ming.liu@windriver.com>
7===================================================================
8diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
9--- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800
10+++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800
11@@ -24,6 +24,10 @@ endif
12 securelib_LTLIBRARIES = pam_securetty.la
13 pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam
14
15+pam_securetty_la_SOURCES = \
16+ pam_securetty.c \
17+ tty_secure.c
18+
19 if ENABLE_REGENERATE_MAN
20 noinst_DATA = README
21 README: pam_securetty.8.xml
22diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
23--- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800
24+++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800
25@@ -1,7 +1,5 @@
26 /* pam_securetty module */
27
28-#define SECURETTY_FILE "/etc/securetty"
29-#define TTY_PREFIX "/dev/"
30 #define CMDLINE_FILE "/proc/cmdline"
31 #define CONSOLEACTIVE_FILE "/sys/class/tty/console/active"
32
33@@ -40,6 +38,9 @@
34 #include <security/pam_modutil.h>
35 #include <security/pam_ext.h>
36
37+extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
38+ const char *uttyname);
39+
40 #define PAM_DEBUG_ARG 0x0001
41 #define PAM_NOCONSOLE_ARG 0x0002
42
43@@ -73,11 +74,7 @@ securetty_perform_check (pam_handle_t *p
44 const char *username;
45 const char *uttyname;
46 const void *void_uttyname;
47- char ttyfileline[256];
48- char ptname[256];
49- struct stat ttyfileinfo;
50 struct passwd *user_pwd;
51- FILE *ttyfile;
52
53 /* log a trail for debugging */
54 if (ctrl & PAM_DEBUG_ARG) {
55@@ -105,50 +102,7 @@ securetty_perform_check (pam_handle_t *p
56 return PAM_SERVICE_ERR;
57 }
58
59- /* The PAM_TTY item may be prefixed with "/dev/" - skip that */
60- if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) {
61- uttyname += sizeof(TTY_PREFIX)-1;
62- }
63-
64- if (stat(SECURETTY_FILE, &ttyfileinfo)) {
65- pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", SECURETTY_FILE);
66- return PAM_SUCCESS; /* for compatibility with old securetty handling,
67- this needs to succeed. But we still log the
68- error. */
69- }
70-
71- if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) {
72- /* If the file is world writable or is not a
73- normal file, return error */
74- pam_syslog(pamh, LOG_ERR,
75- "%s is either world writable or not a normal file",
76- SECURETTY_FILE);
77- return PAM_AUTH_ERR;
78- }
79-
80- ttyfile = fopen(SECURETTY_FILE,"r");
81- if (ttyfile == NULL) { /* Check that we opened it successfully */
82- pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE);
83- return PAM_SERVICE_ERR;
84- }
85-
86- if (isdigit(uttyname[0])) {
87- snprintf(ptname, sizeof(ptname), "pts/%s", uttyname);
88- } else {
89- ptname[0] = '\0';
90- }
91-
92- retval = 1;
93-
94- while ((fgets(ttyfileline, sizeof(ttyfileline)-1, ttyfile) != NULL)
95- && retval) {
96- if (ttyfileline[strlen(ttyfileline) - 1] == '\n')
97- ttyfileline[strlen(ttyfileline) - 1] = '\0';
98-
99- retval = ( strcmp(ttyfileline, uttyname)
100- && (!ptname[0] || strcmp(ptname, uttyname)) );
101- }
102- fclose(ttyfile);
103+ retval = _pammodutil_tty_secure(pamh, uttyname);
104
105 if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) {
106 FILE *cmdlinefile;
107diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c
108--- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830
109+++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800
110@@ -0,0 +1,90 @@
111+/*
112+ * A function to determine if a particular line is in /etc/securetty
113+ */
114+
115+
116+#define SECURETTY_FILE "/etc/securetty"
117+#define TTY_PREFIX "/dev/"
118+
119+/* This function taken out of pam_securetty by Sam Hartman
120+ * <hartmans@debian.org>*/
121+/*
122+ * by Elliot Lee <sopwith@redhat.com>, Red Hat Software.
123+ * July 25, 1996.
124+ * Slight modifications AGM. 1996/12/3
125+ */
126+
127+#include <unistd.h>
128+#include <sys/types.h>
129+#include <sys/stat.h>
130+#include <security/pam_modules.h>
131+#include <stdarg.h>
132+#include <syslog.h>
133+#include <sys/syslog.h>
134+#include <stdio.h>
135+#include <string.h>
136+#include <stdlib.h>
137+#include <ctype.h>
138+#include <security/pam_modutil.h>
139+#include <security/pam_ext.h>
140+
141+extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
142+ const char *uttyname);
143+
144+int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname)
145+{
146+ int retval = PAM_AUTH_ERR;
147+ char ttyfileline[256];
148+ char ptname[256];
149+ struct stat ttyfileinfo;
150+ FILE *ttyfile;
151+ /* The PAM_TTY item may be prefixed with "/dev/" - skip that */
152+ if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0)
153+ uttyname += sizeof(TTY_PREFIX)-1;
154+
155+ if (stat(SECURETTY_FILE, &ttyfileinfo)) {
156+ pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m",
157+ SECURETTY_FILE);
158+ return PAM_SUCCESS; /* for compatibility with old securetty handling,
159+ this needs to succeed. But we still log the
160+ error. */
161+ }
162+
163+ if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) {
164+ /* If the file is world writable or is not a
165+ normal file, return error */
166+ pam_syslog(pamh, LOG_ERR,
167+ "%s is either world writable or not a normal file",
168+ SECURETTY_FILE);
169+ return PAM_AUTH_ERR;
170+ }
171+
172+ ttyfile = fopen(SECURETTY_FILE,"r");
173+ if(ttyfile == NULL) { /* Check that we opened it successfully */
174+ pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE);
175+ return PAM_SERVICE_ERR;
176+ }
177+
178+ if (isdigit(uttyname[0])) {
179+ snprintf(ptname, sizeof(ptname), "pts/%s", uttyname);
180+ } else {
181+ ptname[0] = '\0';
182+ }
183+
184+ retval = 1;
185+
186+ while ((fgets(ttyfileline,sizeof(ttyfileline)-1, ttyfile) != NULL)
187+ && retval) {
188+ if(ttyfileline[strlen(ttyfileline) - 1] == '\n')
189+ ttyfileline[strlen(ttyfileline) - 1] = '\0';
190+ retval = ( strcmp(ttyfileline,uttyname)
191+ && (!ptname[0] || strcmp(ptname, uttyname)) );
192+ }
193+ fclose(ttyfile);
194+
195+ if(retval) {
196+ retval = PAM_AUTH_ERR;
197+ }
198+
199+ return retval;
200+}
diff --git a/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
new file mode 100644
index 0000000000..b285e96c27
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
@@ -0,0 +1,222 @@
1Debian patch to add a new 'nullok_secure' option to pam_unix, which
2accepts users with null passwords only when the applicant is connected
3from a tty listed in /etc/securetty.
4
5Authors: Sam Hartman <hartmans@debian.org>,
6 Steve Langasek <vorlon@debian.org>
7
8Upstream-Status: Pending
9
10Signed-off-by: Ming Liu <ming.liu@windriver.com>
11===================================================================
12diff -urpN a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
13--- a/modules/pam_unix/Makefile.am 2013-07-05 09:51:31.014483164 +0800
14+++ b/modules/pam_unix/Makefile.am 2013-07-05 10:26:12.884484000 +0800
15@@ -30,7 +30,8 @@ if HAVE_VERSIONING
16 pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
17 endif
18 pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \
19- @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS)
20+ @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \
21+ ../pam_securetty/tty_secure.lo
22
23 securelib_LTLIBRARIES = pam_unix.la
24
25diff -urpN a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8
26--- a/modules/pam_unix/pam_unix.8 2013-07-05 09:52:16.825108201 +0800
27+++ b/modules/pam_unix/pam_unix.8 2013-07-05 10:28:34.724483774 +0800
28@@ -220,7 +220,14 @@ A little more extreme than debug\&.
29 .RS 4
30 The default action of this module is to not permit the user access to a service if their official password is blank\&. The
31 \fBnullok\fR
32-argument overrides this default\&.
33+argument overrides this default and allows any user with a blank password to access the service\&.
34+.RE
35+.PP
36+\fBnullok_secure\fR
37+.RS 4
38+The default action of this module is to not permit the user access to a service if their official password is blank\&. The
39+\fBnullok_secure\fR
40+argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty\&.
41 .RE
42 .PP
43 \fBtry_first_pass\fR
44diff -urpN a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml
45--- a/modules/pam_unix/pam_unix.8.xml 2013-07-05 09:52:38.775108523 +0800
46+++ b/modules/pam_unix/pam_unix.8.xml 2013-07-05 10:30:23.084483630 +0800
47@@ -135,7 +135,24 @@
48 <para>
49 The default action of this module is to not permit the
50 user access to a service if their official password is blank.
51- The <option>nullok</option> argument overrides this default.
52+ The <option>nullok</option> argument overrides this default
53+ and allows any user with a blank password to access the
54+ service.
55+ </para>
56+ </listitem>
57+ </varlistentry>
58+ <varlistentry>
59+ <term>
60+ <option>nullok_secure</option>
61+ </term>
62+ <listitem>
63+ <para>
64+ The default action of this module is to not permit the
65+ user access to a service if their official password is blank.
66+ The <option>nullok_secure</option> argument overrides this
67+ default and allows any user with a blank password to access
68+ the service as long as the value of PAM_TTY is set to one of
69+ the values found in /etc/securetty.
70 </para>
71 </listitem>
72 </varlistentry>
73diff -urpN a/modules/pam_unix/README b/modules/pam_unix/README
74--- a/modules/pam_unix/README 2013-07-05 09:51:52.205107846 +0800
75+++ b/modules/pam_unix/README 2013-07-05 10:27:10.774484537 +0800
76@@ -57,7 +57,16 @@ nullok
77
78 The default action of this module is to not permit the user access to a
79 service if their official password is blank. The nullok argument overrides
80- this default.
81+ this default and allows any user with a blank password to access the
82+ service.
83+
84+nullok_secure
85+
86+ The default action of this module is to not permit the user access to a
87+ service if their official password is blank. The nullok_secure argument
88+ overrides this default and allows any user with a blank password to access
89+ the service as long as the value of PAM_TTY is set to one of the values
90+ found in /etc/securetty.
91
92 try_first_pass
93
94diff -urpN a/modules/pam_unix/support.c b/modules/pam_unix/support.c
95--- a/modules/pam_unix/support.c 2013-07-05 09:50:49.134482523 +0800
96+++ b/modules/pam_unix/support.c 2013-07-05 09:56:26.924484267 +0800
97@@ -84,14 +84,22 @@ int _set_ctrl(pam_handle_t *pamh, int fl
98 /* now parse the arguments to this module */
99
100 for (; argc-- > 0; ++argv) {
101- int j;
102+ int j, sl;
103
104 D(("pam_unix arg: %s", *argv));
105
106 for (j = 0; j < UNIX_CTRLS_; ++j) {
107- if (unix_args[j].token
108- && !strncmp(*argv, unix_args[j].token, strlen(unix_args[j].token))) {
109- break;
110+ if (unix_args[j].token) {
111+ sl = strlen(unix_args[j].token);
112+ if (unix_args[j].token[sl-1] == '=') {
113+ /* exclude argument from comparison */
114+ if (!strncmp(*argv, unix_args[j].token, sl))
115+ break;
116+ } else {
117+ /* compare full strings */
118+ if (!strcmp(*argv, unix_args[j].token))
119+ break;
120+ }
121 }
122 }
123
124@@ -461,6 +469,7 @@ static int _unix_run_helper_binary(pam_h
125 child = fork();
126 if (child == 0) {
127 int i=0;
128+ int nullok = off(UNIX__NONULL, ctrl);
129 struct rlimit rlim;
130 static char *envp[] = { NULL };
131 char *args[] = { NULL, NULL, NULL, NULL };
132@@ -488,7 +497,18 @@ static int _unix_run_helper_binary(pam_h
133 /* exec binary helper */
134 args[0] = strdup(CHKPWD_HELPER);
135 args[1] = x_strdup(user);
136- if (off(UNIX__NONULL, ctrl)) { /* this means we've succeeded */
137+
138+ if (on(UNIX_NULLOK_SECURE, ctrl)) {
139+ const void *uttyname;
140+ retval = pam_get_item(pamh, PAM_TTY, &uttyname);
141+ if (retval != PAM_SUCCESS || uttyname == NULL
142+ || _pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS)
143+ {
144+ nullok = 0;
145+ }
146+ }
147+
148+ if (nullok) {
149 args[2]=strdup("nullok");
150 } else {
151 args[2]=strdup("nonull");
152@@ -567,6 +587,17 @@ _unix_blankpasswd (pam_handle_t *pamh, u
153 if (on(UNIX__NONULL, ctrl))
154 return 0; /* will fail but don't let on yet */
155
156+ if (on(UNIX_NULLOK_SECURE, ctrl)) {
157+ int retval2;
158+ const void *uttyname;
159+ retval2 = pam_get_item(pamh, PAM_TTY, &uttyname);
160+ if (retval2 != PAM_SUCCESS || uttyname == NULL)
161+ return 0;
162+
163+ if (_pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS)
164+ return 0;
165+ }
166+
167 /* UNIX passwords area */
168
169 retval = get_pwd_hash(pamh, name, &pwd, &salt);
170@@ -653,7 +684,8 @@ int _unix_verify_password(pam_handle_t *
171 }
172 }
173 } else {
174- retval = verify_pwd_hash(p, salt, off(UNIX__NONULL, ctrl));
175+ retval = verify_pwd_hash(p, salt,
176+ _unix_blankpasswd(pamh, ctrl, name));
177 }
178
179 if (retval == PAM_SUCCESS) {
180diff -urpN a/modules/pam_unix/support.h b/modules/pam_unix/support.h
181--- a/modules/pam_unix/support.h 2013-07-05 09:51:10.385107934 +0800
182+++ b/modules/pam_unix/support.h 2013-07-05 10:23:54.815107842 +0800
183@@ -90,8 +90,9 @@ typedef struct {
184 password hash algorithms */
185 #define UNIX_BLOWFISH_PASS 26 /* new password hashes will use blowfish */
186 #define UNIX_MIN_PASS_LEN 27 /* min length for password */
187+#define UNIX_NULLOK_SECURE 28 /* NULL passwords allowed only on secure ttys */
188 /* -------------- */
189-#define UNIX_CTRLS_ 28 /* number of ctrl arguments defined */
190+#define UNIX_CTRLS_ 29 /* number of ctrl arguments defined */
191
192 #define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl))
193
194@@ -109,7 +110,7 @@ static const UNIX_Ctrls unix_args[UNIX_C
195 /* UNIX_NOT_SET_PASS */ {"not_set_pass", _ALL_ON_, 0100},
196 /* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200},
197 /* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400},
198-/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000},
199+/* UNIX__NONULL */ {NULL, _ALL_ON_^(0x10000000), 0x200},
200 /* UNIX__QUIET */ {NULL, _ALL_ON_, 02000},
201 /* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000},
202 /* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000},
203@@ -127,7 +128,8 @@ static const UNIX_Ctrls unix_args[UNIX_C
204 /* UNIX_SHA512_PASS */ {"sha512", _ALL_ON_^(0260420000), 040000000},
205 /* UNIX_ALGO_ROUNDS */ {"rounds=", _ALL_ON_, 0100000000},
206 /* UNIX_BLOWFISH_PASS */ {"blowfish", _ALL_ON_^(0260420000), 0200000000},
207-/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000},
208+/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000},
209+/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(0x200), 0x10000000},
210 };
211
212 #define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag)
213@@ -163,6 +165,9 @@ extern int _unix_read_password(pam_handl
214 ,const char *data_name
215 ,const void **pass);
216
217+extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
218+ const char *uttyname);
219+
220 extern int _unix_run_verify_binary(pam_handle_t *pamh,
221 unsigned int ctrl, const char *user, int *daysleft);
222 #endif /* _PAM_UNIX_SUPPORT_H */
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 0000000000..316b17337b
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-account
@@ -0,0 +1,25 @@
1#
2# /etc/pam.d/common-account - authorization settings common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of the authorization modules that define
6# the central access policy for use on the system. The default is to
7# only deny service to users whose accounts are expired in /etc/shadow.
8#
9# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
10# To take advantage of this, it is recommended that you configure any
11# local modules either before or after the default block, and use
12# pam-auth-update to manage selection of other modules. See
13# pam-auth-update(8) for details.
14#
15
16# here are the per-package modules (the "Primary" block)
17account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
18# here's the fallback if no module succeeds
19account requisite pam_deny.so
20# prime the stack with a positive return value if there isn't one already;
21# this avoids us returning an error just because nothing sets a success code
22# since the modules above will each just jump around
23account required pam_permit.so
24# and here are more per-package modules (the "Additional" block)
25# 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 0000000000..460b69f198
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-auth
@@ -0,0 +1,18 @@
1#
2# /etc/pam.d/common-auth - authentication settings common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of the authentication modules that define
6# the central authentication scheme for use on the system
7# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
8# traditional Unix authentication mechanisms.
9
10# here are the per-package modules (the "Primary" block)
11auth [success=1 default=ignore] pam_unix.so nullok_secure
12# here's the fallback if no module succeeds
13auth requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17auth required pam_permit.so
18# 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 0000000000..3896057328
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-password
@@ -0,0 +1,26 @@
1#
2# /etc/pam.d/common-password - password-related modules common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of modules that define the services to be
6# used to change user passwords. The default is pam_unix.
7
8# Explanation of pam_unix options:
9#
10# The "sha512" option enables salted SHA512 passwords. Without this option,
11# the default is Unix crypt. Prior releases used the option "md5".
12#
13# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
14# login.defs.
15#
16# See the pam_unix manpage for other options.
17
18# here are the per-package modules (the "Primary" block)
19password [success=1 default=ignore] pam_unix.so obscure sha512
20# here's the fallback if no module succeeds
21password requisite pam_deny.so
22# prime the stack with a positive return value if there isn't one already;
23# this avoids us returning an error just because nothing sets a success code
24# since the modules above will each just jump around
25password required pam_permit.so
26# 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 0000000000..a4a551f711
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session
@@ -0,0 +1,19 @@
1#
2# /etc/pam.d/common-session - session-related modules common to all services
3#
4# This file is included from other service-specific PAM config files,
5# and should contain a list of modules that define tasks to be performed
6# at the start and end of sessions of *any* kind (both interactive and
7# non-interactive).
8#
9
10# here are the per-package modules (the "Primary" block)
11session [default=1] pam_permit.so
12# here's the fallback if no module succeeds
13session requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17session required pam_permit.so
18# and here are more per-package modules (the "Additional" block)
19session 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 0000000000..b110bb2b49
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive
@@ -0,0 +1,19 @@
1#
2# /etc/pam.d/common-session-noninteractive - session-related modules
3# common to all non-interactive services
4#
5# This file is included from other service-specific PAM config files,
6# and should contain a list of modules that define tasks to be performed
7# at the start and end of all non-interactive sessions.
8#
9
10# here are the per-package modules (the "Primary" block)
11session [default=1] pam_permit.so
12# here's the fallback if no module succeeds
13session requisite pam_deny.so
14# prime the stack with a positive return value if there isn't one already;
15# this avoids us returning an error just because nothing sets a success code
16# since the modules above will each just jump around
17session required pam_permit.so
18# and here are more per-package modules (the "Additional" block)
19session 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 0000000000..ec970ecbe0
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/other
@@ -0,0 +1,24 @@
1#
2# /etc/pam.d/other - specify the PAM fallback behaviour
3#
4# Note that this file is used for any unspecified service; for example
5#if /etc/pam.d/cron specifies no session modules but cron calls
6#pam_open_session, the session module out of /etc/pam.d/other is
7#used.
8
9# We use pam_warn.so to generate syslog notes that the 'other'
10#fallback rules are being used (as a hint to suggest you should setup
11#specific PAM rules for the service and aid to debugging). Then to be
12#secure, deny access to all services by default.
13
14auth required pam_warn.so
15auth required pam_deny.so
16
17account required pam_warn.so
18account required pam_deny.so
19
20password required pam_warn.so
21password required pam_deny.so
22
23session required pam_warn.so
24session required pam_deny.so
diff --git a/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch b/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch
new file mode 100644
index 0000000000..c13535ecc2
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch
@@ -0,0 +1,35 @@
1Backport from linux-pam git repo.
2
3[YOCTO #4107]
4
5Upstream-Status: Backport
6
7Signed-off-by: Kang Kai <kai.kang@windriver.com>
8
9From bd07ad3adc626f842a4391d256541883426fd389 Mon Sep 17 00:00:00 2001
10From: Tomas Mraz <tmraz@fedoraproject.org>
11Date: Tue, 13 Nov 2012 09:19:05 +0100
12Subject: [PATCH] Reflect the enforce_for_root semantics change in
13 pam_pwhistory xtest.
14
15xtests/tst-pam_pwhistory1.pamd: Use enforce_for_root as the test is
16running with real uid == 0.
17---
18 xtests/tst-pam_pwhistory1.pamd | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/xtests/tst-pam_pwhistory1.pamd b/xtests/tst-pam_pwhistory1.pamd
22index 68e1b94..d60db7c 100644
23--- a/xtests/tst-pam_pwhistory1.pamd
24+++ b/xtests/tst-pam_pwhistory1.pamd
25@@ -1,6 +1,6 @@
26 #%PAM-1.0
27 auth required pam_permit.so
28 account required pam_permit.so
29-password required pam_pwhistory.so remember=10 retry=1
30+password required pam_pwhistory.so remember=10 retry=1 enforce_for_root
31 password required pam_unix.so use_authtok md5
32 session required pam_permit.so
33--
341.7.11.7
35
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
new file mode 100644
index 0000000000..7c0111fb04
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -0,0 +1,143 @@
1SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
2DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
3HOMEPAGE = "https://fedorahosted.org/linux-pam/"
4BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
5SECTION = "base"
6# PAM is dual licensed under GPL and BSD.
7# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
8# libpam-runtime-1.0.1 is GPLv2+), by openembedded
9LICENSE = "GPLv2+ | BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
11
12SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
13 file://99_pam \
14 file://pam.d/common-account \
15 file://pam.d/common-auth \
16 file://pam.d/common-password \
17 file://pam.d/common-session \
18 file://pam.d/common-session-noninteractive \
19 file://pam.d/other \
20 file://libpam-xtests.patch \
21 file://destdirfix.patch \
22 file://fixsepbuild.patch \
23 file://reflect-the-enforce_for_root-semantics-change-in-pam.patch \
24 file://add-checks-for-crypt-returning-NULL.patch \
25 file://libpam-fix-for-CVE-2010-4708.patch \
26 file://pam-security-abstract-securetty-handling.patch \
27 file://pam-unix-nullok-secure.patch \
28 "
29SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
30SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
31
32SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch"
33
34DEPENDS = "bison flex flex-native cracklib"
35
36EXTRA_OECONF = "--with-db-uniquename=_pam \
37 --includedir=${includedir}/security \
38 --libdir=${base_libdir} \
39 --disable-nis \
40 --disable-regenerate-docu \
41 --disable-prelude"
42
43CFLAGS_append = " -fPIC "
44
45PR = "r5"
46
47S = "${WORKDIR}/Linux-PAM-${PV}"
48
49inherit autotools gettext pkgconfig
50
51PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
52
53PACKAGES += "${PN}-runtime ${PN}-xtests"
54FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
55FILES_${PN}-dbg += "${base_libdir}/security/.debug \
56 ${base_libdir}/security/pam_filter/.debug \
57 ${datadir}/Linux-PAM/xtests/.debug"
58
59FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
60FILES_${PN}-runtime = "${sysconfdir}"
61FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
62
63PACKAGES_DYNAMIC += "^pam-plugin-.*"
64
65def get_multilib_bit(d):
66 baselib = d.getVar('baselib', True) or ''
67 return baselib.replace('lib', '')
68
69libpam_suffix = "suffix${@get_multilib_bit(d)}"
70
71RPROVIDES_${PN} += "libpam-${libpam_suffix}"
72RPROVIDES_${PN}-runtime += "libpam-runtime-${libpam_suffix}"
73
74RDEPENDS_${PN}-runtime = "libpam-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
75RDEPENDS_${PN}-xtests = "libpam-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
76RRECOMMENDS_${PN} = "libpam-runtime-${libpam_suffix}"
77
78python populate_packages_prepend () {
79 def pam_plugin_append_file(pn, dir, file):
80 nf = os.path.join(dir, file)
81 of = d.getVar('FILES_' + pn, True)
82 if of:
83 nf = of + " " + nf
84 d.setVar('FILES_' + pn, nf)
85
86 def pam_plugin_hook(file, pkg, pattern, format, basename):
87 libpam_suffix = d.getVar('libpam_suffix', True)
88 mlprefix = d.getVar('MLPREFIX', True) or ''
89
90 rdeps = d.getVar('RDEPENDS_' + pkg, True)
91 if rdeps:
92 rdeps = rdeps + " " + mlprefix + "libpam-" + libpam_suffix
93 else:
94 rdeps = mlprefix + "libpam-" + libpam_suffix
95 d.setVar('RDEPENDS_' + pkg, rdeps)
96
97 provides = d.getVar('RPROVIDES_' + pkg, True)
98 if provides:
99 provides = provides + " " + pkg + "-" + libpam_suffix
100 else:
101 provides = pkg + "-" + libpam_suffix
102 d.setVar('RPROVIDES_' + pkg, provides)
103
104 dvar = bb.data.expand('${WORKDIR}/package', d, True)
105 pam_libdir = d.expand('${base_libdir}/security')
106 pam_sbindir = d.expand('${sbindir}')
107 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
108
109 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
110 mlprefix = d.getVar('MLPREFIX', True) or ''
111 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
112 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
113 pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
114 pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
115 pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
116 pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
117 do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
118}
119
120do_install() {
121 autotools_do_install
122
123 # don't install /var/run when populating rootfs. Do it through volatile
124 rm -rf ${D}${localstatedir}
125 install -d ${D}${sysconfdir}/default/volatiles
126 install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
127
128 install -d ${D}${sysconfdir}/pam.d/
129 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
130
131 # The lsb requires unix_chkpwd has setuid permission
132 chmod 4755 ${D}${sbindir}/unix_chkpwd
133
134 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
135 echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
136 fi
137}
138
139python do_pam_sanity () {
140 if not base_contains('DISTRO_FEATURES', 'pam', True, False, d):
141 bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
142}
143addtask pam_sanity before do_configure
diff --git a/meta/recipes-extended/parted/parted-3.1/Makefile b/meta/recipes-extended/parted/parted-3.1/Makefile
new file mode 100644
index 0000000000..ee90be0814
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/Makefile
@@ -0,0 +1,285 @@
1am__tty_colors_dummy = \
2 mgn= red= grn= lgn= blu= brg= std=; \
3 am__color_tests=no
4
5am__tty_colors = \
6$(am__tty_colors_dummy); \
7test "X$(AM_COLOR_TESTS)" != Xno \
8&& test "X$$TERM" != Xdumb \
9&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
10&& { \
11 am__color_tests=yes; \
12 red=''; \
13 grn=''; \
14 lgn=''; \
15 blu=''; \
16 mgn=''; \
17 brg=''; \
18 std=''; \
19}
20
21am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
22am__vpath_adj = case $$p in \
23 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
24 *) f=$$p;; \
25 esac;
26am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
27am__rst_section = { sed 'p;s/./=/g;' && echo; }
28am__sh_e_setup = case $$- in *e*) set +e;; esac
29
30am__common_driver_flags = \
31 --color-tests "$$am__color_tests" \
32 --enable-hard-errors "$$am__enable_hard_errors" \
33 --expect-failure "$$am__expect_failure"
34am__check_pre = \
35$(am__sh_e_setup); \
36$(am__vpath_adj_setup) $(am__vpath_adj) \
37$(am__tty_colors); \
38srcdir=$(srcdir); export srcdir; \
39am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
40test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
41if test -f "./$$f"; then dir=./; \
42elif test -f "$$f"; then dir=; \
43else dir="$(srcdir)/"; fi; \
44tst=$$dir$$f; log='$@'; \
45if test -n '$(DISABLE_HARD_ERRORS)'; then \
46 am__enable_hard_errors=no; \
47else \
48 am__enable_hard_errors=yes; \
49fi; \
50$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
51
52am__set_TESTS_bases = \
53 bases='$(TEST_LOGS)'; \
54 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
55 bases=`echo $$bases`
56
57RECHECK_LOGS = $(TEST_LOGS)
58TEST_SUITE_LOG = test-suite.log
59am__test_logs1 = $(TESTS:=.log)
60am__test_logs2 = $(am__test_logs1:.log=.log)
61TEST_LOGS = $(am__test_logs2:.sh.log=.log)
62SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
63SH_LOG_COMPILE = $(SH_LOG_COMPILER)
64
65am__set_b = \
66 case '$@' in \
67 */*) \
68 case '$*' in \
69 */*) b='$*';; \
70 *) b=`echo '$@' | sed 's/\.log$$//'`; \
71 esac;; \
72 *) \
73 b='$*';; \
74 esac
75
76MKDIR_P = /bin/mkdir -p
77SHELL = /bin/bash
78VERSION = 3.1
79PACKAGE_STRING = GNU parted 3.1
80PACKAGE_BUGREPORT = bug-parted@gnu.org
81abs_srcdir = $(PWD)
82abs_top_builddir = $(PWD)/..
83abs_top_srcdir = $(PWD)/..
84srcdir = .
85top_srcdir = ..
86subdir = tests
87SH_LOG_COMPILER = $(SHELL)
88
89TESTS = \
90 help-version.sh \
91 t0000-basic.sh \
92 t0001-tiny.sh \
93 t0010-script-no-ctrl-chars.sh \
94 t0100-print.sh \
95 t0101-print-empty.sh \
96 t0200-gpt.sh \
97 t0201-gpt.sh \
98 t0202-gpt-pmbr.sh \
99 t0203-gpt-tiny-device-abort.sh \
100 t0203-gpt-shortened-device-primary-valid.sh \
101 t0205-gpt-list-clobbers-pmbr.sh \
102 t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \
103 t0207-IEC-binary-notation.sh \
104 t0208-mkpart-end-in-IEC.sh \
105 t0209-gpt-pmbr_boot.sh \
106 t0210-gpt-resized-partition-entry-array.sh \
107 t0211-gpt-rewrite-header.sh \
108 t0212-gpt-many-partitions.sh \
109 t0220-gpt-msftres.sh \
110 t0250-gpt.sh \
111 t0280-gpt-corrupt.sh \
112 t0300-dos-on-gpt.sh \
113 t0400-loop-clobber-infloop.sh \
114 t0500-dup-clobber.sh \
115 t0501-duplicate.sh \
116 t1100-busy-label.sh \
117 t1101-busy-partition.sh \
118 t1700-probe-fs.sh \
119 t2200-dos-label-recog.sh \
120 t2201-pc98-label-recog.sh \
121 t2300-dos-label-extended-bootcode.sh \
122 t2310-dos-extended-2-sector-min-offset.sh \
123 t2400-dos-hfs-partition-type.sh \
124 t2500-probe-corrupt-hfs.sh \
125 t3000-resize-fs.sh \
126 t3200-type-change.sh \
127 t3300-palo-prep.sh \
128 t3310-flags.sh \
129 t3400-whole-disk-FAT-partition.sh \
130 t4000-sun-raid-type.sh \
131 t4001-sun-vtoc.sh \
132 t4100-msdos-partition-limits.sh \
133 t4100-dvh-partition-limits.sh \
134 t4100-msdos-starting-sector.sh \
135 t4200-partprobe.sh \
136 t4300-nilfs2-tiny.sh \
137 t5000-tags.sh \
138 t6000-dm.sh \
139 t6001-psep.sh \
140 t6100-mdraid-partitions.sh \
141 t7000-scripting.sh \
142 t8000-loop.sh \
143 t8001-loop-blkpg.sh \
144 t9010-big-sector.sh \
145 t9020-alignment.sh \
146 t9021-maxima.sh \
147 t9022-one-unit-snap.sh \
148 t9023-value-lt-one.sh \
149 t9030-align-check.sh \
150 t9040-many-partitions.sh \
151 t9041-undetected-in-use-16th-partition.sh \
152 t9042-dos-partition-limit.sh \
153 t9050-partition-table-types.sh
154
155TESTS_ENVIRONMENT = \
156 export \
157 abs_top_builddir='$(abs_top_builddir)' \
158 abs_top_srcdir='$(abs_top_srcdir)' \
159 abs_srcdir='$(abs_srcdir)' \
160 built_programs=parted \
161 srcdir='$(srcdir)' \
162 top_srcdir='$(top_srcdir)' \
163 VERSION=$(VERSION) \
164 ; 9>&2
165
166.SUFFIXES: .log
167
168$(TEST_SUITE_LOG): $(TEST_LOGS)
169 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
170 ws='[ ]'; \
171 results=`for b in $$bases; do echo $$b.trs; done`; \
172 test -n "$$results" || results=/dev/null; \
173 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
174 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
175 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
176 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
177 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
178 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
179 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
180 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
181 success=true; \
182 else \
183 success=false; \
184 fi; \
185 br='==================='; br=$$br$$br$$br$$br; \
186 result_count () \
187 { \
188 if test x"$$1" = x"--maybe-color"; then \
189 maybe_colorize=yes; \
190 elif test x"$$1" = x"--no-color"; then \
191 maybe_colorize=no; \
192 else \
193 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
194 fi; \
195 shift; \
196 desc=$$1 count=$$2; \
197 if test $$maybe_colorize = yes && test $$count -gt 0; then \
198 color_start=$$3 color_end=$$std; \
199 else \
200 color_start= color_end=; \
201 fi; \
202 echo "$${color_start}# $$desc $$count$${color_end}"; \
203 }; \
204 create_testsuite_report () \
205 { \
206 result_count $$1 "TOTAL:" $$all "$$brg"; \
207 result_count $$1 "PASS: " $$pass "$$grn"; \
208 result_count $$1 "SKIP: " $$skip "$$blu"; \
209 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
210 result_count $$1 "FAIL: " $$fail "$$red"; \
211 result_count $$1 "XPASS:" $$xpass "$$red"; \
212 result_count $$1 "ERROR:" $$error "$$mgn"; \
213 }; \
214 { \
215 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
216 $(am__rst_title); \
217 create_testsuite_report --no-color; \
218 echo; \
219 echo ".. contents:: :depth: 2"; \
220 echo; \
221 for i in $$bases; do \
222 if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
223 >/dev/null; then continue; \
224 fi; \
225 glob_res=`sed -n -e "s/$$ws*$$//" \
226 -e "s/^$$ws*:global-test-result:$$ws*//p" \
227 $$i.trs`; \
228 test -n "$$glob_res" || glob_res=RUN; \
229 echo "$$glob_res: $$i" | $(am__rst_section); \
230 if test ! -r $$i.log; then \
231 echo "fatal: making $@: $$i.log is unreadable" >&2; \
232 exit 1; \
233 fi; \
234 cat $$i.log; echo; \
235 done; \
236 } >$(TEST_SUITE_LOG).tmp; \
237 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
238 if $$success; then \
239 col="$$grn"; \
240 else \
241 col="$$red"; \
242 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
243 fi; \
244 echo "$${col}$$br$${std}"; \
245 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
246 echo "$${col}$$br$${std}"; \
247 create_testsuite_report --maybe-color; \
248 echo "$$col$$br$$std"; \
249 if $$success; then :; else \
250 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
251 if test -n "$(PACKAGE_BUGREPORT)"; then \
252 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
253 fi; \
254 echo "$$col$$br$$std"; \
255 fi; \
256 $$success || exit 1
257
258check-TESTS:
259 @if test $@ != recheck; then \
260 list='$(RECHECK_LOGS)'; \
261 test -z "$$list" || rm -f $$list; \
262 fi
263 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
264 @ws='[ ]'; \
265 log_list='' trs_list=''; $(am__set_TESTS_bases); \
266 for i in $$bases; do \
267 if test -z "$$log_list"; then \
268 log_list="$$i.log"; \
269 else \
270 log_list="$$log_list $$i.log"; \
271 fi; \
272 if test -z "$$trs_list"; then \
273 trs_list="$$i.trs"; \
274 else \
275 trs_list="$$trs_list $$i.trs"; \
276 fi; \
277 done; \
278 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
279
280.sh.log:
281 @p='$<'; \
282 $(am__set_b); \
283 $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
284 --log-file $$b.log --trs-file $$b.trs \
285 $(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst"
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
new file mode 100644
index 0000000000..c4ca06d407
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch
@@ -0,0 +1,34 @@
1
2From: Gustavo Zacarias
3Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef
4Date: Mon, 3 Mar 2014 10:40:08 -0300
5
6The CPPFunction typedef (among others) have been deprecated in favour of
7specific prototyped typedefs since readline 4.2 (circa 2001).
8It's been working since because compatibility typedefs have been in
9place until they where removed in the recent readline 6.3 release.
10Switch to the new style to avoid build breakage.
11
12Signed-off-by: Gustavo Zacarias <address@hidden>
13
14Upstream-Status: Backport
15
16Signed-off-by: Saul Wold <sgw@linux.intel.com>
17
18---
19 parted/ui.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/parted/ui.c b/parted/ui.c
23index 786deed..b33f6fc 100644
24--- a/parted/ui.c
25+++ b/parted/ui.c
26@@ -1470,7 +1470,7 @@ init_readline (void)
27 #ifdef HAVE_LIBREADLINE
28 if (!opt_script_mode) {
29 rl_initialize ();
30- rl_attempted_completion_function = (CPPFunction*) complete_function;
31+ rl_attempted_completion_function = (rl_completion_func_t *) complete_function;
32 readline_state.in_readline = 0;
33 }
34 #endif
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 0000000000..0711d4e297
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Submitted [bug-parted@gnu.org]
2
3| for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \
4| make $(basename ${po%.pt_BR.po}); \
5| done
6| Makefile:904: *** Recursive variable `mandir' references itself (eventually). Stop.
7
8Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
9
10--- parted-3.1/doc/po4a.mk.orig 2012-03-15 14:09:11.555831872 +0100
11+++ parted-3.1/doc/po4a.mk 2012-03-15 14:10:44.243830985 +0100
12@@ -23,7 +23,7 @@
13 # threshold is 80%), it won't be distributed, and the build won't fail.
14 #
15
16-mandir = $(mandir)/$(lang)
17+mandir := $(mandir)/$(lang)
18
19 # Inform automake that we want to install some man pages in section 1, 5
20 # and 8.
diff --git a/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
new file mode 100644
index 0000000000..b1eae97988
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch
@@ -0,0 +1,35 @@
1Upstream-Status: Pending
2
3Signed-off-by: Ming Liu <ming.liu@windriver.com>
4---
5 dvh.h | 10 +++++-----
6 1 file changed, 5 insertions(+), 5 deletions(-)
7
8Index: parted-3.1/libparted/labels/dvh.h
9===================================================================
10--- parted-3.1.orig/libparted/labels/dvh.h 2013-02-25 10:46:13.204477586 +0800
11+++ parted-3.1/libparted/labels/dvh.h 2013-02-25 10:47:20.954477065 +0800
12@@ -112,8 +112,8 @@ struct device_parameters {
13
14 struct volume_directory {
15 char vd_name[VDNAMESIZE]; /* name */
16- int vd_lbn; /* logical block number */
17- int vd_nbytes; /* file length in bytes */
18+ unsigned int vd_lbn; /* logical block number */
19+ unsigned int vd_nbytes; /* file length in bytes */
20 };
21
22 /*
23@@ -125,9 +125,9 @@ struct volume_directory {
24 * NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED
25 */
26 struct partition_table { /* one per logical partition */
27- int pt_nblks; /* # of logical blks in partition */
28- int pt_firstlbn; /* first lbn of partition */
29- int pt_type; /* use of partition */
30+ unsigned int pt_nblks; /* # of logical blks in partition */
31+ unsigned int pt_firstlbn; /* first lbn of partition */
32+ int pt_type; /* use of partition */
33 };
34
35 #define PTYPE_VOLHDR 0 /* partition is volume header */
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 0000000000..a9f26e9781
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Accepted [Expected to be included in parted versions > 3.1]
2Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9
3
4From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001
5From: Andreas Oberritter <obi@opendreambox.org>
6Date: Sun, 18 Mar 2012 17:39:14 +0000
7Subject: git-version-gen: don't let "prefix" envvar cause trouble
8
9* build-aux/git-version-gen (prefix): Initialize properly,
10so as not to use a value specified via the environment.
11Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
12---
13diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
14index d5542a2..0fa9063 100755
15--- a/build-aux/git-version-gen
16+++ b/build-aux/git-version-gen
17@@ -1,6 +1,6 @@
18 #!/bin/sh
19 # Print a version string.
20-scriptversion=2012-01-06.07; # UTC
21+scriptversion=2012-03-18.17; # UTC
22
23 # Copyright (C) 2007-2012 Free Software Foundation, Inc.
24 #
25@@ -92,6 +92,8 @@ Options:
26
27 Running without arguments will suffice in most cases."
28
29+prefix=v
30+
31 while test $# -gt 0; do
32 case $1 in
33 --help) echo "$usage"; exit 0;;
34@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then
35 fi
36
37 tag_sed_script="${tag_sed_script:-s/x/x/}"
38-prefix="${prefix:-v}"
39
40 nl='
41 '
42--
43cgit 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 0000000000..58d8db4426
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/no_check.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate [configuration]
2
3If check is detected, it makes the builds non-determinstic so just force
4it to be disabled.
5
6RP - 4/11/08
7
8Index: parted-1.9.0/configure.ac
9===================================================================
10--- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100
11+++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000
12@@ -477,7 +477,7 @@
13 AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
14
15 dnl check for "check", unit testing library/header
16-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
17+have_check=no
18 if test "$have_check" != "yes"; then
19 AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building])
20 fi
diff --git a/meta/recipes-extended/parted/parted-3.1/run-ptest b/meta/recipes-extended/parted/parted-3.1/run-ptest
new file mode 100644
index 0000000000..695c5e8a7b
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -C tests check-TESTS
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 0000000000..e9bbe9a956
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/syscalls.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Pending
2
3---
4 libparted/arch/linux.c | 13 +++++++++++++
5 1 file changed, 13 insertions(+)
6
7Index: parted-1.9.0/libparted/arch/linux.c
8===================================================================
9--- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
10+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
11@@ -17,6 +17,8 @@
12
13 #define PROC_DEVICES_BUFSIZ 16384
14
15+#include <linux/version.h>
16+
17 #include <config.h>
18 #include <arch/linux.h>
19
20@@ -1477,12 +1479,14 @@
21
22 #if SIZEOF_OFF_T < 8
23
24+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
25 static _syscall5(int,_llseek,
26 unsigned int, fd,
27 unsigned long, offset_high,
28 unsigned long, offset_low,
29 loff_t*, result,
30 unsigned int, origin)
31+#endif
32
33 loff_t
34 llseek (unsigned int fd, loff_t offset, unsigned int whence)
35@@ -1490,11 +1494,20 @@
36 loff_t result;
37 int retval;
38
39+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
40 retval = _llseek(fd,
41 ((unsigned long long)offset) >> 32,
42 ((unsigned long long)offset) & 0xffffffff,
43 &result,
44 whence);
45+#else
46+ retval = syscall(__NR__llseek, fd,
47+ ((unsigned long long)offset) >> 32,
48+ ((unsigned long long)offset) & 0xffffffff,
49+ &result,
50+ whence);
51+#endif
52+
53 return (retval==-1 ? (loff_t) retval : result);
54 }
55
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 0000000000..8344ea82ce
--- /dev/null
+++ b/meta/recipes-extended/parted/parted_3.1.bb
@@ -0,0 +1,45 @@
1SUMMARY = "Disk partition editing/resizing utility"
2HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
3LICENSE = "GPLv3+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
5SECTION = "console/tools"
6DEPENDS = "ncurses readline util-linux"
7PR = "r1"
8
9SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
10 file://no_check.patch \
11 file://syscalls.patch \
12 file://fix-git-version-gen.patch \
13 file://fix-doc-mandir.patch \
14 file://fix-dvh-overflows.patch \
15 file://fix-deprecated-readline.patch \
16 file://run-ptest \
17 file://Makefile \
18"
19
20SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb"
21SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15"
22
23EXTRA_OECONF = "--disable-device-mapper"
24
25inherit autotools pkgconfig gettext ptest
26
27BBCLASSEXTEND = "native"
28
29do_compile_ptest() {
30 oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize
31}
32
33do_install_ptest() {
34 t=${D}${PTEST_PATH}
35 mkdir $t/build-aux
36 cp ${S}/build-aux/test-driver $t/build-aux/
37 cp -r ${S}/tests $t
38 cp ${WORKDIR}/Makefile $t/tests/
39 for i in print-align print-max dup-clobber duplicate fs-resize; \
40 do cp ${B}/tests/.libs/$i $t/tests/; \
41 done
42 sed -e 's| ../parted||' -i $t/tests/*.sh
43}
44
45RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup"
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 0000000000..88779c3bbd
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
@@ -0,0 +1,25 @@
1Upstream-Status: Pending
2
3This patch fixes this compiler error with gcc 4.6.0
4
5Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
6
7| fts.c: In function 'pax_fts_set':
8| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
9| cc1: all warnings being treated as errors
10|
11| make[2]: *** [fts.o] Error 1
12
13Index: pax-3.4/lib/fts.c
14===================================================================
15--- pax-3.4.orig/lib/fts.c
16+++ pax-3.4/lib/fts.c
17@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts
18 /* ARGSUSED */
19 int
20 fts_set(sp, p, instr)
21- FTS *sp;
22+ FTS __attribute__((__unused__)) *sp;
23 FTSENT *p;
24 int instr;
25 {
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 0000000000..80878f38b2
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
@@ -0,0 +1,185 @@
1Upstream-Status: Pending
2
3Author: H.J. Lu <hjl.tools@gmail.com>
4Date: Tue Dec 6 10:34:53 2011 -0800
5
6 Fix pax-3.4 build for x32
7
8 off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and
9 size of off_t to see if file offset is 64bit. This patch adds
10 AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
11
12Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
13
14Index: pax-3.4/configure.in
15===================================================================
16--- pax-3.4.orig/configure.in
17+++ pax-3.4/configure.in
18@@ -33,4 +33,7 @@ dnl Checks for header files.
19 dnl Checks for typedefs, structures, and compiler characteristics.
20 AC_C_CONST
21
22+AC_CHECK_SIZEOF(off_t)
23+AC_CHECK_SIZEOF(long)
24+
25 AC_OUTPUT([Makefile lib/Makefile src/Makefile])
26Index: pax-3.4/src/ar_io.c
27===================================================================
28--- pax-3.4.orig/src/ar_io.c
29+++ pax-3.4/src/ar_io.c
30@@ -378,7 +378,8 @@ ar_close(void)
31 * could have written anything yet.
32 */
33 if (frmt == NULL) {
34-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
35+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
36+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
37 (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
38 #else
39 (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
40@@ -391,7 +392,8 @@ ar_close(void)
41
42 if (strcmp(NM_CPIO, argv0) == 0)
43 (void)fprintf(listf,
44-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
45+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
46+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
47 "%qu blocks\n",
48 #else
49 "%lu blocks\n",
50@@ -399,7 +401,8 @@ ar_close(void)
51 (rdcnt ? rdcnt : wrcnt) / 5120);
52 else if (strcmp(NM_TAR, argv0) != 0)
53 (void)fprintf(listf,
54-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
55+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
56+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
57 "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
58 #else
59 "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
60Index: pax-3.4/src/cpio.c
61===================================================================
62--- pax-3.4.orig/src/cpio.c
63+++ pax-3.4/src/cpio.c
64@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
65 */
66 if ((arcn->sb.st_size == 0) ||
67 (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
68-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
69+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
70+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
71 paxwarn (1, "Cpio link name length is invalid: %qu",
72 arcn->sb.st_size);
73 #else
74Index: pax-3.4/src/gen_subs.c
75===================================================================
76--- pax-3.4.orig/src/gen_subs.c
77+++ pax-3.4/src/gen_subs.c
78@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
79 * print device id's for devices, or sizes for other nodes
80 */
81 if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
82-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
83+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
84+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
85 (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
86 (unsigned long) MINOR (sbp->st_rdev));
87 #else
88@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
89 #endif
90 else
91 {
92-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
93+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
94+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
95 (void) fprintf (fp, "%9qu ", sbp->st_size);
96 #else
97 (void) fprintf (fp, "%9lu ", sbp->st_size);
98@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len,
99 return (0);
100 }
101
102-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
103+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
104+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
105 /*
106 * asc_uqd()
107 * convert hex/octal character string into a u_quad_t. We do not have to
108Index: pax-3.4/src/options.c
109===================================================================
110--- pax-3.4.orig/src/options.c
111+++ pax-3.4/src/options.c
112@@ -1545,7 +1545,8 @@ str_offt (char *val)
113 char *expr;
114 off_t num, t;
115
116-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
117+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
118+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
119 num = strtoq (val, &expr, 0);
120 if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
121 #else
122Index: pax-3.4/src/tar.c
123===================================================================
124--- pax-3.4.orig/src/tar.c
125+++ pax-3.4/src/tar.c
126@@ -58,7 +58,8 @@
127 static unsigned long tar_chksm (char *, int);
128 static char *name_split (char *, int);
129 static int ul_oct (u_long, char *, int, int);
130-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
131+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
132+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
133 static int uqd_oct (u_quad_t, char *, int, int);
134 #endif
135
136@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str,
137 return (0);
138 }
139
140-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
141+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
142+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
143 /*
144 * uqd_oct()
145 * convert an u_quad_t to an octal string. one of many oddball field
146@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
147 0xfff);
148 arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
149 arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
150-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
151+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
152+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
153 arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
154 #else
155 arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
156@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
157 * data follows this file, so set the pad
158 */
159 hd->linkflag = AREGTYPE;
160-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
161+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
162+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
163 if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
164 sizeof (hd->size), 1))
165 #else
166@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
167 */
168 arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
169 0xfff);
170-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
171+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
172+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
173 arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
174 #else
175 arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
176@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
177 else
178 hd->typeflag = REGTYPE;
179 arcn->pad = TAR_PAD (arcn->sb.st_size);
180-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
181+#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
182+ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
183 if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
184 sizeof (hd->size), 3))
185 {
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 0000000000..0c10688feb
--- /dev/null
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Portable Archive eXchange"
2DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
3HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
4BUGTRACKER = "http://www.openbsd.org/query-pr.html"
5
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
8 file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
9 file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
10 file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
11
12SECTION = "base"
13PR = "r2"
14
15SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \
16 file://fix_for_compile_with_gcc-4.6.0.patch \
17 file://pax-3.4_fix_for_x32.patch"
18
19SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
20SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
21
22inherit autotools
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb
new file mode 100644
index 0000000000..9c2c9d5584
--- /dev/null
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.26.bb
@@ -0,0 +1,17 @@
1SUMMARY = "Convert::ASN1 - Perl ASN.1 Encode/Decode library"
2SECTION = "libs"
3LICENSE = "Artistic-1.0 | GPL-1.0+"
4LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8e8e0d3d23e096a63f"
5
6SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz"
7
8SRC_URI[md5sum] = "1c846c8c1125e6a075444abe65d99b63"
9SRC_URI[sha256sum] = "5db8b62fa0d036bd0cabc869ffe17941ad587d9a2af1ff030d554872adbc1ca1"
10
11S = "${WORKDIR}/Convert-ASN1-${PV}"
12
13inherit cpan
14
15EXTRA_PERLFLAGS = "-I ${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}"
16
17BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
new file mode 100644
index 0000000000..c8fcde45f4
--- /dev/null
+++ b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Perl modules useful for manipulating date and time information"
2SECTION = "libs"
3# You can redistribute it and/or modify it under the same terms as Perl itself.
4LICENSE = "Artistic-1.0 | GPL-1.0+"
5LIC_FILES_CHKSUM = "file://README;beginline=21;md5=576b7cb41e5e821501a01ed66f0f9d9e"
6
7SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.gz"
8
9S = "${WORKDIR}/TimeDate-${PV}"
10
11inherit cpan
12
13BBCLASSEXTEND = "native"
14
15RDEPENDS_${PN}_class-native = ""
16RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local"
17
18SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c"
19SRC_URI[sha256sum] = "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86"
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 0000000000..9a9e71011e
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Perl module for supporting simple generic namespaces"
2DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \
3 It also helps maintain a prefix-to-namespace URI map, and provides a number of \
4 basic checks. "
5
6SECTION = "libs"
7LICENSE = "Artistic-1.0 | GPL-1.0+"
8PR = "r3"
9
10LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5"
11
12SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
13SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da"
14SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea"
15
16
17S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
18
19inherit cpan
20
21BBCLASSEXTEND="native"
22
diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
new file mode 100644
index 0000000000..14a337057e
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Base class SAX Drivers and Filters"
2DESCRIPTION = "This module has a very simple task - to be a base class for \
3PerlSAX drivers and filters. It's default behaviour is to pass \
4the input directly to the output unchanged. It can be useful to \
5use this module as a base class so you don't have to, for example, \
6implement the characters() callback."
7
8SECTION = "libs"
9LICENSE = "Artistic-1.0 | GPL-1.0+"
10RDEPENDS_${PN} += "perl-module-extutils-makemaker"
11
12LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446"
13
14SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz"
15
16SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32"
17SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e"
18
19S = "${WORKDIR}/XML-SAX-Base-${PV}"
20
21inherit cpan
22
23BBCLASSEXTEND = "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 0000000000..45d396639b
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Perl module for using and building Perl SAX2 XML processors"
2DESCRIPTION = "XML::SAX consists of several framework classes for using and \
3building Perl SAX2 XML parsers, filters, and drivers. It is designed \
4around the need to be able to "plug in" different SAX parsers to an \
5application without requiring programmer intervention. Those of you \
6familiar with the DBI will be right at home. Some of the designs \
7come from the Java JAXP specification (SAX part), only without the \
8javaness."
9
10SECTION = "libs"
11LICENSE = "Artistic-1.0 | GPL-1.0+"
12DEPENDS += "libxml-namespacesupport-perl-native"
13RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp"
14PR = "r2"
15
16LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3"
17
18SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz"
19
20SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24"
21SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84"
22
23S = "${WORKDIR}/XML-SAX-${PV}"
24
25inherit cpan
26
27BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 0000000000..355fb2a4ec
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,32 @@
1SUMMARY = "A parallel implementation of gzip"
2DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
3fully functional replacement for gzip that exploits multiple processors and \
4multiple cores to the hilt when compressing data. pigz was written by Mark \
5Adler, and uses the zlib and pthread libraries."
6HOMEPAGE = "http://zlib.net/pigz/"
7SECTION = "console/utils"
8LICENSE = "Zlib"
9
10SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz"
11
12PROVIDES_class-native += "gzip-native"
13
14DEPENDS = "zlib"
15
16do_install () {
17 if [ "${CLASSOVERRIDE}" = "class-target" ] ; then
18 # Install files into /bin (FHS), which is typical place for gzip
19 install -d ${D}${base_bindir}
20 install ${B}/pigz ${D}${base_bindir}/gzip
21 install ${B}/unpigz ${D}${base_bindir}/gunzip
22 else
23 install -d ${D}${bindir}
24 install ${B}/pigz ${D}${bindir}/gzip
25 install ${B}/unpigz ${D}${bindir}/gunzip
26 fi
27}
28
29ALTERNATIVE_${PN} = "gzip gunzip"
30ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
31ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
32ALTERNATIVE_PRIORITY = "80"
diff --git a/meta/recipes-extended/pigz/pigz_2.3.1.bb b/meta/recipes-extended/pigz/pigz_2.3.1.bb
new file mode 100644
index 0000000000..cd5508d63e
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.3.1.bb
@@ -0,0 +1,10 @@
1require pigz.inc
2LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
3
4SRC_URI[md5sum] = "e803f8bc0770c7a5e96dccb1d2dd2aab"
5SRC_URI[sha256sum] = "629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54"
6
7NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
8
9BBCLASSEXTEND = "native nativesdk"
10
diff --git a/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
new file mode 100644
index 0000000000..203ccb3347
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch
@@ -0,0 +1,54 @@
1## 60_linux_init.dpatch by <david.sugar@canonical.com>
2##
3## All lines beginning with `## DP:' are a description of the patch.
4## DP: Fix Linux version detection which relied on elf loader side-effect.
5## DP: This patch also depends on 40_gnu-kbsd-version, which modified
6## DP: init_Linux_version().
7
8@DPATCH@
9
10Upstream-Status: inappropriate [upstream unmaintained]
11---
12 proc/sysinfo.c | 1 +
13 proc/version.c | 5 +++--
14 proc/version.h | 1 +
15 3 files changed, 5 insertions(+), 2 deletions(-)
16
17Index: procps-3.2.8/proc/sysinfo.c
18===================================================================
19--- procps-3.2.8.orig/proc/sysinfo.c
20+++ procps-3.2.8/proc/sysinfo.c
21@@ -212,6 +212,7 @@ static int check_for_privs(void){
22 static void init_libproc(void) __attribute__((constructor));
23 static void init_libproc(void){
24 have_privs = check_for_privs();
25+ init_Linux_version(); // make sure we have version before continuing...
26 // ought to count CPUs in /proc/stat instead of relying
27 // on glibc, which foolishly tries to parse /proc/cpuinfo
28 //
29Index: procps-3.2.8/proc/version.c
30===================================================================
31--- procps-3.2.8.orig/proc/version.c
32+++ procps-3.2.8/proc/version.c
33@@ -33,8 +33,7 @@ void display_version(void) {
34
35 int linux_version_code;
36
37-static void init_Linux_version(void) __attribute__((constructor));
38-static void init_Linux_version(void) {
39+void init_Linux_version(void) {
40 int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
41 FILE *fp;
42 char buf[256];
43Index: procps-3.2.8/proc/version.h
44===================================================================
45--- procps-3.2.8.orig/proc/version.h
46+++ procps-3.2.8/proc/version.h
47@@ -14,6 +14,7 @@
48
49 EXTERN_C_BEGIN
50
51+extern void init_Linux_version(void); /* initialize linux version */
52 extern void display_version(void); /* display suite version */
53 extern const char procps_version[]; /* global buf for suite version */
54
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 0000000000..2582857e25
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch
@@ -0,0 +1,44 @@
1Upstream-Status: Inappropriate [not author, no upstream]
2
3Imported from Debian.
4Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50
5Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749
6
7Stops procps utilities from printing a warning when used with
8kernels having only two digit versions, e.g. 3.0.
9
10Author: <csmall@debian.org>
11Description: Rework version parsing so its ok with other OSes
12--- a/proc/version.c
13+++ b/proc/version.c
14@@ -35,15 +35,23 @@
15
16 static void init_Linux_version(void) __attribute__((constructor));
17 static void init_Linux_version(void) {
18- static struct utsname uts;
19- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
20+ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */
21+ FILE *fp;
22+ char buf[256];
23
24- if (uname(&uts) == -1) /* failure implies impending death */
25- exit(1);
26- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
27+ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
28+ exit(1);
29+ if (fgets(buf, 256, fp) == NULL) {
30+ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
31+ fclose(fp);
32+ exit(1);
33+ }
34+ fclose(fp);
35+ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
36 fprintf(stderr, /* *very* unlikely to happen by accident */
37 "Non-standard uts for running kernel:\n"
38- "release %s=%d.%d.%d gives version code %d\n",
39- uts.release, x, y, z, LINUX_VERSION(x,y,z));
40+ "release %s=%d.%d.%d gives version code %d\n",
41+ buf,
42+ x, y, z, LINUX_VERSION(x,y,z));
43 linux_version_code = LINUX_VERSION(x, y, z);
44 }
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 0000000000..2a59a5ff68
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/install.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Inappropriate [configuration]
2
3diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile
4--- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800
5+++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800
6@@ -29,9 +29,6 @@
7 ln_sf := ln -sf
8 install := install -D --owner 0 --group 0
9
10-# Lame x86-64 /lib64 and /usr/lib64 abomination:
11-lib64 := lib$(shell [ -d /lib64 ] && echo 64)
12-
13 usr/bin := $(DESTDIR)/usr/bin/
14 bin := $(DESTDIR)/bin/
15 sbin := $(DESTDIR)/sbin/
16@@ -39,8 +36,8 @@
17 man1 := $(DESTDIR)/usr/share/man/man1/
18 man5 := $(DESTDIR)/usr/share/man/man5/
19 man8 := $(DESTDIR)/usr/share/man/man8/
20-lib := $(DESTDIR)/$(lib64)/
21-usr/lib := $(DESTDIR)/usr/$(lib64)/
22+lib := $(DESTDIR)/$(base_libdir)/
23+usr/lib := $(DESTDIR)/$(libdir)/
24 usr/include := $(DESTDIR)/usr/include/
25
26 #SKIP := $(bin)kill $(man1)kill.1
27@@ -222,10 +219,10 @@
28 ###### install
29
30 $(BINFILES) : all
31- $(install) --mode a=rx $(notdir $@) $@
32+ $(install) -m 555 $(notdir $@) $@
33
34 $(MANFILES) : all
35- $(install) --mode a=r $(notdir $@) $@
36+ $(install) -m 444 $(notdir $@) $@
37
38 install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
39 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 0000000000..2ca972482d
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Pending
2
3diff --git a/pwdx.c b/pwdx.c
4index cb96a52..29ebce2 100644
5--- a/pwdx.c
6+++ b/pwdx.c
7@@ -13,7 +13,7 @@
8 #include <stdlib.h>
9 #include <sys/types.h>
10 #include <regex.h>
11-#include <limits.h>
12+#include <linux/limits.h>
13 #include <unistd.h>
14 #include <errno.h>
15
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 0000000000..2a65c3509f
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procmodule.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Pending
2
3*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005
4--- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005
5***************
6*** 96,102 ****
7 #################### install rules ###########################
8
9 $(lib)$(SOFILE) : proc/$(SONAME)
10! $(install) --mode a=rx $< $@
11
12 ifneq ($(SOLINK),$(SOFILE))
13 .PHONY: $(lib)$(SOLINK)
14--- 96,102 ----
15 #################### install rules ###########################
16
17 $(lib)$(SOFILE) : proc/$(SONAME)
18! $(install) -m 555 $< $@
19
20 ifneq ($(SOLINK),$(SOFILE))
21 .PHONY: $(lib)$(SOLINK)
22***************
23*** 115,121 ****
24 $(ldconfig)
25
26 $(usr/lib)$(ANAME) : proc/$(ANAME)
27! $(install) --mode a=r $< $@
28
29 # Junk anyway... supposed to go in /usr/include/$(NAME)
30 #INSTALL += $(addprefix $(include),$(HDRFILES))
31--- 115,121 ----
32 $(ldconfig)
33
34 $(usr/lib)$(ANAME) : proc/$(ANAME)
35! $(install) -m 444 $< $@
36
37 # Junk anyway... supposed to go in /usr/include/$(NAME)
38 #INSTALL += $(addprefix $(include),$(HDRFILES))
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
new file mode 100644
index 0000000000..0306c8d639
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch
@@ -0,0 +1,111 @@
1Upstream-Status: Pending
2
3fix that top will quit after cpu offline
4
5top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot
6is still the original cpu numbers when calling cpus_refresh, in which
7it is trying to read and sscanf Cpu_tot times /proc/stat.
8
9The patch is from procps-3.2.8-2.fc12.src.rpm
10
11Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
12
13---
14--- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
15+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
16@@ -912,6 +912,7 @@
17 static CPU_t *cpus_refresh (CPU_t *cpus)
18 {
19 static FILE *fp = NULL;
20+ static int cpu_max;
21 int i;
22 int num;
23 // enough for a /proc/stat CPU line (not the intr line)
24@@ -926,24 +927,29 @@
25 can hold tics representing the /proc/stat cpu summary (the first
26 line read) -- that slot supports our View_CPUSUM toggle */
27 cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
28+ cpu_max = Cpu_tot;
29 }
30+ else if (cpu_max > Cpu_tot)
31+ /* move saved CUPs summary to cpu_max possition */
32+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
33+
34 rewind(fp);
35 fflush(fp);
36
37 // first value the last slot with the cpu summary line
38 if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
39- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
40- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
41- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
42+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
43+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
44+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
45 num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
46- &cpus[Cpu_tot].u,
47- &cpus[Cpu_tot].n,
48- &cpus[Cpu_tot].s,
49- &cpus[Cpu_tot].i,
50- &cpus[Cpu_tot].w,
51- &cpus[Cpu_tot].x,
52- &cpus[Cpu_tot].y,
53- &cpus[Cpu_tot].z
54+ &cpus[cpu_max].u,
55+ &cpus[cpu_max].n,
56+ &cpus[cpu_max].s,
57+ &cpus[cpu_max].i,
58+ &cpus[cpu_max].w,
59+ &cpus[cpu_max].x,
60+ &cpus[cpu_max].y,
61+ &cpus[cpu_max].z
62 );
63 if (num < 4)
64 std_err("failed /proc/stat read");
65@@ -955,7 +961,7 @@
66 }
67
68 // now value each separate cpu's tics
69- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
70+ for (i = 0; ; i++) {
71 if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
72 cpus[i].x = 0; // FIXME: can't tell by kernel version number
73 cpus[i].y = 0; // FIXME: can't tell by kernel version number
74@@ -964,9 +970,35 @@
75 &cpus[i].id,
76 &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
77 );
78- if (num < 4)
79- std_err("failed /proc/stat read");
80+ if (num < 4) {
81+ Cpu_tot = i;
82+ break;
83+ }
84+ if (i == cpu_max - 1) {
85+ // Bump cpu_max and extend cpus
86+ cpu_max++;
87+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
88+ if (!cpus) std_err("realloc failed");
89+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
90+ }
91+ }
92+
93+ if (cpu_max > Cpu_tot)
94+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
95+
96+ // and just in case we're 2.2.xx compiled without SMP support...
97+ if (Cpu_tot == 1) {
98+ cpus[0].id = cpus[1].id = 0;
99+ cpus[0].u = cpus[1].u;
100+ cpus[0].n = cpus[1].n;
101+ cpus[0].s = cpus[1].s;
102+ cpus[0].i = cpus[1].i;
103+ cpus[0].w = cpus[1].w;
104+ cpus[0].x = cpus[1].x;
105+ cpus[0].y = cpus[1].y;
106+ cpus[0].z = cpus[1].z;
107 }
108+
109 return cpus;
110 }
111
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 0000000000..c8cee26eac
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch
@@ -0,0 +1,19 @@
1Upstream-Status: Backport
2
3Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla:
4http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1
5
6Index: procps-3.2.8/Makefile
7===================================================================
8--- procps-3.2.8.orig/Makefile
9+++ procps-3.2.8/Makefile
10@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
11 # want this rule first, use := on ALL, and ALL not filled in yet
12 all: do_all
13
14--include */module.mk
15+-include proc/module.mk
16+-include ps/module.mk
17
18 do_all: $(ALL)
19
diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
new file mode 100644
index 0000000000..1a294142f5
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch
@@ -0,0 +1,82 @@
1From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001
2From: Daniel Novotny <dnovotny@fedoraproject.org>
3Date: Mon, 16 Feb 2009 12:22:20 +0000
4Subject: add cgroup support
5
6Rebased for 3.2.8: Andrei Gherzan <andrei.gherzan@windriver.com>
7
8Upstream-Status: Pending
9
10The patch was imported from the meta-ivi repository
11(git://git.yoctoproject.org/meta-ivi) as of commit id
1274b9624fe94b2b90810717a13d481b0db9d2d95a
13
14Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
15
16Index: procps-3.2.8/ps/output.c
17===================================================================
18--- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200
19+++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200
20@@ -1099,6 +1099,39 @@
21 return snprintf(outbuf, COLWID, "*");
22 }
23
24+static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){
25+ char filename[48];
26+ FILE *fd;
27+ int counter = 0;
28+ int c;
29+ int is_cgroup = 0;
30+
31+ outbuf[0]='\0';
32+ snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid);
33+ fd = fopen(filename, "r");
34+ if (likely(fd == NULL)) goto fail;
35+ while (( (c = fgetc(fd)) != EOF) && (counter<665)) {
36+ if (is_cgroup == 0) {
37+ if (c == ':') {
38+ is_cgroup = 1;
39+ if (counter>0)
40+ outbuf[counter++]=';';
41+ }
42+ }else
43+ if ((c == '\n') || (c == '\0'))
44+ is_cgroup = 0;
45+ else
46+ outbuf[counter++]=c;
47+ }
48+ outbuf[counter]='\0';
49+ close(fd);
50+ if (counter>0)
51+ return counter;
52+fail:
53+ outbuf[0] = '-';
54+ outbuf[1] = '\0';
55+ return 1;
56+}
57
58 /****************** FLASK & seLinux security stuff **********************/
59 // move the bulk of this to libproc sometime
60@@ -1293,6 +1326,7 @@
61 {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT},
62 {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT},
63 {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/
64+{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/
65 {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT},
66 {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/
67 {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT},
68Index: procps-3.2.8/ps/ps.1
69===================================================================
70--- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200
71+++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200
72@@ -904,6 +904,10 @@
73 displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR).
74 T}
75
76+cgroup CGROUP T{
77+display control groups to which the process belonges.
78+t}
79+
80 class CLS T{
81 scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR).
82 Field's possible values are:
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 0000000000..0775eaba26
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/psmodule.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Pending
2
3*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005
4--- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005
5***************
6*** 33,40 ****
7
8
9 $(bin)ps: ps/ps
10! $(install) --mode a=rx $< $@
11
12 $(man1)ps.1 : ps/ps.1
13! $(install) --mode a=r $< $@
14 -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
15--- 33,40 ----
16
17
18 $(bin)ps: ps/ps
19! $(install) -m 555 $< $@
20
21 $(man1)ps.1 : ps/ps.1
22! $(install) -m 444 $< $@
23 -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 0000000000..34e7488bf7
--- /dev/null
+++ b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf
@@ -0,0 +1,64 @@
1# This configuration file is taken from Debian.
2#
3# /etc/sysctl.conf - Configuration file for setting system variables
4# See sysctl.conf (5) for information.
5#
6
7#kernel.domainname = example.com
8
9# Uncomment the following to stop low-level messages on console
10#kernel.printk = 4 4 1 7
11
12##############################################################3
13# Functions previously found in netbase
14#
15
16# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
17# Turn on Source Address Verification in all interfaces to
18# prevent some spoofing attacks
19net.ipv4.conf.default.rp_filter=1
20net.ipv4.conf.all.rp_filter=1
21
22# Uncomment the next line to enable TCP/IP SYN cookies
23#net.ipv4.tcp_syncookies=1
24
25# Uncomment the next line to enable packet forwarding for IPv4
26#net.ipv4.ip_forward=1
27
28# Uncomment the next line to enable packet forwarding for IPv6
29#net.ipv6.conf.all.forwarding=1
30
31
32###################################################################
33# Additional settings - these settings can improve the network
34# security of the host and prevent against some network attacks
35# including spoofing attacks and man in the middle attacks through
36# redirection. Some network environments, however, require that these
37# settings are disabled so review and enable them as needed.
38#
39# Ignore ICMP broadcasts
40#net.ipv4.icmp_echo_ignore_broadcasts = 1
41#
42# Ignore bogus ICMP errors
43#net.ipv4.icmp_ignore_bogus_error_responses = 1
44#
45# Do not accept ICMP redirects (prevent MITM attacks)
46#net.ipv4.conf.all.accept_redirects = 0
47#net.ipv6.conf.all.accept_redirects = 0
48# _or_
49# Accept ICMP redirects only for gateways listed in our default
50# gateway list (enabled by default)
51# net.ipv4.conf.all.secure_redirects = 1
52#
53# Do not send ICMP redirects (we are not a router)
54#net.ipv4.conf.all.send_redirects = 0
55#
56# Do not accept IP source route packets (we are not a router)
57#net.ipv4.conf.all.accept_source_route = 0
58#net.ipv6.conf.all.accept_source_route = 0
59#
60# Log Martian Packets
61#net.ipv4.conf.all.log_martians = 1
62#
63
64#kernel.shmmax = 141762560
diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc
new file mode 100644
index 0000000000..da91da232d
--- /dev/null
+++ b/meta/recipes-extended/procps/procps.inc
@@ -0,0 +1,31 @@
1SUMMARY = "System and process monitoring utilities"
2DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
3the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill."
4HOMEPAGE = "http://procps.sf.net"
5SECTION = "base"
6LICENSE = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
8 file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \
9 file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \
10 file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812"
11DEPENDS = "ncurses"
12
13SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
14 file://install.patch"
15
16inherit autotools-brokensep update-alternatives
17
18do_install_append() {
19 mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN}
20}
21
22FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
23FILES_SOLIBSDEV = ""
24
25ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch"
26ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
27ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl"
28ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps"
29ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch"
30ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}"
31ALTERNATIVE_PRIORITY = "110"
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 0000000000..00632c32bb
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.2.8.bb
@@ -0,0 +1,36 @@
1require procps.inc
2
3PR = "r11"
4
5SRC_URI += "file://procmodule.patch \
6 file://psmodule.patch \
7 file://linux-limits.patch \
8 file://sysctl.conf \
9 file://procps-3.2.8+gmake-3.82.patch \
10 file://gnu-kbsd-version.patch \
11 file://60_linux_version_init.patch \
12 file://procps-3.2.7-top-remcpu.patch \
13 file://procps-3.2.8-ps-cgroup.patch \
14 "
15
16SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0"
17SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535"
18
19EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \
20 CPPFLAGS=-I${STAGING_INCDIR} \
21 LDFLAGS="${LDFLAGS}" \
22 CURSES=-lncurses \
23 install="install -D" \
24 ldconfig=echo'
25
26EXTRA_OEMAKE_append_p2041rdb = ' m64=-m32'
27EXTRA_OEMAKE_append_p4080ds = ' m64=-m32'
28EXTRA_OEMAKE_append_qemuppc = ' m64=-m32'
29
30
31do_install_append () {
32 install -d ${D}${sysconfdir}
33 install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
34}
35
36CONFFILES_${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 0000000000..68e06561f9
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc.inc
@@ -0,0 +1,44 @@
1SUMMARY = "Utilities for managing processes on your system"
2DESCRIPTION = "The psmisc package contains utilities for managing processes on your \
3system: pstree, killall and fuser. The pstree command displays a tree \
4structure of all of the running processes on your system. The killall \
5command sends a specified signal (SIGTERM if nothing is specified) to \
6processes identified by name. The fuser command identifies the PIDs \
7of processes that are using specified files or filesystems."
8SECTION = "base"
9DEPENDS = "ncurses virtual/libintl"
10LICENSE = "GPLv2"
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz"
13
14S = "${WORKDIR}/psmisc-${PV}"
15
16inherit autotools gettext
17
18ALLOW_EMPTY_${PN} = "1"
19
20PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc"
21PACKAGES += "psmisc-extras"
22
23FILES_${PN} = ""
24RDEPENDS_${PN} = "fuser killall pstree"
25
26FILES_fuser = "${bindir}/fuser.${BPN}"
27FILES_fuser-doc = "${mandir}/man1/fuser*"
28
29FILES_killall = "${bindir}/killall.${BPN}"
30FILES_killall-doc = "${mandir}/man1/killall*"
31
32FILES_pstree = "${bindir}/pstree"
33FILES_pstree-doc = "${mandir}/man1/pstree*"
34
35FILES_psmisc-extras = "${bindir}"
36FILES_psmisc-extras-doc = "${mandir}"
37
38inherit update-alternatives
39
40ALTERNATIVE_PRIORITY = "90"
41
42ALTERNATIVE_killall = "killall"
43
44ALTERNATIVE_fuser = "fuser"
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb
new file mode 100644
index 0000000000..22f65c52be
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -0,0 +1,6 @@
1require psmisc.inc
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
4
5SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
6SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
new file mode 100644
index 0000000000..94dc3f5dff
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
@@ -0,0 +1,75 @@
1Upstream-status: Pending
2
3--- quota-tools.orig/configure.in
4+++ quota-tools/configure.in
5@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
6 AC_SUBST(NETLINKLIBS)
7
8 AC_SEARCH_LIBS(gethostbyname, nsl)
9-AC_MSG_CHECKING(for host_access in -lwrap)
10-AC_CACHE_VAL(ac_cv_lib_wrap_main,
11- saved_LIBS="$LIBS"
12- LIBS="$LIBS -lwrap"
13- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
14- #include <stdio.h>
15- #include <sys/types.h>
16- #include <sys/socket.h>
17- #include <netinet/in.h>
18- #include <tcpd.h>
19- struct request_info request;
20- int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
21- dnl We always restore LIBS as we add -lwrap in the next check
22- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
23- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
24- ])
25
26-if test ${ac_cv_lib_wrap_main} = yes; then
27- AC_CHECK_HEADER(tcpd.h,, [
28- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
29- exit 1
30- ])
31- LIBS="$LIBS -lwrap"
32- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
33- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
34+AC_ARG_WITH(tcpwrappers,
35+ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
36+ ,
37+ with_tcpwrappers="try")
38+
39+if test "x$with_tcpwrappers" != xno; then
40+ AC_MSG_CHECKING(for host_access in -lwrap)
41+ AC_CACHE_VAL(ac_cv_lib_wrap_main,
42+ saved_LIBS="$LIBS"
43+ LIBS="$LIBS -lwrap"
44+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
45+ #include <stdio.h>
46+ #include <sys/types.h>
47+ #include <sys/socket.h>
48+ #include <netinet/in.h>
49+ #include <tcpd.h>
50+ struct request_info request;
51+ int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
52+ dnl We always restore LIBS as we add -lwrap in the next try
53+ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
54+ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
55+ ])
56+
57+ if test "x$ac_cv_lib_wrap_main" = xyes; then
58+ AC_CHECK_HEADER(tcpd.h,, [
59+ if test "x$with_tcpwrappers" != xtry; then
60+ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
61+ fi
62+ ])
63+
64+ LIBS="$LIBS -lwrap"
65+ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
66+ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
67+ elif test "x$with_tcpwrappers" != xtry; then
68+ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
69+ fi
70 fi
71
72+
73 dnl Checks for typedefs, structures, and compiler characteristics.
74 AC_C_CONST
75 AC_C_INLINE
diff --git a/meta/recipes-extended/quota/quota_4.01.bb b/meta/recipes-extended/quota/quota_4.01.bb
new file mode 100644
index 0000000000..82f7899690
--- /dev/null
+++ b/meta/recipes-extended/quota/quota_4.01.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
2SECTION = "base"
3HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
4BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
5LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
7 file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
8 file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
9PR = "r1"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
12 file://config-tcpwrappers.patch"
13
14SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6"
15SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206"
16
17S = "${WORKDIR}/quota-tools"
18
19DEPENDS = "gettext-native e2fsprogs"
20
21inherit autotools-brokensep gettext pkgconfig
22
23EXTRA_OEMAKE += 'STRIP=""'
24
25PACKAGECONFIG ??= "tcp-wrappers"
26PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers"
27
28do_install() {
29 oe_runmake prefix=${D}${prefix} install
30}
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
new file mode 100644
index 0000000000..b556a46347
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
@@ -0,0 +1,34 @@
1From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001
2From: Steve Dickson <steved@redhat.com>
3Date: Wed, 21 Aug 2013 14:40:22 -0400
4Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am
5
6Upstream-Status: backport
7
8Commit 8d7a0708 cause a regression where the rpcuser id was not
9being set, which in turn cause rpcbind to immediately exit.
10This patch removes the extra ',' that was in the AC_ARG_WITH
11statement in the configure.ac file.
12
13Signed-off-by: Steve Dickson <steved@redhat.com>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 configure.ac | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index 2b67720..1cf42d3 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
24 AC_SUBST([statedir], [$with_statedir])
25
26 AC_ARG_WITH([rpcuser],
27- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
28+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
29 ,, [with_rpcuser=root])
30 AC_SUBST([rpcuser], [$with_rpcuser])
31
32--
331.8.3.2
34
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
new file mode 100644
index 0000000000..afa55f3b76
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Pending
2
3From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001
4From: Natanael Copa <ncopa@alpinelinux.org>
5Date: Tue, 2 Feb 2010 09:36:03 +0000
6Subject: [PATCH 1/2] uclibc-nss
7
8---
9 src/rpcbind.c | 4 ++++
10 1 files changed, 4 insertions(+), 0 deletions(-)
11
12diff --git a/src/rpcbind.c b/src/rpcbind.c
13index 525ffba..1fe1a60 100644
14--- a/src/rpcbind.c
15+++ b/src/rpcbind.c
16@@ -67,7 +67,11 @@
17 #include <pwd.h>
18 #include <string.h>
19 #include <errno.h>
20+#if defined(__UCLIBC__)
21+#define __nss_configure_lookup(x,y)
22+#else
23 #include <nss.h>
24+#endif
25 #include "config.h"
26 #include "rpcbind.h"
27
28--
291.6.6.1
30
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
new file mode 100644
index 0000000000..c54fc96fc0
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
@@ -0,0 +1,60 @@
1Upstream-Status: Pending
2
3From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001
4From: Natanael Copa <ncopa@alpinelinux.org>
5Date: Tue, 2 Feb 2010 09:47:57 +0000
6Subject: [PATCH 2/2] uclibc-rpcsvc-defines
7
8---
9 src/security.c | 28 ++++++++++++++++++++++++++++
10 1 files changed, 28 insertions(+), 0 deletions(-)
11
12diff --git a/src/security.c b/src/security.c
13index 0edeac6..e9fed55 100644
14--- a/src/security.c
15+++ b/src/security.c
16@@ -20,6 +20,32 @@
17 /*
18 * XXX for special case checks in check_callit.
19 */
20+#if defined(__UCLIBC__)
21+
22+#define MOUNTPROC_MNT 1
23+#define MOUNTPROC_UMNT 3
24+
25+#define NFS_PROGRAM 100003
26+#define YPPROG 100004
27+#define MOUNTPROG 100005
28+#define YPBINDPROG 100007
29+#define YPPASSWDPROG 100009
30+#define RQUOTAPROG 100011
31+
32+#define YPPROC_NULL 0
33+#define YPPROC_DOMAIN 1
34+#define YPPROC_DOMAIN_NONACK 2
35+#define YPPROC_MATCH 3
36+#define YPPROC_FIRST 4
37+#define YPPROC_NEXT 5
38+#define YPPROC_XFR 6
39+#define YPPROC_CLEAR 7
40+#define YPPROC_ALL 8
41+
42+#define YPBINDPROC_SETDOM 2
43+
44+#else
45+
46 #include <rpcsvc/mount.h>
47 #include <rpcsvc/rquota.h>
48 #include <rpcsvc/nfs_prot.h>
49@@ -27,6 +53,8 @@
50 #include <rpcsvc/ypclnt.h>
51 #include <rpcsvc/yppasswd.h>
52
53+#endif
54+
55 #include "rpcbind.h"
56
57 #ifdef LIBWRAP
58--
591.6.6.1
60
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
new file mode 100644
index 0000000000..67499aa828
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -0,0 +1,87 @@
1#!/bin/sh
2#
3# start/stop rpcbind daemon.
4
5### BEGIN INIT INFO
6# Provides: rpcbind
7# Required-Start: $network
8# Required-Stop: $network
9# Default-Start: S 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: RPC portmapper replacement
12# Description: rpcbind is a server that converts RPC (Remote
13# Procedure Call) program numbers into DARPA
14# protocol port numbers. It must be running in
15# order to make RPC calls. Services that use
16# RPC include NFS and NIS.
17### END INIT INFO
18
19# Source function library.
20. /etc/init.d/functions
21
22test -f /sbin/rpcbind || exit 0
23
24OPTIONS=""
25if [ -f /etc/default/rpcbind ]
26then
27 . /etc/default/rpcbind
28elif [ -f /etc/rpcbind.conf ]
29then
30 . /etc/rpcbind.conf
31fi
32
33start ()
34{
35 echo -n "Starting rpcbind daemon..."
36 if pidof /sbin/rpcbind >/dev/null; then
37 echo "already running."
38 exit 0
39 fi
40 start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@"
41 if [ $? -eq 0 ]; then
42 echo "done."
43 else
44 echo "failed."
45 fi
46}
47
48stop ()
49{
50 echo "Stopping rpcbind daemon..."
51 if ! pidof /sbin/rpcbind >/dev/null; then
52 echo "not running."
53 return 0
54 fi
55 start-stop-daemon --stop --quiet --exec /sbin/rpcbind
56 if [ $? -eq 0 ]; then
57 echo "done."
58 else
59 echo "failed."
60 fi
61}
62
63case "$1" in
64 start)
65 start $OPTIONS
66 ;;
67 stop)
68 stop
69 ;;
70 force-reload)
71 stop
72 start $OPTIONS
73 ;;
74 restart)
75 stop
76 start $OPTIONS
77 ;;
78 status)
79 status /sbin/rpcbind
80 ;;
81 *)
82 echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
83 exit 1
84 ;;
85esac
86
87exit $?
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
new file mode 100644
index 0000000000..2a4dfbcfbc
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -0,0 +1,3 @@
1# Optional arguments passed to rpcbind.
2#
3RPCBIND_OPTS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
new file mode 100644
index 0000000000..4de28d4ae1
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=RPC Bind
3After=network.target
4Wants=rpcbind.target
5Before=rpcbind.target
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
10ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
11Restart=always
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
new file mode 100644
index 0000000000..23219e01bd
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
@@ -0,0 +1,63 @@
1SUMMARY = "Universal Addresses to RPC Program Number Mapper"
2DESCRIPTION = "The rpcbind utility is a server that converts RPC \
3 program numbers into universal addresses."
4SECTION = "console/network"
5HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
7DEPENDS = "libtirpc quota"
8
9LICENSE = "BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
14 file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \
15 file://init.d \
16 ${UCLIBCPATCHES} \
17 file://rpcbind.conf \
18 file://rpcbind.service \
19 "
20
21UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
22 file://0002-uclibc-rpcsvc-defines.patch \
23 "
24UCLIBCPATCHES ?= ""
25
26SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68"
27SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e"
28
29inherit autotools update-rc.d systemd
30
31PACKAGECONFIG ??= "tcp-wrappers"
32PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
33
34INITSCRIPT_NAME = "rpcbind"
35INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
36
37SYSTEMD_SERVICE_${PN} = "rpcbind.service"
38SYSTEMD_AUTO_ENABLE = "disable"
39
40inherit useradd
41
42USERADD_PACKAGES = "${PN}"
43USERADD_PARAM_${PN} = "--system --no-create-home \
44 --shell /bin/false --user-group rpc"
45
46EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
47
48do_install_append () {
49 mv ${D}${bindir} ${D}${sbindir}
50
51 install -d ${D}${sysconfdir}/init.d
52 sed -e 's,/etc/,${sysconfdir}/,g' \
53 -e 's,/sbin/,${sbindir}/,g' \
54 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
55 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
56
57 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
60 sed -i -e 's,@SBINDIR@,${sbindir},g' \
61 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
62 ${D}${systemd_unitdir}/system/rpcbind.service
63}
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 0000000000..e29bcc6639
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/configure.patch
@@ -0,0 +1,979 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3# The patch is borrowed from OE:
4# http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=4ee790cc6974bdfe1c9b06c0567b1c56f56d6615
5# and was rebased to screen-4.0.3's configure.in
6# by Dexuan Cui (dexuan.cui@intel.com).
7#
8# The description of the original patch is:
9#
10# Patch by Hannes Reich (hannes@skynet.ie) 22-Jul-2005
11# Resolves _some_ of the cross-compilation issues in screen's configure.in
12#
13diff --git a/configure.in b/configure.in
14index 34c9372..d5ed48a 100644
15--- a/configure.in
16+++ b/configure.in
17@@ -37,6 +37,325 @@ pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVE
18 VERSION="$rev.$vers.$pat"
19 AC_NOTE(this is screen version $VERSION)
20 AC_SUBST(VERSION)
21+
22+AH_TOP([
23+/* Copyright (c) 1993-2000
24+ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
25+ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
26+ * Copyright (c) 1987 Oliver Laumann
27+ *
28+ * This program is free software; you can redistribute it and/or modify
29+ * it under the terms of the GNU General Public License as published by
30+ * the Free Software Foundation; either version 2, or (at your option)
31+ * any later version.
32+ *
33+ * This program is distributed in the hope that it will be useful,
34+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
35+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36+ * GNU General Public License for more details.
37+ *
38+ * You should have received a copy of the GNU General Public License
39+ * along with this program (see the file COPYING); if not, write to the
40+ * Free Software Foundation, Inc.,
41+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
42+ *
43+ */
44+
45+
46+/**********************************************************************
47+ *
48+ * User Configuration Section
49+ */
50+
51+/*
52+ * Maximum of simultaneously allowed windows per screen session.
53+ */
54+#ifndef MAXWIN
55+# define MAXWIN 40
56+#endif
57+
58+/*
59+ * Define SOCKDIR to be the directory to contain the named sockets
60+ * screen creates. This should be in a common subdirectory, such as
61+ * /usr/local or /tmp. It makes things a little more secure if you
62+ * choose a directory which is not writable by everyone or where the
63+ * "sticky" bit is on, but this isn't required.
64+ * If SOCKDIR is not defined screen will put the named sockets in
65+ * the user's home directory. Notice that this can cause you problems
66+ * if some user's HOME directories are AFS- or NFS-mounted. Especially
67+ * AFS is unlikely to support named sockets.
68+ *
69+ * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison).
70+ */
71+#undef SOCKDIR
72+
73+/*
74+ * Define this if the SOCKDIR is not shared between hosts.
75+ */
76+#define SOCKDIR_IS_LOCAL_TO_HOST
77+
78+/*
79+ * Screen sources two startup files. First a global file with a path
80+ * specified here, second your local $HOME/.screenrc
81+ * Don't define this, if you don't want it.
82+ */
83+#ifndef ETCSCREENRC
84+# define ETCSCREENRC "/usr/local/etc/screenrc"
85+#endif
86+
87+/*
88+ * Screen can look for the environment variable $SYSSCREENRC and -if it
89+ * exists- load the file specified in that variable as global screenrc.
90+ * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1).
91+ * Otherwise ETCSCREENRC is always loaded.
92+ */
93+#define ALLOW_SYSSCREENRC 1
94+
95+/*
96+ * Screen needs encoding files for the translation of utf8
97+ * into some encodings, e.g. JIS, BIG5.
98+ * Only needed if FONT, ENCODINGS and UTF8 are defined.
99+ */
100+#ifndef SCREENENCODINGS
101+# define SCREENENCODINGS "/usr/local/lib/screen/encodings"
102+#endif
103+/*
104+ * Define CHECKLOGIN to force Screen users to enter their Unix password
105+ * in addition to the screen password.
106+ *
107+ * Define NOSYSLOG if yo do not have logging facilities. Currently
108+ * syslog() will be used to trace ``su'' commands only.
109+ */
110+#define CHECKLOGIN 1
111+#undef NOSYSLOG
112+
113+
114+/*
115+ * define PTYMODE if you do not like the default of 0622, which allows
116+ * public write to your pty.
117+ * define PTYGROUP to some numerical group-id if you do not want the
118+ * tty to be in "your" group.
119+ * Note, screen is unable to change mode or group of the pty if it
120+ * is not installed with sufficient privilege. (e.g. set-uid-root)
121+ * define PTYROFS if the /dev/pty devices are mounted on a read-only
122+ * filesystem so screen should not even attempt to set mode or group
123+ * even if running as root (e.g. on TiVo).
124+ */
125+#undef PTYMODE
126+#undef PTYGROUP
127+#undef PTYROFS
128+
129+/*
130+ * If screen is NOT installed set-uid root, screen can provide tty
131+ * security by exclusively locking the ptys. While this keeps other
132+ * users from opening your ptys, it also keeps your own subprocesses
133+ * from being able to open /dev/tty. Define LOCKPTY to add this
134+ * exclusive locking.
135+ */
136+#undef LOCKPTY
137+
138+/*
139+ * If you'd rather see the status line on the first line of your
140+ * terminal rather than the last, define TOPSTAT.
141+ */
142+#undef TOPSTAT
143+
144+/*
145+ * define DETACH can detach a session. An absolute 'must'.
146+ */
147+#define DETACH
148+
149+/*
150+ * here come the erlangen extensions to screen:
151+ * define LOCK if you want to use a lock program for a screenlock.
152+ * define PASSWORD for secure reattach of your screen.
153+ * define COPY_PASTE to use the famous hacker's treasure zoo.
154+ * define POW_DETACH to have a detach_and_logout key (requires DETACH).
155+ * define REMOTE_DETACH (-d option) to move screen between terminals.
156+ * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking
157+ * define PSEUDOS to allow window input/output filtering
158+ * define MULTI to allow multiple attaches.
159+ * define MULTIUSER to allow other users attach to your session
160+ * (if they are in the acl, of course)
161+ * define MAPKEYS to include input keyboard translation.
162+ * define FONT to support ISO2022/alternet charset support
163+ * define COLOR to include ansi color support. This may expose
164+ * a bug in x11r6-color-xterm.
165+ * define DW_CHARS to include support for double-width character
166+ * sets.
167+ * define ENCODINGS to include support for encodings like euc or big5.
168+ * Needs FONT to work.
169+ * define UTF8 if you want support for UTF-8 encoding.
170+ * Needs FONT and ENCODINGS to work.
171+ * define COLORS16 if you want 16 colors.
172+ * Needs COLOR to work.
173+ * define BUILTIN_TELNET to add telnet support to screen.
174+ * Syntax: screen //telnet host [port]
175+ * define RXVT_OSC if you want support for rxvts special
176+ * change fgcolor/bgcolor/bgpicture sequences
177+ */
178+#undef SIMPLESCREEN
179+#ifndef SIMPLESCREEN
180+# define LOCK
181+# define PASSWORD
182+# define COPY_PASTE
183+# define REMOTE_DETACH
184+# define POW_DETACH
185+# define AUTO_NUKE
186+# define PSEUDOS
187+# define MULTI
188+# define MULTIUSER
189+# define MAPKEYS
190+# define COLOR
191+# define FONT
192+# define DW_CHARS
193+# define ENCODINGS
194+# define UTF8
195+# define COLORS16
196+# define ZMODEM
197+# define BLANKER_PRG
198+#endif /* SIMPLESCREEN */
199+
200+#undef BUILTIN_TELNET
201+#undef RXVT_OSC
202+#undef COLORS256
203+
204+
205+/*
206+ * If you have a braille display you should define HAVE_BRAILLE.
207+ * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi
208+ * Rangin (bargi@dots.physics.orst.edu).
209+ * WARNING: this is more or less unsupported code, it may be full of
210+ * bugs leading to security holes, enable at your own risk!
211+ */
212+#undef HAVE_BRAILLE
213+
214+
215+/*
216+ * As error messages are mostly meaningless to the user, we
217+ * try to throw out phrases that are somewhat more familiar
218+ * to ...well, at least familiar to us NetHack players.
219+ */
220+#ifndef NONETHACK
221+# define NETHACK
222+#endif /* NONETHACK */
223+
224+/*
225+ * If screen is installed with permissions to update /etc/utmp (such
226+ * as if it is installed set-uid root), define UTMPOK.
227+ */
228+#define UTMPOK
229+
230+/* Set LOGINDEFAULT to one (1)
231+ * if you want entries added to /etc/utmp by default, else set it to
232+ * zero (0).
233+ * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined!
234+ */
235+#define LOGINDEFAULT 1
236+
237+/* Set LOGOUTOK to one (1)
238+ * if you want the user to be able to log her/his windows out.
239+ * (Meaning: They are there, but not visible in /etc/utmp).
240+ * Disabling this feature only makes sense if you have a secure /etc/utmp
241+ * database.
242+ * Negative examples: suns usually have a world writable utmp file,
243+ * xterm will run perfectly without s-bit.
244+ *
245+ * If LOGOUTOK is undefined and UTMPOK is defined, all windows are
246+ * initially and permanently logged in.
247+ *
248+ * Set CAREFULUTMP to one (1) if you want that users have at least one
249+ * window per screen session logged in.
250+ */
251+#define LOGOUTOK 1
252+#undef CAREFULUTMP
253+
254+
255+/*
256+ * If UTMPOK is defined and your system (incorrectly) counts logins by
257+ * counting non-null entries in /etc/utmp (instead of counting non-null
258+ * entries with no hostname that are not on a pseudo tty), define USRLIMIT
259+ * to have screen put an upper-limit on the number of entries to write
260+ * into /etc/utmp. This helps to keep you from exceeding a limited-user
261+ * license.
262+ */
263+#undef USRLIMIT
264+
265+/*
266+ * both must be defined if you want to favor tcsendbreak over
267+ * other calls to generate a break condition on serial lines.
268+ * (Do not bother, if you are not using plain tty windows.)
269+ */
270+#define POSIX_HAS_A_GOOD_TCSENDBREAK
271+#define SUNOS4_AND_WE_TRUST_TCSENDBREAK
272+
273+/*
274+ * to lower the interrupt load on the host machine, you may want to
275+ * adjust the VMIN and VTIME settings used for plain tty windows.
276+ * See the termio(4) manual page (Non-Canonical Mode Input Processing)
277+ * for details.
278+ * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you
279+ * best user responsiveness, but highest interrupt frequency.
280+ * (Do not bother, if you are not using plain tty windows.)
281+ */
282+#define TTYVMIN 100
283+#define TTYVTIME 2
284+
285+/*
286+ * looks like the above values are ignored by setting FNDELAY.
287+ * This is default for all pty/ttys, you may disable it for
288+ * ttys here. After playing with it for a while, one may find out
289+ * that this feature may cause screen to lock up.
290+ */
291+#ifdef bsdi
292+# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */
293+#endif
294+
295+
296+/*
297+ * Some terminals, e.g. Wyse 120, use a bitfield to select attributes.
298+ * This doesn't work with the standard so/ul/m? terminal entries,
299+ * because they will cancel each other out.
300+ * On TERMINFO machines, "sa" (sgr) may work. If you want screen
301+ * to switch attributes only with sgr, define USE_SGR.
302+ * This is *not* recomended, do this only if you must.
303+ */
304+#undef USE_SGR
305+
306+
307+/*
308+ * Define USE_LOCALE if you want screen to use the locale names
309+ * for the name of the month and day of the week.
310+ */
311+#define USE_LOCALE
312+
313+/*
314+ * Define USE_PAM if your system supports PAM (Pluggable Authentication
315+ * Modules) and you want screen to use it instead of calling crypt().
316+ * (You may also need to add -lpam to LIBS in the Makefile.)
317+ */
318+#undef USE_PAM
319+
320+/*
321+ * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w
322+ * if the terminal width is greater than 131 columns. No longer needed
323+ * on modern systems which use $COLUMNS or the tty settings instead.
324+ */
325+#undef CHECK_SCREEN_W
326+
327+/**********************************************************************
328+ *
329+ * End of User Configuration Section
330+ *
331+ * Rest of this file is modified by 'configure'
332+ * Change at your own risk!
333+ *
334+ */
335+])
336+# end of AH_TOP
337+
338+AC_PREFIX_PROGRAM(screen)
339+AC_PREFIX_PROGRAM(gzip)
340 AC_PREFIX_PROGRAM(screen)
341 AC_PREFIX_PROGRAM(gzip)
342
343@@ -46,6 +365,7 @@ AC_PROG_CPP
344 AC_PROG_GCC_TRADITIONAL
345 AC_ISC_POSIX
346
347+AC_MSG_CHECKING([for compiler sanity])
348 AC_TRY_RUN(main(){exit(0);},,[
349 if test $CC != cc ; then
350 AC_NOTE(Your $CC failed - restarting with CC=cc)
351@@ -54,14 +374,9 @@ CC=cc
352 export CC
353 exec $0 $configure_args
354 fi
355-])
356+],AC_MSG_WARN([skipping test due to crosscompilation]))
357
358-AC_TRY_RUN(main(){exit(0);},,
359-exec 5>&2
360-eval $ac_link
361-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
362-AC_NOTE($ac_compile)
363-AC_MSG_ERROR(Can't run the compiler - sorry))
364+AC_MSG_CHECKING([if compiler sets exit status])
365
366 AC_TRY_RUN([
367 main()
368@@ -69,7 +384,8 @@ main()
369 int __something_strange_();
370 __something_strange_(0);
371 }
372-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
373+],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),,
374+AC_MSG_WARN(skipping test due to crosscompilation))
375
376 AC_PROG_AWK
377
378@@ -103,6 +419,7 @@ AC_ARG_ENABLE(socket-dir,
379 dnl
380 dnl **** special unix variants ****
381 dnl
382+AH_TEMPLATE(ISC,[])
383 if test -n "$ISC"; then
384 AC_DEFINE(ISC) LIBS="$LIBS -linet"
385 fi
386@@ -114,11 +431,13 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
387 dnl fi
388 dnl fi
389
390+AH_TEMPLATE([sysV68],[])
391 if test -f /sysV68 ; then
392 AC_DEFINE(sysV68)
393 fi
394
395 AC_CHECKING(for MIPS)
396+AH_TEMPLATE([MIPS],[])
397 if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
398 oldlibs="$LIBS"
399 test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha.
400@@ -132,6 +451,8 @@ AC_DEFINE(MIPS)
401 AC_CHECKING(wait3)
402 AC_TRY_LINK(,[wait3();], ,
403 AC_CHECKING(wait2)
404+AH_TEMPLATE([USE_WAIT2],[On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com])
405+dnl TODO(Hannes) shipped config.h.in wraps the define in #ifdef BSDWAIT
406 AC_TRY_LINK(,[wait2();],
407 dnl John Rouillard (rouilj@sni-usa.com):
408 dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no
409@@ -154,9 +475,11 @@ if test -f /usr/lib/libpyr.a ; then
410 oldlibs="$LIBS"
411 LIBS="$LIBS -lpyr"
412 AC_CHECKING(Pyramid OSX)
413+AH_TEMPLATE([OSX], [Pyramid OSX])
414 AC_TRY_LINK(,[open_controlling_pty("")], AC_DEFINE(OSX), LIBS="$oldlibs")
415 fi
416
417+AH_TEMPLATE([POSIX],[Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).])
418 dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
419 dnl BBN butterfly is not POSIX, but a MACH BSD system.
420 dnl Do not define POSIX and TERMIO.
421@@ -183,6 +506,7 @@ main () {
422 fi
423
424 AC_CHECKING(for System V)
425+AH_TEMPLATE([SYSV], [Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)])
426 AC_TRY_COMPILE(
427 [#include <sys/types.h>
428 #include <signal.h>
429@@ -198,6 +522,11 @@ AC_EGREP_CPP(yes,
430 oldlibs="$LIBS"
431 LIBS="$LIBS -lelf"
432 AC_CHECKING(SVR4)
433+AH_TEMPLATE([SVR4],[])
434+AH_TEMPLATE([BUGGYGETLOGIN],
435+[If ttyslot() breaks getlogin() by returning indexes to utmp entries
436+ of type DEAD_PROCESS, then our getlogin() replacement should be
437+ selected by defining BUGGYGETLOGIN.])
438 AC_TRY_LINK([#include <utmpx.h>
439 ],,
440 [AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
441@@ -235,6 +564,9 @@ dnl **** Job control ****
442 dnl
443
444 AC_CHECKING(BSD job jontrol)
445+AH_TEMPLATE([BSDJOBS],
446+[Define BSDJOBS if you have BSD-style job control (both process
447+ groups and a tty that deals correctly with them)])
448 AC_TRY_LINK(
449 [#include <sys/types.h>
450 #include <sys/ioctl.h>
451@@ -255,6 +587,10 @@ dnl
452 dnl **** setreuid(), seteuid() ****
453 dnl
454 AC_CHECKING(setreuid)
455+AH_TEMPLATE([HAVE_SETREUID],
456+[If your system has the calls setreuid() and setregid(),
457+ define HAVE_SETREUID. Otherwise screen will use a forked process to
458+ safely create output files without retaining any special privileges.])
459 AC_TRY_LINK(,[
460 #ifdef __hpux
461 setresuid(0, 0, 0);
462@@ -269,6 +605,9 @@ dnl NeXT, AUX, ISC, and ultrix are still broken (no saved uid support)
463 dnl Solaris seteuid doesn't change the saved uid, bad for
464 dnl multiuser screen sessions
465 AC_CHECKING(seteuid)
466+AH_TEMPLATE([HAVE_SETEUID],
467+[If your system supports BSD4.4's seteuid() and setegid(), define
468+ HAVE_SETEUID.])
469 AC_TRY_LINK(,[
470 #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
471 seteuid_is_broken(0);
472@@ -292,7 +631,8 @@ dnl
473 dnl **** FIFO tests ****
474 dnl
475
476-AC_CHECKING(fifos)
477+AC_CACHE_CHECK([usable fifos],
478+ [screen_cv_sys_fifo_usable],
479 AC_TRY_RUN([
480 #include <sys/types.h>
481 #include <sys/stat.h>
482@@ -357,12 +697,14 @@ main()
483 exit(1);
484 exit(0);
485 }
486-], AC_NOTE(- your fifos are usable) fifo=1,
487-AC_NOTE(- your fifos are not usable))
488-rm -f /tmp/conftest*
489-
490-if test -n "$fifo"; then
491-AC_CHECKING(for broken fifo implementation)
492+], screen_cv_sys_fifo_usable=yes, screen_cv_sys_fifo_usable=no))
493+
494+if test X"$screen_cv_sys_fifo_usable" = Xyes; then
495+AH_TEMPLATE([BROKEN_PIPE],
496+[Define this if your system exits select() immediatly if a pipe is
497+ opened read-only and no writer has opened it.])
498+AC_CACHE_CHECK([broken fifo implementation],
499+ [screen_cv_sys_fifo_broken_impl],
500 AC_TRY_RUN([
501 #include <sys/types.h>
502 #include <fcntl.h>
503@@ -407,9 +749,11 @@ main()
504 exit(1);
505 exit(0);
506 }
507-], AC_NOTE(- your implementation is ok),
508-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
509-rm -f /tmp/conftest*
510+], screen_cv_sys_fifo_broken_impl=no,
511+screen_cv_sys_fifo_broken_impl=yes))
512+if test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then
513+ AC_DEFINE(BROKEN_PIPE)
514+fi
515 fi
516
517 dnl
518@@ -418,7 +762,8 @@ dnl
519 dnl may need LIBS="$LIBS -lsocket" here
520 dnl
521
522-AC_CHECKING(sockets)
523+AC_CACHE_CHECK([sockets are usable],
524+ [screen_cv_sys_sockets_usable],
525 AC_TRY_RUN([
526 #include <sys/types.h>
527 #include <sys/socket.h>
528@@ -469,12 +814,16 @@ main()
529 exit(1);
530 exit(0);
531 }
532-], AC_NOTE(- your sockets are usable) sock=1,
533-AC_NOTE(- your sockets are not usable))
534-rm -f /tmp/conftest*
535+], screen_cv_sys_sockets_usable=yes,
536+screen_cv_sys_sockets_usable=no))
537
538-if test -n "$sock"; then
539+if test X"$screen_cv_sys_sockets_usable" = Xyes; then
540 AC_CHECKING(socket implementation)
541+AH_TEMPLATE([SOCK_NOT_IN_FS],
542+[Define this if the unix-domain socket implementation doesn't
543+ create a socket in the filesystem.])
544+AC_CACHE_CHECK([if sockets are not stored in the filesystem],
545+ [screen_cv_sys_sockets_nofs],
546 AC_TRY_RUN([
547 #include <sys/types.h>
548 #include <sys/stat.h>
549@@ -500,22 +849,25 @@ main()
550 close(s);
551 exit(0);
552 }
553-],AC_NOTE(- you are normal),
554-AC_NOTE(- unix domain sockets are not kept in the filesystem)
555-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
556-rm -f /tmp/conftest*
557+], screen_cv_sys_sockets_nofs=no,
558+screen_cv_sys_sockets_nofs=yes))
559+
560+if test X"$screen_cv_sys_sockets_nofs" = Xyes; then
561+ AC_DEFINE(SOCK_NOT_IN_FS)
562+fi
563 fi
564
565
566 dnl
567 dnl **** choose sockets or fifos ****
568 dnl
569-if test -n "$fifo"; then
570- if test -n "$sock"; then
571- if test -n "$nore"; then
572+AH_TEMPLATE([NAMEDPIPE], [Define this if your system supports named pipes.])
573+if test X"$screen_cv_sys_fifo_usable" = Xyes; then
574+ if test X"$screen_cv_sys_sockets_usable" = Xyes; then
575+ if test X"$screen_cv_sys_sockets_nofs" = Xyes; then
576 AC_NOTE(- hmmm... better take the fifos)
577 AC_DEFINE(NAMEDPIPE)
578- elif test -n "$fifobr"; then
579+ elif test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then
580 AC_NOTE(- as your fifos are broken lets use the sockets.)
581 else
582 AC_NOTE(- both sockets and fifos usable. let's take fifos.)
583@@ -525,7 +877,7 @@ if test -n "$fifo"; then
584 AC_NOTE(- using named pipes, of course)
585 AC_DEFINE(NAMEDPIPE)
586 fi
587-elif test -n "$sock"; then
588+elif test X"$screen_cv_sys_sockets_usable" = Xyes; then
589 AC_NOTE(- using unix-domain sockets, of course)
590 else
591 AC_MSG_ERROR(you have neither usable sockets nor usable pipes -> no screen)
592@@ -535,7 +887,11 @@ dnl
593 dnl **** check the select implementation ****
594 dnl
595
596-AC_CHECKING(select return value)
597+AH_TEMPLATE([SELECT_BROKEN],
598+[If the select return value doesn't treat a descriptor that is
599+ usable for reading and writing as two hits, define SELECT_BROKEN.])
600+AC_CACHE_CHECK([for broken select return value],
601+ [screen_cv_sys_select_broken_retval],
602 AC_TRY_RUN([
603 #include <sys/types.h>
604 #include <sys/stat.h>
605@@ -634,17 +990,26 @@ main()
606 exit(1);
607 exit(0);
608 }
609-],AC_NOTE(- select is ok),
610-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
611+], screen_cv_sys_select_broken_retval=no,
612+screen_cv_sys_select_broken_retval=yes))
613+if test X"$screen_cv_sys_select_broken_retval" = Xyes; then
614+ AC_DEFINE(SELECT_BROKEN)
615+fi
616
617 dnl
618 dnl **** termcap or terminfo ****
619 dnl
620+AH_TEMPLATE([TERMINFO],
621+[Define TERMINFO if your machine emulates the termcap routines
622+ with the terminfo database.
623+ Thus the .screenrc file is parsed for
624+ the command 'terminfo' and not 'termcap'])
625 AC_CHECKING(for tgetent)
626 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
627 olibs="$LIBS"
628 LIBS="-lcurses $olibs"
629 AC_CHECKING(libcurses)
630+AC_CHECK_LIB(ncursesw,tgetent)
631 AC_TRY_LINK(,[
632 #ifdef __hpux
633 __sorry_hpux_libcurses_is_totally_broken_in_10_10();
634@@ -662,25 +1027,39 @@ LIBS="-lncurses $olibs"
635 AC_CHECKING(libncurses)
636 AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
637 AC_MSG_ERROR(!!! no tgetent - no screen))))))
638-
639-AC_TRY_RUN([
640+AC_CACHE_CHECK([using terminfo database],[screen_cv_sys_terminfo_used],
641+ AC_TRY_RUN([
642 main()
643 {
644 exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
645-}], AC_NOTE(- you use the termcap database),
646-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
647+}
648+ ], screen_cv_sys_terminfo_used=no,
649+ screen_cv_sys_terminfo_used=yes)
650+)
651+
652+if test X"$screen_cv_sys_terminfo_used" = Xyes; then
653+ AC_DEFINE(TERMINFO)
654+fi
655+
656 AC_CHECKING(ospeed)
657+AH_TEMPLATE([NEED_OSPEED],[If your library does not define ospeed, define this.])
658 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
659
660 dnl
661 dnl **** PTY specific things ****
662 dnl
663+AH_TEMPLATE([HAVE_DEV_PTC],
664+[define HAVE_DEV_PTC if you have a /dev/ptc character special
665+ device.])
666 AC_CHECKING(for /dev/ptc)
667 if test -r /dev/ptc; then
668 AC_DEFINE(HAVE_DEV_PTC)
669 fi
670
671 AC_CHECKING(for SVR4 ptys)
672+AH_TEMPLATE([HAVE_SVR4_PTYS],
673+[define HAVE_SVR4_PTYS if you have a /dev/ptmx character special
674+ device and support the ptsname(), grantpt(), unlockpt() functions.])
675 sysvr4ptys=
676 if test -c /dev/ptmx ; then
677 AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
678@@ -696,6 +1075,13 @@ AC_CHECK_FUNCS(openpty,,
679 fi
680
681 AC_CHECKING(for ptyranges)
682+AH_TEMPLATE([PTYRANGE0],
683+[define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
684+ to unusual environments. E.g. For SunOs the defaults are "qpr" and
685+ "0123456789abcdef". For SunOs 4.1.2
686+ #define PTYRANGE0 "pqrstuvwxyzPQRST"
687+ is recommended by Dan Jacobson.])
688+AH_TEMPLATE([PTYRANGE1],[])
689 if test -d /dev/ptym ; then
690 pdir='/dev/ptym'
691 else
692@@ -812,6 +1198,9 @@ dnl
693 dnl **** utmp handling ****
694 dnl
695 AC_CHECKING(getutent)
696+AH_TEMPLATE([GETUTENT],
697+[If your system has getutent(), pututline(), etc. to write to the
698+ utmp file, define GETUTENT.])
699 AC_TRY_LINK([
700 #include <time.h> /* to get time_t on SCO */
701 #include <sys/types.h>
702@@ -845,6 +1234,7 @@ AC_TRY_LINK([
703 [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
704 )
705 AC_CHECKING(ut_host)
706+AH_TEMPLATE([UTHOST],[Define UTHOST if the utmp file has a host field.])
707 AC_TRY_COMPILE([
708 #include <time.h>
709 #include <sys/types.h>
710@@ -855,8 +1245,9 @@ AC_TRY_COMPILE([
711 #include <utmp.h>
712 #endif
713 ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST))
714+AH_TEMPLATE([HAVE_UTEMPTER],[Define if you have the utempter utmp helper program])
715 AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no)
716-if test "$have_utempter" = yes; then
717+if test X"$have_utempter" = Xyes; then
718 AC_DEFINE(HAVE_UTEMPTER)
719 LIBS="$LIBS -lutempter"
720 fi
721@@ -864,20 +1255,39 @@ fi
722 dnl
723 dnl **** loadav ****
724 dnl
725+
726+AH_TEMPLATE([LOADAV],
727+[If you want the "time" command to display the current load average
728+ define LOADAV. Maybe you must install screen with the needed
729+ privileges to read /dev/kmem.
730+ Note that NLIST_ stuff is only checked, when getloadavg() is not available.
731+])
732+AH_TEMPLATE([LOADAV_NUM])
733+AH_TEMPLATE([LOADAV_TYPE])
734+AH_TEMPLATE([LOADAV_SCALE])
735+AH_TEMPLATE([LOADAV_GETLOADAVG])
736+AH_TEMPLATE([LOADAV_UNIX])
737+AH_TEMPLATE([LOADAV_AVENRUN])
738+AH_TEMPLATE([LOADAV_USE_NLIST64])
739+
740+AH_TEMPLATE([NLIST_DECLARED])
741+AH_TEMPLATE([NLIST_STRUCT])
742+AH_TEMPLATE([NLIST_NAME_UNION])
743+
744 AC_CHECKING(for libutil(s))
745-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
746-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
747+dnl I have no idea whether "login" is an appropriate symbol to check for here - Hannes
748+AC_CHECK_LIB(utils,login)
749+AC_CHECK_LIB(util,login)
750
751 AC_CHECKING(getloadavg)
752 AC_TRY_LINK(,[getloadavg((double *)0, 0);],
753 AC_DEFINE(LOADAV_GETLOADAVG) load=1,
754-if test -f /usr/lib/libkvm.a ; then
755 olibs="$LIBS"
756-LIBS="$LIBS -lkvm"
757+AC_CHECK_LIB(kvm,kvm_open,
758 AC_CHECKING(getloadavg with -lkvm)
759 AC_TRY_LINK(,[getloadavg((double *)0, 0);],
760 AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs")
761-fi
762+)
763 )
764
765 if test -z "$load" ; then
766@@ -1019,6 +1429,12 @@ if test -n "$loadscale" ; then AC_DEFINE_UNQUOTED(LOADAV_SCALE,$loadscale) fi
767 dnl
768 dnl **** signal handling ****
769 dnl
770+
771+AH_TEMPLATE([SIGVOID],
772+[Define SIGVOID if your signal handlers return void. On older
773+ systems, signal returns int, but on newer ones, it returns void.])
774+
775+
776 if test -n "$posix" ; then
777
778 dnl POSIX has reliable signals with void return type.
779@@ -1036,6 +1452,7 @@ AC_TRY_COMPILE(
780 #endif
781 extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID))
782 AC_CHECKING(sigset)
783+AH_TEMPLATE([USESIGSET], [Define USESIGSET if you have sigset for BSD 4.1 reliable signals.])
784 AC_TRY_LINK([
785 #include <sys/types.h>
786 #include <signal.h>
787@@ -1047,6 +1464,9 @@ sigset(0, (int (*)())0);
788 #endif
789 ], AC_DEFINE(USESIGSET))
790 AC_CHECKING(signal implementation)
791+AH_TEMPLATE([SYSVSIGS],
792+[Define SYSVSIGS if signal handlers must be reinstalled after
793+ they have been called.])
794 AC_TRY_RUN([
795 #include <sys/types.h>
796 #include <signal.h>
797@@ -1089,13 +1509,14 @@ dnl **** libraries ****
798 dnl
799
800 AC_CHECKING(for crypt and sec libraries)
801-test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
802+dnl I have no idea whether "crypt" is an appropriate symbol to check for here - Hannes
803+AC_CHECK_LIB(crypt_d,crypt)
804 oldlibs="$LIBS"
805-LIBS="$LIBS -lcrypt"
806 AC_CHECKING(crypt)
807 AC_TRY_LINK(,,,LIBS="$oldlibs")
808-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
809-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
810+AC_CHECK_LIB(crypt,crypt)
811+AC_CHECK_LIB(sec,crypt)
812+AC_CHECK_LIB(shadow,getspnam)
813 oldlibs="$LIBS"
814 LIBS="$LIBS -lsun"
815 AC_CHECKING(IRIX sun library)
816@@ -1118,6 +1539,13 @@ dnl
817 dnl **** misc things ****
818 dnl
819 AC_CHECKING(wait union)
820+AH_TEMPLATE([BSDWAIT],
821+[Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h>
822+
823+ Only allow BSDWAIT i.e. wait3 on nonposix systems, since
824+ posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl
825+ TODO(Hannes) shipped config.h.in does that with a #ifdef
826+])
827 AC_TRY_COMPILE([#include <sys/types.h>
828 #include <sys/wait.h>
829 ],[
830@@ -1128,6 +1556,12 @@ AC_TRY_COMPILE([#include <sys/types.h>
831 #endif
832 ],AC_DEFINE(BSDWAIT))
833
834+AH_TEMPLATE([TERMIO],
835+[Define TERMIO if you have struct termio instead of struct sgttyb.
836+ This is usually the case for SVID systems, where BSD uses sgttyb.
837+ POSIX systems should define this anyway, even though they use
838+ struct termios.])
839+
840 if test -z "$butterfly"; then
841 AC_CHECKING(for termio or termios)
842 AC_TRY_CPP([#include <termio.h>], AC_DEFINE(TERMIO),
843@@ -1137,17 +1571,34 @@ fi
844 )
845 fi
846
847+AH_TEMPLATE([CYTERMIO], [Define CYTERMIO if you have cyrillic termio modes.])
848 dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW))
849 AC_CHECKING(getspnam)
850+AH_TEMPLATE([SHADOWPW],
851+[If the passwords are stored in a shadow file and you want the
852+ builtin lock to work properly, define SHADOWPW.])
853 AC_TRY_LINK([#include <shadow.h>], [getspnam("x");],AC_DEFINE(SHADOWPW))
854
855 AC_CHECKING(getttyent)
856+AH_TEMPLATE([GETTTYENT],
857+[If your system has the new format /etc/ttys (like 4.3 BSD) and the
858+ getttyent(3) library functions, define GETTTYENT.])
859 AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
860
861 AC_CHECKING(fdwalk)
862+AH_TEMPLATE([HAVE_FDWALK],
863+[Newer versions of Solaris include fdwalk, which can greatly improve
864+ the startup time of screen; otherwise screen spends a lot of time
865+ closing file descriptors.])
866 AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
867
868-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
869+AH_TEMPLATE([USEBCOPY],
870+[Define USEBCOPY if the bcopy/memcpy from your system's C library
871+ supports the overlapping of source and destination blocks. When
872+ undefined, screen uses its own (probably slower) version of bcopy().])
873+
874+AC_CACHE_CHECK([if bcopy handles overlap],
875+ [screen_cv_sys_bcopy_overlap],
876 AC_TRY_RUN([
877 main() {
878 char buf[10];
879@@ -1160,8 +1611,21 @@ main() {
880 if (strncmp(buf, "cdedef", 6))
881 exit(1);
882 exit(0); /* libc version works properly. */
883-}], AC_DEFINE(USEBCOPY))
884+}], screen_cv_sys_bcopy_overlap=yes,
885+screen_cv_sys_bcopy_overlap=no))
886+if test X"$screen_cv_sys_bcopy_overlap" = Xyes; then
887+ AC_DEFINE(USEBCOPY)
888+fi
889
890+AH_TEMPLATE([USEMEMMOVE],
891+[SYSV machines may have a working memcpy() -- Oh, this is
892+ quite unlikely. Tell me if you see one.
893+ "But then, memmove() should work, if at all available" he thought...
894+ Boing, never say "works everywhere" unless you checked SCO UNIX.
895+ Their memove fails the test in the configure script. Sigh. (Juergen)
896+])
897+AC_CACHE_CHECK([if memmove handles overlap],
898+ [screen_cv_sys_memmove_overlap],
899 AC_TRY_RUN([
900 #define bcopy(s,d,l) memmove(d,s,l)
901 main() {
902@@ -1175,9 +1639,15 @@ main() {
903 if (strncmp(buf, "cdedef", 6))
904 exit(1);
905 exit(0); /* libc version works properly. */
906-}], AC_DEFINE(USEMEMMOVE))
907-
908+}], screen_cv_sys_memmove_overlap=yes,
909+screen_cv_sys_memmove_overlap=no))
910+if test X"$screen_cv_sys_memmove_overlap" = Xyes; then
911+ AC_DEFINE(USEMEMMOVE)
912+fi
913
914+AH_TEMPLATE([USEMEMCPY],[])
915+AC_CACHE_CHECK([if memcpy handles overlap],
916+ [screen_cv_sys_memcpy_overlap],
917 AC_TRY_RUN([
918 #define bcopy(s,d,l) memcpy(d,s,l)
919 main() {
920@@ -1191,9 +1661,19 @@ main() {
921 if (strncmp(buf, "cdedef", 6))
922 exit(1);
923 exit(0); /* libc version works properly. */
924-}], AC_DEFINE(USEMEMCPY))
925+}], screen_cv_sys_memcpy_overlap=yes,
926+screen_cv_sys_memcpy_overlap=no))
927+if test X"$screen_cv_sys_memcpy_overlap" = Xyes; then
928+ AC_DEFINE(USEMEMCPY)
929+fi
930
931 AC_MSG_CHECKING(long file names)
932+AH_TEMPLATE([NAME_MAX],
933+[If you are on a SYS V machine that restricts filename length to 14
934+ characters, you may need to enforce that by setting NAME_MAX to 14])
935+dnl TODO(Hannes) shipped config.h.in has
936+dnl #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */
937+dnl ahead of this
938 (echo 1 > /tmp/conftest9012345) 2>/dev/null
939 (echo 2 > /tmp/conftest9012346) 2>/dev/null
940 val=`cat /tmp/conftest9012345 2>/dev/null`
941@@ -1206,17 +1686,28 @@ fi
942 rm -f /tmp/conftest*
943
944 AC_MSG_CHECKING(for vsprintf)
945+AH_TEMPLATE([USEVARARGS],
946+[If your system has vsprintf() and requires the use of the macros in
947+ "varargs.h" to use functions with variable arguments,
948+ define USEVARARGS.])
949 AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
950
951 AC_HEADER_DIRENT
952
953 AC_MSG_CHECKING(for setenv)
954+AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV])
955 AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV),
956 AC_MSG_RESULT(no)
957 AC_MSG_CHECKING(for putenv)
958+AH_TEMPLATE([NEEDPUTENV],
959+[If your system does not come with a setenv()/putenv()/getenv()
960+ functions, you may bring in our own code by defining NEEDPUTENV.])
961 AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV)
962 ))
963 AC_MSG_CHECKING([for nl_langinfo(CODESET)])
964+AH_TEMPLATE([HAVE_NL_LANGINFO],
965+[define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
966+ and <langinfo.h> defines CODESET.])
967 AC_TRY_LINK([
968 #include <langinfo.h>
969 ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no))
970@@ -1266,7 +1757,8 @@ fi
971 dnl Ptx bug workaround -- insert -lc after -ltermcap
972 test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
973
974-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
975+AC_MSG_CHECKING(compiler sanity)
976+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))
977
978 ETCSCREENRC="\"/usr/local/etc/screenrc\""
979 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 0000000000..e0caf5d83e
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch
@@ -0,0 +1,19 @@
1This fixes the parallel make install failure
2
3Upstream-Status: Pending
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: screen-4.0.3/Makefile.in
8===================================================================
9--- screen-4.0.3.orig/Makefile.in
10+++ screen-4.0.3/Makefile.in
11@@ -70,7 +70,7 @@ screen: $(OFILES)
12 .c.o:
13 $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
14
15-install_bin: .version screen
16+install_bin: .version screen installdirs
17 -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
18 then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
19 $(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 0000000000..ff657fa07c
--- /dev/null
+++ b/meta/recipes-extended/screen/screen-4.0.3/screen.pam
@@ -0,0 +1,2 @@
1#%PAM-1.0
2auth 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 0000000000..d83dda03c2
--- /dev/null
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -0,0 +1,50 @@
1SUMMARY = "Multiplexing terminal manager"
2DESCRIPTION = "Screen is a full-screen window manager \
3that multiplexes a physical terminal between several \
4processes, typically interactive shells."
5HOMEPAGE = "http://www.gnu.org/software/screen/"
6BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
7
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \
10 file://screen.h;endline=23;md5=9a7ae69a2aafed891bf7c38ddf9f6b7d"
11
12SECTION = "console/utils"
13DEPENDS = "ncurses \
14 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
15RDEPENDS_${PN} = "base-files"
16
17PR = "r4"
18
19SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \
20 ${DEBIAN_MIRROR}/main/s/screen/screen_4.0.3-14.diff.gz;name=patch \
21 file://configure.patch \
22 file://fix-parallel-make.patch \
23 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
24
25PAM_SRC_URI = "file://screen.pam"
26
27SRC_URI[tarball.md5sum] = "8506fd205028a96c741e4037de6e3c42"
28SRC_URI[tarball.sha256sum] = "78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77"
29
30SRC_URI[patch.md5sum] = "5960bdae6782ee9356b7e0e0a1fa7c19"
31SRC_URI[patch.sha256sum] = "10acb274b2fb0bb7137a0d66e52fa0f18125bc5198c7a8d5af381b4b30636316"
32
33inherit autotools
34
35EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
36 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
37
38do_install_append () {
39 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
40 install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
41 fi
42}
43
44pkg_postinst_${PN} () {
45 grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
46}
47
48pkg_postrm_${PN} () {
49 printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
50}
diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars
new file mode 100644
index 0000000000..8b09f53b0f
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/Makevars
@@ -0,0 +1,25 @@
1# Makefile variables for PO directory in any package using GNU gettext.
2
3# Usually the message domain is the same as the package name.
4DOMAIN = $(PACKAGE)
5
6# These two variables depend on the location of this directory.
7subdir = po
8top_builddir = ..
9
10# These options get passed to xgettext.
11XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
12
13# This is the copyright holder that gets inserted into the header of the
14# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
15# package. (Note that the msgstr strings, extracted from the package's
16# sources, belong to the copyright holder of the package.) Translators are
17# expected to transfer the copyright for their translations to this person
18# or entity, or to disclaim their copyright. The empty string stands for
19# the public domain; in this case the translators are expected to disclaim
20# their copyright.
21COPYRIGHT_HOLDER = Free Software Foundation, Inc.
22
23# This is the list of locale categories, beyond LC_MESSAGES, for which the
24# message catalogs shall be used. It is usually empty.
25EXTRA_LOCALE_CATEGORIES =
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 0000000000..836551ea18
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
@@ -0,0 +1,18 @@
1Upstream-Status: Pending
2
3Change the getline return type to match its declaration.
4
5Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
6
7diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c
8--- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800
9+++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800
10@@ -30,7 +30,7 @@
11 necessary. Returns the number of characters read (not including the
12 null terminator), or -1 on error or EOF. */
13
14-size_t
15+ssize_t
16 getline (lineptr, n, stream)
17 char **lineptr;
18 size_t *n;
diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..80594068ac
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Pending
2
3automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead.
4
5Avoid this build issue:
6| make[1]: mkdir_p@: Command not found
7| make[1]: *** [install-data-yes] Error 127
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/07/13
11
12Index: sed-4.1.2/intl/Makefile.in
13===================================================================
14--- sed-4.1.2.orig/intl/Makefile.in
15+++ sed-4.1.2/intl/Makefile.in
16@@ -40,7 +40,7 @@ subdir = intl
17 INSTALL = @INSTALL@
18 INSTALL_DATA = @INSTALL_DATA@
19 mkinstalldirs = $(mkdir_p)
20-mkdir_p = @mkdir_p@
21+mkdir_p = @MKDIR_P@
22
23 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
24
25Index: sed-4.1.2/po/Makefile.in.in
26===================================================================
27--- sed-4.1.2.orig/po/Makefile.in.in
28+++ sed-4.1.2/po/Makefile.in.in
29@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
30 INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c
31 INSTALL_DATA = ${INSTALL} -m 644
32 mkinstalldirs = $(mkdir_p)
33-mkdir_p = @mkdir_p@
34+mkdir_p = @MKDIR_P@
35
36 CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86
37 GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt
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 0000000000..5607b0ac62
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.1.2.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Stream EDitor (text filtering utility)"
2HOMEPAGE = "http://www.gnu.org/software/sed/"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
5 file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407"
6SECTION = "console/utils"
7PR = "r7"
8
9SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
10 file://fix_return_type.patch \
11 file://sed-4.1.2_fix_for_automake-1.12.patch \
12 file://Makevars"
13
14SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0"
15SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab"
16
17inherit autotools update-alternatives gettext
18
19do_configure_prepend () {
20 cp ${WORKDIR}/Makevars ${S}/po/
21}
22
23do_install () {
24 autotools_do_install
25 install -d ${D}${base_bindir}
26 mv ${D}${bindir}/sed ${D}${base_bindir}/sed
27 rmdir ${D}${bindir}/
28}
29
30ALTERNATIVE_${PN} = "sed"
31ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
32ALTERNATIVE_PRIORITY = "100"
33
34BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
new file mode 100644
index 0000000000..cf8347c2d5
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Stream EDitor (text filtering utility)"
2HOMEPAGE = "http://www.gnu.org/software/sed/"
3LICENSE = "GPLv3+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
5 file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
6SECTION = "console/utils"
7
8SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz"
9
10SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
11SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
12
13inherit autotools update-alternatives gettext
14
15EXTRA_OECONF = "--disable-acl"
16
17do_install () {
18 autotools_do_install
19 install -d ${D}${base_bindir}
20 mv ${D}${bindir}/sed ${D}${base_bindir}/sed
21 rmdir ${D}${bindir}/
22}
23
24ALTERNATIVE_${PN} = "sed"
25ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
26ALTERNATIVE_PRIORITY = "100"
27
28BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch b/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
new file mode 100644
index 0000000000..40444967ab
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/add_root_cmd_groupmems.patch
@@ -0,0 +1,75 @@
1Add a --root command option to groupmems utility.
2
3This option allows the utility to be chrooted when run under pseudo.
4
5Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
6
7diff -Naur old/src/groupmems.c new/src/groupmems.c
8--- old/src/groupmems.c 2011-02-13 11:58:16.000000000 -0600
9+++ new/src/groupmems.c 2013-05-30 04:45:38.000000000 -0500
10@@ -60,6 +60,7 @@
11 #define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
12 #define EXIT_INVALID_USER 8 /* specified user does not exist */
13 #define EXIT_INVALID_GROUP 9 /* specified group does not exist */
14+#define EXIT_BAD_ARG 10 /* invalid argument to option */
15
16 /*
17 * Global variables
18@@ -79,6 +80,7 @@
19 static bool is_shadowgrp;
20 static bool sgr_locked = false;
21 #endif
22+static const char *newroot = "";
23
24 /* local function prototypes */
25 static char *whoami (void);
26@@ -368,6 +370,7 @@
27 "Options:\n"
28 " -g, --group groupname change groupname instead of the user's group\n"
29 " (root only)\n"
30+ " -R, --root CHROOT_DIR directory to chroot into\n"
31 "\n"
32 "Actions:\n"
33 " -a, --add username add username to the members of the group\n"
34@@ -391,10 +394,11 @@
35 {"group", required_argument, NULL, 'g'},
36 {"list", no_argument, NULL, 'l'},
37 {"purge", no_argument, NULL, 'p'},
38+ {"root", required_argument, NULL, 'R'},
39 {NULL, 0, NULL, '\0'}
40 };
41
42- while ((arg = getopt_long (argc, argv, "a:d:g:lp", long_options,
43+ while ((arg = getopt_long (argc, argv, "a:d:g:lpR:", long_options,
44 &option_index)) != EOF) {
45 switch (arg) {
46 case 'a':
47@@ -416,6 +420,28 @@
48 purge = true;
49 ++exclusive;
50 break;
51+ case 'R':
52+ if ('/' != optarg[0]) {
53+ fprintf (stderr,
54+ _("%s: invalid chroot path '%s'\n"),
55+ Prog, optarg);
56+ exit (EXIT_BAD_ARG);
57+ }
58+ newroot = optarg;
59+
60+ if (access (newroot, F_OK) != 0) {
61+ fprintf(stderr,
62+ _("%s: chroot directory %s does not exist\n"),
63+ Prog, newroot);
64+ exit (EXIT_BAD_ARG);
65+ }
66+ if ( chroot(newroot) != 0 ) {
67+ fprintf(stderr,
68+ _("%s: unable to chroot to directory %s\n"),
69+ Prog, newroot);
70+ exit (EXIT_BAD_ARG);
71+ }
72+ break;
73 default:
74 usage ();
75 }
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 0000000000..ab87e35535
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
@@ -0,0 +1,1384 @@
1Add a --root command option to the following utilties:
2
3* useradd
4* groupadd
5* usermod
6* groupmod
7* userdel
8* groupdel
9* passwd
10* gpasswd
11* pwconv
12* pwunconv
13* grpconv
14* grpunconv
15
16This option allows the utilities to be chrooted when run under pseudo.
17They can then be used to manipulate user and group account information
18in target sysroots.
19
20The useradd utility was also modified to create home directories
21recursively when necessary.
22
23Upstream-Status: Inappropriate [Other]
24Workaround is specific to our build system.
25
26Signed-off-by: Scott Garman <scott.a.garman@intel.com>
27
282011-09-29 Fix the parsing of the --root option in gpasswd, useradd, usermod:
29
30In programs which need to scan the command line in two passes to handle
31--root option separately from the rest of the arguments, replace the first
32calls to getopt_long with a simple iteration over the argument list since
33getopt_long has the bad habit of reordering arguments on the command line.
34
35Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
36
37diff -urN shadow-4.1.4.3.orig//src/gpasswd.c shadow-4.1.4.3//src/gpasswd.c
38--- shadow-4.1.4.3.orig//src/gpasswd.c 2011-09-29 12:00:45.211000091 +0100
39+++ shadow-4.1.4.3//src/gpasswd.c 2011-09-29 12:09:54.590000090 +0100
40@@ -63,6 +63,7 @@
41 * (/etc/gshadow present) */
42 static bool is_shadowgrp;
43 #endif
44+static const char *newroot = "";
45
46 /* Flags set by options */
47 static bool aflg = false;
48@@ -97,6 +98,7 @@
49 static void usage (void);
50 static RETSIGTYPE catch_signals (int killed);
51 static bool is_valid_user_list (const char *users);
52+static void process_root_flag (int argc, char **argv);
53 static void process_flags (int argc, char **argv);
54 static void check_flags (int argc, int opt_index);
55 static void open_files (void);
56@@ -136,6 +138,7 @@
57 "Options:\n"
58 " -a, --add USER add USER to GROUP\n"
59 " -d, --delete USER remove USER from GROUP\n"
60+ " -Q --root CHROOT_DIR directory to chroot into\n"
61 " -r, --remove-password remove the GROUP's password\n"
62 " -R, --restrict restrict access to GROUP to its members\n"
63 " -M, --members USER,... set the list of members of GROUP\n"
64@@ -226,6 +229,57 @@
65 }
66
67 /*
68+ * process_root_flag - chroot if given the --root option
69+ *
70+ * We do this outside of process_flags() because
71+ * the is_shadow_pwd boolean needs to be set before
72+ * process_flags(), and if we do need to chroot() we
73+ * must do so before is_shadow_pwd gets set.
74+ */
75+static void process_root_flag (int argc, char **argv)
76+{
77+ /*
78+ * Parse the command line options.
79+ */
80+ int i;
81+ char *root;
82+
83+ for (i = 0; i < argc; i++) {
84+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-Q")) {
85+ if (i + 1 == argc) {
86+ fprintf (stderr,
87+ _("%s: option '%s' requires an argument\n"),
88+ Prog, argv[i]);
89+ exit (E_BAD_ARG);
90+ }
91+ root = argv[i + 1];
92+
93+ if ('/' != root[0]) {
94+ fprintf (stderr,
95+ _("%s: invalid chroot path '%s'\n"),
96+ Prog, root);
97+ exit (E_BAD_ARG);
98+ }
99+ newroot = root;
100+
101+ if (access (newroot, F_OK) != 0) {
102+ fprintf(stderr,
103+ _("%s: chroot directory %s does not exist\n"),
104+ Prog, newroot);
105+ exit (E_BAD_ARG);
106+ }
107+ if ( chroot(newroot) != 0 ) {
108+ fprintf(stderr,
109+ _("%s: unable to chroot to directory %s\n"),
110+ Prog, newroot);
111+ exit (E_BAD_ARG);
112+ }
113+ break;
114+ }
115+ }
116+}
117+
118+/*
119 * process_flags - process the command line options and arguments
120 */
121 static void process_flags (int argc, char **argv)
122@@ -235,6 +289,7 @@
123 static struct option long_options[] = {
124 {"add", required_argument, NULL, 'a'},
125 {"delete", required_argument, NULL, 'd'},
126+ {"root", required_argument, NULL, 'Q'},
127 {"remove-password", no_argument, NULL, 'r'},
128 {"restrict", no_argument, NULL, 'R'},
129 {"administrators", required_argument, NULL, 'A'},
130@@ -242,7 +297,7 @@
131 {NULL, 0, NULL, '\0'}
132 };
133
134- while ((flag = getopt_long (argc, argv, "a:A:d:gM:rR", long_options, &option_index)) != -1) {
135+ while ((flag = getopt_long (argc, argv, "a:A:d:gM:Q:rR", long_options, &option_index)) != -1) {
136 switch (flag) {
137 case 'a': /* add a user */
138 aflg = true;
139@@ -283,6 +338,9 @@
140 }
141 Mflg = true;
142 break;
143+ case 'Q':
144+ /* no-op since we handled this in process_root_flag() earlier */
145+ break;
146 case 'r': /* remove group password */
147 rflg = true;
148 break;
149@@ -995,6 +1053,8 @@
150 setbuf (stdout, NULL);
151 setbuf (stderr, NULL);
152
153+ process_root_flag (argc, argv);
154+
155 #ifdef SHADOWGRP
156 is_shadowgrp = sgr_file_present ();
157 #endif
158diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3//src/groupadd.c
159--- shadow-4.1.4.3.orig//src/groupadd.c 2011-09-29 12:00:45.212000091 +0100
160+++ shadow-4.1.4.3//src/groupadd.c 2011-09-29 11:59:28.386000092 +0100
161@@ -76,6 +76,7 @@
162 static gid_t group_id;
163 static /*@null@*/char *group_passwd;
164 static /*@null@*/char *empty_list = NULL;
165+static const char *newroot = "";
166
167 static bool oflg = false; /* permit non-unique group ID to be specified with -g */
168 static bool gflg = false; /* ID value for the new group */
169@@ -120,6 +121,7 @@
170 (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
171 " (non-unique) GID\n"), stderr);
172 (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
173+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
174 (void) fputs (_(" -r, --system create a system account\n"), stderr);
175 (void) fputs ("\n", stderr);
176 exit (E_USAGE);
177@@ -383,12 +385,13 @@
178 {"key", required_argument, NULL, 'K'},
179 {"non-unique", no_argument, NULL, 'o'},
180 {"password", required_argument, NULL, 'p'},
181+ {"root", required_argument, NULL, 'R'},
182 {"system", no_argument, NULL, 'r'},
183 {NULL, 0, NULL, '\0'}
184 };
185
186 while ((c =
187- getopt_long (argc, argv, "fg:hK:op:r", long_options,
188+ getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
189 &option_index)) != -1) {
190 switch (c) {
191 case 'f':
192@@ -440,6 +443,28 @@
193 pflg = true;
194 group_passwd = optarg;
195 break;
196+ case 'R':
197+ if ('/' != optarg[0]) {
198+ fprintf (stderr,
199+ _("%s: invalid chroot path '%s'\n"),
200+ Prog, optarg);
201+ exit (E_BAD_ARG);
202+ }
203+ newroot = optarg;
204+
205+ if (access (newroot, F_OK) != 0) {
206+ fprintf(stderr,
207+ _("%s: chroot directory %s does not exist\n"),
208+ Prog, newroot);
209+ exit (E_BAD_ARG);
210+ }
211+ if ( chroot(newroot) != 0 ) {
212+ fprintf(stderr,
213+ _("%s: unable to chroot to directory %s\n"),
214+ Prog, newroot);
215+ exit (E_BAD_ARG);
216+ }
217+ break;
218 case 'r':
219 rflg = true;
220 break;
221diff -urN shadow-4.1.4.3.orig//src/groupdel.c shadow-4.1.4.3//src/groupdel.c
222--- shadow-4.1.4.3.orig//src/groupdel.c 2011-09-29 12:00:45.212000091 +0100
223+++ shadow-4.1.4.3//src/groupdel.c 2011-09-29 11:59:28.386000092 +0100
224@@ -36,6 +36,7 @@
225
226 #include <ctype.h>
227 #include <fcntl.h>
228+#include <getopt.h>
229 #include <grp.h>
230 #include <pwd.h>
231 #ifdef ACCT_TOOLS_SETUID
232@@ -59,6 +60,7 @@
233
234 static char *group_name;
235 static gid_t group_id = -1;
236+static const char *newroot = "";
237
238 #ifdef SHADOWGRP
239 static bool is_shadow_grp;
240@@ -70,12 +72,14 @@
241 /*@-exitarg@*/
242 #define E_SUCCESS 0 /* success */
243 #define E_USAGE 2 /* invalid command syntax */
244+#define E_BAD_ARG 3 /* invalid argument to option */
245 #define E_NOTFOUND 6 /* specified group doesn't exist */
246 #define E_GROUP_BUSY 8 /* can't remove user's primary group */
247 #define E_GRP_UPDATE 10 /* can't update group file */
248
249 /* local function prototypes */
250 static void usage (void);
251+static void process_flags (int argc, char **argv);
252 static void grp_update (void);
253 static void close_files (void);
254 static void open_files (void);
255@@ -86,11 +90,78 @@
256 */
257 static void usage (void)
258 {
259- fputs (_("Usage: groupdel group\n"), stderr);
260+ (void) fprintf (stderr,
261+ _("Usage: groupdel [options]\n"
262+ "\n"
263+ "Options:\n"),
264+ Prog);
265+ (void) fputs (_(" -g, --group GROUP group name to delete\n"), stderr);
266+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
267+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
268+ (void) fputs ("\n", stderr);
269 exit (E_USAGE);
270 }
271
272 /*
273+ * process_flags - perform command line argument setting
274+ *
275+ * process_flags() interprets the command line arguments and sets
276+ * the values that the user will be created with accordingly. The
277+ * values are checked for sanity.
278+ */
279+static void process_flags (int argc, char **argv)
280+{
281+ {
282+ /*
283+ * Parse the command line options.
284+ */
285+ int c;
286+ static struct option long_options[] = {
287+ {"group", required_argument, NULL, 'g'},
288+ {"help", no_argument, NULL, 'h'},
289+ {"root", required_argument, NULL, 'R'},
290+ {NULL, 0, NULL, '\0'}
291+ };
292+ while ((c = getopt_long (argc, argv,
293+ "g:R:",
294+ long_options, NULL)) != -1) {
295+ switch (c) {
296+ case 'g':
297+ group_name = optarg;
298+ break;
299+ case 'h':
300+ usage ();
301+ break;
302+ case 'R':
303+ if ('/' != optarg[0]) {
304+ fprintf (stderr,
305+ _("%s: invalid chroot path '%s'\n"),
306+ Prog, optarg);
307+ exit (E_BAD_ARG);
308+ }
309+ newroot = optarg;
310+
311+ if (access (newroot, F_OK) != 0) {
312+ fprintf(stderr,
313+ _("%s: chroot directory %s does not exist\n"),
314+ Prog, newroot);
315+ exit (E_BAD_ARG);
316+ }
317+ if ( chroot(newroot) != 0 ) {
318+ fprintf(stderr,
319+ _("%s: unable to chroot to directory %s\n"),
320+ Prog, newroot);
321+ exit (E_BAD_ARG);
322+ }
323+ break;
324+ default:
325+ usage ();
326+ }
327+ }
328+ }
329+}
330+
331+/*
332 * grp_update - update group file entries
333 *
334 * grp_update() writes the new records to the group files.
335@@ -328,14 +399,14 @@
336 (void) bindtextdomain (PACKAGE, LOCALEDIR);
337 (void) textdomain (PACKAGE);
338
339- if (argc != 2) {
340+ if (argc == 1) {
341 usage ();
342 }
343
344- group_name = argv[1];
345-
346 OPENLOG ("groupdel");
347
348+ process_flags (argc, argv);
349+
350 #ifdef ACCT_TOOLS_SETUID
351 #ifdef USE_PAM
352 {
353diff -urN shadow-4.1.4.3.orig//src/groupmod.c shadow-4.1.4.3//src/groupmod.c
354--- shadow-4.1.4.3.orig//src/groupmod.c 2011-09-29 12:00:45.212000091 +0100
355+++ shadow-4.1.4.3//src/groupmod.c 2011-09-29 11:59:28.387000092 +0100
356@@ -79,6 +79,7 @@
357 static char *group_passwd;
358 static gid_t group_id;
359 static gid_t group_newid;
360+static char *newroot = "";
361
362 struct cleanup_info_mod info_passwd;
363 struct cleanup_info_mod info_group;
364@@ -126,6 +127,7 @@
365 (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
366 (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
367 " PASSWORD\n"), stderr);
368+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
369 (void) fputs ("\n", stderr);
370 exit (E_USAGE);
371 }
372@@ -346,10 +348,11 @@
373 {"new-name", required_argument, NULL, 'n'},
374 {"non-unique", no_argument, NULL, 'o'},
375 {"password", required_argument, NULL, 'p'},
376+ {"root", required_argument, NULL, 'R'},
377 {NULL, 0, NULL, '\0'}
378 };
379 while ((c =
380- getopt_long (argc, argv, "g:hn:op:",
381+ getopt_long (argc, argv, "g:hn:op:R:",
382 long_options, &option_index)) != -1) {
383 switch (c) {
384 case 'g':
385@@ -373,6 +376,28 @@
386 group_passwd = optarg;
387 pflg = true;
388 break;
389+ case 'R':
390+ if ('/' != optarg[0]) {
391+ fprintf (stderr,
392+ _("%s: invalid chroot path '%s'\n"),
393+ Prog, optarg);
394+ exit (E_BAD_ARG);
395+ }
396+ newroot = optarg;
397+
398+ if (access (newroot, F_OK) != 0) {
399+ fprintf(stderr,
400+ _("%s: chroot directory %s does not exist\n"),
401+ Prog, newroot);
402+ exit (E_BAD_ARG);
403+ }
404+ if ( chroot(newroot) != 0 ) {
405+ fprintf(stderr,
406+ _("%s: unable to chroot to directory %s\n"),
407+ Prog, newroot);
408+ exit (E_BAD_ARG);
409+ }
410+ break;
411 default:
412 usage ();
413 }
414diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
415--- shadow-4.1.4.3.orig//src/grpconv.c 2011-09-29 12:00:45.213000091 +0100
416+++ shadow-4.1.4.3//src/grpconv.c 2011-09-29 11:59:28.387000092 +0100
417@@ -39,6 +39,7 @@
418
419 #include <errno.h>
420 #include <fcntl.h>
421+#include <getopt.h>
422 #include <grp.h>
423 #include <stdio.h>
424 #include <stdlib.h>
425@@ -50,6 +51,14 @@
426 #ifdef SHADOWGRP
427 #include "groupio.h"
428 #include "sgroupio.h"
429+
430+/*
431+ * exit status values
432+ */
433+/*@-exitarg@*/
434+#define E_USAGE 2 /* invalid command syntax */
435+#define E_BAD_ARG 3 /* invalid argument to option */
436+
437 /*
438 * Global variables
439 */
440@@ -57,9 +66,12 @@
441
442 static bool gr_locked = false;
443 static bool sgr_locked = false;
444+static const char *newroot = "";
445
446 /* local function prototypes */
447 static void fail_exit (int status);
448+static void usage (void);
449+static void process_flags (int argc, char **argv);
450
451 static void fail_exit (int status)
452 {
453@@ -82,6 +94,77 @@
454 exit (status);
455 }
456
457+/*
458+ * usage - display usage message and exit
459+ */
460+static void usage (void)
461+{
462+ (void) fprintf (stderr,
463+ _("Usage: grpconv [options]\n"
464+ "\n"
465+ "Options:\n"),
466+ Prog);
467+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
468+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
469+ (void) fputs ("\n", stderr);
470+ exit (E_USAGE);
471+}
472+
473+/*
474+ * process_flags - perform command line argument setting
475+ *
476+ * process_flags() interprets the command line arguments and sets
477+ * the values that the user will be created with accordingly. The
478+ * values are checked for sanity.
479+ */
480+static void process_flags (int argc, char **argv)
481+{
482+ {
483+ /*
484+ * Parse the command line options.
485+ */
486+ int c;
487+ static struct option long_options[] = {
488+ {"help", no_argument, NULL, 'h'},
489+ {"root", required_argument, NULL, 'R'},
490+ {NULL, 0, NULL, '\0'}
491+ };
492+ while ((c = getopt_long (argc, argv,
493+ "R:",
494+ long_options, NULL)) != -1) {
495+ switch (c) {
496+ case 'h':
497+ usage ();
498+ break;
499+ case 'R':
500+ if ('/' != optarg[0]) {
501+ fprintf (stderr,
502+ _("%s: invalid chroot path '%s'\n"),
503+ Prog, optarg);
504+ exit (E_BAD_ARG);
505+ }
506+ newroot = optarg;
507+
508+ if (access (newroot, F_OK) != 0) {
509+ fprintf(stderr,
510+ _("%s: chroot directory %s does not exist\n"),
511+ Prog, newroot);
512+ exit (E_BAD_ARG);
513+ }
514+ if ( chroot(newroot) != 0 ) {
515+ fprintf(stderr,
516+ _("%s: unable to chroot to directory %s\n"),
517+ Prog, newroot);
518+ exit (E_BAD_ARG);
519+ }
520+ break;
521+ default:
522+ usage ();
523+ }
524+ }
525+ }
526+}
527+
528 int main (int argc, char **argv)
529 {
530 const struct group *gr;
531@@ -89,9 +172,6 @@
532 const struct sgrp *sg;
533 struct sgrp sgent;
534
535- if (1 != argc) {
536- (void) fputs (_("Usage: grpconv\n"), stderr);
537- }
538 Prog = Basename (argv[0]);
539
540 (void) setlocale (LC_ALL, "");
541@@ -100,6 +180,8 @@
542
543 OPENLOG ("grpconv");
544
545+ process_flags (argc, argv);
546+
547 if (gr_lock () == 0) {
548 fprintf (stderr,
549 _("%s: cannot lock %s; try again later.\n"),
550diff -urN shadow-4.1.4.3.orig//src/grpunconv.c shadow-4.1.4.3//src/grpunconv.c
551--- shadow-4.1.4.3.orig//src/grpunconv.c 2011-09-29 12:00:45.213000091 +0100
552+++ shadow-4.1.4.3//src/grpunconv.c 2011-09-29 11:59:28.387000092 +0100
553@@ -43,6 +43,7 @@
554 #include <stdlib.h>
555 #include <string.h>
556 #include <fcntl.h>
557+#include <getopt.h>
558 #include <time.h>
559 #include <unistd.h>
560 #include <grp.h>
561@@ -51,6 +52,14 @@
562 #ifdef SHADOWGRP
563 #include "groupio.h"
564 #include "sgroupio.h"
565+
566+/*
567+ * exit status values
568+ */
569+/*@-exitarg@*/
570+#define E_USAGE 2 /* invalid command syntax */
571+#define E_BAD_ARG 3 /* invalid argument to option */
572+
573 /*
574 * Global variables
575 */
576@@ -58,9 +67,12 @@
577
578 static bool gr_locked = false;
579 static bool sgr_locked = false;
580+static const char *newroot = "";
581
582 /* local function prototypes */
583 static void fail_exit (int status);
584+static void usage (void);
585+static void process_flags (int argc, char **argv);
586
587 static void fail_exit (int status)
588 {
589@@ -83,6 +95,77 @@
590 exit (status);
591 }
592
593+/*
594+ * usage - display usage message and exit
595+ */
596+static void usage (void)
597+{
598+ (void) fprintf (stderr,
599+ _("Usage: grpunconv [options]\n"
600+ "\n"
601+ "Options:\n"),
602+ Prog);
603+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
604+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
605+ (void) fputs ("\n", stderr);
606+ exit (E_USAGE);
607+}
608+
609+/*
610+ * process_flags - perform command line argument setting
611+ *
612+ * process_flags() interprets the command line arguments and sets
613+ * the values that the user will be created with accordingly. The
614+ * values are checked for sanity.
615+ */
616+static void process_flags (int argc, char **argv)
617+{
618+ {
619+ /*
620+ * Parse the command line options.
621+ */
622+ int c;
623+ static struct option long_options[] = {
624+ {"help", no_argument, NULL, 'h'},
625+ {"root", required_argument, NULL, 'R'},
626+ {NULL, 0, NULL, '\0'}
627+ };
628+ while ((c = getopt_long (argc, argv,
629+ "R:",
630+ long_options, NULL)) != -1) {
631+ switch (c) {
632+ case 'h':
633+ usage ();
634+ break;
635+ case 'R':
636+ if ('/' != optarg[0]) {
637+ fprintf (stderr,
638+ _("%s: invalid chroot path '%s'\n"),
639+ Prog, optarg);
640+ exit (E_BAD_ARG);
641+ }
642+ newroot = optarg;
643+
644+ if (access (newroot, F_OK) != 0) {
645+ fprintf(stderr,
646+ _("%s: chroot directory %s does not exist\n"),
647+ Prog, newroot);
648+ exit (E_BAD_ARG);
649+ }
650+ if ( chroot(newroot) != 0 ) {
651+ fprintf(stderr,
652+ _("%s: unable to chroot to directory %s\n"),
653+ Prog, newroot);
654+ exit (E_BAD_ARG);
655+ }
656+ break;
657+ default:
658+ usage ();
659+ }
660+ }
661+ }
662+}
663+
664 int main (int argc, char **argv)
665 {
666 const struct group *gr;
667@@ -100,6 +183,8 @@
668
669 OPENLOG ("grpunconv");
670
671+ process_flags (argc, argv);
672+
673 if (sgr_file_present () == 0) {
674 exit (0); /* no /etc/gshadow, nothing to do */
675 }
676diff -urN shadow-4.1.4.3.orig//src/passwd.c shadow-4.1.4.3//src/passwd.c
677--- shadow-4.1.4.3.orig//src/passwd.c 2011-09-29 12:00:45.214000091 +0100
678+++ shadow-4.1.4.3//src/passwd.c 2011-09-29 11:59:28.388000092 +0100
679@@ -75,6 +75,7 @@
680 static char *name; /* The name of user whose password is being changed */
681 static char *myname; /* The current user's name */
682 static bool amroot; /* The caller's real UID was 0 */
683+static const char *newroot = "";
684
685 static bool
686 aflg = false, /* -a - show status for all users */
687@@ -174,6 +175,7 @@
688 " -n, --mindays MIN_DAYS set minimum number of days before password\n"
689 " change to MIN_DAYS\n"
690 " -q, --quiet quiet mode\n"
691+ " -R, --root CHROOT_DIR directory to chroot into\n"
692 " -r, --repository REPOSITORY change password in REPOSITORY repository\n"
693 " -S, --status report password status on the named account\n"
694 " -u, --unlock unlock the password of the named account\n"
695@@ -803,6 +805,7 @@
696 {"lock", no_argument, NULL, 'l'},
697 {"mindays", required_argument, NULL, 'n'},
698 {"quiet", no_argument, NULL, 'q'},
699+ {"root", required_argument, NULL, 'R'},
700 {"repository", required_argument, NULL, 'r'},
701 {"status", no_argument, NULL, 'S'},
702 {"unlock", no_argument, NULL, 'u'},
703@@ -811,7 +814,7 @@
704 {NULL, 0, NULL, '\0'}
705 };
706
707- while ((c = getopt_long (argc, argv, "adei:kln:qr:Suw:x:",
708+ while ((c = getopt_long (argc, argv, "adei:kln:qR:r:Suw:x:",
709 long_options, &option_index)) != -1) {
710 switch (c) {
711 case 'a':
712@@ -858,6 +861,28 @@
713 case 'q':
714 qflg = true; /* ok for users */
715 break;
716+ case 'R':
717+ if ('/' != optarg[0]) {
718+ fprintf (stderr,
719+ _("%s: invalid chroot path '%s'\n"),
720+ Prog, optarg);
721+ exit (E_BAD_ARG);
722+ }
723+ newroot = optarg;
724+
725+ if (access (newroot, F_OK) != 0) {
726+ fprintf(stderr,
727+ _("%s: chroot directory %s does not exist\n"),
728+ Prog, newroot);
729+ exit (E_BAD_ARG);
730+ }
731+ if ( chroot(newroot) != 0 ) {
732+ fprintf(stderr,
733+ _("%s: unable to chroot to directory %s\n"),
734+ Prog, newroot);
735+ exit (E_BAD_ARG);
736+ }
737+ break;
738 case 'r':
739 /* -r repository (files|nis|nisplus) */
740 /* only "files" supported for now */
741diff -urN shadow-4.1.4.3.orig//src/pwconv.c shadow-4.1.4.3//src/pwconv.c
742--- shadow-4.1.4.3.orig//src/pwconv.c 2011-09-29 12:00:45.214000091 +0100
743+++ shadow-4.1.4.3//src/pwconv.c 2011-09-29 11:59:28.388000092 +0100
744@@ -59,6 +59,7 @@
745
746 #include <errno.h>
747 #include <fcntl.h>
748+#include <getopt.h>
749 #include <pwd.h>
750 #include <stdio.h>
751 #include <stdlib.h>
752@@ -79,6 +80,7 @@
753 #define E_SUCCESS 0 /* success */
754 #define E_NOPERM 1 /* permission denied */
755 #define E_USAGE 2 /* invalid command syntax */
756+#define E_BAD_ARG 3 /* invalid argument to option */
757 #define E_FAILURE 3 /* unexpected failure, nothing done */
758 #define E_MISSING 4 /* unexpected failure, passwd file missing */
759 #define E_PWDBUSY 5 /* passwd file(s) busy */
760@@ -90,9 +92,12 @@
761
762 static bool spw_locked = false;
763 static bool pw_locked = false;
764+static const char *newroot = "";
765
766 /* local function prototypes */
767 static void fail_exit (int status);
768+static void usage (void);
769+static void process_flags (int argc, char **argv);
770
771 static void fail_exit (int status)
772 {
773@@ -115,6 +120,77 @@
774 exit (status);
775 }
776
777+/*
778+ * usage - display usage message and exit
779+ */
780+static void usage (void)
781+{
782+ (void) fprintf (stderr,
783+ _("Usage: pwconv [options]\n"
784+ "\n"
785+ "Options:\n"),
786+ Prog);
787+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
788+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
789+ (void) fputs ("\n", stderr);
790+ exit (E_USAGE);
791+}
792+
793+/*
794+ * process_flags - perform command line argument setting
795+ *
796+ * process_flags() interprets the command line arguments and sets
797+ * the values that the user will be created with accordingly. The
798+ * values are checked for sanity.
799+ */
800+static void process_flags (int argc, char **argv)
801+{
802+ {
803+ /*
804+ * Parse the command line options.
805+ */
806+ int c;
807+ static struct option long_options[] = {
808+ {"help", no_argument, NULL, 'h'},
809+ {"root", required_argument, NULL, 'R'},
810+ {NULL, 0, NULL, '\0'}
811+ };
812+ while ((c = getopt_long (argc, argv,
813+ "R:",
814+ long_options, NULL)) != -1) {
815+ switch (c) {
816+ case 'h':
817+ usage ();
818+ break;
819+ case 'R':
820+ if ('/' != optarg[0]) {
821+ fprintf (stderr,
822+ _("%s: invalid chroot path '%s'\n"),
823+ Prog, optarg);
824+ exit (E_BAD_ARG);
825+ }
826+ newroot = optarg;
827+
828+ if (access (newroot, F_OK) != 0) {
829+ fprintf(stderr,
830+ _("%s: chroot directory %s does not exist\n"),
831+ Prog, newroot);
832+ exit (E_BAD_ARG);
833+ }
834+ if ( chroot(newroot) != 0 ) {
835+ fprintf(stderr,
836+ _("%s: unable to chroot to directory %s\n"),
837+ Prog, newroot);
838+ exit (E_BAD_ARG);
839+ }
840+ break;
841+ default:
842+ usage ();
843+ }
844+ }
845+ }
846+}
847+
848 int main (int argc, char **argv)
849 {
850 const struct passwd *pw;
851@@ -122,9 +198,6 @@
852 const struct spwd *sp;
853 struct spwd spent;
854
855- if (1 != argc) {
856- (void) fputs (_("Usage: pwconv\n"), stderr);
857- }
858 Prog = Basename (argv[0]);
859
860 (void) setlocale (LC_ALL, "");
861@@ -133,6 +206,8 @@
862
863 OPENLOG ("pwconv");
864
865+ process_flags (argc, argv);
866+
867 if (pw_lock () == 0) {
868 fprintf (stderr,
869 _("%s: cannot lock %s; try again later.\n"),
870diff -urN shadow-4.1.4.3.orig//src/pwunconv.c shadow-4.1.4.3//src/pwunconv.c
871--- shadow-4.1.4.3.orig//src/pwunconv.c 2011-09-29 12:00:45.214000091 +0100
872+++ shadow-4.1.4.3//src/pwunconv.c 2011-09-29 11:59:28.388000092 +0100
873@@ -35,6 +35,7 @@
874 #ident "$Id: pwunconv.c 2852 2009-04-30 21:44:35Z nekral-guest $"
875
876 #include <fcntl.h>
877+#include <getopt.h>
878 #include <pwd.h>
879 #include <stdio.h>
880 #include <sys/types.h>
881@@ -46,15 +47,24 @@
882 #include "shadowio.h"
883
884 /*
885+ * exit status values
886+ */
887+/*@-exitarg@*/
888+#define E_USAGE 2 /* invalid command syntax */
889+#define E_BAD_ARG 3 /* invalid argument to option */
890+/*
891 * Global variables
892 */
893 char *Prog;
894
895 static bool spw_locked = false;
896 static bool pw_locked = false;
897+static const char *newroot = "";
898
899 /* local function prototypes */
900 static void fail_exit (int status);
901+static void usage (void);
902+static void process_flags (int argc, char **argv);
903
904 static void fail_exit (int status)
905 {
906@@ -75,6 +85,76 @@
907 exit (status);
908 }
909
910+/*
911+ * usage - display usage message and exit
912+ */
913+static void usage (void)
914+{
915+ (void) fprintf (stderr,
916+ _("Usage: pwunconv [options]\n"
917+ "\n"
918+ "Options:\n"),
919+ Prog);
920+ (void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
921+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
922+ (void) fputs ("\n", stderr);
923+ exit (E_USAGE);
924+}
925+
926+/*
927+ * process_flags - perform command line argument setting
928+ *
929+ * process_flags() interprets the command line arguments and sets
930+ * the values that the user will be created with accordingly. The
931+ * values are checked for sanity.
932+ */
933+static void process_flags (int argc, char **argv)
934+{
935+ {
936+ /*
937+ * Parse the command line options.
938+ */
939+ int c;
940+ static struct option long_options[] = {
941+ {"help", no_argument, NULL, 'h'},
942+ {"root", required_argument, NULL, 'R'},
943+ {NULL, 0, NULL, '\0'}
944+ };
945+ while ((c = getopt_long (argc, argv,
946+ "R:",
947+ long_options, NULL)) != -1) {
948+ switch (c) {
949+ case 'h':
950+ usage ();
951+ break;
952+ case 'R':
953+ if ('/' != optarg[0]) {
954+ fprintf (stderr,
955+ _("%s: invalid chroot path '%s'\n"),
956+ Prog, optarg);
957+ exit (E_BAD_ARG);
958+ }
959+ newroot = optarg;
960+
961+ if (access (newroot, F_OK) != 0) {
962+ fprintf(stderr,
963+ _("%s: chroot directory %s does not exist\n"),
964+ Prog, newroot);
965+ exit (E_BAD_ARG);
966+ }
967+ if ( chroot(newroot) != 0 ) {
968+ fprintf(stderr,
969+ _("%s: unable to chroot to directory %s\n"),
970+ Prog, newroot);
971+ exit (E_BAD_ARG);
972+ }
973+ break;
974+ default:
975+ usage ();
976+ }
977+ }
978+ }
979+}
980
981 int main (int argc, char **argv)
982 {
983@@ -93,6 +173,8 @@
984
985 OPENLOG ("pwunconv");
986
987+ process_flags (argc, argv);
988+
989 if (!spw_file_present ()) {
990 /* shadow not installed, do nothing */
991 exit (0);
992diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3//src/useradd.c
993--- shadow-4.1.4.3.orig//src/useradd.c 2011-09-29 12:00:45.215000091 +0100
994+++ shadow-4.1.4.3//src/useradd.c 2011-09-29 11:59:28.520000092 +0100
995@@ -112,6 +112,7 @@
996 #ifdef WITH_SELINUX
997 static const char *user_selinux = "";
998 #endif
999+static const char *newroot = "";
1000
1001 static long user_expire = -1;
1002 static bool is_shadow_pwd;
1003@@ -189,6 +190,7 @@
1004 static void new_spent (struct spwd *);
1005 static void grp_update (void);
1006
1007+static void process_root_flag (int argc, char **argv);
1008 static void process_flags (int argc, char **argv);
1009 static void close_files (void);
1010 static void open_files (void);
1011@@ -711,6 +713,7 @@
1012 (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
1013 " (non-unique) UID\n"), stderr);
1014 (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
1015+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
1016 (void) fputs (_(" -r, --system create a system account\n"), stderr);
1017 (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
1018 (void) fputs (_(" -u, --uid UID user ID of the new account\n"), stderr);
1019@@ -943,6 +946,57 @@
1020 }
1021
1022 /*
1023+ * process_root_flag - chroot if given the --root option
1024+ *
1025+ * We do this outside of process_flags() because
1026+ * the is_shadow_pwd boolean needs to be set before
1027+ * process_flags(), and if we do need to chroot() we
1028+ * must do so before is_shadow_pwd gets set.
1029+ */
1030+static void process_root_flag (int argc, char **argv)
1031+{
1032+ /*
1033+ * Parse the command line options.
1034+ */
1035+ int i;
1036+ char *root;
1037+
1038+ for (i = 0; i < argc; i++) {
1039+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
1040+ if (i + 1 == argc) {
1041+ fprintf (stderr,
1042+ _("%s: option '%s' requires an argument\n"),
1043+ Prog, argv[i]);
1044+ exit (E_BAD_ARG);
1045+ }
1046+ root = argv[i + 1];
1047+
1048+ if ('/' != root[0]) {
1049+ fprintf (stderr,
1050+ _("%s: invalid chroot path '%s'\n"),
1051+ Prog, root);
1052+ exit (E_BAD_ARG);
1053+ }
1054+ newroot = root;
1055+
1056+ if (access (newroot, F_OK) != 0) {
1057+ fprintf(stderr,
1058+ _("%s: chroot directory %s does not exist\n"),
1059+ Prog, newroot);
1060+ exit (E_BAD_ARG);
1061+ }
1062+ if ( chroot(newroot) != 0 ) {
1063+ fprintf(stderr,
1064+ _("%s: unable to chroot to directory %s\n"),
1065+ Prog, newroot);
1066+ exit (E_BAD_ARG);
1067+ }
1068+ break;
1069+ }
1070+ }
1071+}
1072+
1073+/*
1074 * process_flags - perform command line argument setting
1075 *
1076 * process_flags() interprets the command line arguments and sets
1077@@ -978,6 +1032,7 @@
1078 {"no-user-group", no_argument, NULL, 'N'},
1079 {"non-unique", no_argument, NULL, 'o'},
1080 {"password", required_argument, NULL, 'p'},
1081+ {"root", required_argument, NULL, 'R'},
1082 {"system", no_argument, NULL, 'r'},
1083 {"shell", required_argument, NULL, 's'},
1084 #ifdef WITH_SELINUX
1085@@ -989,9 +1044,9 @@
1086 };
1087 while ((c = getopt_long (argc, argv,
1088 #ifdef WITH_SELINUX
1089- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
1090+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
1091 #else
1092- "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
1093+ "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
1094 #endif
1095 long_options, NULL)) != -1) {
1096 switch (c) {
1097@@ -1156,6 +1211,9 @@
1098 }
1099 user_pass = optarg;
1100 break;
1101+ case 'R':
1102+ /* no-op since we handled this in process_root_flag() earlier */
1103+ break;
1104 case 'r':
1105 rflg = true;
1106 break;
1107@@ -1735,6 +1793,36 @@
1108 }
1109 }
1110 #endif
1111+
1112+/*
1113+ * mkdir_p - create directories, including parent directories when needed
1114+ *
1115+ * similar to mkdir -p
1116+ */
1117+void mkdir_p(const char *path) {
1118+ int len = strlen(path);
1119+ char newdir[len + 1];
1120+ mode_t mode = 0755;
1121+ int i = 0;
1122+
1123+ if (path[i] == '\0') {
1124+ return;
1125+ }
1126+
1127+ /* skip the leading '/' */
1128+ i++;
1129+
1130+ while(path[i] != '\0') {
1131+ if (path[i] == '/') {
1132+ strncpy(newdir, path, i);
1133+ newdir[i] = '\0';
1134+ mkdir(newdir, mode);
1135+ }
1136+ i++;
1137+ }
1138+ mkdir(path, mode);
1139+}
1140+
1141 /*
1142 * create_home - create the user's home directory
1143 *
1144@@ -1748,34 +1836,31 @@
1145 #ifdef WITH_SELINUX
1146 selinux_file_context (user_home);
1147 #endif
1148- /* XXX - create missing parent directories. --marekm */
1149- if (mkdir (user_home, 0) != 0) {
1150- fprintf (stderr,
1151- _("%s: cannot create directory %s\n"),
1152- Prog, user_home);
1153-#ifdef WITH_AUDIT
1154- audit_logger (AUDIT_ADD_USER, Prog,
1155- "adding home directory",
1156- user_name, (unsigned int) user_id,
1157- SHADOW_AUDIT_FAILURE);
1158-#endif
1159- fail_exit (E_HOMEDIR);
1160- }
1161- chown (user_home, user_id, user_gid);
1162- chmod (user_home,
1163- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
1164- home_added = true;
1165+ mkdir_p(user_home);
1166+ }
1167+ if (access (user_home, F_OK) != 0) {
1168 #ifdef WITH_AUDIT
1169 audit_logger (AUDIT_ADD_USER, Prog,
1170 "adding home directory",
1171 user_name, (unsigned int) user_id,
1172- SHADOW_AUDIT_SUCCESS);
1173+ SHADOW_AUDIT_FAILURE);
1174+#endif
1175+ fail_exit (E_HOMEDIR);
1176+ }
1177+ chown (user_home, user_id, user_gid);
1178+ chmod (user_home,
1179+ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
1180+ home_added = true;
1181+#ifdef WITH_AUDIT
1182+ audit_logger (AUDIT_ADD_USER, Prog,
1183+ "adding home directory",
1184+ user_name, (unsigned int) user_id,
1185+ SHADOW_AUDIT_SUCCESS);
1186 #endif
1187 #ifdef WITH_SELINUX
1188- /* Reset SELinux to create files with default contexts */
1189- setfscreatecon (NULL);
1190+ /* Reset SELinux to create files with default contexts */
1191+ setfscreatecon (NULL);
1192 #endif
1193- }
1194 }
1195
1196 /*
1197@@ -1861,6 +1946,7 @@
1198 */
1199 user_groups[0] = (char *) 0;
1200
1201+ process_root_flag (argc, argv);
1202
1203 is_shadow_pwd = spw_file_present ();
1204 #ifdef SHADOWGRP
1205diff -urN shadow-4.1.4.3.orig//src/userdel.c shadow-4.1.4.3//src/userdel.c
1206--- shadow-4.1.4.3.orig//src/userdel.c 2011-09-29 12:00:45.216000091 +0100
1207+++ shadow-4.1.4.3//src/userdel.c 2011-09-29 11:59:28.389000092 +0100
1208@@ -79,6 +79,7 @@
1209 static char *user_name;
1210 static uid_t user_id;
1211 static char *user_home;
1212+static const char *newroot = "";
1213
1214 static bool fflg = false;
1215 static bool rflg = false;
1216@@ -119,6 +120,7 @@
1217 " -f, --force force removal of files,\n"
1218 " even if not owned by user\n"
1219 " -h, --help display this help message and exit\n"
1220+ " -R, --root CHROOT_DIR directory to chroot into\n"
1221 " -r, --remove remove home directory and mail spool\n"
1222 "\n"), stderr);
1223 exit (E_USAGE);
1224@@ -768,12 +770,34 @@
1225 {"remove", no_argument, NULL, 'r'},
1226 {NULL, 0, NULL, '\0'}
1227 };
1228- while ((c = getopt_long (argc, argv, "fhr",
1229+ while ((c = getopt_long (argc, argv, "fhR:r",
1230 long_options, NULL)) != -1) {
1231 switch (c) {
1232 case 'f': /* force remove even if not owned by user */
1233 fflg = true;
1234 break;
1235+ case 'R':
1236+ if ('/' != optarg[0]) {
1237+ fprintf (stderr,
1238+ _("%s: invalid chroot path '%s'\n"),
1239+ Prog, optarg);
1240+ exit (E_BAD_ARG);
1241+ }
1242+ newroot = optarg;
1243+
1244+ if (access (newroot, F_OK) != 0) {
1245+ fprintf(stderr,
1246+ _("%s: chroot directory %s does not exist\n"),
1247+ Prog, newroot);
1248+ exit (E_BAD_ARG);
1249+ }
1250+ if ( chroot(newroot) != 0 ) {
1251+ fprintf(stderr,
1252+ _("%s: unable to chroot to directory %s\n"),
1253+ Prog, newroot);
1254+ exit (E_BAD_ARG);
1255+ }
1256+ break;
1257 case 'r': /* remove home dir and mailbox */
1258 rflg = true;
1259 break;
1260diff -urN shadow-4.1.4.3.orig//src/usermod.c shadow-4.1.4.3//src/usermod.c
1261--- shadow-4.1.4.3.orig//src/usermod.c 2011-09-29 12:00:45.216000091 +0100
1262+++ shadow-4.1.4.3//src/usermod.c 2011-09-29 11:59:28.390000092 +0100
1263@@ -110,6 +110,7 @@
1264 static long user_newinactive;
1265 static long sys_ngroups;
1266 static char **user_groups; /* NULL-terminated list */
1267+static const char *newroot = "";
1268
1269 static bool
1270 aflg = false, /* append to existing secondary group set */
1271@@ -164,6 +165,7 @@
1272 #endif
1273 static void grp_update (void);
1274
1275+static void process_root_flag (int, char **);
1276 static void process_flags (int, char **);
1277 static void close_files (void);
1278 static void open_files (void);
1279@@ -323,6 +325,7 @@
1280 " new location (use only with -d)\n"
1281 " -o, --non-unique allow using duplicate (non-unique) UID\n"
1282 " -p, --password PASSWORD use encrypted password for the new password\n"
1283+ " -R --root CHROOT_DIR directory to chroot into\n"
1284 " -s, --shell SHELL new login shell for the user account\n"
1285 " -u, --uid UID new UID for the user account\n"
1286 " -U, --unlock unlock the user account\n"
1287@@ -802,6 +805,58 @@
1288 }
1289
1290 /*
1291+ * process_root_flag - chroot if given the --root option
1292+ *
1293+ * We do this outside of process_flags() because
1294+ * the is_shadow_pwd boolean needs to be set before
1295+ * process_flags(), and if we do need to chroot() we
1296+ * must do so before is_shadow_pwd gets set.
1297+ */
1298+static void process_root_flag (int argc, char **argv)
1299+{
1300+ /*
1301+ * Parse the command line options.
1302+ */
1303+ int i;
1304+ char *root;
1305+
1306+ for (i = 0; i < argc; i++) {
1307+ if (!strcmp (argv[i], "--root") || !strcmp (argv[i], "-R")) {
1308+ if (i + 1 == argc) {
1309+ fprintf (stderr,
1310+ _("%s: option '%s' requires an argument\n"),
1311+ Prog, argv[i]);
1312+ exit (E_BAD_ARG);
1313+ }
1314+ root = argv[i + 1];
1315+
1316+ if ( (!VALID (root) )
1317+ || ( ('/' != root[0]) ) ) {
1318+ fprintf (stderr,
1319+ _("%s: invalid chroot path '%s'\n"),
1320+ Prog, root);
1321+ exit (E_BAD_ARG);
1322+ }
1323+ newroot = root;
1324+
1325+ if (access (newroot, F_OK) != 0) {
1326+ fprintf(stderr,
1327+ _("%s: chroot directory %s does not exist\n"),
1328+ Prog, newroot);
1329+ exit (E_BAD_ARG);
1330+ }
1331+ if ( chroot(newroot) != 0 ) {
1332+ fprintf(stderr,
1333+ _("%s: unable to chroot to directory %s\n"),
1334+ Prog, newroot);
1335+ exit (E_BAD_ARG);
1336+ }
1337+ break;
1338+ }
1339+ }
1340+}
1341+
1342+/*
1343 * process_flags - perform command line argument setting
1344 *
1345 * process_flags() interprets the command line arguments and sets the
1346@@ -895,6 +950,7 @@
1347 {"move-home", no_argument, NULL, 'm'},
1348 {"non-unique", no_argument, NULL, 'o'},
1349 {"password", required_argument, NULL, 'p'},
1350+ {"root", required_argument, NULL, 'R'},
1351 #ifdef WITH_SELINUX
1352 {"selinux-user", required_argument, NULL, 'Z'},
1353 #endif
1354@@ -905,9 +961,9 @@
1355 };
1356 while ((c = getopt_long (argc, argv,
1357 #ifdef WITH_SELINUX
1358- "ac:d:e:f:g:G:hl:Lmop:s:u:UZ:",
1359+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
1360 #else
1361- "ac:d:e:f:g:G:hl:Lmop:s:u:U",
1362+ "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
1363 #endif
1364 long_options, NULL)) != -1) {
1365 switch (c) {
1366@@ -999,6 +1055,9 @@
1367 user_pass = optarg;
1368 pflg = true;
1369 break;
1370+ case 'R':
1371+ /* no-op since we handled this in process_root_flag() earlier */
1372+ break;
1373 case 's':
1374 if (!VALID (optarg)) {
1375 fprintf (stderr,
1376@@ -1715,6 +1774,8 @@
1377
1378 OPENLOG ("usermod");
1379
1380+ process_root_flag (argc, argv);
1381+
1382 is_shadow_pwd = spw_file_present ();
1383 #ifdef SHADOWGRP
1384 is_shadow_grp = sgr_file_present ();
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
new file mode 100644
index 0000000000..eafb935a3a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
@@ -0,0 +1,208 @@
1Upstream-Status: Inappropriate [OE specific]
2
3Allow for setting password in clear text.
4
5Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
6
7---
8 src/Makefile.am | 8 ++++----
9 src/groupadd.c | 8 +++++++-
10 src/groupmod.c | 9 ++++++++-
11 src/useradd.c | 9 +++++++--
12 src/usermod.c | 10 ++++++++--
13 5 files changed, 34 insertions(+), 10 deletions(-)
14
15diff --git a/src/Makefile.am b/src/Makefile.am
16index 6a3b4c5..1ffdbc6 100644
17--- a/src/Makefile.am
18+++ b/src/Makefile.am
19@@ -76,10 +76,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
20 chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
21 chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
22 gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
23-groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
24+groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
25 groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
26 groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX)
27-groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
28+groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
29 grpck_LDADD = $(LDADD) $(LIBSELINUX)
30 grpconv_LDADD = $(LDADD) $(LIBSELINUX)
31 grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
32@@ -99,9 +99,9 @@ su_SOURCES = \
33 suauth.c
34 su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
35 sulogin_LDADD = $(LDADD) $(LIBCRYPT)
36-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
37+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
38 userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
39-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
40+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
41 vipw_LDADD = $(LDADD) $(LIBSELINUX)
42
43 install-am: all-am
44diff --git a/src/groupadd.c b/src/groupadd.c
45index 66b38de..3157486 100644
46--- a/src/groupadd.c
47+++ b/src/groupadd.c
48@@ -124,6 +124,7 @@ static void usage (void)
49 (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
50 " (non-unique) GID\n"), stderr);
51 (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
52+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear text password for the new group\n"), stderr);
53 (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
54 (void) fputs (_(" -r, --system create a system account\n"), stderr);
55 (void) fputs ("\n", stderr);
56@@ -388,13 +389,14 @@ static void process_flags (int argc, char **argv)
57 {"key", required_argument, NULL, 'K'},
58 {"non-unique", no_argument, NULL, 'o'},
59 {"password", required_argument, NULL, 'p'},
60+ {"clear-password", required_argument, NULL, 'P'},
61 {"root", required_argument, NULL, 'R'},
62 {"system", no_argument, NULL, 'r'},
63 {NULL, 0, NULL, '\0'}
64 };
65
66 while ((c =
67- getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
68+ getopt_long (argc, argv, "fg:hK:op:P:R:r", long_options,
69 &option_index)) != -1) {
70 switch (c) {
71 case 'f':
72@@ -446,6 +448,10 @@ static void process_flags (int argc, char **argv)
73 pflg = true;
74 group_passwd = optarg;
75 break;
76+ case 'P':
77+ pflg = true;
78+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
79+ break;
80 case 'R':
81 if ('/' != optarg[0]) {
82 fprintf (stderr,
83diff --git a/src/groupmod.c b/src/groupmod.c
84index 27eb159..17acbc3 100644
85--- a/src/groupmod.c
86+++ b/src/groupmod.c
87@@ -127,6 +127,8 @@ static void usage (void)
88 (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
89 (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
90 " PASSWORD\n"), stderr);
91+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this (clear text)\n"
92+ " PASSWORD\n"), stderr);
93 (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
94 (void) fputs ("\n", stderr);
95 exit (E_USAGE);
96@@ -348,11 +350,12 @@ static void process_flags (int argc, char **argv)
97 {"new-name", required_argument, NULL, 'n'},
98 {"non-unique", no_argument, NULL, 'o'},
99 {"password", required_argument, NULL, 'p'},
100+ {"clear-password", required_argument, NULL, 'P'},
101 {"root", required_argument, NULL, 'R'},
102 {NULL, 0, NULL, '\0'}
103 };
104 while ((c =
105- getopt_long (argc, argv, "g:hn:op:R:",
106+ getopt_long (argc, argv, "g:hn:op:P:R:",
107 long_options, &option_index)) != -1) {
108 switch (c) {
109 case 'g':
110@@ -376,6 +379,10 @@ static void process_flags (int argc, char **argv)
111 group_passwd = optarg;
112 pflg = true;
113 break;
114+ case 'P':
115+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
116+ pflg = true;
117+ break;
118 case 'R':
119 if ('/' != optarg[0]) {
120 fprintf (stderr,
121diff --git a/src/useradd.c b/src/useradd.c
122index 2102630..390909c 100644
123--- a/src/useradd.c
124+++ b/src/useradd.c
125@@ -716,6 +716,7 @@ static void usage (void)
126 (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
127 " (non-unique) UID\n"), stderr);
128 (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
129+ (void) fputs (_(" -P, --clear-password PASSWORD clear text password of the new account\n"), stderr);
130 (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
131 (void) fputs (_(" -r, --system create a system account\n"), stderr);
132 (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
133@@ -1035,6 +1036,7 @@ static void process_flags (int argc, char **argv)
134 {"no-user-group", no_argument, NULL, 'N'},
135 {"non-unique", no_argument, NULL, 'o'},
136 {"password", required_argument, NULL, 'p'},
137+ {"clear-password", required_argument, NULL, 'P'},
138 {"root", required_argument, NULL, 'R'},
139 {"system", no_argument, NULL, 'r'},
140 {"shell", required_argument, NULL, 's'},
141@@ -1047,9 +1049,9 @@ static void process_flags (int argc, char **argv)
142 };
143 while ((c = getopt_long (argc, argv,
144 #ifdef WITH_SELINUX
145- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
146+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:UZ:",
147 #else
148- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
149+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:U",
150 #endif
151 long_options, NULL)) != -1) {
152 switch (c) {
153@@ -1214,6 +1216,9 @@ static void process_flags (int argc, char **argv)
154 }
155 user_pass = optarg;
156 break;
157+ case 'P': /* set clear text password */
158+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
159+ break;
160 case 'R':
161 /* no-op since we handled this in process_root_flag() earlier */
162 break;
163diff --git a/src/usermod.c b/src/usermod.c
164index 8363597..f4c1cee 100644
165--- a/src/usermod.c
166+++ b/src/usermod.c
167@@ -325,6 +325,7 @@ static void usage (void)
168 " new location (use only with -d)\n"
169 " -o, --non-unique allow using duplicate (non-unique) UID\n"
170 " -p, --password PASSWORD use encrypted password for the new password\n"
171+ " -P, --clear-password PASSWORD use clear text password for the new password\n"
172 " -R --root CHROOT_DIR directory to chroot into\n"
173 " -s, --shell SHELL new login shell for the user account\n"
174 " -u, --uid UID new UID for the user account\n"
175@@ -950,6 +951,7 @@ static void process_flags (int argc, char **argv)
176 {"move-home", no_argument, NULL, 'm'},
177 {"non-unique", no_argument, NULL, 'o'},
178 {"password", required_argument, NULL, 'p'},
179+ {"clear-password", required_argument, NULL, 'P'},
180 {"root", required_argument, NULL, 'R'},
181 #ifdef WITH_SELINUX
182 {"selinux-user", required_argument, NULL, 'Z'},
183@@ -961,9 +963,9 @@ static void process_flags (int argc, char **argv)
184 };
185 while ((c = getopt_long (argc, argv,
186 #ifdef WITH_SELINUX
187- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
188+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UZ:",
189 #else
190- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
191+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U",
192 #endif
193 long_options, NULL)) != -1) {
194 switch (c) {
195@@ -1055,6 +1057,10 @@ static void process_flags (int argc, char **argv)
196 user_pass = optarg;
197 pflg = true;
198 break;
199+ case 'P':
200+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
201+ pflg = true;
202+ break;
203 case 'R':
204 /* no-op since we handled this in process_root_flag() earlier */
205 break;
206--
2071.7.9.5
208
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 0000000000..1943fd6faf
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/disable-syslog.patch
@@ -0,0 +1,34 @@
1Disable use of syslog to prevent sysroot user and group additions from
2writing entries to the host's syslog. This patch should only be used
3with the shadow-native recipe.
4
5Upstream-Status: Inappropriate [disable feature]
6
7Signed-off-by: Scott Garman <scott.a.garman@intel.com>
8
9diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
10--- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800
11+++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700
12@@ -34,6 +34,9 @@
13
14 #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
15
16+/* Disable use of syslog since we're running this command against a sysroot */
17+#undef USE_SYSLOG
18+
19 #include <ctype.h>
20 #include <fcntl.h>
21 #include <getopt.h>
22diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
23--- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800
24+++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700
25@@ -34,6 +34,9 @@
26
27 #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
28
29+/* Disable use of syslog since we're running this command against a sysroot */
30+#undef USE_SYSLOG
31+
32 #include <assert.h>
33 #include <ctype.h>
34 #include <errno.h>
diff --git a/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
new file mode 100644
index 0000000000..80ebdc22a4
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/fix-etc-gshadow-reading.patch
@@ -0,0 +1,36 @@
1shadow: Fix parsing of gshadow entries
2
3Upstream-Status: Backport [http://anonscm.debian.org/viewvc/pkg-shadow?view=revision&revision=3096]
4
5newgrp command does not function properly.
6Even with the valid password, it outputs: "'Invalid password'"
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9
102010-02-14 Michael Bunk <mb@computer-leipzig.com>
11
12 * NEWS, lib/gshadow.c: Fix parsing of gshadow entries.
13
14diff -urpN a/lib/gshadow.c b/lib/gshadow.c
15--- a/lib/gshadow.c 2013-07-11 10:18:15.745450428 +0800
16+++ b/lib/gshadow.c 2013-07-11 10:17:30.465450280 +0800
17@@ -222,6 +222,7 @@ void endsgent (void)
18 if (NULL == buf) {
19 return NULL;
20 }
21+ buflen = BUFSIZ;
22 }
23
24 if (NULL == fp) {
25@@ -229,9 +230,9 @@ void endsgent (void)
26 }
27
28 #ifdef USE_NIS
29- while (fgetsx (buf, (int) sizeof buf, fp) == buf)
30+ while (fgetsx (buf, (int) buflen, fp) == buf)
31 #else
32- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
33+ if (fgetsx (buf, (int) buflen, fp) == buf)
34 #endif
35 {
36 while ( ((cp = strrchr (buf, '\n')) == NULL)
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 0000000000..8a68dd341a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
@@ -0,0 +1,386 @@
1#
2# /etc/login.defs - Configuration control definitions for the shadow package.
3#
4# $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $
5#
6
7#
8# Delay in seconds before being allowed another attempt after a login failure
9# Note: When PAM is used, some modules may enfore a minimal delay (e.g.
10# pam_unix enforces a 2s delay)
11#
12FAIL_DELAY 3
13
14#
15# Enable logging and display of /var/log/faillog login failure info.
16#
17#FAILLOG_ENAB yes
18
19#
20# Enable display of unknown usernames when login failures are recorded.
21#
22LOG_UNKFAIL_ENAB no
23
24#
25# Enable logging of successful logins
26#
27LOG_OK_LOGINS no
28
29#
30# Enable logging and display of /var/log/lastlog login time info.
31#
32#LASTLOG_ENAB yes
33
34#
35# Enable checking and display of mailbox status upon login.
36#
37# Disable if the shell startup files already check for mail
38# ("mailx -e" or equivalent).
39#
40##MAIL_CHECK_ENAB yes
41
42#
43# Enable additional checks upon password changes.
44#
45#OBSCURE_CHECKS_ENAB yes
46
47#
48# Enable checking of time restrictions specified in /etc/porttime.
49#
50#PORTTIME_CHECKS_ENAB yes
51
52#
53# Enable setting of ulimit, umask, and niceness from passwd gecos field.
54#
55#QUOTAS_ENAB yes
56
57#
58# Enable "syslog" logging of su activity - in addition to sulog file logging.
59# SYSLOG_SG_ENAB does the same for newgrp and sg.
60#
61SYSLOG_SU_ENAB yes
62SYSLOG_SG_ENAB yes
63
64#
65# If defined, either full pathname of a file containing device names or
66# a ":" delimited list of device names. Root logins will be allowed only
67# upon these devices.
68#
69CONSOLE /etc/securetty
70#CONSOLE console:tty01:tty02:tty03:tty04
71
72#
73# If defined, all su activity is logged to this file.
74#
75#SULOG_FILE /var/log/sulog
76
77#
78# If defined, ":" delimited list of "message of the day" files to
79# be displayed upon login.
80#
81#MOTD_FILE /etc/motd
82#MOTD_FILE /etc/motd:/usr/lib/news/news-motd
83
84#
85# If defined, this file will be output before each login prompt.
86#
87#ISSUE_FILE /etc/issue
88
89#
90# If defined, file which maps tty line to TERM environment parameter.
91# Each line of the file is in a format something like "vt100 tty01".
92#
93#TTYTYPE_FILE /etc/ttytype
94
95#
96# If defined, login failures will be logged here in a utmp format.
97# last, when invoked as lastb, will read /var/log/btmp, so...
98#
99#FTMP_FILE /var/log/btmp
100
101#
102# If defined, name of file whose presence which will inhibit non-root
103# logins. The contents of this file should be a message indicating
104# why logins are inhibited.
105#
106#NOLOGINS_FILE /etc/nologin
107
108#
109# If defined, the command name to display when running "su -". For
110# example, if this is defined as "su" then a "ps" will display the
111# command is "-su". If not defined, then "ps" would display the
112# name of the shell actually being run, e.g. something like "-sh".
113#
114SU_NAME su
115
116#
117# *REQUIRED*
118# Directory where mailboxes reside, _or_ name of file, relative to the
119# home directory. If you _do_ define both, #MAIL_DIR takes precedence.
120#
121#MAIL_DIR /var/spool/mail
122MAIL_FILE .mail
123
124#
125# If defined, file which inhibits all the usual chatter during the login
126# sequence. If a full pathname, then hushed mode will be enabled if the
127# user's name or shell are found in the file. If not a full pathname, then
128# hushed mode will be enabled if the file exists in the user's home directory.
129#
130HUSHLOGIN_FILE .hushlogin
131#HUSHLOGIN_FILE /etc/hushlogins
132
133#
134# If defined, either a TZ environment parameter spec or the
135# fully-rooted pathname of a file containing such a spec.
136#
137#ENV_TZ TZ=CST6CDT
138#ENV_TZ /etc/tzname
139
140#
141# If defined, an HZ environment parameter spec.
142#
143# for Linux/x86
144#ENV_HZ HZ=100
145# For Linux/Alpha...
146#ENV_HZ HZ=1024
147
148#
149# *REQUIRED* The default PATH settings, for superuser and normal users.
150#
151# (they are minimal, add the rest in the shell startup files)
152ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
153ENV_PATH PATH=/bin:/usr/bin
154
155#
156# Terminal permissions
157#
158# TTYGROUP Login tty will be assigned this group ownership.
159# TTYPERM Login tty will be set to this permission.
160#
161# If you have a "write" program which is "setgid" to a special group
162# which owns the terminals, define TTYGROUP to the group number and
163# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign
164# TTYPERM to either 622 or 600.
165#
166TTYGROUP tty
167TTYPERM 0600
168
169#
170# Login configuration initializations:
171#
172# ERASECHAR Terminal ERASE character ('\010' = backspace).
173# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
174# ULIMIT Default "ulimit" value.
175#
176# The ERASECHAR and KILLCHAR are used only on System V machines.
177# The ULIMIT is used only if the system supports it.
178# (now it works with setrlimit too; ulimit is in 512-byte units)
179#
180# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
181#
182ERASECHAR 0177
183KILLCHAR 025
184#ULIMIT 2097152
185
186# Default initial "umask" value for non-PAM enabled systems.
187# UMASK is also used by useradd and newusers to set the mode of new home
188# directories.
189# 022 is the default value, but 027, or even 077, could be considered
190# better for privacy. There is no One True Answer here: each sysadmin
191# must make up her mind.
192UMASK 022
193
194#
195# Password aging controls:
196#
197# PASS_MAX_DAYS Maximum number of days a password may be used.
198# PASS_MIN_DAYS Minimum number of days allowed between password changes.
199# PASS_MIN_LEN Minimum acceptable password length.
200# PASS_WARN_AGE Number of days warning given before a password expires.
201#
202PASS_MAX_DAYS 99999
203PASS_MIN_DAYS 0
204#PASS_MIN_LEN 5
205PASS_WARN_AGE 7
206
207#
208# If "yes", the user must be listed as a member of the first gid 0 group
209# in /etc/group (called "root" on most Linux systems) to be able to "su"
210# to uid 0 accounts. If the group doesn't exist or is empty, no one
211# will be able to "su" to uid 0.
212#
213#SU_WHEEL_ONLY no
214
215#
216# If compiled with cracklib support, where are the dictionaries
217#
218#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict
219
220#
221# Min/max values for automatic uid selection in useradd
222#
223UID_MIN 1000
224UID_MAX 60000
225# System accounts
226SYS_UID_MIN 101
227SYS_UID_MAX 999
228
229#
230# Min/max values for automatic gid selection in groupadd
231#
232GID_MIN 1000
233GID_MAX 60000
234# System accounts
235SYS_GID_MIN 101
236SYS_GID_MAX 999
237
238#
239# Max number of login retries if password is bad
240#
241LOGIN_RETRIES 5
242
243#
244# Max time in seconds for login
245#
246LOGIN_TIMEOUT 60
247
248#
249# Maximum number of attempts to change password if rejected (too easy)
250#
251#PASS_CHANGE_TRIES 5
252
253#
254# Warn about weak passwords (but still allow them) if you are root.
255#
256#PASS_ALWAYS_WARN yes
257
258#
259# Number of significant characters in the password for crypt().
260# Default is 8, don't change unless your crypt() is better.
261# Ignored if MD5_CRYPT_ENAB set to "yes".
262#
263#PASS_MAX_LEN 8
264
265#
266# Require password before chfn/chsh can make any changes.
267#
268#CHFN_AUTH yes
269
270#
271# Which fields may be changed by regular users using chfn - use
272# any combination of letters "frwh" (full name, room number, work
273# phone, home phone). If not defined, no changes are allowed.
274# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
275#
276CHFN_RESTRICT rwh
277
278#
279# Password prompt (%s will be replaced by user name).
280#
281# XXX - it doesn't work correctly yet, for now leave it commented out
282# to use the default which is just "Password: ".
283#LOGIN_STRING "%s's Password: "
284
285#
286# Only works if compiled with MD5_CRYPT defined:
287# If set to "yes", new passwords will be encrypted using the MD5-based
288# algorithm compatible with the one used by recent releases of FreeBSD.
289# It supports passwords of unlimited length and longer salt strings.
290# Set to "no" if you need to copy encrypted passwords to other systems
291# which don't understand the new algorithm. Default is "no".
292#
293# Note: If you use PAM, it is recommended to use a value consistent with
294# the PAM modules configuration.
295#
296# This variable is deprecated. You should use ENCRYPT_METHOD.
297#
298#MD5_CRYPT_ENAB no
299
300#
301# Only works if compiled with ENCRYPTMETHOD_SELECT defined:
302# If set to MD5 , MD5-based algorithm will be used for encrypting password
303# If set to SHA256, SHA256-based algorithm will be used for encrypting password
304# If set to SHA512, SHA512-based algorithm will be used for encrypting password
305# If set to DES, DES-based algorithm will be used for encrypting password (default)
306# Overrides the MD5_CRYPT_ENAB option
307#
308# Note: If you use PAM, it is recommended to use a value consistent with
309# the PAM modules configuration.
310#
311#ENCRYPT_METHOD DES
312
313#
314# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
315#
316# Define the number of SHA rounds.
317# With a lot of rounds, it is more difficult to brute forcing the password.
318# But note also that it more CPU resources will be needed to authenticate
319# users.
320#
321# If not specified, the libc will choose the default number of rounds (5000).
322# The values must be inside the 1000-999999999 range.
323# If only one of the MIN or MAX values is set, then this value will be used.
324# If MIN > MAX, the highest value will be used.
325#
326# SHA_CRYPT_MIN_ROUNDS 5000
327# SHA_CRYPT_MAX_ROUNDS 5000
328
329#
330# List of groups to add to the user's supplementary group set
331# when logging in on the console (as determined by the CONSOLE
332# setting). Default is none.
333#
334# Use with caution - it is possible for users to gain permanent
335# access to these groups, even when not logged in on the console.
336# How to do it is left as an exercise for the reader...
337#
338#CONSOLE_GROUPS floppy:audio:cdrom
339
340#
341# Should login be allowed if we can't cd to the home directory?
342# Default in no.
343#
344DEFAULT_HOME yes
345
346#
347# If this file exists and is readable, login environment will be
348# read from it. Every line should be in the form name=value.
349#
350#ENVIRON_FILE /etc/environment
351
352#
353# If defined, this command is run when removing a user.
354# It should remove any at/cron/print jobs etc. owned by
355# the user to be removed (passed as the first argument).
356#
357#USERDEL_CMD /usr/sbin/userdel_local
358
359#
360# Enable setting of the umask group bits to be the same as owner bits
361# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
362# the same as gid, and username is the same as the primary group name.
363#
364# This also enables userdel to remove user groups if no members exist.
365#
366USERGROUPS_ENAB yes
367
368#
369# If set to a non-nul number, the shadow utilities will make sure that
370# groups never have more than this number of users on one line.
371# This permit to support split groups (groups split into multiple lines,
372# with the same group ID, to avoid limitation of the line length in the
373# group file).
374#
375# 0 is the default value and disables this feature.
376#
377#MAX_MEMBERS_PER_GROUP 0
378
379#
380# If useradd should create home directories for users by default (non
381# system users only)
382# This option is overridden with the -M or -m flags on the useradd command
383# line.
384#
385CREATE_HOME yes
386
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 0000000000..0a1f3be4af
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login_defs_pam.sed
@@ -0,0 +1,32 @@
1/^FAILLOG_ENAB/b comment
2/^LASTLOG_ENAB/b comment
3/^MAIL_CHECK_ENAB/b comment
4/^OBSCURE_CHECKS_ENAB/b comment
5/^PORTTIME_CHECKS_ENAB/b comment
6/^QUOTAS_ENAB/b comment
7/^MOTD_FILE/b comment
8/^FTMP_FILE/b comment
9/^NOLOGINS_FILE/b comment
10/^ENV_HZ/b comment
11/^ENV_TZ/b comment
12/^PASS_MIN_LEN/b comment
13/^SU_WHEEL_ONLY/b comment
14/^CRACKLIB_DICTPATH/b comment
15/^PASS_CHANGE_TRIES/b comment
16/^PASS_ALWAYS_WARN/b comment
17/^PASS_MAX_LEN/b comment
18/^PASS_MIN_LEN/b comment
19/^CHFN_AUTH/b comment
20/^CHSH_AUTH/b comment
21/^ISSUE_FILE/b comment
22/^LOGIN_STRING/b comment
23/^ULIMIT/b comment
24/^ENVIRON_FILE/b comment
25
26b exit
27
28: comment
29 s:^:#:
30
31: exit
32
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 0000000000..baf7698bba
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chfn
@@ -0,0 +1,14 @@
1#
2# The PAM configuration file for the Shadow `chfn' service
3#
4
5# This allows root to change user infomation without being
6# prompted for a password
7auth sufficient pam_rootok.so
8
9# The standard Unix authentication modules, used with
10# NIS (man nsswitch) as well as normal /etc/passwd and
11# /etc/shadow entries.
12auth include common-auth
13account include common-account
14session 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 0000000000..9e3efa68ba
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd
@@ -0,0 +1,4 @@
1# The PAM configuration file for the Shadow 'chpasswd' service
2#
3
4password 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 0000000000..8fb169f64e
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chsh
@@ -0,0 +1,19 @@
1#
2# The PAM configuration file for the Shadow `chsh' service
3#
4
5# This will not allow a user to change their shell unless
6# their current one is listed in /etc/shells. This keeps
7# accounts with special shells from changing them.
8auth required pam_shells.so
9
10# This allows root to change user shell without being
11# prompted for a password
12auth sufficient pam_rootok.so
13
14# The standard Unix authentication modules, used with
15# NIS (man nsswitch) as well as normal /etc/passwd and
16# /etc/shadow entries.
17auth include common-auth
18account include common-account
19session 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 0000000000..b340058539
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/login
@@ -0,0 +1,81 @@
1#
2# The PAM configuration file for the Shadow `login' service
3#
4
5# Enforce a minimal delay in case of failure (in microseconds).
6# (Replaces the `FAIL_DELAY' setting from login.defs)
7# Note that other modules may require another minimal delay. (for example,
8# to disable any delay, you should add the nodelay option to pam_unix)
9auth optional pam_faildelay.so delay=3000000
10
11# Outputs an issue file prior to each login prompt (Replaces the
12# ISSUE_FILE option from login.defs). Uncomment for use
13# auth required pam_issue.so issue=/etc/issue
14
15# Disallows root logins except on tty's listed in /etc/securetty
16# (Replaces the `CONSOLE' setting from login.defs)
17# Note that it is included as a "requisite" module. No password prompts will
18# be displayed if this module fails to avoid having the root password
19# transmitted on unsecure ttys.
20# You can change it to a "required" module if you think it permits to
21# guess valid user names of your system (invalid user names are considered
22# as possibly being root).
23auth [success=ok ignore=ignore user_unknown=ignore default=die] pam_securetty.so
24
25# Disallows other than root logins when /etc/nologin exists
26# (Replaces the `NOLOGINS_FILE' option from login.defs)
27auth requisite pam_nologin.so
28
29# This module parses environment configuration file(s)
30# and also allows you to use an extended config
31# file /etc/security/pam_env.conf.
32#
33# parsing /etc/environment needs "readenv=1"
34session required pam_env.so readenv=1
35
36# Standard Un*x authentication.
37auth include common-auth
38
39# This allows certain extra groups to be granted to a user
40# based on things like time of day, tty, service, and user.
41# Please edit /etc/security/group.conf to fit your needs
42# (Replaces the `CONSOLE_GROUPS' option in login.defs)
43auth optional pam_group.so
44
45# Uncomment and edit /etc/security/time.conf if you need to set
46# time restrainst on logins.
47# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
48# as well as /etc/porttime)
49# account requisite pam_time.so
50
51# Uncomment and edit /etc/security/access.conf if you need to
52# set access limits.
53# (Replaces /etc/login.access file)
54# account required pam_access.so
55
56# Sets up user limits according to /etc/security/limits.conf
57# (Replaces the use of /etc/limits in old login)
58session required pam_limits.so
59
60# Prints the last login info upon succesful login
61# (Replaces the `LASTLOG_ENAB' option from login.defs)
62session optional pam_lastlog.so
63
64# Prints the motd upon succesful login
65# (Replaces the `MOTD_FILE' option in login.defs)
66session optional pam_motd.so
67
68# Prints the status of the user's mailbox upon succesful login
69# (Replaces the `MAIL_CHECK_ENAB' option from login.defs).
70#
71# This also defines the MAIL environment variable
72# However, userdel also needs MAIL_DIR and MAIL_FILE variables
73# in /etc/login.defs to make sure that removing a user
74# also removes the user's mail spool file.
75# See comments in /etc/login.defs
76session optional pam_mail.so standard
77
78# Standard Un*x account and session
79account include common-account
80password include common-password
81session 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 0000000000..4aa3dde48b
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/newusers
@@ -0,0 +1,4 @@
1# The PAM configuration file for the Shadow 'newusers' service
2#
3
4password 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 0000000000..f534992435
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/passwd
@@ -0,0 +1,5 @@
1#
2# The PAM configuration file for the Shadow `passwd' service
3#
4
5password 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 0000000000..8d590a32e6
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/su
@@ -0,0 +1,57 @@
1#
2# The PAM configuration file for the Shadow `su' service
3#
4
5# This allows root to su without passwords (normal operation)
6auth sufficient pam_rootok.so
7
8# Uncomment this to force users to be a member of group root
9# before they can use `su'. You can also add "group=foo"
10# to the end of this line if you want to use a group other
11# than the default "root" (but this may have side effect of
12# denying "root" user, unless she's a member of "foo" or explicitly
13# permitted earlier by e.g. "sufficient pam_rootok.so").
14# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
15# auth required pam_wheel.so
16
17# Uncomment this if you want wheel members to be able to
18# su without a password.
19# auth sufficient pam_wheel.so trust
20
21# Uncomment this if you want members of a specific group to not
22# be allowed to use su at all.
23# auth required pam_wheel.so deny group=nosu
24
25# Uncomment and edit /etc/security/time.conf if you need to set
26# time restrainst on su usage.
27# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
28# as well as /etc/porttime)
29# account requisite pam_time.so
30
31# This module parses environment configuration file(s)
32# and also allows you to use an extended config
33# file /etc/security/pam_env.conf.
34#
35# parsing /etc/environment needs "readenv=1"
36session required pam_env.so readenv=1
37
38# Defines the MAIL environment variable
39# However, userdel also needs MAIL_DIR and MAIL_FILE variables
40# in /etc/login.defs to make sure that removing a user
41# also removes the user's mail spool file.
42# See comments in /etc/login.defs
43#
44# "nopen" stands to avoid reporting new mail when su'ing to another user
45session optional pam_mail.so nopen
46
47# Sets up user limits, please uncomment and read /etc/security/limits.conf
48# to enable this functionality.
49# (Replaces the use of /etc/limits in old login)
50# session required pam_limits.so
51
52# The standard Unix authentication modules, used with
53# NIS (man nsswitch) as well as normal /etc/passwd and
54# /etc/shadow entries.
55auth include common-auth
56account include common-account
57session include common-session
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
new file mode 100644
index 0000000000..0b1629f143
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -0,0 +1,207 @@
1# /etc/securetty: list of terminals on which root is allowed to login.
2# See securetty(5) and login(1).
3console
4
5# Standard serial ports
6ttyS0
7ttyS1
8ttyS2
9ttyS3
10
11# ARM AMBA SoCs
12ttyAMA0
13ttyAMA1
14ttyAMA2
15ttyAMA3
16
17# Samsung ARM SoCs
18ttySAC0
19ttySAC1
20ttySAC2
21ttySAC3
22
23# TI OMAP SoCs
24ttyO0
25ttyO1
26ttyO2
27ttyO3
28
29# USB dongles
30ttyUSB0
31ttyUSB1
32ttyUSB2
33
34# USB serial gadget
35ttyGS0
36
37# PowerMac
38ttyPZ0
39ttyPZ1
40ttyPZ2
41ttyPZ3
42
43# Embedded MPC platforms
44ttyPSC0
45ttyPSC1
46ttyPSC2
47ttyPSC3
48ttyPSC4
49ttyPSC5
50
51# PA-RISC mux ports
52ttyB0
53ttyB1
54
55# Standard hypervisor virtual console
56hvc0
57
58# Oldstyle Xen console
59xvc0
60
61# Standard consoles
62tty1
63tty2
64tty3
65tty4
66tty5
67tty6
68tty7
69tty8
70tty9
71tty10
72tty11
73tty12
74tty13
75tty14
76tty15
77tty16
78tty17
79tty18
80tty19
81tty20
82tty21
83tty22
84tty23
85tty24
86tty25
87tty26
88tty27
89tty28
90tty29
91tty30
92tty31
93tty32
94tty33
95tty34
96tty35
97tty36
98tty37
99tty38
100tty39
101tty40
102tty41
103tty42
104tty43
105tty44
106tty45
107tty46
108tty47
109tty48
110tty49
111tty50
112tty51
113tty52
114tty53
115tty54
116tty55
117tty56
118tty57
119tty58
120tty59
121tty60
122tty61
123tty62
124tty63
125
126# Local X displays (allows empty passwords with pam_unix's nullok_secure)
127pts/0
128pts/1
129pts/2
130pts/3
131
132# Embedded Freescale i.MX ports
133ttymxc0
134ttymxc1
135ttymxc2
136ttymxc3
137ttymxc4
138ttymxc5
139
140# Standard serial ports, with devfs
141tts/0
142tts/1
143
144# Standard consoles, with devfs
145vc/1
146vc/2
147vc/3
148vc/4
149vc/5
150vc/6
151vc/7
152vc/8
153vc/9
154vc/10
155vc/11
156vc/12
157vc/13
158vc/14
159vc/15
160vc/16
161vc/17
162vc/18
163vc/19
164vc/20
165vc/21
166vc/22
167vc/23
168vc/24
169vc/25
170vc/26
171vc/27
172vc/28
173vc/29
174vc/30
175vc/31
176vc/32
177vc/33
178vc/34
179vc/35
180vc/36
181vc/37
182vc/38
183vc/39
184vc/40
185vc/41
186vc/42
187vc/43
188vc/44
189vc/45
190vc/46
191vc/47
192vc/48
193vc/49
194vc/50
195vc/51
196vc/52
197vc/53
198vc/54
199vc/55
200vc/56
201vc/57
202vc/58
203vc/59
204vc/60
205vc/61
206vc/62
207vc/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 0000000000..a7bb0a9290
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
@@ -0,0 +1,27 @@
1# commit message copied from openembedded:
2# commit 246c80637b135f3a113d319b163422f98174ee6c
3# Author: Khem Raj <raj.khem@gmail.com>
4# Date: Wed Jun 9 13:37:03 2010 -0700
5#
6# shadow-4.1.4.2: Add patches to support dots in login id.
7#
8# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9#
10# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
11
12Upstream-Status: Pending
13
14Signed-off-by: Scott Garman <scott.a.garman@intel.com>
15
16Index: shadow-4.1.4.2/libmisc/chkname.c
17===================================================================
18--- shadow-4.1.4.2.orig/libmisc/chkname.c 2009-04-28 12:14:04.000000000 -0700
19+++ shadow-4.1.4.2/libmisc/chkname.c 2010-06-03 17:43:20.638973857 -0700
20@@ -61,6 +61,7 @@ static bool is_valid_name (const char *n
21 ( ('0' <= *name) && ('9' >= *name) ) ||
22 ('_' == *name) ||
23 ('-' == *name) ||
24+ ('.' == *name) ||
25 ( ('$' == *name) && ('\0' == *(name + 1)) )
26 )) {
27 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 0000000000..651474674b
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-env-reset-keep-locale.patch
@@ -0,0 +1,31 @@
1# commit message copied from openembedded:
2# commit 246c80637b135f3a113d319b163422f98174ee6c
3# Author: Khem Raj <raj.khem@gmail.com>
4# Date: Wed Jun 9 13:37:03 2010 -0700
5#
6# shadow-4.1.4.2: Add patches to support dots in login id.
7#
8# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9#
10# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
11
12http://bugs.gentoo.org/283725
13https://alioth.debian.org/tracker/index.php?func=detail&aid=311740&group_id=30580&atid=411480
14
15Upstream-Status: Pending
16
17Signed-off-by: Scott Garman <scott.a.garman@intel.com>
18
19Index: shadow-4.1.4.2/libmisc/env.c
20===================================================================
21--- shadow-4.1.4.2.orig/libmisc/env.c 2009-04-27 13:07:56.000000000 -0700
22+++ shadow-4.1.4.2/libmisc/env.c 2010-06-03 17:44:51.456408474 -0700
23@@ -251,7 +251,7 @@ void sanitize_env (void)
24 if (strncmp (*cur, *bad, strlen (*bad)) != 0) {
25 continue;
26 }
27- if (strchr (*cur, '/') != NULL) {
28+ if (strchr (*cur, '/') == NULL) {
29 continue; /* OK */
30 }
31 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 0000000000..640200b796
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-groupmod-pam-check.patch
@@ -0,0 +1,36 @@
1# commit message copied from openembedded:
2# commit 246c80637b135f3a113d319b163422f98174ee6c
3# Author: Khem Raj <raj.khem@gmail.com>
4# Date: Wed Jun 9 13:37:03 2010 -0700
5#
6# shadow-4.1.4.2: Add patches to support dots in login id.
7#
8# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9#
10# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
11
12http://bugs.gentoo.org/300790
13http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html
14
152009-11-05 Nicolas François <nicolas.francois@centraliens.net>
16
17 * NEWS, src/groupmod.c: Fixed groupmod when configured with
18 --enable-account-tools-setuid.
19
20Upstream-Status: Pending
21
22Signed-off-by: Scott Garman <scott.a.garman@intel.com>
23
24Index: shadow-4.1.4.2/src/groupmod.c
25===================================================================
26--- shadow-4.1.4.2.orig/src/groupmod.c 2009-06-05 15:16:58.000000000 -0700
27+++ shadow-4.1.4.2/src/groupmod.c 2010-06-03 17:45:43.828952613 -0700
28@@ -720,7 +720,7 @@ int main (int argc, char **argv)
29 {
30 struct passwd *pampw;
31 pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */
32- if (NULL == pamh) {
33+ if (NULL == pampw) {
34 fprintf (stderr,
35 _("%s: Cannot determine your user name.\n"),
36 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 0000000000..0dc4d75b97
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.4.2-su_no_sanitize_env.patch
@@ -0,0 +1,31 @@
1# commit message copied from openembedded:
2# commit 246c80637b135f3a113d319b163422f98174ee6c
3# Author: Khem Raj <raj.khem@gmail.com>
4# Date: Wed Jun 9 13:37:03 2010 -0700
5#
6# shadow-4.1.4.2: Add patches to support dots in login id.
7#
8# Signed-off-by: Khem Raj <raj.khem@gmail.com>
9#
10# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
11
12http://bugs.gentoo.org/show_bug.cgi?id=301957
13https://alioth.debian.org/scm/browser.php?group_id=30580
14
15Upstream-Status: Pending
16
17Signed-off-by: Scott Garman <scott.a.garman@intel.com>
18
19Index: shadow-4.1.4.2/src/su.c
20===================================================================
21--- shadow-4.1.4.2.orig/src/su.c 2009-07-23 13:38:56.000000000 -0700
22+++ shadow-4.1.4.2/src/su.c 2010-06-03 17:46:47.718944010 -0700
23@@ -378,7 +378,7 @@ int main (int argc, char **argv)
24 #endif
25 #endif /* !USE_PAM */
26
27- sanitize_env ();
28+ /* sanitize_env (); */
29
30 (void) setlocale (LC_ALL, "");
31 (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 0000000000..15f8044fa2
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
@@ -0,0 +1,91 @@
1The system-auth in the configure files is from Fedora which put all the 4 pam type rules
2in one file.
3In yocto it obey the way with Debian/Ubuntu, and the names are common-auth, common-account,
4common-password and common-session.
5So update them with oe way.
6
7Upstream-Status: Pending
8
9Signed-off-by: Kang Kai <kai.kang@windriver.com>
10
11diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chage shadow-4.1.4.3/etc/pam.d/chage
12--- shadow-4.1.4.3/etc/pam.d.orig/chage 2011-07-20 19:02:27.384844958 +0800
13+++ shadow-4.1.4.3/etc/pam.d/chage 2011-07-20 19:03:08.964844958 +0800
14@@ -1,4 +1,4 @@
15 #%PAM-1.0
16 auth sufficient pam_rootok.so
17 account required pam_permit.so
18-password include system-auth
19+password include common-password
20diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chgpasswd shadow-4.1.4.3/etc/pam.d/chgpasswd
21--- shadow-4.1.4.3/etc/pam.d.orig/chgpasswd 2011-07-20 19:02:27.384844958 +0800
22+++ shadow-4.1.4.3/etc/pam.d/chgpasswd 2011-07-20 19:03:26.544844958 +0800
23@@ -1,4 +1,4 @@
24 #%PAM-1.0
25 auth sufficient pam_rootok.so
26 account required pam_permit.so
27-password include system-auth
28+password include common-password
29diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupadd shadow-4.1.4.3/etc/pam.d/groupadd
30--- shadow-4.1.4.3/etc/pam.d.orig/groupadd 2011-07-20 19:02:27.384844958 +0800
31+++ shadow-4.1.4.3/etc/pam.d/groupadd 2011-07-20 19:04:08.124844958 +0800
32@@ -1,4 +1,4 @@
33 #%PAM-1.0
34 auth sufficient pam_rootok.so
35 account required pam_permit.so
36-password include system-auth
37+password include common-password
38diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupdel shadow-4.1.4.3/etc/pam.d/groupdel
39--- shadow-4.1.4.3/etc/pam.d.orig/groupdel 2011-07-20 19:02:27.384844958 +0800
40+++ shadow-4.1.4.3/etc/pam.d/groupdel 2011-07-20 19:04:26.114844958 +0800
41@@ -1,4 +1,4 @@
42 #%PAM-1.0
43 auth sufficient pam_rootok.so
44 account required pam_permit.so
45-password include system-auth
46+password include common-password
47diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmems shadow-4.1.4.3/etc/pam.d/groupmems
48--- shadow-4.1.4.3/etc/pam.d.orig/groupmems 2011-07-20 19:02:27.384844958 +0800
49+++ shadow-4.1.4.3/etc/pam.d/groupmems 2011-07-20 19:04:35.074844958 +0800
50@@ -1,4 +1,4 @@
51 #%PAM-1.0
52 auth sufficient pam_rootok.so
53 account required pam_permit.so
54-password include system-auth
55+password include common-password
56diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmod shadow-4.1.4.3/etc/pam.d/groupmod
57--- shadow-4.1.4.3/etc/pam.d.orig/groupmod 2011-07-20 19:02:27.384844958 +0800
58+++ shadow-4.1.4.3/etc/pam.d/groupmod 2011-07-20 19:04:44.864844958 +0800
59@@ -1,4 +1,4 @@
60 #%PAM-1.0
61 auth sufficient pam_rootok.so
62 account required pam_permit.so
63-password include system-auth
64+password include common-password
65diff -Nur shadow-4.1.4.3/etc/pam.d.orig/useradd shadow-4.1.4.3/etc/pam.d/useradd
66--- shadow-4.1.4.3/etc/pam.d.orig/useradd 2011-07-20 19:02:27.384844958 +0800
67+++ shadow-4.1.4.3/etc/pam.d/useradd 2011-07-20 19:07:26.244844958 +0800
68@@ -1,4 +1,4 @@
69 #%PAM-1.0
70 auth sufficient pam_rootok.so
71 account required pam_permit.so
72-password include system-auth
73+password include common-password
74diff -Nur shadow-4.1.4.3/etc/pam.d.orig/userdel shadow-4.1.4.3/etc/pam.d/userdel
75--- shadow-4.1.4.3/etc/pam.d.orig/userdel 2011-07-20 19:02:27.384844958 +0800
76+++ shadow-4.1.4.3/etc/pam.d/userdel 2011-07-20 19:07:35.734844958 +0800
77@@ -1,4 +1,4 @@
78 #%PAM-1.0
79 auth sufficient pam_rootok.so
80 account required pam_permit.so
81-password include system-auth
82+password include common-password
83diff -Nur shadow-4.1.4.3/etc/pam.d.orig/usermod shadow-4.1.4.3/etc/pam.d/usermod
84--- shadow-4.1.4.3/etc/pam.d.orig/usermod 2011-07-20 19:02:27.384844958 +0800
85+++ shadow-4.1.4.3/etc/pam.d/usermod 2011-07-20 19:07:42.024844958 +0800
86@@ -1,4 +1,4 @@
87 #%PAM-1.0
88 auth sufficient pam_rootok.so
89 account required pam_permit.so
90-password include system-auth
91+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 0000000000..a793f09a4e
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow.automake-1.11.patch
@@ -0,0 +1,106 @@
1# patch is from openembedded:
2# commit 2db61370333f7a2fc1dbb86385734883387e0217
3# Author: Martin Jansa <Martin.Jansa@gmail.com>
4# Date: Fri Apr 2 07:34:46 2010 +0200
5#
6# shadow: fix do_install with automake-1.11
7#
8# Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9#
10# comment added by Kevin Tian <kevin.tian@intel.com>
11
12man_nopan is for !USE_PAM already included in man_MANS and automake-1.11 hates to install some file twice
13
14Upstream-Status: Pending
15
16Signed-off-by: Scott Garman <scott.a.garman@intel.com>
17
18diff -uNr shadow-4.1.4.2.orig/man/Makefile.am shadow-4.1.4.2/man/Makefile.am
19--- shadow-4.1.4.2.orig/man/Makefile.am 2009-03-14 15:40:10.000000000 +0100
20+++ shadow-4.1.4.2/man/Makefile.am 2010-04-02 07:31:17.000000000 +0200
21@@ -163,7 +163,6 @@
22 $(man_MANS) \
23 $(man_XMANS) \
24 $(addprefix login.defs.d/,$(login_defs_v)) \
25- $(man_nopam) \
26 id.1 \
27 id.1.xml \
28 sulogin.8 \
29diff -uNr shadow-4.1.4.2.orig/man/fr/Makefile.am shadow-4.1.4.2/man/fr/Makefile.am
30--- shadow-4.1.4.2.orig/man/fr/Makefile.am 2008-09-06 18:44:45.000000000 +0200
31+++ shadow-4.1.4.2/man/fr/Makefile.am 2010-04-02 07:42:11.000000000 +0200
32@@ -52,7 +52,6 @@
33
34 EXTRA_DIST = \
35 $(man_MANS) \
36- $(man_nopam) \
37 id.1
38
39 include ../generate_translations.mak
40diff -uNr shadow-4.1.4.2.orig/man/it/Makefile.am shadow-4.1.4.2/man/it/Makefile.am
41--- shadow-4.1.4.2.orig/man/it/Makefile.am 2008-09-06 18:44:45.000000000 +0200
42+++ shadow-4.1.4.2/man/it/Makefile.am 2010-04-02 07:42:20.000000000 +0200
43@@ -46,7 +46,6 @@
44
45 EXTRA_DIST = \
46 $(man_MANS) \
47- $(man_nopam) \
48 id.1 \
49 logoutd.8
50
51diff -uNr shadow-4.1.4.2.orig/man/ja/Makefile.am shadow-4.1.4.2/man/ja/Makefile.am
52--- shadow-4.1.4.2.orig/man/ja/Makefile.am 2007-12-31 17:48:28.000000000 +0100
53+++ shadow-4.1.4.2/man/ja/Makefile.am 2010-04-02 07:42:17.000000000 +0200
54@@ -49,7 +49,6 @@
55
56 EXTRA_DIST = \
57 $(man_MANS) \
58- $(man_nopam) \
59 id.1 \
60 shadow.3 \
61 sulogin.8
62diff -uNr shadow-4.1.4.2.orig/man/pl/Makefile.am shadow-4.1.4.2/man/pl/Makefile.am
63--- shadow-4.1.4.2.orig/man/pl/Makefile.am 2008-09-06 18:44:45.000000000 +0200
64+++ shadow-4.1.4.2/man/pl/Makefile.am 2010-04-02 07:42:07.000000000 +0200
65@@ -49,7 +49,6 @@
66
67 EXTRA_DIST = \
68 $(man_MANS) \
69- $(man_nopam) \
70 getspnam.3 \
71 id.1 \
72 shadow.3 \
73diff -uNr shadow-4.1.4.2.orig/man/ru/Makefile.am shadow-4.1.4.2/man/ru/Makefile.am
74--- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:39:00.000000000 +0200
75+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:42:01.000000000 +0200
76@@ -54,7 +54,6 @@
77
78 EXTRA_DIST = \
79 $(man_MANS) \
80- $(man_nopam) \
81 id.1 \
82 sulogin.8
83
84diff -uNr shadow-4.1.4.2.orig/man/sv/Makefile.am shadow-4.1.4.2/man/sv/Makefile.am
85--- shadow-4.1.4.2.orig/man/sv/Makefile.am 2008-09-06 18:44:45.000000000 +0200
86+++ shadow-4.1.4.2/man/sv/Makefile.am 2010-04-02 07:42:24.000000000 +0200
87@@ -53,8 +53,7 @@
88 endif
89
90 EXTRA_DIST = \
91- $(man_MANS) \
92- $(man_nopam)
93+ $(man_MANS)
94
95 include ../generate_translations.mak
96
97--- shadow-4.1.4.2.orig/man/ru/Makefile.am 2010-04-02 07:54:09.000000000 +0200
98+++ shadow-4.1.4.2/man/ru/Makefile.am 2010-04-02 07:51:57.000000000 +0200
99@@ -1,7 +1,6 @@
100 mandir = @mandir@/ru
101
102 man_MANS = \
103- $(man_nopam) \
104 chage.1 \
105 chfn.1 \
106 chgpasswd.8 \
diff --git a/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch b/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..6a27ed387d
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow_fix_for_automake-1.12.patch
@@ -0,0 +1,23 @@
1Upstream-Status: pending
2
3Automake 1.12 has deprecated automatic de-ANSI-fication support
4
5This patch avoids this issue with automake 1.12:
6
7| configure.in:22: error: automatic de-ANSI-fication support has been removed
8
9Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/02
11
12Index: shadow-4.1.4.3/configure.in
13===================================================================
14--- shadow-4.1.4.3.orig/configure.in
15+++ shadow-4.1.4.3/configure.in
16@@ -19,7 +19,6 @@ AC_PROG_CC
17 AC_ISC_POSIX
18 AC_PROG_LN_S
19 AC_PROG_YACC
20-AM_C_PROTOTYPES
21 AM_PROG_LIBTOOL
22
23 dnl Checks for libraries.
diff --git a/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch b/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
new file mode 100644
index 0000000000..7cd45afebb
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/slackware_fix_for_glib-2.17_crypt.patch
@@ -0,0 +1,63 @@
1
2This patch is from Slackware, I tried to find the actual
3author to add that attribution. The comment below is the
4best summary, I will not repeat it here.
5
6Upstream-Status: Backport from slackware
7
8Signed-off-by: Saul Wold <sgw@linux.intel.com>
9
10Index: shadow-4.1.4.3/lib/encrypt.c
11===================================================================
12--- shadow-4.1.4.3.orig/lib/encrypt.c
13+++ shadow-4.1.4.3/lib/encrypt.c
14@@ -45,15 +45,40 @@ char *pw_encrypt (const char *clear, con
15 static char cipher[128];
16 char *cp;
17
18- cp = crypt (clear, salt);
19- if (!cp) {
20- /*
21- * Single Unix Spec: crypt() may return a null pointer,
22- * and set errno to indicate an error. The caller doesn't
23- * expect us to return NULL, so...
24- */
25- perror ("crypt");
26- exit (EXIT_FAILURE);
27+ cp = crypt (clear, salt);
28+ if (!cp) {
29+ /*
30+ * In glibc-2.17 and newer, crypt() will return NULL if
31+ * it was called using an invalid salt format. Previous
32+ * versions of glibc would go ahead and compute a DES hash
33+ * using the invalid salt. The salt value in this case was
34+ * always '!'. We might arrive at this place if either the
35+ * user does not exist, or if the hash in /etc/shadow doesn't
36+ * have the proper magic for one of the supported hash
37+ * formats (for example, if the account was locked using
38+ * "passwd -l". To handle this situation, we will recompute
39+ * the hash using a hardcoded salt as was previously done
40+ * by glibc. The hash returned by the old glibc function
41+ * always began with "!!", which would ensure that it could
42+ * never match an otherwise valid hash in /etc/shadow that
43+ * was disabled with a "!" at the beginning (since the second
44+ * character would never be "!" as well), so we will also
45+ * prepend the resulting hash with "!!". Finally, in case
46+ * crypt() failed for some other reason we will check to see
47+ * if we still get NULL from crypt even with the valid salt
48+ * and will fail if that's the case.
49+ */
50+
51+ /* Recalculate hash using a hardcoded, valid SHA512 salt: */
52+ cp = crypt (clear, "$6$8IIcy/1EPOk/");
53+
54+ if (!cp) {
55+ perror ("crypt");
56+ exit (EXIT_FAILURE);
57+ } else {
58+ sprintf (cipher, "!!%s", cp);
59+ return cipher;
60+ }
61 }
62
63 /* The GNU crypt does not return NULL if the algorithm is not
diff --git a/meta/recipes-extended/shadow/files/useradd.patch b/meta/recipes-extended/shadow/files/useradd.patch
new file mode 100644
index 0000000000..ff5016c0bf
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/useradd.patch
@@ -0,0 +1,17 @@
1Work around a bug introduced with the --root option which was causing
2all other arguments to be ignored.
3
4Upstream-Status: inappropriate
5Signed-off-by: Phil Blundell <philb@gnu.org>
6
7--- a/src/useradd.c~ 2011-09-01 15:36:40.398234861 +0100
8+++ b/src/useradd.c 2011-09-01 17:29:00.782004133 +0100
9@@ -1957,6 +1957,8 @@
10
11 get_defaults ();
12
13+ optind = 1;
14+
15 process_flags (argc, argv);
16
17 #ifdef ACCT_TOOLS_SETUID
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 0000000000..0e0410043b
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
@@ -0,0 +1,36 @@
1SUMMARY = "Provider of the machine specific securetty file"
2SECTION = "base utils"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8PR = "r3"
9
10SRC_URI = "file://securetty"
11
12# Since SERIAL_CONSOLES is likely to be set from the machine configuration
13PACKAGE_ARCH = "${MACHINE_ARCH}"
14
15do_install () {
16 # Ensure we add a suitable securetty file to the package that has
17 # most common embedded TTYs defined.
18 install -d ${D}${sysconfdir}
19 install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
20 if [ ! -z "${SERIAL_CONSOLES}" ]; then
21 # Our SERIAL_CONSOLES contains a baud rate and sometimes extra
22 # options as well. The following pearl :) takes that and converts
23 # it into newline-separated tty's and appends them into
24 # securetty. So if a machine has a weird looking console device
25 # node (e.g. ttyAMA0) that securetty does not know, it will get
26 # appended to securetty and root logins will be allowed on that
27 # console.
28 tmp="${SERIAL_CONSOLES}"
29 for entry in $tmp ; do
30 ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'`
31 if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then
32 echo $ttydev >> ${D}${sysconfdir}/securetty
33 fi
34 done
35 fi
36}
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 0000000000..697569c47e
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Shadow utils requirements for useradd.bbclass"
2HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
3BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
4SECTION = "base utils"
5LICENSE = "BSD | Artistic-1.0"
6LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
7
8DEPENDS = "base-passwd"
9
10PR = "r3"
11
12# The sole purpose of this recipe is to provide the /etc/login.defs
13# file for the target sysroot - needed so the shadow-native utilities
14# can add custom users/groups for recipes that use inherit useradd.
15SRC_URI = "file://login.defs_shadow-sysroot"
16
17SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
18SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
19
20S = "${WORKDIR}"
21
22do_install() {
23 install -d ${D}${sysconfdir}
24 install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
25}
26
27sysroot_stage_all() {
28 sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
29}
30
31# don't create any packages
32# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
33# and this has another copy of /etc/login.defs already provided by shadow
34PACKAGES = ""
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
new file mode 100644
index 0000000000..d6bf73b591
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -0,0 +1,175 @@
1SUMMARY = "Tools to change and administer password and group data"
2HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
3BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
4SECTION = "base utils"
5LICENSE = "BSD | Artistic-1.0"
6LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
7 file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
8
9DEPENDS = "shadow-native"
10DEPENDS_class-native = ""
11DEPENDS_class-nativesdk = ""
12
13SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
14 file://shadow.automake-1.11.patch \
15 file://shadow_fix_for_automake-1.12.patch \
16 file://shadow-4.1.3-dots-in-usernames.patch \
17 file://shadow-4.1.4.2-env-reset-keep-locale.patch \
18 ${@base_contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
19 "
20
21SRC_URI_append_class-target = " \
22 file://login_defs_pam.sed \
23 file://shadow-4.1.4.2-groupmod-pam-check.patch \
24 file://shadow-4.1.4.2-su_no_sanitize_env.patch \
25 file://shadow-update-pam-conf.patch \
26 file://slackware_fix_for_glib-2.17_crypt.patch \
27 file://fix-etc-gshadow-reading.patch \
28 "
29
30SRC_URI_append_class-native = " \
31 file://add_root_cmd_options.patch \
32 file://disable-syslog.patch \
33 file://useradd.patch \
34 file://add_root_cmd_groupmems.patch \
35 file://allow-for-setting-password-in-clear-text.patch \
36 "
37SRC_URI_append_class-nativesdk = " \
38 file://add_root_cmd_options.patch \
39 file://disable-syslog.patch \
40 file://useradd.patch \
41 file://add_root_cmd_groupmems.patch \
42 "
43
44SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
45SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
46
47PR = "r14"
48
49# Additional Policy files for PAM
50PAM_SRC_URI = "file://pam.d/chfn \
51 file://pam.d/chpasswd \
52 file://pam.d/chsh \
53 file://pam.d/login \
54 file://pam.d/newusers \
55 file://pam.d/passwd \
56 file://pam.d/su"
57
58inherit autotools gettext
59
60EXTRA_OECONF += "--without-audit \
61 --without-libcrack \
62 --without-selinux \
63 ${NSCDOPT}"
64
65NSCDOPT = ""
66NSCDOPT_class-native = "--without-nscd"
67NSCDOPT_class-nativesdk = "--without-nscd"
68NSCDOPT_libc-uclibc = " --without-nscd"
69
70PAM_PLUGINS = "libpam-runtime \
71 pam-plugin-faildelay \
72 pam-plugin-securetty \
73 pam-plugin-nologin \
74 pam-plugin-env \
75 pam-plugin-group \
76 pam-plugin-limits \
77 pam-plugin-lastlog \
78 pam-plugin-motd \
79 pam-plugin-mail \
80 pam-plugin-shells \
81 pam-plugin-rootok"
82
83PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
84PACKAGECONFIG_class-native = ""
85PACKAGECONFIG_class-nativesdk = ""
86PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
87
88RDEPENDS_${PN} = "shadow-securetty \
89 base-passwd"
90RDEPENDS_${PN}_class-native = ""
91RDEPENDS_${PN}_class-nativesdk = ""
92
93do_install() {
94 oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
95
96 # Info dir listing isn't interesting at this point so remove it if it exists.
97 if [ -e "${D}${infodir}/dir" ]; then
98 rm -f ${D}${infodir}/dir
99 fi
100
101 # Enable CREATE_HOME by default.
102 sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
103
104 # As we are on an embedded system, ensure the users mailbox is in
105 # ~/ not /var/spool/mail by default, as who knows where or how big
106 # /var is. The system MDA will set this later anyway.
107 sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
108 sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
109
110 # Disable checking emails.
111 sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
112
113 # Use proper encryption for passwords
114 sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
115
116 # Now we don't have a mail system. Disable mail creation for now.
117 sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
118 sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
119
120 # Use users group by default
121 sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
122}
123
124do_install_append() {
125 # Ensure that the image has as a /var/spool/mail dir so shadow can
126 # put mailboxes there if the user reconfigures shadow to its
127 # defaults (see sed below).
128 install -d ${D}${localstatedir}/spool/mail
129
130 if [ -e ${WORKDIR}/pam.d ]; then
131 install -d ${D}${sysconfdir}/pam.d/
132 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
133 # Remove defaults that are not used when supporting PAM.
134 sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
135 fi
136
137 install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
138
139 # Move binaries to the locations we want
140 rm ${D}${sbindir}/vigr
141 ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr
142 if [ "${sbindir}" != "${base_sbindir}" ]; then
143 mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
144 fi
145 if [ "${bindir}" != "${base_bindir}" ]; then
146 mv ${D}${bindir}/login ${D}${base_bindir}/login
147 mv ${D}${bindir}/su ${D}${base_bindir}/su
148 fi
149
150 # Handle link properly after rename, otherwise missing files would
151 # lead rpm failed dependencies.
152 ln -sf newgrp.${BPN} ${D}${bindir}/sg
153}
154
155inherit update-alternatives
156
157ALTERNATIVE_PRIORITY = "200"
158
159ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su"
160ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
161ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
162ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
163ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
164ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
165
166pkg_postinst_${PN} () {
167 if [ "x$D" != "x" ]; then
168 rootarg="--root=$D"
169 else
170 rootarg=""
171 fi
172
173 pwconv $rootarg
174 grpconv $rootarg
175}
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 0000000000..43e578fe4f
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -0,0 +1,10 @@
1require shadow.inc
2
3# Build falsely assumes that if --enable-libpam is set, we don't need to link against
4# libcrypt. This breaks chsh.
5BUILD_LDFLAGS_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'pam', base_contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}"
6
7BBCLASSEXTEND = "native nativesdk"
8
9
10
diff --git a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
new file mode 100644
index 0000000000..2ea1ffda57
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
@@ -0,0 +1,218 @@
1slang: change char type to signed char in macros
2
3C language has 3 distinct char types:
4 char
5 unsigned char
6 signed char
7A char has the same range of values as signed char on X86,
8but same as unsigned char on ARM which made Slang's typecast()
9and array_sort() unable to work for char value on ARM, since
10Slang is assuming "char" as "signed char".
11
12Now we change "char" as "signed char" explicitly in
13util/mkslarith2.sl, and use it to regenerate src/slarith2.inc
14
15Upstream-Status: Submitted
16Signed-off-by: Roy.Li <rongqing.li@windriver.com>
17---
18 src/slarith2.inc | 72 ++++++++++++++++++++++++-------------------------
19 src/util/mkslarith2.sl | 2 -
20 2 files changed, 37 insertions(+), 37 deletions(-)
21
22--- a/src/util/mkslarith2.sl
23+++ b/src/util/mkslarith2.sl
24@@ -1,7 +1,7 @@
25 #!/usr/bin/env slsh
26
27 private variable CTypes =
28- ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
29+ ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
30 "long", "unsigned long", "long long", "unsigned long long",
31 "float", "double", "long double"];
32 private variable Is_Int_Type =
33--- a/src/slarith2.inc
34+++ b/src/slarith2.inc
35@@ -1,43 +1,43 @@
36 /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */
37-/* ------------ char ---------- */
38-DEFUN_1(copy_char_to_char,char,char)
39+/* ------------ signed char ---------- */
40+DEFUN_1(copy_char_to_char,signed char,signed char)
41 #define char_to_char NULL
42 #define copy_char_to_uchar copy_char_to_char
43 #define char_to_uchar NULL
44-DEFUN_1(copy_char_to_short,char,short)
45+DEFUN_1(copy_char_to_short,signed char,short)
46 #define char_to_short NULL
47-DEFUN_1(copy_char_to_ushort,char,unsigned short)
48+DEFUN_1(copy_char_to_ushort,signed char,unsigned short)
49 #define char_to_ushort NULL
50-DEFUN_1(copy_char_to_int,char,int)
51-DEFUN_2(char_to_int,char,int,copy_char_to_int)
52-DEFUN_1(copy_char_to_uint,char,unsigned int)
53-DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint)
54-DEFUN_1(copy_char_to_long,char,long)
55-DEFUN_2(char_to_long,char,long,copy_char_to_long)
56-DEFUN_1(copy_char_to_ulong,char,unsigned long)
57-DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong)
58+DEFUN_1(copy_char_to_int,signed char,int)
59+DEFUN_2(char_to_int,signed char,int,copy_char_to_int)
60+DEFUN_1(copy_char_to_uint,signed char,unsigned int)
61+DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint)
62+DEFUN_1(copy_char_to_long,signed char,long)
63+DEFUN_2(char_to_long,signed char,long,copy_char_to_long)
64+DEFUN_1(copy_char_to_ulong,signed char,unsigned long)
65+DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong)
66 #if defined(HAVE_LONG_LONG)
67-DEFUN_1(copy_char_to_llong,char,long long)
68-DEFUN_2(char_to_llong,char,long long,copy_char_to_llong)
69+DEFUN_1(copy_char_to_llong,signed char,long long)
70+DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong)
71 #endif /* defined(HAVE_LONG_LONG) */
72 #if defined(HAVE_LONG_LONG)
73-DEFUN_1(copy_char_to_ullong,char,unsigned long long)
74-DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong)
75+DEFUN_1(copy_char_to_ullong,signed char,unsigned long long)
76+DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong)
77 #endif /* defined(HAVE_LONG_LONG) */
78 #if SLANG_HAS_FLOAT
79-DEFUN_1(copy_char_to_float,char,float)
80-DEFUN_2(char_to_float,char,float,copy_char_to_float)
81+DEFUN_1(copy_char_to_float,signed char,float)
82+DEFUN_2(char_to_float,signed char,float,copy_char_to_float)
83 #endif /* SLANG_HAS_FLOAT */
84 #if SLANG_HAS_FLOAT
85-DEFUN_1(copy_char_to_double,char,double)
86-DEFUN_2(char_to_double,char,double,copy_char_to_double)
87+DEFUN_1(copy_char_to_double,signed char,double)
88+DEFUN_2(char_to_double,signed char,double,copy_char_to_double)
89 #endif /* SLANG_HAS_FLOAT */
90 #if defined(HAVE_LONG_DOUBLE)
91-DEFUN_1(copy_char_to_ldouble,char,long double)
92-DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble)
93+DEFUN_1(copy_char_to_ldouble,signed char,long double)
94+DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble)
95 #endif /* defined(HAVE_LONG_DOUBLE) */
96 #if SLANG_HAS_FLOAT
97-TO_DOUBLE_FUN(char_to_one_double,char)
98+TO_DOUBLE_FUN(char_to_one_double,signed char)
99 #endif
100
101 /* ------------ unsigned char ---------- */
102@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign
103 #endif
104
105 /* ------------ short ---------- */
106-DEFUN_1(copy_short_to_char,short,char)
107+DEFUN_1(copy_short_to_char,short,signed char)
108 #define short_to_char NULL
109 DEFUN_1(copy_short_to_uchar,short,unsigned char)
110 #define short_to_uchar NULL
111@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short)
112 #endif
113
114 /* ------------ unsigned short ---------- */
115-DEFUN_1(copy_ushort_to_char,unsigned short,char)
116+DEFUN_1(copy_ushort_to_char,unsigned short,signed char)
117 #define ushort_to_char NULL
118 DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char)
119 #define ushort_to_uchar NULL
120@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig
121 #endif
122
123 /* ------------ int ---------- */
124-DEFUN_1(copy_int_to_char,int,char)
125+DEFUN_1(copy_int_to_char,int,signed char)
126 #define int_to_char NULL
127 DEFUN_1(copy_int_to_uchar,int,unsigned char)
128 #define int_to_uchar NULL
129@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int)
130 #endif
131
132 /* ------------ unsigned int ---------- */
133-DEFUN_1(copy_uint_to_char,unsigned int,char)
134+DEFUN_1(copy_uint_to_char,unsigned int,signed char)
135 #define uint_to_char NULL
136 DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char)
137 #define uint_to_uchar NULL
138@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne
139 #endif
140
141 /* ------------ long ---------- */
142-DEFUN_1(copy_long_to_char,long,char)
143+DEFUN_1(copy_long_to_char,long,signed char)
144 #define long_to_char NULL
145 DEFUN_1(copy_long_to_uchar,long,unsigned char)
146 #define long_to_uchar NULL
147@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long)
148 #endif
149
150 /* ------------ unsigned long ---------- */
151-DEFUN_1(copy_ulong_to_char,unsigned long,char)
152+DEFUN_1(copy_ulong_to_char,unsigned long,signed char)
153 #define ulong_to_char NULL
154 DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char)
155 #define ulong_to_uchar NULL
156@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign
157
158 /* ------------ long long ---------- */
159 #if defined(HAVE_LONG_LONG)
160-DEFUN_1(copy_llong_to_char,long long,char)
161+DEFUN_1(copy_llong_to_char,long long,signed char)
162 #define llong_to_char NULL
163 DEFUN_1(copy_llong_to_uchar,long long,unsigned char)
164 #define llong_to_uchar NULL
165@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l
166
167 /* ------------ unsigned long long ---------- */
168 #if defined(HAVE_LONG_LONG)
169-DEFUN_1(copy_ullong_to_char,unsigned long long,char)
170+DEFUN_1(copy_ullong_to_char,unsigned long long,signed char)
171 #define ullong_to_char NULL
172 DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char)
173 #define ullong_to_uchar NULL
174@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig
175
176 /* ------------ float ---------- */
177 #if SLANG_HAS_FLOAT
178-DEFUN_1(copy_float_to_char,float,char)
179+DEFUN_1(copy_float_to_char,float,signed char)
180 #define float_to_char NULL
181 DEFUN_1(copy_float_to_uchar,float,unsigned char)
182 #define float_to_uchar NULL
183@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float)
184
185 /* ------------ double ---------- */
186 #if SLANG_HAS_FLOAT
187-DEFUN_1(copy_double_to_char,double,char)
188+DEFUN_1(copy_double_to_char,double,signed char)
189 #define double_to_char NULL
190 DEFUN_1(copy_double_to_uchar,double,unsigned char)
191 #define double_to_uchar NULL
192@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl
193
194 /* ------------ long double ---------- */
195 #if defined(HAVE_LONG_DOUBLE)
196-DEFUN_1(copy_ldouble_to_char,long double,char)
197+DEFUN_1(copy_ldouble_to_char,long double,signed char)
198 #define ldouble_to_char NULL
199 DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char)
200 #define ldouble_to_uchar NULL
201@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long
202 #if SLANG_HAS_FLOAT
203 static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] =
204 {
205- {sizeof(char), char_to_one_double},
206+ {sizeof(signed char), char_to_one_double},
207 {sizeof(unsigned char), uchar_to_one_double},
208 {sizeof(short), short_to_one_double},
209 {sizeof(unsigned short), ushort_to_one_double},
210@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl
211
212 static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] =
213 {
214- /* char */
215+ /* signed char */
216 {
217 {(FVOID_STAR)copy_char_to_char, char_to_char},
218 {(FVOID_STAR)copy_char_to_uchar, char_to_uchar},
diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
new file mode 100644
index 0000000000..0c1553a661
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
@@ -0,0 +1,108 @@
1fix the pcre existence checking
2
3when check if there is pcre, the configure file always check
4the host dir. now we make it work by adding correct prefix for
5cross-compile environment.
6
7When enable pcre-module, we see a QA warning because rpaths
8hardcoded into the build, rpaths are not needed, so lets turn
9this off.
10
11Upstream-Status: Inappropriate
12Signed-off-by: Roy.Li <rongqing.li@windriver.com>
13---
14 configure | 60 ++++++------------------------------------------------------
15 1 files changed, 6 insertions(+), 54 deletions(-)
16
17diff --git a/configure b/configure
18index f1586c3..d22814f 100755
19--- a/configure
20+++ b/configure
21@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
22 /usr/include/pcre,/usr/lib \
23 /usr/pcre/include,/usr/pcre/lib \
24 /usr/include,/usr/lib \
25+ /usr/include,/usr/lib64 \
26 /opt/include/pcre,/opt/lib \
27 /opt/pcre/include,/opt/pcre/lib \
28 /opt/include,/opt/lib"
29@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
30 xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
31 xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
32 found=0
33- if test -r $xincdir/$xincfile
34+ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
35 then
36 for E in $exts
37 do
38- if test -r "$xlibdir/$xlibfile.$E"
39+ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
40 then
41- jd_pcre_include_dir="$xincdir"
42- jd_pcre_library_dir="$xlibdir"
43+ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
44+ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
45 jd_with_pcre_library="yes"
46 found=1
47 break
48@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
49 then
50 PCRE_LIB=""
51 else
52-
53-if test "X$jd_pcre_library_dir" != "X"
54-then
55- if test "X$RPATH" = "X"
56- then
57-
58-case "$host_os" in
59- *linux*|*solaris* )
60- if test "X$GCC" = Xyes
61- then
62- if test "X$ac_R_nospace" = "Xno"
63- then
64- RPATH="-Wl,-R,"
65- else
66- RPATH="-Wl,-R"
67- fi
68- else
69- if test "X$ac_R_nospace" = "Xno"
70- then
71- RPATH="-R "
72- else
73- RPATH="-R"
74- fi
75- fi
76- ;;
77- *osf*|*openbsd*)
78- if test "X$GCC" = Xyes
79- then
80- RPATH="-Wl,-rpath,"
81- else
82- RPATH="-rpath "
83- fi
84- ;;
85- *netbsd*)
86- if test "X$GCC" = Xyes
87- then
88- RPATH="-Wl,-R"
89- fi
90- ;;
91-esac
92-
93- if test "X$RPATH" != "X"
94- then
95- RPATH="$RPATH$jd_pcre_library_dir"
96- fi
97- else
98- RPATH="$RPATH:$jd_pcre_library_dir"
99- fi
100-fi
101-
102+ RPATH=""
103 fi
104
105 PCRE_INC=-I$jd_pcre_include_dir
106--
1071.7.4.1
108
diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch
new file mode 100644
index 0000000000..50cac9264f
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/rpathfix.patch
@@ -0,0 +1,70 @@
1Without this patch we see rpaths hardcoded into the build which results in QA
2warnings. These rpaths are not needed so lets turn this off.
3
4Upstream-Status: Inappropriate
5(but could be turned into a proper configure option)
6
7RP 2012/03/14
8
9Index: slang-2.2.4/configure
10===================================================================
11--- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000
12+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000
13@@ -6081,56 +6081,7 @@
14 ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
15 CFLAGS="$CFLAGS $IEEE_CFLAGS"
16
17-
18-if test "X$libdir" != "X"
19-then
20- if test "X$RPATH" = "X"
21- then
22-
23-case "$host_os" in
24- *linux*|*solaris* )
25- if test "X$GCC" = Xyes
26- then
27- if test "X$ac_R_nospace" = "Xno"
28- then
29- RPATH="-Wl,-R,"
30- else
31- RPATH="-Wl,-R"
32- fi
33- else
34- if test "X$ac_R_nospace" = "Xno"
35- then
36- RPATH="-R "
37- else
38- RPATH="-R"
39- fi
40- fi
41- ;;
42- *osf*|*openbsd*)
43- if test "X$GCC" = Xyes
44- then
45- RPATH="-Wl,-rpath,"
46- else
47- RPATH="-rpath "
48- fi
49- ;;
50- *netbsd*)
51- if test "X$GCC" = Xyes
52- then
53- RPATH="-Wl,-R"
54- fi
55- ;;
56-esac
57-
58- if test "X$RPATH" != "X"
59- then
60- RPATH="$RPATH$libdir"
61- fi
62- else
63- RPATH="$RPATH:$libdir"
64- fi
65-fi
66-
67+RPATH=""
68
69 # The cast to long int works around a bug in the HP C Compiler
70 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
diff --git a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
new file mode 100644
index 0000000000..ddf5cce5cb
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
@@ -0,0 +1,42 @@
1Upstream-Status: Backported
2
3From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001
4From: Manfred Hanke <Manfred.Hanke@tngtech.com>
5Date: Thu, 20 Jun 2013 10:24:12 +0200
6Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8
7 mode) fixed
8
9char *str points to SLuchar_Type utf8_buf[], which had too small scope
10
11src/test/strops.sl failed in the following environment:
12 - compiler: gcc (Debian 4.7.2-5) 4.7.2
13 - CFLAGS: -g -O2
14 - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13
15 - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux
16---
17 src/slstrops.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/slstrops.c b/src/slstrops.c
21index ce6acb0..cbbbb01 100644
22--- a/src/slstrops.c
23+++ b/src/slstrops.c
24@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
25 #endif
26 unsigned char uch;
27 int use_long = 0, use_alt_format = 0;
28+ SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
29
30 while (1)
31 {
32@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
33 #endif
34 {
35 SLwchar_Type wc;
36- SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
37
38 if (-1 == SLang_pop_wchar (&wc))
39 return out;
40--
411.7.9.5
42
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 0000000000..90ed2d0a47
--- /dev/null
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -0,0 +1,48 @@
1SUMMARY = "The shared library for the S-Lang extension language"
2
3DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
4S-Lang language was designed so that it can be easily embedded into \
5a program to provide the program with a powerful extension language. \
6The S-Lang library, provided in this package, provides the S-Lang \
7extension language. S-Lang's syntax resembles C, which makes it easy \
8to recode S-Lang procedures in C if you need to."
9
10HOMEPAGE = "http://www.jedsoft.org/slang/"
11SECTION = "libs"
12DEPENDS = "pcre"
13PR = "r12"
14
15LICENSE = "GPLv2"
16LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
17
18
19SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
20 file://rpathfix.patch \
21 file://fix-check-pcre.patch \
22 file://change-char-type-to-signed-char-in-macros.patch \
23 file://sprintf-bug-concerning-8-bit-characters.patch \
24 "
25
26inherit autotools-brokensep
27
28SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
29SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
30
31EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
32
33do_configure_prepend() {
34 # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
35 # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
36 # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
37 cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* .
38 cd ${B}
39}
40
41do_install() {
42 oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
43}
44
45FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
46FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug"
47
48PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
new file mode 100644
index 0000000000..032995db8f
--- /dev/null
+++ b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
@@ -0,0 +1,16 @@
1This patch fixies the wrong return code of stat -h.
2
3Upstream-Status: Pending
4Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
5
6--- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800
7+++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800
8@@ -845,7 +845,7 @@
9 fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n");
10 fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n");
11 fprintf(stderr, "\t\t%%d - Free file nodes in file system\n");
12- exit(1);
13+ exit(0);
14 }
15
16
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 0000000000..c9edb1de5b
--- /dev/null
+++ b/meta/recipes-extended/stat/stat_3.3.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Command line file status display utility"
2DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides."
3SECTION = "console/utils"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
6 file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
7
8SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-${PV}.tar.gz \
9 file://fix-error-return.patch"
10
11SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
12SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
13
14do_install() {
15 install -d ${D}${bindir} ${D}${mandir}/man1
16 install -m 755 stat ${D}${bindir}
17 install -m 644 stat.1 ${D}${mandir}/man1
18}
19
20BBCLASSEXTEND = "native"
21
diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam
new file mode 100644
index 0000000000..5bc26e7025
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/sudo.pam
@@ -0,0 +1,6 @@
1#%PAM-1.0
2auth include common-auth
3account include common-account
4password include common-password
5session required pam_keyinit.so revoke
6session 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 0000000000..0aa5193375
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -0,0 +1,41 @@
1SUMMARY = "Provide limited super user privileges to specific users"
2DESCRIPTION = "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."
3HOMEPAGE = "http://www.sudo.ws"
4BUGTRACKER = "http://www.sudo.ws/bugs/"
5SECTION = "admin"
6LICENSE = "ISC & BSD & Zlib"
7LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=923752f88decdea9d69f92fe42c2af80 \
8 file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \
9 file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
10 file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
11 file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
12 file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \
13 file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681"
14
15inherit autotools
16
17PACKAGECONFIG ??= ""
18PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
19
20EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
21
22do_configure_prepend () {
23 if [ ! -e ${S}/acinclude.m4 ]; then
24 cat ${S}/aclocal.m4 > ${S}/acinclude.m4
25 fi
26}
27
28# mksigname/mksiglist are used on build host to generate source files
29do_compile_prepend () {
30 oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C compat mksigname mksiglist
31}
32
33# Explicitly create ${localstatedir}/lib before do_install to ensure
34# the directory is accessible by all users. Otherwise the mkinstalldirs
35# script (from sudo) will recursively create ${localstatedir}/lib/sudo
36# and then chmod each directory with 0700 permissions, which isn't what
37# we want (i.e, users would not be able to access /var/lib).
38do_install_prepend (){
39 mkdir -p ${D}/${localstatedir}/lib
40}
41
diff --git a/meta/recipes-extended/sudo/sudo_1.8.9p5.bb b/meta/recipes-extended/sudo/sudo_1.8.9p5.bb
new file mode 100644
index 0000000000..b4d18e88ff
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo_1.8.9p5.bb
@@ -0,0 +1,23 @@
1require sudo.inc
2
3SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
4 ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
5
6PAM_SRC_URI = "file://sudo.pam"
7
8SRC_URI[md5sum] = "d3f1f1cfca6b2b06b048e1abb7d0227e"
9SRC_URI[sha256sum] = "bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21"
10
11DEPENDS += " ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
12RDEPENDS_${PN} += " ${@base_contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
13
14EXTRA_OECONF += " ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}"
15
16do_install_append () {
17 if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
18 install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
19 fi
20
21 chmod 4111 ${D}${bindir}/sudo
22 chmod 0440 ${D}${sysconfdir}/sudoers
23}
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 0000000000..00fba71017
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: sysklogd-1.5/Makefile
4===================================================================
5--- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200
6+++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200
7@@ -127,8 +127,8 @@
8 rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
9
10 install_exec: syslogd klogd
11- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd
12- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
13+ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd
14+ ${INSTALL} -m 500 klogd ${BINDIR}/klogd
15
16 install_man:
17 ${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 0000000000..c1cc042c9c
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate
2
3The compiler should not be generating vectorized instructions on this target.
4This is a work around until I can determine why this is occuring on this
5particular recipe
6
7Index: sysklogd-1.5/Makefile
8===================================================================
9--- sysklogd-1.5.orig/Makefile
10+++ sysklogd-1.5/Makefile
11@@ -20,7 +20,8 @@
12 CC= gcc
13 #SKFLAGS= -g -DSYSV -Wall
14 #LDFLAGS= -g
15-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
16+SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \
17+ -fno-tree-vectorize
18 # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
19 # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
20 # $(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 0000000000..258f882803
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -0,0 +1,151 @@
1#! /bin/sh
2# /etc/init.d/sysklogd: start the system log daemon.
3
4### BEGIN INIT INFO
5# Provides: sysklogd
6# Required-Start: $remote_fs $time
7# Required-Stop: $remote_fs $time
8# Should-Start: $network
9# Should-Stop: $network
10# Default-Start: 2 3 4 5
11# Default-Stop: 0 1 6
12# Short-Description: System logger
13### END INIT INFO
14
15# Source function library.
16. /etc/init.d/functions
17
18PATH=/bin:/usr/bin:/sbin:/usr/sbin
19
20pidfile_syslogd=/var/run/syslogd.pid
21pidfile_klogd=/var/run/klogd.pid
22binpath_syslogd=/sbin/syslogd
23binpath_klogd=/sbin/klogd
24
25test -x $binpath || exit 0
26
27test ! -r /etc/default/syslogd || . /etc/default/syslogd
28
29create_xconsole()
30{
31 # Only proceed if /dev/xconsole is used at all
32 if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf
33 then
34 return
35 fi
36
37 if [ ! -e /dev/xconsole ]; then
38 mknod -m 640 /dev/xconsole p
39 else
40 chmod 0640 /dev/xconsole
41 fi
42 chown root:adm /dev/xconsole
43 test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole
44}
45
46log_begin_msg () {
47 echo -n $1
48}
49
50log_end_msg () {
51 echo $1
52}
53
54log_success_msg () {
55 echo $1
56}
57
58running()
59{
60 # No pidfile, probably no daemon present
61 #
62 if [ ! -f $pidfile ]
63 then
64 return 1
65 fi
66
67 pid=`cat $pidfile_syslogd`
68
69 # No pid, probably no daemon present
70 #
71 if [ -z "$pid" ]
72 then
73 return 1
74 fi
75
76 if [ ! -d /proc/$pid ]
77 then
78 return 1
79 fi
80
81 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1`
82
83 # No syslogd?
84 #
85 if [ "$cmd" != "$binpath" ]
86 then
87 return 1
88 fi
89
90 return 0
91}
92
93case "$1" in
94 start)
95 log_begin_msg "Starting system log daemon..."
96 create_xconsole
97 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
98 log_end_msg $?
99 log_begin_msg "Starting kernel log daemon..."
100 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
101 log_end_msg $?
102 ;;
103 stop)
104 log_begin_msg "Stopping system log daemon..."
105 start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd
106 log_end_msg $?
107 log_begin_msg "Stopping kernel log daemon..."
108 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
109 log_end_msg $?
110 ;;
111 reload|force-reload)
112 log_begin_msg "Reloading system log daemon..."
113 start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
114 log_end_msg $?
115 log_begin_msg "Reloading kernel log daemon..."
116 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
117 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
118 log_end_msg $?
119 ;;
120 restart)
121 log_begin_msg "Restarting system log daemon..."
122 start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd
123 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
124 log_end_msg $?
125 log_begin_msg "Reloading kernel log daemon..."
126 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
127 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
128 log_end_msg $?
129 ;;
130 reload-or-restart)
131 if running
132 then
133 $0 reload
134 else
135 $0 start
136 fi
137 ;;
138 status)
139 status syslogd
140 RETVAL=$?
141 status klogd
142 rval=$?
143 [ $RETVAL -eq 0 ] && exit $rval
144 exit $RETVAL
145 ;;
146 *)
147 log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}"
148 exit 1
149esac
150
151exit 0
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf
new file mode 100644
index 0000000000..0849de1268
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/syslog.conf
@@ -0,0 +1,71 @@
1# /etc/syslog.conf Configuration file for syslogd.
2#
3# Ported from debian by Yu Ke <ke.yu@intel.com>
4#
5
6#
7# First some standard logfiles. Log by facility.
8#
9
10auth,authpriv.* /var/log/auth.log
11*.*;auth,authpriv.none -/var/log/syslog
12#cron.* /var/log/cron.log
13daemon.* -/var/log/daemon.log
14kern.* -/var/log/kern.log
15lpr.* -/var/log/lpr.log
16mail.* -/var/log/mail.log
17user.* -/var/log/user.log
18
19#
20# Logging for the mail system. Split it up so that
21# it is easy to write scripts to parse these files.
22#
23mail.info -/var/log/mail.info
24mail.warn -/var/log/mail.warn
25mail.err /var/log/mail.err
26
27# Logging for INN news system
28#
29news.crit /var/log/news.crit
30news.err /var/log/news.err
31news.notice -/var/log/news.notice
32
33#
34# Some `catch-all' logfiles.
35#
36*.=debug;\
37auth,authpriv.none;\
38news.none;mail.none -/var/log/debug
39
40*.=info;*.=notice;*.=warn;\
41auth,authpriv.none;\
42cron,daemon.none;\
43mail,news.none -/var/log/messages
44
45#
46# Emergencies are sent to everybody logged in.
47#
48*.emerg *
49
50#
51# I like to have messages displayed on the console, but only on a virtual
52# console I usually leave idle.
53#
54#daemon,mail.*;\
55#news.=crit;news.=err;news.=notice;\
56#*.=debug;*.=info;\
57#*.=notice;*.=warn /dev/tty8
58
59# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
60# you must invoke `xconsole' with the `-file' option:
61#
62# $ xconsole -file /dev/xconsole [...]
63#
64# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
65# busy site..
66#
67daemon.*;mail.*;\
68news.err;\
69*.=debug;*.=info;\
70*.=notice;*.=warn |/dev/xconsole
71
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
new file mode 100644
index 0000000000..3a518103ea
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -0,0 +1,58 @@
1SUMMARY = "System Log Daemons"
2DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd"
3HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
4SECTION = "base"
5
6LICENSE = "GPLv2+ & BSD"
7LICENSE_syslogd = "BSD"
8LICENSE_klogd = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
10 file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
12 "
13
14inherit update-rc.d update-alternatives
15
16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
17 file://no-strip-install.patch \
18 file://sysklogd \
19 file://syslog.conf \
20 "
21
22SRC_URI_append_e500v2 = " file://no-vectorization.patch"
23
24INITSCRIPT_NAME = "syslog"
25CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
26
27CFLAGS_append = " -DSYSV"
28
29do_install () {
30 install -d ${D}${mandir}/man8 \
31 ${D}${mandir}/man5 \
32 ${D}${base_sbindir}
33 oe_runmake 'BINDIR=${D}${base_sbindir}' \
34 'MANDIR=${D}${mandir}' install
35 install -d ${D}${sysconfdir}
36 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
37 install -d ${D}${sysconfdir}/init.d
38 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
39}
40
41# sysklogd package has no internal systemd support, so we weigh busybox's
42# sysklogd utility over it in case of systemd
43ALTERNATIVE_PRIORITY = "${@base_contains('DISTRO_FEATURES','systemd','10','100',d)}"
44
45ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
46
47ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
48ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
49ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
50ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
51
52pkg_prerm_${PN} () {
53 if test "x$D" = "x"; then
54 if test "$1" = "upgrade" -o "$1" = "remove"; then
55 /etc/init.d/syslog stop
56 fi
57 fi
58}
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 0000000000..5c9588945d
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb
@@ -0,0 +1,5 @@
1require sysklogd.inc
2PR = "r7"
3
4SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b"
5SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773"
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
new file mode 100644
index 0000000000..09a5d28d4a
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -0,0 +1,44 @@
1SUMMARY = "System performance tools"
2DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
3HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
4LICENSE = "GPLv2+"
5SECTION = "console/utils"
6
7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \
8 file://99_sysstat \
9 "
10
11inherit autotools-brokensep gettext
12
13EXTRA_OECONF += "--disable-sensors"
14EXTRA_OEMAKE += 'LFLAGS=""'
15
16do_configure_prepend() {
17 export sa_lib_dir=${libdir}/sa
18}
19
20do_install() {
21 autotools_do_install
22
23 # don't install /var/log/sa when populating rootfs. Do it through volatile
24
25 rm -rf ${D}/var
26 install -d ${D}/etc/default/volatiles
27 install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
28}
29
30pkg_postinst_${PN} () {
31 if [ -n "$D" ]; then
32 exit 0
33 fi
34 if [ -e /etc/init.d/populate-volatile.sh ]; then
35 /etc/init.d/populate-volatile.sh update
36 fi
37}
38
39
40FILES_${PN} += "${libdir}/sa"
41FILES_${PN}-dbg += "${libdir}/sa/.debug/"
42
43TARGET_CC_ARCH += "${LDFLAGS}"
44LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/meta/recipes-extended/sysstat/sysstat/99_sysstat b/meta/recipes-extended/sysstat/sysstat/99_sysstat
new file mode 100644
index 0000000000..0b0ec30de0
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/99_sysstat
@@ -0,0 +1 @@
d root root 0755 /var/log/sa none
diff --git a/meta/recipes-extended/sysstat/sysstat_10.2.1.bb b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
new file mode 100644
index 0000000000..654457dbe1
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_10.2.1.bb
@@ -0,0 +1,6 @@
1require sysstat.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
4
5SRC_URI[md5sum] = "039dcd235dfcfb3d4acc0a05730f9512"
6SRC_URI[sha256sum] = "3bfd1b4c5b99314585709c092096234b6e181741729f601d18d0ed7f0612612a"
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 0000000000..da2ae3cb0f
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
2
3This patch avoids heap overflow reported by :
4http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
5
6This is a clean patch for the GPLv2 tar recipe.
7
8Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
9
10Index: tar-1.17/lib/rtapelib.c
11===================================================================
12--- tar-1.17.orig/lib/rtapelib.c
13+++ tar-1.17/lib/rtapelib.c
14@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
15
16 sprintf (command_buffer, "R%lu\n", (unsigned long) length);
17 if (do_command (handle, command_buffer) == -1
18- || (status = get_status (handle)) == SAFE_READ_ERROR)
19+ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
20 return SAFE_READ_ERROR;
21
22 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 0000000000..f8059a0a89
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Fix errors when built with gcc 4.3
4# Patch taken from Debian bug #452096
5
6diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h
7--- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800
8+++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700
9@@ -198,7 +198,11 @@
10 #endif
11
12 #ifndef ARGP_FS_EI
13-#define ARGP_FS_EI extern inline
14+ #if defined __GNUC_STDC_INLINE__
15+ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__))
16+ #else
17+ #define ARGP_FS_EI extern inline
18+ #endif
19 #endif
20
21 ARGP_FS_EI size_t
22diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h
23--- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700
24+++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700
25@@ -580,7 +580,11 @@
26 # endif
27
28 # ifndef ARGP_EI
29-# define ARGP_EI extern __inline__
30+# if defined __GNUC_STDC_INLINE__
31+# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__))
32+# else
33+# define ARGP_EI extern __inline__
34+# endif
35 # endif
36
37 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 0000000000..30534c29ce
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Inappropriate [licensing]
2
3# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
4# This is needed to configure correctly with newer versions of autoconf.
5
6--- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700
7+++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700
8@@ -1,4 +1,4 @@
9-# serial 4 -*- Autoconf -*-
10+# serial 5 -*- Autoconf -*-
11 # Enable extensions on systems that normally disable them.
12
13 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
14@@ -16,6 +16,7 @@
15 # ------------------------
16 # Enable extensions on systems that normally disable them,
17 # typically due to standards-conformance issues.
18+m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
19 AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
20 [
21 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
22@@ -48,7 +49,7 @@
23 AC_DEFINE([__EXTENSIONS__])
24 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
25 AC_DEFINE([_TANDEM_SOURCE])
26-])
27+])])
28
29 # gl_USE_SYSTEM_EXTENSIONS
30 # ------------------------
diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb
new file mode 100644
index 0000000000..071ede765b
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb
@@ -0,0 +1,6 @@
1require tar_${PV}.bb
2
3inherit native
4
5BPN = "tar"
6EXTRAINSTALL = ""
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
new file mode 100644
index 0000000000..30a1373fef
--- /dev/null
+++ b/meta/recipes-extended/tar/tar.inc
@@ -0,0 +1,45 @@
1SUMMARY = "GNU file archiving program"
2DESCRIPTION = "GNU tar saves many files together into a single tape \
3or disk archive, and can restore individual files from the archive."
4HOMEPAGE = "http://www.gnu.org/software/tar/"
5SECTION = "base"
6
7SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
8
9inherit autotools gettext
10
11EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
12
13EXTRAINSTALL = "do_install_extra"
14EXTRAINSTALL_class-nativesdk = ""
15
16do_install () {
17 autotools_do_install
18 ${EXTRAINSTALL}
19}
20
21do_install_extra () {
22 install -d ${D}${base_bindir}
23 mv ${D}${bindir}/tar ${D}${base_bindir}/tar
24 rmdir ${D}${bindir}/
25}
26
27PACKAGES =+ "${PN}-rmt"
28
29PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
30
31FILES_${PN}-rmt = "${base_sbindir}/rmt*"
32
33inherit update-alternatives
34
35ALTERNATIVE_PRIORITY = "100"
36
37ALTERNATIVE_${PN} = "tar"
38ALTERNATIVE_${PN}-rmt = "rmt"
39ALTERNATIVE_${PN}_class-nativesdk = ""
40ALTERNATIVE_${PN}-rmt_class-nativesdk = ""
41
42ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
43ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
44
45BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch
new file mode 100644
index 0000000000..0b8be39eed
--- /dev/null
+++ b/meta/recipes-extended/tar/tar/remove-gets.patch
@@ -0,0 +1,22 @@
1ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4
5Upstream-Status: Pending
6Index: tar-1.27/gnu/stdio.in.h
7===================================================================
8--- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300
9+++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300
10@@ -710,10 +710,12 @@
11 /* It is very rare that the developer ever has full control of stdin,
12 so any use of gets warrants an unconditional warning; besides, C11
13 removed it. */
14+#if defined gets
15 #undef gets
16 #if HAVE_RAW_DECL_GETS
17 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
18 #endif
19+#endif
20
21
22 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
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 0000000000..b9ca2063df
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.17.bb
@@ -0,0 +1,14 @@
1require tar.inc
2
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
5
6PR = "r3"
7
8SRC_URI += "file://m4extensions.patch \
9 file://gcc43build.patch \
10 file://avoid_heap_overflow.patch \
11 "
12
13SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"
14SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492"
diff --git a/meta/recipes-extended/tar/tar_1.27.1.bb b/meta/recipes-extended/tar/tar_1.27.1.bb
new file mode 100644
index 0000000000..439bb500b9
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.27.1.bb
@@ -0,0 +1,10 @@
1require tar.inc
2
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
5
6SRC_URI += "file://remove-gets.patch \
7 "
8
9SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf"
10SRC_URI[sha256sum] = "9b0fb3ce8512059337add0da5f8f0f7d7647f2201f5ece24581d620ea60337c6"
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 0000000000..16d6719cbc
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
@@ -0,0 +1,77 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
4--- tcp_wrappers_7.6.orig/hosts_access.5 1995-01-30 19:51:47.000000000 +0100
5+++ tcp_wrappers_7.6/hosts_access.5 2004-04-09 16:59:45.000000000 +0200
6@@ -173,7 +173,7 @@
7 Patterns like these can be used when the machine has different internet
8 addresses with different internet hostnames. Service providers can use
9 this facility to offer FTP, GOPHER or WWW archives with internet names
10-that may even belong to different organizations. See also the `twist'
11+that may even belong to different organizations. See also the `twist\'
12 option in the hosts_options(5) document. Some systems (Solaris,
13 FreeBSD) can have more than one internet address on one physical
14 interface; with other systems you may have to resort to SLIP or PPP
15@@ -236,10 +236,10 @@
16 Before accepting a client request, the wrappers can use the IDENT
17 service to find out that the client did not send the request at all.
18 When the client host provides IDENT service, a negative IDENT lookup
19-result (the client matches `UNKNOWN@host') is strong evidence of a host
20+result (the client matches `UNKNOWN@host\') is strong evidence of a host
21 spoofing attack.
22 .PP
23-A positive IDENT lookup result (the client matches `KNOWN@host') is
24+A positive IDENT lookup result (the client matches `KNOWN@host\') is
25 less trustworthy. It is possible for an intruder to spoof both the
26 client connection and the IDENT lookup, although doing so is much
27 harder than spoofing just a client connection. It may also be that
28diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
29--- tcp_wrappers_7.6.orig/hosts_options.5 1994-12-28 17:42:29.000000000 +0100
30+++ tcp_wrappers_7.6/hosts_options.5 2004-04-09 16:59:49.000000000 +0200
31@@ -124,7 +124,7 @@
32 value is taken.
33 .SH MISCELLANEOUS
34 .IP "banners /some/directory"
35-Look for a file in `/some/directory' with the same name as the daemon
36+Look for a file in `/some/directory\' with the same name as the daemon
37 process (for example in.telnetd for the telnet service), and copy its
38 contents to the client. Newline characters are replaced by
39 carriage-return newline, and %<letter> sequences are expanded (see
40diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
41--- tcp_wrappers_7.6.orig/tcpdmatch.8 1996-02-11 17:01:36.000000000 +0100
42+++ tcp_wrappers_7.6/tcpdmatch.8 2004-04-09 17:00:49.000000000 +0200
43@@ -26,7 +26,7 @@
44 A daemon process name. Typically, the last component of a daemon
45 executable pathname.
46 .IP client
47-A host name or network address, or one of the `unknown' or `paranoid'
48+A host name or network address, or one of the `unknown\' or `paranoid\'
49 wildcard patterns.
50 .sp
51 When a client host name is specified, \fItcpdmatch\fR gives a
52@@ -37,13 +37,13 @@
53 .PP
54 Optional information specified with the \fIdaemon@server\fR form:
55 .IP server
56-A host name or network address, or one of the `unknown' or `paranoid'
57-wildcard patterns. The default server name is `unknown'.
58+A host name or network address, or one of the `unknown\' or `paranoid\'
59+wildcard patterns. The default server name is `unknown\'.
60 .PP
61 Optional information specified with the \fIuser@client\fR form:
62 .IP user
63 A client user identifier. Typically, a login name or a numeric userid.
64-The default user name is `unknown'.
65+The default user name is `unknown\'.
66 .SH OPTIONS
67 .IP -d
68 Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
69@@ -70,7 +70,7 @@
70 .ti +5
71 tcpdmatch in.telnetd paranoid
72 .PP
73-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR
74+On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR
75 may need some help to locate the inetd configuration file.
76 .SH FILES
77 .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 0000000000..9a735bff6d
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
@@ -0,0 +1,250 @@
1Upstream-Status: Backport
2
3diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
4--- tcp_wrappers_7.6.orig/hosts_access.3 2005-03-09 18:30:25.000000000 +0100
5+++ tcp_wrappers_7.6/hosts_access.3 2005-03-09 18:27:03.000000000 +0100
6@@ -3,7 +3,7 @@
7 hosts_access, hosts_ctl, request_init, request_set \- access control library
8 .SH SYNOPSIS
9 .nf
10-#include "tcpd.h"
11+#include <tcpd.h>
12
13 extern int allow_severity;
14 extern int deny_severity;
15diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
16--- tcp_wrappers_7.6.orig/hosts_access.5 2005-03-09 18:30:25.000000000 +0100
17+++ tcp_wrappers_7.6/hosts_access.5 2005-03-09 18:30:18.000000000 +0100
18@@ -8,9 +8,9 @@ name, host name/address) patterns. Exam
19 impatient reader is encouraged to skip to the EXAMPLES section for a
20 quick introduction.
21 .PP
22-An extended version of the access control language is described in the
23-\fIhosts_options\fR(5) document. The extensions are turned on at
24-program build time by building with -DPROCESS_OPTIONS.
25+The extended version of the access control language is described in the
26+\fIhosts_options\fR(5) document. \fBNote that this language supersedes
27+the meaning of \fIshell_command\fB as documented below.\fR
28 .PP
29 In the following text, \fIdaemon\fR is the the process name of a
30 network daemon process, and \fIclient\fR is the name and/or address of
31@@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain
32 /etc/hosts.deny:
33 .in +3
34 .nf
35-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
36- /usr/ucb/mail -s %d-%h root) &
37+in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
38+ /usr/bin/mail -s %d-%h root) &
39 .fi
40 .PP
41 The safe_finger command comes with the tcpd wrapper and should be
42@@ -383,6 +383,7 @@ that shouldn\'t. All problems are repor
43 .fi
44 .SH SEE ALSO
45 .nf
46+hosts_options(5) extended syntax.
47 tcpd(8) tcp/ip daemon wrapper program.
48 tcpdchk(8), tcpdmatch(8), test programs.
49 .SH BUGS
50diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
51--- tcp_wrappers_7.6.orig/hosts_options.5 2005-03-09 18:30:24.000000000 +0100
52+++ tcp_wrappers_7.6/hosts_options.5 2005-03-09 18:27:03.000000000 +0100
53@@ -2,10 +2,8 @@
54 .SH NAME
55 hosts_options \- host access control language extensions
56 .SH DESCRIPTION
57-This document describes optional extensions to the language described
58-in the hosts_access(5) document. The extensions are enabled at program
59-build time. For example, by editing the Makefile and turning on the
60-PROCESS_OPTIONS compile-time option.
61+This document describes extensions to the language described
62+in the hosts_access(5) document.
63 .PP
64 The extensible language uses the following format:
65 .sp
66@@ -58,12 +56,12 @@ Notice the leading dot on the domain nam
67 Execute, in a child process, the specified shell command, after
68 performing the %<letter> expansions described in the hosts_access(5)
69 manual page. The command is executed with stdin, stdout and stderr
70-connected to the null device, so that it won\'t mess up the
71+connected to the null device, so that it won't mess up the
72 conversation with the client host. Example:
73 .sp
74 .nf
75 .ti +3
76-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
77+spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
78 .fi
79 .sp
80 executes, in a background child process, the shell command "safe_finger
81diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
82--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 02:13:24.000000000 +0100
83+++ tcp_wrappers_7.6/inetcf.c 2005-03-09 18:27:03.000000000 +0100
84@@ -26,13 +26,17 @@ extern void exit();
85 * guesses. Shorter names follow longer ones.
86 */
87 char *inet_files[] = {
88+#if 0
89 "/private/etc/inetd.conf", /* NEXT */
90 "/etc/inet/inetd.conf", /* SYSV4 */
91 "/usr/etc/inetd.conf", /* IRIX?? */
92+#endif
93 "/etc/inetd.conf", /* BSD */
94+#if 0
95 "/etc/net/tlid.conf", /* SYSV4?? */
96 "/etc/saf/tlid.conf", /* SYSV4?? */
97 "/etc/tlid.conf", /* SYSV4?? */
98+#endif
99 0,
100 };
101
102diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8
103--- tcp_wrappers_7.6.orig/tcpd.8 1996-02-21 16:39:16.000000000 +0100
104+++ tcp_wrappers_7.6/tcpd.8 2005-03-09 18:27:03.000000000 +0100
105@@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s
106 TLI. Functionality may be limited when the protocol underneath TLI is
107 not an internet protocol.
108 .PP
109-Operation is as follows: whenever a request for service arrives, the
110+There are two possible modes of operation: execution of \fItcpd\fP
111+before a service started by \fIinetd\fP, or linking a daemon with
112+the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3)
113+manual page. Operation when started by \fIinetd\fP
114+is as follows: whenever a request for service arrives, the
115 \fIinetd\fP daemon is tricked into running the \fItcpd\fP program
116 instead of the desired server. \fItcpd\fP logs the request and does
117 some additional checks. When all is well, \fItcpd\fP runs the
118@@ -88,11 +92,11 @@ configuration files.
119 .sp
120 .in +5
121 # mkdir /other/place
122-# mv /usr/etc/in.fingerd /other/place
123-# cp tcpd /usr/etc/in.fingerd
124+# mv /usr/sbin/in.fingerd /other/place
125+# cp tcpd /usr/sbin/in.fingerd
126 .fi
127 .PP
128-The example assumes that the network daemons live in /usr/etc. On some
129+The example assumes that the network daemons live in /usr/sbin. On some
130 systems, network daemons live in /usr/sbin or in /usr/libexec, or have
131 no `in.\' prefix to their name.
132 .SH EXAMPLE 2
133@@ -101,35 +105,34 @@ are left in their original place.
134 .PP
135 In order to monitor access to the \fIfinger\fR service, perform the
136 following edits on the \fIinetd\fR configuration file (usually
137-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):
138+\fI/etc/inetd.conf\fR):
139 .nf
140 .sp
141 .ti +5
142-finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd
143+finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd
144 .sp
145 becomes:
146 .sp
147 .ti +5
148-finger stream tcp nowait nobody /some/where/tcpd in.fingerd
149+finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd
150 .sp
151 .fi
152 .PP
153-The example assumes that the network daemons live in /usr/etc. On some
154+The example assumes that the network daemons live in /usr/sbin. On some
155 systems, network daemons live in /usr/sbin or in /usr/libexec, the
156 daemons have no `in.\' prefix to their name, or there is no userid
157 field in the inetd configuration file.
158 .PP
159 Similar changes will be needed for the other services that are to be
160 covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)
161-process to make the changes effective. AIX users may also have to
162-execute the `inetimp\' command.
163+process to make the changes effective.
164 .SH EXAMPLE 3
165 In the case of daemons that do not live in a common directory ("secret"
166 or otherwise), edit the \fIinetd\fR configuration file so that it
167 specifies an absolute path name for the process name field. For example:
168 .nf
169 .sp
170- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
171+ ntalk dgram udp wait root /usr/sbin/tcpd /usr/local/lib/ntalkd
172 .sp
173 .fi
174 .PP
175@@ -164,6 +167,7 @@ The default locations of the host access
176 .SH SEE ALSO
177 .na
178 .nf
179+hosts_access(3), functions provided by the libwrap library.
180 hosts_access(5), format of the tcpd access control tables.
181 syslog.conf(5), format of the syslogd control file.
182 inetd.conf(5), format of the inetd control file.
183diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8
184--- tcp_wrappers_7.6.orig/tcpdchk.8 1995-01-08 17:00:31.000000000 +0100
185+++ tcp_wrappers_7.6/tcpdchk.8 2005-03-09 18:27:03.000000000 +0100
186@@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v]
187 potential and real problems it can find. The program examines the
188 \fItcpd\fR access control files (by default, these are
189 \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the
190-entries in these files against entries in the \fIinetd\fR or \fItlid\fR
191-network configuration files.
192+entries in these files against entries in the \fIinetd\fR
193+network configuration file.
194 .PP
195 \fItcpdchk\fR reports problems such as non-existent pathnames; services
196 that appear in \fItcpd\fR access control rules, but are not controlled
197@@ -26,14 +26,13 @@ problem.
198 .SH OPTIONS
199 .IP -a
200 Report access control rules that permit access without an explicit
201-ALLOW keyword. This applies only when the extended access control
202-language is enabled (build with -DPROCESS_OPTIONS).
203+ALLOW keyword.
204 .IP -d
205 Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
206 directory instead of the default ones.
207 .IP "-i inet_conf"
208 Specify this option when \fItcpdchk\fR is unable to find your
209-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
210+\fIinetd.conf\fR network configuration file, or when
211 you suspect that the program uses the wrong one.
212 .IP -v
213 Display the contents of each access control rule. Daemon lists, client
214@@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do
215 hosts_access(5), format of the tcpd access control tables.
216 hosts_options(5), format of the language extensions.
217 inetd.conf(5), format of the inetd control file.
218-tlid.conf(5), format of the tlid control file.
219 .SH AUTHORS
220 .na
221 .nf
222diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
223--- tcp_wrappers_7.6.orig/tcpdmatch.8 2005-03-09 18:30:24.000000000 +0100
224+++ tcp_wrappers_7.6/tcpdmatch.8 2005-03-09 18:27:03.000000000 +0100
225@@ -13,7 +13,7 @@ request for service. Examples are given
226 The program examines the \fItcpd\fR access control tables (default
227 \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its
228 conclusion. For maximal accuracy, it extracts additional information
229-from your \fIinetd\fR or \fItlid\fR network configuration file.
230+from your \fIinetd\fR network configuration file.
231 .PP
232 When \fItcpdmatch\fR finds a match in the access control tables, it
233 identifies the matched rule. In addition, it displays the optional
234@@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d
235 directory instead of the default ones.
236 .IP "-i inet_conf"
237 Specify this option when \fItcpdmatch\fR is unable to find your
238-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
239+\fIinetd.conf\fR network configuration file, or when
240 you suspect that the program uses the wrong one.
241 .SH EXAMPLES
242 To predict how \fItcpd\fR would handle a telnet request from the local
243@@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker
244 hosts_access(5), format of the tcpd access control tables.
245 hosts_options(5), format of the language extensions.
246 inetd.conf(5), format of the inetd control file.
247-tlid.conf(5), format of the tlid control file.
248 .SH AUTHORS
249 .na
250 .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 0000000000..9e188027fc
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
@@ -0,0 +1,105 @@
1Upstream-Status: Backport
2
3See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847
4
5diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
6--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 18:54:33.000000000 +0200
7+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 18:54:27.000000000 +0200
8@@ -89,6 +89,10 @@
9 bitwise AND of the address and the `mask\'. For example, the net/mask
10 pattern `131.155.72.0/255.255.254.0\' matches every address in the
11 range `131.155.72.0\' through `131.155.73.255\'.
12+.IP \(bu
13+Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
14+method of matching cannot be used in conjunction with `net/mask\' matching,
15+hostname matching beginning with `.\' or IP address matching ending with `.\'.
16 .SH WILDCARDS
17 The access control language supports explicit wildcards:
18 .IP ALL
19diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
20--- tcp_wrappers_7.6.orig/hosts_access.c 1997-02-12 02:13:23.000000000 +0100
21+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 18:52:21.000000000 +0200
22@@ -289,6 +289,11 @@
23 {
24 int n;
25
26+#ifndef DISABLE_WILDCARD_MATCHING
27+ if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
28+ return (match_pattern_ylo(string,tok));
29+ } else
30+#endif
31 if (tok[0] == '.') { /* suffix */
32 n = strlen(string) - strlen(tok);
33 return (n > 0 && STR_EQ(tok, string + n));
34@@ -329,3 +334,71 @@
35 }
36 return ((addr & mask) == net);
37 }
38+
39+#ifndef DISABLE_WILDCARD_MATCHING
40+/* Note: this feature has been adapted in a pretty straightforward way
41+ from Tatu Ylonen's last SSH version under free license by
42+ Pekka Savola <pekkas@netcore.fi>.
43+
44+ Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
45+*/
46+
47+/* Returns true if the given string matches the pattern (which may contain
48+ ? and * as wildcards), and zero if it does not match. */
49+
50+int match_pattern_ylo(const char *s, const char *pattern)
51+{
52+ while (1)
53+ {
54+ /* If at end of pattern, accept if also at end of string. */
55+ if (!*pattern)
56+ return !*s;
57+
58+ /* Process '*'. */
59+ if (*pattern == '*')
60+ {
61+ /* Skip the asterisk. */
62+ pattern++;
63+
64+ /* If at end of pattern, accept immediately. */
65+ if (!*pattern)
66+ return 1;
67+
68+ /* If next character in pattern is known, optimize. */
69+ if (*pattern != '?' && *pattern != '*')
70+ {
71+ /* Look instances of the next character in pattern, and try
72+ to match starting from those. */
73+ for (; *s; s++)
74+ if (*s == *pattern &&
75+ match_pattern_ylo(s + 1, pattern + 1))
76+ return 1;
77+ /* Failed. */
78+ return 0;
79+ }
80+
81+ /* Move ahead one character at a time and try to match at each
82+ position. */
83+ for (; *s; s++)
84+ if (match_pattern_ylo(s, pattern))
85+ return 1;
86+ /* Failed. */
87+ return 0;
88+ }
89+
90+ /* There must be at least one more character in the string. If we are
91+ at the end, fail. */
92+ if (!*s)
93+ return 0;
94+
95+ /* Check if the next character of the string is acceptable. */
96+ if (*pattern != '?' && *pattern != *s)
97+ return 0;
98+
99+ /* Move to the next character, both in string and in pattern. */
100+ s++;
101+ pattern++;
102+ }
103+ /*NOTREACHED*/
104+}
105+#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 0000000000..725f4b5957
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Backport
2
3* Mon Feb 5 2001 Preston Brown <pbrown@redhat.com>
4- fix gethostbyname to work better with dot "." notation (#16949)
5
6--- tcp_wrappers_7.6/socket.c.fixgethostbyname Fri Mar 21 13:27:25 1997
7+++ tcp_wrappers_7.6/socket.c Mon Feb 5 14:09:40 2001
8@@ -52,7 +52,8 @@
9 char *name;
10 {
11 char dot_name[MAXHOSTNAMELEN + 1];
12-
13+ struct hostent *hp;
14+
15 /*
16 * Don't append dots to unqualified names. Such names are likely to come
17 * from local hosts files or from NIS.
18@@ -61,8 +62,12 @@
19 if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
20 return (gethostbyname(name));
21 } else {
22- sprintf(dot_name, "%s.", name);
23- return (gethostbyname(dot_name));
24+ sprintf(dot_name, "%s.", name);
25+ hp = gethostbyname(dot_name);
26+ if (hp)
27+ return hp;
28+ else
29+ return (gethostbyname(name));
30 }
31 }
32
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 0000000000..96d47c39f4
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
@@ -0,0 +1,1255 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
4--- tcp_wrappers_7.6.orig/fix_options.c 1997-04-08 02:29:19.000000000 +0200
5+++ tcp_wrappers_7.6/fix_options.c 2004-04-10 19:07:43.000000000 +0200
6@@ -11,6 +11,9 @@
7
8 #include <sys/types.h>
9 #include <sys/param.h>
10+#ifdef INET6
11+#include <sys/socket.h>
12+#endif
13 #include <netinet/in.h>
14 #include <netinet/in_systm.h>
15 #include <netinet/ip.h>
16@@ -41,6 +44,22 @@
17 unsigned int opt;
18 int optlen;
19 struct in_addr dummy;
20+#ifdef INET6
21+ struct sockaddr_storage ss;
22+ int sslen;
23+
24+ /*
25+ * check if this is AF_INET socket
26+ * XXX IPv6 support?
27+ */
28+ sslen = sizeof(ss);
29+ if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) {
30+ syslog(LOG_ERR, "getpeername: %m");
31+ clean_exit(request);
32+ }
33+ if (ss.ss_family != AF_INET)
34+ return;
35+#endif
36
37 if ((ip = getprotobyname("ip")) != 0)
38 ipproto = ip->p_proto;
39diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
40--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:22:58.000000000 +0200
41+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:07:43.000000000 +0200
42@@ -85,11 +85,18 @@
43 for daemon process names or for client user names.
44 .IP \(bu
45 An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
46-`net/mask\' pair. A host address is matched if `net\' is equal to the
47+`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the
48 bitwise AND of the address and the `mask\'. For example, the net/mask
49 pattern `131.155.72.0/255.255.254.0\' matches every address in the
50 range `131.155.72.0\' through `131.155.73.255\'.
51 .IP \(bu
52+An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
53+`[net]/prefixlen\' pair. An IPv6 host address is matched if
54+`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
55+address. For example, the [net]/prefixlen pattern
56+`[3ffe:505:2:1::]/64\' matches every address in the range
57+`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
58+.IP \(bu
59 Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
60 method of matching cannot be used in conjunction with `net/mask\' matching,
61 hostname matching beginning with `.\' or IP address matching ending with `.\'.
62diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
63--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:22:58.000000000 +0200
64+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:07:43.000000000 +0200
65@@ -24,7 +24,13 @@
66 /* System libraries. */
67
68 #include <sys/types.h>
69+#ifdef INT32_T
70+ typedef uint32_t u_int32_t;
71+#endif
72 #include <sys/param.h>
73+#ifdef INET6
74+#include <sys/socket.h>
75+#endif
76 #include <netinet/in.h>
77 #include <arpa/inet.h>
78 #include <stdio.h>
79@@ -33,6 +39,9 @@
80 #include <errno.h>
81 #include <setjmp.h>
82 #include <string.h>
83+#ifdef INET6
84+#include <netdb.h>
85+#endif
86
87 extern char *fgets();
88 extern int errno;
89@@ -82,6 +91,10 @@
90 static int host_match();
91 static int string_match();
92 static int masked_match();
93+#ifdef INET6
94+static int masked_match4();
95+static int masked_match6();
96+#endif
97
98 /* Size of logical line buffer. */
99
100@@ -289,6 +302,13 @@
101 {
102 int n;
103
104+#ifdef INET6
105+ /* convert IPv4 mapped IPv6 address to IPv4 address */
106+ if (STRN_EQ(string, "::ffff:", 7)
107+ && dot_quad_addr(string + 7) != INADDR_NONE) {
108+ string += 7;
109+ }
110+#endif
111 #ifndef DISABLE_WILDCARD_MATCHING
112 if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */
113 return (match_pattern_ylo(string,tok));
114@@ -304,20 +324,72 @@
115 } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */
116 return (STRN_EQ(tok, string, n));
117 } else { /* exact match */
118+#ifdef INET6
119+ struct addrinfo hints, *res;
120+ struct sockaddr_in6 pat, addr;
121+ int len, ret;
122+ char ch;
123+
124+ len = strlen(tok);
125+ if (*tok == '[' && tok[len - 1] == ']') {
126+ ch = tok[len - 1];
127+ tok[len - 1] = '\0';
128+ memset(&hints, 0, sizeof(hints));
129+ hints.ai_family = AF_INET6;
130+ hints.ai_socktype = SOCK_STREAM;
131+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
132+ if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) {
133+ memcpy(&pat, res->ai_addr, sizeof(pat));
134+ freeaddrinfo(res);
135+ }
136+ tok[len - 1] = ch;
137+ if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0)
138+ return NO;
139+ memcpy(&addr, res->ai_addr, sizeof(addr));
140+ freeaddrinfo(res);
141+#ifdef NI_WITHSCOPEID
142+ if (pat.sin6_scope_id != 0 &&
143+ addr.sin6_scope_id != pat.sin6_scope_id)
144+ return NO;
145+#endif
146+ return (!memcmp(&pat.sin6_addr, &addr.sin6_addr,
147+ sizeof(struct in6_addr)));
148+ return (ret);
149+ }
150+#endif
151 return (STR_EQ(tok, string));
152 }
153 }
154
155 /* masked_match - match address against netnumber/netmask */
156
157+#ifdef INET6
158 static int masked_match(net_tok, mask_tok, string)
159 char *net_tok;
160 char *mask_tok;
161 char *string;
162 {
163+ return (masked_match4(net_tok, mask_tok, string) ||
164+ masked_match6(net_tok, mask_tok, string));
165+}
166+
167+static int masked_match4(net_tok, mask_tok, string)
168+#else
169+static int masked_match(net_tok, mask_tok, string)
170+#endif
171+char *net_tok;
172+char *mask_tok;
173+char *string;
174+{
175+#ifdef INET6
176+ u_int32_t net;
177+ u_int32_t mask;
178+ u_int32_t addr;
179+#else
180 unsigned long net;
181 unsigned long mask;
182 unsigned long addr;
183+#endif
184
185 /*
186 * Disallow forms other than dotted quad: the treatment that inet_addr()
187@@ -329,12 +401,78 @@
188 return (NO);
189 if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
190 || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
191+#ifndef INET6
192 tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
193+#endif
194 return (NO); /* not tcpd_jump() */
195 }
196 return ((addr & mask) == net);
197 }
198
199+#ifdef INET6
200+static int masked_match6(net_tok, mask_tok, string)
201+char *net_tok;
202+char *mask_tok;
203+char *string;
204+{
205+ struct addrinfo hints, *res;
206+ struct sockaddr_in6 net, addr;
207+ u_int32_t mask;
208+ int len, mask_len, i = 0;
209+ char ch;
210+
211+ memset(&hints, 0, sizeof(hints));
212+ hints.ai_family = AF_INET6;
213+ hints.ai_socktype = SOCK_STREAM;
214+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
215+ if (getaddrinfo(string, NULL, &hints, &res) != 0)
216+ return NO;
217+ memcpy(&addr, res->ai_addr, sizeof(addr));
218+ freeaddrinfo(res);
219+
220+ if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
221+ if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
222+ || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
223+ return (NO);
224+ return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
225+ }
226+
227+ /* match IPv6 address against netnumber/prefixlen */
228+ len = strlen(net_tok);
229+ if (*net_tok != '[' || net_tok[len - 1] != ']')
230+ return NO;
231+ ch = net_tok[len - 1];
232+ net_tok[len - 1] = '\0';
233+ if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) {
234+ net_tok[len - 1] = ch;
235+ return NO;
236+ }
237+ memcpy(&net, res->ai_addr, sizeof(net));
238+ freeaddrinfo(res);
239+ net_tok[len - 1] = ch;
240+ if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128)
241+ return NO;
242+
243+#ifdef NI_WITHSCOPEID
244+ if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id)
245+ return NO;
246+#endif
247+ while (mask_len > 0) {
248+ if (mask_len < 32) {
249+ mask = htonl(~(0xffffffff >> mask_len));
250+ if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask))
251+ return NO;
252+ break;
253+ }
254+ if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i])
255+ return NO;
256+ i += 4;
257+ mask_len -= 32;
258+ }
259+ return YES;
260+}
261+#endif /* INET6 */
262+
263 #ifndef DISABLE_WILDCARD_MATCHING
264 /* Note: this feature has been adapted in a pretty straightforward way
265 from Tatu Ylonen's last SSH version under free license by
266diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
267--- tcp_wrappers_7.6.orig/Makefile 1997-03-21 19:27:21.000000000 +0100
268+++ tcp_wrappers_7.6/Makefile 2004-04-10 19:22:44.000000000 +0200
269@@ -21,7 +21,7 @@
270 @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
271 @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
272 @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
273- @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
274+ @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
275 @echo " uts215 uxp"
276 @echo
277 @echo "If none of these match your environment, edit the system"
278@@ -131,20 +131,34 @@
279 NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
280
281 # Freebsd and linux by default have no NIS.
282-386bsd netbsd bsdos:
283+386bsd bsdos:
284 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
285 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
286 EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
287
288 freebsd:
289 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
290+ LIBS="-L/usr/local/v6/lib -linet6" \
291 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
292- EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
293+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \
294+ VSYSLOG= all
295+
296+netbsd:
297+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
298+ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
299+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all
300
301 linux:
302 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
303- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
304- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
305+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
306+ NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
307+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
308+
309+gnu:
310+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
311+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
312+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
313+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
314
315 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
316 hpux hpux8 hpux9 hpux10:
317@@ -196,6 +210,13 @@
318 NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
319 BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
320
321+# SunOS 5.8 is another SYSV4 variant, but has IPv6 support
322+solaris8:
323+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
324+ LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
325+ NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
326+ EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all
327+
328 # Generic SYSV40
329 esix sysv4:
330 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
331diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
332--- tcp_wrappers_7.6.orig/misc.c 1996-02-11 17:01:30.000000000 +0100
333+++ tcp_wrappers_7.6/misc.c 2004-04-10 19:07:43.000000000 +0200
334@@ -58,9 +58,31 @@
335 {
336 char *cp;
337
338+#ifdef INET6
339+ int bracket = 0;
340+
341+ for (cp = string; cp && *cp; cp++) {
342+ switch (*cp) {
343+ case '[':
344+ bracket++;
345+ break;
346+ case ']':
347+ bracket--;
348+ break;
349+ default:
350+ if (bracket == 0 && *cp == delimiter) {
351+ *cp++ = 0;
352+ return cp;
353+ }
354+ break;
355+ }
356+ }
357+ return (NULL);
358+#else
359 if ((cp = strchr(string, delimiter)) != 0)
360 *cp++ = 0;
361 return (cp);
362+#endif
363 }
364
365 /* dot_quad_addr - convert dotted quad to internal form */
366diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
367--- tcp_wrappers_7.6.orig/refuse.c 1994-12-28 17:42:40.000000000 +0100
368+++ tcp_wrappers_7.6/refuse.c 2004-04-10 19:07:43.000000000 +0200
369@@ -25,7 +25,12 @@
370 void refuse(request)
371 struct request_info *request;
372 {
373+#ifdef INET6
374+ syslog(deny_severity, "refused connect from %s (%s)",
375+ eval_client(request), eval_hostaddr(request->client));
376+#else
377 syslog(deny_severity, "refused connect from %s", eval_client(request));
378+#endif
379 clean_exit(request);
380 /* NOTREACHED */
381 }
382diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
383--- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100
384+++ tcp_wrappers_7.6/rfc931.c 2004-04-10 19:07:43.000000000 +0200
385@@ -68,20 +68,50 @@
386 /* rfc931 - return remote user name, given socket structures */
387
388 void rfc931(rmt_sin, our_sin, dest)
389+#ifdef INET6
390+struct sockaddr *rmt_sin;
391+struct sockaddr *our_sin;
392+#else
393 struct sockaddr_in *rmt_sin;
394 struct sockaddr_in *our_sin;
395+#endif
396 char *dest;
397 {
398 unsigned rmt_port;
399 unsigned our_port;
400+#ifdef INET6
401+ struct sockaddr_storage rmt_query_sin;
402+ struct sockaddr_storage our_query_sin;
403+ int alen;
404+#else
405 struct sockaddr_in rmt_query_sin;
406 struct sockaddr_in our_query_sin;
407+#endif
408 char user[256]; /* XXX */
409 char buffer[512]; /* XXX */
410 char *cp;
411 char *result = unknown;
412 FILE *fp;
413
414+#ifdef INET6
415+ /* address family must be the same */
416+ if (rmt_sin->sa_family != our_sin->sa_family) {
417+ STRN_CPY(dest, result, STRING_LENGTH);
418+ return;
419+ }
420+ switch (our_sin->sa_family) {
421+ case AF_INET:
422+ alen = sizeof(struct sockaddr_in);
423+ break;
424+ case AF_INET6:
425+ alen = sizeof(struct sockaddr_in6);
426+ break;
427+ default:
428+ STRN_CPY(dest, result, STRING_LENGTH);
429+ return;
430+ }
431+#endif
432+
433 /*
434 * Use one unbuffered stdio stream for writing to and for reading from
435 * the RFC931 etc. server. This is done because of a bug in the SunOS
436@@ -92,7 +122,11 @@
437 * sockets.
438 */
439
440+#ifdef INET6
441+ if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) {
442+#else
443 if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) {
444+#endif
445 setbuf(fp, (char *) 0);
446
447 /*
448@@ -112,6 +146,25 @@
449 * addresses from the query socket.
450 */
451
452+#ifdef INET6
453+ memcpy(&our_query_sin, our_sin, alen);
454+ memcpy(&rmt_query_sin, rmt_sin, alen);
455+ switch (our_sin->sa_family) {
456+ case AF_INET:
457+ ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT);
458+ ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT);
459+ break;
460+ case AF_INET6:
461+ ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT);
462+ ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT);
463+ break;
464+ }
465+
466+ if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
467+ alen) >= 0 &&
468+ connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
469+ alen) >= 0) {
470+#else
471 our_query_sin = *our_sin;
472 our_query_sin.sin_port = htons(ANY_PORT);
473 rmt_query_sin = *rmt_sin;
474@@ -121,6 +174,7 @@
475 sizeof(our_query_sin)) >= 0 &&
476 connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
477 sizeof(rmt_query_sin)) >= 0) {
478+#endif
479
480 /*
481 * Send query to server. Neglect the risk that a 13-byte
482@@ -129,8 +183,13 @@
483 */
484
485 fprintf(fp, "%u,%u\r\n",
486+#ifdef INET6
487+ ntohs(((struct sockaddr_in *)rmt_sin)->sin_port),
488+ ntohs(((struct sockaddr_in *)our_sin)->sin_port));
489+#else
490 ntohs(rmt_sin->sin_port),
491 ntohs(our_sin->sin_port));
492+#endif
493 fflush(fp);
494
495 /*
496@@ -144,8 +203,13 @@
497 && ferror(fp) == 0 && feof(fp) == 0
498 && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s",
499 &rmt_port, &our_port, user) == 3
500+#ifdef INET6
501+ && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port
502+ && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) {
503+#else
504 && ntohs(rmt_sin->sin_port) == rmt_port
505 && ntohs(our_sin->sin_port) == our_port) {
506+#endif
507
508 /*
509 * Strip trailing carriage return. It is part of the
510diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
511--- tcp_wrappers_7.6.orig/scaffold.c 1997-03-21 19:27:24.000000000 +0100
512+++ tcp_wrappers_7.6/scaffold.c 2004-04-10 19:07:43.000000000 +0200
513@@ -25,7 +25,9 @@
514 #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
515 #endif
516
517+#ifndef INET6
518 extern char *malloc();
519+#endif
520
521 /* Application-specific. */
522
523@@ -39,6 +41,7 @@
524 int deny_severity = LOG_WARNING;
525 int rfc931_timeout = RFC931_TIMEOUT;
526
527+#ifndef INET6
528 /* dup_hostent - create hostent in one memory block */
529
530 static struct hostent *dup_hostent(hp)
531@@ -73,9 +76,46 @@
532 }
533 return (&hb->host);
534 }
535+#endif
536
537 /* find_inet_addr - find all addresses for this host, result to free() */
538
539+#ifdef INET6
540+struct addrinfo *find_inet_addr(host)
541+char *host;
542+{
543+ struct addrinfo hints, *res;
544+
545+ memset(&hints, 0, sizeof(hints));
546+ hints.ai_family = PF_UNSPEC;
547+ hints.ai_socktype = SOCK_STREAM;
548+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
549+ if (getaddrinfo(host, NULL, &hints, &res) == 0)
550+ return (res);
551+
552+ memset(&hints, 0, sizeof(hints));
553+ hints.ai_family = PF_UNSPEC;
554+ hints.ai_socktype = SOCK_STREAM;
555+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
556+ if (getaddrinfo(host, NULL, &hints, &res) != 0) {
557+ tcpd_warn("%s: host not found", host);
558+ return (0);
559+ }
560+ if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) {
561+ tcpd_warn("%d: not an internet host", res->ai_family);
562+ freeaddrinfo(res);
563+ return (0);
564+ }
565+ if (!res->ai_canonname) {
566+ tcpd_warn("%s: hostname alias", host);
567+ tcpd_warn("(cannot obtain official name)", res->ai_canonname);
568+ } else if (STR_NE(host, res->ai_canonname)) {
569+ tcpd_warn("%s: hostname alias", host);
570+ tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname);
571+ }
572+ return (res);
573+}
574+#else
575 struct hostent *find_inet_addr(host)
576 char *host;
577 {
578@@ -118,6 +158,7 @@
579 }
580 return (dup_hostent(hp));
581 }
582+#endif
583
584 /* check_dns - give each address thorough workout, return address count */
585
586@@ -125,8 +166,13 @@
587 char *host;
588 {
589 struct request_info request;
590+#ifdef INET6
591+ struct sockaddr_storage sin;
592+ struct addrinfo *hp, *res;
593+#else
594 struct sockaddr_in sin;
595 struct hostent *hp;
596+#endif
597 int count;
598 char *addr;
599
600@@ -134,11 +180,18 @@
601 return (0);
602 request_init(&request, RQ_CLIENT_SIN, &sin, 0);
603 sock_methods(&request);
604+#ifndef INET6
605 memset((char *) &sin, 0, sizeof(sin));
606 sin.sin_family = AF_INET;
607+#endif
608
609+#ifdef INET6
610+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
611+ memcpy(&sin, res->ai_addr, res->ai_addrlen);
612+#else
613 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
614 memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr));
615+#endif
616
617 /*
618 * Force host name and address conversions. Use the request structure
619@@ -151,7 +204,11 @@
620 tcpd_warn("host address %s->name lookup failed",
621 eval_hostaddr(request.client));
622 }
623+#ifdef INET6
624+ freeaddrinfo(hp);
625+#else
626 free((char *) hp);
627+#endif
628 return (count);
629 }
630
631diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h
632--- tcp_wrappers_7.6.orig/scaffold.h 1994-12-31 18:19:20.000000000 +0100
633+++ tcp_wrappers_7.6/scaffold.h 2004-04-10 19:07:43.000000000 +0200
634@@ -4,6 +4,10 @@
635 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
636 */
637
638+#ifdef INET6
639+extern struct addrinfo *find_inet_addr();
640+#else
641 extern struct hostent *find_inet_addr();
642+#endif
643 extern int check_dns();
644 extern int check_path();
645diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
646--- tcp_wrappers_7.6.orig/socket.c 2004-04-10 19:22:58.000000000 +0200
647+++ tcp_wrappers_7.6/socket.c 2004-04-10 19:07:43.000000000 +0200
648@@ -24,13 +24,22 @@
649 #include <sys/types.h>
650 #include <sys/param.h>
651 #include <sys/socket.h>
652+#ifdef INT32_T
653+typedef uint32_t u_int32_t;
654+#endif
655 #include <netinet/in.h>
656 #include <netdb.h>
657 #include <stdio.h>
658 #include <syslog.h>
659 #include <string.h>
660
661+#ifdef INET6
662+#ifndef NI_WITHSCOPEID
663+#define NI_WITHSCOPEID 0
664+#endif
665+#else
666 extern char *inet_ntoa();
667+#endif
668
669 /* Local stuff. */
670
671@@ -79,8 +88,13 @@
672 void sock_host(request)
673 struct request_info *request;
674 {
675+#ifdef INET6
676+ static struct sockaddr_storage client;
677+ static struct sockaddr_storage server;
678+#else
679 static struct sockaddr_in client;
680 static struct sockaddr_in server;
681+#endif
682 int len;
683 char buf[BUFSIZ];
684 int fd = request->fd;
685@@ -109,7 +123,11 @@
686 memset(buf, 0 sizeof(buf));
687 #endif
688 }
689+#ifdef INET6
690+ request->client->sin = (struct sockaddr *)&client;
691+#else
692 request->client->sin = &client;
693+#endif
694
695 /*
696 * Determine the server binding. This is used for client username
697@@ -122,7 +140,11 @@
698 tcpd_warn("getsockname: %m");
699 return;
700 }
701+#ifdef INET6
702+ request->server->sin = (struct sockaddr *)&server;
703+#else
704 request->server->sin = &server;
705+#endif
706 }
707
708 /* sock_hostaddr - map endpoint address to printable form */
709@@ -130,10 +152,26 @@
710 void sock_hostaddr(host)
711 struct host_info *host;
712 {
713+#ifdef INET6
714+ struct sockaddr *sin = host->sin;
715+ int salen;
716+
717+ if (!sin)
718+ return;
719+#ifdef SIN6_LEN
720+ salen = sin->sa_len;
721+#else
722+ salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in)
723+ : sizeof(struct sockaddr_in6);
724+#endif
725+ getnameinfo(sin, salen, host->addr, sizeof(host->addr),
726+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
727+#else
728 struct sockaddr_in *sin = host->sin;
729
730 if (sin != 0)
731 STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr));
732+#endif
733 }
734
735 /* sock_hostname - map endpoint address to host name */
736@@ -141,6 +179,160 @@
737 void sock_hostname(host)
738 struct host_info *host;
739 {
740+#ifdef INET6
741+ struct sockaddr *sin = host->sin;
742+ struct sockaddr_in sin4;
743+ struct addrinfo hints, *res, *res0 = NULL;
744+ int salen, alen, err = 1;
745+ char *ap = NULL, *rap, hname[NI_MAXHOST];
746+
747+ if (sin != NULL) {
748+ if (sin->sa_family == AF_INET6) {
749+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin;
750+
751+ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
752+ memset(&sin4, 0, sizeof(sin4));
753+#ifdef SIN6_LEN
754+ sin4.sin_len = sizeof(sin4);
755+#endif
756+ sin4.sin_family = AF_INET;
757+ sin4.sin_port = sin6->sin6_port;
758+ sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12];
759+ sin = (struct sockaddr *)&sin4;
760+ }
761+ }
762+ switch (sin->sa_family) {
763+ case AF_INET:
764+ ap = (char *)&((struct sockaddr_in *)sin)->sin_addr;
765+ alen = sizeof(struct in_addr);
766+ salen = sizeof(struct sockaddr_in);
767+ break;
768+ case AF_INET6:
769+ ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
770+ alen = sizeof(struct in6_addr);
771+ salen = sizeof(struct sockaddr_in6);
772+ break;
773+ default:
774+ break;
775+ }
776+ if (ap)
777+ err = getnameinfo(sin, salen, hname, sizeof(hname),
778+ NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD);
779+ }
780+ if (!err) {
781+
782+ STRN_CPY(host->name, hname, sizeof(host->name));
783+
784+ /* reject numeric addresses */
785+ memset(&hints, 0, sizeof(hints));
786+ hints.ai_family = sin->sa_family;
787+ hints.ai_socktype = SOCK_STREAM;
788+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
789+ if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
790+ freeaddrinfo(res0);
791+ res0 = NULL;
792+ tcpd_warn("host name/name mismatch: "
793+ "reverse lookup results in non-FQDN %s",
794+ host->name);
795+ strcpy(host->name, paranoid); /* name is bad, clobber it */
796+ }
797+ err = !err;
798+ }
799+ if (!err) {
800+ /* we are now sure that this is non-numeric */
801+
802+ /*
803+ * Verify that the address is a member of the address list returned
804+ * by gethostbyname(hostname).
805+ *
806+ * Verify also that gethostbyaddr() and gethostbyname() return the same
807+ * hostname, or rshd and rlogind may still end up being spoofed.
808+ *
809+ * On some sites, gethostbyname("localhost") returns "localhost.domain".
810+ * This is a DNS artefact. We treat it as a special case. When we
811+ * can't believe the address list from gethostbyname("localhost")
812+ * we're in big trouble anyway.
813+ */
814+
815+ memset(&hints, 0, sizeof(hints));
816+ hints.ai_family = sin->sa_family;
817+ hints.ai_socktype = SOCK_STREAM;
818+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
819+ if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) {
820+
821+ /*
822+ * Unable to verify that the host name matches the address. This
823+ * may be a transient problem or a botched name server setup.
824+ */
825+
826+ tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed",
827+ host->name,
828+ (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6");
829+
830+ } else if ((res0->ai_canonname == NULL
831+ || STR_NE(host->name, res0->ai_canonname))
832+ && STR_NE(host->name, "localhost")) {
833+
834+ /*
835+ * The gethostbyaddr() and gethostbyname() calls did not return
836+ * the same hostname. This could be a nameserver configuration
837+ * problem. It could also be that someone is trying to spoof us.
838+ */
839+
840+ tcpd_warn("host name/name mismatch: %s != %.*s",
841+ host->name, STRING_LENGTH,
842+ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
843+
844+ } else {
845+
846+ /*
847+ * The address should be a member of the address list returned by
848+ * gethostbyname(). We should first verify that the h_addrtype
849+ * field is AF_INET, but this program has already caused too much
850+ * grief on systems with broken library code.
851+ */
852+
853+ for (res = res0; res; res = res->ai_next) {
854+ if (res->ai_family != sin->sa_family)
855+ continue;
856+ switch (res->ai_family) {
857+ case AF_INET:
858+ rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr;
859+ break;
860+ case AF_INET6:
861+ /* need to check scope_id */
862+ if (((struct sockaddr_in6 *)sin)->sin6_scope_id !=
863+ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) {
864+ continue;
865+ }
866+ rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
867+ break;
868+ default:
869+ continue;
870+ }
871+ if (memcmp(rap, ap, alen) == 0) {
872+ freeaddrinfo(res0);
873+ return; /* name is good, keep it */
874+ }
875+ }
876+
877+ /*
878+ * The host name does not map to the initial address. Perhaps
879+ * someone has messed up. Perhaps someone compromised a name
880+ * server.
881+ */
882+
883+ getnameinfo(sin, salen, hname, sizeof(hname),
884+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
885+ tcpd_warn("host name/address mismatch: %s != %.*s",
886+ hname, STRING_LENGTH,
887+ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
888+ }
889+ strcpy(host->name, paranoid); /* name is bad, clobber it */
890+ if (res0)
891+ freeaddrinfo(res0);
892+ }
893+#else /* INET6 */
894 struct sockaddr_in *sin = host->sin;
895 struct hostent *hp;
896 int i;
897@@ -220,6 +412,7 @@
898 }
899 strcpy(host->name, paranoid); /* name is bad, clobber it */
900 }
901+#endif /* INET6 */
902 }
903
904 /* sock_sink - absorb unreceived IP datagram */
905@@ -228,7 +421,11 @@
906 int fd;
907 {
908 char buf[BUFSIZ];
909+#ifdef INET6
910+ struct sockaddr_storage sin;
911+#else
912 struct sockaddr_in sin;
913+#endif
914 int size = sizeof(sin);
915
916 /*
917diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
918--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-11 17:01:33.000000000 +0100
919+++ tcp_wrappers_7.6/tcpd.c 2004-04-10 19:07:43.000000000 +0200
920@@ -120,7 +120,12 @@
921
922 /* Report request and invoke the real daemon program. */
923
924+#ifdef INET6
925+ syslog(allow_severity, "connect from %s (%s)",
926+ eval_client(&request), eval_hostaddr(request.client));
927+#else
928 syslog(allow_severity, "connect from %s", eval_client(&request));
929+#endif
930 closelog();
931 (void) execv(path, argv);
932 syslog(LOG_ERR, "error: cannot execute %s: %m", path);
933diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
934--- tcp_wrappers_7.6.orig/tcpdchk.c 1997-02-12 02:13:25.000000000 +0100
935+++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:07:43.000000000 +0200
936@@ -22,6 +22,9 @@
937
938 #include <sys/types.h>
939 #include <sys/stat.h>
940+#ifdef INET6
941+#include <sys/socket.h>
942+#endif
943 #include <netinet/in.h>
944 #include <arpa/inet.h>
945 #include <stdio.h>
946@@ -397,6 +400,31 @@
947 }
948 }
949
950+#ifdef INET6
951+static int is_inet6_addr(pat)
952+ char *pat;
953+{
954+ struct addrinfo hints, *res;
955+ int len, ret;
956+ char ch;
957+
958+ if (*pat != '[')
959+ return (0);
960+ len = strlen(pat);
961+ if ((ch = pat[len - 1]) != ']')
962+ return (0);
963+ pat[len - 1] = '\0';
964+ memset(&hints, 0, sizeof(hints));
965+ hints.ai_family = AF_INET6;
966+ hints.ai_socktype = SOCK_STREAM;
967+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
968+ if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0)
969+ freeaddrinfo(res);
970+ pat[len - 1] = ch;
971+ return (ret == 0);
972+}
973+#endif
974+
975 /* check_host - criticize host pattern */
976
977 static int check_host(pat)
978@@ -423,14 +451,27 @@
979 #endif
980 #endif
981 } else if (mask = split_at(pat, '/')) { /* network/netmask */
982+#ifdef INET6
983+ int mask_len;
984+
985+ if ((dot_quad_addr(pat) == INADDR_NONE
986+ || dot_quad_addr(mask) == INADDR_NONE)
987+ && (!is_inet6_addr(pat)
988+ || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
989+#else
990 if (dot_quad_addr(pat) == INADDR_NONE
991 || dot_quad_addr(mask) == INADDR_NONE)
992+#endif
993 tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
994 } else if (STR_EQ(pat, "FAIL")) { /* obsolete */
995 tcpd_warn("FAIL is no longer recognized");
996 tcpd_warn("(use EXCEPT or DENY instead)");
997 } else if (reserved_name(pat)) { /* other reserved */
998 /* void */ ;
999+#ifdef INET6
1000+ } else if (is_inet6_addr(pat)) { /* IPv6 address */
1001+ addr_count = 1;
1002+#endif
1003 } else if (NOT_INADDR(pat)) { /* internet name */
1004 if (pat[strlen(pat) - 1] == '.') {
1005 tcpd_warn("%s: domain or host name ends in dot", pat);
1006diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
1007--- tcp_wrappers_7.6.orig/tcpd.h 1996-03-19 16:22:25.000000000 +0100
1008+++ tcp_wrappers_7.6/tcpd.h 2004-04-10 19:07:43.000000000 +0200
1009@@ -11,7 +11,11 @@
1010 struct host_info {
1011 char name[STRING_LENGTH]; /* access via eval_hostname(host) */
1012 char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */
1013+#ifdef INET6
1014+ struct sockaddr *sin; /* socket address or 0 */
1015+#else
1016 struct sockaddr_in *sin; /* socket address or 0 */
1017+#endif
1018 struct t_unitdata *unit; /* TLI transport address or 0 */
1019 struct request_info *request; /* for shared information */
1020 };
1021diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
1022--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-11 17:01:36.000000000 +0100
1023+++ tcp_wrappers_7.6/tcpdmatch.c 2004-04-10 19:07:43.000000000 +0200
1024@@ -57,7 +57,11 @@
1025 int argc;
1026 char **argv;
1027 {
1028+#ifdef INET6
1029+ struct addrinfo hints, *hp, *res;
1030+#else
1031 struct hostent *hp;
1032+#endif
1033 char *myname = argv[0];
1034 char *client;
1035 char *server;
1036@@ -68,8 +72,13 @@
1037 int ch;
1038 char *inetcf = 0;
1039 int count;
1040+#ifdef INET6
1041+ struct sockaddr_storage server_sin;
1042+ struct sockaddr_storage client_sin;
1043+#else
1044 struct sockaddr_in server_sin;
1045 struct sockaddr_in client_sin;
1046+#endif
1047 struct stat st;
1048
1049 /*
1050@@ -172,13 +181,20 @@
1051 if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) {
1052 if ((hp = find_inet_addr(server)) == 0)
1053 exit(1);
1054+#ifndef INET6
1055 memset((char *) &server_sin, 0, sizeof(server_sin));
1056 server_sin.sin_family = AF_INET;
1057+#endif
1058 request_set(&request, RQ_SERVER_SIN, &server_sin, 0);
1059
1060+#ifdef INET6
1061+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
1062+ memcpy(&server_sin, res->ai_addr, res->ai_addrlen);
1063+#else
1064 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
1065 memcpy((char *) &server_sin.sin_addr, addr,
1066 sizeof(server_sin.sin_addr));
1067+#endif
1068
1069 /*
1070 * Force evaluation of server host name and address. Host name
1071@@ -194,7 +210,11 @@
1072 fprintf(stderr, "Please specify an address instead\n");
1073 exit(1);
1074 }
1075+#ifdef INET6
1076+ freeaddrinfo(hp);
1077+#else
1078 free((char *) hp);
1079+#endif
1080 } else {
1081 request_set(&request, RQ_SERVER_NAME, server, 0);
1082 }
1083@@ -208,6 +228,18 @@
1084 tcpdmatch(&request);
1085 exit(0);
1086 }
1087+#ifdef INET6
1088+ memset(&hints, 0, sizeof(hints));
1089+ hints.ai_family = AF_INET6;
1090+ hints.ai_socktype = SOCK_STREAM;
1091+ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
1092+ if (getaddrinfo(client, NULL, &hints, &res) == 0) {
1093+ freeaddrinfo(res);
1094+ request_set(&request, RQ_CLIENT_ADDR, client, 0);
1095+ tcpdmatch(&request);
1096+ exit(0);
1097+ }
1098+#endif
1099
1100 /*
1101 * Perhaps they are testing special client hostname patterns that aren't
1102@@ -229,6 +261,34 @@
1103 */
1104 if ((hp = find_inet_addr(client)) == 0)
1105 exit(1);
1106+#ifdef INET6
1107+ request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
1108+
1109+ for (res = hp, count = 0; res; res = res->ai_next, count++) {
1110+ memcpy(&client_sin, res->ai_addr, res->ai_addrlen);
1111+
1112+ /*
1113+ * getnameinfo() doesn't do reverse lookup against link-local
1114+ * address. So, we pass through host name evaluation against
1115+ * such addresses.
1116+ */
1117+ if (res->ai_family != AF_INET6 ||
1118+ !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) {
1119+ /*
1120+ * Force evaluation of client host name and address. Host name
1121+ * conflicts will be reported while eval_hostname() does its job.
1122+ */
1123+ request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0);
1124+ if (STR_EQ(eval_hostname(request.client), unknown))
1125+ tcpd_warn("host address %s->name lookup failed",
1126+ eval_hostaddr(request.client));
1127+ }
1128+ tcpdmatch(&request);
1129+ if (res->ai_next)
1130+ printf("\n");
1131+ }
1132+ freeaddrinfo(hp);
1133+#else
1134 memset((char *) &client_sin, 0, sizeof(client_sin));
1135 client_sin.sin_family = AF_INET;
1136 request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
1137@@ -250,6 +310,7 @@
1138 printf("\n");
1139 }
1140 free((char *) hp);
1141+#endif
1142 exit(0);
1143 }
1144
1145diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
1146--- tcp_wrappers_7.6.orig/tli.c 1997-03-21 19:27:26.000000000 +0100
1147+++ tcp_wrappers_7.6/tli.c 2004-04-10 19:07:43.000000000 +0200
1148@@ -65,8 +65,13 @@
1149 void tli_host(request)
1150 struct request_info *request;
1151 {
1152+#ifdef INET6
1153+ static struct sockaddr_storage client;
1154+ static struct sockaddr_storage server;
1155+#else
1156 static struct sockaddr_in client;
1157 static struct sockaddr_in server;
1158+#endif
1159
1160 /*
1161 * If we discover that we are using an IP transport, pretend we never
1162@@ -76,14 +81,29 @@
1163
1164 tli_endpoints(request);
1165 if ((request->config = tli_transport(request->fd)) != 0
1166+#ifdef INET6
1167+ && (STR_EQ(request->config->nc_protofmly, "inet") ||
1168+ STR_EQ(request->config->nc_protofmly, "inet6"))) {
1169+#else
1170 && STR_EQ(request->config->nc_protofmly, "inet")) {
1171+#endif
1172 if (request->client->unit != 0) {
1173+#ifdef INET6
1174+ client = *(struct sockaddr_storage *) request->client->unit->addr.buf;
1175+ request->client->sin = (struct sockaddr *) &client;
1176+#else
1177 client = *(struct sockaddr_in *) request->client->unit->addr.buf;
1178 request->client->sin = &client;
1179+#endif
1180 }
1181 if (request->server->unit != 0) {
1182+#ifdef INET6
1183+ server = *(struct sockaddr_storage *) request->server->unit->addr.buf;
1184+ request->server->sin = (struct sockaddr *) &server;
1185+#else
1186 server = *(struct sockaddr_in *) request->server->unit->addr.buf;
1187 request->server->sin = &server;
1188+#endif
1189 }
1190 tli_cleanup(request);
1191 sock_methods(request);
1192@@ -187,7 +207,15 @@
1193 }
1194 while (config = getnetconfig(handlep)) {
1195 if (stat(config->nc_device, &from_config) == 0) {
1196+#ifdef NO_CLONE_DEVICE
1197+ /*
1198+ * If the network devices are not cloned (as is the case for
1199+ * Solaris 8 Beta), we must compare the major device numbers.
1200+ */
1201+ if (major(from_config.st_rdev) == major(from_client.st_rdev))
1202+#else
1203 if (minor(from_config.st_rdev) == major(from_client.st_rdev))
1204+#endif
1205 break;
1206 }
1207 }
1208diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
1209--- tcp_wrappers_7.6.orig/update.c 1994-12-28 17:42:56.000000000 +0100
1210+++ tcp_wrappers_7.6/update.c 2004-04-10 19:07:43.000000000 +0200
1211@@ -46,10 +46,18 @@
1212 request->fd = va_arg(ap, int);
1213 continue;
1214 case RQ_CLIENT_SIN:
1215+#ifdef INET6
1216+ request->client->sin = va_arg(ap, struct sockaddr *);
1217+#else
1218 request->client->sin = va_arg(ap, struct sockaddr_in *);
1219+#endif
1220 continue;
1221 case RQ_SERVER_SIN:
1222+#ifdef INET6
1223+ request->server->sin = va_arg(ap, struct sockaddr *);
1224+#else
1225 request->server->sin = va_arg(ap, struct sockaddr_in *);
1226+#endif
1227 continue;
1228
1229 /*
1230diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c
1231--- tcp_wrappers_7.6.orig/workarounds.c 1996-03-19 16:22:26.000000000 +0100
1232+++ tcp_wrappers_7.6/workarounds.c 2004-04-10 19:07:43.000000000 +0200
1233@@ -166,11 +166,22 @@
1234 int *len;
1235 {
1236 int ret;
1237+#ifdef INET6
1238+ struct sockaddr *sin = sa;
1239+#else
1240 struct sockaddr_in *sin = (struct sockaddr_in *) sa;
1241+#endif
1242
1243 if ((ret = getpeername(sock, sa, len)) >= 0
1244+#ifdef INET6
1245+ && ((sin->su_si.si_family == AF_INET6
1246+ && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr))
1247+ || (sin->su_si.si_family == AF_INET
1248+ && sin->su_sin.sin_addr.s_addr == 0))) {
1249+#else
1250 && sa->sa_family == AF_INET
1251 && sin->sin_addr.s_addr == 0) {
1252+#endif
1253 errno = ENOTCONN;
1254 return (-1);
1255 } 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 0000000000..226106f4ff
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
@@ -0,0 +1,153 @@
1Upstream-Status: Backport
2
3Path: news.porcupine.org!news.porcupine.org!not-for-mail
4From: Wietse Venema <wietse@((no)(spam)(please))wzv.win.tue.nl>
5Newsgroups: comp.mail.sendmail,comp.security.unix
6Subject: TCP Wrapper Blacklist Extension
7Followup-To: poster
8Date: 8 Sep 1997 18:53:13 -0400
9Organization: Wietse's hangout while on sabattical in the USA
10Lines: 147
11Sender: wietse@spike.porcupine.org
12Message-ID: <5v1vkp$h4f$1@spike.porcupine.org>
13NNTP-Posting-Host: spike.porcupine.org
14Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158
15
16The patch below adds a new host pattern to the TCP Wrapper access
17control language. Instead of a host name or address pattern, you
18can specify an external /file/name with host name or address
19patterns. The feature can be used recursively.
20
21The /file/name extension makes it easy to blacklist bad sites, for
22example, to block unwanted electronic mail when libwrap is linked
23into sendmail. Adding hosts to a simple text file is much easier
24than having to edit a more complex hosts.allow/deny file.
25
26I developed this a year or so ago as a substitute for NIS netgroups.
27At that time, I did not consider it of sufficient interest for
28inclusion in the TCP Wrapper distribution. How times have changed.
29
30The patch is relative to TCP Wrappers version 7.6. The main archive
31site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz
32
33Thanks to the Debian LINUX folks for expressing their interest in
34this patch.
35
36 Wietse
37
38
39[diff updated by Md]
40
41diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
42--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:28:09.000000000 +0200
43+++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:28:01.000000000 +0200
44@@ -97,6 +97,13 @@
45 `[3ffe:505:2:1::]/64\' matches every address in the range
46 `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
47 .IP \(bu
48+A string that begins with a `/\' character is treated as a file
49+name. A host name or address is matched if it matches any host name
50+or address pattern listed in the named file. The file format is
51+zero or more lines with zero or more host name or address patterns
52+separated by whitespace. A file name pattern can be used anywhere
53+a host name or address pattern can be used.
54+.IP \(bu
55 Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This
56 method of matching cannot be used in conjunction with `net/mask\' matching,
57 hostname matching beginning with `.\' or IP address matching ending with `.\'.
58diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
59--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:28:09.000000000 +0200
60+++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:27:05.000000000 +0200
61@@ -253,6 +253,26 @@
62 }
63 }
64
65+/* hostfile_match - look up host patterns from file */
66+
67+static int hostfile_match(path, host)
68+char *path;
69+struct hosts_info *host;
70+{
71+ char tok[BUFSIZ];
72+ int match = NO;
73+ FILE *fp;
74+
75+ if ((fp = fopen(path, "r")) != 0) {
76+ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
77+ /* void */ ;
78+ fclose(fp);
79+ } else if (errno != ENOENT) {
80+ tcpd_warn("open %s: %m", path);
81+ }
82+ return (match);
83+}
84+
85 /* host_match - match host name and/or address against pattern */
86
87 static int host_match(tok, host)
88@@ -280,6 +300,8 @@
89 tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */
90 return (NO);
91 #endif
92+ } else if (tok[0] == '/') { /* /file hack */
93+ return (hostfile_match(tok, host));
94 } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */
95 char *name = eval_hostname(host);
96 return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
97diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
98--- tcp_wrappers_7.6.orig/tcpdchk.c 2004-04-10 19:28:09.000000000 +0200
99+++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:27:05.000000000 +0200
100@@ -353,6 +353,8 @@
101 {
102 if (pat[0] == '@') {
103 tcpd_warn("%s: daemon name begins with \"@\"", pat);
104+ } else if (pat[0] == '/') {
105+ tcpd_warn("%s: daemon name begins with \"/\"", pat);
106 } else if (pat[0] == '.') {
107 tcpd_warn("%s: daemon name begins with dot", pat);
108 } else if (pat[strlen(pat) - 1] == '.') {
109@@ -385,6 +387,8 @@
110 {
111 if (pat[0] == '@') { /* @netgroup */
112 tcpd_warn("%s: user name begins with \"@\"", pat);
113+ } else if (pat[0] == '/') {
114+ tcpd_warn("%s: user name begins with \"/\"", pat);
115 } else if (pat[0] == '.') {
116 tcpd_warn("%s: user name begins with dot", pat);
117 } else if (pat[strlen(pat) - 1] == '.') {
118@@ -430,8 +434,13 @@
119 static int check_host(pat)
120 char *pat;
121 {
122+ char buf[BUFSIZ];
123 char *mask;
124 int addr_count = 1;
125+ FILE *fp;
126+ struct tcpd_context saved_context;
127+ char *cp;
128+ char *wsp = " \t\r\n";
129
130 if (pat[0] == '@') { /* @netgroup */
131 #ifdef NO_NETGRENT
132@@ -450,6 +459,21 @@
133 tcpd_warn("netgroup support disabled");
134 #endif
135 #endif
136+ } else if (pat[0] == '/') { /* /path/name */
137+ if ((fp = fopen(pat, "r")) != 0) {
138+ saved_context = tcpd_context;
139+ tcpd_context.file = pat;
140+ tcpd_context.line = 0;
141+ while (fgets(buf, sizeof(buf), fp)) {
142+ tcpd_context.line++;
143+ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
144+ check_host(cp);
145+ }
146+ tcpd_context = saved_context;
147+ fclose(fp);
148+ } else if (errno != ENOENT) {
149+ tcpd_warn("open %s: %m", pat);
150+ }
151 } else if (mask = split_at(pat, '/')) { /* network/netmask */
152 #ifdef INET6
153 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 0000000000..260e8d3138
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
@@ -0,0 +1,47 @@
1Upstream-Status: Backport
2
3diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
4--- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002
5+++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002
6@@ -448,6 +448,15 @@
7 int len, mask_len, i = 0;
8 char ch;
9
10+ /*
11+ * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
12+ * different between KAME and Solaris8. While KAME returns
13+ * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here.
14+ */
15+ if (STRN_EQ(string, "::ffff:", 7)
16+ && dot_quad_addr(string + 7) != INADDR_NONE)
17+ return (masked_match4(net_tok, mask_tok, string + 7));
18+
19 memset(&hints, 0, sizeof(hints));
20 hints.ai_family = AF_INET6;
21 hints.ai_socktype = SOCK_STREAM;
22@@ -457,13 +466,6 @@
23 memcpy(&addr, res->ai_addr, sizeof(addr));
24 freeaddrinfo(res);
25
26- if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
27- if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
28- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
29- return (NO);
30- return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
31- }
32-
33 /* match IPv6 address against netnumber/prefixlen */
34 len = strlen(net_tok);
35 if (*net_tok != '[' || net_tok[len - 1] != ']')
36diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
37--- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002
38+++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002
39@@ -228,7 +228,7 @@
40 hints.ai_family = sin->sa_family;
41 hints.ai_socktype = SOCK_STREAM;
42 hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
43- if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
44+ if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
45 freeaddrinfo(res0);
46 res0 = NULL;
47 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 0000000000..e8289e44d9
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -0,0 +1,83 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
4--- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200
5+++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200
6@@ -45,7 +45,7 @@
7 #
8 # SysV.4 Solaris 2.x OSF AIX
9 #REAL_DAEMON_DIR=/usr/sbin
10-#
11+REAL_DAEMON_DIR=/usr/sbin
12 # BSD 4.4
13 #REAL_DAEMON_DIR=/usr/libexec
14 #
15@@ -512,6 +519,7 @@
16 # (examples: allow, deny, banners, twist and spawn).
17 #
18 #STYLE = -DPROCESS_OPTIONS # Enable language extensions.
19+STYLE = -DPROCESS_OPTIONS
20
21 ################################################################
22 # Optional: Changing the default disposition of logfile records
23@@ -535,6 +543,7 @@
24 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
25
26 FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
27+FACILITY= LOG_DAEMON
28
29 # The syslog priority at which successful connections are logged.
30
31@@ -631,6 +640,7 @@
32 # lookups altogether, see the next section.
33
34 PARANOID= -DPARANOID
35+PARANOID=
36
37 ########################################
38 # Optional: turning off hostname lookups
39@@ -644,6 +654,7 @@
40 # mode (see previous section) and comment out the following definition.
41
42 HOSTNAME= -DALWAYS_HOSTNAME
43+HOSTNAME=
44
45 #############################################
46 # Optional: Turning on host ADDRESS checking
47@@ -670,6 +681,7 @@
48 # Solaris 2.x, and Linux. See your system documentation for details.
49 #
50 # KILL_OPT= -DKILL_IP_OPTIONS
51+KILL_OPT= -DKILL_IP_OPTIONS
52
53 ## End configuration options
54 ############################
55@@ -677,9 +689,10 @@
56 # Protection against weird shells or weird make programs.
57
58 SHELL = /bin/sh
59-.c.o:; $(CC) $(CFLAGS) -c $*.c
60+.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c
61
62-CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
63+COPTS = -O2 -g
64+CFLAGS = $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
65 $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
66 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
67 -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
68@@ -712,10 +725,11 @@
69
70 config-check:
71 @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
72- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
73- if cmp cflags /tmp/cflags.$$$$ ; \
74- then rm /tmp/cflags.$$$$ ; \
75- else mv /tmp/cflags.$$$$ cflags ; \
76+ @set +e; echo $(CFLAGS) >cflags.new ; \
77+ if cmp cflags cflags.new ; \
78+ then rm cflags.new ; \
79+ else mv cflags.new cflags ; \
80 fi >/dev/null 2>/dev/null
81+ @if [ ! -d shared ]; then mkdir shared; fi
82
83 $(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 0000000000..bd1396bc79
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
@@ -0,0 +1,255 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
4--- tcp_wrappers_7.6.orig/Makefile 2004-05-02 15:37:59.000000000 +0200
5+++ tcp_wrappers_7.6/Makefile 2004-05-02 15:31:09.000000000 +0200
6@@ -150,15 +150,15 @@
7
8 linux:
9 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
10- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
11+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
12 NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
13- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
14+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
15
16 gnu:
17 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
18- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
19+ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
20 NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
21- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
22+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all
23
24 # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
25 hpux hpux8 hpux9 hpux10:
26@@ -713,7 +713,22 @@
27
28 LIB = libwrap.a
29
30-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
31+shared/%.o: %.c
32+ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
33+
34+SOMAJOR = 0
35+SOMINOR = 7.6
36+
37+SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
38+SHLIBSOMAJ = shared/libwrap.so.$(SOMAJOR)
39+SHLIBSO = shared/libwrap.so
40+SHLIBFLAGS = -Lshared -lwrap
41+
42+SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
43+SHCFLAGS = -fPIC -shared -D_REENTRANT
44+SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
45+
46+all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
47
48 # Invalidate all object files when the compiler options (CFLAGS) have changed.
49
50@@ -731,27 +746,33 @@
51 $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
52 -$(RANLIB) $(LIB)
53
54-tcpd: tcpd.o $(LIB)
55- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
56+$(SHLIB): $(SHLIB_OBJ)
57+ rm -f $(SHLIB)
58+ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
59+ ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
60+ ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
61+
62+tcpd: tcpd.o $(SHLIB)
63+ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
64
65 miscd: miscd.o $(LIB)
66 $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
67
68-safe_finger: safe_finger.o $(LIB)
69- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
70+safe_finger: safe_finger.o $(SHLIB)
71+ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
72
73 TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
74
75-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
76- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
77+tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
78+ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
79
80-try-from: try-from.o fakelog.o $(LIB)
81- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
82+try-from: try-from.o fakelog.o $(SHLIB)
83+ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
84
85 TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
86
87-tcpdchk: $(TCPDCHK_OBJ) $(LIB)
88- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
89+tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
90+ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
91
92 shar: $(KIT)
93 @shar $(KIT)
94@@ -767,7 +788,9 @@
95
96 clean:
97 rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
98+ libwrap*.so* \
99 cflags
100+ rm -rf shared/
101
102 tidy: clean
103 chmod -R a+r .
104@@ -913,5 +936,6 @@
105 update.o: mystdarg.h
106 update.o: tcpd.h
107 vfprintf.o: cflags
108+weak_symbols.o: tcpd.h
109 workarounds.o: cflags
110 workarounds.o: tcpd.h
111diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
112--- tcp_wrappers_7.6.orig/tcpd.h 2004-05-02 15:37:59.000000000 +0200
113+++ tcp_wrappers_7.6/tcpd.h 2004-05-02 15:37:49.000000000 +0200
114@@ -4,6 +4,15 @@
115 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
116 */
117
118+#ifndef _TCPWRAPPERS_TCPD_H
119+#define _TCPWRAPPERS_TCPD_H
120+
121+/* Need definitions of struct sockaddr_in and FILE. */
122+#include <netinet/in.h>
123+#include <stdio.h>
124+
125+__BEGIN_DECLS
126+
127 /* Structure to describe one communications endpoint. */
128
129 #define STRING_LENGTH 128 /* hosts, users, processes */
130@@ -29,10 +38,10 @@
131 char pid[10]; /* access via eval_pid(request) */
132 struct host_info client[1]; /* client endpoint info */
133 struct host_info server[1]; /* server endpoint info */
134- void (*sink) (); /* datagram sink function or 0 */
135- void (*hostname) (); /* address to printable hostname */
136- void (*hostaddr) (); /* address to printable address */
137- void (*cleanup) (); /* cleanup function or 0 */
138+ void (*sink) (int); /* datagram sink function or 0 */
139+ void (*hostname) (struct host_info *); /* address to printable hostname */
140+ void (*hostaddr) (struct host_info *); /* address to printable address */
141+ void (*cleanup) (struct request_info *); /* cleanup function or 0 */
142 struct netconfig *config; /* netdir handle */
143 };
144
145@@ -70,20 +79,27 @@
146 #define fromhost sock_host /* no TLI support needed */
147 #endif
148
149-extern int hosts_access(); /* access control */
150-extern void shell_cmd(); /* execute shell command */
151-extern char *percent_x(); /* do %<char> expansion */
152-extern void rfc931(); /* client name from RFC 931 daemon */
153-extern void clean_exit(); /* clean up and exit */
154-extern void refuse(); /* clean up and exit */
155-extern char *xgets(); /* fgets() on steroids */
156-extern char *split_at(); /* strchr() and split */
157-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
158+extern int hosts_access(struct request_info *request); /* access control */
159+extern void shell_cmd(char *); /* execute shell command */
160+extern char *percent_x(char *, int, char *, struct request_info *);
161+ /* do %<char> expansion */
162+extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
163+ /* client name from RFC 931 daemon */
164+extern void clean_exit(struct request_info *); /* clean up and exit */
165+extern void refuse(struct request_info *); /* clean up and exit */
166+extern char *xgets(char *, int, FILE *); /* fgets() on steroids */
167+extern char *split_at(char *, int); /* strchr() and split */
168+extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
169
170 /* Global variables. */
171
172+#ifdef HAVE_WEAKSYMS
173+extern int allow_severity __attribute__ ((weak)); /* for connection logging */
174+extern int deny_severity __attribute__ ((weak)); /* for connection logging */
175+#else
176 extern int allow_severity; /* for connection logging */
177 extern int deny_severity; /* for connection logging */
178+#endif
179 extern char *hosts_allow_table; /* for verification mode redirection */
180 extern char *hosts_deny_table; /* for verification mode redirection */
181 extern int hosts_access_verbose; /* for verbose matching mode */
182@@ -98,6 +114,8 @@
183 #ifdef __STDC__
184 extern struct request_info *request_init(struct request_info *,...);
185 extern struct request_info *request_set(struct request_info *,...);
186+extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
187+ char *client_user);
188 #else
189 extern struct request_info *request_init(); /* initialize request */
190 extern struct request_info *request_set(); /* update request structure */
191@@ -121,20 +139,23 @@
192 * host_info structures serve as caches for the lookup results.
193 */
194
195-extern char *eval_user(); /* client user */
196-extern char *eval_hostname(); /* printable hostname */
197-extern char *eval_hostaddr(); /* printable host address */
198-extern char *eval_hostinfo(); /* host name or address */
199-extern char *eval_client(); /* whatever is available */
200-extern char *eval_server(); /* whatever is available */
201+extern char *eval_user(struct request_info *); /* client user */
202+extern char *eval_hostname(struct host_info *); /* printable hostname */
203+extern char *eval_hostaddr(struct host_info *); /* printable host address */
204+extern char *eval_hostinfo(struct host_info *); /* host name or address */
205+extern char *eval_client(struct request_info *);/* whatever is available */
206+extern char *eval_server(struct request_info *);/* whatever is available */
207 #define eval_daemon(r) ((r)->daemon) /* daemon process name */
208 #define eval_pid(r) ((r)->pid) /* process id */
209
210 /* Socket-specific methods, including DNS hostname lookups. */
211
212-extern void sock_host(); /* look up endpoint addresses */
213-extern void sock_hostname(); /* translate address to hostname */
214-extern void sock_hostaddr(); /* address to printable address */
215+/* look up endpoint addresses */
216+extern void sock_host(struct request_info *);
217+/* translate address to hostname */
218+extern void sock_hostname(struct host_info *);
219+/* address to printable address */
220+extern void sock_hostaddr(struct host_info *);
221 #define sock_methods(r) \
222 { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
223
224@@ -182,7 +203,7 @@
225 * behavior.
226 */
227
228-extern void process_options(); /* execute options */
229+extern void process_options(char *, struct request_info *);/* execute options */
230 extern int dry_run; /* verification flag */
231
232 /* Bug workarounds. */
233@@ -221,3 +242,7 @@
234 #define strtok my_strtok
235 extern char *my_strtok();
236 #endif
237+
238+__END_DECLS
239+
240+#endif
241diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c
242--- tcp_wrappers_7.6.orig/weak_symbols.c 1970-01-01 01:00:00.000000000 +0100
243+++ tcp_wrappers_7.6/weak_symbols.c 2004-05-02 15:31:09.000000000 +0200
244@@ -0,0 +1,11 @@
245+ /*
246+ * @(#) weak_symbols.h 1.5 99/12/29 23:50
247+ *
248+ * Author: Anthony Towns <ajt@debian.org>
249+ */
250+
251+#ifdef HAVE_WEAKSYMS
252+#include <syslog.h>
253+int deny_severity = LOG_WARNING;
254+int allow_severity = SEVERITY;
255+#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 0000000000..eb5685c576
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
@@ -0,0 +1,68 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
4--- tcp_wrappers_7.6.orig/hosts_access.5 2003-08-21 03:15:36.000000000 +0200
5+++ tcp_wrappers_7.6/hosts_access.5 2003-08-21 03:15:31.000000000 +0200
6@@ -90,6 +90,10 @@
7 pattern `131.155.72.0/255.255.254.0\' matches every address in the
8 range `131.155.72.0\' through `131.155.73.255\'.
9 .IP \(bu
10+An expression of the form `n.n.n.n/mm' is interpreted as a
11+`net/masklength' pair, where `mm' is the number of consecutive `1'
12+bits in the netmask applied to the `n.n.n.n' address.
13+.IP \(bu
14 An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
15 `[net]/prefixlen\' pair. An IPv6 host address is matched if
16 `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
17diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
18--- tcp_wrappers_7.6.orig/hosts_access.c 2003-08-21 03:15:36.000000000 +0200
19+++ tcp_wrappers_7.6/hosts_access.c 2003-08-21 03:09:30.000000000 +0200
20@@ -417,7 +417,8 @@
21 if ((addr = dot_quad_addr(string)) == INADDR_NONE)
22 return (NO);
23 if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
24- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
25+ || ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE
26+ && (mask = cidr_mask_addr(mask_tok)) == 0)) {
27 #ifndef INET6
28 tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
29 #endif
30diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
31--- tcp_wrappers_7.6.orig/misc.c 2003-08-21 03:15:36.000000000 +0200
32+++ tcp_wrappers_7.6/misc.c 2003-08-21 03:09:30.000000000 +0200
33@@ -107,3 +107,17 @@
34 }
35 return (runs == 4 ? inet_addr(str) : INADDR_NONE);
36 }
37+
38+/* cidr_mask_addr - convert cidr netmask length to internal form */
39+
40+unsigned long cidr_mask_addr(str)
41+char *str;
42+{
43+ int maskbits;
44+
45+ maskbits = atoi(str);
46+ if (maskbits < 1 || maskbits > 32)
47+ return (0);
48+ return htonl(0xFFFFFFFF << (32 - maskbits));
49+}
50+
51diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
52--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 03:15:36.000000000 +0200
53+++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 03:09:30.000000000 +0200
54@@ -497,12 +497,12 @@
55 int mask_len;
56
57 if ((dot_quad_addr(pat) == INADDR_NONE
58- || dot_quad_addr(mask) == INADDR_NONE)
59+ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
60 && (!is_inet6_addr(pat)
61 || ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
62 #else
63 if (dot_quad_addr(pat) == INADDR_NONE
64- || dot_quad_addr(mask) == INADDR_NONE)
65+ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
66 #endif
67 tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
68 } 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 0000000000..3ca6874119
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
4--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-25 12:17:59.000000000 +0200
5+++ tcp_wrappers_7.6/hosts_access.5 2004-04-25 12:17:53.000000000 +0200
6@@ -89,6 +89,8 @@
7 bitwise AND of the address and the `mask\'. For example, the net/mask
8 pattern `131.155.72.0/255.255.254.0\' matches every address in the
9 range `131.155.72.0\' through `131.155.73.255\'.
10+`255.255.255.255\' is not a valid mask value, so a single host can be
11+matched just by its IP.
12 .IP \(bu
13 An expression of the form `n.n.n.n/mm' is interpreted as a
14 `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 0000000000..3087377976
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
@@ -0,0 +1,73 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
4--- tcp_wrappers_7.6.orig/eval.c 1995-01-30 19:51:46.000000000 +0100
5+++ tcp_wrappers_7.6/eval.c 2004-11-04 13:59:01.000000000 +0100
6@@ -98,6 +98,28 @@
7 }
8 }
9
10+/* eval_port - return string with the port */
11+char *eval_port(saddr)
12+#ifdef INET6
13+struct sockaddr *saddr;
14+#else
15+struct sockaddr_in *saddr;
16+#endif
17+{
18+ static char port[16];
19+ if (saddr != 0) {
20+ sprintf(port, "%u",
21+#ifdef INET6
22+ ntohs(((struct sockaddr_in *)saddr)->sin_port));
23+#else
24+ ntohs(saddr->sin_port));
25+#endif
26+ } else {
27+ strcpy(port, "0");
28+ }
29+ return (port);
30+}
31+
32 /* eval_client - return string with as much about the client as we know */
33
34 char *eval_client(request)
35diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
36--- tcp_wrappers_7.6.orig/hosts_access.5 2004-11-04 13:17:45.000000000 +0100
37+++ tcp_wrappers_7.6/hosts_access.5 2004-11-04 13:55:32.000000000 +0100
38@@ -175,6 +175,8 @@
39 unavailable.
40 .IP "%n (%N)"
41 The client (server) host name (or "unknown" or "paranoid").
42+.IP "%r (%R)"
43+The clients (servers) port number (or "0").
44 .IP %p
45 The daemon process id.
46 .IP %s
47diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
48--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-28 17:42:38.000000000 +0100
49+++ tcp_wrappers_7.6/percent_x.c 2004-11-04 13:19:29.000000000 +0100
50@@ -63,6 +63,8 @@
51 ch == 'n' ? eval_hostname(request->client) :
52 ch == 'N' ? eval_hostname(request->server) :
53 ch == 'p' ? eval_pid(request) :
54+ ch == 'r' ? eval_port(request->client->sin) :
55+ ch == 'R' ? eval_port(request->server->sin) :
56 ch == 's' ? eval_server(request) :
57 ch == 'u' ? eval_user(request) :
58 ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), "");
59diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
60--- tcp_wrappers_7.6.orig/tcpd.h 2004-11-04 13:17:45.000000000 +0100
61+++ tcp_wrappers_7.6/tcpd.h 2004-11-04 13:19:13.000000000 +0100
62@@ -145,6 +145,11 @@
63 extern char *eval_hostinfo(struct host_info *); /* host name or address */
64 extern char *eval_client(struct request_info *);/* whatever is available */
65 extern char *eval_server(struct request_info *);/* whatever is available */
66+#ifdef INET6
67+extern char *eval_port(struct sockaddr *);
68+#else
69+extern char *eval_port(struct sockaddr_in *);
70+#endif
71 #define eval_daemon(r) ((r)->daemon) /* daemon process name */
72 #define eval_pid(r) ((r)->pid) /* process id */
73
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 0000000000..4cc554fc38
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
4--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
5+++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
6@@ -29,11 +29,15 @@
7
8 while (*bp = *cp)
9 if (*cp == '%' && cp[1] == 'm') {
10+#ifdef HAVE_STRERROR
11+ strcpy(bp, strerror(errno));
12+#else
13 if (errno < sys_nerr && errno > 0) {
14 strcpy(bp, sys_errlist[errno]);
15 } else {
16 sprintf(bp, "Unknown error %d", errno);
17 }
18+#endif
19 bp += strlen(bp);
20 cp += 2;
21 } 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 0000000000..3ba214d241
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
@@ -0,0 +1,45 @@
1Upstream-Status: Backport
2
3Index: tcp_wrappers_7.6.orig/Makefile
4===================================================================
5--- tcp_wrappers_7.6.orig.orig/Makefile 2009-04-06 10:55:47.000000000 +0000
6+++ tcp_wrappers_7.6.orig/Makefile 2009-04-06 10:57:04.000000000 +0000
7@@ -748,31 +748,31 @@
8
9 $(SHLIB): $(SHLIB_OBJ)
10 rm -f $(SHLIB)
11- $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
12+ $(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
13 ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
14 ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
15
16 tcpd: tcpd.o $(SHLIB)
17- $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
18+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
19
20 miscd: miscd.o $(LIB)
21- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
22+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
23
24 safe_finger: safe_finger.o $(SHLIB)
25- $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
26+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
27
28 TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
29
30 tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
31- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
32+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
33
34 try-from: try-from.o fakelog.o $(SHLIB)
35- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
36+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
37
38 TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
39
40 tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
41- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
42+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
43
44 shar: $(KIT)
45 @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 0000000000..19bd7d3c0f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
4--- tcp_wrappers_7.6.orig/hosts_access.3 2004-04-25 00:10:48.000000000 +0200
5+++ tcp_wrappers_7.6/hosts_access.3 2004-04-25 00:09:36.000000000 +0200
6@@ -14,6 +14,9 @@
7 struct request_info *request_set(request, key, value, ..., 0)
8 struct request_info *request;
9
10+void fromhost(request)
11+struct request_info *request;
12+
13 int hosts_access(request)
14 struct request_info *request;
15
16@@ -60,6 +63,7 @@
17 is available, host names and client user names are looked up on demand,
18 using the request structure as a cache. hosts_access() returns zero if
19 access should be denied.
20+fromhost() must be called before hosts_access().
21 .PP
22 hosts_ctl() is a wrapper around the request_init() and hosts_access()
23 routines with a perhaps more convenient interface (though it does not
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch
new file mode 100644
index 0000000000..7650600ab5
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch
@@ -0,0 +1,35 @@
1STRINGS name conflicts with variable for strings tools (e.g. i586-oe-linux-strings)
2
3Upstream-Status: Pending
4
5Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
6
7--- tcp_wrappers_7.6/Makefile.orig 2013-04-18 23:41:58.277981740 +0200
8+++ tcp_wrappers_7.6/Makefile 2013-04-18 23:42:42.513978966 +0200
9@@ -309,7 +309,7 @@
10 pyramid:
11 @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
12 LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \
13- STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
14+ STRINGS_FLAGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
15 NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all
16
17 # Untested.
18@@ -419,7 +419,7 @@
19 # Uncomment the following if your C library does not provide the
20 # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp.
21 #
22-#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
23+#STRINGS_FLAGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
24
25 #################################################################
26 # System dependencies: selection of non-default object libraries.
27@@ -690,7 +690,7 @@
28 $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
29 -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
30 -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
31- $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
32+ $(UCHAR) $(TABLES) $(STRINGS_FLAGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
33 $(VSYSLOG) $(HOSTNAME)
34
35 LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
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 0000000000..5875b81b2f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
4--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200
5+++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200
6@@ -92,6 +92,8 @@
7 char *cp;
8 char *result = unknown;
9 FILE *fp;
10+ unsigned saved_timeout;
11+ struct sigaction nact, oact;
12
13 #ifdef INET6
14 /* address family must be the same */
15@@ -134,7 +136,12 @@
16 */
17
18 if (setjmp(timebuf) == 0) {
19- signal(SIGALRM, timeout);
20+ /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
21+ saved_timeout = alarm(0);
22+ nact.sa_handler = timeout;
23+ nact.sa_flags = 0;
24+ (void) sigemptyset(&nact.sa_mask);
25+ (void) sigaction(SIGALRM, &nact, &oact);
26 alarm(rfc931_timeout);
27
28 /*
29@@ -223,6 +230,10 @@
30 }
31 alarm(0);
32 }
33+ /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
34+ (void) sigaction(SIGALRM, &oact, NULL);
35+ if (saved_timeout > 0)
36+ alarm(saved_timeout);
37 fclose(fp);
38 }
39 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 0000000000..723f4f136a
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
@@ -0,0 +1,41 @@
1Upstream-Status: Backport
2
3diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
4--- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100
5+++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100
6@@ -237,10 +237,17 @@ struct request_info *request;
7
8 /* ARGSUSED */
9
10-void rfc931(request)
11-struct request_info *request;
12+void rfc931(rmt_sin, our_sin, dest)
13+#ifdef INET6
14+struct sockaddr *rmt_sin;
15+struct sockaddr *our_sin;
16+#else
17+struct sockaddr_in *rmt_sin;
18+struct sockaddr_in *our_sin;
19+#endif
20+char *dest;
21 {
22- strcpy(request->user, unknown);
23+ strcpy(dest, unknown);
24 }
25
26 /* check_path - examine accessibility */
27diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
28--- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100
29+++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100
30@@ -83,7 +83,11 @@ extern int hosts_access(struct request_i
31 extern void shell_cmd(char *); /* execute shell command */
32 extern char *percent_x(char *, int, char *, struct request_info *);
33 /* do %<char> expansion */
34+#ifdef INET6
35 extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
36+#else
37+extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *);
38+#endif
39 /* client name from RFC 931 daemon */
40 extern void clean_exit(struct request_info *); /* clean up and exit */
41 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 0000000000..875616b9ea
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
@@ -0,0 +1,34 @@
1.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual"
2.SH NAME
3safe_finger \- finger client wrapper that protects against nasty stuff
4from finger servers
5.SH SYNOPSIS
6.B safe_finger [finger_options]
7.SH DESCRIPTION
8The
9.B safe_finger
10command protects against nasty stuff from finger servers. Use this
11program for automatic reverse finger probes from the
12.B tcp_wrapper
13.B (tcpd)
14, not the raw finger command. The
15.B safe_finger
16command makes sure that the finger client is not run with root
17privileges. It also runs the finger client with a defined PATH
18environment.
19.B safe_finger
20will also protect you from problems caused by the output of some
21finger servers. The problem: some programs may react to stuff in
22the first column. Other programs may get upset by thrash anywhere
23on a line. File systems may fill up as the finger server keeps
24sending data. Text editors may bomb out on extremely long lines.
25The finger server may take forever because it is somehow wedged.
26.B safe_finger
27takes care of all this badness.
28.SH SEE ALSO
29.BR hosts_access (5),
30.BR hosts_options (5),
31.BR tcpd (8)
32.SH AUTHOR
33Wietse Venema, Eindhoven University of Technology, The Netherlands.
34
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 0000000000..fc2afeef15
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Backport
2
3--- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c
4+++ tcp-wrappers-7.6-ipv6.1/safe_finger.c
5@@ -26,21 +26,24 @@
6 #include <stdio.h>
7 #include <ctype.h>
8 #include <pwd.h>
9+#include <syslog.h>
10
11 extern void exit();
12
13 /* Local stuff */
14
15-char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
16+char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
17
18 #define TIME_LIMIT 60 /* Do not keep listinging forever */
19 #define INPUT_LENGTH 100000 /* Do not keep listinging forever */
20 #define LINE_LENGTH 128 /* Editors can choke on long lines */
21 #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
22 #define UNPRIV_NAME "nobody" /* Preferred privilege level */
23-#define UNPRIV_UGID 32767 /* Default uid and gid */
24+#define UNPRIV_UGID 65534 /* Default uid and gid */
25
26 int finger_pid;
27+int allow_severity = SEVERITY;
28+int deny_severity = LOG_WARNING;
29
30 void cleanup(sig)
31 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 0000000000..9d7ea042b2
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
@@ -0,0 +1,36 @@
1Upstream-Status: Backport
2
3* Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
4- added security patch tcp_wrappers-7.6-sig.patch
5
6--- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100
7+++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100
8@@ -66,6 +66,7 @@
9
10 #define YES 1
11 #define NO 0
12+#define ERR -1
13
14 /*
15 * These variables are globally visible so that they can be redirected in
16@@ -129,9 +129,9 @@
17 return (verdict == AC_PERMIT);
18 if (table_match(hosts_allow_table, request))
19 return (YES);
20- if (table_match(hosts_deny_table, request))
21- return (NO);
22- return (YES);
23+ if (table_match(hosts_deny_table, request) == NO)
24+ return (YES);
25+ return (NO);
26 }
27
28 /* table_match - match table entries with (daemon, client) pair */
29@@ -175,6 +175,7 @@
30 (void) fclose(fp);
31 } else if (errno != ENOENT) {
32 tcpd_warn("cannot open %s: %m", table);
33+ match = ERR;
34 }
35 if (match) {
36 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 0000000000..76dd6340b2
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Backport
2
3diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
4--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:42:25.000000000 +0200
5+++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:41:04.000000000 +0200
6@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
7
8 int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
9
10-static jmp_buf timebuf;
11+static sigjmp_buf timebuf;
12
13 /* fsocket - open stdio stream on top of socket */
14
15@@ -62,7 +62,7 @@ int protocol;
16 static void timeout(sig)
17 int sig;
18 {
19- longjmp(timebuf, sig);
20+ siglongjmp(timebuf, sig);
21 }
22
23 /* rfc931 - return remote user name, given socket structures */
24@@ -135,7 +135,7 @@ char *dest;
25 * Set up a timer so we won't get stuck while waiting for the server.
26 */
27
28- if (setjmp(timebuf) == 0) {
29+ if (sigsetjmp(timebuf, 0) == 0) {
30 /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
31 saved_timeout = alarm(0);
32 nact.sa_handler = timeout;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
new file mode 100644
index 0000000000..8e46df8e1e
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
@@ -0,0 +1,59 @@
1commit 88b6984ef0bf3b703c1c851092662b95e91db1ff
2Author: farrah rashid <farrah.rashid@windriver.com>
3Date: Tue Feb 12 09:53:50 2013 -0500
4
5 tcp-wrappers Support for building with glibc
6
7 Added support for socklen_t type to len argument passed to socket related
8 calls. This fixes a bug that causes tcp wrappers to fail when using sshd.
9
10 Upstream-Status: Pending
11
12 Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
13
14diff --git a/fix_options.c b/fix_options.c
15index 7473adf..fe2b442 100644
16--- a/fix_options.c
17+++ b/fix_options.c
18@@ -38,7 +38,12 @@ struct request_info *request;
19 #ifdef IP_OPTIONS
20 unsigned char optbuf[BUFFER_SIZE / 3], *cp;
21 char lbuf[BUFFER_SIZE], *lp;
22- int optsize = sizeof(optbuf), ipproto;
23+#ifdef __GLIBC__
24+ socklen_t optsize = sizeof(optbuf);
25+#else
26+ int optsize = sizeof(optbuf);
27+#endif
28+ int ipproto;
29 struct protoent *ip;
30 int fd = request->fd;
31 unsigned int opt;
32diff --git a/socket.c b/socket.c
33index 4b2c575..a0d2987 100644
34--- a/socket.c
35+++ b/socket.c
36@@ -95,7 +95,11 @@ struct request_info *request;
37 static struct sockaddr_in client;
38 static struct sockaddr_in server;
39 #endif
40+#ifdef __GLIBC__
41+ socklen_t len;
42+#else
43 int len;
44+#endif
45 char buf[BUFSIZ];
46 int fd = request->fd;
47
48@@ -426,7 +430,11 @@ int fd;
49 #else
50 struct sockaddr_in sin;
51 #endif
52+#ifdef __GLIBC__
53+ socklen_t size = sizeof(sin);
54+#else
55 int size = sizeof(sin);
56+#endif
57
58 /*
59 * 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 0000000000..be29bdcfaa
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Backport
2
3diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
4--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200
5+++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200
6@@ -53,6 +53,24 @@
7 #include "inetcf.h"
8 #include "scaffold.h"
9
10+/* list of programs which are known to be linked with libwrap in debian */
11+static const char *const libwrap_programs[] = {
12+ "portmap", "mountd", "statd", "ugidd",
13+ "redir", "rlinetd",
14+ "sshd",
15+ "atftpd",
16+ "diald",
17+ "esound",
18+ "gdm", "gnome-session",
19+ "icecast", "icecast_admin", "icecast_client", "icecast_source",
20+ "mysqld",
21+ "ntop",
22+ "pptpd",
23+ "rquotad",
24+ "sendmail", "smail",
25+ NULL
26+};
27+
28 /*
29 * Stolen from hosts_access.c...
30 */
31@@ -147,8 +165,8 @@
32 /*
33 * These are not run from inetd but may have built-in access control.
34 */
35- inet_set("portmap", WR_NOT);
36- inet_set("rpcbind", WR_NOT);
37+ for (c = 0; libwrap_programs[c]; c++)
38+ inet_set(libwrap_programs[c], WR_YES);
39
40 /*
41 * 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 0000000000..9c8f30543e
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8
@@ -0,0 +1,28 @@
1.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual"
2.SH NAME
3try-from \- test program for the tcp_wrapper
4.SH SYNOPSIS
5.B try-from
6.SH DESCRIPTION
7The
8.B try-from
9command can be called via a remote shell command to find out
10if the hostname and address are properly recognized
11by the
12.B tcp_wrapper
13library, if username lookup works, and (SysV only) if the TLI
14on top of IP heuristics work. Diagnostics are reported through
15.BR syslog (3)
16and redirected to stderr.
17
18Example:
19
20rsh host /some/where/try-from
21
22.SH SEE ALSO
23.BR hosts_access (5),
24.BR hosts_options (5),
25.BR tcpd (8)
26.SH AUTHOR
27Wietse Venema, Eindhoven University of Technology, The Netherlands.
28
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 0000000000..c7954e7ccd
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -0,0 +1,121 @@
1SUMMARY = "Security tool that is a wrapper for TCP daemons"
2DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
3 services."
4SECTION = "console/network"
5
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
8PR ="r10"
9
10
11PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
12FILES_libwrap = "${base_libdir}/lib*${SOLIBS}"
13FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
14FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
15FILES_libwrap-staticdev = "${libdir}/lib*.a"
16FILES_${PN} = "${sbindir}"
17FILES_${PN}-doc = "${mandir}/man8"
18
19SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
20 file://00_man_quoting.diff \
21 file://01_man_portability.patch \
22 file://05_wildcard_matching.patch \
23 file://06_fix_gethostbyname.patch \
24 file://10_usagi-ipv6.patch \
25 file://11_tcpd_blacklist.patch \
26 file://11_usagi_fix.patch \
27 file://12_makefile_config.patch \
28 file://13_shlib_weaksym.patch \
29 file://14_cidr_support.patch \
30 file://15_match_clarify.patch \
31 file://expand_remote_port.patch \
32 file://have_strerror.patch \
33 file://man_fromhost.patch \
34 file://restore_sigalarm.patch \
35 file://rfc931.diff \
36 file://safe_finger.patch \
37 file://sig_fix.patch \
38 file://siglongjmp.patch \
39 file://socklen_t.patch \
40 file://tcpdchk_libwrapped.patch \
41 file://ldflags.patch \
42 file://rename_strings_variable.patch \
43 \
44 file://try-from.8 \
45 file://safe_finger.8"
46
47SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
48SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d"
49
50S = "${WORKDIR}/tcp_wrappers_${PV}"
51
52PARALLEL_MAKE = ""
53EXTRA_OEMAKE = "'CC=${CC}' \
54 'AR=${AR}' \
55 'RANLIB=${RANLIB}' \
56 'REAL_DAEMON_DIR=${sbindir}' \
57 'STYLE=-DPROCESS_OPTIONS' \
58 'FACILITY=LOG_DAEMON' \
59 'SEVERITY=LOG_INFO' \
60 'BUGS=' \
61 'VSYSLOG=' \
62 'RFC931_TIMEOUT=10' \
63 'ACCESS=-DHOSTS_ACCESS' \
64 'KILL_OPT=-DKILL_IP_OPTIONS' \
65 'UMASK=-DDAEMON_UMASK=022' \
66 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
67 'LIBS=-lnsl' \
68 'ARFLAGS=rv' \
69 'AUX_OBJ=weak_symbols.o' \
70 'TLI=' \
71 'COPTS=' \
72 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
73
74EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
75EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
76
77do_compile () {
78 oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
79 all
80}
81
82BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch"
83MANS3 = "hosts_access"
84MANS5 = "hosts_options"
85MANS8 = "tcpd tcpdchk tcpdmatch"
86do_install () {
87 oe_libinstall -a libwrap ${D}${libdir}
88 oe_libinstall -C shared -so libwrap ${D}${base_libdir}
89
90 rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
91 libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
92 ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
93 rm -f ${D}${base_libdir}/libwrap.so
94
95 install -d ${D}${sbindir}
96 for b in ${BINS}; do
97 install -m 0755 $b ${D}${sbindir}/ || exit 1
98 done
99
100 install -d ${D}${mandir}/man3
101 for m in ${MANS3}; do
102 install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1
103 done
104
105 install -d ${D}${mandir}/man5
106 for m in ${MANS5}; do
107 install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1
108 done
109
110 install -d ${D}${mandir}/man8
111 for m in ${MANS8}; do
112 install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
113 done
114
115 install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/
116 install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/
117
118 install -d ${D}${includedir}
119 install -m 0644 tcpd.h ${D}${includedir}/
120}
121
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 0000000000..d1c9fe5746
--- /dev/null
+++ b/meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch
@@ -0,0 +1,31 @@
1
2Upstream-Status: Inappropriate [configuration]
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: texi2html-5.0/po_document/Makefile.in.in
7===================================================================
8--- texi2html-5.0.orig/po_document/Makefile.in.in
9+++ texi2html-5.0/po_document/Makefile.in.in
10@@ -9,7 +9,7 @@
11 # General Public License and is *not* in the public domain.
12 #
13 # Origin: gettext-0.17
14-GETTEXT_MACRO_VERSION = 0.17
15+GETTEXT_MACRO_VERSION = 0.18
16
17 PACKAGE = @PACKAGE@
18 VERSION = @VERSION@
19Index: texi2html-5.0/po_messages/Makefile.in.in
20===================================================================
21--- texi2html-5.0.orig/po_messages/Makefile.in.in
22+++ texi2html-5.0/po_messages/Makefile.in.in
23@@ -9,7 +9,7 @@
24 # General Public License and is *not* in the public domain.
25 #
26 # Origin: gettext-0.17
27-GETTEXT_MACRO_VERSION = 0.17
28+GETTEXT_MACRO_VERSION = 0.18
29
30 PACKAGE = @PACKAGE@
31 VERSION = @VERSION@
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 0000000000..a22b981a5d
--- /dev/null
+++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb
@@ -0,0 +1,33 @@
1SUMMARY = "Perl script that converts Texinfo to HTML"
2HOMEPAGE = "http://www.nongnu.org/texi2html/"
3SECTION = "console/utils"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
6
7PR = "r2"
8
9SRC_URI = "http://download.savannah.gnu.org/releases/texi2html/${BPN}-${PV}.tar.bz2 \
10 file://fix_gettext_version.patch"
11
12SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
13SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
14
15inherit autotools gettext
16
17do_configure_prepend() {
18 # Make a directory for the old gettext setup
19 if [ ! -d ${S}/po ]; then
20 mkdir ${S}/po
21 fi
22}
23
24do_configure_append() {
25 # Clean up the phony po directory
26 rm -rf ${S}/po
27}
28
29do_install_append () {
30 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html
31}
32
33FILES_${PN}-doc += "${datadir}/texinfo"
diff --git a/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch
new file mode 100644
index 0000000000..ab6f1658aa
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch
@@ -0,0 +1,43 @@
1We already DEPEND on the native texinfo being present before building so
2there isn't any need to try and build the required native texinfo binaries
3before cross-compiling. This simplifies the recipe somewhat!
4
5Upstream-Status: Inappropriate oe specific
6
7Signed-off-by: Joshua Lock <josh@linux.intel.com>
8
9Index: texinfo-4.13/configure.ac
10===================================================================
11--- texinfo-4.13.orig/configure.ac
12+++ texinfo-4.13/configure.ac
13@@ -100,29 +100,7 @@ AC_CANONICAL_BUILD
14 # $native_tools is also added to SUBDIRS in the main Makefile.am,
15 # so that make compiles the native tools first.
16 #
17-if test "$cross_compiling" = no; then
18- native_tools=
19-else
20- native_tools=tools
21- test -d "$native_tools" || mkdir "$native_tools"
22- confdir=`(cd "$srcdir";pwd)`
23- # Make sure the secondary configure won't fail with
24- # "error: source directory already configured".
25- rm -f config.status
26- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
27- cd "$native_tools" || exit 1
28- # Run secondary configure in alternate environment or
29- # it gets the wrong CC etc.
30- # env -i gives this build host configure a clean environment;
31- # consequently, we have to re-initialize $PATH.
32- env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \
33- PATH="$PATH" \
34- tools_only=1 \
35- ${confdir}/configure --build=${build} --host=${build} \
36- --disable-rpath --disable-nls
37- cd .. || exit 1
38- AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
39-fi
40+native_tools=
41 AC_SUBST(native_tools)
42 AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
43
diff --git a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
new file mode 100644
index 0000000000..6e216dac78
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
@@ -0,0 +1,49 @@
1Upstream-Status: Inappropŕiate
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd texinfo-5.1/doc/Makefile.am texinfo-5.1/doc/Makefile.am
5--- texinfo-5.1/doc/Makefile.am 2013-02-23 02:11:25.000000000 +0200
6+++ texinfo-5.1/doc/Makefile.am 2013-08-20 01:43:55.622376198 +0300
7@@ -40,7 +40,7 @@
8 # Include our texinfo.tex, not Automake's.
9 EXTRA_DIST = epsf.tex texinfo.tex \
10 fdl.texi \
11- $(man_MANS) $(TXI_XLATE) \
12+ $(TXI_XLATE) \
13 $(refcard_files)
14
15 if INSTALL_WARNINGS
16diff -Nurd texinfo-5.1/man/Makefile.am texinfo-5.1/man/Makefile.am
17--- texinfo-5.1/man/Makefile.am 2013-02-23 02:11:25.000000000 +0200
18+++ texinfo-5.1/man/Makefile.am 2013-08-20 01:53:40.542395884 +0300
19@@ -13,24 +13,24 @@
20 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
22 # These are generated using help2man.
23-man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1
24+#man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1
25
26 # These require the build in info/, thus can't do if we failed to find a
27 # terminal library.
28 if HAVE_TERMLIBS
29-man_MANS += info.1 infokey.1
30+#man_MANS += info.1 infokey.1
31 endif
32
33 # These are hand-written.
34-man_MANS += info.5 texinfo.5
35+#man_MANS += info.5 texinfo.5
36
37 # This is generated by pod2man, but let's just run it by hand.
38-man_MANS += pod2texi.1
39+#man_MANS += pod2texi.1
40
41 # These are just .so's to the common program.
42-man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
43+#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
44
45-EXTRA_DIST = $(man_MANS) ginfo.h2m
46+EXTRA_DIST = ginfo.h2m
47
48 # Maintainers should be able to regenerate.
49 MAINTAINERCLEANFILES = $(man_MANS)
diff --git a/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch b/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch
new file mode 100644
index 0000000000..ef69143bf3
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch
@@ -0,0 +1,51 @@
1From 0e70072ce655a0d053bb7433083ced5e6eac74d4 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 15 Aug 2013 23:49:47 -0700
4Subject: [PATCH] handle correctly @enumerate specification greater than 10
5
6Upstream-Status: Backport
7
8Revision: 5270
9 http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5270
10Author: pertusus
11Date: 2013-07-29 20:02:23 +0000 (Mon, 29 Jul 2013)
12Log Message:
13-----------
14 * tp/Common.pm (enumerate_item_representation), Texinfo/Parser.pm:
15 handle correctly @enumerate specification greater than 10. Report
16 from Dmitry Shachnev.
17
18---
19 tp/Texinfo/Common.pm | 2 +-
20 tp/Texinfo/Parser.pm | 2 +-
21 2 files changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
24index 8aee9f7..bdffeee 100644
25--- a/tp/Texinfo/Common.pm
26+++ b/tp/Texinfo/Common.pm
27@@ -1382,7 +1382,7 @@ sub enumerate_item_representation($$)
28 my $specification = shift;
29 my $number = shift;
30
31- if ($specification =~ /^[0-9]$/) {
32+ if ($specification =~ /^[0-9]+$/) {
33 return $specification + $number -1;
34 }
35
36diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm
37index cf8fa72..8e845e9 100644
38--- a/tp/Texinfo/Parser.pm
39+++ b/tp/Texinfo/Parser.pm
40@@ -2973,7 +2973,7 @@ sub _end_line($$$)
41 $current->{'cmdname'});
42 }
43 my $arg = $current->{'extra'}->{'block_command_line_contents'}->[0]->[0];
44- if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^[[:alnum:]]$/) {
45+ if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^(([[:digit:]]+)|([[:alpha:]]+))$/) {
46 $self->_command_error($current, $line_nr,
47 $self->__("bad argument to \@%s"),
48 $current->{'cmdname'});
49--
501.7.1
51
diff --git a/meta/recipes-extended/texinfo/texinfo/link-zip.patch b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
new file mode 100644
index 0000000000..0b6e9fd7ea
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
@@ -0,0 +1,16 @@
1install-info uses symbols from zlib so must link against it.
2
3Upstream-Status: Pending
4
5Signed-off-by: Joshua Lock <josh@linux.intel.com>
6
7Index: texinfo-5.1/install-info/Makefile.am
8===================================================================
9--- texinfo-5.1.orig/install-info/Makefile.am
10+++ texinfo-5.1/install-info/Makefile.am
11@@ -34,4 +34,4 @@ AM_CPPFLAGS = \
12 -I$(top_srcdir)/gnulib/lib \
13 -I$(top_builddir)/gnulib/lib \
14 -DLOCALEDIR=\"$(localedir)\"
15-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
16+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
new file mode 100644
index 0000000000..bebcbdf8da
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
@@ -0,0 +1,187 @@
1Upstream-Status: Pending
2
3Index: texinfo-5.1/install-info/Makefile.in
4===================================================================
5--- texinfo-5.1.orig/install-info/Makefile.in
6+++ texinfo-5.1/install-info/Makefile.in
7@@ -171,7 +171,7 @@ am__installdirs = "$(DESTDIR)$(bindir)"
8 PROGRAMS = $(bin_PROGRAMS)
9 am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
10 ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
11-ginstall_info_LDADD = $(LDADD)
12+ginstall_info_LDADD = $(LDADD) -lz
13 am__DEPENDENCIES_1 =
14 ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \
15 $(am__DEPENDENCIES_1)
16Index: texinfo-5.1/install-info/install-info.c
17===================================================================
18--- texinfo-5.1.orig/install-info/install-info.c
19+++ texinfo-5.1/install-info/install-info.c
20@@ -22,6 +22,7 @@
21 #include <getopt.h>
22 #include <regex.h>
23 #include <argz.h>
24+#include <zlib.h>
25
26 #define TAB_WIDTH 8
27
28@@ -670,7 +671,7 @@ The first time you invoke Info you start
29
30 MAGIC number, not the filename. */
31
32-FILE *
33+void *
34 open_possibly_compressed_file (char *filename,
35 void (*create_callback) (char *),
36 char **opened_filename, char **compression_program, int *is_pipe)
37@@ -678,7 +679,7 @@ open_possibly_compressed_file (char *fil
38 char *local_opened_filename, *local_compression_program;
39 int nread;
40 char data[13];
41- FILE *f;
42+ gzFile *f;
43
44 /* We let them pass NULL if they don't want this info, but it's easier
45 to always determine it. */
46@@ -686,48 +687,48 @@ open_possibly_compressed_file (char *fil
47 opened_filename = &local_opened_filename;
48
49 *opened_filename = filename;
50- f = fopen (*opened_filename, FOPEN_RBIN);
51+ f = gzopen (*opened_filename, FOPEN_RBIN);
52 if (!f)
53 {
54 *opened_filename = concat (filename, ".gz", "");
55- f = fopen (*opened_filename, FOPEN_RBIN);
56+ f = gzopen (*opened_filename, FOPEN_RBIN);
57 }
58 if (!f)
59 {
60 free (*opened_filename);
61 *opened_filename = concat (filename, ".xz", "");
62- f = fopen (*opened_filename, FOPEN_RBIN);
63+ f = gzopen (*opened_filename, FOPEN_RBIN);
64 }
65 if (!f)
66 {
67 free (*opened_filename);
68 *opened_filename = concat (filename, ".bz2", "");
69- f = fopen (*opened_filename, FOPEN_RBIN);
70+ f = gzopen (*opened_filename, FOPEN_RBIN);
71 }
72 if (!f)
73 {
74 free (*opened_filename);
75 *opened_filename = concat (filename, ".lz", "");
76- f = fopen (*opened_filename, FOPEN_RBIN);
77+ f = gzopen (*opened_filename, FOPEN_RBIN);
78 }
79 if (!f)
80 {
81 free (*opened_filename);
82 *opened_filename = concat (filename, ".lzma", "");
83- f = fopen (*opened_filename, FOPEN_RBIN);
84+ f = gzopen (*opened_filename, FOPEN_RBIN);
85 }
86 #ifdef __MSDOS__
87 if (!f)
88 {
89 free (*opened_filename);
90 *opened_filename = concat (filename, ".igz", "");
91- f = fopen (*opened_filename, FOPEN_RBIN);
92+ f = gzopen (*opened_filename, FOPEN_RBIN);
93 }
94 if (!f)
95 {
96 free (*opened_filename);
97 *opened_filename = concat (filename, ".inz", "");
98- f = fopen (*opened_filename, FOPEN_RBIN);
99+ f = gzopen (*opened_filename, FOPEN_RBIN);
100 }
101 #endif /* __MSDOS__ */
102 if (!f)
103@@ -739,7 +740,7 @@ open_possibly_compressed_file (char *fil
104 /* And try opening it again. */
105 free (*opened_filename);
106 *opened_filename = filename;
107- f = fopen (*opened_filename, FOPEN_RBIN);
108+ f = gzopen (*opened_filename, FOPEN_RBIN);
109 if (!f)
110 pfatal_with_name (filename);
111 }
112@@ -749,12 +750,12 @@ open_possibly_compressed_file (char *fil
113
114 /* Read first few bytes of file rather than relying on the filename.
115 If the file is shorter than this it can't be usable anyway. */
116- nread = fread (data, sizeof (data), 1, f);
117- if (nread != 1)
118+ nread = gzread (f, data, sizeof (data));
119+ if (nread != sizeof (data))
120 {
121 /* Empty files don't set errno, so we get something like
122 "install-info: No error for foo", which is confusing. */
123- if (nread == 0)
124+ if (nread >= 0)
125 fatal (_("%s: empty file"), *opened_filename);
126 pfatal_with_name (*opened_filename);
127 }
128@@ -821,20 +822,22 @@ open_possibly_compressed_file (char *fil
129
130 if (*compression_program)
131 { /* It's compressed, so fclose the file and then open a pipe. */
132+ FILE *p;
133 char *command = concat (*compression_program," -cd <", *opened_filename);
134- if (fclose (f) < 0)
135+ if (gzclose (f) < 0)
136 pfatal_with_name (*opened_filename);
137- f = popen (command, "r");
138- if (f)
139+ p = popen (command, "r");
140+ if (p)
141 *is_pipe = 1;
142 else
143 pfatal_with_name (command);
144+ return p;
145 }
146 else
147 { /* It's a plain file, seek back over the magic bytes. */
148- if (fseek (f, 0, 0) < 0)
149+ if (gzseek (f, 0, SEEK_SET) < 0)
150 pfatal_with_name (*opened_filename);
151-#if O_BINARY
152+#if 0 && O_BINARY
153 /* Since this is a text file, and we opened it in binary mode,
154 switch back to text mode. */
155 f = freopen (*opened_filename, "r", f);
156@@ -859,7 +862,7 @@ readfile (char *filename, int *sizep,
157 char **compression_program)
158 {
159 char *real_name;
160- FILE *f;
161+ void *f;
162 int pipe_p;
163 int filled = 0;
164 int data_size = 8192;
165@@ -873,7 +876,12 @@ readfile (char *filename, int *sizep,
166
167 for (;;)
168 {
169- int nread = fread (data + filled, 1, data_size - filled, f);
170+ int nread;
171+
172+ if (pipe_p)
173+ nread = fread (data + filled, 1, data_size - filled, f);
174+ else
175+ nread = gzread (f, data + filled, data_size - filled);
176 if (nread < 0)
177 pfatal_with_name (real_name);
178 if (nread == 0)
179@@ -895,7 +903,7 @@ readfile (char *filename, int *sizep,
180 if (pipe_p)
181 pclose (f);
182 else
183- fclose (f);
184+ gzclose (f);
185
186 *sizep = filled;
187 return data;
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch
new file mode 100644
index 0000000000..312430f5af
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Pending
2
3diff -up texinfo-4.13/install-info/install-info.c.patch texinfo-4.13/install-info/install-info.c
4--- texinfo-4.13/install-info/install-info.c.patch 2010-01-11 14:46:32.000000000 +0100
5+++ texinfo-4.13/install-info/install-info.c 2010-01-11 14:48:47.162152695 +0100
6@@ -772,7 +772,7 @@ open_possibly_compressed_file (char *fil
7 }
8 else
9 { /* It's a plain file, seek back over the magic bytes. */
10- if (gzseek (f, 0, SEEK_SET) < 0)
11+ if (gzseek (f, 0, SEEK_SET) == -1)
12 pfatal_with_name (*opened_filename);
13 #if 0 && O_BINARY
14 /* Since this is a text file, and we opened it in binary mode,
diff --git a/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch
new file mode 100644
index 0000000000..5b7f32d9a9
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inappropriate [cross build specific]
2
3Signed-off-by: Saul Wold <sgw@linux.intel.com>
4
5Index: texinfo-5.1/info/Makefile.am
6===================================================================
7--- texinfo-5.1.orig/info/Makefile.am
8+++ texinfo-5.1/info/Makefile.am
9@@ -76,7 +76,7 @@ cmd_sources = $(srcdir)/session.c $(srcd
10 # more than once.
11 funs.h: makedoc$(EXEEXT) $(cmd_sources)
12 rm -f $(generated_sources)
13- $(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources)
14+ makedoc $(cmd_sources)
15
16 # The following hack is necessary to hint make before the automatic
17 # dependencies are built.
diff --git a/meta/recipes-extended/texinfo/texinfo_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb
new file mode 100644
index 0000000000..c1ccaa7ef4
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb
@@ -0,0 +1,62 @@
1SUMMARY = "Documentation system for on-line information and printed output"
2DESCRIPTION = "Texinfo is a documentation system that can produce both \
3online information and printed output from a single source file. The \
4GNU Project uses the Texinfo file format for most of its documentation."
5HOMEPAGE = "http://www.gnu.org/software/texinfo/"
6SECTION = "console/utils"
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
9
10DEPENDS = "zlib ncurses texinfo-native"
11DEPENDS_class-native = "zlib-native ncurses-native"
12
13TARGET_PATCH = "file://use_host_makedoc.patch"
14TARGET_PATCH_class-native = ""
15
16SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
17 file://texinfo-4.12-zlib.patch \
18 file://texinfo-4.13a-powerpc.patch \
19 file://disable-native-tools.patch \
20 file://link-zip.patch \
21 file://dont-depend-on-help2man.patch \
22 ${TARGET_PATCH} \
23 "
24
25SRC_URI[md5sum] = "1b8f98b80a8e6c50422125e07522e8db"
26SRC_URI[sha256sum] = "6b8ca30e9b6f093b54fe04439e5545e564c63698a806a48065c0bba16994cf74"
27
28S = "${WORKDIR}/${BP}"
29tex_texinfo = "texmf/tex/texinfo"
30
31inherit gettext autotools
32
33do_compile_prepend() {
34 if [ -d tools ];then
35 oe_runmake -C tools/gnulib/lib
36 fi
37}
38
39do_install_append() {
40 mkdir -p ${D}${datadir}/${tex_texinfo}
41 install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
42 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
43}
44
45do_install_append_class-native() {
46 install -m 755 info/makedoc ${D}${bindir}
47}
48
49PACKAGES += "info info-doc"
50
51FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
52FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
53 ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
54 ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
55
56FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
57RDEPENDS_${PN} = "perl"
58FILES_${PN}-doc = "${infodir}/texinfo* \
59 ${datadir}/${tex_texinfo} \
60 ${mandir}/man1 ${mandir}/man5"
61
62BBCLASSEXTEND = "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 0000000000..23ea0e3eb9
--- /dev/null
+++ b/meta/recipes-extended/time/time-1.7/debian.patch
@@ -0,0 +1,1301 @@
1Upstream-Status: Backport
2
3--- time-1.7.orig/configure.in
4+++ time-1.7/configure.in
5@@ -1,11 +1,8 @@
6 dnl Process this file with autoconf to produce a configure script.
7 AC_INIT(time.c)
8-VERSION=1.7
9-AC_SUBST(VERSION)
10-PACKAGE=time
11-AC_SUBST(PACKAGE)
12+AM_INIT_AUTOMAKE(time, 1.7)
13
14-AC_ARG_PROGRAM
15+AM_MAINTAINER_MODE
16
17 dnl Checks for programs.
18 AC_PROG_CC
19@@ -15,7 +12,7 @@
20 dnl Checks for header files.
21 AC_HEADER_STDC
22 AC_HEADER_SYS_WAIT
23-AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
24+AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
25
26 dnl Checks for typedefs, structures, and compiler characteristics.
27 AC_C_CONST
28--- time-1.7.orig/version.texi
29+++ time-1.7/version.texi
30@@ -1,3 +1,3 @@
31-@set UPDATED 12 June 1996
32+@set UPDATED 9 May 2002
33 @set EDITION 1.7
34 @set VERSION 1.7
35--- time-1.7.orig/time.c
36+++ time-1.7/time.c
37@@ -147,6 +147,10 @@
38 NULL
39 };
40
41+
42+/* If true, do not show the exit message */
43+static boolean quiet;
44+
45 /* If true, show an English description next to each statistic. */
46 static boolean verbose;
47
48@@ -172,6 +176,7 @@
49 {"help", no_argument, NULL, 'h'},
50 {"output-file", required_argument, NULL, 'o'},
51 {"portability", no_argument, NULL, 'p'},
52+ {"quiet", no_argument,NULL, 'q'},
53 {"verbose", no_argument, NULL, 'v'},
54 {"version", no_argument, NULL, 'V'},
55 {NULL, no_argument, NULL, 0}
56@@ -333,7 +338,8 @@
57 else if (WIFSIGNALED (resp->waitstatus))
58 fprintf (fp, "Command terminated by signal %d\n",
59 WTERMSIG (resp->waitstatus));
60- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
61+ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
62+ && !quiet)
63 fprintf (fp, "Command exited with non-zero status %d\n",
64 WEXITSTATUS (resp->waitstatus));
65
66@@ -523,6 +529,7 @@
67 char *format; /* Format found in environment. */
68
69 /* Initialize the option flags. */
70+ quiet = false;
71 verbose = false;
72 outfile = NULL;
73 outfp = stderr;
74@@ -536,7 +543,7 @@
75 if (format)
76 output_format = format;
77
78- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
79+ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
80 != EOF)
81 {
82 switch (optc)
83@@ -555,6 +562,9 @@
84 case 'p':
85 output_format = posix_format;
86 break;
87+ case 'q':
88+ quiet = true;
89+ break;
90 case 'v':
91 verbose = true;
92 break;
93@@ -642,9 +652,9 @@
94 fflush (outfp);
95
96 if (WIFSTOPPED (res.waitstatus))
97- exit (WSTOPSIG (res.waitstatus));
98+ exit (WSTOPSIG (res.waitstatus) + 128);
99 else if (WIFSIGNALED (res.waitstatus))
100- exit (WTERMSIG (res.waitstatus));
101+ exit (WTERMSIG (res.waitstatus) + 128);
102 else if (WIFEXITED (res.waitstatus))
103 exit (WEXITSTATUS (res.waitstatus));
104 }
105@@ -657,7 +667,7 @@
106 fprintf (stream, "\
107 Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
108 [--portability] [--format=format] [--output=file] [--version]\n\
109- [--help] command [arg...]\n",
110+ [--quiet] [--help] command [arg...]\n",
111 program_name);
112 exit (status);
113 }
114--- time-1.7.orig/resuse.h
115+++ time-1.7/resuse.h
116@@ -36,19 +36,8 @@
117 # include <sys/rusage.h>
118 #else
119 # define TV_MSEC tv_usec / 1000
120-# if HAVE_WAIT3
121+# if HAVE_SYS_RESOURCE_H
122 # include <sys/resource.h>
123-# else
124-/* Process resource usage structure. */
125-struct rusage
126-{
127- struct timeval ru_utime; /* User time used. */
128- struct timeval ru_stime; /* System time used. */
129- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
130- ru_minflt, ru_majflt, ru_nswap, ru_inblock,
131- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
132- ru_nvcsw, ru_nivcsw;
133-};
134 # endif
135 #endif
136
137--- time-1.7.orig/time.texi
138+++ time-1.7/time.texi
139@@ -11,6 +11,12 @@
140 @finalout
141 @end iftex
142
143+@dircategory Individual utilities
144+@direntry
145+* time: (time). Run programs and summarize
146+ system resource usage.
147+@end direntry
148+
149 @ifinfo
150 This file documents the the GNU @code{time} command for running programs
151 and summarizing the system resources they use.
152@@ -185,6 +191,10 @@
153 sys %S
154 @end example
155
156+@item -q
157+@itemx --quiet
158+Suppress non-zero error code from the executed program.
159+
160 @item -v
161 @itemx --verbose
162 @cindex format
163--- time-1.7.orig/time.info
164+++ time-1.7/time.info
165@@ -1,5 +1,10 @@
166-This is Info file ./time.info, produced by Makeinfo-1.55 from the input
167-file time.texi.
168+This is time.info, produced by makeinfo version 4.1 from time.texi.
169+
170+INFO-DIR-SECTION Individual utilities
171+START-INFO-DIR-ENTRY
172+* time: (time). Run programs and summarize
173+ system resource usage.
174+END-INFO-DIR-ENTRY
175
176 This file documents the the GNU `time' command for running programs
177 and summarizing the system resources they use.
178@@ -31,7 +36,7 @@
179
180 * Resource Measurement:: Measuring program resource use.
181
182- -- The Detailed Node Listing --
183+ --- The Detailed Node Listing ---
184
185 Measuring Program Resource Use
186
187@@ -58,14 +63,14 @@
188 The `time' command runs another program, then displays information
189 about the resources used by that program, collected by the system while
190 the program was running. You can select which information is reported
191-and the format in which it is shown (*note Setting Format::.), or have
192+and the format in which it is shown (*note Setting Format::), or have
193 `time' save the information in a file instead of displaying it on the
194-screen (*note Redirecting::.).
195+screen (*note Redirecting::).
196
197 The resources that `time' can report on fall into the general
198 categories of time, memory, and I/O and IPC calls. Some systems do not
199 provide much information about program resource use; `time' reports
200-unavailable information as zero values (*note Accuracy::.).
201+unavailable information as zero values (*note Accuracy::).
202
203 The format of the `time' command is:
204
205@@ -132,6 +137,10 @@
206 user %U
207 sys %S
208
209+`-q'
210+`--quiet'
211+ Suppress non-zero error code from the executed program.
212+
213 `-v'
214 `--verbose'
215 Use the built-in verbose format, which displays each available
216@@ -174,7 +183,7 @@
217 The resource specifiers, which are a superset of those recognized by
218 the `tcsh' builtin `time' command, are listed below. Not all resources
219 are measured by all versions of Unix, so some of the values might be
220-reported as zero (*note Accuracy::.).
221+reported as zero (*note Accuracy::).
222
223 * Menu:
224
225@@ -308,11 +317,11 @@
226 `-o FILE'
227 `--output=FILE'
228 Write the resource use statistics to FILE. By default, this
229- *overwrites* the file, destroying the file's previous contents.
230+ _overwrites_ the file, destroying the file's previous contents.
231
232 `-a'
233 `--append'
234- *Append* the resource use information to the output file instead
235+ _Append_ the resource use information to the output file instead
236 of overwriting it. This option is only useful with the `-o' or
237 `--output' option.
238
239@@ -437,7 +446,7 @@
240
241 `-a'
242 `--append'
243- *Append* the resource use information to the output file instead
244+ _Append_ the resource use information to the output file instead
245 of overwriting it.
246
247 `-f FORMAT'
248@@ -462,17 +471,17 @@
249
250 
251 Tag Table:
252-Node: Top934
253-Node: Resource Measurement1725
254-Node: Setting Format3678
255-Node: Format String4907
256-Node: Time Resources6214
257-Node: Memory Resources6844
258-Node: I/O Resources7549
259-Node: Command Info8747
260-Node: Redirecting8964
261-Node: Examples9754
262-Node: Accuracy12064
263-Node: Invoking time13586
264+Node: Top1115
265+Node: Resource Measurement1908
266+Node: Setting Format3858
267+Node: Format String5164
268+Node: Time Resources6470
269+Node: Memory Resources7100
270+Node: I/O Resources7805
271+Node: Command Info9003
272+Node: Redirecting9220
273+Node: Examples10010
274+Node: Accuracy12320
275+Node: Invoking time13842
276 
277 End Tag Table
278--- time-1.7.orig/time.html
279+++ time-1.7/time.html
280@@ -0,0 +1,1021 @@
281+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
282+ "http://www.w3.org/TR/html40/loose.dtd">
283+<HTML>
284+<!-- Created on September, 1 2003 by texi2html 1.66 -->
285+<!--
286+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
287+ Karl Berry <karl@freefriends.org>
288+ Olaf Bachmann <obachman@mathematik.uni-kl.de>
289+ and many others.
290+Maintained by: Many creative people <dev@texi2html.cvshome.org>
291+Send bugs and suggestions to <users@texi2html.cvshome.org>
292+
293+-->
294+<HEAD>
295+<TITLE>Measuring Program Resource Use</TITLE>
296+
297+<META NAME="description" CONTENT="Measuring Program Resource Use">
298+<META NAME="keywords" CONTENT="Measuring Program Resource Use">
299+<META NAME="resource-type" CONTENT="document">
300+<META NAME="distribution" CONTENT="global">
301+<META NAME="Generator" CONTENT="texi2html 1.66">
302+
303+</HEAD>
304+
305+<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
306+
307+<A NAME="SEC_Top"></A>
308+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
309+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
310+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
311+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
312+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
313+</TR></TABLE>
314+<H1>Measuring Program Resource Use</H1>
315+
316+<P>
317+
318+This file documents the the GNU <CODE>time</CODE> command for running programs
319+and summarizing the system resources they use.
320+This is edition 1.7, for version 1.7.
321+</P>
322+<P>
323+
324+</P>
325+<TABLE BORDER="0" CELLSPACING="0">
326+<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>
327+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
328+</TH></TR>
329+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
330+</TH></TR>
331+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
332+</TH></TR>
333+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
334+</TH></TR>
335+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
336+</TH></TR>
337+<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>
338+<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>
339+<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>
340+<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>
341+<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>
342+<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>
343+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
344+</TH></TR>
345+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
346+</TH></TR>
347+<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
348+</TH></TR>
349+<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>
350+<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>
351+<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>
352+<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>
353+</TABLE>
354+<P>
355+
356+<HR SIZE=1>
357+<A NAME="SEC1"></A>
358+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
359+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> &lt; </A>]</TD>
360+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &gt; </A>]</TD>
361+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
362+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
363+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
364+<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>
365+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
366+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
367+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
368+</TR></TABLE>
369+<A NAME="Resource Measurement"></A>
370+<H1> 1. Measuring Program Resource Use </H1>
371+<!--docid::SEC1::-->
372+<P>
373+
374+The <CODE>time</CODE> command runs another program, then displays information
375+about the resources used by that program, collected by the system while
376+the program was running. You can select which information is reported
377+and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
378+<CODE>time</CODE> save the information in a file instead of displaying it on the
379+screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
380+</P>
381+<P>
382+
383+The resources that <CODE>time</CODE> can report on fall into the general
384+categories of time, memory, and I/O and IPC calls. Some systems do not
385+provide much information about program resource use; <CODE>time</CODE>
386+reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
387+</P>
388+<P>
389+
390+The format of the <CODE>time</CODE> command is:
391+</P>
392+<P>
393+
394+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
395+</pre></td></tr></table><P>
396+
397+<A NAME="IDX1"></A>
398+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
399+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
400+information about resources used by <VAR>command</VAR>.
401+</P>
402+<P>
403+
404+Here is an example of using <CODE>time</CODE> to measure the time and other
405+resources used by running the program <CODE>grep</CODE>:
406+</P>
407+<P>
408+
409+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time grep nobody /etc/aliases
410+nobody:/dev/null
411+etc-files:nobody
412+misc-group:nobody
413+0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
414+46inputs+7outputs (43major+251minor)pagefaults 0swaps
415+</pre></td></tr></table><P>
416+
417+Mail suggestions and bug reports for GNU <CODE>time</CODE> to
418+<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>. Please include the version of
419+<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
420+operating system and C compiler you used.
421+</P>
422+<P>
423+
424+<TABLE BORDER="0" CELLSPACING="0">
425+<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>
426+<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>
427+<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>
428+<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>
429+<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>
430+<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>
431+</TABLE>
432+<P>
433+
434+<A NAME="Setting Format"></A>
435+<HR SIZE="6">
436+<A NAME="SEC2"></A>
437+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
438+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt; </A>]</TD>
439+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &gt; </A>]</TD>
440+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
441+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
442+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
443+<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>
444+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
445+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
446+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
447+</TR></TABLE>
448+<H2> 1.1 Setting the Output Format </H2>
449+<!--docid::SEC2::-->
450+<P>
451+
452+<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
453+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.
454+</P>
455+<P>
456+
457+You can specify a format string with the command line options listed
458+below. If no format is specified on the command line, but the
459+<CODE>TIME</CODE> environment variable is set, its value is used as the format
460+string. Otherwise, the default format built into <CODE>time</CODE> is used:
461+</P>
462+<P>
463+
464+<TABLE><tr><td>&nbsp;</td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
465+%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
466+</pre></td></tr></table><P>
467+
468+The command line options to set the format are:
469+</P>
470+<P>
471+
472+</P>
473+<DL COMPACT>
474+<DT><CODE>-f <VAR>format</VAR></CODE>
475+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
476+<DD>Use <VAR>format</VAR> as the format string.
477+<P>
478+
479+</P>
480+<DT><CODE>-p</CODE>
481+<DD><DT><CODE>--portability</CODE>
482+<DD>Use the following format string, for conformance with POSIX standard
483+1003.2:
484+<P>
485+
486+<TABLE><tr><td>&nbsp;</td><td class=example><pre>real %e
487+user %U
488+sys %S
489+</pre></td></tr></table><P>
490+
491+</P>
492+<DT><CODE>-q</CODE>
493+<DD><DT><CODE>--quiet</CODE>
494+<DD>Suppress non-zero error code from the executed program.
495+<P>
496+
497+</P>
498+<DT><CODE>-v</CODE>
499+<DD><DT><CODE>--verbose</CODE>
500+<DD><A NAME="IDX2"></A>
501+Use the built-in verbose format, which displays each available piece of
502+information on the program's resource use on its own line, with an
503+English description of its meaning.
504+</DL>
505+<P>
506+
507+<A NAME="Format String"></A>
508+<HR SIZE="6">
509+<A NAME="SEC3"></A>
510+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
511+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &lt; </A>]</TD>
512+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &gt; </A>]</TD>
513+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
514+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
515+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
516+<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>
517+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
518+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
519+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
520+</TR></TABLE>
521+<H2> 1.2 The Format String </H2>
522+<!--docid::SEC3::-->
523+<P>
524+
525+<A NAME="IDX3"></A>
526+<A NAME="IDX4"></A>
527+The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
528+It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
529+with plain text.
530+</P>
531+<P>
532+
533+A backslash introduces an <EM>escape</EM>, which is translated
534+into a single printing character upon output. The valid escapes are
535+listed below. An invalid escape is output as a question mark followed
536+by a backslash.
537+</P>
538+<P>
539+
540+</P>
541+<DL COMPACT>
542+<DT><CODE>\t</CODE>
543+<DD>a tab character
544+<P>
545+
546+</P>
547+<DT><CODE>\n</CODE>
548+<DD>a newline
549+<P>
550+
551+</P>
552+<DT><CODE>\\</CODE>
553+<DD>a literal backslash
554+</DL>
555+<P>
556+
557+<CODE>time</CODE> always prints a newline after printing the resource use
558+information, so normally format strings do not end with a newline
559+character (or `<SAMP>\n</SAMP>').
560+</P>
561+<P>
562+
563+A resource specifier consists of a percent sign followed by another
564+character. An invalid resource specifier is output as a question mark
565+followed by the invalid character. Use `<SAMP>%%</SAMP>' to output a literal
566+percent sign.
567+</P>
568+<P>
569+
570+The resource specifiers, which are a superset of those recognized by the
571+<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below. Not all
572+resources are measured by all versions of Unix, so some of the values
573+might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
574+</P>
575+<P>
576+
577+<TABLE BORDER="0" CELLSPACING="0">
578+<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>
579+<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>
580+<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>
581+<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>
582+</TABLE>
583+<P>
584+
585+<A NAME="Time Resources"></A>
586+<HR SIZE="6">
587+<A NAME="SEC4"></A>
588+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
589+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &lt; </A>]</TD>
590+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &gt; </A>]</TD>
591+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
592+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
593+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
594+<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>
595+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
596+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
597+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
598+</TR></TABLE>
599+<H3> 1.2.1 Time Resources </H3>
600+<!--docid::SEC4::-->
601+<P>
602+
603+</P>
604+<DL COMPACT>
605+<DT><CODE>E</CODE>
606+<DD>Elapsed real (wall clock) time used by the process, in
607+[hours:]minutes:seconds.
608+<P>
609+
610+</P>
611+<DT><CODE>e</CODE>
612+<DD>Elapsed real (wall clock) time used by the process, in
613+seconds.
614+<P>
615+
616+</P>
617+<DT><CODE>S</CODE>
618+<DD>Total number of CPU-seconds used by the system on behalf of the process
619+(in kernel mode), in seconds.
620+<P>
621+
622+</P>
623+<DT><CODE>U</CODE>
624+<DD>Total number of CPU-seconds that the process used directly (in user
625+mode), in seconds.
626+<P>
627+
628+</P>
629+<DT><CODE>P</CODE>
630+<DD>Percentage of the CPU that this job got. This is just user + system
631+times divied by the total running time.
632+</DL>
633+<P>
634+
635+<A NAME="Memory Resources"></A>
636+<HR SIZE="6">
637+<A NAME="SEC5"></A>
638+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
639+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &lt; </A>]</TD>
640+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &gt; </A>]</TD>
641+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
642+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
643+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
644+<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>
645+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
646+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
647+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
648+</TR></TABLE>
649+<H3> 1.2.2 Memory Resources </H3>
650+<!--docid::SEC5::-->
651+<P>
652+
653+</P>
654+<DL COMPACT>
655+<DT><CODE>M</CODE>
656+<DD>Maximum resident set size of the process during its lifetime, in
657+Kilobytes.
658+<P>
659+
660+</P>
661+<DT><CODE>t</CODE>
662+<DD>Average resident set size of the process, in Kilobytes.
663+<P>
664+
665+</P>
666+<DT><CODE>K</CODE>
667+<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
668+<P>
669+
670+</P>
671+<DT><CODE>D</CODE>
672+<DD>Average size of the process's unshared data area, in Kilobytes.
673+<P>
674+
675+</P>
676+<DT><CODE>p</CODE>
677+<DD>Average size of the process's unshared stack, in Kilobytes.
678+<P>
679+
680+</P>
681+<DT><CODE>X</CODE>
682+<DD>Average size of the process's shared text, in Kilobytes.
683+<P>
684+
685+</P>
686+<DT><CODE>Z</CODE>
687+<DD>System's page size, in bytes. This is a per-system constant, but
688+varies between systems.
689+</DL>
690+<P>
691+
692+<A NAME="I/O Resources"></A>
693+<HR SIZE="6">
694+<A NAME="SEC6"></A>
695+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
696+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &lt; </A>]</TD>
697+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &gt; </A>]</TD>
698+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
699+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
700+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
701+<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>
702+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
703+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
704+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
705+</TR></TABLE>
706+<H3> 1.2.3 I/O Resources </H3>
707+<!--docid::SEC6::-->
708+<P>
709+
710+</P>
711+<DL COMPACT>
712+<DT><CODE>F</CODE>
713+<DD>Number of major, or I/O-requiring, page faults that occurred while the
714+process was running. These are faults where the page has actually
715+migrated out of primary memory.
716+<P>
717+
718+</P>
719+<DT><CODE>R</CODE>
720+<DD>Number of minor, or recoverable, page faults. These are pages that are
721+not valid (so they fault) but which have not yet been claimed by other
722+virtual pages. Thus the data in the page is still valid but the system
723+tables must be updated.
724+<P>
725+
726+</P>
727+<DT><CODE>W</CODE>
728+<DD>Number of times the process was swapped out of main memory.
729+<P>
730+
731+</P>
732+<DT><CODE>c</CODE>
733+<DD>Number of times the process was context-switched involuntarily (because
734+the time slice expired).
735+<P>
736+
737+</P>
738+<DT><CODE>w</CODE>
739+<DD>Number of times that the program was context-switched voluntarily, for
740+instance while waiting for an I/O operation to complete.
741+<P>
742+
743+</P>
744+<DT><CODE>I</CODE>
745+<DD>Number of file system inputs by the process.
746+<P>
747+
748+</P>
749+<DT><CODE>O</CODE>
750+<DD>Number of file system outputs by the process.
751+<P>
752+
753+</P>
754+<DT><CODE>r</CODE>
755+<DD>Number of socket messages received by the process.
756+<P>
757+
758+</P>
759+<DT><CODE>s</CODE>
760+<DD>Number of socket messages sent by the process.
761+<P>
762+
763+</P>
764+<DT><CODE>k</CODE>
765+<DD>Number of signals delivered to the process.
766+</DL>
767+<P>
768+
769+<A NAME="Command Info"></A>
770+<HR SIZE="6">
771+<A NAME="SEC7"></A>
772+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
773+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &lt; </A>]</TD>
774+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &gt; </A>]</TD>
775+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
776+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
777+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
778+<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>
779+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
780+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
781+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
782+</TR></TABLE>
783+<H3> 1.2.4 Command Info </H3>
784+<!--docid::SEC7::-->
785+<P>
786+
787+</P>
788+<DL COMPACT>
789+<DT><CODE>C</CODE>
790+<DD>Name and command line arguments of the command being timed.
791+<P>
792+
793+</P>
794+<DT><CODE>x</CODE>
795+<DD>Exit status of the command.
796+</DL>
797+<P>
798+
799+<A NAME="Redirecting"></A>
800+<HR SIZE="6">
801+<A NAME="SEC8"></A>
802+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
803+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &lt; </A>]</TD>
804+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &gt; </A>]</TD>
805+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
806+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
807+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
808+<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>
809+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
810+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
811+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
812+</TR></TABLE>
813+<H2> 1.3 Redirecting Output </H2>
814+<!--docid::SEC8::-->
815+<P>
816+
817+By default, <CODE>time</CODE> writes the resource use statistics to the
818+standard error stream. The options below make it write the statistics
819+to a file instead. Doing this can be useful if the program you're
820+running writes to the standard error or you're running <CODE>time</CODE>
821+noninteractively or in the background.
822+</P>
823+<P>
824+
825+</P>
826+<DL COMPACT>
827+<DT><CODE>-o <VAR>file</VAR></CODE>
828+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
829+<DD>Write the resource use statistics to <VAR>file</VAR>. By default, this
830+<EM>overwrites</EM> the file, destroying the file's previous contents.
831+<P>
832+
833+</P>
834+<DT><CODE>-a</CODE>
835+<DD><DT><CODE>--append</CODE>
836+<DD><EM>Append</EM> the resource use information to the output file instead
837+of overwriting it. This option is only useful with the `<SAMP>-o</SAMP>' or
838+`<SAMP>--output</SAMP>' option.
839+</DL>
840+<P>
841+
842+<A NAME="Examples"></A>
843+<HR SIZE="6">
844+<A NAME="SEC9"></A>
845+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
846+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &lt; </A>]</TD>
847+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &gt; </A>]</TD>
848+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
849+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
850+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
851+<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>
852+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
853+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
854+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
855+</TR></TABLE>
856+<H2> 1.4 Examples </H2>
857+<!--docid::SEC9::-->
858+<P>
859+
860+Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
861+</P>
862+<P>
863+
864+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time wc /etc/hosts
865+ 35 111 1134 /etc/hosts
866+0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
867+1inputs+1outputs (0major+0minor)pagefaults 0swaps
868+</pre></td></tr></table><P>
869+
870+Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
871+wall-clock time:
872+</P>
873+<P>
874+
875+<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
876+total 16
877+1 account/ 1 db/ 1 mail/ 1 run/
878+1 backups/ 1 emacs/ 1 msgs/ 1 rwho/
879+1 crash/ 1 games/ 1 preserve/ 1 spool/
880+1 cron/ 1 log/ 1 quotas/ 1 tmp/
881+ 0:00.03 real, 0.00 user, 0.01 sys
882+</pre></td></tr></table><P>
883+
884+Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
885+and number of signals to the file `<TT>log</TT>', reading the format string
886+from the environment variable <CODE>TIME</CODE>:
887+</P>
888+<P>
889+
890+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ export TIME=&quot;\t%E,\t%k&quot; # If using bash or ksh
891+eg$ setenv TIME &quot;\t%E,\t%k&quot; # If using csh or tcsh
892+eg$ time -a -o log emacs .bashrc
893+eg$ cat log
894+ 0:16.55, 726
895+</pre></td></tr></table><P>
896+
897+Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
898+verbosely:
899+</P>
900+<P>
901+
902+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -v sleep 4
903+ Command being timed: &quot;sleep 4&quot;
904+ User time (seconds): 0.00
905+ System time (seconds): 0.05
906+ Percent of CPU this job got: 1%
907+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
908+ Average shared text size (kbytes): 36
909+ Average unshared data size (kbytes): 24
910+ Average stack size (kbytes): 0
911+ Average total size (kbytes): 60
912+ Maximum resident set size (kbytes): 32
913+ Average resident set size (kbytes): 24
914+ Major (requiring I/O) page faults: 3
915+ Minor (reclaiming a frame) page faults: 0
916+ Voluntary context switches: 11
917+ Involuntary context switches: 0
918+ Swaps: 0
919+ File system inputs: 3
920+ File system outputs: 1
921+ Socket messages sent: 0
922+ Socket messages received: 0
923+ Signals delivered: 1
924+ Page size (bytes): 4096
925+ Exit status: 0
926+</pre></td></tr></table><P>
927+
928+<A NAME="Accuracy"></A>
929+<HR SIZE="6">
930+<A NAME="SEC10"></A>
931+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
932+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &lt; </A>]</TD>
933+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> &gt; </A>]</TD>
934+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
935+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
936+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
937+<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>
938+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
939+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
940+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
941+</TR></TABLE>
942+<H2> 1.5 Accuracy </H2>
943+<!--docid::SEC10::-->
944+<P>
945+
946+The elapsed time is not collected atomically with the execution of the
947+program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
948+command gets stopped or swapped out in between when the program being
949+timed exits and when <CODE>time</CODE> calculates how long it took to run), it
950+could be much larger than the actual execution time.
951+</P>
952+<P>
953+
954+When the running time of a command is very nearly zero, some values
955+(e.g., the percentage of CPU used) may be reported as either zero (which
956+is wrong) or a question mark.
957+</P>
958+<P>
959+
960+Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
961+system call. The numbers are only as good as those returned by
962+<CODE>wait3</CODE>. Many systems do not measure all of the resources that
963+<CODE>time</CODE> can report on; those resources are reported as zero. The
964+systems that measure most or all of the resources are based on 4.2 or
965+4.3BSD. Later BSD releases use different memory management code that
966+measures fewer resources.
967+</P>
968+<P>
969+
970+On systems that do not have a <CODE>wait3</CODE> call that returns status
971+information, the <CODE>times</CODE> system call is used instead. It provides
972+much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
973+reports most of the resources as zero.
974+</P>
975+<P>
976+
977+The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only &quot;real&quot; input
978+and output and do not include those supplied by caching devices. The
979+meaning of &quot;real&quot; I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
980+muddled for workstations, especially diskless ones.
981+</P>
982+<P>
983+
984+<A NAME="Invoking time"></A>
985+<HR SIZE="6">
986+<A NAME="SEC11"></A>
987+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
988+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &lt; </A>]</TD>
989+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
990+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
991+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
992+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
993+<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>
994+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
995+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
996+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
997+</TR></TABLE>
998+<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
999+<!--docid::SEC11::-->
1000+<P>
1001+
1002+The format of the <CODE>time</CODE> command is:
1003+</P>
1004+<P>
1005+
1006+<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
1007+</pre></td></tr></table><P>
1008+
1009+<A NAME="IDX5"></A>
1010+<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
1011+<VAR>arg</VAR><small>...</small>. When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
1012+information about resources used by <VAR>command</VAR> (on the standard error
1013+output, by default). If <VAR>command</VAR> exits with non-zero status or is
1014+terminated by a signal, <CODE>time</CODE> displays a warning message and the
1015+exit status or signal number.
1016+</P>
1017+<P>
1018+
1019+Options to <CODE>time</CODE> must appear on the command line before
1020+<VAR>command</VAR>. Anything on the command line after <VAR>command</VAR> is
1021+passed as arguments to <VAR>command</VAR>.
1022+</P>
1023+<P>
1024+
1025+</P>
1026+<DL COMPACT>
1027+<DT><CODE>-o <VAR>file</VAR></CODE>
1028+<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
1029+<DD>Write the resource use statistics to <VAR>file</VAR>.
1030+<P>
1031+
1032+</P>
1033+<DT><CODE>-a</CODE>
1034+<DD><DT><CODE>--append</CODE>
1035+<DD><EM>Append</EM> the resource use information to the output file instead
1036+of overwriting it.
1037+<P>
1038+
1039+</P>
1040+<DT><CODE>-f <VAR>format</VAR></CODE>
1041+<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
1042+<DD>Use <VAR>format</VAR> as the format string.
1043+<P>
1044+
1045+</P>
1046+<DT><CODE>--help</CODE>
1047+<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
1048+<P>
1049+
1050+</P>
1051+<DT><CODE>-p</CODE>
1052+<DD><DT><CODE>--portability</CODE>
1053+<DD>Use the POSIX format.
1054+<P>
1055+
1056+</P>
1057+<DT><CODE>-v</CODE>
1058+<DD><DT><CODE>--verbose</CODE>
1059+<DD><A NAME="IDX6"></A>
1060+Use the built-in verbose format.
1061+<P>
1062+
1063+</P>
1064+<DT><CODE>-V</CODE>
1065+<DD><DT><CODE>--version</CODE>
1066+<DD><A NAME="IDX7"></A>
1067+Print the version number of <CODE>time</CODE> and exit.
1068+</DL>
1069+<P>
1070+
1071+<HR SIZE="6">
1072+<A NAME="SEC_Contents"></A>
1073+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1074+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
1075+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
1076+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1077+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
1078+</TR></TABLE>
1079+<H1>Table of Contents</H1>
1080+<BLOCKQUOTE>
1081+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
1082+<BR>
1083+<BLOCKQUOTE>
1084+<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
1085+<BR>
1086+<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
1087+<BR>
1088+<BLOCKQUOTE>
1089+<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
1090+<BR>
1091+<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
1092+<BR>
1093+<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
1094+<BR>
1095+<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
1096+<BR>
1097+</BLOCKQUOTE>
1098+<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
1099+<BR>
1100+<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
1101+<BR>
1102+<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
1103+<BR>
1104+<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
1105+<BR>
1106+</BLOCKQUOTE>
1107+</BLOCKQUOTE>
1108+<HR SIZE=1>
1109+<A NAME="SEC_OVERVIEW"></A>
1110+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1111+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
1112+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
1113+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1114+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
1115+</TR></TABLE>
1116+<H1>Short Table of Contents</H1>
1117+<BLOCKQUOTE>
1118+<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
1119+<BR>
1120+
1121+</BLOCKQUOTE>
1122+<HR SIZE=1>
1123+<A NAME="SEC_About"></A>
1124+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1125+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
1126+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
1127+<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1128+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
1129+</TR></TABLE>
1130+<H1>About this document</H1>
1131+This document was generated
1132+by
1133+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
1134+<P></P>
1135+The buttons in the navigation panels have the following meaning:
1136+<P></P>
1137+<table border = "1">
1138+<TR>
1139+<TH> Button </TH>
1140+<TH> Name </TH>
1141+<TH> Go to </TH>
1142+<TH> From 1.2.3 go to</TH>
1143+</TR>
1144+<TR>
1145+<TD ALIGN="CENTER">
1146+ [ &lt; ] </TD>
1147+<TD ALIGN="CENTER">
1148+Back
1149+</TD>
1150+<TD>
1151+previous section in reading order
1152+</TD>
1153+<TD>
1154+1.2.2
1155+</TD>
1156+</TR>
1157+<TR>
1158+<TD ALIGN="CENTER">
1159+ [ &gt; ] </TD>
1160+<TD ALIGN="CENTER">
1161+Forward
1162+</TD>
1163+<TD>
1164+next section in reading order
1165+</TD>
1166+<TD>
1167+1.2.4
1168+</TD>
1169+</TR>
1170+<TR>
1171+<TD ALIGN="CENTER">
1172+ [ &lt;&lt; ] </TD>
1173+<TD ALIGN="CENTER">
1174+FastBack
1175+</TD>
1176+<TD>
1177+beginning of this chapter or previous chapter
1178+</TD>
1179+<TD>
1180+1
1181+</TD>
1182+</TR>
1183+<TR>
1184+<TD ALIGN="CENTER">
1185+ [ Up ] </TD>
1186+<TD ALIGN="CENTER">
1187+Up
1188+</TD>
1189+<TD>
1190+up section
1191+</TD>
1192+<TD>
1193+1.2
1194+</TD>
1195+</TR>
1196+<TR>
1197+<TD ALIGN="CENTER">
1198+ [ &gt;&gt; ] </TD>
1199+<TD ALIGN="CENTER">
1200+FastForward
1201+</TD>
1202+<TD>
1203+next chapter
1204+</TD>
1205+<TD>
1206+2
1207+</TD>
1208+</TR>
1209+<TR>
1210+<TD ALIGN="CENTER">
1211+ [Top] </TD>
1212+<TD ALIGN="CENTER">
1213+Top
1214+</TD>
1215+<TD>
1216+cover (top) of document
1217+</TD>
1218+<TD>
1219+ &nbsp;
1220+</TD>
1221+</TR>
1222+<TR>
1223+<TD ALIGN="CENTER">
1224+ [Contents] </TD>
1225+<TD ALIGN="CENTER">
1226+Contents
1227+</TD>
1228+<TD>
1229+table of contents
1230+</TD>
1231+<TD>
1232+ &nbsp;
1233+</TD>
1234+</TR>
1235+<TR>
1236+<TD ALIGN="CENTER">
1237+ [Index] </TD>
1238+<TD ALIGN="CENTER">
1239+Index
1240+</TD>
1241+<TD>
1242+concept index
1243+</TD>
1244+<TD>
1245+ &nbsp;
1246+</TD>
1247+</TR>
1248+<TR>
1249+<TD ALIGN="CENTER">
1250+ [ ? ] </TD>
1251+<TD ALIGN="CENTER">
1252+About
1253+</TD>
1254+<TD>
1255+this page
1256+</TD>
1257+<TD>
1258+ &nbsp;
1259+</TD>
1260+</TR>
1261+</TABLE>
1262+ <P>
1263+ where the <STRONG> Example </STRONG> assumes that the current position
1264+ is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
1265+ the following structure:</P>
1266+ <UL>
1267+ <LI> 1. Section One
1268+ <UL>
1269+ <LI>1.1 Subsection One-One
1270+ <UL>
1271+ <LI>...</LI>
1272+ </UL>
1273+ <LI>1.2 Subsection One-Two
1274+ <UL>
1275+ <LI>1.2.1 Subsubsection One-Two-One</LI>
1276+ <LI>1.2.2 Subsubsection One-Two-Two</LI>
1277+ <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
1278+ <STRONG>&lt;== Current Position </STRONG></LI>
1279+ <LI>1.2.4 Subsubsection One-Two-Four</LI>
1280+ </UL>
1281+ </LI>
1282+ <LI>1.3 Subsection One-Three
1283+ <UL>
1284+ <LI>...</LI>
1285+ </UL>
1286+ </LI>
1287+ <LI>1.4 Subsection One-Four</LI>
1288+ </UL>
1289+ </LI>
1290+ </UL>
1291+
1292+<HR SIZE=1>
1293+<BR>
1294+<FONT SIZE="-1">
1295+This document was generated
1296+by <I>root</I> on <I>September, 1 2003</I>
1297+using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
1298+</FONT>
1299+
1300+</BODY>
1301+</HTML>
diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc
new file mode 100644
index 0000000000..028da7cd02
--- /dev/null
+++ b/meta/recipes-extended/time/time.inc
@@ -0,0 +1,12 @@
1SUMMARY = "Tool that measures CPU resources"
2DESCRIPTION = "time measures many of the CPU resources, such as time and \
3memory, that other programs use."
4HOMEPAGE = "http://www.gnu.org/software/time/"
5SECTION = "utils"
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
8
9inherit update-alternatives
10
11ALTERNATIVE_${PN} = "time"
12ALTERNATIVE_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 0000000000..92c5353d09
--- /dev/null
+++ b/meta/recipes-extended/time/time_1.7.bb
@@ -0,0 +1,11 @@
1require time.inc
2
3PR = "r2"
4
5SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
6 file://debian.patch"
7
8SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
9SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
10
11inherit autotools
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2013i.bb b/meta/recipes-extended/tzcode/tzcode-native_2013i.bb
new file mode 100644
index 0000000000..cfedc5b89d
--- /dev/null
+++ b/meta/recipes-extended/tzcode/tzcode-native_2013i.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Timezone zoneinfo utils (zic, zdump, tzselect)"
2LICENSE = "PD & BSD"
3
4LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=0b7570113550eb5d30aa4bd220964b8f"
5
6# note that we allow for us to use data later than our code version
7#
8SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
9 ftp://ftp.iana.org/tz/releases/tzdata2013i.tar.gz;name=tzdata"
10
11SRC_URI[tzcode.md5sum] = "86154c8b0cfb47f4e2027ecaa2ec547a"
12SRC_URI[tzcode.sha256sum] = "63bba6790afc1cb2ea0af2b998a35fc237e247608140dbe4e08b4216a8c31358"
13
14SRC_URI[tzdata.md5sum] = "8bc69eb75bea496ebe1d5a9ab576702d"
15SRC_URI[tzdata.sha256sum] = "1cd56a6ee964143ef0c65229968a5093988335b95e9115235b5e7b7e45e67dda"
16
17S = "${WORKDIR}"
18
19inherit native
20
21do_install () {
22 install -d ${D}${bindir}/
23 install -m 755 zic ${D}${bindir}/
24 install -m 755 zdump ${D}${bindir}/
25 install -m 755 tzselect ${D}${bindir}/
26}
diff --git a/meta/recipes-extended/tzdata/tzdata_2013i.bb b/meta/recipes-extended/tzdata/tzdata_2013i.bb
new file mode 100644
index 0000000000..4179b44ad6
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2013i.bb
@@ -0,0 +1,206 @@
1SUMMARY = "Timezone database"
2HOMEPAGE = "ftp://elsie.nci.nih.gov/pub/"
3SECTION = "base"
4LICENSE = "PD & BSD"
5LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=06468c0e84ef4d4c97045a4a29b08234 \
6 file://README;md5=0b7570113550eb5d30aa4bd220964b8f"
7DEPENDS = "tzcode-native"
8
9inherit allarch
10
11RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
12 timezone-arctic timezone-asia timezone-atlantic \
13 timezone-australia timezone-europe timezone-indian \
14 timezone-iso3166.tab timezone-pacific timezone-zone.tab"
15
16SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
17
18SRC_URI[tzdata.md5sum] = "8bc69eb75bea496ebe1d5a9ab576702d"
19SRC_URI[tzdata.sha256sum] = "1cd56a6ee964143ef0c65229968a5093988335b95e9115235b5e7b7e45e67dda"
20
21S = "${WORKDIR}"
22
23DEFAULT_TIMEZONE ?= "Universal"
24
25TZONES= "africa antarctica asia australasia europe northamerica southamerica \
26 factory etcetera backward systemv \
27 "
28# pacificnew
29
30do_compile () {
31 for zone in ${TZONES}; do \
32 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
33 -y ${S}/yearistype.sh ${S}/${zone} ; \
34 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
35 -y ${S}/yearistype.sh ${S}/${zone} ; \
36 ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
37 -y ${S}/yearistype.sh ${S}/${zone} ; \
38 done
39}
40
41do_install () {
42 install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
43 cp -pPR ${S}/$exec_prefix ${D}/
44 # libc is removing zoneinfo files from package
45 cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
46 cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
47
48 # Install default timezone
49 if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
50 install -d ${D}${sysconfdir}
51 echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
52 ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
53 else
54 bberror "DEFAULT_TIMEZONE is set to an invalid value."
55 exit 1
56 fi
57
58 chown -R root:root ${D}
59}
60
61pkg_postinst_${PN} () {
62 etc_lt="$D${sysconfdir}/localtime"
63 src="$D${sysconfdir}/timezone"
64
65 if [ -e ${src} ] ; then
66 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
67 fi
68
69 if [ -z ${tz} ] ; then
70 return 0
71 fi
72
73 if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
74 echo "You have an invalid TIMEZONE setting in ${src}"
75 echo "Your ${etc_lt} has been reset to Universal; enjoy!"
76 tz="Universal"
77 echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
78 if [ -L ${etc_lt} ] ; then
79 rm -f "${etc_lt}"
80 fi
81 ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
82 fi
83}
84
85# Packages primarily organized by directory with a major city
86# in most time zones in the base package
87
88PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
89 tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
90 tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
91
92FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
93RPROVIDES_tzdata-africa = "tzdata-africa"
94
95FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
96 ${datadir}/zoneinfo/US/* \
97 ${datadir}/zoneinfo/Brazil/* \
98 ${datadir}/zoneinfo/Canada/* \
99 ${datadir}/zoneinfo/Mexico/* \
100 ${datadir}/zoneinfo/Chile/*"
101RPROVIDES_tzdata-americas = "tzdata-americas"
102
103FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
104RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
105
106FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
107RPROVIDES_tzdata-arctic = "tzdata-arctic"
108
109FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
110 ${datadir}/zoneinfo/Indian/* \
111 ${datadir}/zoneinfo/Mideast/*"
112RPROVIDES_tzdata-asia = "tzdata-asia"
113
114FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
115RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
116
117FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
118RPROVIDES_tzdata-australia = "tzdata-australia"
119
120FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
121RPROVIDES_tzdata-europe = "tzdata-europe"
122
123FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
124RPROVIDES_tzdata-pacific = "tzdata-pacific"
125
126FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
127RPROVIDES_tzdata-posix = "tzdata-posix"
128
129FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
130RPROVIDES_tzdata-right = "tzdata-right"
131
132
133FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
134 ${datadir}/zoneinfo/Egypt \
135 ${datadir}/zoneinfo/Eire \
136 ${datadir}/zoneinfo/Factory \
137 ${datadir}/zoneinfo/GB-Eire \
138 ${datadir}/zoneinfo/Hongkong \
139 ${datadir}/zoneinfo/Iceland \
140 ${datadir}/zoneinfo/Iran \
141 ${datadir}/zoneinfo/Israel \
142 ${datadir}/zoneinfo/Jamaica \
143 ${datadir}/zoneinfo/Japan \
144 ${datadir}/zoneinfo/Kwajalein \
145 ${datadir}/zoneinfo/Libya \
146 ${datadir}/zoneinfo/Navajo \
147 ${datadir}/zoneinfo/Poland \
148 ${datadir}/zoneinfo/Portugal \
149 ${datadir}/zoneinfo/Singapore \
150 ${datadir}/zoneinfo/Turkey"
151RPROVIDES_tzdata-misc = "tzdata-misc"
152
153
154FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
155 ${datadir}/zoneinfo/America/Anchorage \
156 ${datadir}/zoneinfo/America/Los_Angeles \
157 ${datadir}/zoneinfo/America/Denver \
158 ${datadir}/zoneinfo/America/Chicago \
159 ${datadir}/zoneinfo/America/New_York \
160 ${datadir}/zoneinfo/America/Caracas \
161 ${datadir}/zoneinfo/America/Sao_Paulo \
162 ${datadir}/zoneinfo/Europe/London \
163 ${datadir}/zoneinfo/Europe/Paris \
164 ${datadir}/zoneinfo/Africa/Cairo \
165 ${datadir}/zoneinfo/Europe/Moscow \
166 ${datadir}/zoneinfo/Asia/Dubai \
167 ${datadir}/zoneinfo/Asia/Karachi \
168 ${datadir}/zoneinfo/Asia/Dhaka \
169 ${datadir}/zoneinfo/Asia/Bankok \
170 ${datadir}/zoneinfo/Asia/Hong_Kong \
171 ${datadir}/zoneinfo/Asia/Tokyo \
172 ${datadir}/zoneinfo/Australia/Darwin \
173 ${datadir}/zoneinfo/Australia/Adelaide \
174 ${datadir}/zoneinfo/Australia/Brisbane \
175 ${datadir}/zoneinfo/Australia/Sydney \
176 ${datadir}/zoneinfo/Pacific/Noumea \
177 ${datadir}/zoneinfo/CET \
178 ${datadir}/zoneinfo/CST6CDT \
179 ${datadir}/zoneinfo/EET \
180 ${datadir}/zoneinfo/EST \
181 ${datadir}/zoneinfo/EST5EDT \
182 ${datadir}/zoneinfo/GB \
183 ${datadir}/zoneinfo/GMT \
184 ${datadir}/zoneinfo/GMT+0 \
185 ${datadir}/zoneinfo/GMT-0 \
186 ${datadir}/zoneinfo/GMT0 \
187 ${datadir}/zoneinfo/Greenwich \
188 ${datadir}/zoneinfo/HST \
189 ${datadir}/zoneinfo/MET \
190 ${datadir}/zoneinfo/MST \
191 ${datadir}/zoneinfo/MST7MDT \
192 ${datadir}/zoneinfo/NZ \
193 ${datadir}/zoneinfo/NZ-CHAT \
194 ${datadir}/zoneinfo/PRC \
195 ${datadir}/zoneinfo/PST8PDT \
196 ${datadir}/zoneinfo/ROC \
197 ${datadir}/zoneinfo/ROK \
198 ${datadir}/zoneinfo/UCT \
199 ${datadir}/zoneinfo/UTC \
200 ${datadir}/zoneinfo/Universal \
201 ${datadir}/zoneinfo/W-SU \
202 ${datadir}/zoneinfo/WET \
203 ${datadir}/zoneinfo/Zulu \
204 ${datadir}/zoneinfo/zone.tab \
205 ${datadir}/zoneinfo/iso3166.tab \
206 ${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 0000000000..8f30e42674
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/avoid-strip.patch
@@ -0,0 +1,50 @@
1Upstream-Status: Pending
2
3unix/Makefile: remove hard coded strip commands
4
5Remove the hard coded strip commands, both LF2 (used in linking) and
6STRIP used alone.
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10diff -ur unzip60.orig/unix/configure unzip60/unix/configure
11--- unzip60.orig/unix/configure 2009-04-16 14:25:12.000000000 -0500
12+++ unzip60/unix/configure 2011-06-21 11:23:36.822849960 -0500
13@@ -17,7 +17,7 @@
14 IZ_BZIP2=${3}
15 CFLAGS="${CFLAGS} -I. -DUNIX"
16 LFLAGS1=""
17-LFLAGS2="-s"
18+LFLAGS2=""
19 LN="ln -s"
20
21 CFLAGS_OPT=''
22diff -ur unzip60.orig/unix/Makefile unzip60/unix/Makefile
23--- unzip60.orig/unix/Makefile 2009-01-18 16:41:18.000000000 -0600
24+++ unzip60/unix/Makefile 2011-06-21 11:12:22.900003388 -0500
25@@ -52,7 +52,7 @@
26 CF = $(CFLAGS) $(CF_NOOPT)
27 LFLAGS1 =
28 LF = -o unzip$E $(LFLAGS1)
29-LF2 = -s
30+LF2 =
31
32 # UnZipSFX flags
33 SL = -o unzipsfx$E $(LFLAGS1)
34@@ -70,7 +70,7 @@
35 CHMOD = chmod
36 BINPERMS = 755
37 MANPERMS = 644
38-STRIP = strip
39+STRIP =
40 E =
41 O = .o
42 M = unix
43@@ -776,7 +776,6 @@
44 #
45 gcc: unix_make
46 $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2=""
47- $(STRIP) $(UNZIPS)
48
49 # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
50 hk68: unix_make
diff --git a/meta/recipes-extended/unzip/unzip/define-ldflags.patch b/meta/recipes-extended/unzip/unzip/define-ldflags.patch
new file mode 100644
index 0000000000..659c6e3315
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/define-ldflags.patch
@@ -0,0 +1,18 @@
1Pass LDFLAGS to the linker
2
3Upstream-Status: Pending
4
5Signed-off-by: Mikhail Durnev <Mikhail_Durnev@mentor.com>
6
7diff -Naur old/unix/configure new/unix/configure
8--- old/unix/configure 2014-01-13 21:59:27.000000000 +1100
9+++ new/unix/configure 2014-01-14 16:36:02.000000000 +1100
10@@ -16,7 +16,7 @@
11 CFLAGSR=${CFLAGS}
12 IZ_BZIP2=${3}
13 CFLAGS="${CFLAGS} -I. -DUNIX"
14-LFLAGS1=""
15+LFLAGS1=${LDFLAGS}
16 LFLAGS2=""
17 LN="ln -s"
18
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 0000000000..33c20f8b4c
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Utilities for extracting and viewing files in .zip archives"
2HOMEPAGE = "http://www.info-zip.org"
3SECTION = "console/utils"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
6PE = "1"
7PR = "r5"
8
9SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
10 file://avoid-strip.patch \
11 file://define-ldflags.patch"
12
13SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
14SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
15S = "${WORKDIR}/unzip60"
16
17# Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from
18# Makefile and add CFLAGS. Optimization will be overriden by unzip
19# configure to be -O3.
20#
21EXTRA_OEMAKE += "STRIP=true LF2='' \
22 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
23
24export LD = "${CC}"
25LD_class-native = "${CC}"
26
27do_compile() {
28 oe_runmake -f unix/Makefile generic
29}
30
31do_install() {
32 oe_runmake -f unix/Makefile install prefix=${D}${prefix}
33 install -d ${D}${mandir}
34 mv ${D}${prefix}/man/* ${D}${mandir}
35 rmdir ${D}${prefix}/man/
36}
37
38BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/watchdog/files/fix-ping-failure.patch b/meta/recipes-extended/watchdog/files/fix-ping-failure.patch
new file mode 100644
index 0000000000..f5976eb5cf
--- /dev/null
+++ b/meta/recipes-extended/watchdog/files/fix-ping-failure.patch
@@ -0,0 +1,65 @@
1Fix ping mode failure
2
3Upstream-Status: Pending
4
5When watchdog works on ping mode, the system will be rebooted since
6watchdog can not receive the expected ECOREPLY on a setting interval.
7
8Ping mode uses a raw socket to send a ECO packet, then uses select()
9to wait and recvfrom() to receive the ECOREPLY packet, if select()
10shows the data is ready, and the data is not the expected ECOREPLY,
11and waiting time is not overdue, it will continue use select() and
12recvfrom().
13
14Problem is that the raw socket can receive any icmp packets, if we do
15not set filters, and there are many icmp packets on socket, this
16program will not find its interested ECOREPLY packet in a special
17interval, which makes the ping mode fail.
18
19
20Other program is that watchdog sometime can not reach the call of
21recvfrom to try to receive packets since tv_sec of struct timeval
22of select parameter is 0.
23
24The timeout of select() is the result of ping interval minusing the
25time of calling gettimeofday spending, when ping interval is 1 second,
26and the call of gettimeofday() spends several useconds, the tv_sec of
27struct timeval of select parameter must be 0, at that condition, we
28should it is valid of tv_sec of struct timeval of select parameter be 0
29
30Signed-off-by: Roy.Li <rongqing.li@windriver.com>
31---
32 src/net.c | 2 +-
33 src/watchdog.c | 5 ++++-
34 2 files changed, 5 insertions(+), 2 deletions(-)
35
36Index: watchdog-5.13/src/watchdog.c
37===================================================================
38--- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800
39+++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700
40@@ -28,6 +28,7 @@
41 #include <sys/types.h>
42 #include <sys/ioctl.h>
43 #include <linux/oom.h>
44+#include <linux/icmp.h>
45 #include <linux/watchdog.h>
46 #include <string.h>
47
48@@ -567,6 +568,8 @@
49 pid_t child_pid;
50 int oom_adjusted = 0;
51 struct stat s;
52+ struct icmp_filter filt;
53+ filt.data = ~(1<<ICMP_ECHOREPLY);
54
55 #if USE_SYSLOG
56 char *opts = "d:i:n:Ffsvbql:p:t:c:r:m:a:";
57@@ -703,7 +706,7 @@
58 perror(progname);
59 exit(1);
60 }
61-
62+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
63 /* this is necessary for broadcast pings to work */
64 (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
65
diff --git a/meta/recipes-extended/watchdog/files/fixsepbuild.patch b/meta/recipes-extended/watchdog/files/fixsepbuild.patch
new file mode 100644
index 0000000000..2fad3a112f
--- /dev/null
+++ b/meta/recipes-extended/watchdog/files/fixsepbuild.patch
@@ -0,0 +1,27 @@
1Fix out of tree build support:
2
3| installing /etc/watchdog.conf
4| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
5| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
6| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
7| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
8| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory
9| make[2]: *** [install-etc-local] Error 1
10
11Upstream-Status: Pending
12
13RP 2013/03/21
14
15Index: watchdog-5.13/Makefile.am
16===================================================================
17--- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000
18+++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000
19@@ -16,7 +16,7 @@
20 else \
21 echo "installing $(CONFIG_FILENAME)"; \
22 $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
23- $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
24+ $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
25 fi
26
27 install-data-local: install-etc-local
diff --git a/meta/recipes-extended/watchdog/watchdog_5.13.bb b/meta/recipes-extended/watchdog/watchdog_5.13.bb
new file mode 100644
index 0000000000..b9e29d22fc
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog_5.13.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Software watchdog"
2DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
3working. If programs in user space are not longer executed \
4it will reboot the system."
5HOMEPAGE = "http://watchdog.sourceforge.net/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
7
8LICENSE = "GPL-2.0+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
12 file://fixsepbuild.patch \
13 file://fix-ping-failure.patch"
14SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1"
15SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0"
16
17inherit autotools
18
19RRECOMMENDS_${PN} = "kernel-module-softdog"
diff --git a/meta/recipes-extended/wget/wget-1.14/fix_doc.patch b/meta/recipes-extended/wget/wget-1.14/fix_doc.patch
new file mode 100644
index 0000000000..91a5ff73da
--- /dev/null
+++ b/meta/recipes-extended/wget/wget-1.14/fix_doc.patch
@@ -0,0 +1,71 @@
1Fix documentation build errors with Texinfo 5 and Perl 5.18
2
3wget.pod around line 2105: Expected text after =item, not a number
4wget.pod around line 2110: Expected text after =item, not a number
5wget.pod around line 2116: Expected text after =item, not a number
6wget.pod around line 2121: Expected text after =item, not a number
7wget.pod around line 2126: Expected text after =item, not a number
8wget.pod around line 2131: Expected text after =item, not a number
9wget.pod around line 2136: Expected text after =item, not a number
10wget.pod around line 2141: Expected text after =item, not a number
11wget.texi:879: @itemx must follow @item
12wget.texi:980: @itemx must follow @item
13wget.texi:3097: @itemx must follow @item
14wget.texi:3608: warning: @itemx should not begin @table
15
16Upstream-Status: Backport
17Signed-off-by: Jonathan Liu <net147@gmail.com>
18
19diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl
20index 86c4b18..9db6de1 100755
21--- a/doc/texi2pod.pl
22+++ b/doc/texi2pod.pl
23@@ -291,7 +291,7 @@ while(<$inf>) {
24 if (defined $1) {
25 my $thing = $1;
26 if ($ic =~ /\@asis/) {
27- $_ = "\n=item $thing\n";
28+ $_ = "\n=item C<$thing>\n";
29 } else {
30 # Entity escapes prevent munging by the <> processing below.
31 $_ = "\n=item $ic\&LT;$thing\&GT;\n";
32diff --git a/doc/wget.texi b/doc/wget.texi
33index 7efdc72..2b045fd 100644
34--- a/doc/wget.texi
35+++ b/doc/wget.texi
36@@ -876,7 +876,7 @@ recommendation to block many unrelated users from a web site due to the
37 actions of one.
38
39 @cindex proxy
40-@itemx --no-proxy
41+@item --no-proxy
42 Don't use proxies, even if the appropriate @code{*_proxy} environment
43 variable is defined.
44
45@@ -977,7 +977,7 @@ are outside the range of @sc{ascii} characters (that is, greater than
46 whose encoding does not match the one used locally.
47
48 @cindex IPv6
49-@itemx -4
50+@item -4
51 @itemx --inet4-only
52 @itemx -6
53 @itemx --inet6-only
54@@ -3094,7 +3094,7 @@ display properly---the same as @samp{-p}.
55 Change setting of passive @sc{ftp}, equivalent to the
56 @samp{--passive-ftp} option.
57
58-@itemx password = @var{string}
59+@item password = @var{string}
60 Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval.
61 This command can be overridden using the @samp{ftp_password} and
62 @samp{http_password} command for @sc{ftp} and @sc{http} respectively.
63@@ -3605,7 +3605,7 @@ In addition to the environment variables, proxy location and settings
64 may be specified from within Wget itself.
65
66 @table @samp
67-@itemx --no-proxy
68+@item --no-proxy
69 @itemx proxy = on/off
70 This option and the corresponding command may be used to suppress the
71 use of proxy, even if the appropriate environment variables are set.
diff --git a/meta/recipes-extended/wget/wget-1.14/fix_makefile.patch b/meta/recipes-extended/wget/wget-1.14/fix_makefile.patch
new file mode 100644
index 0000000000..8ad7c62cdf
--- /dev/null
+++ b/meta/recipes-extended/wget/wget-1.14/fix_makefile.patch
@@ -0,0 +1,33 @@
1
2Upstream-Status: Pending
3
4Signed-off-by: Saul Wold <sgw@linux.intel.com>
5
6Index: wget-1.12/po/Makefile.in.in
7===================================================================
8--- wget-1.12.orig/po/Makefile.in.in 2009-09-04 09:31:54.000000000 -0700
9+++ wget-1.12/po/Makefile.in.in 2011-10-19 20:32:53.714812160 -0700
10@@ -8,8 +8,8 @@
11 # Please note that the actual code of GNU gettext is covered by the GNU
12 # General Public License and is *not* in the public domain.
13 #
14-# Origin: gettext-0.17
15-GETTEXT_MACRO_VERSION = 0.17
16+# Origin: gettext-0.18
17+GETTEXT_MACRO_VERSION = 0.18
18
19 PACKAGE = @PACKAGE@
20 VERSION = @VERSION@
21Index: wget-1.12/configure.ac
22===================================================================
23--- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700
24+++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700
25@@ -110,7 +110,7 @@
26 dnl Gettext
27 dnl
28 AM_GNU_GETTEXT([external],[need-ngettext])
29-AM_GNU_GETTEXT_VERSION([0.17])
30+AM_GNU_GETTEXT_VERSION([0.18])
31
32 AC_PROG_RANLIB
33
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
new file mode 100644
index 0000000000..7395c95cf7
--- /dev/null
+++ b/meta/recipes-extended/wget/wget.inc
@@ -0,0 +1,20 @@
1SUMMARY = "Console URL download utility supporting HTTP, FTP, etc"
2SECTION = "console/network"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
5DEPENDS = "openssl zlib libpcre"
6DEPENDS_class-native = "openssl-native zlib-native"
7DEPENDS_class-nativesdk = "nativesdk-openssl nativesdk-zlib"
8
9INC_PR = "r16"
10
11inherit autotools gettext update-alternatives
12
13EXTRA_OECONF = "--enable-ipv6 --with-libssl-prefix=${STAGING_DIR_HOST} \
14 --with-ssl=openssl --disable-rpath --disable-iri \
15 ac_cv_header_uuid_uuid_h=no"
16
17ALTERNATIVE_${PN} = "wget"
18ALTERNATIVE_PRIORITY = "100"
19
20BBCLASSEXTEND += "native nativesdk"
diff --git a/meta/recipes-extended/wget/wget_1.14.bb b/meta/recipes-extended/wget/wget_1.14.bb
new file mode 100644
index 0000000000..b12c14711d
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.14.bb
@@ -0,0 +1,10 @@
1PR = "${INC_PR}.0"
2
3SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
4 file://fix_makefile.patch \
5 file://fix_doc.patch \
6 "
7SRC_URI[md5sum] = "12edc291dba8127f2e9696e69f36299e"
8SRC_URI[sha256sum] = "f3a6898e3a765bb94435b04a6668db9e5d19b3e90e0c69a503a2773ae936c269"
9
10require 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 0000000000..fb9b1a4083
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
@@ -0,0 +1,53 @@
1Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
2
3# glibc also implements the function group_member. To avoid name conflict,
4# here let us append a "_" to which's version.
5#
6# Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
7# (this patch is licensed under GPLv2)
8
9--- which-2.18/bash.c
10+++ which-2.18/bash.c
11@@ -45,7 +45,12 @@
12 * - changed all occurences of 'gid_t' into 'GID_T'.
13 * - exported functions needed in which.c
14 */
15-static int group_member (GID_T gid);
16+
17+/*
18+ * glibc also implements the function group_member. To avoid name conflict,
19+ * here let us append a "_" to which's version.
20+ */
21+static int _group_member (GID_T gid);
22 static char* extract_colon_unit (char const* string, int *p_index);
23
24 /*===========================================================================
25@@ -200,8 +205,8 @@
26
27 /* From bash-2.05b / general.c / line 805 */
28 /* Return non-zero if GID is one that we have in our groups list. */
29-int
30-group_member (GID_T gid)
31+static int
32+_group_member (GID_T gid)
33 {
34 #if defined (HAVE_GETGROUPS)
35 register int i;
36@@ -290,7 +295,7 @@
37 return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
38
39 /* Otherwise, if we are in the owning group, the group permissions apply. */
40- if (group_member (finfo.st_gid))
41+ if (_group_member (finfo.st_gid))
42 return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
43
44 /* Otherwise, if we are in the other group, the other permissions apply. */
45@@ -331,7 +336,7 @@
46 /* Given a string containing units of information separated by colons,
47 return the next one pointed to by (P_INDEX), or NULL if there are no more.
48 Advance (P_INDEX) to the character after the colon. */
49-char*
50+static char*
51 extract_colon_unit (char const* string, int* p_index)
52 {
53 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 0000000000..d3340a3530
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.20/remove-declaration.patch
@@ -0,0 +1,18 @@
1Remove the declaration of group_member since it has already been
2declared in unistd.h
3
4Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
5
6Upstream-Status: Inappropriate [embedded specific]
7
8diff -ruN which-2.20-orig/bash.c which-2.20/bash.c
9--- which-2.20-orig/bash.c 2010-08-03 12:59:08.897088878 +0800
10+++ which-2.20/bash.c 2010-08-03 13:17:23.406097212 +0800
11@@ -46,7 +46,6 @@
12 * - changed all occurences of 'gid_t' into 'GID_T'.
13 * - exported functions needed in which.c
14 */
15-static int group_member (GID_T gid);
16 static char* extract_colon_unit (char const* string, int* p_index);
17
18 /*===========================================================================
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 0000000000..4f780100b3
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Displays the full path of shell commands"
2DESCRIPTION = "Which is a utility that prints out the full path of the \
3executables that bash(1) would execute when the passed \
4program names would have been entered on the shell prompt. \
5It does this by using the exact same algorithm as bash."
6SECTION = "libs"
7HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
8
9LICENSE = "GPLv2+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
11
12PR = "r2"
13
14SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
15 file://fix_name_conflict_group_member.patch"
16
17SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
18SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
19
20DEPENDS = "cwautomacros-native"
21
22inherit autotools update-alternatives
23
24do_configure_prepend() {
25 OLD="@ACLOCAL_CWFLAGS@"
26 NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
27 sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
28}
29
30ALTERNATIVE_${PN} = "which"
31ALTERNATIVE_PRIORITY = "100"
32
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 0000000000..f4e87de76b
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.20.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Displays the full path of shell commands"
2DESCRIPTION = "Which is a utility that prints out the full path of the \
3executables that bash(1) would execute when the passed \
4program names would have been entered on the shell prompt. \
5It does this by using the exact same algorithm as bash."
6SECTION = "libs"
7HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
8
9LICENSE = "GPLv3+"
10LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
11 file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2"
12DEPENDS = "cwautomacros-native"
13
14inherit autotools update-alternatives
15
16PR = "r3"
17
18EXTRA_OECONF = "--disable-iberty"
19
20SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
21 file://remove-declaration.patch"
22
23SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744"
24SRC_URI[sha256sum] = "d417b65c650d88ad26a208293c1c6e3eb60d4b6d847f01ff8f66aca63e2857f8"
25
26do_configure_prepend() {
27 sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am
28}
29
30ALTERNATIVE_${PN} = "which"
31ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
new file mode 100644
index 0000000000..79698791bc
--- /dev/null
+++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Basic desktop integration functions"
2
3DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
4desktop integration functions for any Free Desktop, such as Linux. \
5They are intended to provide a set of defacto standards. \
6The following scripts are provided at this time: \
7xdg-desktop-icon \
8xdg-desktop-menu \
9xdg-email \
10xdg-icon-resource \
11xdg-mime \
12xdg-open \
13xdg-screensaver \
14"
15
16LICENSE = "MIT"
17LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
18
19SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz"
20
21SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6"
22SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102"
23
24inherit autotools-brokensep
25
26RDEPENDS_${PN} += "xprop"
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 0000000000..cd6e6c1078
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
@@ -0,0 +1,86 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001
4From: Pierre Habouzit <madcoder@debian.org>
5Date: Wed, 28 Nov 2007 10:13:08 +0100
6Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists.
7
8 This way, if a service is enabled in /etc/xinetd* _and_ in
9/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes
10precedence.
11
12Signed-off-by: Pierre Habouzit <madcoder@debian.org>
13---
14 xinetd/inet.c | 22 +++++++++++++++++++---
15 1 files changed, 19 insertions(+), 3 deletions(-)
16
17diff --git a/xinetd/inet.c b/xinetd/inet.c
18index 1cb2ba2..8caab45 100644
19--- a/xinetd/inet.c
20+++ b/xinetd/inet.c
21@@ -23,6 +23,8 @@
22 #include "parsesup.h"
23 #include "nvlists.h"
24
25+static psi_h iter ;
26+
27 static int get_next_inet_entry( int fd, pset_h sconfs,
28 struct service_config *defaults);
29
30@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp )
31 struct service_config *default_config = CNF_DEFAULTS( confp );
32
33 line_count = 0;
34+ iter = psi_create (sconfs);
35
36 for( ;; )
37 {
38 if (get_next_inet_entry(fd, sconfs, default_config) == -2)
39 break;
40 }
41+
42+ psi_destroy(iter);
43 }
44
45 static int get_next_inet_entry( int fd, pset_h sconfs,
46@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
47 char *p;
48 str_h strp;
49 char *line = next_line(fd);
50- struct service_config *scp;
51+ struct service_config *scp, *tmp;
52 unsigned u, i;
53 const char *func = "get_next_inet_entry";
54 char *name = NULL, *rpcvers = NULL, *rpcproto = NULL;
55@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
56 SC_SPECIFY( scp, A_SOCKET_TYPE );
57 SC_SPECIFY( scp, A_WAIT );
58
59- if( ! pset_add(sconfs, scp) )
60+ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){
61+ if (EQ(SC_ID(scp), SC_ID(tmp))) {
62+ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp));
63+ sc_free(scp);
64+ scp = NULL;
65+ break;
66+ }
67+ }
68+
69+ if( scp && ! pset_add(sconfs, scp) )
70 {
71 out_of_memory( func );
72 pset_destroy(args);
73@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
74 }
75
76 pset_destroy(args);
77- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
78+ if (scp) {
79+ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
80+ }
81 return 0;
82 }
83
84--
851.5.3.6.2040.g15e6
86
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 0000000000..8e59cdcaae
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
@@ -0,0 +1,79 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001
4From: Pierre Habouzit <madcoder@debian.org>
5Date: Mon, 26 Nov 2007 16:02:04 +0100
6Subject: [PATCH] Various fixes from the previous maintainer.
7
8---
9 xinetd/child.c | 20 +++++++++++++++++---
10 xinetd/service.c | 8 ++++----
11 2 files changed, 21 insertions(+), 7 deletions(-)
12
13diff --git a/xinetd/child.c b/xinetd/child.c
14index 89ee54c..48e9615 100644
15--- a/xinetd/child.c
16+++ b/xinetd/child.c
17@@ -284,6 +284,7 @@ void child_process( struct server *serp )
18 connection_s *cp = SERVER_CONNECTION( serp ) ;
19 struct service_config *scp = SVC_CONF( sp ) ;
20 const char *func = "child_process" ;
21+ int fd, null_fd;
22
23 signal_default_state();
24
25@@ -296,9 +297,22 @@ void child_process( struct server *serp )
26 signals_pending[0] = -1;
27 signals_pending[1] = -1;
28
29- Sclose(0);
30- Sclose(1);
31- Sclose(2);
32+ if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 )
33+ {
34+ msg( LOG_ERR, func, "open('/dev/null') failed: %m") ;
35+ _exit( 1 ) ;
36+ }
37+
38+ for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ )
39+ {
40+ if ( fd != null_fd && dup2( null_fd, fd ) == -1 )
41+ {
42+ msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ;
43+ _exit( 1 ) ;
44+ }
45+ }
46+ if ( null_fd > MAX_PASS_FD )
47+ (void) Sclose( null_fd ) ;
48
49
50 #ifdef DEBUG_SERVER
51diff --git a/xinetd/service.c b/xinetd/service.c
52index 3d68d78..0132d6c 100644
53--- a/xinetd/service.c
54+++ b/xinetd/service.c
55@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp,
56 return FAILED;
57
58 if ( last == NULL ) {
59- last = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
60- SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last;
61+ SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
62+ last = SAIN( SVC_LAST_DGRAM_ADDR(sp) );
63 }
64
65 (void) time( &current_time ) ;
66@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp,
67 return FAILED;
68
69 if( last == NULL ) {
70- last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
71- SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last;
72+ SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
73+ last = SAIN6(SVC_LAST_DGRAM_ADDR(sp));
74 }
75
76 (void) time( &current_time ) ;
77--
781.5.3.6.2040.g15e6
79
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
new file mode 100644
index 0000000000..0542dbe835
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
@@ -0,0 +1,32 @@
1xinetd: CVE-2013-4342
2
3xinetd does not enforce the user and group configuration directives
4for TCPMUX services, which causes these services to be run as root
5and makes it easier for remote attackers to gain privileges by
6leveraging another vulnerability in a service.
7http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342
8
9the patch come from:
10https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
11
12Signed-off-by: Li Wang <li.wang@windriver.com>
13---
14 xinetd/builtins.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/xinetd/builtins.c b/xinetd/builtins.c
18index 3b85579..34a5bac 100644
19--- a/xinetd/builtins.c
20+++ b/xinetd/builtins.c
21@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp )
22 if( SC_IS_INTERNAL( scp ) ) {
23 SC_INTERNAL(scp, nserp);
24 } else {
25- exec_server(nserp);
26+ child_process(nserp);
27 }
28 }
29
30--
311.7.9.5
32
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 0000000000..2365ca123b
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
@@ -0,0 +1,112 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001
4From: David Madore <david@pleiades.stars>
5Date: Mon, 24 Mar 2008 12:45:36 +0100
6Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode
7
8xinetd does not bind to IPv6 addresses (and does not seem to have an
9option to do so) when used in -inetd_compat mode. As current inetd's
10are IPv6-aware, this is a problem: this means xinetd cannot be used as
11a drop-in inetd replacement.
12
13The attached patch is a suggestion: it adds a -inetd_ipv6 global
14option that, if used, causes inetd-compatibility lines to have an
15implicit "IPv6" option. Perhaps this is not the best solution, but
16there should definitely be a way to get inetd.conf to be read in
17IPv6-aware mode.
18---
19 xinetd/confparse.c | 1 +
20 xinetd/inet.c | 17 +++++++++++++++++
21 xinetd/options.c | 3 +++
22 xinetd/xinetd.man | 6 ++++++
23 4 files changed, 27 insertions(+), 0 deletions(-)
24
25diff --git a/xinetd/confparse.c b/xinetd/confparse.c
26index db9f431..d7b0bcc 100644
27--- a/xinetd/confparse.c
28+++ b/xinetd/confparse.c
29@@ -40,6 +40,7 @@
30 #include "inet.h"
31 #include "main.h"
32
33+extern int inetd_ipv6;
34 extern int inetd_compat;
35
36 /*
37diff --git a/xinetd/inet.c b/xinetd/inet.c
38index 8caab45..2e617ae 100644
39--- a/xinetd/inet.c
40+++ b/xinetd/inet.c
41@@ -25,6 +25,8 @@
42
43 static psi_h iter ;
44
45+extern int inetd_ipv6;
46+
47 static int get_next_inet_entry( int fd, pset_h sconfs,
48 struct service_config *defaults);
49
50@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
51 }
52 SC_SERVER_ARGV(scp)[u] = p;
53 }
54+
55+ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */
56+ if ( inetd_ipv6 )
57+ {
58+ nvp = nv_find_value( service_flags, "IPv6" );
59+ if ( nvp == NULL )
60+ {
61+ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ;
62+ pset_destroy(args);
63+ sc_free(scp);
64+ return -1;
65+ }
66+ M_SET(SC_XFLAGS(scp), nvp->value);
67+ }
68+
69 /* Set the reuse flag, as this is the default for inetd */
70 nvp = nv_find_value( service_flags, "REUSE" );
71 if ( nvp == NULL )
72diff --git a/xinetd/options.c b/xinetd/options.c
73index b058b6a..dc2f3a0 100644
74--- a/xinetd/options.c
75+++ b/xinetd/options.c
76@@ -30,6 +30,7 @@ int logprocs_option ;
77 unsigned logprocs_option_arg ;
78 int stayalive_option=0;
79 char *program_name ;
80+int inetd_ipv6 = 0 ;
81 int inetd_compat = 0 ;
82 int dont_fork = 0;
83
84@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] )
85 fprintf(stderr, "\n");
86 exit(0);
87 }
88+ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 )
89+ inetd_ipv6 = 1;
90 else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 )
91 inetd_compat = 1;
92 }
93diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man
94index c76c3c6..c9dd803 100644
95--- a/xinetd/xinetd.man
96+++ b/xinetd/xinetd.man
97@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the
98 standard xinetd config files. /etc/inetd.conf is read after the
99 standard xinetd config files.
100 .TP
101+.BI \-inetd_ipv6
102+This option causes xinetd to bind to IPv6 (AF_INET6) addresses for
103+inetd compatibility lines (see previous option). This only affects
104+how /etc/inetd.conf is interpreted and thus only has any effect if
105+the \-inetd_compat option is also used.
106+.TP
107 .BI \-cc " interval"
108 This option instructs
109 .B xinetd
110--
1111.5.5.rc0.127.gb4337
112
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
new file mode 100644
index 0000000000..9e6ea2577e
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
@@ -0,0 +1,11 @@
1# Simple configuration file for xinetd
2#
3# Some defaults, and include /etc/xinetd.d/
4
5defaults
6{
7
8
9}
10
11includedir /etc/xinetd.d
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.default b/meta/recipes-extended/xinetd/xinetd/xinetd.default
new file mode 100644
index 0000000000..20a38e3f3e
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.default
@@ -0,0 +1,12 @@
1# Default settings for xinetd. This file is sourced by /bin/sh from
2# /etc/init.d/xinetd
3
4# enable xinetd Inetd compat mode
5INETD_COMPAT=Yes
6
7# Options to pass to xinetd
8#
9# -stayalive comes by default : it can be removed if xinetd is expected
10# not to start when no service is configured
11#
12XINETD_OPTS="-stayalive"
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.init b/meta/recipes-extended/xinetd/xinetd/xinetd.init
new file mode 100644
index 0000000000..777c2c8b46
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.init
@@ -0,0 +1,64 @@
1#!/bin/sh
2#
3# /etc/init.d/xinetd -- script to start and stop xinetd.
4
5# Source function library.
6. /etc/init.d/functions
7
8if test -f /etc/default/xinetd; then
9 . /etc/default/xinetd
10fi
11
12
13test -x /usr/sbin/xinetd || exit 0
14
15checkportmap () {
16 if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
17 if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
18 echo
19 echo "WARNING: portmapper inactive - RPC services unavailable!"
20 echo " Commenting out or removing the RPC services from"
21 echo " the /etc/xinetd.conf file will remove this message."
22 echo
23 fi
24 fi
25}
26
27case "$1" in
28 start)
29 checkportmap
30 echo -n "Starting internet superserver: xinetd"
31 start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS
32 echo "."
33 ;;
34 stop)
35 echo -n "Stopping internet superserver: xinetd"
36 start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
37 echo "."
38 ;;
39 status)
40 status /usr/sbin/xinetd;
41 exit $?
42 ;;
43 reload)
44 echo -n "Reloading internet superserver configuration: xinetd"
45 start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
46 echo "."
47 ;;
48 force-reload)
49 echo "$0 force-reload: Force Reload is deprecated"
50 echo -n "Forcefully reloading internet superserver configuration: xinetd"
51 start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
52 echo "."
53 ;;
54 restart)
55 $0 stop
56 $0 start
57 ;;
58 *)
59 echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}"
60 exit 1
61 ;;
62esac
63
64exit 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 0000000000..1928949e94
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -0,0 +1,57 @@
1SUMMARY = "Socket-based service activation daemon"
2HOMEPAGE = "http://www.xinetd.org"
3
4# xinetd is a BSD-like license
5# Apple and Gentoo say BSD here.
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
8
9DEPENDS = ""
10PR = "r2"
11
12SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
13 file://xinetd.init \
14 file://xinetd.conf \
15 file://xinetd.default \
16 file://Various-fixes-from-the-previous-maintainer.patch \
17 file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
18 file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
19 file://xinetd-CVE-2013-4342.patch \
20 "
21
22SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c"
23SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3"
24
25inherit autotools update-rc.d
26
27INITSCRIPT_NAME = "xinetd"
28INITSCRIPT_PARAMS = "defaults"
29
30EXTRA_OECONF="--disable-nls"
31
32PACKAGECONFIG ??= "tcp-wrappers"
33PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
34
35do_configure() {
36 # Looks like configure.in is broken, so we are skipping
37 # rebuilding configure and are just using the shipped one
38 ( cd ${S}; gnu-configize --force )
39 oe_runconf
40}
41
42do_install() {
43 # Same here, the Makefile does some really stupid things,
44 # but since we only want two files why not override
45 # do_install from autotools and doing it ourselfs?
46 install -d "${D}${sbindir}"
47 install -d "${D}${sysconfdir}/init.d"
48 install -d "${D}${sysconfdir}/xinetd.d"
49 install -d "${D}${sysconfdir}/default"
50 install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}"
51 install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
52 install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
53 install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
54 install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
55}
56
57CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
new file mode 100644
index 0000000000..b8501a5a39
--- /dev/null
+++ b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
@@ -0,0 +1,40 @@
1SUMMARY = "Utilities for managing LZMA compressed files"
2HOMEPAGE = "http://tukaani.org/xz/"
3SECTION = "base"
4
5# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
6# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
7# and the LGPL bits are under lib/, which appears to be used for libgnu, which
8# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
9LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+ & PD"
10LICENSE_${PN} = "GPLv2+"
11LICENSE_${PN}-dev = "GPLv2+"
12LICENSE_${PN}-staticdev = "GPLv2+"
13LICENSE_${PN}-doc = "GPLv2+"
14LICENSE_${PN}-dbg = "GPLv2+"
15LICENSE_${PN}-locale = "GPLv2+"
16LICENSE_liblzma = "PD"
17LICENSE_liblzma-dev = "PD"
18LICENSE_liblzma-staticdev = "PD"
19LICENSE_liblzma-dbg = "PD"
20
21LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
22 file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
23 file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
24 file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
25 file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
26
27SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
28SRC_URI[md5sum] = "bbb2daa876c87fb2cf9fe4590af9694e"
29SRC_URI[sha256sum] = "9f94506e301d5b6863921bba861a99ba00de384dafb4e5f409679a93e41613d4"
30
31inherit autotools gettext
32
33PACKAGES =+ "liblzma liblzma-dev liblzma-staticdev liblzma-dbg"
34
35FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
36FILES_liblzma-dev = "${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir}/liblzma.la ${libdir}/pkgconfig/liblzma.pc"
37FILES_liblzma-staticdev = "${libdir}/liblzma.a"
38FILES_liblzma-dbg = "${libdir}/.debug/liblzma*"
39
40BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/zip/zip.inc b/meta/recipes-extended/zip/zip.inc
new file mode 100644
index 0000000000..6221c5e139
--- /dev/null
+++ b/meta/recipes-extended/zip/zip.inc
@@ -0,0 +1,26 @@
1SUMMARY = "Compressor/archiver for creating and modifying .zip files"
2HOMEPAGE = "http://www.info-zip.org"
3SECTION = "console/utils"
4
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
7
8SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
9
10EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
11 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
12 'BINFLAGS=0755' 'INSTALL_D=install -d'"
13
14do_compile() {
15 oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory
16 sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags
17 oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory
18}
19
20do_install() {
21 oe_runmake -f unix/Makefile prefix=${D}${prefix} \
22 BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
23 install
24}
25
26BBCLASSEXTEND = "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 0000000000..1e961101bc
--- /dev/null
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -0,0 +1,15 @@
1require zip.inc
2
3PR="r2"
4
5# zip-2.32 still uses directory name of zip-2.30
6S = "${WORKDIR}/zip30"
7
8SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
9SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
10
11# zip.inc sets CFLAGS, but what Makefile actually uses is
12# CFLAGS_NOOPT. It will also force -O3 optimization, overriding
13# whatever we set.
14#
15EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'"