From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-extended/at/at/atd.init | 45 + meta/recipes-extended/at/at/atd.service | 9 + .../at/at/configure-add-enable-pam.patch | 25 + .../at/at/file_replacement_with_gplv2.patch | 30 + .../at/at/fix_parallel_build_error.patch | 28 + meta/recipes-extended/at/at/pam.conf.patch | 27 + meta/recipes-extended/at/at/posixtm.c | 328 +++++ meta/recipes-extended/at/at/posixtm.h | 37 + meta/recipes-extended/at/at_3.1.15.bb | 67 + meta/recipes-extended/augeas/augeas.inc | 32 + .../augeas/add-missing-argz-conditional.patch | 20 + .../augeas/augeas/sepbuildfix.patch | 22 + meta/recipes-extended/augeas/augeas_1.2.0.bb | 5 + .../bash/bash-3.2.48/build-tests.patch | 44 + .../bash-3.2.48/mkbuiltins_have_stringize.patch | 29 + meta/recipes-extended/bash/bash-3.2.48/run-ptest | 2 + .../bash/bash-3.2.48/test-output.patch | 25 + meta/recipes-extended/bash/bash.inc | 58 + meta/recipes-extended/bash/bash/build-tests.patch | 55 + meta/recipes-extended/bash/bash/execute_cmd.patch | 17 + .../bash/bash/mkbuiltins_have_stringize.patch | 26 + meta/recipes-extended/bash/bash/run-ptest | 2 + meta/recipes-extended/bash/bash/test-output.patch | 25 + meta/recipes-extended/bash/bash_3.2.48.bb | 43 + meta/recipes-extended/bash/bash_4.3.bb | 109 ++ meta/recipes-extended/bc/bc_1.06.bb | 26 + .../bc/files/fix-segment-fault.patch | 28 + meta/recipes-extended/blktool/blktool_4-6.1.bb | 24 + meta/recipes-extended/byacc/byacc.inc | 19 + meta/recipes-extended/byacc/byacc_20140422.bb | 11 + .../recipes-extended/bzip2/bzip2-1.0.6/Makefile.am | 71 ++ .../bzip2/bzip2-1.0.6/configure.ac | 14 + meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest | 2 + meta/recipes-extended/bzip2/bzip2_1.0.6.bb | 54 + .../chkconfig-alternatives-native_1.3.59.bb | 43 + .../recipes-extended/chkconfig/chkconfig_1.3.58.bb | 63 + .../cpio/cpio-2.11/cpio-CVE-2015-1197.patch | 154 +++ .../cpio/cpio-2.11/fix-memory-overrun.patch | 220 ++++ .../cpio/cpio-2.11/remove-gets.patch | 20 + meta/recipes-extended/cpio/cpio-2.11/statdef.patch | 17 + .../cpio/cpio-2.8/avoid_heap_overflow.patch | 25 + .../cpio/cpio-2.8/fix-memory-overrun.patch | 217 ++++ .../cpio/cpio-2.8/m4extensions.patch | 31 + meta/recipes-extended/cpio/cpio-2.8/statdef.patch | 15 + meta/recipes-extended/cpio/cpio_2.11.bb | 14 + meta/recipes-extended/cpio/cpio_2.8.bb | 17 + meta/recipes-extended/cpio/cpio_v2.inc | 40 + ...c-support-dictionary-byte-order-dependent.patch | 332 +++++ ...02-craklib-fix-testnum-and-teststr-failed.patch | 53 + meta/recipes-extended/cracklib/cracklib_2.9.1.bb | 25 + meta/recipes-extended/cronie/cronie/crond.init | 58 + meta/recipes-extended/cronie/cronie/crond.service | 11 + .../cronie/cronie/crond_pam_config.patch | 19 + meta/recipes-extended/cronie/cronie/crontab | 10 + .../cronie/cronie/fix-out-of-tree-build.patch | 31 + meta/recipes-extended/cronie/cronie_1.4.11.bb | 85 ++ meta/recipes-extended/cups/cups.inc | 136 ++ .../0001-don-t-try-to-run-generated-binaries.patch | 70 ++ .../cups/cups/cups-no-gcrypt.patch | 49 + meta/recipes-extended/cups/cups/cups.path | 8 + meta/recipes-extended/cups/cups/cups.service | 10 + meta/recipes-extended/cups/cups/cups.socket | 8 + .../cups/cups/cups_serverbin.patch | 32 + .../cups/cups/use_echo_only_in_init.patch | 15 + meta/recipes-extended/cups/cups_1.7.5.bb | 6 + .../cwautomacros/cwautomacros_20110201.bb | 19 + .../diffutils_fix_for_automake-1.12.patch | 27 + .../diffutils/diffutils-3.3/run-ptest | 3 + meta/recipes-extended/diffutils/diffutils.inc | 18 + meta/recipes-extended/diffutils/diffutils_2.8.1.bb | 16 + meta/recipes-extended/diffutils/diffutils_3.3.bb | 34 + meta/recipes-extended/ed/ed_0.5.bb | 21 + meta/recipes-extended/ed/ed_1.9.bb | 31 + .../ethtool/ethtool/avoid_parallel_tests.patch | 19 + .../ethtool/ethtool/ethtool-uint.patch | 50 + meta/recipes-extended/ethtool/ethtool/run-ptest | 2 + meta/recipes-extended/ethtool/ethtool_3.15.bb | 31 + .../findutils-fix-doc-build-error.patch | 53 + .../findutils_fix_for_automake-1.12.patch | 23 + .../findutils-4.2.31/gnulib-extension.patch | 56 + .../findutils/findutils-4.4.2/01-27017.patch | 781 ++++++++++++ .../findutils/findutils-4.4.2/02-28824.patch | 294 +++++ .../findutils/findutils-4.4.2/03-28872.patch | 58 + .../findutils-4.4.2/findutils_fix_doc.patch | 84 ++ .../findutils_fix_for_automake-1.12.patch | 22 + .../findutils-4.4.2/findutils_fix_for_x32.patch | 40 + meta/recipes-extended/findutils/findutils.inc | 24 + .../recipes-extended/findutils/findutils_4.2.31.bb | 13 + meta/recipes-extended/findutils/findutils_4.4.2.bb | 25 + .../foomatic/foomatic-filters_4.0.17.bb | 37 + .../gamin-0.1.10/obsolete_automake_macros.patch | 23 + .../gamin/gamin/no-abstract-sockets.patch | 56 + meta/recipes-extended/gamin/gamin/noconst.patch | 59 + meta/recipes-extended/gamin/gamin_0.1.10.bb | 36 + .../gawk-3.1.5_fix_for_automake-1.12.patch | 41 + .../gawk/gawk-4.0.2/fflash.sh-awk-variable.patch | 33 + .../recipes-extended/gawk/gawk-4.0.2/run-ptest.awk | 32 + ...-in-extension-Makefile.am-when-removing-..patch | 56 + ...dd-DESTDIR-prefix-to-remaining-pkgextensi.patch | 86 ++ meta/recipes-extended/gawk/gawk-4.1.1/run-ptest | 10 + meta/recipes-extended/gawk/gawk_3.1.5.bb | 42 + meta/recipes-extended/gawk/gawk_4.1.1.bb | 49 + .../ghostscript/ghostscript/aarch64/objarch.h | 40 + .../ghostscript/ghostscript/arm/objarch.h | 40 + ...c-add-a-preprocessor-define-to-allow-fope.patch | 36 + .../ghostscript/ghostscript/cups-no-gcrypt.patch | 28 + .../ghostscript/ghostscript-9.02-genarch.patch | 28 + .../ghostscript-9.02-parallel-make.patch | 929 ++++++++++++++ .../ghostscript-9.02-prevent_recompiling.patch | 96 ++ ...tscript-native-fix-disable-system-libtiff.patch | 37 + .../ghostscript/ghostscript/i586/objarch.h | 41 + meta/recipes-extended/ghostscript/ghostscript/i686 | 1 + .../ghostscript/ghostscript/mips/objarch.h | 40 + .../ghostscript/ghostscript/mips64/objarch.h | 40 + .../ghostscript/ghostscript/mips64el/objarch.h | 40 + .../ghostscript/ghostscript/mips64eln32/objarch.h | 40 + .../ghostscript/ghostscript/mips64n32/objarch.h | 40 + .../ghostscript/ghostscript/mipsel/objarch.h | 40 + .../ghostscript/ghostscript/powerpc/objarch.h | 40 + .../ghostscript/ghostscript/powerpc64/objarch.h | 40 + .../ghostscript/ghostscript/x86-64/objarch.h | 40 + .../ghostscript/ghostscript_9.14.bb | 106 ++ meta/recipes-extended/gperf/gperf.inc | 22 + meta/recipes-extended/gperf/gperf_3.0.3.bb | 10 + meta/recipes-extended/gperf/gperf_3.0.4.bb | 5 + .../grep/grep-2.19/grep2.19-CVE-2015-1345.patch | 129 ++ meta/recipes-extended/grep/grep-2.5.1a/Makevars | 25 + .../grep/grep-2.5.1a/fix-for-texinfo-5.1.patch | 17 + .../grep/grep-2.5.1a/fix64-int-to-pointer.patch | 17 + .../grep/grep-2.5.1a/gettext.patch | 15 + .../grep/grep-2.5.1a/grep-CVE-2012-5667.patch | 32 + .../grep-2.5.1a/grep_fix_for_automake-1.12.patch | 52 + .../grep/grep-2.5.1a/uclibc-fix.patch | 55 + meta/recipes-extended/grep/grep_2.19.bb | 41 + meta/recipes-extended/grep/grep_2.5.1a.bb | 51 + .../groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch | 39 + .../groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch | 39 + .../groff/groff-1.18.1.4/man-local.patch | 36 + .../groff/groff-1.18.1.4/mdoc-local.patch | 36 + ...off-1.22.2-correct-man.local-install-path.patch | 32 + meta/recipes-extended/groff/groff_1.18.1.4.bb | 49 + meta/recipes-extended/groff/groff_1.22.2.bb | 68 + .../gzip/gzip-1.3.12/dup-def-fix.patch | 48 + .../gzip/gzip-1.3.12/m4-extensions-fix.patch | 56 + .../gzip/gzip-1.6/wrong-path-fix.patch | 31 + meta/recipes-extended/gzip/gzip.inc | 35 + meta/recipes-extended/gzip/gzip_1.3.12.bb | 40 + meta/recipes-extended/gzip/gzip_1.6.bb | 9 + meta/recipes-extended/hdparm/hdparm_9.43.bb | 36 + .../images/core-image-full-cmdline.bb | 12 + meta/recipes-extended/images/core-image-lsb-dev.bb | 7 + meta/recipes-extended/images/core-image-lsb-sdk.bb | 10 + meta/recipes-extended/images/core-image-lsb.bb | 14 + .../images/core-image-testmaster-initramfs.bb | 19 + .../images/core-image-testmaster.bb | 18 + ...Add-option-to-enable-disable-libnfnetlink.patch | 47 + ...d-defines-that-are-required-for-if_packet.patch | 49 + meta/recipes-extended/iptables/iptables_1.4.21.bb | 46 + .../iputils/files/debian/targets.diff | 15 + .../iputils/files/debian/use_gethostbyname2.diff | 31 + ...x-build-command-line-argument-with-gnutls.patch | 37 + .../iputils/files/nsgmls-path-fix.patch | 27 + meta/recipes-extended/iputils/iputils_s20121221.bb | 69 ++ meta/recipes-extended/less/less_466.bb | 39 + .../recipes-extended/libaio/libaio/00_arches.patch | 779 ++++++++++++ meta/recipes-extended/libaio/libaio/destdir.patch | 17 + .../libaio/libaio/libaio-aarch64.patch | 28 + .../libaio/libaio/libaio-generic.patch | 65 + .../libaio/libaio_fix_for_mips_syscalls.patch | 62 + .../libaio/libaio/libaio_fix_for_x32.patch | 61 + .../recipes-extended/libaio/libaio/toolchain.patch | 27 + meta/recipes-extended/libaio/libaio_0.3.109.bb | 31 + .../libarchive/libarchive-CVE-2013-0211.patch | 38 + .../libarchive/libarchive/pkgconfig.patch | 25 + .../libarchive/libarchive_3.1.2.bb | 51 + ..._MKDIR_P_warning_error_with_automake_1.12.patch | 25 + .../libidn/libidn/dont-depend-on-help2man.patch | 23 + .../libidn/libidn_fix_for_automake-1.12.patch | 26 + meta/recipes-extended/libidn/libidn_0.6.14.bb | 32 + meta/recipes-extended/libidn/libidn_1.29.bb | 34 + .../libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch | 26 + .../libtirpc/libtirpc/remove-des-uclibc.patch | 38 + meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb | 35 + .../libuser/libuser/fixsepbuild.patch | 35 + meta/recipes-extended/libuser/libuser_0.60.bb | 30 + .../lighttpd/lighttpd/index.html.lighttpd | 1 + meta/recipes-extended/lighttpd/lighttpd/lighttpd | 34 + .../lighttpd/lighttpd/lighttpd.conf | 331 +++++ .../lighttpd/lighttpd/lighttpd.service | 12 + .../lighttpd/lighttpd/pkgconfig.patch | 33 + meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb | 77 ++ .../logrotate/act-as-mv-when-rotate.patch | 134 ++ .../disable-check-different-filesystems.patch | 34 + .../logrotate/logrotate-CVE-2011-1548.patch | 43 + .../logrotate/logrotate/update-the-manual.patch | 32 + meta/recipes-extended/logrotate/logrotate_3.8.7.bb | 56 + meta/recipes-extended/lsb/lsb/init-functions | 44 + meta/recipes-extended/lsb/lsb/lsb_killproc | 6 + meta/recipes-extended/lsb/lsb/lsb_log_message | 27 + meta/recipes-extended/lsb/lsb/lsb_pidofproc | 6 + meta/recipes-extended/lsb/lsb/lsb_start_daemon | 45 + meta/recipes-extended/lsb/lsb_4.1.bb | 121 ++ .../lsb/lsbinitscripts/functions.patch | 26 + meta/recipes-extended/lsb/lsbinitscripts_9.55.bb | 30 + meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 526 ++++++++ meta/recipes-extended/lsb/lsbtest/packages_list | 51 + meta/recipes-extended/lsb/lsbtest/session | 194 +++ meta/recipes-extended/lsb/lsbtest_1.0.bb | 49 + meta/recipes-extended/lsof/lsof_4.87.bb | 53 + .../ltp/files/fix-test_proc_kill-hang.patch | 23 + .../ltp/files/periodic_output.patch | 31 + ...sts-Fix-bad-priority-inheritance-conditio.patch | 48 + ...ltime-tests-Fix-robust-mutex-conditionals.patch | 62 + ...tests_noltp.sh-script-so-have-unique-name.patch | 202 +++ .../ltp/ltp/add-knob-for-numa.patch | 39 + .../ltp/ltp/automake-foreign.patch | 20 + .../ltp/ltp/ltp-Do-not-link-against-libfl.patch | 31 + .../ltp/ltp/make-setregid02-work.patch | 61 + meta/recipes-extended/ltp/ltp_20140422.bb | 93 ++ .../explicitly.disable.krb5.support.patch | 46 + meta/recipes-extended/mailx/mailx_12.5.bb | 32 + meta/recipes-extended/man-pages/man-pages_3.71.bb | 36 + .../man/man/man-1.5g-nonrootbuild.patch | 16 + .../man/man/man-1.5h1-gencat.patch | 14 + meta/recipes-extended/man/man/man-1.5h1-make.patch | 17 + .../man/man/man-1.5i2-initial.patch | 19 + .../man/man/man-1.5i2-newline.patch | 15 + .../man/man/man-1.5i2-overflow.patch | 16 + meta/recipes-extended/man/man/man-1.5j-i18n.patch | 16 + .../man/man/man-1.5j-nocache.patch | 16 + meta/recipes-extended/man/man/man-1.5j-utf8.patch | 61 + .../man/man/man-1.5k-confpath.patch | 15 + .../man/man/man-1.5k-nonascii.patch | 18 + meta/recipes-extended/man/man/man-1.5k-sofix.patch | 24 + .../man/man/man-1.5m2-bug11621.patch | 15 + .../man/man/man-1.5m2-buildroot.patch | 52 + .../man/man/man-1.5m2-no-color-for-printing.patch | 15 + .../man/man/man-1.5m2-sigpipe.patch | 30 + .../man/man/man-1.5m2-tv_fhs.patch | 31 + .../man/man/man-1.6e-i18n_whatis.patch | 145 +++ .../man/man/man-1.6e-mandirs.patch | 31 + .../man/man/man-1.6e-new_sections.patch | 15 + .../recipes-extended/man/man/man-1.6e-ro_usr.patch | 33 + .../man/man/man-1.6e-security.patch | 62 + .../man/man-1.6e-use_i18n_vars_in_a_std_way.patch | 160 +++ .../man/man/man-1.6e-whatis2.patch | 52 + meta/recipes-extended/man/man/man.1.gz | Bin 0 -> 12323 bytes meta/recipes-extended/man/man/man.7.gz | Bin 0 -> 6192 bytes meta/recipes-extended/man/man/man.conf | 141 +++ meta/recipes-extended/man/man/manpath.5.gz | Bin 0 -> 2133 bytes meta/recipes-extended/man/man_1.6g.bb | 79 ++ meta/recipes-extended/mc/mc/mc-CTRL.patch | 31 + meta/recipes-extended/mc/mc_4.7.5.2.bb | 49 + meta/recipes-extended/mc/mc_4.8.12.bb | 53 + meta/recipes-extended/mdadm/files/gcc-4.9.patch | 22 + .../mdadm/files/mdadm-3.2.2_fix_for_x32.patch | 23 + meta/recipes-extended/mdadm/mdadm_3.3.1.bb | 46 + meta/recipes-extended/mingetty/mingetty_1.08.bb | 28 + ...001-fix-minicom-h-v-return-value-is-not-0.patch | 35 + .../minicom/minicom/allow.to.disable.lockdev.patch | 21 + meta/recipes-extended/minicom/minicom_2.7.bb | 25 + .../mktemp/files/disable-strip.patch | 15 + .../mktemp/files/fix-parallel-make.patch | 24 + meta/recipes-extended/mktemp/mktemp_1.7.bb | 30 + meta/recipes-extended/msmtp/msmtp_1.4.32.bb | 25 + ...terface-0-del-IP-will-remove-the-aliased-.patch | 32 + .../net-tools/net-tools/net-tools-config.h | 75 ++ .../net-tools/net-tools/net-tools-config.make | 36 + .../net-tools/net-tools_1.60-25.bb | 89 ++ meta/recipes-extended/newt/files/cross_ar.patch | 58 + .../newt/files/fix_SHAREDDIR.patch | 37 + .../newt/files/remove_slang_include.patch | 16 + .../newt/libnewt-python_0.52.17.bb | 27 + meta/recipes-extended/newt/libnewt_0.52.17.bb | 54 + .../packagegroup-core-full-cmdline.bb | 163 +++ .../packagegroups/packagegroup-core-lsb.bb | 266 ++++ meta/recipes-extended/pam/libpam/99_pam | 1 + .../add-checks-for-crypt-returning-NULL.patch | 63 + meta/recipes-extended/pam/libpam/destdirfix.patch | 24 + meta/recipes-extended/pam/libpam/fixsepbuild.patch | 24 + .../pam/libpam/libpam-fix-for-CVE-2010-4708.patch | 41 + .../libpam-xtests-remove-bash-dependency.patch | 226 ++++ .../pam/libpam/libpam-xtests.patch | 35 + .../pam/libpam/pam-no-innetgr.patch | 97 ++ .../pam-security-abstract-securetty-handling.patch | 200 +++ .../pam/libpam/pam-unix-nullok-secure.patch | 222 ++++ .../pam/libpam/pam.d/common-account | 25 + meta/recipes-extended/pam/libpam/pam.d/common-auth | 18 + .../pam/libpam/pam.d/common-password | 26 + .../pam/libpam/pam.d/common-session | 19 + .../pam/libpam/pam.d/common-session-noninteractive | 19 + meta/recipes-extended/pam/libpam/pam.d/other | 24 + ...mp-fix-potential-directory-traversal-issu.patch | 63 + ...-enforce_for_root-semantics-change-in-pam.patch | 35 + meta/recipes-extended/pam/libpam_1.1.6.bb | 165 +++ meta/recipes-extended/parted/parted-3.1/Makefile | 285 +++++ .../parted-3.1/fix-deprecated-readline.patch | 34 + .../parted/parted-3.1/fix-doc-mandir.patch | 20 + .../parted/parted-3.1/fix-dvh-overflows.patch | 35 + .../parted/parted-3.1/fix-git-version-gen.patch | 43 + .../parted/parted-3.1/no_check.patch | 20 + meta/recipes-extended/parted/parted-3.1/run-ptest | 3 + .../parted/parted-3.1/syscalls.patch | 55 + meta/recipes-extended/parted/parted_3.1.bb | 45 + .../pax/pax/fix_for_compile_with_gcc-4.6.0.patch | 25 + .../pax/pax/pax-3.4_fix_for_x32.patch | 185 +++ meta/recipes-extended/pax/pax_3.4.bb | 22 + .../perl/libconvert-asn1-perl_0.27.bb | 17 + .../recipes-extended/perl/libtimedate-perl_2.30.bb | 19 + .../perl/libxml-namespacesupport-perl_1.11.bb | 22 + .../perl/libxml-sax-base-perl_1.08.bb | 23 + meta/recipes-extended/perl/libxml-sax-perl_0.99.bb | 27 + meta/recipes-extended/pigz/pigz.inc | 32 + meta/recipes-extended/pigz/pigz_2.3.1.bb | 10 + .../procps-3.2.8/0001-Fix-musl-build-failure.patch | 29 + .../procps-3.2.8/60_linux_version_init.patch | 54 + .../procps/procps-3.2.8/detect_bitness.patch | 26 + .../procps/procps-3.2.8/gnu-kbsd-version.patch | 44 + .../procps/procps-3.2.8/install.patch | 39 + .../procps/procps-3.2.8/linux-limits.patch | 15 + .../procps/procps-3.2.8/procmodule.patch | 38 + .../procps-3.2.8/procps-3.2.7-top-remcpu.patch | 111 ++ .../procps-3.2.8/procps-3.2.8+gmake-3.82.patch | 19 + .../procps-3.2.8/procps-3.2.8-ps-cgroup.patch | 82 ++ .../procps/procps-3.2.8/psmodule.patch | 23 + .../procps/procps-3.2.8/sysctl.conf | 64 + meta/recipes-extended/procps/procps.inc | 31 + meta/recipes-extended/procps/procps_3.2.8.bb | 42 + ...001-Typo-in-fuser-makes-M-on-all-the-time.patch | 46 + .../files/0002-Include-limits.h-for-PATH_MAX.patch | 29 + meta/recipes-extended/psmisc/psmisc.inc | 44 + meta/recipes-extended/psmisc/psmisc_22.21.bb | 10 + .../quota/quota/config-tcpwrappers.patch | 75 ++ meta/recipes-extended/quota/quota_4.01.bb | 30 + ...bind-rpcuser-not-being-set-in-Makefile.am.patch | 34 + .../rpcbind/rpcbind/0001-uclibc-nss.patch | 30 + .../rpcbind/0002-uclibc-rpcsvc-defines.patch | 60 + meta/recipes-extended/rpcbind/rpcbind/init.d | 87 ++ meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf | 3 + .../rpcbind/rpcbind/rpcbind.service | 12 + .../rpcbind/rpcbind/rpcbind.socket | 8 + meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb | 64 + .../screen/screen-4.0.3/configure.patch | 979 +++++++++++++++ .../screen/screen-4.0.3/fix-parallel-make.patch | 19 + .../screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch | 27 + .../screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch | 86 ++ .../screen/screen-4.0.3/screen.pam | 2 + meta/recipes-extended/screen/screen_4.0.3.bb | 52 + meta/recipes-extended/sed/sed-4.1.2/Makevars | 25 + .../sed/sed-4.1.2/fix_return_type.patch | 18 + .../sed-4.1.2_fix_for_automake-1.12.patch | 37 + meta/recipes-extended/sed/sed-4.2.2/run-ptest | 3 + .../sed/sed-4.2.2/sed-add-ptest.patch | 66 + meta/recipes-extended/sed/sed_4.1.2.bb | 34 + meta/recipes-extended/sed/sed_4.2.2.bb | 43 + ...o-not-read-login.defs-before-doing-chroot.patch | 46 + .../0001-su.c-fix-to-exec-command-correctly.patch | 25 + ...-create-parent-directories-when-necessary.patch | 109 ++ .../allow-for-setting-password-in-clear-text.patch | 201 +++ ..._of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch | 41 + ...fix-unexpected-open-failure-in-chroot-env.patch | 46 + .../shadow/files/disable-syslog.patch | 34 + ...installation-failure-with-subids-disabled.patch | 28 + .../shadow/files/login.defs_shadow-sysroot | 386 ++++++ .../shadow/files/login_defs_pam.sed | 32 + meta/recipes-extended/shadow/files/pam.d/chfn | 14 + meta/recipes-extended/shadow/files/pam.d/chpasswd | 4 + meta/recipes-extended/shadow/files/pam.d/chsh | 19 + meta/recipes-extended/shadow/files/pam.d/login | 81 ++ meta/recipes-extended/shadow/files/pam.d/newusers | 4 + meta/recipes-extended/shadow/files/pam.d/passwd | 5 + meta/recipes-extended/shadow/files/pam.d/su | 57 + meta/recipes-extended/shadow/files/securetty | 234 ++++ .../files/shadow-4.1.3-dots-in-usernames.patch | 27 + .../shadow/files/shadow-update-pam-conf.patch | 91 ++ ...-compilation-failure-with-subids-disabled.patch | 33 + .../shadow/shadow-securetty_4.2.1.bb | 36 + .../shadow/shadow-sysroot_4.2.1.bb | 34 + meta/recipes-extended/shadow/shadow.inc | 176 +++ meta/recipes-extended/shadow/shadow_4.2.1.bb | 10 + ...change-char-type-to-signed-char-in-macros.patch | 218 ++++ .../slang/slang/fix-check-pcre.patch | 108 ++ meta/recipes-extended/slang/slang/rpathfix.patch | 70 ++ .../slang-fix-the-iconv-existence-checking.patch | 116 ++ .../sprintf-bug-concerning-8-bit-characters.patch | 42 + meta/recipes-extended/slang/slang_2.2.4.bb | 49 + .../stat/stat-3.3/fix-error-return.patch | 16 + meta/recipes-extended/stat/stat_3.3.bb | 28 + meta/recipes-extended/sudo/files/sudo.pam | 6 + meta/recipes-extended/sudo/sudo.inc | 43 + meta/recipes-extended/sudo/sudo_1.8.10p3.bb | 27 + .../sysklogd/files/no-strip-install.patch | 17 + .../sysklogd/files/no-vectorization.patch | 20 + meta/recipes-extended/sysklogd/files/sysklogd | 151 +++ meta/recipes-extended/sysklogd/files/syslog.conf | 71 ++ meta/recipes-extended/sysklogd/sysklogd.inc | 58 + meta/recipes-extended/sysklogd/sysklogd_1.5.bb | 5 + meta/recipes-extended/sysstat/sysstat.inc | 44 + meta/recipes-extended/sysstat/sysstat/99_sysstat | 1 + meta/recipes-extended/sysstat/sysstat_10.2.1.bb | 6 + .../tar/tar-1.17/avoid_heap_overflow.patch | 22 + .../recipes-extended/tar/tar-1.17/gcc43build.patch | 37 + .../tar/tar-1.17/m4extensions.patch | 30 + .../tar/tar-replacement-native_1.27.1.bb | 6 + meta/recipes-extended/tar/tar.inc | 45 + meta/recipes-extended/tar/tar/remove-gets.patch | 22 + meta/recipes-extended/tar/tar_1.17.bb | 14 + meta/recipes-extended/tar/tar_1.27.1.bb | 10 + .../tcp-wrappers-7.6/00_man_quoting.diff | 77 ++ .../tcp-wrappers-7.6/01_man_portability.patch | 250 ++++ .../tcp-wrappers-7.6/05_wildcard_matching.patch | 105 ++ .../tcp-wrappers-7.6/06_fix_gethostbyname.patch | 32 + .../tcp-wrappers-7.6/10_usagi-ipv6.patch | 1255 +++++++++++++++++++ .../tcp-wrappers-7.6/11_tcpd_blacklist.patch | 153 +++ .../tcp-wrappers-7.6/11_usagi_fix.patch | 47 + .../tcp-wrappers-7.6/12_makefile_config.patch | 83 ++ .../tcp-wrappers-7.6/13_shlib_weaksym.patch | 255 ++++ .../tcp-wrappers-7.6/14_cidr_support.patch | 68 + .../tcp-wrappers-7.6/15_match_clarify.patch | 14 + .../tcp-wrappers-7.6/expand_remote_port.patch | 73 ++ .../tcp-wrappers-7.6/have_strerror.patch | 21 + .../tcp-wrappers/tcp-wrappers-7.6/ldflags.patch | 45 + .../tcp-wrappers-7.6/man_fromhost.patch | 23 + .../tcp-wrappers-7.6/rename_strings_variable.patch | 35 + .../tcp-wrappers-7.6/restore_sigalarm.patch | 39 + .../tcp-wrappers/tcp-wrappers-7.6/rfc931.diff | 41 + .../tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 | 34 + .../tcp-wrappers-7.6/safe_finger.patch | 31 + .../tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch | 36 + .../tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch | 32 + .../tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch | 59 + .../tcp-wrappers-7.6/tcpdchk_libwrapped.patch | 41 + .../tcp-wrappers/tcp-wrappers-7.6/try-from.8 | 28 + .../tcp-wrappers/tcp-wrappers_7.6.bb | 128 ++ .../texi2html-5.0/fix_gettext_version.patch | 31 + meta/recipes-extended/texi2html/texi2html_5.0.bb | 33 + .../texinfo-dummy-native/texinfo-dummy-native.bb | 30 + .../texinfo-dummy-native/texinfo-dummy/COPYING | 19 + .../texinfo-dummy-native/texinfo-dummy/template.py | 122 ++ .../texinfo/texinfo/disable-native-tools.patch | 43 + .../texinfo/texinfo/dont-depend-on-help2man.patch | 49 + .../texinfo/enumerate_greater_than_ten.patch | 51 + .../texinfo/texinfo/link-zip.patch | 16 + .../texinfo/texinfo/texinfo-4.12-zlib.patch | 187 +++ .../texinfo/texinfo/texinfo-4.13a-powerpc.patch | 14 + .../texinfo/texinfo/use_host_makedoc.patch | 17 + meta/recipes-extended/texinfo/texinfo_5.2.bb | 77 ++ meta/recipes-extended/time/time-1.7/debian.patch | 1301 ++++++++++++++++++++ meta/recipes-extended/time/time.inc | 12 + meta/recipes-extended/time/time_1.7.bb | 11 + meta/recipes-extended/tzcode/tzcode-native.inc | 15 + .../recipes-extended/tzcode/tzcode-native_2014h.bb | 11 + .../recipes-extended/tzcode/tzcode-native_2015b.bb | 10 + meta/recipes-extended/tzdata/tzdata.inc | 200 +++ meta/recipes-extended/tzdata/tzdata_2014h.bb | 6 + meta/recipes-extended/tzdata/tzdata_2015b.bb | 6 + .../06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch | 402 ++++++ .../unzip/09-cve-2014-8139-crc-overflow.patch | 52 + .../unzip/10-cve-2014-8140-test-compr-eb.patch | 33 + .../unzip/11-cve-2014-8141-getzip64data.patch | 144 +++ .../recipes-extended/unzip/unzip/avoid-strip.patch | 50 + .../unzip/unzip/define-ldflags.patch | 18 + .../unzip/unzip/unzip-6.0_overflow3.diff | 45 + meta/recipes-extended/unzip/unzip_6.0.bb | 44 + .../watchdog/files/fix-ping-failure.patch | 65 + .../watchdog/files/fixsepbuild.patch | 27 + meta/recipes-extended/watchdog/watchdog_5.13.bb | 19 + .../wget/wget-1.15/wget_cve-2014-4877.patch | 78 ++ meta/recipes-extended/wget/wget.inc | 23 + meta/recipes-extended/wget/wget/fix_makefile.patch | 33 + meta/recipes-extended/wget/wget_1.15.bb | 8 + .../which/which-2.18/automake-foreign.patch | 27 + .../fix_name_conflict_group_member.patch | 53 + .../which/which-2.20/automake.patch | 10 + .../which/which-2.20/remove-declaration.patch | 18 + meta/recipes-extended/which/which_2.18.bb | 34 + meta/recipes-extended/which/which_2.20.bb | 32 + .../xdg-utils/0001-Reinstate-xdg-terminal.patch | 672 ++++++++++ .../xdg-utils/xdg-utils_1.1.0-rc1.bb | 29 + ...vices-from-inetd.conf-if-a-service-with-t.patch | 86 ++ ...arious-fixes-from-the-previous-maintainer.patch | 79 ++ .../xinetd/xinetd/xinetd-CVE-2013-4342.patch | 32 + ...uld-be-able-to-listen-on-IPv6-even-in-ine.patch | 112 ++ meta/recipes-extended/xinetd/xinetd/xinetd.conf | 11 + meta/recipes-extended/xinetd/xinetd/xinetd.default | 12 + meta/recipes-extended/xinetd/xinetd/xinetd.init | 64 + meta/recipes-extended/xinetd/xinetd_2.3.15.bb | 57 + meta/recipes-extended/xz/xz_5.1.3alpha.bb | 42 + meta/recipes-extended/zip/zip.inc | 26 + meta/recipes-extended/zip/zip_3.0.bb | 15 + 490 files changed, 30831 insertions(+) create mode 100644 meta/recipes-extended/at/at/atd.init create mode 100644 meta/recipes-extended/at/at/atd.service create mode 100644 meta/recipes-extended/at/at/configure-add-enable-pam.patch create mode 100644 meta/recipes-extended/at/at/file_replacement_with_gplv2.patch create mode 100644 meta/recipes-extended/at/at/fix_parallel_build_error.patch create mode 100644 meta/recipes-extended/at/at/pam.conf.patch create mode 100644 meta/recipes-extended/at/at/posixtm.c create mode 100644 meta/recipes-extended/at/at/posixtm.h create mode 100644 meta/recipes-extended/at/at_3.1.15.bb create mode 100644 meta/recipes-extended/augeas/augeas.inc create mode 100644 meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch create mode 100644 meta/recipes-extended/augeas/augeas/sepbuildfix.patch create mode 100644 meta/recipes-extended/augeas/augeas_1.2.0.bb create mode 100644 meta/recipes-extended/bash/bash-3.2.48/build-tests.patch create mode 100644 meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch create mode 100644 meta/recipes-extended/bash/bash-3.2.48/run-ptest create mode 100644 meta/recipes-extended/bash/bash-3.2.48/test-output.patch create mode 100644 meta/recipes-extended/bash/bash.inc create mode 100644 meta/recipes-extended/bash/bash/build-tests.patch create mode 100644 meta/recipes-extended/bash/bash/execute_cmd.patch create mode 100644 meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch create mode 100644 meta/recipes-extended/bash/bash/run-ptest create mode 100644 meta/recipes-extended/bash/bash/test-output.patch create mode 100644 meta/recipes-extended/bash/bash_3.2.48.bb create mode 100644 meta/recipes-extended/bash/bash_4.3.bb create mode 100644 meta/recipes-extended/bc/bc_1.06.bb create mode 100644 meta/recipes-extended/bc/files/fix-segment-fault.patch create mode 100644 meta/recipes-extended/blktool/blktool_4-6.1.bb create mode 100644 meta/recipes-extended/byacc/byacc.inc create mode 100644 meta/recipes-extended/byacc/byacc_20140422.bb create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac create mode 100644 meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest create mode 100644 meta/recipes-extended/bzip2/bzip2_1.0.6.bb create mode 100644 meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb create mode 100644 meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb create mode 100644 meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.11/statdef.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.8/statdef.patch create mode 100644 meta/recipes-extended/cpio/cpio_2.11.bb create mode 100644 meta/recipes-extended/cpio/cpio_2.8.bb create mode 100644 meta/recipes-extended/cpio/cpio_v2.inc create mode 100644 meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch create mode 100644 meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch create mode 100644 meta/recipes-extended/cracklib/cracklib_2.9.1.bb create mode 100755 meta/recipes-extended/cronie/cronie/crond.init create mode 100644 meta/recipes-extended/cronie/cronie/crond.service create mode 100644 meta/recipes-extended/cronie/cronie/crond_pam_config.patch create mode 100644 meta/recipes-extended/cronie/cronie/crontab create mode 100644 meta/recipes-extended/cronie/cronie/fix-out-of-tree-build.patch create mode 100644 meta/recipes-extended/cronie/cronie_1.4.11.bb create mode 100644 meta/recipes-extended/cups/cups.inc create mode 100644 meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch create mode 100644 meta/recipes-extended/cups/cups/cups-no-gcrypt.patch create mode 100644 meta/recipes-extended/cups/cups/cups.path create mode 100644 meta/recipes-extended/cups/cups/cups.service create mode 100644 meta/recipes-extended/cups/cups/cups.socket create mode 100644 meta/recipes-extended/cups/cups/cups_serverbin.patch create mode 100644 meta/recipes-extended/cups/cups/use_echo_only_in_init.patch create mode 100644 meta/recipes-extended/cups/cups_1.7.5.bb create mode 100644 meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb create mode 100644 meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/diffutils/diffutils-3.3/run-ptest create mode 100644 meta/recipes-extended/diffutils/diffutils.inc create mode 100644 meta/recipes-extended/diffutils/diffutils_2.8.1.bb create mode 100644 meta/recipes-extended/diffutils/diffutils_3.3.bb create mode 100644 meta/recipes-extended/ed/ed_0.5.bb create mode 100644 meta/recipes-extended/ed/ed_1.9.bb create mode 100644 meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch create mode 100644 meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch create mode 100644 meta/recipes-extended/ethtool/ethtool/run-ptest create mode 100644 meta/recipes-extended/ethtool/ethtool_3.15.bb create mode 100644 meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_doc.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_for_x32.patch create mode 100644 meta/recipes-extended/findutils/findutils.inc create mode 100644 meta/recipes-extended/findutils/findutils_4.2.31.bb create mode 100644 meta/recipes-extended/findutils/findutils_4.4.2.bb create mode 100644 meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb create mode 100644 meta/recipes-extended/gamin/gamin-0.1.10/obsolete_automake_macros.patch create mode 100644 meta/recipes-extended/gamin/gamin/no-abstract-sockets.patch create mode 100644 meta/recipes-extended/gamin/gamin/noconst.patch create mode 100644 meta/recipes-extended/gamin/gamin_0.1.10.bb create mode 100644 meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/gawk/gawk-4.0.2/fflash.sh-awk-variable.patch create mode 100644 meta/recipes-extended/gawk/gawk-4.0.2/run-ptest.awk create mode 100644 meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch create mode 100644 meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch create mode 100644 meta/recipes-extended/gawk/gawk-4.1.1/run-ptest create mode 100644 meta/recipes-extended/gawk/gawk_3.1.5.bb create mode 100644 meta/recipes-extended/gawk/gawk_4.1.1.bb create mode 100644 meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch create mode 100644 meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h create mode 120000 meta/recipes-extended/ghostscript/ghostscript/i686 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h create mode 100644 meta/recipes-extended/ghostscript/ghostscript_9.14.bb create mode 100644 meta/recipes-extended/gperf/gperf.inc create mode 100644 meta/recipes-extended/gperf/gperf_3.0.3.bb create mode 100644 meta/recipes-extended/gperf/gperf_3.0.4.bb create mode 100644 meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/Makevars create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/gettext.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch create mode 100644 meta/recipes-extended/grep/grep_2.19.bb create mode 100644 meta/recipes-extended/grep/grep_2.5.1a.bb create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch create mode 100644 meta/recipes-extended/groff/groff-1.22.2/groff-1.22.2-correct-man.local-install-path.patch create mode 100644 meta/recipes-extended/groff/groff_1.18.1.4.bb create mode 100644 meta/recipes-extended/groff/groff_1.22.2.bb create mode 100644 meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch create mode 100644 meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch create mode 100644 meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch create mode 100644 meta/recipes-extended/gzip/gzip.inc create mode 100644 meta/recipes-extended/gzip/gzip_1.3.12.bb create mode 100644 meta/recipes-extended/gzip/gzip_1.6.bb create mode 100644 meta/recipes-extended/hdparm/hdparm_9.43.bb create mode 100644 meta/recipes-extended/images/core-image-full-cmdline.bb create mode 100644 meta/recipes-extended/images/core-image-lsb-dev.bb create mode 100644 meta/recipes-extended/images/core-image-lsb-sdk.bb create mode 100644 meta/recipes-extended/images/core-image-lsb.bb create mode 100644 meta/recipes-extended/images/core-image-testmaster-initramfs.bb create mode 100644 meta/recipes-extended/images/core-image-testmaster.bb create mode 100644 meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch create mode 100644 meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch create mode 100644 meta/recipes-extended/iptables/iptables_1.4.21.bb create mode 100644 meta/recipes-extended/iputils/files/debian/targets.diff create mode 100644 meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff create mode 100644 meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch create mode 100644 meta/recipes-extended/iputils/files/nsgmls-path-fix.patch create mode 100644 meta/recipes-extended/iputils/iputils_s20121221.bb create mode 100644 meta/recipes-extended/less/less_466.bb create mode 100644 meta/recipes-extended/libaio/libaio/00_arches.patch create mode 100644 meta/recipes-extended/libaio/libaio/destdir.patch create mode 100644 meta/recipes-extended/libaio/libaio/libaio-aarch64.patch create mode 100644 meta/recipes-extended/libaio/libaio/libaio-generic.patch create mode 100644 meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch create mode 100644 meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch create mode 100644 meta/recipes-extended/libaio/libaio/toolchain.patch create mode 100644 meta/recipes-extended/libaio/libaio_0.3.109.bb create mode 100644 meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch create mode 100644 meta/recipes-extended/libarchive/libarchive/pkgconfig.patch create mode 100644 meta/recipes-extended/libarchive/libarchive_3.1.2.bb create mode 100644 meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch create mode 100644 meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch create mode 100644 meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/libidn/libidn_0.6.14.bb create mode 100644 meta/recipes-extended/libidn/libidn_1.29.bb create mode 100644 meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch create mode 100644 meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch create mode 100644 meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb create mode 100644 meta/recipes-extended/libuser/libuser/fixsepbuild.patch create mode 100644 meta/recipes-extended/libuser/libuser_0.60.bb create mode 100644 meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd create mode 100644 meta/recipes-extended/lighttpd/lighttpd/lighttpd create mode 100644 meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf create mode 100644 meta/recipes-extended/lighttpd/lighttpd/lighttpd.service create mode 100644 meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch create mode 100644 meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb create mode 100644 meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch create mode 100644 meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch create mode 100644 meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch create mode 100644 meta/recipes-extended/logrotate/logrotate/update-the-manual.patch create mode 100644 meta/recipes-extended/logrotate/logrotate_3.8.7.bb create mode 100755 meta/recipes-extended/lsb/lsb/init-functions create mode 100755 meta/recipes-extended/lsb/lsb/lsb_killproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_log_message create mode 100755 meta/recipes-extended/lsb/lsb/lsb_pidofproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon create mode 100644 meta/recipes-extended/lsb/lsb_4.1.bb create mode 100644 meta/recipes-extended/lsb/lsbinitscripts/functions.patch create mode 100644 meta/recipes-extended/lsb/lsbinitscripts_9.55.bb create mode 100644 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh create mode 100644 meta/recipes-extended/lsb/lsbtest/packages_list create mode 100644 meta/recipes-extended/lsb/lsbtest/session create mode 100644 meta/recipes-extended/lsb/lsbtest_1.0.bb create mode 100644 meta/recipes-extended/lsof/lsof_4.87.bb create mode 100644 meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch create mode 100644 meta/recipes-extended/ltp/files/periodic_output.patch create mode 100644 meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch create mode 100644 meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch create mode 100644 meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch create mode 100644 meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch create mode 100644 meta/recipes-extended/ltp/ltp/automake-foreign.patch create mode 100644 meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch create mode 100644 meta/recipes-extended/ltp/ltp/make-setregid02-work.patch create mode 100644 meta/recipes-extended/ltp/ltp_20140422.bb create mode 100644 meta/recipes-extended/mailx/mailx-12.5/explicitly.disable.krb5.support.patch create mode 100644 meta/recipes-extended/mailx/mailx_12.5.bb create mode 100644 meta/recipes-extended/man-pages/man-pages_3.71.bb create mode 100644 meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch create mode 100644 meta/recipes-extended/man/man/man-1.5h1-gencat.patch create mode 100644 meta/recipes-extended/man/man/man-1.5h1-make.patch create mode 100644 meta/recipes-extended/man/man/man-1.5i2-initial.patch create mode 100644 meta/recipes-extended/man/man/man-1.5i2-newline.patch create mode 100644 meta/recipes-extended/man/man/man-1.5i2-overflow.patch create mode 100644 meta/recipes-extended/man/man/man-1.5j-i18n.patch create mode 100644 meta/recipes-extended/man/man/man-1.5j-nocache.patch create mode 100644 meta/recipes-extended/man/man/man-1.5j-utf8.patch create mode 100644 meta/recipes-extended/man/man/man-1.5k-confpath.patch create mode 100644 meta/recipes-extended/man/man/man-1.5k-nonascii.patch create mode 100644 meta/recipes-extended/man/man/man-1.5k-sofix.patch create mode 100644 meta/recipes-extended/man/man/man-1.5m2-bug11621.patch create mode 100644 meta/recipes-extended/man/man/man-1.5m2-buildroot.patch create mode 100644 meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch create mode 100644 meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch create mode 100644 meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-mandirs.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-new_sections.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-ro_usr.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-security.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch create mode 100644 meta/recipes-extended/man/man/man-1.6e-whatis2.patch create mode 100644 meta/recipes-extended/man/man/man.1.gz create mode 100644 meta/recipes-extended/man/man/man.7.gz create mode 100644 meta/recipes-extended/man/man/man.conf create mode 100644 meta/recipes-extended/man/man/manpath.5.gz create mode 100644 meta/recipes-extended/man/man_1.6g.bb create mode 100644 meta/recipes-extended/mc/mc/mc-CTRL.patch create mode 100644 meta/recipes-extended/mc/mc_4.7.5.2.bb create mode 100644 meta/recipes-extended/mc/mc_4.8.12.bb create mode 100644 meta/recipes-extended/mdadm/files/gcc-4.9.patch create mode 100644 meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch create mode 100644 meta/recipes-extended/mdadm/mdadm_3.3.1.bb create mode 100644 meta/recipes-extended/mingetty/mingetty_1.08.bb create mode 100644 meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch create mode 100644 meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch create mode 100644 meta/recipes-extended/minicom/minicom_2.7.bb create mode 100644 meta/recipes-extended/mktemp/files/disable-strip.patch create mode 100644 meta/recipes-extended/mktemp/files/fix-parallel-make.patch create mode 100644 meta/recipes-extended/mktemp/mktemp_1.7.bb create mode 100644 meta/recipes-extended/msmtp/msmtp_1.4.32.bb create mode 100644 meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch create mode 100644 meta/recipes-extended/net-tools/net-tools/net-tools-config.h create mode 100644 meta/recipes-extended/net-tools/net-tools/net-tools-config.make create mode 100644 meta/recipes-extended/net-tools/net-tools_1.60-25.bb create mode 100644 meta/recipes-extended/newt/files/cross_ar.patch create mode 100644 meta/recipes-extended/newt/files/fix_SHAREDDIR.patch create mode 100644 meta/recipes-extended/newt/files/remove_slang_include.patch create mode 100644 meta/recipes-extended/newt/libnewt-python_0.52.17.bb create mode 100644 meta/recipes-extended/newt/libnewt_0.52.17.bb create mode 100644 meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb create mode 100644 meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb create mode 100644 meta/recipes-extended/pam/libpam/99_pam create mode 100644 meta/recipes-extended/pam/libpam/add-checks-for-crypt-returning-NULL.patch create mode 100644 meta/recipes-extended/pam/libpam/destdirfix.patch create mode 100644 meta/recipes-extended/pam/libpam/fixsepbuild.patch create mode 100644 meta/recipes-extended/pam/libpam/libpam-fix-for-CVE-2010-4708.patch create mode 100644 meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch create mode 100644 meta/recipes-extended/pam/libpam/libpam-xtests.patch create mode 100644 meta/recipes-extended/pam/libpam/pam-no-innetgr.patch create mode 100644 meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch create mode 100644 meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch create mode 100644 meta/recipes-extended/pam/libpam/pam.d/common-account create mode 100644 meta/recipes-extended/pam/libpam/pam.d/common-auth create mode 100644 meta/recipes-extended/pam/libpam/pam.d/common-password create mode 100644 meta/recipes-extended/pam/libpam/pam.d/common-session create mode 100644 meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive create mode 100644 meta/recipes-extended/pam/libpam/pam.d/other create mode 100644 meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch create mode 100644 meta/recipes-extended/pam/libpam/reflect-the-enforce_for_root-semantics-change-in-pam.patch create mode 100644 meta/recipes-extended/pam/libpam_1.1.6.bb create mode 100644 meta/recipes-extended/parted/parted-3.1/Makefile create mode 100644 meta/recipes-extended/parted/parted-3.1/fix-deprecated-readline.patch create mode 100644 meta/recipes-extended/parted/parted-3.1/fix-doc-mandir.patch create mode 100644 meta/recipes-extended/parted/parted-3.1/fix-dvh-overflows.patch create mode 100644 meta/recipes-extended/parted/parted-3.1/fix-git-version-gen.patch create mode 100644 meta/recipes-extended/parted/parted-3.1/no_check.patch create mode 100644 meta/recipes-extended/parted/parted-3.1/run-ptest create mode 100644 meta/recipes-extended/parted/parted-3.1/syscalls.patch create mode 100644 meta/recipes-extended/parted/parted_3.1.bb create mode 100644 meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch create mode 100644 meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch create mode 100644 meta/recipes-extended/pax/pax_3.4.bb create mode 100644 meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb create mode 100644 meta/recipes-extended/perl/libtimedate-perl_2.30.bb create mode 100644 meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb create mode 100644 meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb create mode 100644 meta/recipes-extended/perl/libxml-sax-perl_0.99.bb create mode 100644 meta/recipes-extended/pigz/pigz.inc create mode 100644 meta/recipes-extended/pigz/pigz_2.3.1.bb create mode 100644 meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/60_linux_version_init.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/gnu-kbsd-version.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/install.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/procmodule.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/procps-3.2.7-top-remcpu.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8+gmake-3.82.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/procps-3.2.8-ps-cgroup.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/psmodule.patch create mode 100644 meta/recipes-extended/procps/procps-3.2.8/sysctl.conf create mode 100644 meta/recipes-extended/procps/procps.inc create mode 100644 meta/recipes-extended/procps/procps_3.2.8.bb create mode 100644 meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch create mode 100644 meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch create mode 100644 meta/recipes-extended/psmisc/psmisc.inc create mode 100644 meta/recipes-extended/psmisc/psmisc_22.21.bb create mode 100644 meta/recipes-extended/quota/quota/config-tcpwrappers.patch create mode 100644 meta/recipes-extended/quota/quota_4.01.bb create mode 100644 meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch create mode 100644 meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch create mode 100644 meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch create mode 100644 meta/recipes-extended/rpcbind/rpcbind/init.d create mode 100644 meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf create mode 100644 meta/recipes-extended/rpcbind/rpcbind/rpcbind.service create mode 100644 meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket create mode 100644 meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb create mode 100644 meta/recipes-extended/screen/screen-4.0.3/configure.patch create mode 100644 meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch create mode 100644 meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch create mode 100644 meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch create mode 100644 meta/recipes-extended/screen/screen-4.0.3/screen.pam create mode 100644 meta/recipes-extended/screen/screen_4.0.3.bb create mode 100644 meta/recipes-extended/sed/sed-4.1.2/Makevars create mode 100644 meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch create mode 100644 meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch create mode 100644 meta/recipes-extended/sed/sed-4.2.2/run-ptest create mode 100644 meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch create mode 100644 meta/recipes-extended/sed/sed_4.1.2.bb create mode 100644 meta/recipes-extended/sed/sed_4.2.2.bb create mode 100644 meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch create mode 100644 meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch create mode 100644 meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch create mode 100644 meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch create mode 100644 meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch create mode 100644 meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch create mode 100644 meta/recipes-extended/shadow/files/disable-syslog.patch create mode 100644 meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch create mode 100644 meta/recipes-extended/shadow/files/login.defs_shadow-sysroot create mode 100644 meta/recipes-extended/shadow/files/login_defs_pam.sed create mode 100644 meta/recipes-extended/shadow/files/pam.d/chfn create mode 100644 meta/recipes-extended/shadow/files/pam.d/chpasswd create mode 100644 meta/recipes-extended/shadow/files/pam.d/chsh create mode 100644 meta/recipes-extended/shadow/files/pam.d/login create mode 100644 meta/recipes-extended/shadow/files/pam.d/newusers create mode 100644 meta/recipes-extended/shadow/files/pam.d/passwd create mode 100644 meta/recipes-extended/shadow/files/pam.d/su create mode 100644 meta/recipes-extended/shadow/files/securetty create mode 100644 meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch create mode 100644 meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch create mode 100644 meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch create mode 100644 meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb create mode 100644 meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb create mode 100644 meta/recipes-extended/shadow/shadow.inc create mode 100644 meta/recipes-extended/shadow/shadow_4.2.1.bb create mode 100644 meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch create mode 100644 meta/recipes-extended/slang/slang/fix-check-pcre.patch create mode 100644 meta/recipes-extended/slang/slang/rpathfix.patch create mode 100644 meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch create mode 100644 meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch create mode 100644 meta/recipes-extended/slang/slang_2.2.4.bb create mode 100644 meta/recipes-extended/stat/stat-3.3/fix-error-return.patch create mode 100644 meta/recipes-extended/stat/stat_3.3.bb create mode 100644 meta/recipes-extended/sudo/files/sudo.pam create mode 100644 meta/recipes-extended/sudo/sudo.inc create mode 100644 meta/recipes-extended/sudo/sudo_1.8.10p3.bb create mode 100644 meta/recipes-extended/sysklogd/files/no-strip-install.patch create mode 100644 meta/recipes-extended/sysklogd/files/no-vectorization.patch create mode 100755 meta/recipes-extended/sysklogd/files/sysklogd create mode 100644 meta/recipes-extended/sysklogd/files/syslog.conf create mode 100644 meta/recipes-extended/sysklogd/sysklogd.inc create mode 100644 meta/recipes-extended/sysklogd/sysklogd_1.5.bb create mode 100644 meta/recipes-extended/sysstat/sysstat.inc create mode 100644 meta/recipes-extended/sysstat/sysstat/99_sysstat create mode 100644 meta/recipes-extended/sysstat/sysstat_10.2.1.bb create mode 100644 meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch create mode 100644 meta/recipes-extended/tar/tar-1.17/gcc43build.patch create mode 100644 meta/recipes-extended/tar/tar-1.17/m4extensions.patch create mode 100644 meta/recipes-extended/tar/tar-replacement-native_1.27.1.bb create mode 100644 meta/recipes-extended/tar/tar.inc create mode 100644 meta/recipes-extended/tar/tar/remove-gets.patch create mode 100644 meta/recipes-extended/tar/tar_1.17.bb create mode 100644 meta/recipes-extended/tar/tar_1.27.1.bb create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb create mode 100644 meta/recipes-extended/texi2html/texi2html-5.0/fix_gettext_version.patch create mode 100644 meta/recipes-extended/texi2html/texi2html_5.0.bb create mode 100644 meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb create mode 100644 meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING create mode 100644 meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py create mode 100644 meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/enumerate_greater_than_ten.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/link-zip.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/texinfo-4.13a-powerpc.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch create mode 100644 meta/recipes-extended/texinfo/texinfo_5.2.bb create mode 100644 meta/recipes-extended/time/time-1.7/debian.patch create mode 100644 meta/recipes-extended/time/time.inc create mode 100644 meta/recipes-extended/time/time_1.7.bb create mode 100644 meta/recipes-extended/tzcode/tzcode-native.inc create mode 100644 meta/recipes-extended/tzcode/tzcode-native_2014h.bb create mode 100644 meta/recipes-extended/tzcode/tzcode-native_2015b.bb create mode 100644 meta/recipes-extended/tzdata/tzdata.inc create mode 100644 meta/recipes-extended/tzdata/tzdata_2014h.bb create mode 100644 meta/recipes-extended/tzdata/tzdata_2015b.bb create mode 100644 meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch create mode 100644 meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch create mode 100644 meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch create mode 100644 meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch create mode 100644 meta/recipes-extended/unzip/unzip/avoid-strip.patch create mode 100644 meta/recipes-extended/unzip/unzip/define-ldflags.patch create mode 100644 meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff create mode 100644 meta/recipes-extended/unzip/unzip_6.0.bb create mode 100644 meta/recipes-extended/watchdog/files/fix-ping-failure.patch create mode 100644 meta/recipes-extended/watchdog/files/fixsepbuild.patch create mode 100644 meta/recipes-extended/watchdog/watchdog_5.13.bb create mode 100644 meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch create mode 100644 meta/recipes-extended/wget/wget.inc create mode 100644 meta/recipes-extended/wget/wget/fix_makefile.patch create mode 100644 meta/recipes-extended/wget/wget_1.15.bb create mode 100644 meta/recipes-extended/which/which-2.18/automake-foreign.patch create mode 100644 meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch create mode 100644 meta/recipes-extended/which/which-2.20/automake.patch create mode 100644 meta/recipes-extended/which/which-2.20/remove-declaration.patch create mode 100644 meta/recipes-extended/which/which_2.18.bb create mode 100644 meta/recipes-extended/which/which_2.20.bb create mode 100644 meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch create mode 100644 meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb create mode 100644 meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch create mode 100644 meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd.conf create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd.default create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd.init create mode 100644 meta/recipes-extended/xinetd/xinetd_2.3.15.bb create mode 100644 meta/recipes-extended/xz/xz_5.1.3alpha.bb create mode 100644 meta/recipes-extended/zip/zip.inc create mode 100644 meta/recipes-extended/zip/zip_3.0.bb (limited to 'meta/recipes-extended') diff --git a/meta/recipes-extended/at/at/atd.init b/meta/recipes-extended/at/at/atd.init new file mode 100644 index 0000000000..eca379b3cd --- /dev/null +++ b/meta/recipes-extended/at/at/atd.init @@ -0,0 +1,45 @@ +#!/bin/sh +# +# Starts at daemon +# + +umask 077 + +# Source function library. +. /etc/init.d/functions + +start() { + echo -n "Starting atd: " + start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f + echo "OK" +} +stop() { + echo -n "Stopping atd: " + start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + status) + status /usr/sbin/atd + ;; + *) + echo $"Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit $? + diff --git a/meta/recipes-extended/at/at/atd.service b/meta/recipes-extended/at/at/atd.service new file mode 100644 index 0000000000..6dc844504a --- /dev/null +++ b/meta/recipes-extended/at/at/atd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Job spooling tools +After=syslog.target + +[Service] +ExecStart=@SBINDIR@/atd -f + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-extended/at/at/configure-add-enable-pam.patch b/meta/recipes-extended/at/at/configure-add-enable-pam.patch new file mode 100644 index 0000000000..1e5efef128 --- /dev/null +++ b/meta/recipes-extended/at/at/configure-add-enable-pam.patch @@ -0,0 +1,25 @@ +Upstream-Status: Pending + +--- at-3.1.12/configure.ac 2011-06-23 14:51:03.653572945 +0800 ++++ at-3.1.12/configure.ac.new 2011-06-27 16:12:14.903572945 +0800 +@@ -81,10 +81,18 @@ + AC_FUNC_VPRINTF + AC_FUNC_GETLOADAVG + AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid) ++ ++AC_ARG_WITH([pam], ++ [AS_HELP_STRING([--without-pam], [without PAM support])]) ++ ++if test "x$with_pam" != xno; then + AC_CHECK_HEADERS(security/pam_appl.h, [ + PAMLIB="-lpam" +- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support]) +-]) ++ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])], ++ [if test "x$with_pam" = xyes; then ++ AC_MSG_ERROR([PAM selected but security/pam_misc.h not found]) ++ fi]) ++fi + + dnl Checking for programs + diff --git a/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch new file mode 100644 index 0000000000..d5ef0032be --- /dev/null +++ b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch @@ -0,0 +1,30 @@ +Upstream-Status: Inappropriate [licensing] + +posixtm.[ch] files are replaced with gplv2 version from these locations: + +http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba +http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba + +update the Copyright file information to reflect the replaced files. + +Date: 2010/08/31 +Nitin A Kamble nitin.a.kamble@intel.com + +Index: at-3.1.12/Copyright +=================================================================== +--- at-3.1.12.orig/Copyright ++++ at-3.1.12/Copyright +@@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t + Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004, + 2005, 2006, 2007 Free Software Foundation Inc. + +- This program is free software: you can redistribute it and/or modify ++ This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch new file mode 100644 index 0000000000..66ff3e1c11 --- /dev/null +++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch @@ -0,0 +1,28 @@ +make -j was failing sometimesa like this +| ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o -lfl -lpam -Wl,-O1 -Wl,--as-needed +| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory +| compilation terminated. +| make: *** [lex.yy.o] Error 1 +| make: *** Waiting for unfinished jobs.... + +Fixed the issue by adding a dependency in the makefile. +Nitin +2010/09/02 + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +Index: at-3.1.12/Makefile.in +=================================================================== +--- at-3.1.12.orig/Makefile.in ++++ at-3.1.12/Makefile.in +@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y + lex.yy.c: parsetime.l + $(LEX) -i parsetime.l + ++parsetime.l: y.tab.h ++ + atrun: atrun.in + configure + diff --git a/meta/recipes-extended/at/at/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch new file mode 100644 index 0000000000..b5ceb9ae82 --- /dev/null +++ b/meta/recipes-extended/at/at/pam.conf.patch @@ -0,0 +1,27 @@ +oe doesn't support "@include", use the concrete directive instead. + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan +Index: at-3.1.15/pam.conf +=================================================================== +--- at-3.1.15.orig/pam.conf ++++ at-3.1.15/pam.conf +@@ -1,10 +1,11 @@ + # + # The PAM configuration file for the at daemon + # ++ ++auth required pam_env.so ++auth include common-auth ++account include common-account ++session include common-session-noninteractive ++session required pam_limits.so ++session required pam_loginuid.so + +-auth required pam_env.so +-@include common-auth +-@include common-account +-session required pam_loginuid.so +-@include common-session-noninteractive +-session required pam_limits.so diff --git a/meta/recipes-extended/at/at/posixtm.c b/meta/recipes-extended/at/at/posixtm.c new file mode 100644 index 0000000000..5514ba4fe2 --- /dev/null +++ b/meta/recipes-extended/at/at/posixtm.c @@ -0,0 +1,328 @@ +/* Parse dates for touch and date. + + Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004, + 2005, 2006, 2007 Free Software Foundation Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Yacc-based version written by Jim Kingdon and David MacKenzie. + Rewritten by Jim Meyering. */ + +#include + +#include "posixtm.h" + +#include +#include +#include +#include + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +/* ISDIGIT differs from isdigit, as follows: + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. + - It's typically faster. + POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to + isdigit unless it's important to use the locale's definition + of `digit' even when the host does not conform to POSIX. */ +#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) + +time_t mktime (); + +/* + POSIX requires: + + touch -t [[CC]YY]mmddhhmm[.ss] FILE... + 8, 10, or 12 digits, followed by optional .ss + (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS) + + touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001) + 8 or 10 digits, YY (if present) must be in the range 69-99 + (PDS_TRAILING_YEAR | PDS_PRE_2000) + + date mmddhhmm[[CC]YY] + 8, 10, or 12 digits + (PDS_TRAILING_YEAR | PDS_CENTURY) + +*/ + +static int +year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits) +{ + switch (n) + { + case 1: + tm->tm_year = *digit_pair; + /* Deduce the century based on the year. + POSIX requires that 00-68 be interpreted as 2000-2068, + and that 69-99 be interpreted as 1969-1999. */ + if (digit_pair[0] <= 68) + { + if (syntax_bits & PDS_PRE_2000) + return 1; + tm->tm_year += 100; + } + break; + + case 2: + if (! (syntax_bits & PDS_CENTURY)) + return 1; + tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900; + break; + + case 0: + { + time_t now; + struct tm *tmp; + + /* Use current year. */ + time (&now); + tmp = localtime (&now); + if (! tmp) + return 1; + tm->tm_year = tmp->tm_year; + } + break; + + default: + abort (); + } + + return 0; +} + +static int +posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits) +{ + const char *dot = NULL; + int pair[6]; + int *p; + size_t i; + + size_t s_len = strlen (s); + size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.'))) + ? (size_t) (dot - s) + : s_len); + + if (len != 8 && len != 10 && len != 12) + return 1; + + if (dot) + { + if (!(syntax_bits & PDS_SECONDS)) + return 1; + + if (s_len - len != 3) + return 1; + } + + for (i = 0; i < len; i++) + if (!ISDIGIT (s[i])) + return 1; + + len /= 2; + for (i = 0; i < len; i++) + pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0'; + + p = pair; + if (syntax_bits & PDS_LEADING_YEAR) + { + if (year (tm, p, len - 4, syntax_bits)) + return 1; + p += len - 4; + len = 4; + } + + /* Handle 8 digits worth of `MMDDhhmm'. */ + tm->tm_mon = *p++ - 1; + tm->tm_mday = *p++; + tm->tm_hour = *p++; + tm->tm_min = *p++; + len -= 4; + + /* Handle any trailing year. */ + if (syntax_bits & PDS_TRAILING_YEAR) + { + if (year (tm, p, len, syntax_bits)) + return 1; + } + + /* Handle seconds. */ + if (!dot) + { + tm->tm_sec = 0; + } + else + { + int seconds; + + ++dot; + if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1])) + return 1; + seconds = 10 * (dot[0] - '0') + dot[1] - '0'; + + tm->tm_sec = seconds; + } + + return 0; +} + +/* Parse a POSIX-style date, returning true if successful. */ + +bool +posixtime (time_t *p, const char *s, unsigned int syntax_bits) +{ + struct tm tm0 +#ifdef lint + /* Placate gcc-4's -Wuninitialized. + posix_time_parse fails to set all of tm0 only when it returns + nonzero (due to year() returning nonzero), and in that case, + this code doesn't use the tm0 at all. */ + = { 0, } +#endif + ; + struct tm tm1; + struct tm const *tm; + time_t t; + + if (posix_time_parse (&tm0, s, syntax_bits)) + return false; + + tm1 = tm0; + tm1.tm_isdst = -1; + t = mktime (&tm1); + + if (t != (time_t) -1) + tm = &tm1; + else + { + /* mktime returns -1 for errors, but -1 is also a valid time_t + value. Check whether an error really occurred. */ + tm = localtime (&t); + if (! tm) + return false; + } + + /* Reject dates like "September 31" and times like "25:61". */ + if ((tm0.tm_year ^ tm->tm_year) + | (tm0.tm_mon ^ tm->tm_mon) + | (tm0.tm_mday ^ tm->tm_mday) + | (tm0.tm_hour ^ tm->tm_hour) + | (tm0.tm_min ^ tm->tm_min) + | (tm0.tm_sec ^ tm->tm_sec)) + return false; + + *p = t; + return true; +} + +#ifdef TEST_POSIXTIME +/* + Test mainly with syntax_bits == 13 + (aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)) + + This test data assumes Universal Time, e.g., TZ="UTC0". + + This test data also assumes that time_t is signed and is at least + 39 bits wide, so that it can represent all years from 0000 through + 9999. A host with 32-bit signed time_t can represent only time + stamps in the range 1901-12-13 20:45:52 through 2038-01-18 + 03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test + cases outside this range will not work on such a host. + + Also, the first two lines of test data assume that the current + year is 2002. + +BEGIN-DATA +12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002 +12131415.16 13 1039788916 Fri Dec 13 14:15:16 2002 +000001010000.00 13 -62167132800 Sun Jan 1 00:00:00 0000 +190112132045.52 13 -2147483648 Fri Dec 13 20:45:52 1901 +190112132045.53 13 -2147483647 Fri Dec 13 20:45:53 1901 +190112132046.52 13 -2147483588 Fri Dec 13 20:46:52 1901 +190112132145.52 13 -2147480048 Fri Dec 13 21:45:52 1901 +190112142045.52 13 -2147397248 Sat Dec 14 20:45:52 1901 +190201132045.52 13 -2144805248 Mon Jan 13 20:45:52 1902 +196912312359.59 13 -1 Wed Dec 31 23:59:59 1969 +197001010000.00 13 0 Thu Jan 1 00:00:00 1970 +197001010000.01 13 1 Thu Jan 1 00:00:01 1970 +197001010001.00 13 60 Thu Jan 1 00:01:00 1970 +197001010100.00 13 3600 Thu Jan 1 01:00:00 1970 +197001020000.00 13 86400 Fri Jan 2 00:00:00 1970 +197002010000.00 13 2678400 Sun Feb 1 00:00:00 1970 +197101010000.00 13 31536000 Fri Jan 1 00:00:00 1971 +197001000000.00 13 * * +197000010000.00 13 * * +197001010000.60 13 * * +197001010060.00 13 * * +197001012400.00 13 * * +197001320000.00 13 * * +197013010000.00 13 * * +203801190314.06 13 2147483646 Tue Jan 19 03:14:06 2038 +203801190314.07 13 2147483647 Tue Jan 19 03:14:07 2038 +203801190314.08 13 2147483648 Tue Jan 19 03:14:08 2038 +999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999 +1112131415 13 1323785700 Tue Dec 13 14:15:00 2011 +1112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011 +201112131415.16 13 1323785716 Tue Dec 13 14:15:16 2011 +191112131415.16 13 -1831974284 Wed Dec 13 14:15:16 1911 +203712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037 +3712131415.16 13 2144326516 Sun Dec 13 14:15:16 2037 +6812131415.16 13 3122633716 Thu Dec 13 14:15:16 2068 +6912131415.16 13 -1590284 Sat Dec 13 14:15:16 1969 +7012131415.16 13 29945716 Sun Dec 13 14:15:16 1970 +1213141599 2 945094500 Mon Dec 13 14:15:00 1999 +1213141500 2 976716900 Wed Dec 13 14:15:00 2000 +END-DATA + +*/ + +# define MAX_BUFF_LEN 1024 + +int +main (void) +{ + char buff[MAX_BUFF_LEN + 1]; + + buff[MAX_BUFF_LEN] = 0; + while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0]) + { + char time_str[MAX_BUFF_LEN]; + unsigned int syntax_bits; + time_t t; + if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2) + printf ("*\n"); + else + { + printf ("%-15s %2u ", time_str, syntax_bits); + if (posixtime (&t, time_str, syntax_bits)) + printf ("%12ld %s", (long int) t, ctime (&t)); + else + printf ("%12s %s", "*", "*\n"); + } + } + exit (0); + +} +#endif + +/* +Local Variables: +compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c" +End: +*/ diff --git a/meta/recipes-extended/at/at/posixtm.h b/meta/recipes-extended/at/at/posixtm.h new file mode 100644 index 0000000000..e91749d736 --- /dev/null +++ b/meta/recipes-extended/at/at/posixtm.h @@ -0,0 +1,37 @@ +/* Parse dates for touch and date. + + Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Yacc-based version written by Jim Kingdon and David MacKenzie. + Rewritten by Jim Meyering. */ + +#ifndef POSIXTM_H_ +# define POSIXTM_H_ + +# include +# include + +/* POSIX Date Syntax flags. */ +# define PDS_LEADING_YEAR 1 +# define PDS_TRAILING_YEAR 2 +# define PDS_CENTURY 4 +# define PDS_SECONDS 8 +# define PDS_PRE_2000 16 + +bool posixtime (time_t *p, const char *s, unsigned int syntax_bits); + +#endif diff --git a/meta/recipes-extended/at/at_3.1.15.bb b/meta/recipes-extended/at/at_3.1.15.bb new file mode 100644 index 0000000000..0c37d6d912 --- /dev/null +++ b/meta/recipes-extended/at/at_3.1.15.bb @@ -0,0 +1,67 @@ +SUMMARY = "Delayed job execution and batch processing" +DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \ +the system load levels drop to a particular level." +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" +DEPENDS = "flex flex-native \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" + +RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ +" + +PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits" + +RCONFLICTS_${PN} = "atd" +RREPLACES_${PN} = "atd" + +SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ + file://fix_parallel_build_error.patch \ + file://posixtm.c \ + file://posixtm.h \ + file://file_replacement_with_gplv2.patch \ + file://atd.init \ + file://atd.service \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + +PAM_SRC_URI = "file://pam.conf.patch \ + file://configure-add-enable-pam.patch" + +SRC_URI[md5sum] = "f0f96db22e3a174b53ce4beeeb848839" +SRC_URI[sha256sum] = "03a84f5293d5a95ef4231b7faf5578f141f0c76a2b304dd655bc7e90e97bf7fc" + +EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ + --with-daemon_username=root \ + --with-daemon_groupname=root \ + --with-jobdir=/var/spool/at/jobs \ + --with-atspool=/var/spool/at/spool \ + ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " + +inherit autotools-brokensep systemd update-rc.d + +INITSCRIPT_NAME = "atd" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_SERVICE_${PN} = "atd.service" + +PARALLEL_MAKE = "" + +do_compile_prepend () { + cp -f ${WORKDIR}/posixtm.[ch] ${S} +} + +do_install () { + oe_runmake -e "IROOT=${D}" install + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd + + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service + + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then + install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd + fi +} diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc new file mode 100644 index 0000000000..ac25326813 --- /dev/null +++ b/meta/recipes-extended/augeas/augeas.inc @@ -0,0 +1,32 @@ +SUMMARY = "Augeas configuration API" +HOMEPAGE = "http://augeas.net/" +BUGTRACKER = "https://fedorahosted.org/augeas/report/1" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" + +SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ + file://add-missing-argz-conditional.patch \ + file://sepbuildfix.patch \ + " + +DEPENDS = "readline libxml2" + +inherit autotools pkgconfig + +PACKAGES =+ "${PN}-lenses lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-dbg" + +FILES_${PN}-lenses = "${datadir}/augeas/lenses" +FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" +FILES_lib${BPN}-dev = "${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${includedir} ${libdir}/pkgconfig" +FILES_lib${BPN}-staticdev = "${libdir}/*.a" +FILES_lib${BPN}-dbg = "${libdir}/.debug" + +RDEPENDS_lib${BPN} += "${PN}-lenses" +RRECOMMENDS_lib${BPN} += "${PN}" + +LEAD_SONAME = "libaugeas.so" + +do_install_append() { + rm -fr ${D}${datadir}/vim +} diff --git a/meta/recipes-extended/augeas/augeas/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 @@ +Add missing GL_GENERATE_ARGZ_H conditional + +- GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am + +Upstream-Status: Pending +Signed-off-by: Constantin Musca + +Index: augeas-1.0.0/configure.ac +=================================================================== +--- augeas-1.0.0.orig/configure.ac ++++ augeas-1.0.0/configure.ac +@@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc], + + AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno]) + ++AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) ++ + dnl --enable-debug=(yes|no) + AC_ARG_ENABLE([debug], + [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 @@ +Ensure that builds in separate builddirs (${B} != ${S}) correctly install the +lenses files. + +Upstream-Status: Pending + +RP 2013/4/17 + +Index: augeas-1.0.0/Makefile.am +=================================================================== +--- augeas-1.0.0.orig/Makefile.am 2012-11-02 15:20:11.000000000 +0000 ++++ augeas-1.0.0/Makefile.am 2013-04-17 10:36:24.033400125 +0000 +@@ -5,8 +5,8 @@ + lensdir=$(datadir)/augeas/lenses/dist + lenstestdir=$(datadir)/augeas/lenses/dist/tests + +-dist_lens_DATA=$(wildcard lenses/*.aug) +-dist_lenstest_DATA=$(wildcard lenses/tests/*.aug) ++dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug) ++dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug) + + EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING + 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 @@ +require augeas.inc + + +SRC_URI[md5sum] = "dce2f52cbd20f72c7da48e014ad48076" +SRC_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 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Signed-off-by: Anders Roxell +Upstream-Status: Pending +--- +diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in +--- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500 ++++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500 +@@ -803,17 +803,31 @@ + fi + + recho$(EXEEXT): $(SUPPORT_SRC)recho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + + zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + + printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) -o $@ $< + +-test tests check: force $(Program) $(TESTS_SUPPORT) ++test tests check: ++ @$(MAKE) install-test ++ @$(MAKE) runtest ++ ++install-test: buildtest ++ifeq ($(origin INSTALL_TEST_DIR), undefined) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests ++else ++ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) ++ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ ++ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) ++endif ++ ++buildtest: force $(Program) $(TESTS_SUPPORT) ++ ++runtest: + @( cd $(srcdir)/tests && \ + PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + 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 @@ +On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by +the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers +use the STRING() macro from unistd.h. A header in the bash sources overrides +the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the +wrappers to generate calls to 'xread' and 'xopen', which do not exist, +resulting in a failure to link. + +Assume we have stringize support when cross-compiling, which works around the +issue. + +It may be best for upstream to either give up on supporting compilers without +stringize support, or to not define STRING() at all when FORTIFY_SOURCES is +defined, letting the unistd.h one be used, instead. + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson +Signed-off-by: Saul Wold + +--- bash-4.2.orig/builtins/mkbuiltins.c ++++ bash-4.2/builtins/mkbuiltins.c +@@ -28,6 +28,7 @@ + # define HAVE_STDLIB_H + + # define HAVE_RENAME ++# define HAVE_STRINGIZE + #endif /* CROSS_COMPILING */ + + #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 @@ +#!/bin/sh +make -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 @@ +Add FAIL/PASS output to test output. + +Signed-off-by: Björn Stenberg +Upstream-Status: Pending +--- +diff -uNr a/tests/run-all b/tests/run-all +--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 ++++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 +@@ -22,7 +22,15 @@ + case $x in + $0|run-minimal|run-gprof) ;; + *.orig|*~) ;; +- *) echo $x ; sh $x ;; ++ *) echo $x ++ output=`sh $x` ++ if [ -n "$output" ]; then ++ echo "$output" ++ echo "FAIL: $x" ++ else ++ echo "PASS: $x" ++ fi ++ ;; + esac + done + diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc new file mode 100644 index 0000000000..d35d25cc92 --- /dev/null +++ b/meta/recipes-extended/bash/bash.inc @@ -0,0 +1,58 @@ +SUMMARY = "An sh-compatible command language interpreter" +HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html" +SECTION = "base/shell" + +DEPENDS = "ncurses bison-native" + +inherit autotools-brokensep gettext texinfo update-alternatives ptest + +PARALLEL_MAKE = "" + +EXTRA_OECONF = "--enable-job-control" + +ALTERNATIVE_${PN} = "sh" +ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" +ALTERNATIVE_PRIORITY = "100" + +export AUTOHEADER = "true" + +RDEPENDS_${PN} += "base-files" +RDEPENDS_${PN}_class-nativesdk = "" +RDEPENDS_${PN}-ptest += "make" + +do_configure_prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +do_compile_ptest () { + oe_runmake buildtest +} + +do_install_append () { + # Move /usr/bin/bash to /bin/bash, if need + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + mv ${D}${bindir}/bash ${D}${base_bindir} + fi +} +do_install_append_class-target () { + # Clean host path in bashbug + sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug +} + +do_install_ptest () { + make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile +} + +pkg_postinst_${PN} () { + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells +} 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 @@ +Add 'ptest' target to Makefile, to run tests without checking dependencies. + +Upstream-Status: Pending +Signed-off-by: Anders Roxell +Signed-off-by: Hongxu Jia +--- + Makefile.in | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -848,20 +848,34 @@ maybe-clean: + fi + + recho$(EXEEXT): $(SUPPORT_SRC)recho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + + xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c +- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD} ++ @$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $< + +-test tests check: force $(Program) $(TESTS_SUPPORT) ++test tests check: ++ @$(MAKE) install-test ++ @$(MAKE) runtest ++ ++install-test: buildtest ++ifeq ($(origin INSTALL_TEST_DIR), undefined) + @-test -d tests || mkdir tests + @cp $(TESTS_SUPPORT) tests ++else ++ @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) ++ @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ ++ @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) ++endif ++ ++buildtest: force $(Program) $(TESTS_SUPPORT) ++ ++runtest: + @( cd $(srcdir)/tests && \ + PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) + +-- +1.8.1.2 + 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +--- execute_cmd.c.orig Fri Jun 3 13:34:42 2011 ++++ execute_cmd.c Fri Jun 3 13:36:41 2011 +@@ -2202,7 +2202,11 @@ + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ +- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) ++ if (lastpipe_opt && ++#if defined(JOB_CONTROL) ++ job_control == 0 && ++#endif ++ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { + lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) diff --git a/meta/recipes-extended/bash/bash/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 @@ +On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by +the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers +use the STRING() macro from unistd.h. A header in the bash sources overrides +the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the +wrappers to generate calls to 'xread' and 'xopen', which do not exist, +resulting in a failure to link. + +Assume we have stringize support when cross-compiling, which works around the +issue. + +It may be best for upstream to either give up on supporting compilers without +stringize support, or to not define STRING() at all when FORTIFY_SOURCES is +defined, letting the unistd.h one be used, instead. + +Upstream-Status: Pending + +--- bash-4.2.orig/builtins/mkbuiltins.c ++++ bash-4.2/builtins/mkbuiltins.c +@@ -28,6 +28,7 @@ + # define HAVE_STDLIB_H + + # define HAVE_RENAME ++# define HAVE_STRINGIZE + #endif /* CROSS_COMPILING */ + + #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 @@ +#!/bin/sh +make -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 @@ +Add FAIL/PASS output to test output. + +Signed-off-by: Björn Stenberg +Upstream-Status: Pending +--- +diff -uNr a/tests/run-all b/tests/run-all +--- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 ++++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 +@@ -22,7 +22,15 @@ + case $x in + $0|run-minimal|run-gprof) ;; + *.orig|*~) ;; +- *) echo $x ; sh $x ;; ++ *) echo $x ++ output=`sh $x` ++ if [ -n "$output" ]; then ++ echo "$output" ++ echo "FAIL: $x" ++ else ++ echo "PASS: $x" ++ fi ++ ;; + esac + done + 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..35e624bb8b --- /dev/null +++ b/meta/recipes-extended/bash/bash_3.2.48.bb @@ -0,0 +1,43 @@ +require bash.inc + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" + +PR = "r11" + +SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \ + ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + " + +SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8" +SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348" +SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c" +SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f" +SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377" +SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642" +SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849" +SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef" +SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1" +SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61" +SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46" +SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e" +SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6" +SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359" +SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05" +SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a" +SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a" +SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4" +SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913" +SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0" 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..54f21017db --- /dev/null +++ b/meta/recipes-extended/bash/bash_4.3.bb @@ -0,0 +1,109 @@ +require bash.inc + +# GPLv2+ (< 4.0), GPLv3+ (>= 4.0) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-001;apply=yes;striplevel=0;name=patch001 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-002;apply=yes;striplevel=0;name=patch002 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-003;apply=yes;striplevel=0;name=patch003 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-004;apply=yes;striplevel=0;name=patch004 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-005;apply=yes;striplevel=0;name=patch005 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-006;apply=yes;striplevel=0;name=patch006 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-007;apply=yes;striplevel=0;name=patch007 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-008;apply=yes;striplevel=0;name=patch008 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-009;apply=yes;striplevel=0;name=patch009 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-010;apply=yes;striplevel=0;name=patch010 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-011;apply=yes;striplevel=0;name=patch011 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-012;apply=yes;striplevel=0;name=patch012 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-013;apply=yes;striplevel=0;name=patch013 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-014;apply=yes;striplevel=0;name=patch014 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-015;apply=yes;striplevel=0;name=patch015 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-016;apply=yes;striplevel=0;name=patch016 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-017;apply=yes;striplevel=0;name=patch017 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-018;apply=yes;striplevel=0;name=patch018 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-019;apply=yes;striplevel=0;name=patch019 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-020;apply=yes;striplevel=0;name=patch020 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-021;apply=yes;striplevel=0;name=patch021 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-022;apply=yes;striplevel=0;name=patch022 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-023;apply=yes;striplevel=0;name=patch023 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-024;apply=yes;striplevel=0;name=patch024 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-025;apply=yes;striplevel=0;name=patch025 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-026;apply=yes;striplevel=0;name=patch026 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-027;apply=yes;striplevel=0;name=patch027 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-028;apply=yes;striplevel=0;name=patch028 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-029;apply=yes;striplevel=0;name=patch029 \ + ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-030;apply=yes;striplevel=0;name=patch030 \ + file://execute_cmd.patch;striplevel=0 \ + file://mkbuiltins_have_stringize.patch \ + file://build-tests.patch \ + file://test-output.patch \ + file://run-ptest \ + " + +SRC_URI[tarball.md5sum] = "81348932d5da294953e15d4814c74dd1" +SRC_URI[tarball.sha256sum] = "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4" + +SRC_URI[patch001.md5sum] = "1ab682b4e36afa4cf1b426aa7ac81c0d" +SRC_URI[patch001.sha256sum] = "ecb3dff2648667513e31554b3ad054ccd89fce38e33367c9459ac3a285153742" +SRC_URI[patch002.md5sum] = "8fc22cf50ec85da00f6af3d66f7ddc1b" +SRC_URI[patch002.sha256sum] = "eee7cd7062ab29a9e4f02924d9c367264dcb8b162703f74ff6eb8f175a91502b" +SRC_URI[patch003.md5sum] = "a41728eca78858758e26b5dea64ae506" +SRC_URI[patch003.sha256sum] = "000e6eac50cd9053ce0630db01239dcdead04a2c2c351c47e2b51dac1ac1087d" +SRC_URI[patch004.md5sum] = "bf8d53d227829d67235927689a03cc7a" +SRC_URI[patch004.sha256sum] = "5ea0a42c6506720d26e6d3c5c358e9a0d49f6f189d69a8ed34d5935964821338" +SRC_URI[patch005.md5sum] = "c0c00935c8b8ffff76e8ab77e7be7d15" +SRC_URI[patch005.sha256sum] = "1ac83044032b9f5f11aeca8a344ae3c524ec2156185d3adbb8ad3e7a165aa3fa" +SRC_URI[patch006.md5sum] = "6f01e364cd092faa28dd7119f47ddb5f" +SRC_URI[patch006.sha256sum] = "a0648ee72d15e4a90c8b77a5c6b19f8d89e28c1bc881657d22fe26825f040213" +SRC_URI[patch007.md5sum] = "dcf471d222bcd83283d3094e6ceeb6f8" +SRC_URI[patch007.sha256sum] = "1113e321c59cf6a8648a36245bbe4217cf8acf948d71e67886dad7d486f8f3a3" +SRC_URI[patch008.md5sum] = "f7553416646dc26c266454c78a916d36" +SRC_URI[patch008.sha256sum] = "9941a98a4987192cc5ce3d45afe879983cad2f0bec96d441a4edd9033767f95e" +SRC_URI[patch009.md5sum] = "7e73d2151f4064b484a4ba2c4b09960e" +SRC_URI[patch009.sha256sum] = "c0226d6728946b2f53cdebf090bcd1c01627f01fee03295768605caa80bb40a5" +SRC_URI[patch010.md5sum] = "a275463d21735bb6d7161f9fbd320d8f" +SRC_URI[patch010.sha256sum] = "ce05799c0137314c70c7b6ea0477c90e1ac1d52e113344be8e32fa5a55c9f0b7" +SRC_URI[patch011.md5sum] = "c17103ee20420d77e46b224c8d3fceda" +SRC_URI[patch011.sha256sum] = "7c63402cdbc004a210f6c1c527b63b13d8bb9ec9c5a43d5c464a9010ff6f7f3b" +SRC_URI[patch012.md5sum] = "3e2a057a19d02b3f92a3a09eacbc03ae" +SRC_URI[patch012.sha256sum] = "3e1379030b35fbcf314e9e7954538cf4b43be1507142b29efae39eef997b8c12" +SRC_URI[patch013.md5sum] = "fb377143a996d4ff087a2771bc8332f9" +SRC_URI[patch013.sha256sum] = "bfa8ca5336ab1f5ef988434a4bdedf71604aa8a3659636afa2ce7c7446c42c79" +SRC_URI[patch014.md5sum] = "1a1aaecc99a9d0cbc310e8e247dcc8b6" +SRC_URI[patch014.sha256sum] = "5a4d6fa2365b6eb725a9d4966248b5edf7630a4aeb3fa8d526b877972658ac13" +SRC_URI[patch015.md5sum] = "4f04387458a3c1b4d460d199f49991a8" +SRC_URI[patch015.sha256sum] = "13293e8a24e003a44d7fe928c6b1e07b444511bed2d9406407e006df28355e8d" +SRC_URI[patch016.md5sum] = "90e759709720c4f877525bebc9d5dc06" +SRC_URI[patch016.sha256sum] = "92d60bcf49f61bd7f1ccb9602bead6f2c9946d79dea0e5ec0589bb3bfa5e0773" +SRC_URI[patch017.md5sum] = "11e4046e1b86070f6adbb7ffc89641be" +SRC_URI[patch017.sha256sum] = "1267c25c6b5ba57042a7bb6c569a6de02ffd0d29530489a16666c3b8a23e7780" +SRC_URI[patch018.md5sum] = "cd5a9b46f5bea0dc0248c93c7dfac011" +SRC_URI[patch018.sha256sum] = "7aa8b40a9e973931719d8cc72284a8fb3292b71b522db57a5a79052f021a3d58" +SRC_URI[patch019.md5sum] = "cff4dc024d9d3456888aaaf8a36ca774" +SRC_URI[patch019.sha256sum] = "a7a91475228015d676cafa86d2d7aa9c5d2139aa51485b6bbdebfdfbcf0d2d23" +SRC_URI[patch020.md5sum] = "167839c5f147347f4a03d88ab97ff787" +SRC_URI[patch020.sha256sum] = "ca5e86d87f178128641fe91f2f094875b8c1eb2de9e0d2e9154f5d5cc0336c98" +SRC_URI[patch021.md5sum] = "1d350671c48dec30b34d8b81f09cd79d" +SRC_URI[patch021.sha256sum] = "41439f06883e6bd11c591d9d5e9ae08afbc2abd4b935e1d244b08100076520a9" +SRC_URI[patch022.md5sum] = "11c349af66a55481a3215ef2520bec36" +SRC_URI[patch022.sha256sum] = "fd4d47bb95c65863f634c4706c65e1e3bae4ee8460c72045c0a0618689061a88" +SRC_URI[patch023.md5sum] = "b3cb0d80fd0c47728264405cbb3b23c7" +SRC_URI[patch023.sha256sum] = "9ac250c7397a8f53dbc84dfe790d2a418fbf1fe090bcece39b4a5c84a2d300d4" +SRC_URI[patch024.md5sum] = "b5ea5600942acceb4b6f07313d2de74e" +SRC_URI[patch024.sha256sum] = "3b505882a0a6090667d75824fc919524cd44cc3bd89dd08b7c4e622d3f960f6c" +SRC_URI[patch025.md5sum] = "193c06f578d38ffdbaebae9c51a7551f" +SRC_URI[patch025.sha256sum] = "1e5186f5c4a619bb134a1177d9e9de879f3bb85d9c5726832b03a762a2499251" +SRC_URI[patch026.md5sum] = "922578e2be7ed03729454e92ee8d3f3a" +SRC_URI[patch026.sha256sum] = "2ecc12201b3ba4273b63af4e9aad2305168cf9babf6d11152796db08724c214d" +SRC_URI[patch027.md5sum] = "8ff6948b16f2db5c29b1b9ae1085bbe7" +SRC_URI[patch027.sha256sum] = "1eb76ad28561d27f7403ff3c76a36e932928a4b58a01b868d663c165f076dabe" +SRC_URI[patch028.md5sum] = "dd51fa67913b5dca45a702b672b3323f" +SRC_URI[patch028.sha256sum] = "e8b0dbed4724fa7b9bd8ff77d12c7f03da0fbfc5f8251ef5cb8511eb082b469d" +SRC_URI[patch029.md5sum] = "0729364c977ef4271e9f8dfafadacf67" +SRC_URI[patch029.sha256sum] = "4cc4a397fe6bc63ecb97d030a4e44258ef2d4e076d0e90c77782968cc43d6292" +SRC_URI[patch030.md5sum] = "efb709fdb1368945513de23ccbfae053" +SRC_URI[patch030.sha256sum] = "85434f8a2f379d0c49a3ff6d9ffa12c8b157188dd739e556d638217d2a58385b" + +BBCLASSEXTEND = "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..b116052c7d --- /dev/null +++ b/meta/recipes-extended/bc/bc_1.06.bb @@ -0,0 +1,26 @@ +SUMMARY = "Arbitrary precision calculator language" +HOMEPAGE = "http://www.gnu.org/software/bc/bc.html" + +LICENSE = "GPLv2+ & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \ + file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \ + file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \ + file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199" + +SECTION = "base" +DEPENDS = "flex" +PR = "r2" + +SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \ + file://fix-segment-fault.patch " + +SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" +SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" + +inherit autotools-brokensep texinfo update-alternatives + +ALTERNATIVE_${PN} = "dc" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "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 @@ +Upstream-Status: Pending + +when run command such as 'echo "a = 13" | bc -l', it segmentation faults. +This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html. + +Signed-off-by: Kai Kang + +--- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000 ++++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include /* Prototypes needed for external utility routines. */ + + #define bc_rt_warn rt_warn +--- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000 ++++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000 +@@ -156,7 +156,7 @@ + long label_no; + long vaf_name; /* variable, array or function number. */ + long func; +- program_counter save_adr; ++ static program_counter save_adr; + + /* Initialize. */ + 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..69f2261b37 --- /dev/null +++ b/meta/recipes-extended/blktool/blktool_4-6.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "Tune low-level block device parameters" +DESCRIPTION = "blktool is used for querying and/or changing settings \ +of a block device. It is like hdparm but a more general tool, as it \ +works on SCSI, IDE and SATA devices." +HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373" + +DEPENDS = "glib-2.0" +PR = "r1" + +SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \ + ${DEBIAN_MIRROR}/main/b/blktool/blktool_4-6.1.diff.gz;apply=yes;name=patch" + +SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40" +SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764" + +SRC_URI[patch.md5sum] = "cf605a683d54d1fbcb35b940076ddb0c" +SRC_URI[patch.sha256sum] = "d7923527e1a00984620ab307c9047a653d7ae2856cd20a82de8a33328f381ae3" + +S = "${WORKDIR}/${BPN}-4.orig" + +inherit autotools pkgconfig 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 @@ +SUMMARY = "Berkeley LALR Yacc parser generator" +DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \ +parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \ +programming language." +SECTION = "devel" +LICENSE = "PD" + +SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz" +EXTRA_OECONF += "--program-transform-name='s,^,b,'" + +BBCLASSEXTEND = "native" + +inherit autotools + +do_configure() { + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + oe_runconf +} diff --git a/meta/recipes-extended/byacc/byacc_20140422.bb b/meta/recipes-extended/byacc/byacc_20140422.bb new file mode 100644 index 0000000000..cf57738bea --- /dev/null +++ b/meta/recipes-extended/byacc/byacc_20140422.bb @@ -0,0 +1,11 @@ +# Sigh. This is one of those places where everyone licenses it differently. Someone +# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that: +# "I've found no reliable source which states that byacc must bear a UCB copyright." +# Setting to PD as this is what the upstream has it as. + +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=f186cf0d59bac042b75830396ec389a3" +require byacc.inc + +SRC_URI[md5sum] = "e7c13c5e207dc05eab9145cc9972397b" +SRC_URI[sha256sum] = "2f104c7e200dd86844d5f3521e12cb55fc48a9c3da3480a65fde2ca8c053bdcc" 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 @@ + +lib_LTLIBRARIES = libbz2.la + +libbz2_la_SOURCES = blocksort.c \ + huffman.c \ + crctable.c \ + randtable.c \ + compress.c \ + decompress.c \ + bzlib.c + +bin_PROGRAMS = bzip2 bzip2recover + +bzip2_SOURCES = bzip2.c +bzip2_LDADD = libbz2.la +bzip2_DEPENDENCIES = libbz2.la + +include_HEADERS = bzlib.h + +bzip2recover_SOURCES = bzip2recover.c +bzip2recover_LDADD = libbz2.la +bzip2recover_DEPENDENCIES = libbz2.la + +bin_SCRIPTS = bzgrep bzmore bzdiff + +man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 +EXTRA_DIST = $(man_MANS) + +runtest: + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + ./bzip2 -ds < sample3.bz2 > sample3.tst + @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\ + else echo "FAIL: sample1 compress"; fi + @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\ + else echo "FAIL: sample2 compress"; fi + @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\ + else echo "FAIL: sample3 compress"; fi + @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\ + else echo "FAIL: sample1 decompress"; fi + @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\ + else echo "FAIL: sample2 decompress"; fi + @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\ + else echo "FAIL: sample3 decompress"; fi + +install-ptest: + cp $(srcdir)/Makefile $(DESTDIR)/ + cp $(srcdir)/sample1.ref $(DESTDIR)/ + cp $(srcdir)/sample2.ref $(DESTDIR)/ + cp $(srcdir)/sample3.ref $(DESTDIR)/ + cp $(srcdir)/sample1.bz2 $(DESTDIR)/ + cp $(srcdir)/sample2.bz2 $(DESTDIR)/ + cp $(srcdir)/sample3.bz2 $(DESTDIR)/ + ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2 + +install-exec-hook: + ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT) + ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT) + ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT) + ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT) + ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT) + ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT) + +install-data-hook: + echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1 + echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1 + echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1 + echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1 diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac new file mode 100644 index 0000000000..47ee576a8e --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac @@ -0,0 +1,14 @@ +AC_PREREQ([2.57]) + +AC_INIT(bzip2, 2.0.5, , libXrender) +AM_INIT_AUTOMAKE(foreign) +AM_MAINTAINER_MODE + +#AM_CONFIG_HEADER(config.h) + +# Check for progs +AC_PROG_CC +AC_PROG_LIBTOOL + +AC_OUTPUT([Makefile]) + diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/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 @@ +#!/bin/sh +make -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..9dd9e6a1f9 --- /dev/null +++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb @@ -0,0 +1,54 @@ +SUMMARY = "Very high-quality data compression program" +DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \ +Huffman coding. Compression is generally considerably better than that achieved by more conventional \ +LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors." +HOMEPAGE = "http://www.bzip.org/" +SECTION = "console/utils" +LICENSE = "bzip2" +LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2" +PR = "r5" + +SRC_URI = "http://www.bzip.org/${PV}/${BPN}-${PV}.tar.gz \ + file://configure.ac \ + file://run-ptest \ + file://Makefile.am" + +SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b" +SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd" + +PACKAGES =+ "libbz2 libbz2-dev libbz2-staticdev" + +CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" + +inherit autotools update-alternatives ptest + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "bunzip2 bzcat" + +#install binaries to bzip2-native under sysroot for replacement-native +EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}" +do_extraunpack () { + cp ${WORKDIR}/configure.ac ${S}/ + cp ${WORKDIR}/Makefile.am ${S}/ +} + +addtask extraunpack after do_unpack before do_patch + +do_install_ptest () { + cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile + sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile +} + +FILES_libbz2 = "${libdir}/lib*${SOLIBS}" + +FILES_libbz2-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}" +SECTION_libbz2-dev = "devel" +RDEPENDS_libbz2-dev = "libbz2 (= ${EXTENDPKGV})" + +FILES_libbz2-staticdev = "${libdir}/*.a" +SECTION_libbz2-staticdev = "devel" +RDEPENDS_libbz2-staticdev = "libbz2-dev (= ${EXTENDPKGV})" + +PROVIDES_append_class-native = " bzip2-replacement-native" +BBCLASSEXTEND = "native nativesdk" + 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 @@ +require recipes-extended/chkconfig/chkconfig_1.3.58.bb + +SUMMARY = "${SUMMARY_chkconfig-alternatives}" +DESCRIPTION = "${DESCRIPTION_chkconfig-alternatives}" +DEPENDS = "" +PROVIDES += "virtual/update-alternatives-native" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +# The sysroot branch is 1.3.59 + some git commits from master + --sysroot +# support for alternatives. +SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot" +S = "${WORKDIR}/git" + +SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee" +PV = "1.3.59+${SRCPV}" + +inherit native + +# We want our native recipes to build using the target paths rather than paths +# into the sysroot, as we may use them to construct the rootfs. As such, we +# only adjust the paths to match the metadata for the target, not native. +obey_variables () { + sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c +} + +do_compile () { + oe_runmake alternatives +} + +do_install () { + install -d ${D}${sysconfdir}/alternatives \ + ${D}${localstatedir}/lib/alternatives + + install -D -m 0755 alternatives ${D}${bindir}/alternatives + install -D -m 0644 alternatives.8 ${D}${mandir}/man8/alternatives.8 + + ln -s alternatives ${D}${bindir}/update-alternatives + ln -s alternatives.8 ${D}${mandir}/man8/update-alternatives.8 +} + +do_install_append_linuxstdbase() { + rm -rf ${D}${libdir}/lsb +} 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 @@ +SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy" +DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \ +information for system services. Chkconfig manipulates the numerous \ +symbolic links in /etc/rc.d, to relieve system administrators of some \ +of the drudgery of manually editing the symbolic links." + +HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" + +DEPENDS = "libnewt popt" +PROVIDES += "virtual/update-alternatives" + +PR = "r7" + +SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2" + +SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246" +SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68" + +inherit gettext + +# Makefile uses RPM_OPT_FLAGS to construct CFLAGS +# +EXTRA_OEMAKE = "\ + 'RPM_OPT_FLAGS=${CFLAGS}' \ + 'LDFLAGS=${LDFLAGS}' \ + 'BINDIR=${base_sbindir}' \ + 'SBINDIR=${sbindir}' \ + 'MANDIR=${mandir}' \ + 'ALTDIR=${localstatedir}/lib/alternatives' \ + 'ALTDATADIR=${sysconfdir}/alternatives' \ +" + +do_unpack[postfuncs] += "obey_variables" +do_unpack[vardeps] += "obey_variables" +obey_variables () { + sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' leveldb.h + sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \ + -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \ + -e 's,/usr/share/locale,${datadir}/locale,' alternatives.c +} + +do_install() { + oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \ + 'BINDIR=${sbindir}' install + install -d ${D}${sysconfdir}/chkconfig.d +} + +PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc" +SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands" +DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \ +information about the symbolic links comprising the alternatives system." +SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files" +DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \ +This package contains documentation." +RPROVIDES_${PN}-alternatives += "update-alternatives" +RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg" +FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \ + ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives" +FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \ + ${mandir}/man8/update-alternatives.8" diff --git a/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch new file mode 100644 index 0000000000..b54afb867f --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch @@ -0,0 +1,154 @@ +Description: CVE-2015-1197 + Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197. + Upstream is dormant or no longer existing. To restore the old + behaviour use --extract-over-symlinks (Closes: #774669) + This issue has been discovered by Alexander Cherepanov. +Author: Vitezslav Cizek +Bug-Debian: https://bugs.debian.org/774669 + +Upstream-Status: Backport + +Signed-off-by: Robert Yang + +--- cpio-2.11+dfsg.orig/doc/cpio.1 ++++ cpio-2.11+dfsg/doc/cpio.1 +@@ -22,6 +22,7 @@ cpio \- copy files to and from archives + [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] + [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] + [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command] ++[\-\-extract\-over\-symlinks] + [\-\-help] [\-\-version] [pattern...] [< archive] + + .B cpio +--- cpio-2.11+dfsg.orig/src/copyin.c ++++ cpio-2.11+dfsg/src/copyin.c +@@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file + free (link_name); + } + ++ ++static int ++path_contains_symlink(char *path) ++{ ++ struct stat st; ++ char *slash; ++ char *nextslash; ++ ++ /* we got NULL pointer or empty string */ ++ if (!path || !*path) { ++ return false; ++ } ++ ++ slash = path; ++ ++ while ((nextslash = strchr(slash + 1, '/')) != NULL) { ++ slash = nextslash; ++ *slash = '\0'; ++ ++ if (lstat(path, &st) != 0) { ++ if (errno == ELOOP) { ++ /* ELOOP - too many symlinks */ ++ *slash = '/'; ++ return true; ++ } else if (errno == ENOMEM) { ++ /* No memory for lstat - terminate */ ++ xalloc_die(); ++ } else { ++ /* cannot lstat path - give up */ ++ *slash = '/'; ++ return false; ++ } ++ } ++ ++ if (S_ISLNK(st.st_mode)) { ++ *slash = '/'; ++ return true; ++ } ++ ++ *slash = '/'; ++ } ++ ++ return false; ++} ++ + static void + copyin_file (struct cpio_file_stat *file_hdr, int in_file_des) + { +@@ -1471,6 +1516,23 @@ process_copy_in () + { + /* Copy the input file into the directory structure. */ + ++ /* Can we write files over symlinks? */ ++ if (!extract_over_symlinks) ++ { ++ if (path_contains_symlink(file_hdr.c_name)) ++ { ++ /* skip the file */ ++ /* ++ fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name); ++ tape_toss_input (in_file_des, file_hdr.c_filesize); ++ tape_skip_padding (in_file_des, file_hdr.c_filesize); ++ continue; ++ */ ++ /* terminate */ ++ error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name); ++ } ++ } ++ + /* Do we need to rename the file? */ + if (rename_flag || rename_batch_file) + { +--- cpio-2.11+dfsg.orig/src/extern.h ++++ cpio-2.11+dfsg/src/extern.h +@@ -95,6 +95,7 @@ extern char input_is_special; + extern char output_is_special; + extern char input_is_seekable; + extern char output_is_seekable; ++extern bool extract_over_symlinks; + extern int (*xstat) (); + extern void (*copy_function) (); + +--- cpio-2.11+dfsg.orig/src/global.c ++++ cpio-2.11+dfsg/src/global.c +@@ -187,6 +187,9 @@ bool to_stdout_option = false; + /* The name this program was run with. */ + char *program_name; + ++/* Extract files over symbolic links */ ++bool extract_over_symlinks; ++ + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); +--- cpio-2.11+dfsg.orig/src/main.c ++++ cpio-2.11+dfsg/src/main.c +@@ -57,7 +57,8 @@ enum cpio_options { + FORCE_LOCAL_OPTION, + DEBUG_OPTION, + BLOCK_SIZE_OPTION, +- TO_STDOUT_OPTION ++ TO_STDOUT_OPTION, ++ EXTRACT_OVER_SYMLINKS + }; + + const char *program_authors[] = +@@ -222,6 +223,8 @@ static struct argp_option options[] = { + N_("Create leading directories where needed"), GRID+1 }, + {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0, + N_("Do not change the ownership of the files"), GRID+1 }, ++ {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0, ++ N_("Force writing over symbolic links"), GRID+1 }, + {"unconditional", 'u', NULL, 0, + N_("Replace all files unconditionally"), GRID+1 }, + {"sparse", SPARSE_OPTION, NULL, 0, +@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als + no_chown_flag = true; + break; + ++ case EXTRACT_OVER_SYMLINKS: /* --extract-over-symlinks */ ++ extract_over_symlinks = true; ++ break; ++ + case 'o': /* Copy-out mode. */ + if (copy_function != 0) + error (PAXEXIT_FAILURE, 0, _("Mode already defined")); diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch new file mode 100644 index 0000000000..89cd3cfa50 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch @@ -0,0 +1,220 @@ +cpio: Fix memory overrun on reading improperly created link records + +Signed-off-by: Bian Naimeng + +http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d + + * src/copyin.c (get_link_name): New function. + (list_file, copyin_link): use get_link_name + + * tests/symlink-bad-length.at: New file. + * tests/symlink-long.at: New file. + * tests/Makefile.am: Add new files. + * tests/testsuite.at: Likewise. + + See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html + +Upstream-Status: Backport + +Signed-off-by: Sergey Poznyakoff + +diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c +--- cpio-2.11.orig/src/copyin.c 2010-02-15 18:02:23.000000000 +0800 ++++ cpio-2.11/src/copyin.c 2014-12-08 13:14:04.355547508 +0800 +@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_ + } + + ++static char * ++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) ++{ ++ off_t n = file_hdr->c_filesize + 1; ++ char *link_name; ++ ++ if (n == 0 || n > SIZE_MAX) ++ { ++ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); ++ link_name = NULL; ++ } ++ else ++ { ++ link_name = xmalloc (n); ++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); ++ link_name[file_hdr->c_filesize] = '\0'; ++ tape_skip_padding (in_file_des, file_hdr->c_filesize); ++ } ++ return link_name; ++} ++ ++ + static void + list_file(struct cpio_file_stat* file_hdr, int in_file_des) + { +@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd + { + if (archive_format != arf_tar && archive_format != arf_ustar) + { +- char *link_name = NULL; /* Name of hard and symbolic links. */ +- +- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); +- link_name[file_hdr->c_filesize] = '\0'; +- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); +- long_format (file_hdr, link_name); +- free (link_name); +- tape_skip_padding (in_file_des, file_hdr->c_filesize); +- return; ++ char *link_name = get_link_name (file_hdr, in_file_des); ++ if (link_name) ++ { ++ long_format (file_hdr, link_name); ++ free (link_name); ++ } + } + else +- { + long_format (file_hdr, file_hdr->c_tar_linkname); +- return; +- } ++ return; + } + else + #endif +@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_ + + if (archive_format != arf_tar && archive_format != arf_ustar) + { +- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); +- link_name[file_hdr->c_filesize] = '\0'; +- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); +- tape_skip_padding (in_file_des, file_hdr->c_filesize); ++ link_name = get_link_name (file_hdr, in_file_des); + } + else + { +diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am +--- cpio-2.11.orig/tests/Makefile.am 2010-02-15 18:02:23.000000000 +0800 ++++ cpio-2.11/tests/Makefile.am 2014-12-08 13:14:49.931545727 +0800 +@@ -52,6 +52,8 @@ TESTSUITE_AT = \ + setstat04.at\ + setstat05.at\ + symlink.at\ ++ symlink-bad-length.at\ ++ symlink-long.at\ + version.at + + TESTSUITE = $(srcdir)/testsuite +diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at +--- cpio-2.11.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 ++++ cpio-2.11/tests/symlink-bad-length.at 2014-12-08 13:17:45.979538847 +0800 +@@ -0,0 +1,49 @@ ++# Process this file with autom4te to create testsuite. -*- Autotest -*- ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++# 02110-1301 USA. ++ ++# Cpio v2.11 did segfault with badly set symlink length. ++# References: ++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html ++ ++AT_SETUP([symlink-bad-length]) ++AT_KEYWORDS([symlink-long copyout]) ++ ++AT_DATA([ARCHIVE.base64], ++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv ++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF ++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= ++]) ++ ++AT_CHECK([ ++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST ++cpio -ntv < ARCHIVE ++test $? -eq 2 ++], ++[0], ++[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE ++],[cpio: LINK: stored filename length too big ++cpio: premature end of file ++]) ++ ++AT_CLEANUP +diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at +--- cpio-2.11.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 ++++ cpio-2.11/tests/symlink-long.at 2014-12-08 13:17:57.219538408 +0800 +@@ -0,0 +1,46 @@ ++# Process this file with autom4te to create testsuite. -*- Autotest -*- ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++# 02110-1301 USA. ++ ++# Cpio v2.11.90 changed the way symlink name is read from archive. ++# References: ++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html ++ ++AT_SETUP([symlink-long]) ++AT_KEYWORDS([symlink-long copyout]) ++ ++AT_CHECK([ ++ ++# len(dirname) > READBUFSIZE ++dirname= ++for i in {1..52}; do ++ dirname="xxxxxxxxx/$dirname" ++ mkdir "$dirname" ++done ++ln -s "$dirname" x || AT_SKIP_TEST ++ ++echo x | cpio -o > ar ++list=`cpio -tv < ar | sed 's|.*-> ||'` ++test "$list" = "$dirname" && echo success || echo fail ++], ++[0], ++[success ++],[2 blocks ++2 blocks ++]) ++ ++AT_CLEANUP +diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at +--- cpio-2.11.orig/tests/testsuite.at 2010-02-15 18:02:23.000000000 +0800 ++++ cpio-2.11/tests/testsuite.at 2014-12-08 13:15:13.515544805 +0800 +@@ -31,6 +31,8 @@ m4_include([version.at]) + + m4_include([inout.at]) + m4_include([symlink.at]) ++m4_include([symlink-bad-length.at]) ++m4_include([symlink-long.at]) + m4_include([interdir.at]) + + m4_include([setstat01.at]) 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 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +Index: cpio-2.11/gnu/stdio.in.h +=================================================================== +--- cpio-2.11.orig/gnu/stdio.in.h 2012-07-04 12:13:43.133066247 -0700 ++++ cpio-2.11/gnu/stdio.in.h 2012-07-04 12:14:10.189067564 -0700 +@@ -138,8 +138,10 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # 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 @@ +Avoid multiple stat definitions +Patch taken from cpio mailing list posting 2010-03-19 + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h +--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 ++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 +@@ -82,4 +82,6 @@ + #define lstat stat + #endif + int lstat (); ++#ifndef stat + int stat (); ++#endif diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch new file mode 100644 index 0000000000..49a7cf52a6 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch @@ -0,0 +1,25 @@ +Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] + +This patch avoids heap overflow reported by : +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 + +This is a clean patch for the GPLv2 tar recipe. + +the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio +recipe, as they share code. + +Nitin A Kamble 2011/04/25 + +Index: tar-1.17/lib/rtapelib.c +=================================================================== +--- tar-1.17.orig/lib/rtapelib.c ++++ tar-1.17/lib/rtapelib.c +@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si + + sprintf (command_buffer, "R%lu\n", (unsigned long) length); + if (do_command (handle, command_buffer) == -1 +- || (status = get_status (handle)) == SAFE_READ_ERROR) ++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) + return SAFE_READ_ERROR; + + for (counter = 0; counter < status; counter += rlen, buffer += rlen) diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch new file mode 100644 index 0000000000..0148e70797 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch @@ -0,0 +1,217 @@ +cpio: Fix memory overrun on reading improperly created link records + +Signed-off-by: Bian Naimeng + +http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d + + * src/copyin.c (get_link_name): New function. + (list_file, copyin_link): use get_link_name + + * tests/symlink-bad-length.at: New file. + * tests/symlink-long.at: New file. + * tests/Makefile.am: Add new files. + * tests/testsuite.at: Likewise. + + See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html + +Upstream-Status: Backport + +Signed-off-by: Sergey Poznyakoff + +diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c +--- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800 ++++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800 +@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int + } + + ++static char * ++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) ++{ ++ off_t n = file_hdr->c_filesize + 1; ++ char *link_name; ++ ++ if (n == 0 || n > SIZE_MAX) ++ { ++ error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); ++ link_name = NULL; ++ } ++ else ++ { ++ link_name = xmalloc (n); ++ tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); ++ link_name[file_hdr->c_filesize] = '\0'; ++ tape_skip_padding (in_file_des, file_hdr->c_filesize); ++ } ++ return link_name; ++} ++ ++ + static void + list_file(struct cpio_file_stat* file_hdr, int in_file_des) + { +@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd + { + if (archive_format != arf_tar && archive_format != arf_ustar) + { +- char *link_name = NULL; /* Name of hard and symbolic links. */ +- +- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); +- link_name[file_hdr->c_filesize] = '\0'; +- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); +- long_format (file_hdr, link_name); +- free (link_name); +- tape_skip_padding (in_file_des, file_hdr->c_filesize); +- return; ++ char *link_name = get_link_name (file_hdr, in_file_des); ++ if (link_name) ++ { ++ long_format (file_hdr, link_name); ++ free (link_name); ++ } + } + else +- { + long_format (file_hdr, file_hdr->c_tar_linkname); +- return; +- } ++ return; + } + else + #endif +@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_ + + if (archive_format != arf_tar && archive_format != arf_ustar) + { +- link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); +- link_name[file_hdr->c_filesize] = '\0'; +- tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); +- tape_skip_padding (in_file_des, file_hdr->c_filesize); ++ link_name = get_link_name (file_hdr, in_file_des); + } + else + { +diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am +--- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800 ++++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800 +@@ -45,6 +45,8 @@ TESTSUITE_AT = \ + testsuite.at\ + inout.at\ + symlink.at\ ++ symlink-bad-length.at\ ++ symlink-long.at\ + version.at + + TESTSUITE = $(srcdir)/testsuite +diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at +--- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 ++++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800 +@@ -0,0 +1,49 @@ ++# Process this file with autom4te to create testsuite. -*- Autotest -*- ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++# 02110-1301 USA. ++ ++# Cpio v2.11 did segfault with badly set symlink length. ++# References: ++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html ++ ++AT_SETUP([symlink-bad-length]) ++AT_KEYWORDS([symlink-long copyout]) ++ ++AT_DATA([ARCHIVE.base64], ++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv ++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF ++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= ++]) ++ ++AT_CHECK([ ++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST ++cpio -ntv < ARCHIVE ++test $? -eq 2 ++], ++[0], ++[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE ++],[cpio: LINK: stored filename length too big ++cpio: premature end of file ++]) ++ ++AT_CLEANUP +diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at +--- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 ++++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800 +@@ -0,0 +1,46 @@ ++# Process this file with autom4te to create testsuite. -*- Autotest -*- ++# Copyright (C) 2014 Free Software Foundation, Inc. ++ ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++# 02110-1301 USA. ++ ++# Cpio v2.11.90 changed the way symlink name is read from archive. ++# References: ++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html ++ ++AT_SETUP([symlink-long]) ++AT_KEYWORDS([symlink-long copyout]) ++ ++AT_CHECK([ ++ ++# len(dirname) > READBUFSIZE ++dirname= ++for i in {1..52}; do ++ dirname="xxxxxxxxx/$dirname" ++ mkdir "$dirname" ++done ++ln -s "$dirname" x || AT_SKIP_TEST ++ ++echo x | cpio -o > ar ++list=`cpio -tv < ar | sed 's|.*-> ||'` ++test "$list" = "$dirname" && echo success || echo fail ++], ++[0], ++[success ++],[2 blocks ++2 blocks ++]) ++ ++AT_CLEANUP +diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at +--- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800 ++++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800 +@@ -31,3 +31,5 @@ m4_include([version.at]) + + m4_include([inout.at]) + m4_include([symlink.at]) ++m4_include([symlink-bad-length.at]) ++m4_include([symlink-long.at]) 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 @@ +Upstream-Status: Inappropriate [licensing] + +# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. +# This is needed to configure correctly with newer versions of autoconf. + +diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 +--- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 ++++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 +@@ -1,4 +1,4 @@ +-# serial 4 -*- Autoconf -*- ++# serial 5 -*- Autoconf -*- + # Enable extensions on systems that normally disable them. + + # Copyright (C) 2003, 2006 Free Software Foundation, Inc. +@@ -16,6 +16,7 @@ + # ------------------------ + # Enable extensions on systems that normally disable them, + # typically due to standards-conformance issues. ++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ + AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], + [ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +@@ -48,7 +49,7 @@ + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +-]) ++])]) + + # gl_USE_SYSTEM_EXTENSIONS + # ------------------------ diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch new file mode 100644 index 0000000000..a00799fea9 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch @@ -0,0 +1,15 @@ +Upstream-Status: Inappropriate [licensing] + +# Avoid multiple stat definitions +# Patch taken from cpio mailing list posting 2010-03-19 + +diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h +--- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 ++++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 +@@ -82,4 +82,6 @@ + #define lstat stat + #endif + int lstat (); ++#ifndef stat + int stat (); ++#endif diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb new file mode 100644 index 0000000000..053888f1c0 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.11.bb @@ -0,0 +1,14 @@ +include cpio_v2.inc + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +PR = "r5" + +SRC_URI += "file://remove-gets.patch \ + file://fix-memory-overrun.patch \ + file://cpio-CVE-2015-1197.patch \ + " + +SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" +SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978" diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb new file mode 100644 index 0000000000..3f97dbe2ce --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_2.8.bb @@ -0,0 +1,17 @@ +require cpio_v2.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" + +PR = "r4" + +SRC_URI += "file://m4extensions.patch \ + file://avoid_heap_overflow.patch \ + file://fix-memory-overrun.patch \ + " + +SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" +SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" + +# Required to build with gcc 4.3 and later: +CFLAGS += "-fgnu89-inline" diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc new file mode 100644 index 0000000000..93de4bb92b --- /dev/null +++ b/meta/recipes-extended/cpio/cpio_v2.inc @@ -0,0 +1,40 @@ +SUMMARY = "GNU cpio is a program to manage archives of files" +DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \ +another. It handles a number of cpio formats as well as reading and writing tar files." +HOMEPAGE = "http://www.gnu.org/software/cpio/" +SECTION = "base" + +DEPENDS = "texinfo-native" + +SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ + file://statdef.patch \ + " + +inherit autotools gettext texinfo + +S = "${WORKDIR}/cpio-${PV}" + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" + +do_install () { + autotools_do_install + install -d ${D}${base_bindir}/ + mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio" + rmdir ${D}${bindir}/ +} + +PACKAGES =+ "${PN}-rmt" + +FILES_${PN}-rmt = "${base_sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "cpio" +ALTERNATIVE_${PN}-rmt = "rmt" + +ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio" + +ALTERNATIVE_PRIORITY[rmt] = "50" +ALTERNATIVE_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 @@ +From dae29a98c066bc67bb5ba12219d5fd68a8675514 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Fri, 26 Apr 2013 20:44:10 +0800 +Subject: [PATCH] packlib.c: support dictionary byte-order dependent + +The previous dict files are NOT byte-order independent, in fact they are +probably ARCHITECTURE SPECIFIC. +Create the dict files in big endian, and convert to host endian while +load them. This could fix the endian issue on multiple platform. + +Signed-off-by: Hongxu Jia +Upstream-Status: Pending + +We can't use the endian.h, htobe* and be*toh functions because they are +not available on older versions of glibc, such as that found in RHEL +5.9. + +Change to checking endian and directly calling bswap_* as defined in +byteswap.h. + +Signed-off-by: Mark Hatle + +--- + lib/packlib.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 204 insertions(+), 4 deletions(-) + +Index: cracklib-2.8.22/lib/packlib.c +=================================================================== +--- cracklib-2.8.22.orig/lib/packlib.c ++++ cracklib-2.8.22/lib/packlib.c +@@ -16,6 +16,12 @@ + #ifdef HAVE_STDINT_H + #include + #endif ++ ++#ifndef _BSD_SOURCE ++#define _BSD_SOURCE /* See feature_test_macros(7) */ ++#endif ++#include ++#include + #include "packer.h" + + static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993"; +@@ -45,6 +51,182 @@ typedef struct + char data_get[NUMWORDS][MAXWORDLEN]; + } PWDICT64; + ++enum{ ++ en_is32, ++ en_is64 ++}; ++ ++static int ++IheaderHostToBigEndian(char *pHeader, int nBitType) ++{ ++ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader; ++ ++ pHeader64->pih_magic = bswap_64(pHeader64->pih_magic); ++ pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords); ++ pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen); ++ pHeader64->pih_pad = bswap_16(pHeader64->pih_pad); ++ ++#if DEBUG ++ printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n", ++ pHeader64->pih_magic, pHeader64->pih_numwords, ++ pHeader64->pih_blocklen, pHeader64->pih_pad); ++#endif ++ } ++ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ struct pi_header *pHeader32 = (struct pi_header*)pHeader; ++ ++ pHeader32->pih_magic = bswap_32(pHeader32->pih_magic); ++ pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords); ++ pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen); ++ pHeader32->pih_pad = bswap_16(pHeader32->pih_pad); ++ ++#if DEBUG ++ printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n", ++ pHeader32->pih_magic, pHeader32->pih_numwords, ++ pHeader32->pih_blocklen, pHeader32->pih_pad); ++#endif ++ } ++ else if (__BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); ++ return (-1); ++ } ++ ++ return 0; ++} ++ ++static int ++IheaderBigEndianToHost(char *pHeader, int nBitType) ++{ ++ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader; ++ ++ pHeader64->pih_magic = bswap_64(pHeader64->pih_magic); ++ pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords); ++ pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen); ++ pHeader64->pih_pad = bswap_16(pHeader64->pih_pad); ++ ++#if DEBUG ++ printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n", ++ pHeader64->pih_magic, pHeader64->pih_numwords, ++ pHeader64->pih_blocklen, pHeader64->pih_pad); ++#endif ++ } ++ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ struct pi_header *pHeader32 = (struct pi_header*)pHeader; ++ ++ pHeader32->pih_magic = bswap_32(pHeader32->pih_magic); ++ pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords); ++ pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen); ++ pHeader32->pih_pad = bswap_16(pHeader32->pih_pad); ++ ++#if DEBUG ++ printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n", ++ pHeader32->pih_magic, pHeader32->pih_numwords, ++ pHeader32->pih_blocklen, pHeader32->pih_pad); ++#endif ++ } ++ else if (__BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); ++ return (-1); ++ } ++ ++ return 0; ++} ++ ++static int ++HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType) ++{ ++ int i = 0; ++ ++ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ uint64_t *pHwms64 = (uint64_t*)pHwms; ++ ++ for (i = 0; i < nLen / sizeof(uint64_t); i++) ++ { ++ *pHwms64++ = bswap_64(*pHwms64); ++ } ++ ++ } ++ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ uint32_t *pHwms32 = (uint32_t*)pHwms; ++ ++ for (i = 0; i < nLen / sizeof(uint32_t); i++) ++ { ++ *pHwms32++ = bswap_32(*pHwms32); ++ } ++ ++ } ++ else if (__BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); ++ return (-1); ++ } ++ ++#if DEBUG ++ for (i = 0; i < nLen; i+=8) ++ { ++ printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n", ++ nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF, ++ pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF, ++ pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF); ++ } ++#endif ++ ++ return 0; ++} ++ ++static int ++HwmsBigEndianToHost(char *pHwms, int nLen, int nBitType) ++{ ++ int i = 0; ++ ++ if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ uint64_t *pHwms64 = (uint64_t*)pHwms; ++ ++ for (i = 0; i < nLen / sizeof(uint64_t); i++) ++ { ++ *pHwms64++ = bswap_64(*pHwms64); ++ } ++ ++ } ++ else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ uint32_t *pHwms32 = (uint32_t*)pHwms; ++ ++ for (i = 0; i < nLen / sizeof(uint32_t); i++) ++ { ++ *pHwms32++ = bswap_32(*pHwms32); ++ } ++ ++ } ++ else if (__BYTE_ORDER == __LITTLE_ENDIAN) ++ { ++ fprintf(stderr, "Neither 32 or 64: %d\n", nBitType); ++ return (-1); ++ } ++ ++#if DEBUG ++ for (i = 0; i < nLen; i+=8) ++ { ++ printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n", ++ nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF, ++ pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF, ++ pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF); ++ } ++#endif ++ ++ return 0; ++} + + static int + _PWIsBroken64(FILE *ifp) +@@ -57,6 +239,7 @@ _PWIsBroken64(FILE *ifp) + return 0; + } + ++ IheaderBigEndianToHost((char *) &pdesc64.header, en_is64); + return (pdesc64.header.pih_magic == PIH_MAGIC); + } + +@@ -149,7 +332,11 @@ PWOpen(prefix, mode) + pdesc.header.pih_blocklen = NUMWORDS; + pdesc.header.pih_numwords = 0; + +- fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp); ++ struct pi_header tmpheader32; ++ ++ memcpy(&tmpheader32, &pdesc.header, sizeof(pdesc.header)); ++ IheaderHostToBigEndian((char *) &tmpheader32, en_is32); ++ fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, ifp); + } else + { + pdesc.flags &= ~PFOR_WRITE; +@@ -173,6 +360,7 @@ PWOpen(prefix, mode) + return ((PWDICT *) 0); + } + ++ IheaderBigEndianToHost((char *) &pdesc.header, en_is32); + if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0)) + { + /* uh-oh. either a broken "64-bit" file or a garbage file. */ +@@ -195,6 +383,7 @@ PWOpen(prefix, mode) + } + return ((PWDICT *) 0); + } ++ IheaderBigEndianToHost((char *) &pdesc64.header, en_is64); + if (pdesc64.header.pih_magic != PIH_MAGIC) + { + /* nope, not "64-bit" after all */ +@@ -290,6 +479,7 @@ PWOpen(prefix, mode) + { + pdesc.flags &= ~PFOR_USEHWMS; + } ++ HwmsBigEndianToHost((char*)pdesc64.hwms, sizeof(pdesc64.hwms), en_is64); + for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++) + { + pdesc.hwms[i] = pdesc64.hwms[i]; +@@ -299,6 +489,7 @@ PWOpen(prefix, mode) + { + pdesc.flags &= ~PFOR_USEHWMS; + } ++ HwmsBigEndianToHost((char*)pdesc.hwms, sizeof(pdesc.hwms), en_is32); + #if DEBUG + for (i=1; i<=0xff; i++) + { +@@ -332,7 +523,11 @@ PWClose(pwp) + return (-1); + } + +- if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp)) ++ struct pi_header tmpheader32; ++ ++ memcpy(&tmpheader32, &pwp->header, sizeof(pwp->header)); ++ IheaderHostToBigEndian((char *) &tmpheader32, en_is32); ++ if (!fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, pwp->ifp)) + { + fprintf(stderr, "index magic fwrite failed\n"); + return (-1); +@@ -351,7 +546,12 @@ PWClose(pwp) + printf("hwm[%02x] = %d\n", i, pwp->hwms[i]); + #endif + } +- fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp); ++ ++ PWDICT tmp_pwp; ++ ++ memcpy(&tmp_pwp, pwp, sizeof(PWDICT)); ++ HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32); ++ fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp); + } + } + +@@ -405,7 +605,8 @@ PutPW(pwp, string) + + datum = (uint32_t) ftell(pwp->dfp); + +- fwrite((char *) &datum, sizeof(datum), 1, pwp->ifp); ++ uint32_t tmpdatum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum; ++ fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp); + + fputs(pwp->data_put[0], pwp->dfp); + putc(0, pwp->dfp); +@@ -473,6 +674,7 @@ GetPW(pwp, number) + perror("(index fread failed)"); + return ((char *) 0); + } ++ datum64 = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_64(datum64) : datum64; + datum = datum64; + } else { + if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0)) +@@ -486,6 +688,7 @@ GetPW(pwp, number) + perror("(index fread failed)"); + return ((char *) 0); + } ++ datum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum; + } + + 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 @@ +From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Sat, 27 Apr 2013 16:02:30 +0800 +Subject: [PATCH] craklib:fix testnum and teststr failed + +Error log: +... +$ ./testnum +(null).pwd.gz: No such file or directory +PWOpen: No such file or directory + +$ ./util/teststr +(null).pwd.gz: No such file or directory +PWOpen: No such file or directory +... +Set DEFAULT_CRACKLIB_DICT as the path of PWOpen + +Signed-off-by: Hongxu Jia +Upstream-Status: Pending +--- + util/testnum.c | 2 +- + util/teststr.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/util/testnum.c b/util/testnum.c +index ae2246d..ca210ff 100644 +--- a/util/testnum.c ++++ b/util/testnum.c +@@ -20,7 +20,7 @@ main () + PWDICT *pwp; + char buffer[STRINGSIZE]; + +- if (!(pwp = PWOpen (NULL, "r"))) ++ if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) + { + perror ("PWOpen"); + return (-1); +diff --git a/util/teststr.c b/util/teststr.c +index 2a31fa4..9fb9cda 100644 +--- a/util/teststr.c ++++ b/util/teststr.c +@@ -15,7 +15,7 @@ main () + PWDICT *pwp; + char buffer[STRINGSIZE]; + +- if (!(pwp = PWOpen (NULL, "r"))) ++ if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r"))) + { + perror ("PWOpen"); + return (-1); +-- +1.7.10.4 + 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..99ccde3ba3 --- /dev/null +++ b/meta/recipes-extended/cracklib/cracklib_2.9.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "Password strength checker library" +HOMEPAGE = "http://sourceforge.net/projects/cracklib" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" + +DEPENDS = "cracklib-native zlib" +DEPENDS_class-native = "zlib-native" + +EXTRA_OECONF = "--without-python --libdir=${base_libdir}" + +SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \ + file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \ + file://0002-craklib-fix-testnum-and-teststr-failed.patch" + +SRC_URI[md5sum] = "90536219c520add2ceb3c26f0d7da404" +SRC_URI[sha256sum] = "408905c2539a97dc8cbbb6d7cd2046cb5647a345b4bda399220d9471be16d156" + +inherit autotools-brokensep gettext + +do_install_append_class-target() { + create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small +} + +BBCLASSEXTEND = "native nativesdk" 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 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: crond crontab +# Default-Start: 2345 +# Default-Stop: 016 +# Short-Description: run cron daemon +# Description: cron is a standard UNIX program that runs user-specified +# programs at periodic scheduled times. vixie cron adds a +# number of features to the basic UNIX cron, including better +# security and more powerful configuration options. +### END INIT INFO + +CROND=/usr/sbin/crond +CONFIG=/etc/sysconfig/crond + +[ -f $CONFIG ] || exit 1 +[ -x $CROND ] || exit 1 + +. $CONFIG + +# Source function library. +. /etc/init.d/functions + +case "$1" in + start) + echo -n "Starting crond: " + start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + else + echo "FAIL" + fi + ;; + stop) + echo -n "Stopping crond: " + start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + else + echo "FAIL" + fi + ;; + status) + status crond + exit $? + ;; + restart) + $0 stop && sleep 1 && $0 start + ;; + *) + echo "Usage: /etc/init.d/crond {start|stop|status|restart}" + exit 1 +esac + +exit 0 + diff --git a/meta/recipes-extended/cronie/cronie/crond.service b/meta/recipes-extended/cronie/cronie/crond.service new file mode 100644 index 0000000000..d435a6eb34 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crond.service @@ -0,0 +1,11 @@ +[Unit] +Description=Periodic Command Scheduler + +[Service] +EnvironmentFile=/etc/sysconfig/crond +ExecStart=@SBINDIR@/crond -n $CRONDARGS +ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target 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 @@ +password-auth is the Fedora's common pam configure file, use oe common pam +configure files instead. + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan +--- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800 ++++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800 +@@ -4,7 +4,7 @@ + # + # No PAM authentication called, auth modules not needed + account required pam_access.so +-account include password-auth ++account include common-account + session required pam_loginuid.so +-session include password-auth +-auth include password-auth ++session include common-session-noninteractive ++auth include common-auth diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab new file mode 100644 index 0000000000..cc9169eda9 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie/crontab @@ -0,0 +1,10 @@ +# /etc/crontab: system-wide crontab +# Unlike any other crontab you don't have to run the `crontab' +# command to install the new version when you edit this file +# and files in /etc/cron.d. These files also have username fields, +# that none of the other crontabs do. + +SHELL=/bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +# m h dom mon dow user command diff --git a/meta/recipes-extended/cronie/cronie/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 @@ +For an out of tree build, the cronie-common.h file was not being +found correctly, so point it to the top_srcdir + +Upstream-Status: Submitted + +Signed-off-by: Saul Wold + +Index: cronie-1.4.11/anacron/Makefile.am +=================================================================== +--- cronie-1.4.11.orig/anacron/Makefile.am ++++ cronie-1.4.11/anacron/Makefile.am +@@ -9,6 +9,7 @@ common_nodist = anacron-paths.h + nodist_anacron_SOURCES = $(common_nodist) + BUILT_SOURCES = $(common_nodist) + ++AM_CFLAGS = -I$(top_srcdir) + + LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) + +Index: cronie-1.4.11/src/Makefile.am +=================================================================== +--- cronie-1.4.11.orig/src/Makefile.am ++++ cronie-1.4.11/src/Makefile.am +@@ -15,6 +15,7 @@ nodist_crond_SOURCES = $(common_nodist) + nodist_crontab_SOURCES = $(common_nodist) + BUILT_SOURCES = $(common_nodist) + ++AM_CFLAGS = -I$(top_srcdir) + + LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT) + 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..02234f6a36 --- /dev/null +++ b/meta/recipes-extended/cronie/cronie_1.4.11.bb @@ -0,0 +1,85 @@ +SUMMARY = "Cron daemon for executing programs at set times" +DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \ +specified programs at scheduled times and related tools. It is based on the \ +original cron and has security and configuration enhancements like the \ +ability to use pam and SELinux." +HOMEPAGE = "https://fedorahosted.org/cronie/" +BUGTRACKER = "mmaslano@redhat.com" + +# Internet Systems Consortium License +LICENSE = "ISC & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=963ea0772a2adbdcd607a9b2ec320c11 \ + file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \ + file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9" + +SECTION = "utils" + + +SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \ + file://fix-out-of-tree-build.patch \ + file://crond.init \ + file://crontab \ + file://crond.service \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + +PAM_SRC_URI = "file://crond_pam_config.patch" +PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid" + +SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f" +SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be" + +inherit autotools update-rc.d useradd systemd + + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" + +PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}" + + +INITSCRIPT_NAME = "crond" +INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system crontab" + +SYSTEMD_SERVICE_${PN} = "crond.service" + +do_install_append () { + install -d ${D}${sysconfdir}/sysconfig/ + install -d ${D}${sysconfdir}/init.d/ + install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond + install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond + + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/crond.service + + # below are necessary for a complete cron environment + install -d ${D}${localstatedir}/spool/cron + install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/ + mkdir -p ${D}${sysconfdir}/cron.d + mkdir -p ${D}${sysconfdir}/cron.hourly + mkdir -p ${D}${sysconfdir}/cron.daily + mkdir -p ${D}${sysconfdir}/cron.weekly + mkdir -p ${D}${sysconfdir}/cron.monthly + touch ${D}${sysconfdir}/cron.deny + + # below setting is necessary to allow normal user using crontab + + # setgid for crontab binary + chown root:crontab ${D}${bindir}/crontab + chmod 2755 ${D}${bindir}/crontab + + # allow 'crontab' group write to /var/spool/cron + chown root:crontab ${D}${localstatedir}/spool/cron + chmod 770 ${D}${localstatedir}/spool/cron + + chmod 600 ${D}${sysconfdir}/crontab +} + +FILES_${PN} += "${sysconfdir}/cron*" + diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc new file mode 100644 index 0000000000..fbdc48eab1 --- /dev/null +++ b/meta/recipes-extended/cups/cups.inc @@ -0,0 +1,136 @@ +SUMMARY = "An Internet printing system for Unix" +SECTION = "console/utils" +LICENSE = "GPLv2 & LGPLv2" +DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb" + +SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \ + file://use_echo_only_in_init.patch \ + file://0001-don-t-try-to-run-generated-binaries.patch \ + file://cups_serverbin.patch \ + file://cups-no-gcrypt.patch \ + file://cups.socket \ + file://cups.path \ + file://cups.service \ + " + +LEAD_SONAME = "libcupsdriver.so" + +inherit autotools-brokensep binconfig useradd systemd + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system lpadmin" + +SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" +PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" +PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" + +EXTRA_OECONF = " \ + --enable-gnutls \ + --enable-dbus \ + --enable-browsing \ + --disable-openssl \ + --disable-gssapi \ + --enable-debug \ + --disable-relro \ + --enable-libusb \ + --without-php \ + --without-perl \ + --without-python \ + --without-java \ + " + + +do_configure() { + gnu-configize + libtoolize --force + autoconf --force + DSOFLAGS="${LDFLAGS}" SERVERBIN="${libdir}/cups" oe_runconf +} + +do_compile () { + sed -i s:STRIP:NOSTRIP: Makedefs + sed -i s:serial:: backend/Makefile + + echo "all:" > man/Makefile + echo "libs:" >> man/Makefile + echo "install:" >> man/Makefile + echo "install-data:" >> man/Makefile + echo "install-exec:" >> man/Makefile + echo "install-headers:" >> man/Makefile + echo "install-libs:" >> man/Makefile + + oe_runmake "SSLLIBS=-lgnutls -L${STAGING_LIBDIR}" \ + "LIBPNG=-lpng -lm -L${STAGING_LIBDIR}" \ + "LIBJPEG=-ljpeg -L${STAGING_LIBDIR}" \ + "LIBZ=-lz -L${STAGING_LIBDIR}" \ + "-I." +} + +fakeroot do_install () { + oe_runmake "DSTROOT=${D}" install + + # Remove /var/run from package as cupsd will populate it on startup + rm -fr ${D}/${localstatedir}/run + rmdir ${D}/${libdir}/${BPN}/driver + + # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then + rm -rf ${D}${sysconfdir}/init.d/ + rm -rf ${D}${sysconfdir}/rc* + fi + + # Install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service +} + +python do_package_append() { + import subprocess + # Change permissions back the way they were, they probably had a reason... + workdir = d.getVar('WORKDIR', True) + subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True) +} + +PACKAGES =+ "${PN}-lib ${PN}-libimage" + +RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}" +FILES_${PN} += "${libdir}/cups/backend \ + ${libdir}/cups/cgi-bin \ + ${libdir}/cups/filter \ + ${libdir}/cups/monitor \ + ${libdir}/cups/notifier \ + ${libdir}/cups/daemon \ + " + +FILES_${PN}-lib = "${libdir}/libcups.so.*" + +FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*" + +FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \ + ${libdir}/cups/cgi-bin/.debug \ + ${libdir}/cups/filter/.debug \ + ${libdir}/cups/monitor/.debug \ + ${libdir}/cups/notifier/.debug \ + ${libdir}/cups/daemon/.debug \ + " + +#package the html for the webgui inside the main packages (~1MB uncompressed) + +FILES_${PN} += "${datadir}/doc/cups/images \ + ${datadir}/doc/cups/*html \ + ${datadir}/doc/cups/*.css \ + ${datadir}/icons/ \ + " +CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf" + +SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess" +cups_sysroot_preprocess () { + sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:' +} diff --git a/meta/recipes-extended/cups/cups/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 @@ +Upstream-Status: Inappropriate [embedded specific] + +From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 30 Jan 2011 16:37:27 +0100 +Subject: [PATCH] don't try to run generated binaries + +Signed-off-by: Koen Kooi +--- + ppdc/Makefile | 30 +++++++++++++++--------------- + 1 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/ppdc/Makefile b/ppdc/Makefile +index 0288d47..fc87f1b 100644 +--- a/ppdc/Makefile ++++ b/ppdc/Makefile +@@ -243,8 +243,8 @@ genstrings: genstrings.o libcupsppdc.a ../cups/libcups.a \ + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ + libcupsppdc.a ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) \ + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) +- echo Generating localization strings... +- ./genstrings >sample.c ++# echo Generating localization strings... ++# ./genstrings >sample.c + + + # +@@ -261,9 +261,9 @@ ppdc-static: ppdc.o libcupsppdc.a ../cups/libcups.a foo.drv foo-fr.po + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \ + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) +- echo Testing PPD compiler... +- ./ppdc-static -l en,fr -I ../data foo.drv +- ./ppdc-static -l en,fr -z -I ../data foo.drv ++# echo Testing PPD compiler... ++# ./ppdc-static -l en,fr -I ../data foo.drv ++# ./ppdc-static -l en,fr -z -I ../data foo.drv + + + # +@@ -290,16 +290,16 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/libcups.a + ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ + $(COMMONLIBS) $(LIBZ) + echo Testing PPD importer... +- $(RM) -r ppd ppd2 sample-import.drv +- ./ppdc-static -I ../data sample.drv +- ./ppdi-static -I ../data -o sample-import.drv ppd/* +- ./ppdc-static -I ../data -d ppd2 sample-import.drv +- if diff -r ppd ppd2 >/dev/null; then \ +- echo PPD import OK; \ +- else \ +- echo PPD import FAILED; \ +- exit 1; \ +- fi ++# $(RM) -r ppd ppd2 sample-import.drv ++# ./ppdc-static -I ../data sample.drv ++# ./ppdi-static -I ../data -o sample-import.drv ppd/* ++# ./ppdc-static -I ../data -d ppd2 sample-import.drv ++# if diff -r ppd ppd2 >/dev/null; then \ ++# echo PPD import OK; \ ++# else \ ++# echo PPD import FAILED; \ ++# exit 1; \ ++# fi + + + # +-- +1.6.6.1 + diff --git a/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch new file mode 100644 index 0000000000..8bbcf39497 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups-no-gcrypt.patch @@ -0,0 +1,49 @@ +Description: Don't build-depend on libgcrypt, as nothing is used from it +Author: Didier Raboud +Bug-Debian: https://bugs.debian.org/638416 +Bug: http://www.cups.org/str.php?L???? + +[CUPS Ticket #4399] -- http://www.cups.org/str.php?L4399 + +Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch + +Upstream-Status: Backport + +Signed-off-by: Armin Kuster + +Last-Update: 2014-04-07 +--- a/config-scripts/cups-ssl.m4 ++++ b/config-scripts/cups-ssl.m4 +@@ -66,7 +66,6 @@ + dnl Then look for GNU TLS... + if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then + AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) +- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) + if $PKGCONFIG --exists gnutls; then + have_ssl=1 + SSLLIBS=`$PKGCONFIG --libs gnutls` +@@ -84,14 +83,6 @@ + if test $have_ssl = 1; then + CUPS_SERVERCERT="ssl/server.crt" + CUPS_SERVERKEY="ssl/server.key" +- +- if $PKGCONFIG --exists gcrypt; then +- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" +- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" +- elif test "x$LIBGCRYPTCONFIG" != x; then +- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" +- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" +- fi + fi + fi + +--- a/cups/http-private.h ++++ b/cups/http-private.h +@@ -80,7 +80,6 @@ + # elif defined HAVE_GNUTLS + # include + # include +-# include + # elif defined(HAVE_CDSASSL) + # include + # include diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path new file mode 100644 index 0000000000..de8cc57c27 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.path @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printer Service Spool + +[Path] +PathExistsGlob=/var/spool/cups/d* + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service new file mode 100644 index 0000000000..7d3e839867 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.service @@ -0,0 +1,10 @@ +[Unit] +Description=CUPS Printing Service + +[Service] +ExecStart=@SBINDIR@/cupsd -f +PrivateTmp=true + +[Install] +Also=cups.socket cups.path +WantedBy=printer.target diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket new file mode 100644 index 0000000000..33148705d6 --- /dev/null +++ b/meta/recipes-extended/cups/cups/cups.socket @@ -0,0 +1,8 @@ +[Unit] +Description=CUPS Printing Service Sockets + +[Socket] +ListenStream=/var/run/cups/cups.sock + +[Install] +WantedBy=sockets.target 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 @@ +Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches +e.g. ppc64 where base libdir is lib64 this does not go well + +Signed-off-by: Khem Raj +Upstream-Status: Inappropriate [OE config specific] + +Index: cups-1.4.6/config-scripts/cups-directories.m4 +=================================================================== +--- cups-1.4.6.orig/config-scripts/cups-directories.m4 2009-04-12 16:04:51.000000000 -0700 ++++ cups-1.4.6/config-scripts/cups-directories.m4 2012-07-21 12:12:05.896405923 -0700 +@@ -397,7 +397,7 @@ + *) + # All others + INSTALL_SYSV="install-sysv" +- CUPS_SERVERBIN="$exec_prefix/lib/cups" ++ CUPS_SERVERBIN="$libdir/cups" + ;; + esac + +Index: cups-1.4.6/configure +=================================================================== +--- cups-1.4.6.orig/configure 2012-07-21 12:13:34.512405950 -0700 ++++ cups-1.4.6/configure 2012-07-21 12:14:05.724406017 -0700 +@@ -11181,7 +11181,7 @@ + *) + # All others + INSTALL_SYSV="install-sysv" +- CUPS_SERVERBIN="$exec_prefix/lib/cups" ++ CUPS_SERVERBIN="$libdir/cups" + ;; + esac + 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +Index: cups-1.6.1/scheduler/cups.sh.in +=================================================================== +--- cups-1.6.1.orig/scheduler/cups.sh.in ++++ cups-1.6.1/scheduler/cups.sh.in +@@ -67,7 +67,7 @@ case "`uname`" in + ECHO_ERROR=: + ;; + +- Linux*) ++ DisableLinux*) + IS_ON=/bin/true + if test -f /etc/init.d/functions; then + . /etc/init.d/functions diff --git a/meta/recipes-extended/cups/cups_1.7.5.bb b/meta/recipes-extended/cups/cups_1.7.5.bb new file mode 100644 index 0000000000..5538cecfd5 --- /dev/null +++ b/meta/recipes-extended/cups/cups_1.7.5.bb @@ -0,0 +1,6 @@ +require cups.inc + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5e50cb4b8f24b04636b719683a9102d" + +SRC_URI[md5sum] = "5d893edc2957005f78e2b2423fdace2e" +SRC_URI[sha256sum] = "18cb4c6847dbaaaa05c8b35af787f19dd5c7686970b46548e72c711c6f26bd02" diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb new file mode 100644 index 0000000000..4e12169302 --- /dev/null +++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb @@ -0,0 +1,19 @@ +SUMMARY = "Collection of autoconf m4 macros" +SECTION = "base" +HOMEPAGE = "http://cwautomacros.berlios.de/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" + +SRC_URI = "http://download.berlios.de/cwautomacros/cwautomacros-${PV}.tar.bz2" +SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d" +SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121" + +do_configure() { + : +} + +do_install() { + oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install +} + +BBCLASSEXTEND = "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 @@ +Upstream-Status: Pending + +automake 1.12 has depricated automatic de-ANSI-fication support + +this patch avoids these kinds of errors: + +| configure.ac:90: error: automatic de-ANSI-fication support has been removed +| /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... +| /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... +| configure.ac:90: the top level +| autom4te: m4 failed with exit status: 1 + +Signed-Off-By: Nitin A Kamble +2012/05/04 + +Index: diffutils-2.8.1/m4/prereq.m4 +=================================================================== +--- diffutils-2.8.1.orig/m4/prereq.m4 ++++ diffutils-2.8.1/m4/prereq.m4 +@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG], + AC_HEADER_STDC + AC_C_BACKSLASH_A + AC_MBSTATE_T +- AM_C_PROTOTYPES + ]) + + 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 @@ +#!/bin/sh + +make -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..243341aa9c --- /dev/null +++ b/meta/recipes-extended/diffutils/diffutils.inc @@ -0,0 +1,18 @@ +SUMMARY = "Diffutils contains tools used for finding differences between files" +DESCRIPTION = "Diffutils contains the GNU diff, diff3, \ +sdiff, and cmp utilities. These programs are usually \ +used for creating patch files." +SECTION = "base" + +inherit autotools texinfo update-alternatives gettext + +# diffutils assumes non-glibc compilation with uclibc and +# this causes it to generate its own implementations of +# standard functionality. regex.c actually breaks compilation +# because it uses __mempcpy, there are other things (TBD: +# see diffutils.mk in buildroot) +EXTRA_OECONF_libc-uclibc = "--without-included-regex" + +ALTERNATIVE_${PN} = "diff cmp" +ALTERNATIVE_PRIORITY = "100" + 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 @@ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +require diffutils.inc + +PR = "r7.0" + +SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \ + file://diffutils_fix_for_automake-1.12.patch" + +SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428" +SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a" + +do_configure_prepend () { + chmod u+w ${S}/po/Makefile.in.in +} 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 @@ +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +require diffutils.inc + +SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ + file://run-ptest \ +" + +do_configure_prepend () { + # Need to remove gettext macros with weird mix of versions + 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 + rm -f ${S}/m4/$i + done +} + +SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3" +SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c" + +inherit ptest + +do_install_ptest() { + t=${D}${PTEST_PATH} + install -D ${S}/build-aux/test-driver $t/build-aux/test-driver + cp -r ${S}/tests $t/ + install ${B}/tests/Makefile $t/tests/ + sed -e 's|^Makefile:|_Makefile:|' \ + -e 's|bash|sh|' \ + -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \ + -e 's|^srcdir = \(.*\)|srcdir = .|' \ + -e 's|"`$(built_programs)`"|diff|' \ + -e 's|gawk|awk|g' \ + -i $t/tests/Makefile +} 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..143e636546 --- /dev/null +++ b/meta/recipes-extended/ed/ed_0.5.bb @@ -0,0 +1,21 @@ +SUMMARY = "Line-oriented text editor" +HOMEPAGE = "http://www.gnu.org/software/ed/" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ + file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" + +PR = "r2" +SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" + +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" + +inherit autotools texinfo + +EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" + +CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}" +CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}" + + diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb new file mode 100644 index 0000000000..8e94eedea6 --- /dev/null +++ b/meta/recipes-extended/ed/ed_1.9.bb @@ -0,0 +1,31 @@ +SUMMARY = "Line-oriented text editor" +HOMEPAGE = "http://www.gnu.org/software/ed/" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ + file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \ + file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96" + +SECTION = "base" + +# LSB states that ed should be in /bin/ +bindir = "${base_bindir}" + +SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz" + +SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d" +SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88" + +inherit texinfo + +do_configure() { + ${S}/configure +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}${infodir}/dir" ]; then + rm -f ${D}${infodir}/dir + fi +} 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..bf66267e81 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch @@ -0,0 +1,19 @@ +ptest needs buildtest-TESTS and runtest-TESTS targets. +serial-tests is required to generate those targets. + +Signed-off-by: Tudor Florea +Upstream-Status: Inappropriate +(default automake behavior incompatible with ptest) + +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2014-05-28 18:19:13.513980977 +0200 ++++ b/configure.ac 2014-05-28 18:19:21.129660215 +0200 +@@ -2,7 +2,7 @@ + AC_INIT(ethtool, 3.14, netdev@vger.kernel.org) + AC_PREREQ(2.52) + AC_CONFIG_SRCDIR([ethtool.c]) +-AM_INIT_AUTOMAKE([gnu]) ++AM_INIT_AUTOMAKE([gnu serial-tests]) + AC_CONFIG_HEADERS([ethtool-config.h]) + + AM_MAINTAINER_MODE diff --git a/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch new file mode 100644 index 0000000000..bb96a18d82 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool/ethtool-uint.patch @@ -0,0 +1,50 @@ +Fix build with musl by using correct uint type names. + +This patch is taken from Sabotage Linux, the license statement for patches and +build scripts in Sabotage Linux says: + + To the extent possible under law, Christian Neukirchen has waived + all copyright and related or neighboring rights to this work. + + http://creativecommons.org/publicdomain/zero/1.0/ + +Therefore this should be good to include in OpenEmbedded. + +Signed-off-by: Paul Barker + +Upstream-status: Pending + +diff -u ethtool-3.14.org/internal.h ethtool-3.14/internal.h +--- ethtool-3.14.org/internal.h ++++ ethtool-3.14/internal.h +@@ -7,6 +7,7 @@ + #include "ethtool-config.h" + #endif + #include ++#include + #include + #include + #include +@@ -17,16 +18,16 @@ + + /* ethtool.h expects these to be defined by */ + #ifndef HAVE_BE_TYPES +-typedef __uint16_t __be16; +-typedef __uint32_t __be32; ++typedef uint16_t __be16; ++typedef uint32_t __be32; + typedef unsigned long long __be64; + #endif + + typedef unsigned long long u64; +-typedef __uint32_t u32; +-typedef __uint16_t u16; +-typedef __uint8_t u8; +-typedef __int32_t s32; ++typedef uint32_t u32; ++typedef uint16_t u16; ++typedef uint8_t u8; ++typedef int32_t s32; + + #include "ethtool-copy.h" + #include "net_tstamp-copy.h" 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 @@ +#!/bin/sh +make -k runtest-TESTS diff --git a/meta/recipes-extended/ethtool/ethtool_3.15.bb b/meta/recipes-extended/ethtool/ethtool_3.15.bb new file mode 100644 index 0000000000..8cd10dfb43 --- /dev/null +++ b/meta/recipes-extended/ethtool/ethtool_3.15.bb @@ -0,0 +1,31 @@ +SUMMARY = "Display or change ethernet card settings" +DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces." +HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/" +SECTION = "console/network" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216" + +SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ + file://run-ptest \ + file://avoid_parallel_tests.patch \ + file://ethtool-uint.patch \ + " + +SRC_URI[md5sum] = "7e94dd958bcd639aad2e5a752e108b24" +SRC_URI[sha256sum] = "562e3cc675cf5b1ac655cd060f032943a2502d4d59e5f278f02aae92562ba261" + +inherit autotools ptest +RDEPENDS_${PN}-ptest += "make" + +do_compile_ptest() { + oe_runmake buildtest-TESTS +} + +do_install_ptest () { + cp ${B}/Makefile ${D}${PTEST_PATH} + install ${B}/test-cmdline ${D}${PTEST_PATH} + install ${B}/test-features ${D}${PTEST_PATH} + install ${B}/ethtool ${D}${PTEST_PATH}/ethtool + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile +} 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 @@ +From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Tue, 17 Sep 2013 16:11:16 +0800 +Subject: [PATCH] findutils: fix doc build error + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang +--- + doc/find.texi | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/doc/find.texi b/doc/find.texi +index 5b5f0cf..b3d9c6b 100644 +--- a/doc/find.texi ++++ b/doc/find.texi +@@ -63,7 +63,7 @@ translation approved by the Foundation. + + @page + @vskip 0pt plus 1filll +-@insertcopying{} ++@insertcopying + @end titlepage + + @contents +@@ -1466,6 +1466,7 @@ no output is ever sent to it. + * Escapes:: + * Format Directives:: + * Time Formats:: ++* Formatting Flags:: + @end menu + + @node Escapes +@@ -1534,7 +1535,6 @@ from the novel you are reading. + * Size Directives:: + * Location Directives:: + * Time Directives:: +-* Formatting Flags:: + @end menu + + @node Name Directives +@@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension. + @end table + + @node Formatting Flags +-@subsubsection Formatting Flags ++@subsection Formatting Flags + + The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} + and @samp{+} flags, but the other directives do not, even if they +-- +1.7.4.1 + 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 @@ +Upstream-Status: Pending + +automake 1.12 has depricated automatic de-ANSI-fication support + +this patch avoids these kinds of errors: + +| configure.in:75: error: automatic de-ANSI-fication support has been removed + +Signed-Off-By: Nitin A Kamble +2012/05/04 + +Index: findutils-4.2.31/configure.in +=================================================================== +--- findutils-4.2.31.orig/configure.in ++++ findutils-4.2.31/configure.in +@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway. + + + AC_ISC_POSIX +-AM_C_PROTOTYPES + + AC_PROG_INSTALL + 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 @@ +Upstream-Status: Inappropriate [legacy version] + +the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE + +against 4.2.31 +07/08/2010 - qhe + +diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 +index 143a9e5..0f27ceb 100644 +--- a/gnulib/m4/extensions.m4 ++++ b/gnulib/m4/extensions.m4 +@@ -12,44 +12,6 @@ + # enough in this area it's likely we'll need to redefine + # AC_USE_SYSTEM_EXTENSIONS for quite some time. + +-# AC_USE_SYSTEM_EXTENSIONS +-# ------------------------ +-# Enable extensions on systems that normally disable them, +-# typically due to standards-conformance issues. +-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], +-[ +- AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +- AC_BEFORE([$0], [AC_RUN_IFELSE]) +- +- AC_REQUIRE([AC_GNU_SOURCE]) +- AC_REQUIRE([AC_AIX]) +- AC_REQUIRE([AC_MINIX]) +- +- AH_VERBATIM([__EXTENSIONS__], +-[/* Enable extensions on Solaris. */ +-#ifndef __EXTENSIONS__ +-# undef __EXTENSIONS__ +-#endif +-#ifndef _POSIX_PTHREAD_SEMANTICS +-# undef _POSIX_PTHREAD_SEMANTICS +-#endif +-#ifndef _TANDEM_SOURCE +-# undef _TANDEM_SOURCE +-#endif]) +- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], +- [ac_cv_safe_to_define___extensions__], +- [AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([ +-# define __EXTENSIONS__ 1 +- AC_INCLUDES_DEFAULT])], +- [ac_cv_safe_to_define___extensions__=yes], +- [ac_cv_safe_to_define___extensions__=no])]) +- test $ac_cv_safe_to_define___extensions__ = yes && +- AC_DEFINE([__EXTENSIONS__]) +- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) +- AC_DEFINE([_TANDEM_SOURCE]) +-]) +- + # gl_USE_SYSTEM_EXTENSIONS + # ------------------------ + # Enable extensions on systems that normally disable them, diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch new file mode 100644 index 0000000000..69c1486cf7 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/01-27017.patch @@ -0,0 +1,781 @@ +Upstream-Status: Backport + +commit af974034b68bf59337c7a384e488a518a77dfecd +Author: James Youngman +Date: Sat Jul 11 19:55:27 2009 +0100 + + Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit coredump. + + Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit + coredumps. + * find/tree.c (set_new_parent): Initialise struct + predicate->arg_text to NULL (instead of leaving it uninitialised). + (get_new_pred_noarg): Likewise. + (get_new_pred): Initialise predicate->arg_text to + "ThisShouldBeSetToSomethingElse" to make it easier to notice + bugs. + (get_new_pred_chk_op): Use get_new_pred_noarg. + (print_predicate): Use an if statement instead of + two ternary operators. + * find/util.c (insert_primary_withpred): Accept new argument, arg, + being the argument (if any) of this predicate. Pass it to + get_new_pred_chk_op. + (insert_primary): Likewise (pass arg to insert_primary_withpred). + (insert_primary_noarg): New function; calls insert_primary with + arg=NULL. + * find/parser.c (collect_arg_stat_info): Add an output parameter; + the filename from which we collected the stat information. + (parse_closeparen, parse_delete, parse_and, parse_or, + parse_comma): Use get_new_pred_noarg. + (parse_cnewer, parse_newer, parse_anewer): Use new + collect_arg_stat_info and insert_primary interface. + (parse_print, parse_prune, parse_nouser, parse_empty): Use + insert_primary_noarg. + (parse_accesscheck, parse_false): Use insert_primary_noarg. + (parse_used, parse_iname, parse_fprint, insert_fprint, + parse_fstype, parse_ilname): Use new collect_arg and + insert_primary interfaces. + (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path, + parse_perm, parse_size, parse_user, parse_time): Use new + collect_arg and insert_primary_withpred interface. + (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface. + (parse_newerXY, parse_nogroup): Use new insert_primary interface. + (insert_regex, parse_samefile): Use new insert_primary_withpred + interface. + (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use + new insert_primary_withpred interface. + * find/defs.h (struct predicate.arg_text): make const. + Add declarations for new function get_new_pred_noarg and + insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op + and insert_primary_withpred. + +diff --git a/ChangeLog b/ChangeLog +index 6e346b8..e8ba0f8 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,0 +1,45 @@ ++2009-07-11 James Youngman ++ ++ Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit ++ coredumps. ++ * find/tree.c (set_new_parent): Initialise struct ++ predicate->arg_text to NULL (instead of leaving it uninitialised). ++ (get_new_pred_noarg): Likewise. ++ (get_new_pred): Initialise predicate->arg_text to ++ "ThisShouldBeSetToSomethingElse" to make it easier to notice ++ bugs. ++ (get_new_pred_chk_op): Use get_new_pred_noarg. ++ (print_predicate): Use an if statement instead of ++ two ternary operators. ++ * find/util.c (insert_primary_withpred): Accept new argument, arg, ++ being the argument (if any) of this predicate. Pass it to ++ get_new_pred_chk_op. ++ (insert_primary): Likewise (pass arg to insert_primary_withpred). ++ (insert_primary_noarg): New function; calls insert_primary with ++ arg=NULL. ++ * find/parser.c (collect_arg_stat_info): Add an output parameter; ++ the filename from which we collected the stat information. ++ (parse_closeparen, parse_delete, parse_and, parse_or, ++ parse_comma): Use get_new_pred_noarg. ++ (parse_cnewer, parse_newer, parse_anewer): Use new ++ collect_arg_stat_info and insert_primary interface. ++ (parse_print, parse_prune, parse_nouser, parse_empty): Use ++ insert_primary_noarg. ++ (parse_accesscheck, parse_false): Use insert_primary_noarg. ++ (parse_used, parse_iname, parse_fprint, insert_fprint, ++ parse_fstype, parse_ilname): Use new collect_arg and ++ insert_primary interfaces. ++ (parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path, ++ parse_perm, parse_size, parse_user, parse_time): Use new ++ collect_arg and insert_primary_withpred interface. ++ (parse_negate, parse_openparen): Use new get_new_pred_chk_op interface. ++ (parse_newerXY, parse_nogroup): Use new insert_primary interface. ++ (insert_regex, parse_samefile): Use new insert_primary_withpred ++ interface. ++ (insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use ++ new insert_primary_withpred interface. ++ * find/defs.h (struct predicate.arg_text): make const. ++ Add declarations for new function get_new_pred_noarg and ++ insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op ++ and insert_primary_withpred. ++ +diff --git a/find/defs.h b/find/defs.h +index 1708d83..4539fd9 100644 +--- a/find/defs.h ++++ b/find/defs.h +@@ -297,7 +297,7 @@ struct predicate + boolean artificial; + + /* The raw text of the argument of this predicate. */ +- char *arg_text; ++ const char *arg_text; + + /* Information needed by the predicate processor. + Next to each member are listed the predicates that use it. */ +@@ -480,13 +480,16 @@ void show_success_rates(const struct predicate *node); + /* tree.c */ + struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options)); + struct predicate * get_eval_tree PARAMS((void)); ++struct predicate *get_new_pred_noarg (const struct parser_table *entry); + struct predicate *get_new_pred PARAMS((const struct parser_table *entry)); +-struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry)); ++struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry, ++ const char *arg)); + float calculate_derived_rates PARAMS((struct predicate *p)); + + /* util.c */ +-struct predicate *insert_primary PARAMS((const struct parser_table *entry)); +-struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr)); ++struct predicate *insert_primary PARAMS((const struct parser_table *entry, const char *arg)); ++struct predicate *insert_primary_noarg PARAMS((const struct parser_table *entry)); ++struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr, const char *arg)); + void usage PARAMS((FILE *fp, int status, char *msg)); + extern boolean check_nofollow(void); + void complete_pending_execs(struct predicate *p); +diff --git a/find/parser.c b/find/parser.c +index 534b670..2e6b989 100644 +--- a/find/parser.c ++++ b/find/parser.c +@@ -640,11 +640,13 @@ collect_arg(char **argv, int *arg_ptr, const char **collected_arg) + } + + static boolean +-collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p) ++collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p, ++ const char **argument) + { + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) + { ++ *argument = filename; + if (0 == (options.xstat)(filename, p)) + { + return true; +@@ -656,6 +658,7 @@ collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p) + } + else + { ++ *argument = NULL; + return false; + } + } +@@ -679,7 +682,7 @@ parse_and (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = get_new_pred (entry); ++ our_pred = get_new_pred_noarg (entry); + our_pred->pred_func = pred_and; + our_pred->p_type = BI_OP; + our_pred->p_prec = AND_PREC; +@@ -691,11 +694,12 @@ static boolean + parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr) + { + struct stat stat_newer; ++ const char *arg; + + set_stat_placeholders(&stat_newer); +- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) ++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, arg); + our_pred->args.reftime.xval = XVAL_ATIME; + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.kind = COMP_GT; +@@ -713,7 +717,7 @@ parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = get_new_pred (entry); ++ our_pred = get_new_pred_noarg (entry); + our_pred->pred_func = pred_closeparen; + our_pred->p_type = CLOSE_PAREN; + our_pred->p_prec = NO_PREC; +@@ -725,11 +729,12 @@ static boolean + parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr) + { + struct stat stat_newer; ++ const char *arg; + + set_stat_placeholders(&stat_newer); +- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) ++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, arg); + our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */ + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.kind = COMP_GT; +@@ -747,7 +752,7 @@ parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = get_new_pred (entry); ++ our_pred = get_new_pred_noarg (entry); + our_pred->pred_func = pred_comma; + our_pred->p_type = BI_OP; + our_pred->p_prec = COMMA_PREC; +@@ -786,7 +791,7 @@ parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->side_effects = our_pred->no_default_print = true; + /* -delete implies -depth */ + options.do_dir_first = false; +@@ -831,7 +836,7 @@ parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */ + return true; + } +@@ -856,7 +861,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->side_effects = our_pred->no_default_print = false; + our_pred->est_success_rate = 0.0f; +@@ -866,7 +871,7 @@ parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) + static boolean + insert_fls (const struct parser_table* entry, const char *filename) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary_noarg (entry); + if (filename) + open_output_file (filename, &our_pred->args.printf_vec); + else +@@ -899,7 +904,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr) + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) + { +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, filename); + open_output_file (filename, &our_pred->args.printf_vec); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_stat = our_pred->need_type = false; +@@ -915,7 +920,7 @@ parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr) + static boolean + insert_fprint(const struct parser_table* entry, const char *filename) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, filename); + if (filename) + open_output_file (filename, &our_pred->args.printf_vec); + else +@@ -960,7 +965,7 @@ parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr) + const char *typename; + if (collect_arg(argv, arg_ptr, &typename)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, typename); + our_pred->args.str = typename; + + /* This is an expensive operation, so although there are +@@ -1090,7 +1095,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) + return false; + } + } +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, groupname); + our_pred->args.gid = gid; + our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2; + return true; +@@ -1160,7 +1165,7 @@ parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr) + const char *name; + if (collect_arg(argv, arg_ptr, &name)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, name); + our_pred->args.str = name; + /* Use the generic glob pattern estimator to figure out how many + * links will match, but bear in mind that most files won't be links. +@@ -1227,7 +1232,7 @@ parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr) + { + if (check_name_arg("-iname", name)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, name); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); +@@ -1268,7 +1273,7 @@ parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr) + fnmatch_sanitycheck (); + if (collect_arg (argv, arg_ptr, &name)) + { +- struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath); ++ struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath, name); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate (name, 0); +@@ -1316,7 +1321,7 @@ parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr) + fnmatch_sanitycheck(); + if (collect_arg(argv, arg_ptr, &name)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, name); + our_pred->args.str = name; + our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0); + return true; +@@ -1391,7 +1396,7 @@ do_parse_xmin (const struct parser_table* entry, + "arithmetic overflow while converting %s " + "minutes to a number of seconds")) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, minutes); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); + return true; +@@ -1427,7 +1432,7 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) + fnmatch_sanitycheck(); + if (check_name_arg("-name", name)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, name); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); +@@ -1445,7 +1450,7 @@ parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) &argv; + (void) &arg_ptr; + +- our_pred = get_new_pred_chk_op (entry); ++ our_pred = get_new_pred_chk_op (entry, NULL); + our_pred->pred_func = pred_negate; + our_pred->p_type = UNI_OP; + our_pred->p_prec = NEGATE_PREC; +@@ -1458,11 +1463,12 @@ parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr) + { + struct predicate *our_pred; + struct stat stat_newer; ++ const char *arg; + + set_stat_placeholders(&stat_newer); +- if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) ++ if (collect_arg_stat_info(argv, arg_ptr, &stat_newer, &arg)) + { +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, arg); + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.xval = XVAL_MTIME; + our_pred->args.reftime.kind = COMP_GT; +@@ -1530,7 +1536,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr) + (*arg_ptr)++; + } + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, argv[*arg_ptr]); + + + switch (x) +@@ -1623,7 +1629,7 @@ parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) &argv; + (void) &arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, NULL); + our_pred->est_success_rate = 1e-4; + #ifdef CACHE_IDS + if (gid_unused == NULL) +@@ -1660,7 +1666,7 @@ parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) arg_ptr; + + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->est_success_rate = 1e-3; + #ifdef CACHE_IDS + if (uid_unused == NULL) +@@ -1716,7 +1722,7 @@ parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = get_new_pred_chk_op (entry); ++ our_pred = get_new_pred_chk_op (entry, NULL); + our_pred->pred_func = pred_openparen; + our_pred->p_type = OPEN_PAREN; + our_pred->p_prec = NO_PREC; +@@ -1732,7 +1738,7 @@ parse_or (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = get_new_pred (entry); ++ our_pred = get_new_pred_noarg (entry); + our_pred->pred_func = pred_or; + our_pred->p_type = BI_OP; + our_pred->p_prec = OR_PREC; +@@ -1756,7 +1762,7 @@ parse_path (const struct parser_table* entry, char **argv, int *arg_ptr) + const char *name; + if (collect_arg(argv, arg_ptr, &name)) + { +- struct predicate *our_pred = insert_primary_withpred (entry, pred_path); ++ struct predicate *our_pred = insert_primary_withpred (entry, pred_path, name); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate (name, 0); +@@ -1894,7 +1900,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) + rate = 0.9986; /* probably matches anything but a broken symlink */ + } + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, perm_expr); + our_pred->est_success_rate = rate; + if (havekind) + { +@@ -1928,7 +1934,7 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + /* -print has the side effect of printing. This prevents us + from doing undesired multiple printing when the user has + already specified -print. */ +@@ -1981,7 +1987,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + if (options.do_dir_first == false) + our_pred->need_stat = our_pred->need_type = false; + /* -prune has a side effect that it does not descend into +@@ -1994,7 +2000,7 @@ parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr) + static boolean + parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary_noarg (entry); + (void) argv; + (void) arg_ptr; + our_pred->need_stat = our_pred->need_type = false; +@@ -2036,7 +2042,7 @@ insert_regex (char **argv, + { + struct re_pattern_buffer *re; + const char *error_message; +- struct predicate *our_pred = insert_primary_withpred (entry, pred_regex); ++ struct predicate *our_pred = insert_primary_withpred (entry, pred_regex, rx); + our_pred->need_stat = our_pred->need_type = false; + re = xmalloc (sizeof (struct re_pattern_buffer)); + our_pred->args.regex = re; +@@ -2061,6 +2067,7 @@ static boolean + parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) + { + struct predicate *our_pred; ++ char *arg; + uintmax_t num; + char suffix; + enum comparison_type c_type; +@@ -2073,42 +2080,43 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) + */ + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + return false; ++ arg = argv[*arg_ptr]; + +- len = strlen (argv[*arg_ptr]); ++ len = strlen (arg); + if (len == 0) + error (1, 0, _("invalid null argument to -size")); + +- suffix = argv[*arg_ptr][len - 1]; ++ suffix = arg[len - 1]; + switch (suffix) + { + case 'b': + blksize = 512; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case 'c': + blksize = 1; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case 'k': + blksize = 1024; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case 'M': /* Megabytes */ + blksize = 1024*1024; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case 'G': /* Gigabytes */ + blksize = 1024*1024*1024; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case 'w': + blksize = 2; +- argv[*arg_ptr][len - 1] = '\0'; ++ arg[len - 1] = '\0'; + break; + + case '0': +@@ -2127,14 +2135,14 @@ parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) + error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]); + } + /* TODO: accept fractional megabytes etc. ? */ +- if (!get_num (argv[*arg_ptr], &num, &c_type)) ++ if (!get_num (arg, &num, &c_type)) + { + error(1, 0, + _("Invalid argument `%s%c' to -size"), +- argv[*arg_ptr], (int)suffix); ++ arg, (int)suffix); + return false; + } +- our_pred = insert_primary (entry); ++our_pred = insert_primary (entry, arg); + our_pred->args.size.kind = c_type; + our_pred->args.size.blocksize = blksize; + our_pred->args.size.size = num; +@@ -2162,9 +2170,10 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) + struct predicate *our_pred; + struct stat st, fst; + int fd, openflags; ++ const char *filename; + + set_stat_placeholders(&st); +- if (!collect_arg_stat_info(argv, arg_ptr, &st)) ++ if (!collect_arg_stat_info(argv, arg_ptr, &st, &filename)) + return false; + + set_stat_placeholders(&fst); +@@ -2289,7 +2298,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) + } + } + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, filename); + our_pred->args.samefileid.ino = st.st_ino; + our_pred->args.samefileid.dev = st.st_dev; + our_pred->args.samefileid.fd = fd; +@@ -2350,7 +2359,7 @@ parse_true (const struct parser_table* entry, char **argv, int *arg_ptr) + (void) argv; + (void) arg_ptr; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->est_success_rate = 1.0f; + return true; +@@ -2369,7 +2378,7 @@ parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr) + struct predicate *our_pred; + (void) argv; + (void) arg_ptr; +- our_pred = insert_primary (entry); ++ our_pred = insert_primary_noarg (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->side_effects = our_pred->no_default_print = false; + if (pred_is(our_pred, pred_executable)) +@@ -2414,7 +2423,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr) + struct timespec zero = {0,0}; + if (get_relative_timestamp(offset_str, &tval, zero, DAYSECS, errmsg)) + { +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, offset_str); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS); + return true; +@@ -2472,7 +2481,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr) + return false; + } + } +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, username); + our_pred->args.uid = uid; + our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2; + return true; +@@ -2650,7 +2659,7 @@ insert_type (char **argv, int *arg_ptr, + error(1, 0, _("Unknown argument to -type: %c"), (*typeletter)); + return false; + } +- our_pred = insert_primary_withpred (entry, which_pred); ++ our_pred = insert_primary_withpred (entry, which_pred, typeletter); + our_pred->est_success_rate = rate; + + /* Figure out if we will need to stat the file, because if we don't +@@ -2706,7 +2715,7 @@ insert_fprintf (struct format_val *vec, + struct segment **segmentp; /* Address of current segment. */ + struct predicate *our_pred; + +- our_pred = insert_primary_withpred (entry, func); ++ our_pred = insert_primary_withpred (entry, func, format_const); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->args.printf_vec = *vec; + our_pred->need_type = false; +@@ -3045,7 +3054,7 @@ new_insert_exec_ok (const char *action, + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + return false; + +- our_pred = insert_primary_withpred (entry, func); ++ our_pred = insert_primary_withpred (entry, func, "(some -exec* arguments)"); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_type = our_pred->need_stat = false; + +@@ -3374,7 +3383,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) + if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg)) + return false; + +- our_pred = insert_primary (entry); ++ our_pred = insert_primary (entry, orig_timearg); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); + +@@ -3487,7 +3496,7 @@ insert_num (char **argv, int *arg_ptr, const struct parser_table *entry) + + if (get_num (numstr, &num, &c_type)) + { +- struct predicate *our_pred = insert_primary (entry); ++ struct predicate *our_pred = insert_primary (entry, numstr); + our_pred->args.numinfo.kind = c_type; + our_pred->args.numinfo.l_val = num; + +diff --git a/find/tree.c b/find/tree.c +index 7420c60..60a0601 100644 +--- a/find/tree.c ++++ b/find/tree.c +@@ -269,10 +269,14 @@ predicate_is_cost_free(const struct predicate *p) + /* Prints a predicate */ + void print_predicate(FILE *fp, const struct predicate *p) + { +- fprintf (fp, "%s%s%s", +- p->p_name, +- p->arg_text ? " " : "", +- p->arg_text ? p->arg_text : ""); ++ if (p->arg_text) ++ { ++ fprintf (fp, "%s %s", p->p_name, p->arg_text); ++ } ++ else ++ { ++ fprintf (fp, "%s", p->p_name); ++ } + } + + +@@ -832,7 +836,8 @@ set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, str + new_parent->need_stat = false; + new_parent->need_type = false; + new_parent->p_cost = NeedsNothing; +- ++ new_parent->arg_text = NULL; ++ + switch (high_prec) + { + case COMMA_PREC: +@@ -1393,6 +1398,18 @@ init_pred_perf(struct predicate *pred) + p->visits = p->successes = 0; + } + ++ ++struct predicate * ++get_new_pred_noarg (const struct parser_table *entry) ++{ ++ struct predicate *p = get_new_pred(entry); ++ if (p) ++ { ++ p->arg_text = NULL; ++ } ++ return p; ++} ++ + + /* Return a pointer to a new predicate structure, which has been + linked in as the last one in the predicates list. +@@ -1433,6 +1450,8 @@ get_new_pred (const struct parser_table *entry) + last_pred->no_default_print = false; + last_pred->need_stat = true; + last_pred->need_type = true; ++ last_pred->p_cost = NeedsUnknown; ++ last_pred->arg_text = "ThisShouldBeSetToSomethingElse"; + last_pred->args.str = NULL; + last_pred->pred_next = NULL; + last_pred->pred_left = NULL; +@@ -1449,7 +1468,8 @@ get_new_pred (const struct parser_table *entry) + predicate is an operator. If it isn't, the AND operator is inserted. */ + + struct predicate * +-get_new_pred_chk_op (const struct parser_table *entry) ++get_new_pred_chk_op (const struct parser_table *entry, ++ const char *arg) + { + struct predicate *new_pred; + static const struct parser_table *entry_and = NULL; +@@ -1471,13 +1491,14 @@ get_new_pred_chk_op (const struct parser_table *entry) + case PRIMARY_TYPE: + case CLOSE_PAREN: + /* We need to interpose the and operator. */ +- new_pred = get_new_pred (entry_and); ++ new_pred = get_new_pred_noarg (entry_and); + new_pred->pred_func = pred_and; + new_pred->p_name = "-a"; + new_pred->p_type = BI_OP; + new_pred->p_prec = AND_PREC; + new_pred->need_stat = false; + new_pred->need_type = false; ++ new_pred->arg_text = NULL; + new_pred->args.str = NULL; + new_pred->side_effects = false; + new_pred->no_default_print = false; +@@ -1488,6 +1509,7 @@ get_new_pred_chk_op (const struct parser_table *entry) + } + + new_pred = get_new_pred (entry); ++ new_pred->arg_text = arg; + new_pred->parser_entry = entry; + return new_pred; + } +diff --git a/find/util.c b/find/util.c +index a06eada..cc9a3eb 100644 +--- a/find/util.c ++++ b/find/util.c +@@ -89,11 +89,13 @@ static struct debug_option_assoc debugassoc[] = + operator. */ + + struct predicate * +-insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func) ++insert_primary_withpred (const struct parser_table *entry, ++ PRED_FUNC pred_func, ++ const char *arg) + { + struct predicate *new_pred; + +- new_pred = get_new_pred_chk_op (entry); ++ new_pred = get_new_pred_chk_op (entry, arg); + new_pred->pred_func = pred_func; + new_pred->p_name = entry->parser_name; + new_pred->args.str = NULL; +@@ -118,10 +120,16 @@ insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func) + either not there at all (we are the very first node) or is an + operator. */ + struct predicate * +-insert_primary (const struct parser_table *entry) ++insert_primary (const struct parser_table *entry, const char *arg) + { + assert (entry->pred_func != NULL); +- return insert_primary_withpred(entry, entry->pred_func); ++ return insert_primary_withpred(entry, entry->pred_func, arg); ++} ++ ++struct predicate * ++insert_primary_noarg (const struct parser_table *entry) ++{ ++ return insert_primary(entry, NULL); + } + + diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch new file mode 100644 index 0000000000..c0ff3ff1c0 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/02-28824.patch @@ -0,0 +1,294 @@ +Upstream-Status: Backport + +commit 76ed377d6d3e4a83a00cabd401f751b37ecd1e7b +Author: James Youngman +Date: Sat Feb 20 13:11:45 2010 +0000 + + Fix Savannah bug# 28824: "-ctime x" yields "missing argument to `-ctime'". + + * find/parser.c (parse_fls): If the argument is invalid, reverse + the change that collect_arg() made to *arg_ptr (that is, don't + consume the argument). + (parse_fprint0): Likewise. + (parse_gid): Likewise. + (parse_group): Likewise. + (parse_inum): Likewise. + (parse_links): Likewise. + (do_parse_xmin): Likewise. + (parse_name): Likewise. + (parse_printf): Likewise. + (parse_uid): Likewise. + (parse_used): Likewise. + (parse_time): Likewise. + + Signed-off-by: James Youngman + +diff --git a/ChangeLog b/ChangeLog +index d0ce1fe..13539a4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,0 +1,19 @@ ++2010-02-20 James Youngman ++ ++ Fix Savannah bug# 28824: "-ctime x" yields "missing argument to ++ `-ctime'". ++ * find/parser.c (parse_fls): If the argument is invalid, reverse ++ the change that collect_arg() made to *arg_ptr (that is, don't ++ consume the argument). ++ (parse_fprint0): Likewise. ++ (parse_gid): Likewise. ++ (parse_group): Likewise. ++ (parse_inum): Likewise. ++ (parse_links): Likewise. ++ (do_parse_xmin): Likewise. ++ (parse_name): Likewise. ++ (parse_printf): Likewise. ++ (parse_uid): Likewise. ++ (parse_used): Likewise. ++ (parse_time): Likewise. ++ +diff --git a/NEWS b/NEWS +index 5394311..4e910df 100644 +--- a/NEWS ++++ b/NEWS +@@ -4,5 +4,8 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) + + ** Bug Fixes + ++#28824: Corrected error message for "-ctime x". ++ Likewise for -gid, -inum, -links, -mmin, -cmin, -amin, ++ -uid, -used, -atime, -mtime, -ctime. + #26537: find -prune now makes sure it has valid stat() information. + +diff --git a/find/parser.c b/find/parser.c +index 2e6b989..08758ee 100644 +--- a/find/parser.c ++++ b/find/parser.c +@@ -886,8 +886,14 @@ static boolean + parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *filename; +- return collect_arg(argv, arg_ptr, &filename) +- && insert_fls(entry, filename); ++ if (collect_arg(argv, arg_ptr, &filename)) ++ { ++ if (insert_fls(entry, filename)) ++ return true; ++ else ++ --*arg_ptr; /* don't consume the invalid arg. */ ++ } ++ return false; + } + + static boolean +@@ -937,9 +943,13 @@ parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) +- return insert_fprint(entry, filename); +- else +- return false; ++ { ++ if (insert_fprint(entry, filename)) ++ return true; ++ else ++ --*arg_ptr; /* don't consume the bad arg. */ ++ } ++ return false; + } + + static float estimate_fstype_success_rate(const char *fsname) +@@ -993,6 +1003,7 @@ parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr) + } + else + { ++ --*arg_ptr; /* don't consume the invalid argument. */ + return false; + } + } +@@ -1049,6 +1060,7 @@ static boolean + parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *groupname; ++ const int saved_argc = *arg_ptr; + + if (collect_arg(argv, arg_ptr, &groupname)) + { +@@ -1077,6 +1089,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) + "because it has the unexpected suffix %s"), + quotearg_n_style(0, options.err_quoting_style, groupname), + quotearg_n_style(1, options.err_quoting_style, groupname+gid_len)); ++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */ + return false; + } + } +@@ -1092,6 +1105,7 @@ parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) + { + error(1, 0, _("argument to -group is empty, but should be a group name")); + } ++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */ + return false; + } + } +@@ -1256,6 +1270,7 @@ parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr) + } + else + { ++ --*arg_ptr; /* don't consume the invalid argument. */ + return false; + } + } +@@ -1310,6 +1325,7 @@ parse_links (const struct parser_table* entry, char **argv, int *arg_ptr) + } + else + { ++ --*arg_ptr; /* don't consume the invalid argument. */ + return false; + } + } +@@ -1358,6 +1374,7 @@ insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr, + error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"), + predicate, + quotearg_n_style(0, options.err_quoting_style, depthstr)); ++ /* NOTREACHED */ + return false; + } + /* missing argument */ +@@ -1385,6 +1402,7 @@ do_parse_xmin (const struct parser_table* entry, + enum xval xv) + { + const char *minutes; ++ const int saved_argc = *arg_ptr; + + if (collect_arg(argv, arg_ptr, &minutes)) + { +@@ -1401,6 +1419,11 @@ do_parse_xmin (const struct parser_table* entry, + our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); + return true; + } ++ else ++ { ++ /* Don't consume the invalid argument. */ ++ *arg_ptr = saved_argc; ++ } + } + return false; + } +@@ -1427,6 +1450,8 @@ static boolean + parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *name; ++ const int saved_argc = *arg_ptr; ++ + if (collect_arg(argv, arg_ptr, &name)) + { + fnmatch_sanitycheck(); +@@ -1438,6 +1463,10 @@ parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); + return true; + } ++ else ++ { ++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */ ++ } + } + return false; + } +@@ -1954,11 +1983,21 @@ static boolean + parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *format; ++ const int saved_argc = *arg_ptr; ++ + if (collect_arg(argv, arg_ptr, &format)) + { + struct format_val fmt; + open_stdout(&fmt); +- return insert_fprintf (&fmt, entry, pred_fprintf, format); ++ if (insert_fprintf (&fmt, entry, pred_fprintf, format)) ++ { ++ return true; ++ } ++ else ++ { ++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */ ++ return false; ++ } + } + return false; + } +@@ -1967,15 +2006,21 @@ static boolean + parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr) + { + const char *format, *filename; ++ int saved_argc = *arg_ptr; ++ + if (collect_arg(argv, arg_ptr, &filename)) + { + if (collect_arg(argv, arg_ptr, &format)) + { + struct format_val fmt; + open_output_file (filename, &fmt); +- return insert_fprintf (&fmt, entry, pred_fprintf, format); ++ saved_argc = *arg_ptr; ++ ++ if (insert_fprintf (&fmt, entry, pred_fprintf, format)) ++ return true; + } + } ++ *arg_ptr = saved_argc; /* don't consume the invalid argument. */ + return false; + } + +@@ -2405,6 +2450,7 @@ parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr) + } + else + { ++ --*arg_ptr; /* don't consume the invalid argument. */ + return false; + } + } +@@ -2431,6 +2477,7 @@ parse_used (const struct parser_table* entry, char **argv, int *arg_ptr) + else + { + error(1, 0, _("Invalid argument %s to -used"), offset_str); ++ /*NOTREACHED*/ + return false; + } + } +@@ -2610,6 +2657,7 @@ insert_type (char **argv, int *arg_ptr, + if (strlen(typeletter) != 1u) + { + error(1, 0, _("Arguments to -type should contain only one letter")); ++ /*NOTREACHED*/ + return false; + } + +@@ -2657,6 +2705,7 @@ insert_type (char **argv, int *arg_ptr, + #endif + default: /* None of the above ... nuke 'em. */ + error(1, 0, _("Unknown argument to -type: %c"), (*typeletter)); ++ /*NOTREACHED*/ + return false; + } + our_pred = insert_primary_withpred (entry, which_pred, typeletter); +@@ -3349,6 +3398,7 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) + const char *errmsg = "arithmetic overflow while converting %s " + "days to a number of seconds"; + struct timespec origin; ++ const int saved_argc = *arg_ptr; + + if (!collect_arg(argv, arg_ptr, &timearg)) + return false; +@@ -3381,7 +3431,10 @@ parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) + timearg = orig_timearg; + + if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg)) +- return false; ++ { ++ *arg_ptr = saved_argc; /* don't consume the invalid argument */ ++ return false; ++ } + + our_pred = insert_primary (entry, orig_timearg); + our_pred->args.reftime = tval; diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch new file mode 100644 index 0000000000..940aaf6ff5 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils-4.4.2/03-28872.patch @@ -0,0 +1,58 @@ +Upstream-Status: Backport + +commit 5f5eb921765794e8fc58c4bdffa2daa2ae34800f +Author: James Youngman +Date: Sat Feb 20 19:53:13 2010 +0000 + + Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames" + + * doc/find.texi (Problems with -exec and filenames): Add missing + $0 argument in example for sh -c 'something "$@" sh ... + * NEWS: Mention this change. + + Signed-off-by: James Youngman + +diff --git a/ChangeLog b/ChangeLog +index 13539a4..e94ba96 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,10 @@ + 2010-02-20 James Youngman + ++ Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames" ++ * doc/find.texi (Problems with -exec and filenames): Add missing ++ $0 argument in example for sh -c 'something "$@" sh ... ++ * NEWS: Mention this change. ++ + Fix Savannah bug# 28824: "-ctime x" yields "missing argument to + `-ctime'". + * find/parser.c (parse_fls): If the argument is invalid, reverse +diff --git a/NEWS b/NEWS +index 4e910df..4c97be9 100644 +--- a/NEWS ++++ b/NEWS +@@ -4,6 +4,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) + + ** Bug Fixes + ++#28872: Mistake in "#safer" example in "Problems with -exec and ++ filenames" section of the Texinfo manual. ++ + #28824: Corrected error message for "-ctime x". + Likewise for -gid, -inum, -links, -mmin, -cmin, -amin, + -uid, -used, -atime, -mtime, -ctime. +diff --git a/doc/find.texi b/doc/find.texi +index 2e5958d..391ffa0 100644 +--- a/doc/find.texi ++++ b/doc/find.texi +@@ -4830,8 +4830,8 @@ problem: + + @example + # safer +-find -exec sh -c 'something "$@@"' @{@} \; +-find -execdir sh -c 'something "$@@"' @{@}\; ++find -exec sh -c 'something "$@@"' sh @{@} \; ++find -execdir sh -c 'something "$@@"' sh @{@}\; + @end example + + This approach is not guaranteed to avoid every problem, but it is much diff --git a/meta/recipes-extended/findutils/findutils-4.4.2/findutils_fix_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 @@ +Fix documentation build errors + +This fixes the following errors building the findutils documentation: +find-maint.texi:45: misplaced { +find-maint.texi:45: misplaced } +find-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 +find-maint.texi:335: warning: node `Debugging is For Users Too' is next for `Factor Out Repeated Code' in sectioning but not in menu +find-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 +find-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 +find-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 +find-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 +find-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 +find-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 +find-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 +find.texi:53: misplaced { +find.texi:53: misplaced } +find.texi:1862: warning: node `Formatting Flags' is next for `Time Directives' in menu but not in sectioning +find.texi:1975: warning: node `Formatting Flags' is next for `Combined Time Formats' in sectioning but not in menu +find.texi:2004: warning: node prev `Formatting Flags' in menu `Time Directives' and in sectioning `Combined Time Formats' differ +find.texi:2004: warning: node up `Formatting Flags' in menu `Format Directives' and in sectioning `Time Formats' differ +find.texi:1893: node `Time Formats' lacks menu item for `Formatting Flags' despite being its Up target + +Upstream-Status: Backport +Signed-off-by: Jonathan Liu + +--- a/doc/find-maint.texi ++++ b/doc/find-maint.texi +@@ -42,7 +42,7 @@ Free Documentation License''. + + @page + @vskip 0pt plus 1filll +-@insertcopying{} ++@insertcopying + @end titlepage + + @contents +@@ -227,10 +227,10 @@ circumstances. + + @menu + * Make the Compiler Find the Bugs:: ++* Factor Out Repeated Code:: + * The File System Is Being Modified:: + * Don't Trust the File System Contents:: + * Debugging is For Users Too:: +-* Factor Out Repeated Code:: + @end menu + + @node Make the Compiler Find the Bugs +--- a/doc/find.texi ++++ b/doc/find.texi +@@ -50,7 +50,7 @@ Texts. A copy of the license is included in the section entitled + + @page + @vskip 0pt plus 1filll +-@insertcopying{} ++@insertcopying + @end titlepage + + @contents +@@ -1665,6 +1665,7 @@ no output is ever sent to it. + * Escapes:: + * Format Directives:: + * Time Formats:: ++* Formatting Flags:: + @end menu + + @node Escapes +@@ -1733,7 +1734,6 @@ from the novel you are reading. + * Size Directives:: + * Location Directives:: + * Time Directives:: +-* Formatting Flags:: + @end menu + + @node Name Directives +@@ -2002,7 +2002,7 @@ seconds field includes a fractional part. + @end table + + @node Formatting Flags +-@subsubsection Formatting Flags ++@subsection Formatting Flags + + The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} + 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 @@ +Upstream-Status: Pending + +This patch fixes following issue with automake 1.12 + +| configure.ac:80: error: automatic de-ANSI-fication support has been removed + +Signed-Off-By: Nitin A Kamble +2012/05/03 + +Index: findutils-4.4.2/configure.ac +=================================================================== +--- findutils-4.4.2.orig/configure.ac ++++ findutils-4.4.2/configure.ac +@@ -77,8 +77,6 @@ AC_PROG_CPP + dnl for gnulib + gl_EARLY + +-AM_C_PROTOTYPES +- + AC_PROG_INSTALL + AC_PROG_RANLIB + 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 @@ +Upstream-Status: Pending + +Author: H.J. Lu + +Work around gnulib time_t assumption in findutils for x32 + +time_t is 64bit and long int is 32bit on x32. But gnulib used in +findutils assumes time_t values fit into long int. Such assumption is +invalid for x32 and should be removed. + +This patch is a workaround to compile gnulib for x32. + +Signed-Off-By: Nitin A Kamble 2011/12/05 + + +Index: findutils-4.4.2/gnulib/lib/getdate.y +=================================================================== +--- findutils-4.4.2.orig/gnulib/lib/getdate.y ++++ findutils-4.4.2/gnulib/lib/getdate.y +@@ -114,7 +114,6 @@ + wraps around, but there's no portable way to check for that at + compile-time. */ + verify (TYPE_IS_INTEGER (time_t)); +-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX); + + /* An integer value, and the number of digits in its textual + representation. */ +Index: findutils-4.4.2/gnulib/lib/mktime.c +=================================================================== +--- findutils-4.4.2.orig/gnulib/lib/mktime.c ++++ findutils-4.4.2/gnulib/lib/mktime.c +@@ -166,7 +166,7 @@ ydhms_diff (long int year1, long int yda + { + verify (C99_integer_division, -1 / 2 == 0); + verify (long_int_year_and_yday_are_wide_enough, +- INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); ++ INT_MAX <= TIME_T_MAX / 2 || TIME_T_MAX <= UINT_MAX); + + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid integer overflow here. */ diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc new file mode 100644 index 0000000000..4f4068a091 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils.inc @@ -0,0 +1,24 @@ +SUMMARY = "find, locate, and xargs binaries" +DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \ +These programs are typically used in conjunction with other programs to provide modular and powerful directory \ +search and file locating capabilities to other commands." +HOMEPAGE = "http://www.gnu.org/software/findutils/" +BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" +SECTION = "console/utils" + + +SRC_URI = "${GNU_MIRROR}/findutils/findutils-${PV}.tar.gz" + +inherit autotools gettext texinfo update-alternatives + +ALTERNATIVE_${PN} = "find xargs" +ALTERNATIVE_PRIORITY = "100" + +# diffutils assumes non-glibc compilation with uclibc and +# this causes it to generate its own implementations of +# standard functionality. regex.c actually breaks compilation +# because it uses __mempcpy, there are other things (TBD: +# see diffutils.mk in buildroot) +EXTRA_OECONF_libc-uclibc = "--without-included-regex" + +BBCLASSEXTEND = "native 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 @@ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" +PR = "r4" + +require findutils.inc + +SRC_URI += "file://gnulib-extension.patch \ + file://findutils_fix_for_automake-1.12.patch \ + file://findutils-fix-doc-build-error.patch \ + " + +SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a" +SRC_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..faf2ebe462 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils_4.4.2.bb @@ -0,0 +1,25 @@ +require findutils.inc + +# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32) +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +PR = "r6" + +SRC_URI += "file://01-27017.patch \ + file://02-28824.patch \ + file://03-28872.patch \ + file://findutils_fix_for_x32.patch \ + file://findutils_fix_for_automake-1.12.patch \ + file://findutils_fix_doc.patch \ + " + +SRC_URI[md5sum] = "351cc4adb07d54877fa15f75fb77d39f" +SRC_URI[sha256sum] = "434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a" + +DEPENDS = "bison-native" + +# http://savannah.gnu.org/bugs/?27299 +CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}" + +EXTRA_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..790c98138b --- /dev/null +++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb @@ -0,0 +1,37 @@ +SUMMARY = "OpenPrinting printer support - filters" +DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \ +common printers for use with UNIX-like operating systems.\ +It provides the "glue" between a print spooler (like CUPS or lpr) and \ +the printer, by processing files sent to the printer. \ + \ +This package consists of filters used by the printer spoolers \ +to convert the incoming PostScript data into the printer's native \ +format using a printer-specific, but spooler-independent PPD file. \ +" + +DEPENDS += "cups perl libxml2" +PR = "r1" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833" + +SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz" + +SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896" +SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3" + +inherit autotools pkgconfig + +EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops" + +do_configure_prepend() { + export PERL="${bindir}/env perl" + export CUPS_SERVERBIN=${exec_prefix}/lib/cups # /usr/lib NOT libdir +} + +do_install_append_linuxstdbase() { + install -d ${D}${exec_prefix}/lib/cups/filter + ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter +} + +FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/" diff --git a/meta/recipes-extended/gamin/gamin-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 @@ +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=693449] + +Signed-off-by: Marko Lindqvist +diff -Nurd gamin-0.1.10/configure.in gamin-0.1.10/configure.in +--- gamin-0.1.10/configure.in 2008-11-24 17:23:06.000000000 +0200 ++++ gamin-0.1.10/configure.in 2013-02-08 23:11:59.656279992 +0200 +@@ -1,7 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. + AC_PREREQ(2.52) + AC_INIT(libgamin) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + AC_CANONICAL_SYSTEM + + # get any external flags setting before we start playing with the CFLAGS variable +@@ -31,7 +31,6 @@ + + AC_USE_SYSTEM_EXTENSIONS + AC_PROG_CC +-AM_PROG_CC_STDC + AC_HEADER_STDC + AC_PROG_INSTALL + 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 @@ +Upstream-Status: Inappropriate [configuration] + +--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200 ++++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200 +@@ -354,51 +354,6 @@ + AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure]) + fi + +-#### Abstract sockets +- +-AC_MSG_CHECKING(abstract socket namespace) +-AC_LANG_PUSH(C) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( +-[[ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-]], +-[[ +- int listen_fd; +- struct sockaddr_un addr; +- +- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); +- +- if (listen_fd < 0) +- { +- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); +- exit (1); +- } +- +- memset (&addr, '\0', sizeof (addr)); +- addr.sun_family = AF_UNIX; +- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); +- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ +- +- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) +- { +- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", +- strerror (errno)); +- exit (1); +- } +- else +- exit (0); +-]])], +- [have_abstract_sockets=yes], +- [have_abstract_sockets=no]) +-AC_LANG_POP(C) +-AC_MSG_RESULT($have_abstract_sockets) +- + if test x$enable_abstract_sockets = xyes; then + if test x$have_abstract_sockets = xno; then + AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.]) diff --git a/meta/recipes-extended/gamin/gamin/noconst.patch b/meta/recipes-extended/gamin/gamin/noconst.patch new file mode 100644 index 0000000000..7b2998c279 --- /dev/null +++ b/meta/recipes-extended/gamin/gamin/noconst.patch @@ -0,0 +1,59 @@ +G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid +build failures. + +RP 2011/10/12 + +Upstream-Status: Pending + +Index: gamin-0.1.10/server/gam_node.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100 ++++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100 +@@ -122,7 +122,7 @@ + * it has finished with the string. If it must keep it longer, it + * should makes its own copy. The returned string must not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_node_get_path(GamNode * node) + { + g_assert(node); +Index: gamin-0.1.10/server/gam_node.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100 ++++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100 +@@ -58,7 +58,7 @@ + void gam_node_set_is_dir (GamNode *node, + gboolean is_dir); + +-G_CONST_RETURN char *gam_node_get_path (GamNode *node); ++const char *gam_node_get_path (GamNode *node); + + GList *gam_node_get_subscriptions (GamNode *node); + +Index: gamin-0.1.10/server/gam_subscription.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100 ++++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100 +@@ -141,7 +141,7 @@ + * @param sub the GamSubscription + * @returns The path being monitored. It should not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_subscription_get_path(GamSubscription * sub) + { + if (sub == NULL) +Index: gamin-0.1.10/server/gam_subscription.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100 ++++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100 +@@ -21,7 +21,7 @@ + + int gam_subscription_get_reqno (GamSubscription *sub); + +-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub); ++const char *gam_subscription_get_path (GamSubscription *sub); + + GamListener *gam_subscription_get_listener (GamSubscription *sub); + diff --git a/meta/recipes-extended/gamin/gamin_0.1.10.bb b/meta/recipes-extended/gamin/gamin_0.1.10.bb new file mode 100644 index 0000000000..375d265f57 --- /dev/null +++ b/meta/recipes-extended/gamin/gamin_0.1.10.bb @@ -0,0 +1,36 @@ +SUMMARY = "Gamin the File Alteration Monitor" +DESCRIPTION = "Gamin is a file and directory monitoring system defined to \ +be a subset of the FAM (File Alteration Monitor) system." +HOMEPAGE = "http://people.gnome.org/~veillard/gamin/" + +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=412a9be54757a155d0b997b52b519f62" + +DEPENDS = "glib-2.0" +PROVIDES = "fam" +PR = "r5" + +SRC_URI = "http://www.gnome.org/~veillard/gamin/sources/gamin-${PV}.tar.gz \ + file://no-abstract-sockets.patch \ + file://noconst.patch \ + file://obsolete_automake_macros.patch \ +" + +SRC_URI[md5sum] = "b4ec549e57da470c04edd5ec2876a028" +SRC_URI[sha256sum] = "28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--without-python" + +PACKAGES += "lib${BPN} lib${BPN}-dev" +FILES_${PN} = "${libexecdir}" +FILES_${PN}-dbg += "${libexecdir}/.debug" +FILES_lib${BPN} = "${libdir}/lib*.so.*" +FILES_lib${BPN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/lib*.la \ + ${libdir}/lib*.a ${libdir}/lib*.so" + +RDEPENDS_lib${BPN} = "${PN}" + +LEAD_SONAME = "libgamin-1.so" + diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/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 @@ +Upstream-Status: Pending + +automake 1.12 has depricated automatic de-ANSI-fication support + +this patch avoids these kinds of errors: + +| configure.ac:127: error: automatic de-ANSI-fication support has been removed +| /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... +| configure.ac:127: the top level +| autom4te: m4 failed with exit status: 1 +... +| Makefile.am:27: error: automatic de-ANSI-fication support has been removed + +Signed-Off-By: Nitin A Kamble +2012/05/04 + +Index: gawk-3.1.5/configure.ac +=================================================================== +--- gawk-3.1.5.orig/configure.ac ++++ gawk-3.1.5/configure.ac +@@ -124,7 +124,6 @@ fi + + dnl check for C compiler for automake + AM_PROG_CC_STDC +-AM_C_PROTOTYPES + + dnl Cygwin doesn't like to get libs with full paths + dnl since that overrides linking against DLLs. +Index: gawk-3.1.5/Makefile.am +=================================================================== +--- gawk-3.1.5.orig/Makefile.am ++++ gawk-3.1.5/Makefile.am +@@ -24,7 +24,7 @@ + ## process this file with automake to produce Makefile.in + + # Automatic de-ANSI-fication if needed, make .bz2 files also. +-AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 ++AUTOMAKE_OPTIONS = dist-bzip2 + + # This undocumented variable insures that aclocal runs + # 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 @@ +test/fflush.sh: Remove hardcoded gawk path. + +Signed-off-by: Anders Roxell +Upstream-Status: Pending +--- +--- a/test/fflush.sh 2012-05-03 20:13:57.000000000 +0200 ++++ b/test/fflush.sh 2013-04-08 16:28:00.170796200 +0200 +@@ -1,16 +1,17 @@ + #! /bin/sh +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' ++AWK=${AWK-../gawk} ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}' + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat"}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");close("/dev/stdout");print "2nd"|"cat"}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"cat";close("cat")}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat ++$AWK 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort"}'|cat + +-../gawk 'BEGIN{print "1st";fflush("/dev/stdout");print "2nd"|"sort";close("sort")}'|cat ++$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.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 @@ +# The awk test suite prints test names prior to running the test and shows +# results in the form of "make" errors. +# This script post-processes the output to detect failure and print PASS +# only if there was no subsequent error message for the test. + +function print_prev() +{ + if (length(testname)) + if (fail == 1) + printf "FAIL: %s\n", testname + else + printf "PASS: %s\n", testname +} + +{ + print $0 + + if (match($0, /^(\w+)$/, result)) { + print_prev() + testname = result[1]; + fail = 0 + } + + if (match($0, /^make: \[(.+?)\]/)) { + fail = 1 + } + +} + +END { + print_prev() +} diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch b/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch new file mode 100644 index 0000000000..b8b1fcaea7 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch @@ -0,0 +1,56 @@ +From 976f73ab03569bb836aa5c949be1c1cc973b2d2e Mon Sep 17 00:00:00 2001 +From: "Arnold D. Robbins" +Date: Fri, 11 Apr 2014 07:42:16 +0300 +Subject: [PATCH] Use $(DESTDIR) in extension/Makefile.am when removing .la + files. + +commit 976f73ab03569bb836aa5c949be1c1cc973b2d2e upstream. + +[PG: note there was no Author SOB or long log in original.] +Upstream-Status: Backport [ gawk-4.1.1-3-g976f73ab0356 ] +Signed-off-by: Paul Gortmaker +--- + +diff --git a/extension/ChangeLog b/extension/ChangeLog +index afd64ff764b6..f3a1c7a81e7d 100644 +--- a/extension/ChangeLog ++++ b/extension/ChangeLog +@@ -1,3 +1,9 @@ ++2014-04-11 Arnold D. Robbins ++ ++ * Makefile.am (install-data-hook): Use $(DESTDIR) when removing ++ the .la files. Thanks to Lars Wendler ++ for the report and fix. ++ + 2014-04-08 Arnold D. Robbins + + * 4.1.1: Release tar ball made. +diff --git a/extension/Makefile.am b/extension/Makefile.am +index 9c49bb81abb2..11826e2b315e 100644 +--- a/extension/Makefile.am ++++ b/extension/Makefile.am +@@ -100,7 +100,7 @@ testext_la_LIBADD = $(MY_LIBS) + + install-data-hook: + for i in $(pkgextension_LTLIBRARIES) ; do \ +- $(RM) $(pkgextensiondir)/$$i ; \ ++ $(RM) $(DESTDIR)$(pkgextensiondir)/$$i ; \ + done + + # Keep the uninstall check working: +diff --git a/extension/Makefile.in b/extension/Makefile.in +index 040cdb8f4e23..d81b16960935 100644 +--- a/extension/Makefile.in ++++ b/extension/Makefile.in +@@ -1231,7 +1231,7 @@ uninstall-man: uninstall-man3 + + install-data-hook: + for i in $(pkgextension_LTLIBRARIES) ; do \ +- $(RM) $(pkgextensiondir)/$$i ; \ ++ $(RM) $(DESTDIR)$(pkgextensiondir)/$$i ; \ + done + + # Keep the uninstall check working: +-- +1.9.1 + diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch b/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch new file mode 100644 index 0000000000..b402587615 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch @@ -0,0 +1,86 @@ +From a9f3bd754e9e269099cf7a2c931c632fcc12bd8a Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker +Date: Fri, 13 Jun 2014 13:42:12 -0400 +Subject: [PATCH] extension: Add $(DESTDIR) prefix to remaining pkgextensiondir + instances + +Commit 976f73ab03569bb836aa5c949be1c1cc973b2d2e ["Use $(DESTDIR) in +extension/Makefile.am when removing .la files."] fixed an issue +that manifested itself as follows when cross compiling: + +make[4]: Entering directory 'gawk/4.1.1-r0/build/extension' +for i in filefuncs.la fnmatch.la fork.la inplace.la ordchr.la readdir.la readfi +le.la revoutput.la revtwoway.la rwarray.la testext.la time.la ; do \ + rm -f /usr/lib/gawk/$i ; \ +done +rm: cannot remove '/usr/lib/gawk/filefuncs.la': Permission denied +rm: cannot remove '/usr/lib/gawk/fnmatch.la': Permission denied +rm: cannot remove '/usr/lib/gawk/fork.la': Permission denied +rm: cannot remove '/usr/lib/gawk/inplace.la': Permission denied +rm: cannot remove '/usr/lib/gawk/ordchr.la': Permission denied +rm: cannot remove '/usr/lib/gawk/readdir.la': Permission denied +rm: cannot remove '/usr/lib/gawk/readfile.la': Permission denied +rm: cannot remove '/usr/lib/gawk/revoutput.la': Permission denied +rm: cannot remove '/usr/lib/gawk/revtwoway.la': Permission denied +rm: cannot remove '/usr/lib/gawk/rwarray.la': Permission denied +rm: cannot remove '/usr/lib/gawk/testext.la': Permission denied +rm: cannot remove '/usr/lib/gawk/time.la': Permission denied +Makefile:1235: recipe for target 'install-data-hook' failed + +The problem only manifests itself on hosts where the above files +are already present; for if they are absent then the rm -f does +not fail with -EPERM. The fix in 976f73ab0356 ensured that DESTDIR +was used for the prefix so that it didn't try to delete host files. + +However there still remains less used instances of where it is used +w/o $(DESTDIR) that may still cause similar breakage in the future. +Here we apply the same change to them. + +Upstream-Status: Submitted [http://lists.gnu.org/archive/html/bug-gawk/2014-06/index.html] +Signed-off-by: Paul Gortmaker +--- + +diff --git a/extension/ChangeLog b/extension/ChangeLog +index f3a1c7a81e7d..b87ac372edc6 100644 +--- a/extension/ChangeLog ++++ b/extension/ChangeLog +@@ -1,3 +1,10 @@ ++2014-06-13 Paul Gortmaker ++ * Makefile.am (uninstall-so): Came across below bug while cross ++ compiling, and changed both install-data-hook and uninstall-so ++ to use $(DESTDIR) on v4.1.1 before seeing most of the fix in ++ gawk-4.1.1-3-g976f73ab0356; here we ensure uninstall-so also ++ uses the $(DESTDIR) prefix on its use of pkgextensiondir. ++ + 2014-04-11 Arnold D. Robbins + + * Makefile.am (install-data-hook): Use $(DESTDIR) when removing +diff --git a/extension/Makefile.am b/extension/Makefile.am +index 11826e2b315e..b6beaee3fb47 100644 +--- a/extension/Makefile.am ++++ b/extension/Makefile.am +@@ -105,7 +105,7 @@ install-data-hook: + + # Keep the uninstall check working: + uninstall-so: +- $(RM) $(pkgextensiondir)/*.so ++ $(RM) $(DESTDIR)$(pkgextensiondir)/*.so + + uninstall-recursive: uninstall-so + +diff --git a/extension/Makefile.in b/extension/Makefile.in +index d81b16960935..294e4f887812 100644 +--- a/extension/Makefile.in ++++ b/extension/Makefile.in +@@ -1236,7 +1236,7 @@ install-data-hook: + + # Keep the uninstall check working: + uninstall-so: +- $(RM) $(pkgextensiondir)/*.so ++ $(RM) $(DESTDIR)$(pkgextensiondir)/*.so + + uninstall-recursive: uninstall-so + +-- +1.9.1 + diff --git a/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest new file mode 100644 index 0000000000..d23f0bf6d7 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk-4.1.1/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd test +for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \ + do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \ + make -f Maketests $i >$i.tmp 2>&1; \ + grep -q "Error" $i.tmp; \ + if [ $? -eq 0 ]; then echo "FAIL: $i"; \ + else echo "PASS: $i"; rm -f $i.tmp; fi; \ +done 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..c7af4a9b72 --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb @@ -0,0 +1,42 @@ +SUMMARY = "GNU awk text processing utility" +DESCRIPTION = "The GNU version of awk, a text processing utility. \ +Awk interprets a special-purpose programming language to do \ +quick and easy text pattern matching and reformatting jobs." +HOMEPAGE = "www.gnu.org/software/gawk" +BUGTRACKER = "bug-gawk@gnu.org" +SECTION = "console/utils" + +# gawk <= 3.1.5: GPLv2 +# gawk >= 3.1.6: GPLv3 +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +RDEPENDS_gawk += "gawk-common" +RDEPENDS_pgawk += "gawk-common" +PR = "r2" + +SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ + file://gawk-3.1.5_fix_for_automake-1.12.patch" + +SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30" +SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8" + +inherit autotools gettext texinfo update-alternatives + +PACKAGES += "gawk-common pgawk" + +FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk" +FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*" +FILES_pgawk = "${bindir}/pgawk*" +FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug" + +ALTERNATIVE_${PN} = "awk" +ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" +ALTERNATIVE_PRIORITY = "100" + +CFLAGS += "-D PROTOTYPES" + +do_install_append() { + # remove the link since we don't package it + rm ${D}${bindir}/awk +} diff --git a/meta/recipes-extended/gawk/gawk_4.1.1.bb b/meta/recipes-extended/gawk/gawk_4.1.1.bb new file mode 100644 index 0000000000..3266f58cbd --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_4.1.1.bb @@ -0,0 +1,49 @@ +SUMMARY = "GNU awk text processing utility" +DESCRIPTION = "The GNU version of awk, a text processing utility. \ +Awk interprets a special-purpose programming language to do \ +quick and easy text pattern matching and reformatting jobs." +HOMEPAGE = "www.gnu.org/software/gawk" +BUGTRACKER = "bug-gawk@gnu.org" +SECTION = "console/utils" + +# gawk <= 3.1.5: GPLv2 +# gawk >= 3.1.6: GPLv3 +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS += "readline" + +PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" + +SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ + file://run-ptest \ + file://Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch \ + file://extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch \ +" + +SRC_URI[md5sum] = "45f5b09aa87b4744c4c53bf274e96ed0" +SRC_URI[sha256sum] = "556464bd2e4bc5a0fad4526b59623e4be40b4c2f4c663dfaaf246af6e2ec1d62" + +inherit autotools gettext texinfo update-alternatives + +FILES_${PN} += "${datadir}/awk" +FILES_${PN}-dev += "${libdir}/${BPN}/*.la" +FILES_${PN}-dbg += "${libexecdir}/awk/.debug" + +ALTERNATIVE_${PN} = "awk" +ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" +ALTERNATIVE_PRIORITY = "100" + +do_install_append() { + # remove the link since we don't package it + rm ${D}${bindir}/awk +} + +inherit ptest + +do_install_ptest() { + mkdir ${D}${PTEST_PATH}/test + for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \ + do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \ + done +} 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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 4 +#define ARCH_ALIGN_PTR_MOD 4 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 2 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 4 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch new file mode 100644 index 0000000000..d97d4ecd7d --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch @@ -0,0 +1,36 @@ +base/genht.c: add a preprocessor define to allow fopen calling + +The commit in upstream: +http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 + +Replace all fopen calls with gp_fopen and add a preprocessor define so +that any unintential calls directly to fopen will cause an error. + +Only exceptions are those in the platform specific code, and mkromfs.c. +This patch add a preprocessor define to allow fopen calling in base/genht.c. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + base/genht.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/base/genht.c b/base/genht.c +index 4b04085..cc82fff 100644 +--- a/base/genht.c ++++ b/base/genht.c +@@ -16,6 +16,10 @@ + + /* Generate C code for compiling halftones into ROM. */ + #include "malloc_.h" ++ ++/* prevent gp.h from defining fopen */ ++#define fopen fopen ++ + #include "stdio_.h" + #include "string_.h" + #include "gscdefs.h" +-- +1.8.1.2 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch new file mode 100644 index 0000000000..1c0a6d5da5 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch @@ -0,0 +1,28 @@ +Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it + +Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch + +This addresses the cryto dependency seen during build. + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang +--- + cups/libs/cups/http-private.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h +index 9c88281..94a9817 100644 +--- a/cups/libs/cups/http-private.h ++++ b/cups/libs/cups/http-private.h +@@ -98,7 +98,6 @@ extern BIO_METHOD *_httpBIOMethods(void); + * The GNU TLS library is more of a "bare metal" SSL/TLS library... + */ + # include +-# include + + typedef struct + { +-- +2.0.0 + 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 @@ +Import patch from windriver linux for cross compilation, and split patches +into oe way under different directories such as i586, powerpc etc according +to Richard's opinion. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai +Signed-off-by: Wenzong Fan + +# Author: Chi Xu +# Date: Feb 26 2010 +# Summary: Generate arch.h for ppc32 +# + +diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak +--- ghostscript-8.64.orig/base/lib.mak 2010-02-10 10:30:02.000000000 +0800 ++++ ghostscript-8.64/base/lib.mak 2010-02-10 10:56:21.000000000 +0800 +@@ -67,8 +67,8 @@ + stdpre_h=$(GLSRC)stdpre.h $(stdpn_h) + stdint__h=$(GLSRC)stdint_.h $(std_h) + +-$(GLGEN)arch.h : $(GENARCH_XE) +- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) ++##$(GLGEN)arch.h : $(GENARCH_XE) ++## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) + + # Platform interfaces + diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch new file mode 100644 index 0000000000..601f5f127e --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-parallel-make.patch @@ -0,0 +1,929 @@ +When parallel make it will fail with multi copy, see +http://bugzilla.pokylinux.org/show_bug.cgi?id=1202 + +Upstream-Status: Pending + +Signed-off-by: Kang Kai +Signed-off-by: Wenzong Fan + +RP: Extended || true to all CP_ operations, they all can race e.g.: +| cp -f ./obj/gconfxx.h ./obj/gconfig.h +| cp: cannot create regular file `./obj/gconfig.h': File exists + +Signed-off-by: Hongxu Jia + +diff --git a/base/expat.mak b/base/expat.mak +index 4ee9c8c..2e16a9d 100644 +--- a/base/expat.mak ++++ b/base/expat.mak +@@ -82,7 +82,7 @@ $(EXPATOBJ)xmltok.$(OBJ) : $(EXPATSRC)xmltok.c $(expat_xmltok_hdrs) + # Copy the target definition we want + $(EXPATGEN)expat.dev : $(TOP_MAKEFILES) $(EXPAT_MAK) \ + $(EXPATGEN)expat_$(SHARE_EXPAT).dev +- $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev ++ $(CP_) $(EXPATGEN)expat_$(SHARE_EXPAT).dev $(EXPATGEN)expat.dev || true + + # Define the compiled in target + $(EXPATGEN)expat_0.dev : $(EXPAT_MAK) $(ECHOGS_XE) $(expat_) +diff --git a/base/freetype.mak b/base/freetype.mak +index 16f2b95..409f75b 100644 +--- a/base/freetype.mak ++++ b/base/freetype.mak +@@ -195,7 +195,7 @@ ft_winfonts=$(FTOBJ)winfnt.$(OBJ) + + # instantiate the requested build option (shared or compiled in) + $(FTGEN)freetype.dev : $(TOP_MAKEFILES) $(FTGEN)freetype_$(SHARE_FT).dev +- $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev ++ $(CP_) $(FTGEN)freetype_$(SHARE_FT).dev $(FTGEN)freetype.dev || true + + # Define the shared version. + $(FTGEN)freetype_1.dev : $(TOP_MAKEFILES) $(FT_MAK) $(ECHOGS_XE) +diff --git a/base/gs.mak b/base/gs.mak +index 7d75fb0..2a9596c 100644 +--- a/base/gs.mak ++++ b/base/gs.mak +@@ -433,7 +433,7 @@ $(gconfxx_h) : $(ld_tr) + + $(gconfig_h) : $(gconfxx_h) + $(RM_) $(gconfig_h) +- $(CP_) $(gconfxx_h) $(gconfig_h) ++ $(CP_) $(gconfxx_h) $(gconfig_h) || true + + # The line above is an empty command; don't delete. + +diff --git a/base/ijs.mak b/base/ijs.mak +index bc6d549..0139e1c 100644 +--- a/base/ijs.mak ++++ b/base/ijs.mak +@@ -66,7 +66,7 @@ $(IJSGEN)ijslib_1.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(ECHOGS_XE) + + + $(IJSGEN)ijslib.dev : $(TOP_MAKEFILES) $(IJS_MAK) $(IJSGEN)ijslib_$(SHARE_IJS).dev +- $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev ++ $(CP_) $(IJSGEN)ijslib_$(SHARE_IJS).dev $(IJSGEN)ijslib.dev || true + + + ijs_h=$(IJSSRC)ijs.h +diff --git a/base/jbig2.mak b/base/jbig2.mak +index bb74630..44617a0 100644 +--- a/base/jbig2.mak ++++ b/base/jbig2.mak +@@ -98,7 +98,7 @@ JBIG2O_=$(O_)$(JBIG2OBJ) + + # switch in the version of libjbig2.dev we're actually using + $(JBIG2GEN)jbig2dec.dev : $(TOP_MAKEFILES) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev +- $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev ++ $(CP_) $(JBIG2GEN)jbig2dec_$(SHARE_JBIG2).dev $(JBIG2GEN)jbig2dec.dev || true + + # dev file for shared (separately built) jbig2dec library + $(JBIG2GEN)jbig2dec_1.dev : $(TOP_MAKEFILES) $(JBIG2_MAK) $(ECHOGS_XE) +diff --git a/base/jpeg.mak b/base/jpeg.mak +index 5310a20..43cee63 100644 +--- a/base/jpeg.mak ++++ b/base/jpeg.mak +@@ -96,7 +96,7 @@ jconfig_h=$(GLGEN)jconfig.h + jmorecfg_h=$(GLGEN)jmorecfg.h + + $(GLGEN)jconfig_.h : $(GLGEN)jconfig$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS) +- $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h ++ $(CP_) $(GLGEN)jconfig$(SHARE_JPEG).h $(GLGEN)jconfig_.h || true + + $(GLGEN)jconfig0.h : $(ECHOGS_XE) $(GLSRC)gsjconf.h $(stdpre_h) $(MAKEFILE)\ + $(MAKEDIRS) +@@ -108,13 +108,13 @@ $(GLGEN)jconfig1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) + $(RMN_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h + + $(GLGEN)jconfig.h : $(GLGEN)jconfig0.h $(MAKEDIRS) +- $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h ++ $(CP_) $(GLGEN)jconfig0.h $(GLGEN)jconfig.h || true + + $(GLGEN)jmorecf_.h : $(GLGEN)jmorecf$(SHARE_JPEG).h $(MAKEFILE) $(MAKEDIRS) +- $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h ++ $(CP_) $(GLGEN)jmorecf$(SHARE_JPEG).h $(GLGEN)jmorecf_.h || true + + $(GLGEN)jmorecf0.h : $(GLSRC)gsjmorec.h $(GLGEN)jmcorig.h $(MAKEDIRS) +- $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h ++ $(CP_) $(GLSRC)gsjmorec.h $(GLGEN)jmorecf0.h || true + $(RM_) $(GLGEN)jmorecf1.h + + $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) +@@ -122,10 +122,10 @@ $(GLGEN)jmorecf1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) + $(RMN_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h + + $(GLGEN)jmorecfg.h : $(GLGEN)jmorecf0.h $(MAKEDIRS) +- $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h ++ $(CP_) $(GLGEN)jmorecf0.h $(GLGEN)jmorecfg.h || true + + $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS) +- $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h ++ $(CP_) $(JSRC)jmorecfg.h $(GLGEN)jmcorig.h || true + + # Contrary to what some portability bigots assert as fact, C compilers are + # not consistent about where they start searching for #included files: +@@ -141,23 +141,23 @@ $(GLGEN)jmcorig.h : $(JSRC)jmorecfg.h $(MAKEDIRS) + JHCOPY=$(GLGEN)jinclude.h $(GLGEN)jpeglib.h + + $(GLGEN)jinclude.h : $(JSRC)jinclude.h $(MAKEDIRS) +- $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h ++ $(CP_) $(JSRC)jinclude.h $(GLGEN)jinclude.h || true + + # jpeglib_.h doesn't really depend on jconfig.h or jmcorig.h, + # but we choose to put the dependencies here rather than in the + # definition of jpeglib__h. + $(GLGEN)jpeglib_.h : $(GLGEN)jpeglib$(SHARE_JPEG).h $(MAKEDIRS) +- $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h ++ $(CP_) $(GLGEN)jpeglib$(SHARE_JPEG).h $(GLGEN)jpeglib_.h || true + + $(GLGEN)jpeglib0.h : $(JSRC)jpeglib.h $(jconfig_h) $(jmorecfg_h) $(MAKEDIRS) +- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h ++ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib0.h || true + + $(GLGEN)jpeglib1.h : $(ECHOGS_XE) $(JPEG_MAK) $(MAKEDIRS) + $(EXP)$(ECHOGS_XE) -w $(GLGEN)jpeglib1.h -x 23 include -x 203c jpeglib.h -x 3e + + # We also need jpeglib.h for #includes in the library itself. + $(GLGEN)jpeglib.h : $(JSRC)jpeglib.h $(MAKEDIRS) +- $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h ++ $(CP_) $(JSRC)jpeglib.h $(GLGEN)jpeglib.h || true + + # In order to avoid having to keep the dependency lists for the IJG code + # accurate, we simply make all of them depend on the only files that +@@ -174,40 +174,40 @@ $(JGEN)jpegc0.dev : $(JPEG_MAK) $(ECHOGS_XE) $(jpegc0_) + $(SETMOD) $(JGEN)jpegc0 $(jpegc0_) + + $(JOBJ)jcomapi.$(OBJ) : $(JSRC)jcomapi.c $(JDEP) +- $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c ++ $(CP_) $(JSRC)jcomapi.c $(GLGEN)jcomapi.c || true + $(JCC) $(JO_)jcomapi.$(OBJ) $(C_) $(GLGEN)jcomapi.c + $(RM_) $(GLGEN)jcomapi.c + + $(JOBJ)jutils.$(OBJ) : $(JSRC)jutils.c $(JDEP) +- $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c ++ $(CP_) $(JSRC)jutils.c $(GLGEN)jutils.c || true + $(JCC) $(JO_)jutils.$(OBJ) $(C_) $(GLGEN)jutils.c + $(RM_) $(GLGEN)jutils.c + + $(JOBJ)jmemmgr.$(OBJ) : $(JSRC)jmemmgr.c $(JDEP) +- $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c ++ $(CP_) $(JSRC)jmemmgr.c $(GLGEN)jmemmgr.c || true + $(JCC) $(JO_)jmemmgr.$(OBJ) $(C_) $(GLGEN)jmemmgr.c + $(RM_) $(GLGEN)jmemmgr.c + + $(JOBJ)jerror.$(OBJ) : $(JSRC)jerror.c $(JDEP) +- $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c ++ $(CP_) $(JSRC)jerror.c $(GLGEN)jerror.c || true + $(JCC) $(JO_)jerror.$(OBJ) $(C_) $(GLGEN)jerror.c + $(RM_) $(GLGEN)jerror.c + + $(JOBJ)jaricom.$(OBJ) : $(JSRC)jaricom.c $(JDEP) +- $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c ++ $(CP_) $(JSRC)jaricom.c $(GLGEN)jaricom.c || true + $(JCC) $(JO_)jaricom.$(OBJ) $(C_) $(GLGEN)jaricom.c + $(RM_) $(GLGEN)jaricom.c + + # Encoding (compression) code. + + $(JGEN)jpege.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege_$(SHARE_JPEG).dev +- $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev ++ $(CP_) $(JGEN)jpege_$(SHARE_JPEG).dev $(JGEN)jpege.dev || true + + $(JGEN)jpege_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE) + $(SETMOD) $(JGEN)jpege_1 -lib $(JPEG_NAME) + + $(JGEN)jpege_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpege6.dev +- $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev ++ $(CP_) $(JGEN)jpege6.dev $(JGEN)jpege_0.dev || true + + jpege6=$(JOBJ)jcapimin.$(OBJ) $(JOBJ)jcapistd.$(OBJ) $(JOBJ)jcinit.$(OBJ) + +@@ -223,90 +223,90 @@ $(JGEN)jpege6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpege6) $(jpege + $(ADDMOD) $(JGEN)jpege6 -obj $(jpege_3) + + $(JOBJ)jcapimin.$(OBJ) : $(JSRC)jcapimin.c $(JDEP) +- $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c ++ $(CP_) $(JSRC)jcapimin.c $(GLGEN)jcapimin.c || true + $(JCC) $(JO_)jcapimin.$(OBJ) $(C_) $(GLGEN)jcapimin.c + $(RM_) $(GLGEN)jcapimin.c + + $(JOBJ)jcapistd.$(OBJ) : $(JSRC)jcapistd.c $(JDEP) +- $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c ++ $(CP_) $(JSRC)jcapistd.c $(GLGEN)jcapistd.c || true + $(JCC) $(JO_)jcapistd.$(OBJ) $(C_) $(GLGEN)jcapistd.c + $(RM_) $(GLGEN)jcapistd.c + + $(JOBJ)jcinit.$(OBJ) : $(JSRC)jcinit.c $(JDEP) +- $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c ++ $(CP_) $(JSRC)jcinit.c $(GLGEN)jcinit.c || true + $(JCC) $(JO_)jcinit.$(OBJ) $(C_) $(GLGEN)jcinit.c + $(RM_) $(GLGEN)jcinit.c + + $(JOBJ)jccoefct.$(OBJ) : $(JSRC)jccoefct.c $(JDEP) +- $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c ++ $(CP_) $(JSRC)jccoefct.c $(GLGEN)jccoefct.c || true + $(JCC) $(JO_)jccoefct.$(OBJ) $(C_) $(GLGEN)jccoefct.c + $(RM_) $(GLGEN)jccoefct.c + + $(JOBJ)jccolor.$(OBJ) : $(JSRC)jccolor.c $(JDEP) +- $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c ++ $(CP_) $(JSRC)jccolor.c $(GLGEN)jccolor.c || true + $(JCC) $(JO_)jccolor.$(OBJ) $(C_) $(GLGEN)jccolor.c + $(RM_) $(GLGEN)jccolor.c + + $(JOBJ)jcdctmgr.$(OBJ) : $(JSRC)jcdctmgr.c $(JDEP) +- $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c ++ $(CP_) $(JSRC)jcdctmgr.c $(GLGEN)jcdctmgr.c || true + $(JCC) $(JO_)jcdctmgr.$(OBJ) $(C_) $(GLGEN)jcdctmgr.c + $(RM_) $(GLGEN)jcdctmgr.c + + $(JOBJ)jchuff.$(OBJ) : $(JSRC)jchuff.c $(JDEP) +- $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c ++ $(CP_) $(JSRC)jchuff.c $(GLGEN)jchuff.c || true + $(JCC) $(JO_)jchuff.$(OBJ) $(C_) $(GLGEN)jchuff.c + $(RM_) $(GLGEN)jchuff.c + + $(JOBJ)jcmainct.$(OBJ) : $(JSRC)jcmainct.c $(JDEP) +- $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c ++ $(CP_) $(JSRC)jcmainct.c $(GLGEN)jcmainct.c || true + $(JCC) $(JO_)jcmainct.$(OBJ) $(C_) $(GLGEN)jcmainct.c + $(RM_) $(GLGEN)jcmainct.c + + $(JOBJ)jcmarker.$(OBJ) : $(JSRC)jcmarker.c $(JDEP) +- $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c ++ $(CP_) $(JSRC)jcmarker.c $(GLGEN)jcmarker.c || true + $(JCC) $(JO_)jcmarker.$(OBJ) $(C_) $(GLGEN)jcmarker.c + $(RM_) $(GLGEN)jcmarker.c + + $(JOBJ)jcmaster.$(OBJ) : $(JSRC)jcmaster.c $(JDEP) +- $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c ++ $(CP_) $(JSRC)jcmaster.c $(GLGEN)jcmaster.c || true + $(JCC) $(JO_)jcmaster.$(OBJ) $(C_) $(GLGEN)jcmaster.c + $(RM_) $(GLGEN)jcmaster.c + + $(JOBJ)jcparam.$(OBJ) : $(JSRC)jcparam.c $(JDEP) +- $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c ++ $(CP_) $(JSRC)jcparam.c $(GLGEN)jcparam.c || true + $(JCC) $(JO_)jcparam.$(OBJ) $(C_) $(GLGEN)jcparam.c + $(RM_) $(GLGEN)jcparam.c + + $(JOBJ)jcprepct.$(OBJ) : $(JSRC)jcprepct.c $(JDEP) +- $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c ++ $(CP_) $(JSRC)jcprepct.c $(GLGEN)jcprepct.c || true + $(JCC) $(JO_)jcprepct.$(OBJ) $(C_) $(GLGEN)jcprepct.c + $(RM_) $(GLGEN)jcprepct.c + + $(JOBJ)jcsample.$(OBJ) : $(JSRC)jcsample.c $(JDEP) +- $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c ++ $(CP_) $(JSRC)jcsample.c $(GLGEN)jcsample.c || true + $(JCC) $(JO_)jcsample.$(OBJ) $(C_) $(GLGEN)jcsample.c + $(RM_) $(GLGEN)jcsample.c + + $(JOBJ)jfdctint.$(OBJ) : $(JSRC)jfdctint.c $(JDEP) +- $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c ++ $(CP_) $(JSRC)jfdctint.c $(GLGEN)jfdctint.c || true + $(JCC) $(JO_)jfdctint.$(OBJ) $(C_) $(GLGEN)jfdctint.c + $(RM_) $(GLGEN)jfdctint.c + + $(JOBJ)jcarith.$(OBJ) : $(JSRC)jcarith.c $(JDEP) +- $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c ++ $(CP_) $(JSRC)jcarith.c $(GLGEN)jcarith.c || true + $(JCC) $(JO_)jcarith.$(OBJ) $(C_) $(GLGEN)jcarith.c + $(RM_) $(GLGEN)jcarith.c + + # Decompression code + + $(JGEN)jpegd.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd_$(SHARE_JPEG).dev +- $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev ++ $(CP_) $(JGEN)jpegd_$(SHARE_JPEG).dev $(JGEN)jpegd.dev || true + + $(JGEN)jpegd_1.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(ECHOGS_XE) + $(SETMOD) $(JGEN)jpegd_1 -lib $(JPEG_NAME) + + $(JGEN)jpegd_0.dev : $(TOP_MAKEFILES) $(JPEG_MAK) $(JGEN)jpegd6.dev +- $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev ++ $(CP_) $(JGEN)jpegd6.dev $(JGEN)jpegd_0.dev || true + + jpegd6=$(JOBJ)jdapimin.$(OBJ) $(JOBJ)jdapistd.$(OBJ) $(JOBJ)jdinput.$(OBJ) $(JOBJ)jdhuff.$(OBJ) + +@@ -322,76 +322,76 @@ $(JGEN)jpegd6.dev : $(JPEG_MAK) $(ECHOGS_XE) $(JGEN)jpegc0.dev $(jpegd6) $(jpegd + $(ADDMOD) $(JGEN)jpegd6 -obj $(jpegd_3) + + $(JOBJ)jdapimin.$(OBJ) : $(JSRC)jdapimin.c $(JDEP) +- $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c ++ $(CP_) $(JSRC)jdapimin.c $(GLGEN)jdapimin.c || true + $(JCC) $(JO_)jdapimin.$(OBJ) $(C_) $(GLGEN)jdapimin.c + $(RM_) $(GLGEN)jdapimin.c + + $(JOBJ)jdapistd.$(OBJ) : $(JSRC)jdapistd.c $(JDEP) +- $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c ++ $(CP_) $(JSRC)jdapistd.c $(GLGEN)jdapistd.c || true + $(JCC) $(JO_)jdapistd.$(OBJ) $(C_) $(GLGEN)jdapistd.c + $(RM_) $(GLGEN)jdapistd.c + + $(JOBJ)jdcoefct.$(OBJ) : $(JSRC)jdcoefct.c $(JDEP) +- $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c ++ $(CP_) $(JSRC)jdcoefct.c $(GLGEN)jdcoefct.c || true + $(JCC) $(JO_)jdcoefct.$(OBJ) $(C_) $(GLGEN)jdcoefct.c + $(RM_) $(GLGEN)jdcoefct.c + + $(JOBJ)jdcolor.$(OBJ) : $(JSRC)jdcolor.c $(JDEP) +- $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c ++ $(CP_) $(JSRC)jdcolor.c $(GLGEN)jdcolor.c || true + $(JCC) $(JO_)jdcolor.$(OBJ) $(C_) $(GLGEN)jdcolor.c + $(RM_) $(GLGEN)jdcolor.c + + $(JOBJ)jddctmgr.$(OBJ) : $(JSRC)jddctmgr.c $(JDEP) +- $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c ++ $(CP_) $(JSRC)jddctmgr.c $(GLGEN)jddctmgr.c || true + $(JCC) $(JO_)jddctmgr.$(OBJ) $(C_) $(GLGEN)jddctmgr.c + $(RM_) $(GLGEN)jddctmgr.c + + $(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP) +- $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c ++ $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true + $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c + $(RM_) $(GLGEN)jdhuff.c + + $(JOBJ)jdinput.$(OBJ) : $(JSRC)jdinput.c $(JDEP) +- $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c ++ $(CP_) $(JSRC)jdinput.c $(GLGEN)jdinput.c || true + $(JCC) $(JO_)jdinput.$(OBJ) $(C_) $(GLGEN)jdinput.c + $(RM_) $(GLGEN)jdinput.c + + $(JOBJ)jdmainct.$(OBJ) : $(JSRC)jdmainct.c $(JDEP) +- $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c ++ $(CP_) $(JSRC)jdmainct.c $(GLGEN)jdmainct.c || true + $(JCC) $(JO_)jdmainct.$(OBJ) $(C_) $(GLGEN)jdmainct.c + $(RM_) $(GLGEN)jdmainct.c + + $(JOBJ)jdmarker.$(OBJ) : $(JSRC)jdmarker.c $(JDEP) +- $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c ++ $(CP_) $(JSRC)jdmarker.c $(GLGEN)jdmarker.c || true + $(JCC) $(JO_)jdmarker.$(OBJ) $(C_) $(GLGEN)jdmarker.c + $(RM_) $(GLGEN)jdmarker.c + + $(JOBJ)jdmaster.$(OBJ) : $(JSRC)jdmaster.c $(JDEP) +- $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c ++ $(CP_) $(JSRC)jdmaster.c $(GLGEN)jdmaster.c || true + $(JCC) $(JO_)jdmaster.$(OBJ) $(C_) $(GLGEN)jdmaster.c + $(RM_) $(GLGEN)jdmaster.c + + #$(JOBJ)jdhuff.$(OBJ) : $(JSRC)jdhuff.c $(JDEP) +-# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c ++# $(CP_) $(JSRC)jdhuff.c $(GLGEN)jdhuff.c || true + # $(JCC) $(JO_)jdhuff.$(OBJ) $(C_) $(GLGEN)jdhuff.c + # $(RM_) $(GLGEN)jdhuff.c + + $(JOBJ)jdpostct.$(OBJ) : $(JSRC)jdpostct.c $(JDEP) +- $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c ++ $(CP_) $(JSRC)jdpostct.c $(GLGEN)jdpostct.c || true + $(JCC) $(JO_)jdpostct.$(OBJ) $(C_) $(GLGEN)jdpostct.c + $(RM_) $(GLGEN)jdpostct.c + + $(JOBJ)jdsample.$(OBJ) : $(JSRC)jdsample.c $(JDEP) +- $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c ++ $(CP_) $(JSRC)jdsample.c $(GLGEN)jdsample.c || true + $(JCC) $(JO_)jdsample.$(OBJ) $(C_) $(GLGEN)jdsample.c + $(RM_) $(GLGEN)jdsample.c + + $(JOBJ)jidctint.$(OBJ) : $(JSRC)jidctint.c $(JDEP) +- $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c ++ $(CP_) $(JSRC)jidctint.c $(GLGEN)jidctint.c || true + $(JCC) $(JO_)jidctint.$(OBJ) $(C_) $(GLGEN)jidctint.c + $(RM_) $(GLGEN)jidctint.c + + $(JOBJ)jdarith.$(OBJ) : $(JSRC)jdarith.c $(JDEP) +- $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c ++ $(CP_) $(JSRC)jdarith.c $(GLGEN)jdarith.c || true + $(JCC) $(JO_)jdarith.$(OBJ) $(C_) $(GLGEN)jdarith.c + $(RM_) $(GLGEN)jdarith.c +diff --git a/base/jpegxr.mak b/base/jpegxr.mak +index 0f09a3a..36495dd 100644 +--- a/base/jpegxr.mak ++++ b/base/jpegxr.mak +@@ -103,7 +103,7 @@ $(JPEGXR_OBJ)x_strip.$(OBJ) : $(JPEGXR_SRC)x_strip.c $(jpegxr_hdrs) + # Copy the target definition we want + $(JPEGXR_GEN)jpegxr.dev : $(TOP_MAKEFILES) $(JPEGXR_MAK) \ + $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev +- $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev ++ $(CP_) $(JPEGXR_GEN)jpegxr_$(SHARE_JPEGXR).dev $(JPEGXR_GEN)jpegxr.dev || true + + # Define the compiled in target + $(JPEGXR_GEN)jpegxr_0.dev : $(JPEGXR_MAK) $(ECHOGS_XE) $(jpegxr_objs) +diff --git a/base/lcms.mak b/base/lcms.mak +index 18cfa09..269e7ff 100644 +--- a/base/lcms.mak ++++ b/base/lcms.mak +@@ -84,7 +84,7 @@ LCMSO_=$(O_)$(LCMSOBJ) + + # switch in the version of lcms.dev we're actually using + $(LCMSGEN)lcms.dev : $(TOP_MAKEFILES) $(LCMSGEN)lcms_$(SHARE_LCMS).dev +- $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev ++ $(CP_) $(LCMSGEN)lcms_$(SHARE_LCMS).dev $(LCMSGEN)lcms.dev || true + + # dev file for shared (separately built) lcms library + $(LCMSGEN)lcms_1.dev : $(TOP_MAKEFILES) $(LCMS_MAK) $(ECHOGS_XE) +diff --git a/base/lcms2.mak b/base/lcms2.mak +index 52f750c..33a9c16 100644 +--- a/base/lcms2.mak ++++ b/base/lcms2.mak +@@ -85,7 +85,7 @@ LCMS2O_=$(O_)$(LCMS2OBJ) + + # switch in the version of lcms2.dev we're actually using + $(LCMS2GEN)lcms2.dev : $(TOP_MAKEFILES) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev +- $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev ++ $(CP_) $(LCMS2GEN)lcms2_$(SHARE_LCMS).dev $(LCMS2GEN)lcms2.dev || true + + # dev file for shared (separately built) lcms library + $(LCMS2GEN)lcms2_1.dev : $(TOP_MAKEFILES) $(LCMS2_MAK) $(ECHOGS_XE) +diff --git a/base/lcups.mak b/base/lcups.mak +index 0bfb3ac..fcdb170 100644 +--- a/base/lcups.mak ++++ b/base/lcups.mak +@@ -114,7 +114,7 @@ libcups.config-clean : + + # instantiate the requested build option (shared or compiled in) + $(LIBCUPSGEN)lcups.dev : $(TOP_MAKEFILES) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev +- $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev ++ $(CP_) $(LIBCUPSGEN)lcups_$(SHARE_LCUPS).dev $(LIBCUPSGEN)lcups.dev || true + + # Define the shared version. + $(LIBCUPSGEN)lcups_1.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) +@@ -131,7 +131,7 @@ $(LIBCUPSGEN)lcups_0.dev : $(TOP_MAKEFILES) $(LCUPS_MAK) $(ECHOGS_XE) \ + # for simplicity we have every source file depend on all headers + + $(LIBCUPSGEN)$(D)cups$(D)config.h : $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h +- $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h ++ $(CP_) $(LCUPSSRCDIR)$(D)libs$(D)config$(LCUPSBUILDTYPE).h $(LIBCUPSGEN)$(D)cups$(D)config.h || true + + $(LIBCUPSOBJ)adminutil.$(OBJ) : $(LIBCUPSSRC)adminutil.c $(LIBSCUPSHEADERS) $(LIBCUPSGEN)$(D)cups$(D)config.h + $(LCUPS_CC) $(LCUPSO_)adminutil.$(OBJ) $(C_) $(LIBCUPSSRC)adminutil.c +@@ -218,7 +218,7 @@ $(LIBCUPSOBJ)mark.$(OBJ) : $(LIBCUPSSRC)mark.c $(LIBSCUPSHEADERS) + $(LCUPS_CC) $(LCUPSO_)mark.$(OBJ) $(C_) $(LIBCUPSSRC)mark.c + + $(LIBCUPSOBJ)cups_md5.$(OBJ) : $(LIBCUPSSRC)md5.c $(LIBSCUPSHEADERS) +- $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c ++ $(CP_) $(LIBCUPSSRC)md5.c $(LIBCUPSGEN)cups_md5.c || true + $(LCUPS_CC) $(LCUPSO_)cups_md5.$(OBJ) $(C_) $(LIBCUPSGEN)cups_md5.c + + $(LIBCUPSOBJ)md5passwd.$(OBJ) : $(LIBCUPSSRC)md5passwd.c $(LIBSCUPSHEADERS) +@@ -255,7 +255,7 @@ $(LIBCUPSOBJ)snmp.$(OBJ) : $(LIBCUPSSRC)snmp.c $(LIBSCUPSHEADERS) + $(LCUPS_CC) $(LCUPSO_)snmp.$(OBJ) $(C_) $(LIBCUPSSRC)snmp.c + + $(LIBCUPSOBJ)cups_snpf.$(OBJ) : $(LIBCUPSSRC)snprintf.c $(LIBSCUPSHEADERS) +- $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c ++ $(CP_) $(LIBCUPSSRC)snprintf.c $(LIBCUPSGEN)cups_snpf.c || true + $(LCUPS_CC) $(LCUPSO_)cups_snpf.$(OBJ) $(C_) $(LIBCUPSGEN)cups_snpf.c + + $(LIBCUPSOBJ)string.$(OBJ) : $(LIBCUPSSRC)string.c $(LIBSCUPSHEADERS) +@@ -271,5 +271,5 @@ $(LIBCUPSOBJ)usersys.$(OBJ) : $(LIBCUPSSRC)usersys.c $(LIBSCUPSHEADERS) + $(LCUPS_CC) $(LCUPSO_)usersys.$(OBJ) $(C_) $(LIBCUPSSRC)usersys.c + + $(LIBCUPSOBJ)cups_util.$(OBJ) : $(LIBCUPSSRC)util.c $(LIBSCUPSHEADERS) +- $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c ++ $(CP_) $(LIBCUPSSRC)util.c $(LIBCUPSGEN)cups_util.c || true + $(LCUPS_CC) $(LCUPSO_)cups_util.$(OBJ) $(C_) $(LIBCUPSGEN)cups_util.c +diff --git a/base/lcupsi.mak b/base/lcupsi.mak +index ea4047f..0102d93 100644 +--- a/base/lcupsi.mak ++++ b/base/lcupsi.mak +@@ -73,7 +73,7 @@ libcupsi.config-clean : + + # instantiate the requested build option (shared or compiled in) + $(LIBCUPSIGEN)lcupsi.dev : $(TOP_MAKEFILES) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev +- $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev ++ $(CP_) $(LIBCUPSIGEN)lcupsi_$(SHARE_LCUPSI).dev $(LIBCUPSIGEN)lcupsi.dev || true + + # Define the shared version. + $(LIBCUPSIGEN)lcupsi_1.dev : $(TOP_MAKEFILES) $(LCUPSI_MAK) $(ECHOGS_XE) +diff --git a/base/ldf_jb2.mak b/base/ldf_jb2.mak +index 3f50892..97c76a0 100644 +--- a/base/ldf_jb2.mak ++++ b/base/ldf_jb2.mak +@@ -223,7 +223,7 @@ ldf_jb2_HDRS=$(ldf_jb2_common_HDRS) $(ldf_jb2_compress_HDRS) + + # switch in the selected library .dev + $(LDF_JB2_GEN)ldf_jb2.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev +- $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev ++ $(CP_) $(LDF_JB2_GEN)ldf_jb2_$(SHARE_JBIG2).dev $(LDF_JB2_GEN)ldf_jb2.dev || true + + # external link .dev + $(LDF_JB2_GEN)ldf_jb2_1.dev : $(TOP_MAKEFILES) $(LDF_JB2_MAK) $(ECHOGS_XE) +diff --git a/base/lib.mak b/base/lib.mak +index 3ad7db3..87b4f01 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -343,7 +343,7 @@ md5_=$(GLOBJ)md5.$(OBJ) + $(GLOBJ)md5.$(OBJ) : $(GLSRC)md5.c $(AK) $(md5_h) $(std_h) $(MAKEDIRS) $(EXP)$(ECHOGS_XE) + $(EXP)$(ECHOGS_XE) -w $(GLGEN)md5.h -x 23 include -x 2022 memory_.h -x 22 + $(EXP)$(ECHOGS_XE) -a $(GLGEN)md5.h -+R $(GLSRC)md5.h +- $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c ++ $(CP_) $(GLSRC)md5.c $(GLGEN)md5.c || true + $(GLCC) $(GLO_)md5.$(OBJ) $(C_) $(GLGEN)md5.c + $(RM_) $(GLGEN)md5.c $(GLGEN)md5.h + +@@ -624,19 +624,19 @@ $(GLOBJ)gconfig.$(OBJ) : $(gconfig_h) $(GLSRC)gconf.c $(AK) $(gx_h)\ + $(gxdevice_h) $(gxiclass_h) $(gxiodev_h) $(gxiparam_h) $(TOP_MAKEFILES)\ + $(MAKEDDIRS) + $(RM_) $(GLGEN)gconfig.c +- $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c ++ $(CP_) $(GLSRC)gconf.c $(GLGEN)gconfig.c || true + $(GLCC) $(GLO_)gconfig.$(OBJ) $(C_) $(GLGEN)gconfig.c + + $(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ + $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS) + $(RM_) $(GLGEN)gscdefs.c +- $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c ++ $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c || true + $(GLCC) $(GLO_)gscdefs.$(OBJ) $(C_) $(GLGEN)gscdefs.c + + $(AUX)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ + $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) $(MAKEDIRS) + $(RM_) $(AUX)gscdefs.c +- $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c ++ $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c || true + $(GLCCAUX) $(C_) $(AUXO_)gscdefs.$(OBJ) $(AUX)gscdefs.c + + $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h)\ +@@ -1527,7 +1527,7 @@ $(GLOBJ)sjpegc_0.$(OBJ) : $(GLSRC)sjpegc.c $(AK) $(stdio__h) $(string__h)\ + $(GLJCC) $(GLO_)sjpegc_0.$(OBJ) $(C_) $(GLSRC)sjpegc.c + + $(GLOBJ)sjpegc.$(OBJ) : $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) +- $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) ++ $(CP_) $(GLOBJ)sjpegc_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegc.$(OBJ) || true + + # sdcparam is used by the filter operator and the PS/PDF writer. + # It is not included automatically in sdcte/d. +@@ -1555,7 +1555,7 @@ $(GLOBJ)sdcte_0.$(OBJ) : $(GLSRC)sdcte.c $(AK)\ + $(GLJCC) $(GLO_)sdcte_0.$(OBJ) $(C_) $(GLSRC)sdcte.c + + $(GLOBJ)sdcte.$(OBJ) : $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) ++ $(CP_) $(GLOBJ)sdcte_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdcte.$(OBJ) || true + + + $(GLOBJ)sjpege_1.$(OBJ) : $(GLSRC)sjpege.c $(AK)\ +@@ -1571,7 +1571,7 @@ $(GLOBJ)sjpege_0.$(OBJ) : $(GLSRC)sjpege.c $(AK)\ + $(GLJCC) $(GLO_)sjpege_0.$(OBJ) $(C_) $(GLSRC)sjpege.c + + $(GLOBJ)sjpege.$(OBJ) : $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) ++ $(CP_) $(GLOBJ)sjpege_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpege.$(OBJ) || true + + # sdeparam is used by the filter operator and the PS/PDF writer. + # It is not included automatically in sdcte. +@@ -1603,7 +1603,7 @@ $(GLOBJ)sdctd_0.$(OBJ) : $(GLSRC)sdctd.c $(AK)\ + $(GLJCC) $(GLO_)sdctd_0.$(OBJ) $(C_) $(GLSRC)sdctd.c + + $(GLOBJ)sdctd.$(OBJ) : $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) ++ $(CP_) $(GLOBJ)sdctd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sdctd.$(OBJ) || true + + + $(GLOBJ)sjpegd_1.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\ +@@ -1620,7 +1620,7 @@ $(GLOBJ)sjpegd_0.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\ + + + $(GLOBJ)sjpegd.$(OBJ) : $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) ++ $(CP_) $(GLOBJ)sjpegd_$(SHARE_JPEG).$(OBJ) $(GLOBJ)sjpegd.$(OBJ) || true + + # sddparam is used by the filter operator. + # It is not included automatically in sdctd. +@@ -1643,7 +1643,7 @@ $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_) + + # We need slzwe.dev as a synonym for lzwe.dev for BAND_LIST_STORAGE = memory. + $(GLD)slzwe.dev : $(GLD)lzwe.dev +- $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev ++ $(CP_) $(GLD)lzwe.dev $(GLD)slzwe.dev || true + + $(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\ + $(slzwx_h) $(strimpl_h) $(MAKEDIRS) +@@ -1659,7 +1659,7 @@ $(GLD)lzwd.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwd_) + + # We need slzwd.dev as a synonym for lzwd.dev for BAND_LIST_STORAGE = memory. + $(GLD)slzwd.dev : $(GLD)lzwd.dev +- $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev ++ $(CP_) $(GLD)lzwd.dev $(GLD)slzwd.dev || true + + $(GLOBJ)slzwd.$(OBJ) : $(GLSRC)slzwd.c $(AK) $(stdio__h) $(gdebug_h)\ + $(slzwx_h) $(strimpl_h) $(MAKEDIRS) +@@ -1709,7 +1709,7 @@ $(GLOBJ)saes.$(OBJ) : $(GLSRC)saes.c $(AK) $(memory__h)\ + # ---------------- JBIG2 compression filter ---------------- # + + $(GLD)sjbig2.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjbig2_$(JBIG2_LIB).dev +- $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev ++ $(CP_) $(GLD)sjbig2_$(JBIG2_LIB).dev $(GLD)sjbig2.dev || true + + # jbig2dec version + sjbig2_jbig2dec=$(GLOBJ)sjbig2.$(OBJ) +@@ -1745,7 +1745,7 @@ $(GLOBJ)sjbig2_luratech.$(OBJ) : $(GLSRC)sjbig2_luratech.c $(AK) \ + # ---------------- JPEG 2000 compression filter ---------------- # + + $(GLD)sjpx.dev : $(LIB_MAK) $(ECHOGS_XE) $(GLD)sjpx_$(JPX_LIB).dev +- $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev ++ $(CP_) $(GLD)sjpx_$(JPX_LIB).dev $(GLD)sjpx.dev || true + + $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \ + $(memory__h) $(gsmalloc_h) \ +@@ -1874,7 +1874,7 @@ $(GLOBJ)szlibc_0.$(OBJ) : $(GLSRC)szlibc.c $(AK) $(std_h)\ + $(GLZCC) $(GLO_)szlibc_0.$(OBJ) $(C_) $(GLSRC)szlibc.c + + $(GLOBJ)szlibc.$(OBJ) : $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) ++ $(CP_) $(GLOBJ)szlibc_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibc.$(OBJ) || true + + szlibe_=$(szlibc_) $(GLOBJ)szlibe.$(OBJ) + $(GLD)szlibe.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibe.dev $(szlibe_) +@@ -1890,7 +1890,7 @@ $(GLOBJ)szlibe_0.$(OBJ) : $(GLSRC)szlibe.c $(AK) $(std_h)\ + $(GLZCC) $(GLO_)szlibe_0.$(OBJ) $(C_) $(GLSRC)szlibe.c + + $(GLOBJ)szlibe.$(OBJ) : $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) ++ $(CP_) $(GLOBJ)szlibe_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibe.$(OBJ) || true + + szlibd_=$(szlibc_) $(GLOBJ)szlibd.$(OBJ) + $(GLD)szlibd.dev : $(LIB_MAK) $(ECHOGS_XE) $(ZGENDIR)$(D)zlibd.dev $(szlibd_) +@@ -1906,7 +1906,7 @@ $(GLOBJ)szlibd_0.$(OBJ) : $(GLSRC)szlibd.c $(AK) $(std_h) $(memory__h)\ + $(GLZCC) $(GLO_)szlibd_0.$(OBJ) $(C_) $(GLSRC)szlibd.c + + $(GLOBJ)szlibd.$(OBJ) : $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) ++ $(CP_) $(GLOBJ)szlibd_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)szlibd.$(OBJ) || true + + # ---------------- Page devices ---------------- # + # We include this here, rather than in devs.mak, because it is more like +@@ -2796,7 +2796,7 @@ $(GLOBJ)gsicc_lcms_0.$(OBJ) : $(GLSRC)gsicc_lcms.c\ + $(GLLCMSCC) $(GLO_)gsicc_lcms_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms.c + + $(GLOBJ)gsicc_lcms.$(OBJ) : $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(gp_h) +- $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) ++ $(CP_) $(GLOBJ)gsicc_lcms_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms.$(OBJ) || true + + + $(GLOBJ)gsicc_lcms2_1.$(OBJ) : $(GLSRC)gsicc_lcms2.c\ +@@ -2808,7 +2808,7 @@ $(GLOBJ)gsicc_lcms2_0.$(OBJ) : $(GLSRC)gsicc_lcms2.c\ + $(GLLCMS2CC) $(GLO_)gsicc_lcms2_0.$(OBJ) $(C_) $(GLSRC)gsicc_lcms2.c + + $(GLOBJ)gsicc_lcms2.$(OBJ) : $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(gp_h) +- $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) ++ $(CP_) $(GLOBJ)gsicc_lcms2_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_lcms2.$(OBJ) || true + + # Note that gsicc_create requires compile with lcms to obtain icc34.h + # header file that is used for creating ICC structures from PS objects. +@@ -2828,7 +2828,7 @@ $(GLOBJ)gsicc_create_0.$(OBJ) : $(GLSRC)gsicc_create.c $(AK) $(string__h)\ + $(GLLCMSCC) $(GLO_)gsicc_create_0.$(OBJ) $(C_) $(GLSRC)gsicc_create.c + + $(GLOBJ)gsicc_create.$(OBJ) : $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) ++ $(CP_) $(GLOBJ)gsicc_create_$(SHARE_LCMS).$(OBJ) $(GLOBJ)gsicc_create.$(OBJ) || true + + + #include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */ +@@ -3132,7 +3132,7 @@ $(GLGEN)gsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) + $(PS_ROMFS_ARGS) $(GL_ROMFS_ARGS) + + $(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) +- $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c ++ $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c || true + + # the following module is only included if the romfs.dev FEATURE is enabled + $(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \ +@@ -3148,7 +3148,7 @@ $(GLOBJ)gsiorom_0.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \ + $(GLCC) $(GLO_)gsiorom_0.$(OBJ) $(I_)$(ZI_)$(_I) $(C_) $(GLSRC)gsiorom.c + + $(GLOBJ)gsiorom.$(OBJ) : $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(MAKEDIRS) +- $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) ++ $(CP_) $(GLOBJ)gsiorom_$(SHARE_ZLIB).$(OBJ) $(GLOBJ)gsiorom.$(OBJ) || true + + $(GLOBJ)gsromfs1.$(OBJ) : $(GLOBJ)gsromfs1.c $(time__h) $(MAKEDIRS) + $(GLCC) $(GLO_)gsromfs1.$(OBJ) $(C_) $(GLOBJ)gsromfs1.c +diff --git a/base/lwf_jp2.mak b/base/lwf_jp2.mak +index ca1b7cc..ad6446d 100644 +--- a/base/lwf_jp2.mak ++++ b/base/lwf_jp2.mak +@@ -176,7 +176,7 @@ lwf_jp2_HDRS = \ + + # switch in the selected library .dev + $(LWF_JP2_GEN)lwf_jp2.dev : $(TOP_MAKEFILES) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev +- $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev ++ $(CP_) $(LWF_JP2_GEN)lwf_jp2_$(SHARE_JPX).dev $(LWF_JP2_GEN)lwf_jp2.dev || true + + # external link .dev + $(LWF_JP2_GEN)lwf_jp2_1.dev : $(TOP_MAKEFILES) $(LWF_JP2_MAK) $(ECHOGS_XE) +diff --git a/base/macos-mcp.mak b/base/macos-mcp.mak +index 4ded7f3..3599ed9 100644 +--- a/base/macos-mcp.mak ++++ b/base/macos-mcp.mak +@@ -383,11 +383,11 @@ CWPROJ_XML=./ghostscript.mcp.xml + + $(CWPROJ_XML): $(gconfigd_h) + -mkdir -p obj/sys +- $(CP_) $(macsystypes_h) $(systypes_h) ++ $(CP_) $(macsystypes_h) $(systypes_h) || true + $(SH) $(GLSRC)macgenmcpxml.sh `$(CAT) $(ld_tr)` > $(CWPROJ_XML) +- $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c +- $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c +- $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c ++ $(CP_) $(GLSRC)gconf.c $(GLOBJ)gconfig.c || true ++ $(CP_) $(GLSRC)iconf.c $(GLOBJ)iconfig.c || true ++ $(CP_) $(GLSRC)gscdef.c $(GLOBJ)gscdefs.c || true + /Developer/Tools/SetFile -c CWIE -t TEXT $(CWPROJ_XML) + + $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(CWPROJ_XML) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) +diff --git a/base/openjpeg.mak b/base/openjpeg.mak +index 32be240..4a6b429 100644 +--- a/base/openjpeg.mak ++++ b/base/openjpeg.mak +@@ -99,7 +99,7 @@ open_jpeg_HDRS = \ + + # switch in the selected library .dev + $(OPEN_JPEG_GEN)openjpeg.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev +- $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev ++ $(CP_) $(OPEN_JPEG_GEN)openjpeg_$(SHARE_JPX).dev $(OPEN_JPEG_GEN)openjpeg.dev || true + + # external link .dev + $(OPEN_JPEG_GEN)openjpeg_1.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) $(ECHOGS_XE) +diff --git a/base/openvms.mak b/base/openvms.mak +index e5ae40b..286ee84 100644 +--- a/base/openvms.mak ++++ b/base/openvms.mak +@@ -365,7 +365,7 @@ SH= + + # Define generic commands. + +-CP_=$$ @$(GLSRCDIR)COPY_ONE ++CP_=$$ @$(GLSRCDIR)COPY_ONE || true + + # Define the command for deleting (a) file(s) (including wild cards) + +diff --git a/base/png.mak b/base/png.mak +index f01c426..8a89884 100644 +--- a/base/png.mak ++++ b/base/png.mak +@@ -79,7 +79,7 @@ png.config-clean : + $(RM_) $(PNGGEN)lpg*.dev + + $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt +- $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h) ++ $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h) || true + + PDEP=$(AK) $(pnglibconf_h) + +@@ -134,7 +134,7 @@ $(PNGOBJ)pngget.$(OBJ) : $(PNGSRC)pngget.c $(PDEP) + + # Define the version of libpng.dev that we are actually using. + $(PNGGEN)libpng.dev : $(TOP_MAKEFILES) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev +- $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev ++ $(CP_) $(PNGGEN)libpng_$(SHARE_LIBPNG).dev $(PNGGEN)libpng.dev || true + + # Define the shared version of libpng. + # Note that it requires libz, which must be searched *after* libpng. +diff --git a/base/tiff.mak b/base/tiff.mak +index 0ea9f9e..80d8926 100644 +--- a/base/tiff.mak ++++ b/base/tiff.mak +@@ -53,11 +53,11 @@ tiff_11=$(TIFFOBJ)gstiffio.$(OBJ) + + $(TIFFSRC)libtiff$(D)tif_config.unix.h : $(TIFFSRC)libtiff$(D)tif_config.h.in + cd $(TIFFSRC) && ./configure +- $(CP_) $(TIFFCONF)libtiff$(D)tif_config.h $(TIFFCONF)libtiff$(D)tif_config.unix.h ++ $(CP_) $(TIFFCONF)libtiff$(D)tif_config.h $(TIFFCONF)libtiff$(D)tif_config.unix.h || true + + $(TIFFSRC)libtiff$(D)tiffconf.unix.h : $(TIFFSRC)libtiff$(D)tiffconf.h.in + cd $(TIFFSRC) && ./configure +- $(CP_) $(TIFFCONF)libtiff$(D)tiffconf.h $(TIFFCONF)libtiff$(D)tiffconf.unix.h ++ $(CP_) $(TIFFCONF)libtiff$(D)tiffconf.h $(TIFFCONF)libtiff$(D)tiffconf.unix.h || true + + $(TIFFOBJ)tif_aux.$(OBJ) : $(TIFFSRC)/libtiff/tif_aux.c $(TIFFDEP) + $(TIFFCC) $(TIFFO_)tif_aux.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_aux.c +@@ -189,14 +189,14 @@ $(TIFFOBJ)gstiffio.$(OBJ) : $(GLSRC)gstiffio.c $(gstiffio_h) $(PDEVH) $(stdint__ + $(TIFFCC) $(TIFFO_)gstiffio.$(OBJ) $(D_)SHARE_LIBTIFF=$(SHARE_LIBTIFF) $(C_) $(GLSRC)gstiffio.c + + $(TIFFGEN)tif_config.h: $(TIFFCONFIG_H) +- $(CP_) $(TIFFCONFIG_H) $(TIFFGEN)tif_config.h ++ $(CP_) $(TIFFCONFIG_H) $(TIFFGEN)tif_config.h || true + + $(TIFFGEN)tiffconf.h: $(TIFFCONF_H) +- $(CP_) $(TIFFCONF_H) $(TIFFGEN)tiffconf.h ++ $(CP_) $(TIFFCONF_H) $(TIFFGEN)tiffconf.h || true + + # Define the version of libtiff.dev that we are actually using. + $(TIFFGEN)libtiff.dev : $(TOP_MAKEFILES) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev +- $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev ++ $(CP_) $(TIFFGEN)libtiff_$(SHARE_LIBTIFF).dev $(TIFFGEN)libtiff.dev || true + + + # Define the shared version. +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index 1ddad78..6b24422 100644 +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -105,7 +105,7 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ + # $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) + # + #$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) +-# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) ++# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) || true + + # Query the environment to construct gconfig_.h. + # These are all defined conditionally (except the JasPER one), so that +diff --git a/base/unixhead.mak b/base/unixhead.mak +index 6aa3599..70a61f8 100644 +--- a/base/unixhead.mak ++++ b/base/unixhead.mak +@@ -53,7 +53,7 @@ SH=$(SHELL) + + # Define generic commands. + +-CP_=cp ++CP_=cp -f + RM_=rm -f + RMN_=rm -f + +diff --git a/base/zlib.mak b/base/zlib.mak +index 6c50605..7fb8c9b 100644 +--- a/base/zlib.mak ++++ b/base/zlib.mak +@@ -83,7 +83,7 @@ $(ZOBJ)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP) + # Encoding (compression) code. + + $(ZGEN)zlibe.dev : $(TOP_MAKEFILES) $(ZGEN)zlibe_$(SHARE_ZLIB).dev +- $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev ++ $(CP_) $(ZGEN)zlibe_$(SHARE_ZLIB).dev $(ZGEN)zlibe.dev || true + + $(ZGEN)zlibe_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) + $(SETMOD) $(ZGEN)zlibe_1 -lib $(ZLIB_NAME) +@@ -111,7 +111,7 @@ $(ZOBJ)trees.$(OBJ) : $(ZSRC)trees.c $(ZDEP) + # with 0.90 do. + + $(ZGEN)crc32.dev : $(TOP_MAKEFILES) $(ZGEN)crc32_$(SHARE_ZLIB).dev +- $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev ++ $(CP_) $(ZGEN)crc32_$(SHARE_ZLIB).dev $(ZGEN)crc32.dev || true + + $(ZGEN)crc32_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) + $(SETMOD) $(ZGEN)crc32_1 -lib $(ZLIB_NAME) +@@ -127,7 +127,7 @@ $(ZOBJ)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP) + # Decoding (decompression) code. + + $(ZGEN)zlibd.dev : $(TOP_MAKEFILES) $(ZGEN)zlibd_$(SHARE_ZLIB).dev +- $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev ++ $(CP_) $(ZGEN)zlibd_$(SHARE_ZLIB).dev $(ZGEN)zlibd.dev || true + + $(ZGEN)zlibd_1.dev : $(TOP_MAKEFILES) $(ZLIB_MAK) $(ECHOGS_XE) + $(SETMOD) $(ZGEN)zlibd_1 -lib $(ZLIB_NAME) +diff --git a/devices/devs.mak b/devices/devs.mak +index bc22594..4bd0a11 100644 +--- a/devices/devs.mak ++++ b/devices/devs.mak +@@ -1555,7 +1555,7 @@ libpng_dev=$(PNGGENDIR)$(D)libpng.dev + png_i_=-include $(PNGGENDIR)$(D)libpng + + $(DEVOBJ)gdevpng.$(OBJ) : $(DEVSRC)gdevpng.c\ +- $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h) ++ $(gdevprn_h) $(gdevpccm_h) $(gscdefs_h) $(png__h) $(PDEP) + $(CC_) $(I_)$(DEVI_) $(II)$(PI_)$(_I) $(PCF_) $(GLF_) $(DEVO_)gdevpng.$(OBJ) $(C_) $(DEVSRC)gdevpng.c + + $(DD)pngmono.dev : $(DEVS_MAK) $(libpng_dev) $(png_) $(GLD)page.dev $(GDEV) +diff --git a/psi/int.mak b/psi/int.mak +index 62cba0e..a1e963a 100644 +--- a/psi/int.mak ++++ b/psi/int.mak +@@ -274,7 +274,7 @@ $(PSOBJ)iconfig.$(OBJ) : $(gconfig_h) $(PSSRC)iconf.c $(stdio__h)\ + $(gconf_h) $(gconfigd_h) $(gsmemory_h) $(gstypes_h)\ + $(iminst_h) $(iref_h) $(ivmspace_h) $(opdef_h) $(iplugin_h) + $(RM_) $(PSGEN)iconfig.c +- $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c ++ $(CP_) $(PSSRC)iconf.c $(PSGEN)iconfig.c || true + $(PSCC) $(PSO_)iconfig.$(OBJ) $(C_) $(PSGEN)iconfig.c + + $(PSOBJ)iinit.$(OBJ) : $(PSSRC)iinit.c $(GH) $(string__h)\ +@@ -607,7 +607,7 @@ $(PSD)psbase.dev : $(INT_MAK) $(ECHOGS_XE) $(INT_OBJS)\ + + # We keep the old name for backward compatibility. + $(PSD)level1.dev : $(PSD)psl1.dev +- $(CP_) $(PSD)psl1.dev $(PSD)level1.dev ++ $(CP_) $(PSD)psl1.dev $(PSD)level1.dev || true + + $(PSD)psl1.dev : $(INT_MAK) $(ECHOGS_XE)\ + $(PSD)psbase.dev $(PSD)bcp.dev $(PSD)path1.dev $(PSD)type1.dev +@@ -934,7 +934,7 @@ $(PSOBJ)zfrsd.$(OBJ) : $(PSSRC)zfrsd.c $(OP) $(memory__h)\ + + # We keep the old name for backward compatibility. + $(PSD)level2.dev : $(PSD)psl2.dev +- $(CP_) $(PSD)psl2.dev $(PSD)level2.dev ++ $(CP_) $(PSD)psl2.dev $(PSD)level2.dev || true + + # We -include dpsand2 first so that geninit will have access to the + # system name table as soon as possible. +@@ -1193,7 +1193,7 @@ $(PSOBJ)zfjbig2_luratech.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\ + # this can be turned on and off with a FEATURE_DEV + + $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev +- $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev ++ $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev || true + + fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ) + +-- +1.8.1.2 + 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 @@ +ust use commands provided by ghostscript-native, preventing recompile them when +compile ghostscript. +Way to enable cross compile. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai +Signed-off-by: Wenzong Fan + +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index c032b3f..1ddad78 100644 +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -68,44 +68,44 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ + + # -------------------------- Auxiliary programs --------------------------- # + +-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) +- +-# On the RS/6000 (at least), compiling genarch.c with gcc with -O +-# produces a buggy executable. +-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) +- +-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) +- +-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) +- +-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) +- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) +- +-# To get GS to use the system zlib, you remove/hide the gs/zlib directory +-# which means that the mkromfs build can't find the zlib source it needs. +-# So it's split into two targets, one using the zlib source directly..... +-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) +- +-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) +- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) +- +-# .... and one using the zlib library linked via the command line +-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ +- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) +- +-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) +- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) +- +-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) +- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) ++#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) ++# ++## On the RS/6000 (at least), compiling genarch.c with gcc with -O ++## produces a buggy executable. ++#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) ++# ++#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) ++# ++#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) ++# ++#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS) ++# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) ++# ++## To get GS to use the system zlib, you remove/hide the gs/zlib directory ++## which means that the mkromfs build can't find the zlib source it needs. ++## So it's split into two targets, one using the zlib source directly..... ++#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++# ++#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) ++# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) ++# ++## .... and one using the zlib library linked via the command line ++#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ ++# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) ++# ++#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) ++# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) ++# ++#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS) ++# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) + + # Query the environment to construct gconfig_.h. + # These are all defined conditionally (except the JasPER one), so that 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..9158117d01 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch @@ -0,0 +1,37 @@ +ghostscript-native:fix disable-system-libtiff + +Modify configure to add the check to make sure +ghostscrip could work while system-libtiff is +disabled. + +Signed-off-by: Hongxu Jia +Upstream-Status: Pending +--- + configure.ac | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -1055,6 +1055,7 @@ Disabling tiff output devices.]) + esac + + if test $SHARE_LIBTIFF -eq 0; then ++ if test -e $LIBTIFFDIR/configure; then + echo + echo "Running libtiff configure script..." + olddir=`pwd` +@@ -1069,6 +1070,10 @@ if test $SHARE_LIBTIFF -eq 0; then + cd "$olddir" + echo + echo "Continuing with Ghostscript configuration..." ++ else ++ AC_MSG_NOTICE([Could not find local copy of libtiff. ++Disabling tiff output devices.]) ++ fi + fi + + AC_SUBST(SHARE_LIBTIFF) +-- +1.8.1.2 + 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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 4 +#define ARCH_ALIGN_PTR_MOD 4 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 4 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 2 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 4 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 + diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686 new file mode 120000 index 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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 4 +#define ARCH_ALIGN_PTR_MOD 4 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 2 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 4 +#define ARCH_SIZEOF_PTR 4 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 1 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 1 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h @@ -0,0 +1,40 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h new file mode 100644 index 0000000000..0d0a16bfa3 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h @@ -0,0 +1,40 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 1 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 4 +#define ARCH_ALIGN_PTR_MOD 4 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 2 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 4 +#define ARCH_SIZEOF_PTR 4 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/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 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 4 +#define ARCH_ALIGN_PTR_MOD 4 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 2 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 4 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 1 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h new file mode 100644 index 0000000000..0d0a16bfa3 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h @@ -0,0 +1,40 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 1 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h new file mode 100644 index 0000000000..a05de29def --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h @@ -0,0 +1,40 @@ +/* Parameters derived from machine and compiler architecture. */ +/* This file is generated mechanically by genarch.c. */ + + /* ---------------- Scalar alignments ---------------- */ + +#define ARCH_ALIGN_SHORT_MOD 2 +#define ARCH_ALIGN_INT_MOD 4 +#define ARCH_ALIGN_LONG_MOD 8 +#define ARCH_ALIGN_PTR_MOD 8 +#define ARCH_ALIGN_FLOAT_MOD 4 +#define ARCH_ALIGN_DOUBLE_MOD 8 + + /* ---------------- Scalar sizes ---------------- */ + +#define ARCH_LOG2_SIZEOF_CHAR 0 +#define ARCH_LOG2_SIZEOF_SHORT 1 +#define ARCH_LOG2_SIZEOF_INT 2 +#define ARCH_LOG2_SIZEOF_LONG 3 +#define ARCH_LOG2_SIZEOF_LONG_LONG 3 +#define ARCH_SIZEOF_GX_COLOR_INDEX 8 +#define ARCH_SIZEOF_PTR 8 +#define ARCH_SIZEOF_FLOAT 4 +#define ARCH_SIZEOF_DOUBLE 8 +#define ARCH_FLOAT_MANTISSA_BITS 24 +#define ARCH_DOUBLE_MANTISSA_BITS 53 + + /* ---------------- Unsigned max values ---------------- */ + +#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) +#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) +#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) +#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) + + /* ---------------- Miscellaneous ---------------- */ + +#define ARCH_IS_BIG_ENDIAN 0 +#define ARCH_PTRS_ARE_SIGNED 0 +#define ARCH_FLOATS_ARE_IEEE 1 +#define ARCH_ARITH_RSHIFT 2 +#define ARCH_DIV_NEG_POS_TRUNCATES 1 diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.14.bb b/meta/recipes-extended/ghostscript/ghostscript_9.14.bb new file mode 100644 index 0000000000..130dc1c378 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript_9.14.bb @@ -0,0 +1,106 @@ +SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter" +DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \ +a back-end to a program such as ghostview, it can display PostScript and PDF \ +documents in an X11 environment. \ +\ +Furthermore, it can render PostScript and PDF files as graphics to be printed \ +on non-PostScript printers. Supported printers include common \ +dot-matrix, inkjet and laser models. \ +" +HOMEPAGE = "http://www.ghostscript.com" +SECTION = "console/utils" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aad21ea85123608e6a0a58d54ee23567" + +DEPENDS = "ghostscript-native tiff jpeg fontconfig cups" +DEPENDS_class-native = "" + +SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz" + +SRC_URI = "${SRC_URI_BASE} \ + file://ghostscript-9.02-prevent_recompiling.patch \ + file://ghostscript-9.02-genarch.patch \ + file://objarch.h \ + file://ghostscript-9.02-parallel-make.patch \ + file://cups-no-gcrypt.patch \ + " + +SRC_URI_class-native = "${SRC_URI_BASE} \ + file://ghostscript-native-fix-disable-system-libtiff.patch \ + file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ + " + +SRC_URI[md5sum] = "586494befb443363338c1b6379f13973" +SRC_URI[sha256sum] = "ab2ba5ce11c8db396c9acf774a497182d7686d04670976cc3e690ada7db9f0d4" + +EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \ + --with-fontpath=${datadir}/fonts \ + --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ + --with-cups-datadir=${datadir}/cups \ + ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \ + " + +EXTRA_OECONF_append_mips = " --with-large_color_index=0" +EXTRA_OECONF_append_mipsel = " --with-large_color_index=0" + +# Explicity disable libtiff, fontconfig, +# freetype, cups for ghostscript-native +EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ + --without-jbig2dec \ + --with-fontpath=${datadir}/fonts \ + --without-libidn --disable-fontconfig \ + --disable-freetype --disable-cups" + +# This has been fixed upstream but for now we need to subvert the check for time.h +# http://bugs.ghostscript.com/show_bug.cgi?id=692443 +# http://bugs.ghostscript.com/show_bug.cgi?id=692426 +CFLAGS += "-DHAVE_SYS_TIME_H=1" +BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" + +inherit autotools-brokensep + +do_configure_prepend () { + mkdir -p obj + mkdir -p soobj + if [ -e ${WORKDIR}/objarch.h ]; then + cp ${WORKDIR}/objarch.h obj/arch.h + fi +} + +do_configure_append () { + # copy tools from the native ghostscript build + if [ "${PN}" != "ghostscript-native" ]; then + mkdir -p obj/aux soobj + for i in genarch genconf mkromfs echogs gendev genht; do + cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i + done + fi +} + +do_install_append () { + mkdir -p ${D}${datadir}/ghostscript/${PV}/ + cp -r Resource ${D}${datadir}/ghostscript/${PV}/ + cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/ +} + +do_compile_class-native () { + mkdir -p obj + for i in genarch genconf mkromfs echogs gendev genht; do + oe_runmake obj/aux/$i + done +} + +do_install_class-native () { + install -d ${D}${bindir}/ghostscript-${PV} + for i in genarch genconf mkromfs echogs gendev genht; do + install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i + done +} + +BBCLASSEXTEND = "native" + +# Ghostscript install tool 'instcopy' tries to remove already created +# directories during install and parallel make causes problems. +PARALLEL_MAKEINST="" + 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 @@ +DESCRIPTION = "GNU gperf is a perfect hash function generator" +HOMEPAGE = "http://www.gnu.org/software/gperf" +SUMMARY = "Generate a perfect hash function from a set of keywords" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" + +SRC_URI = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz" + +inherit autotools + +# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of +# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal +EXTRA_AUTORECONF += " -I ${S}" + +do_configure_prepend() { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb new file mode 100644 index 0000000000..772886121b --- /dev/null +++ b/meta/recipes-extended/gperf/gperf_3.0.3.bb @@ -0,0 +1,10 @@ +require gperf.inc + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \ + file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd" + +PR = "r1" + +SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00" +SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055" diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb new file mode 100644 index 0000000000..64003fc0bb --- /dev/null +++ b/meta/recipes-extended/gperf/gperf_3.0.4.bb @@ -0,0 +1,5 @@ +require gperf.inc + + +SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632" +SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e" diff --git a/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch b/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch new file mode 100644 index 0000000000..32846f50be --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.19/grep2.19-CVE-2015-1345.patch @@ -0,0 +1,129 @@ +From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001 +From: Yuliy Pisetsky +Date: Thu, 01 Jan 2015 23:36:55 +0000 +Subject: grep -F: fix a heap buffer (read) overrun + +grep's read buffer is often filled to its full size, except when +reading the final buffer of a file. In that case, the number of +bytes read may be far less than the size of the buffer. However, for +certain unusual pattern/text combinations, grep -F would mistakenly +examine bytes in that uninitialized region of memory when searching +for a match. With carefully chosen inputs, one can cause grep -F to +read beyond the end of that buffer altogether. This problem arose via +commit v2.18-90-g73893ff with the introduction of a more efficient +heuristic using what is now the memchr_kwset function. The use of +that function in bmexec_trans could leave TP much larger than EP, +and the subsequent call to bm_delta2_search would mistakenly access +beyond end of the main input read buffer. + +* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP, +do not call bm_delta2_search. +* tests/kwset-abuse: New file. +* tests/Makefile.am (TESTS): Add it. +* NEWS (Bug fixes): Mention it. + +Prior to this patch, this command would trigger a UMR: + + printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0) + + Use of uninitialised value of size 8 + at 0x4142BE: bmexec_trans (kwset.c:657) + by 0x4143CA: bmexec (kwset.c:678) + by 0x414973: kwsexec (kwset.c:848) + by 0x414DC4: Fexecute (kwsearch.c:128) + by 0x404E2E: grepbuf (grep.c:1238) + by 0x4054BF: grep (grep.c:1417) + by 0x405CEB: grepdesc (grep.c:1645) + by 0x405EC1: grep_command_line_arg (grep.c:1692) + by 0x4077D4: main (grep.c:2570) + +See the accompanying test for how to trigger the heap buffer overrun. + +Thanks to Nima Aghdaii for testing and finding numerous +ways to break early iterations of this patch. + +Fixes CVE-2015-1345. +Upstream-Status: Backport + +--- +diff --git a/NEWS b/NEWS +index 975440d..3835d8d 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*- + + * Noteworthy changes in release ?.? (????-??-??) [?] + ++** Bug fixes ++ ++ grep no longer reads from uninitialized memory or from beyond the end ++ of the heap-allocated input buffer. ++ + + * Noteworthy changes in release 2.21 (2014-11-23) [stable] + +diff --git a/src/kwset.c b/src/kwset.c +index 4003c8d..376f7c3 100644 +--- a/src/kwset.c ++++ b/src/kwset.c +@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size) + if (! tp) + return -1; + tp++; ++ if (ep <= tp) ++ break; + } + } + } +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 2cba2cd..0508cd2 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -75,6 +75,7 @@ TESTS = \ + inconsistent-range \ + invalid-multibyte-infloop \ + khadafy \ ++ kwset-abuse \ + long-line-vs-2GiB-read \ + match-lines \ + max-count-overread \ +diff --git a/tests/kwset-abuse b/tests/kwset-abuse +new file mode 100755 +index 0000000..6d8ec0c +--- a/dev/null ++++ b/tests/kwset-abuse +@@ -0,0 +1,32 @@ ++#! /bin/sh ++# Evoke a segfault in a hard-to-reach code path of kwset.c. ++# This bug affected grep versions 2.19 through 2.21. ++# ++# Copyright (C) 2015 Free Software Foundation, Inc. ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++. "${srcdir=.}/init.sh"; path_prepend_ ../src ++ ++fail=0 ++ ++# This test case chooses a haystack of size 260,000, since prodding ++# with gdb showed a reallocation slightly larger than that in fillbuf. ++# To reach the buggy code, the needle must have length < 1/11 that of ++# the haystack, and 10,000 is a nice round number that fits the bill. ++printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0) ++ ++test $? = 1 || fail=1 ++ ++Exit $fail +-- +cgit v0.9.0.2 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 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_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..5a4149cfc0 --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate [Poky Specific this is gplv2 version] + +Signed-off-by Saul Wold + +Index: grep-2.5.1a/doc/grep.texi +=================================================================== +--- grep-2.5.1a.orig/doc/grep.texi ++++ grep-2.5.1a/doc/grep.texi +@@ -288,7 +288,7 @@ This version number should be included i + Print a usage message briefly summarizing these command-line options + and the bug-reporting address, then exit. + +-@itemx --binary-files=@var{type} ++@item --binary-files=@var{type} + @opindex --binary-files + @cindex binary files + 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 @@ +Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure +Upstream-Status: Inappropriate [ old version that will not be maintained ] +Signed-off-by: Alex DAMIAN + +diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c +--- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200 ++++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200 +@@ -38,9 +38,7 @@ + # endif + #endif + +-#if HAVE_LOCALE_H + # include +-#endif + + #if HAVE_STRING_H + # include 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 @@ +Enable operation with later versions of gettext. + +Upstream-Status: Inappropriate +RP 2012/10/19 + +Index: grep-2.5.1a/configure.in +=================================================================== +--- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000 ++++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000 +@@ -140,4 +140,4 @@ + AC_CHECK_LIB(pcre, pcre_exec) + fi + +-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]) ++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 @@ +The patch to fix CVE-2012-5667 +Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff + +Multiple integer overflows in GNU Grep before 2.11 might allow +context-dependent attackers to execute arbitrary code via vectors +involving a long input line that triggers a heap-based buffer overflow. + +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667 + +Upstream-Status: Inappropriate [other] +This version of GNU Grep has been abandoned upstream and they are no longer +accepting patches. This is not a backport. + +Signed-off-by Ming Liu +--- + grep.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800 ++++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800 +@@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const + int cc = 1; + char *readbuf; + size_t readsize; ++ const size_t max_save = INT_MAX / 2; ++ ++ /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */ ++ if (save > max_save) ++ error (2, 0, _("line too long")); + + /* Offset from start of buffer to start of old stuff + 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 @@ +Upstream-Status: Pending + +automake 1.12 has depricated automatic de-ANSI-fication support + +this patch avoids these kinds of errors: + +| configure.in:33: error: automatic de-ANSI-fication support has been removed +| /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... +| configure.in:33: the top level +| autom4te: m4 failed with exit status: 1 +... +| lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed +| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed +| autoreconf: automake failed with exit status: 1 + +Signed-Off-By: Nitin A Kamble +2012/05/04 + +Index: grep-2.5.1a/configure.in +=================================================================== +--- grep-2.5.1a.orig/configure.in ++++ grep-2.5.1a/configure.in +@@ -30,7 +30,6 @@ AC_PROG_RANLIB + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_SYS_LARGEFILE +-AM_C_PROTOTYPES + AC_TYPE_SIZE_T + AC_CHECK_TYPE(ssize_t, int) + AC_C_CONST +Index: grep-2.5.1a/lib/Makefile.am +=================================================================== +--- grep-2.5.1a.orig/lib/Makefile.am ++++ grep-2.5.1a/lib/Makefile.am +@@ -1,5 +1,5 @@ + # +-AUTOMAKE_OPTIONS = ../src/ansi2knr ++AUTOMAKE_OPTIONS = + + SUBDIRS = posix + +Index: grep-2.5.1a/src/Makefile.am +=================================================================== +--- grep-2.5.1a.orig/src/Makefile.am ++++ grep-2.5.1a/src/Makefile.am +@@ -1,5 +1,5 @@ + ## Process this file with automake to create Makefile.in +-AUTOMAKE_OPTIONS = ansi2knr no-dependencies ++AUTOMAKE_OPTIONS = no-dependencies + + LN = ln + 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 @@ +Upstream-Status: Inappropriate [licensing] + +# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which +# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have +# mempcpy, we'll just use that instead. +# Patch source: OpenEmbedded + +Index: grep-2.5.1/intl/localealias.c +=================================================================== +--- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 ++++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 +@@ -65,7 +65,7 @@ + # define strcasecmp __strcasecmp + + # ifndef mempcpy +-# define mempcpy __mempcpy ++# error "mempcpy not detected" + # endif + # define HAVE_MEMPCPY 1 + # define HAVE___FSETLOCKING 1 +Index: grep-2.5.1/lib/getopt.c +=================================================================== +--- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 ++++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 +@@ -326,7 +326,7 @@ + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { +- memset (__mempcpy (new_str, __getopt_nonoption_flags, ++ memset (mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; +@@ -437,7 +437,7 @@ + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else +- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), ++ memset (mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } +Index: grep-2.5.1/lib/regex.c +=================================================================== +--- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 ++++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 +@@ -7842,7 +7842,7 @@ + if (msg_size > errbuf_size) + { + #if defined HAVE_MEMPCPY || defined _LIBC +- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; ++ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; + #else + memcpy (errbuf, msg, errbuf_size - 1); + errbuf[errbuf_size - 1] = 0; diff --git a/meta/recipes-extended/grep/grep_2.19.bb b/meta/recipes-extended/grep/grep_2.19.bb new file mode 100644 index 0000000000..d60ce5e389 --- /dev/null +++ b/meta/recipes-extended/grep/grep_2.19.bb @@ -0,0 +1,41 @@ +SUMMARY = "GNU grep utility" +HOMEPAGE = "http://savannah.gnu.org/projects/grep/" +BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep" +SECTION = "console/utils" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" + +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ + file://grep2.19-CVE-2015-1345.patch \ + " + +SRC_URI[md5sum] = "ac732142227d9fe9567d71301e127979" +SRC_URI[sha256sum] = "6388295be48cfcaf7665d9cd3914e6625ea000e9414132bfefd45cf1d8eec34d" + +inherit autotools gettext texinfo + +EXTRA_OECONF = "--disable-perl-regexp" + +do_configure_prepend () { + rm -f ${S}/m4/init.m4 +} + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + mv ${D}${bindir}/grep ${D}${base_bindir}/grep + mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep + mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep + rmdir ${D}${bindir}/ +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "grep egrep fgrep" +ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" +ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" +ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" + +export CONFIG_SHELL="/bin/sh" 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..1ce112e43d --- /dev/null +++ b/meta/recipes-extended/grep/grep_2.5.1a.bb @@ -0,0 +1,51 @@ +SUMMARY = "Pattern matching utilities" +DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \ +files for lines containing a match to a specified pattern." +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +PR = "r2" + +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \ + file://uclibc-fix.patch \ + file://grep_fix_for_automake-1.12.patch \ + file://gettext.patch \ + file://fix64-int-to-pointer.patch \ + file://Makevars \ + file://grep-CVE-2012-5667.patch \ + file://fix-for-texinfo-5.1.patch \ + " + +SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c" +SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132" + +inherit autotools gettext texinfo + +EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses" + +CFLAGS += "-D PROTOTYPES" +do_configure_prepend () { + rm -f ${S}/m4/init.m4 + cp -f ${WORKDIR}/Makevars ${S}/po/ +} + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + mv ${D}${bindir}/grep ${D}${base_bindir}/grep + mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep + mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep + rmdir ${D}${bindir}/ +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "grep egrep fgrep" +ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" +ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" +ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" + +export CONFIG_SHELL="/bin/sh" diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch new file mode 100644 index 0000000000..559ae72898 --- /dev/null +++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch @@ -0,0 +1,39 @@ +Upstream-Status: Inappropriate [embedded] + +Signed-off-by: Ming Liu +--- + Makefile.sub | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/contrib/groffer/Makefile.sub ++++ b/contrib/groffer/Makefile.sub +@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version. + $(RM) $@; + sed \ + -e "s|@g@|$(g)|g" \ +- -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ ++ -e "s|@BINDIR@|$(bindir)|g" \ + -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ + -e "s|@VERSION@|$(version)$(revision)|g" \ + $(srcdir)/groffer.sh >$@; + chmod +x $@ + + install_data: groffer +- -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) +- -$(RM) $(DESTDIR)$(bindir)/groffer +- $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer ++ -test -d $(bindir) || $(mkinstalldirs) $(bindir) ++ -$(RM) $(bindir)/groffer ++ $(INSTALL_SCRIPT) groffer $(bindir)/groffer + -test -d $(DESTDIR)$(libdir)/groff/groffer || \ + $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer + -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh +@@ -58,7 +58,7 @@ install_data: groffer + $(DESTDIR)$(libdir)/groff/groffer/version.sh + + uninstall_sub: +- -$(RM) $(DESTDIR)$(bindir)/groffer ++ -$(RM) $(bindir)/groffer + -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh + -$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh + -rmdir $(DESTDIR)$(libdir)/groff/groffer 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 @@ + +Upstream-Status: Inappropriate [embedded] + +Signed-off-by: Saul Wold +--- + groff-1.18.1.4/Makefile.in | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -460,27 +460,22 @@ OTHERDIRS=\ + src/roff/grog \ + src/roff/nroff \ + contrib/mm \ + contrib/pic2graph \ + contrib/eqn2graph \ +- contrib/groffer \ +- contrib/mom \ +- doc ++ contrib/groffer + ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ + $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) + EXTRADIRS=\ + font/devps/generate \ + font/devdvi/generate \ + font/devlj4/generate \ +- src/xditview \ + doc + NOMAKEDIRS=\ + arch/djgpp \ + contrib/mm/examples \ + contrib/mm/mm \ +- contrib/mom/examples \ +- contrib/mom/momdoc \ + src/libs/snprintf + DISTDIRS=\ + $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ + $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) + 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 @@ +Upstream-Status: Inappropriate [embedded] + +Signed-off-by: Saul Wold + +Index: groff-1.18.1.4/tmac/man.local +=================================================================== +--- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800 ++++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800 +@@ -1,2 +1,27 @@ + .\" This file is loaded after an-old.tmac. + .\" Put any local modifications to an-old.tmac here. ++. ++.if n \{\ ++. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other ++. \" than utf8. ++. if !'\*[.T]'utf8' \ ++. tr \[oq]' ++. ++. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by ++. \" grotty. ++. if '\V[GROFF_SGR]'' \ ++. output x X tty: sgr 0 ++. ++. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make ++. \" searching in man pages easier. ++. if '\*[.T]'utf8' \ ++. char \- \N'45' ++. ++. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such ++. \" as those in command-line options. This is a bug in those pages, but ++. \" too many fonts are missing the Unicode HYPHEN character, so we render ++. \" this as the ASCII-compatible HYPHEN-MINUS instead. ++. if '\*[.T]'utf8' \ ++. char - \N'45' ++.\} ++ 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 @@ + +Upstream-Status: Inappropriate [embedded] + +Signed-off-by: Saul Wold + +Index: groff-1.18.1.4/tmac/mdoc.local +=================================================================== +--- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800 ++++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800 +@@ -1,2 +1,26 @@ + .\" This file is loaded after doc.tmac. + .\" Put any local modifications to doc.tmac here. ++. ++.if n \{\ ++. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other ++. \" than utf8. ++. if !'\*[.T]'utf8' \ ++. tr \[oq]' ++. ++. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by ++. \" grotty. ++. if '\V[GROFF_SGR]'' \ ++. output x X tty: sgr 0 ++. ++. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make ++. \" searching in man pages easier. ++. if '\*[.T]'utf8' \ ++. char \- \N'45' ++. ++. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such ++. \" as those in command-line options. This is a bug in those pages, but ++. \" too many fonts are missing the Unicode HYPHEN character, so we render ++. \" this as the ASCII-compatible HYPHEN-MINUS instead. ++. if '\*[.T]'utf8' \ ++. char - \N'45' ++.\} 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 @@ +Correct the install path of man.local to fix following error: + /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' + +Signed-off-by: Zhenhua Luo +Upstream-Status: Pending + +--- groff-1.22.2/tmac/Makefile.sub.orig 2013-02-07 20:06:08.000000000 +0800 ++++ groff-1.22.2/tmac/Makefile.sub 2013-06-26 19:11:23.572259001 +0800 +@@ -114,9 +114,9 @@ + rm -f $(DESTDIR)$(mdocdir)/$$f; \ + $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \ + done +- -test -f $(DESTDIR)$(localtmacdir)/man.local || \ ++ -test -f $(DESTDIR)$(tmacdir)/man.local || \ + $(INSTALL_DATA) $(srcdir)/man.local \ +- $(DESTDIR)$(localtmacdir)/man.local ++ $(DESTDIR)$(tmacdir)/man.local + -test -f $(DESTDIR)$(localtmacdir)/mdoc.local || \ + $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local + +@@ -158,9 +158,9 @@ + -rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac + -rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac + -rm -f $(DESTDIR)$(tmacdir)/www.tmac +- -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \ ++ -if cmp -s $(DESTDIR)$(tmacdir)/man.local \ + $(srcdir)/man.local; then \ +- rm -f $(DESTDIR)$(localtmacdir)/man.local; \ ++ rm -f $(DESTDIR)$(tmacdir)/man.local; \ + fi + -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \ + $(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..7fbce9bc4a --- /dev/null +++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb @@ -0,0 +1,49 @@ +SUMMARY = "GNU Troff software" +DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ +formatting commands and produces formatted output." +SECTION = "console/utils" +HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/" +LICENSE = "GPLv2" +PR = "r1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3" + +SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ + file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \ + file://man-local.patch \ + file://mdoc-local.patch \ + file://groff-1.18.1.4-fix-bindir.patch \ +" + +inherit autotools texinfo + +EXTRA_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}" + +SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287" +SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d" +PARALLEL_MAKE = "" + +do_configure (){ + oe_runconf +} + +do_install_append() { + # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location + # for target as /usr/bin/perl, so fix it to /usr/bin/perl. + for i in afmtodit mmroff; do + if [ -f ${D}${bindir}/$i ]; then + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i + fi + done + + mkdir -p ${D}${sysconfdir}/groff + cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/ + cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/ +} + +pkg_postinst_${PN}() { + ln -s tbl $D${bindir}/gtbl + echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile + echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile +} + 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..6c6926ff62 --- /dev/null +++ b/meta/recipes-extended/groff/groff_1.22.2.bb @@ -0,0 +1,68 @@ +SUMMARY = "GNU Troff software" +DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ +formatting commands and produces formatted output." +SECTION = "base" +HOMEPAGE = "ftp://ftp.gnu.org/gnu/groff/" +LICENSE = "GPLv3" +PR = "r1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ + file://groff-1.22.2-correct-man.local-install-path.patch \ +" + +SRC_URI[md5sum] = "9f4cd592a5efc7e36481d8d8d8af6d16" +SRC_URI[sha256sum] = "380864dac4772e0c0d7b1282d25d0c5fd7f63baf45c87c4657afed22a13d2076" + +DEPENDS = "groff-native" +DEPENDS_class-native = "" + +inherit autotools texinfo + +EXTRA_OECONF = "--without-x" +PARALLEL_MAKE = "" + +do_configure_prepend() { + if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then + sed -i \ + -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \ + -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \ + -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ + -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ + ${S}/contrib/*/Makefile.sub \ + ${S}/doc/Makefile.in \ + ${S}/doc/Makefile.sub + fi +} + +do_configure_append() { + # generate gnulib configure script + olddir=`pwd` + cd ${S}/src/libs/gnulib/ + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed." + cd ${olddir} +} + +do_install_append() { + # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location + # for target as /usr/bin/perl, so fix it to /usr/bin/perl. + for i in afmtodit mmroff gropdf pdfmom; do + if [ -f ${D}${bindir}/$i ]; then + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i + fi + done +} + +do_install_append_class-native() { + create_cmdline_wrapper ${D}/${bindir}/groff \ + -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \ + -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac +} + +FILES_${PN} += "${libdir}/${BPN}/site-tmac \ + ${libdir}/${BPN}/groffer/" + +RDEPENDS_${PN} = " sed" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch new file mode 100644 index 0000000000..d9e8d212bf --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch @@ -0,0 +1,48 @@ +gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict. + +Signed-off-by: Zhai Edwin + +Upstream-Status: Inappropriate [licensing] + +Index: gzip-1.3.12/gzip.c +=================================================================== +--- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800 ++++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800 +@@ -1637,7 +1637,7 @@ + } + } + +- if (futimens (ofd, ofname, timespec) != 0) ++ if (futimens_gnulib (ofd, ofname, timespec) != 0) + { + int e = errno; + WARN ((stderr, "%s: ", program_name)); +Index: gzip-1.3.12/lib/utimens.c +=================================================================== +--- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800 ++++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800 +@@ -75,7 +75,7 @@ + Return 0 on success, -1 (setting errno) on failure. */ + + int +-futimens (int fd ATTRIBUTE_UNUSED, ++futimens_gnulib (int fd ATTRIBUTE_UNUSED, + char const *file, struct timespec const timespec[2]) + { + /* Some Linux-based NFS clients are buggy, and mishandle time stamps +@@ -185,5 +185,5 @@ + int + utimens (char const *file, struct timespec const timespec[2]) + { +- return futimens (-1, file, timespec); ++ return futimens_gnulib (-1, file, timespec); + } +Index: gzip-1.3.12/lib/utimens.h +=================================================================== +--- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800 ++++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800 +@@ -1,3 +1,3 @@ + #include +-int futimens (int, char const *, struct timespec const [2]); ++int futimens_gnulib (int, char const *, struct timespec const [2]); + int utimens (char const *, struct timespec const [2]); diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch new file mode 100644 index 0000000000..6b2f69870e --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch @@ -0,0 +1,56 @@ +remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular +dependency of AC_GNU_SOURCE" + +Signed-off-by: Zhai Edwin + +Upstream-Status: Inappropriate [licensing] + +Index: gzip-1.3.12/m4/extensions.m4 +=================================================================== +--- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800 ++++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800 +@@ -12,44 +12,6 @@ + # enough in this area it's likely we'll need to redefine + # AC_USE_SYSTEM_EXTENSIONS for quite some time. + +-# AC_USE_SYSTEM_EXTENSIONS +-# ------------------------ +-# Enable extensions on systems that normally disable them, +-# typically due to standards-conformance issues. +-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], +-[ +- AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +- AC_BEFORE([$0], [AC_RUN_IFELSE]) +- +- AC_REQUIRE([AC_GNU_SOURCE]) +- AC_REQUIRE([AC_AIX]) +- AC_REQUIRE([AC_MINIX]) +- +- AH_VERBATIM([__EXTENSIONS__], +-[/* Enable extensions on Solaris. */ +-#ifndef __EXTENSIONS__ +-# undef __EXTENSIONS__ +-#endif +-#ifndef _POSIX_PTHREAD_SEMANTICS +-# undef _POSIX_PTHREAD_SEMANTICS +-#endif +-#ifndef _TANDEM_SOURCE +-# undef _TANDEM_SOURCE +-#endif]) +- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], +- [ac_cv_safe_to_define___extensions__], +- [AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([ +-# define __EXTENSIONS__ 1 +- AC_INCLUDES_DEFAULT])], +- [ac_cv_safe_to_define___extensions__=yes], +- [ac_cv_safe_to_define___extensions__=no])]) +- test $ac_cv_safe_to_define___extensions__ = yes && +- AC_DEFINE([__EXTENSIONS__]) +- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) +- AC_DEFINE([_TANDEM_SOURCE]) +-]) +- + # gl_USE_SYSTEM_EXTENSIONS + # ------------------------ + # Enable extensions on systems that normally disable them, diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch new file mode 100644 index 0000000000..d4325779ce --- /dev/null +++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch @@ -0,0 +1,31 @@ +fix MakeMaker issues with using wrong SHELL/GREP + +A set of substitution is being processed to all target scripts with sed by +replacing some key words with the detected values at configure time, this +is exactly not compliant with cross compling, and will cause missing path +errors at run time like: +"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory" + +Fixed by removing unneeded substitution and using real runtime paths +instead. + +Signed-off-by: Ming Liu + +Upstream-Status: Pending + +Index: gzip-1.3.12/Makefile.am +=================================================================== +diff -urpN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800 ++++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800 +@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS) + SUFFIXES = .in + .in: + $(AM_V_GEN)sed \ +- -e 's|/bin/sh|$(SHELL)|g' \ + -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ +- -e 's|[@]GREP@|$(GREP)|g' \ ++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \ + -e 's|[@]VERSION@|$(VERSION)|g' \ + $(srcdir)/$@.in >$@-t \ + && chmod a+x $@-t \ diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc new file mode 100644 index 0000000000..b90856e796 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip.inc @@ -0,0 +1,35 @@ +SUMMARY = "Standard GNU compressor" +DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ +project. Mark Adler wrote the decompression part" +HOMEPAGE = "http://www.gnu.org/software/gzip/" +SECTION = "console/utils" +# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12 +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e" + +SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz" +SRC_URI_append_class-target = " file://wrong-path-fix.patch" + +inherit autotools texinfo + +EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep" + +do_install_append () { + # Rename and move files into /bin (FHS), which is typical place for gzip + install -d ${D}${base_bindir} + mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip + mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip + mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat + mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "gunzip gzip zcat" +ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" +ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" +ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" + +export CONFIG_SHELL="/bin/sh" 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..45a33ffdd1 --- /dev/null +++ b/meta/recipes-extended/gzip/gzip_1.3.12.bb @@ -0,0 +1,40 @@ +SUMMARY = "Standard GNU compressor" +DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \ +project. Mark Adler wrote the decompression part" +HOMEPAGE = "http://www.gnu.org/software/gzip" +SECTION = "base" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \ + file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 " + +SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \ + file://m4-extensions-fix.patch \ + file://dup-def-fix.patch" + +SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1" +SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af" + +PR = "r2" + +inherit autotools + +do_install_append () { + # move files into /bin (FHS) + install -d ${D}${base_bindir} + mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip + mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip + mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat + mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress +} + +inherit update-alternatives + +ALTERNATIVE_${PN} = "gzip gunzip zcat" +ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" +ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" +ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "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 @@ +require gzip.inc + +PROVIDES_append_class-native = " gzip-replacement-native" +NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" + +BBCLASSEXTEND = "native" + +SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20" +SRC_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 @@ +SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters" +DESCRIPTION = "hdparm is a Linux shell utility for viewing \ +and manipulating various IDE drive and driver parameters." +SECTION = "console/utils" +LICENSE = "BSD" +LICENSE_wiper = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \ + file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \ + file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \ + file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09" + + +PACKAGES =+ "wiper" + +FILES_wiper = "${bindir}/wiper.sh" + +RDEPENDS_wiper = "bash gawk stat" + +SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz " + +SRC_URI[md5sum] = "f73233be118d86c779a8463d8b6a3cdb" +SRC_URI[sha256sum] = "2bbe92274971182192901ab220e94bd2e4896f924fa6b225d0cffd7d8c16b52a" + +EXTRA_OEMAKE += 'STRIP="echo"' + +inherit update-alternatives + +ALTERNATIVE_${PN} = "hdparm" +ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm" +ALTERNATIVE_PRIORITY = "100" + +do_install () { + install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir} + oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install + cp ${S}/wiper/wiper.sh ${D}/${bindir} +} diff --git a/meta/recipes-extended/images/core-image-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 @@ +DESCRIPTION = "A console-only image with more full-featured Linux system \ +functionality installed." + +IMAGE_FEATURES += "splash ssh-server-openssh" + +IMAGE_INSTALL = "\ + packagegroup-core-boot \ + packagegroup-core-full-cmdline \ + ${CORE_IMAGE_EXTRA_INSTALL} \ + " + +inherit core-image diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb new file mode 100644 index 0000000000..d2dc9e2b53 --- /dev/null +++ b/meta/recipes-extended/images/core-image-lsb-dev.bb @@ -0,0 +1,7 @@ +require core-image-lsb.bb + +DESCRIPTION = "Basic image without X support suitable for development work. It \ +can be used for customization and implementations that conform to Linux \ +Standard Base (LSB)." + +IMAGE_FEATURES += "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 @@ +require core-image-lsb.bb + +DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \ +(LSB) implementations. It includes the full meta-toolchain, plus development \ +headers and libraries to form a standalone SDK." + +IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" + +IMAGE_INSTALL += "kernel-dev" + 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 @@ +DESCRIPTION = "An image containing packages that are required to conform \ +to the Linux Standard Base (LSB) specification." + +IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management" + +IMAGE_INSTALL = "\ + ${CORE_IMAGE_BASE_INSTALL} \ + packagegroup-core-full-cmdline \ + packagegroup-core-lsb \ + " + +inherit core-image distro_features_check + +REQUIRED_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 @@ +DESCRIPTION = "Small image capable of booting a device with custom install scripts, \ +adding a second rootfs, used for testing." + +# use -testfs live-install scripts +PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-live-install-efi-testfs busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" + +# Do not pollute the initrd image with rootfs features +IMAGE_FEATURES = "" + +export IMAGE_BASENAME = "core-image-testmaster-initramfs" +IMAGE_LINGUAS = "" + +LICENSE = "MIT" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" +BAD_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..78295c5f0a --- /dev/null +++ b/meta/recipes-extended/images/core-image-testmaster.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "A master image to be deployed on a target useful for testing other images" + +IMAGE_FEATURES += "ssh-server-openssh package-management" + +inherit core-image + +# the deploy code requires bash and +# normal linux utilities not busybox ones +IMAGE_INSTALL += "\ + bash coreutils util-linux tar gzip bzip2 kmod \ + python-modules python-misc \ + e2fsprogs e2fsprogs-mke2fs parted \ + " +# we need a particular initramfs for live images +# that pulls custom install scripts which take +# care of partitioning for us +INITRD_IMAGE = "core-image-testmaster-initramfs" + 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 @@ +From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 17 Mar 2013 11:21:35 -0700 +Subject: [PATCH] configure: Add option to enable/disable libnfnetlink + +This changes the configure behaviour from autodetecting +for libnfnetlink to having an option to disable it explicitly + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + configure.ac | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ba616ab..ce2d315 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq], + AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], + [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), + [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) ++AC_ARG_ENABLE([libnfnetlink], ++ AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]), ++ [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"]) + + libiptc_LDFLAGS2=""; + AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], +@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"]) + AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) + AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) + +-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], +- [nfnetlink=1], [nfnetlink=0]) +-AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) ++AS_IF([test "x$enable_libnfnetlink" = "xyes"], [ ++ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0]) ++ ]) ++ ++AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"]) + + regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ + -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ +-- +1.7.9.5 + 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 @@ +From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Fri, 23 Mar 2012 14:27:20 -0400 +Subject: [PATCH] types.h: add defines that are required for if_packet.h + +The iptables local linux/types.h overrides the kernel/sysroot +types.h. As such, we need to provide some defines that are required +to build against 3.2+ kernel headers. + +ifndef protection is provided for the defines to ensure that +configuration that already have these defines are still buildable. + +This commit is temporary until a new version of iptables can be +used that contains the defines. + +This is similar to the commit in the iptables git repository: + + https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b + +Upstream-Status: Backport + +Signed-off-by: Bruce Ashfield +--- + include/linux/types.h | 10 ++++++++++ + 1 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/include/linux/types.h b/include/linux/types.h +index 8b483c8..ebf6432 100644 +--- a/include/linux/types.h ++++ b/include/linux/types.h +@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64; + typedef __u16 __bitwise __sum16; + typedef __u32 __bitwise __wsum; + ++#ifndef __aligned_u64 ++#define __aligned_u64 __u64 __attribute__((aligned(8))) ++#endif ++#ifndef __aligned_be64 ++#define __aligned_be64 __be64 __attribute__((aligned(8))) ++#endif ++#ifndef __aligned_le64 ++#define __aligned_le64 __le64 __attribute__((aligned(8))) ++#endif ++ + #endif /* __ASSEMBLY__ */ + #endif /* _LINUX_TYPES_H */ +-- +1.7.0.4 + diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb new file mode 100644 index 0000000000..dc17d575dd --- /dev/null +++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb @@ -0,0 +1,46 @@ +SUMMARY = "Tools for managing kernel packet filtering capabilities" +DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \ +filtering code in Linux." +HOMEPAGE = "http://www.netfilter.org/" +BUGTRACKER = "http://bugzilla.netfilter.org/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\ + file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc" + +RRECOMMENDS_${PN} = "kernel-module-x-tables \ + kernel-module-ip-tables \ + kernel-module-iptable-filter \ + kernel-module-iptable-nat \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-conntrack \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-nat \ + kernel-module-ipt-masquerade" +FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables" +FILES_${PN}-dbg =+ "${libdir}/xtables/.debug" + +SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \ + file://types.h-add-defines-that-are-required-for-if_packet.patch \ + file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \ + " + +SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0" +SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \ + " +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \ + " + +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +# libnfnetlink recipe is in meta-networking layer +PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink" + +do_configure_prepend() { + # Remove some libtool m4 files + # Keep ax_check_linker_flags.m4 which belongs to autoconf-archive. + rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 +} diff --git a/meta/recipes-extended/iputils/files/debian/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 @@ +Upstream-Status: Inappropriate [disable feature] + +Index: iputils-s20121221/Makefile +=================================================================== +--- iputils-s20121221.orig/Makefile ++++ iputils-s20121221/Makefile +@@ -106,7 +106,7 @@ endif + endif + + # ------------------------------------- +-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd ++IPV4_TARGETS=tracepath ping clockdiff arping + IPV6_TARGETS=tracepath6 traceroute6 ping6 + TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) + diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff new file mode 100644 index 0000000000..d3b18868c0 --- /dev/null +++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff @@ -0,0 +1,31 @@ +Upstream-Status: Pending [from other distro Debian] + +Index: iputils-s20121221/tracepath.c +=================================================================== +--- iputils-s20121221.orig/tracepath.c ++++ iputils-s20121221/tracepath.c +@@ -370,9 +370,9 @@ main(int argc, char **argv) + } + #endif + +- he = gethostbyname(p); ++ he = gethostbyname2(argv[0], AF_INET); + if (he == NULL) { +- herror("gethostbyname"); ++ herror("gethostbyname2"); + exit(1); + } + +Index: iputils-s20121221/ping.c +=================================================================== +--- iputils-s20121221.orig/ping.c ++++ iputils-s20121221/ping.c +@@ -279,7 +279,7 @@ main(int argc, char **argv) + #else + idn = target; + #endif +- hp = gethostbyname(idn); ++ hp = gethostbyname2(idn, AF_INET); + if (!hp) { + fprintf(stderr, "ping: unknown host %s\n", target); + 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 @@ +Upstream-Status: Backport + +From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven +Date: Wed, 16 Jan 2013 03:12:15 +0900 +Subject: [PATCH] ping6: Fix build command line argument with gnutls. + +The ping6 command can use either openssl or gnutls... +and the Makefile has a bunch of setup for defining which of the two to use. + +Unfortunately, the final -D define on the commandline to enable gnutls +inside the ping6.c file didn't actually make it onto the gcc +commandline. +This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap. + +Signed-off-by: Arjan van de Ven +Signed-off-by: YOSHIFUJI Hideaki +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index c62d9df..89249f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP) + DEF_ping_common = $(DEF_CAP) $(DEF_IDN) + DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) + LIB_ping = $(LIB_CAP) $(LIB_IDN) +-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) ++DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO) + LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO) + + ping: ping_common.o +-- +1.7.2.5 + 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 @@ +Fix nsgmls path issue + +Upstream-Status: Pending + +Signed-off-by: Zhai Edwin + +Index: iputils-s20101006/doc/Makefile +=================================================================== +--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800 ++++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800 +@@ -27,10 +27,15 @@ + # docbook2man produces utterly ugly output and I did not find + # any way to customize this but hacking backend perl script a little. + # Well, hence... ++# nsgmls seems append path to search directory according to the sysid path. ++# e.g. if input ../index.db, it would search $search_directory/../ rather than ++# $search_directory, which leads searching failure. Fixing nsgmls probably ++# introduce some side effects, so use this ugly hack: running nsgmls in current ++# directory, and running docbook2man in tmp directory. + + $(MANFILES): index.db + @-mkdir tmp.db2man +- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ .. ++ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ .. + @-rm -rf tmp.db2man + + clean: diff --git a/meta/recipes-extended/iputils/iputils_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 @@ +SUMMARY = "Network monitoring tools" +DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ +tracepath, tracepath6, ping, ping6 and arping." +HOMEPAGE = "http://www.skbuff.net/iputils" +SECTION = "console/network" + +LICENSE = "BSD & GPLv2+" + +LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \ + file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \ + file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \ + file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 " + +DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap" + + +SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ + file://debian/use_gethostbyname2.diff \ + file://debian/targets.diff \ + file://nsgmls-path-fix.patch \ + file://fix-build-command-line-argument-with-gnutls.patch \ + " + +SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171" +SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f" + +do_compile () { + oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man +} + +do_install () { + install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8 + # SUID root programs + install -m 4555 ping ${D}${base_bindir}/ping + install -m 4555 ping6 ${D}${base_bindir}/ping6 + install -m 4555 traceroute6 ${D}${base_bindir}/ + # Other programgs + for i in arping tracepath tracepath6; do + install -m 0755 $i ${D}${base_bindir}/ + done + # Manual pages for things we build packages for + for i in tracepath.8 traceroute6.8 ping.8 arping.8; do + install -m 0644 doc/$i ${D}${mandir}/man8/ || true + done +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-ping = "ping" +ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" + +ALTERNATIVE_${PN}-ping6 = "ping6" +ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" + +PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" + +FILES_${PN} = "" +FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" +FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" +FILES_${PN}-arping = "${base_bindir}/arping" +FILES_${PN}-tracepath = "${base_bindir}/tracepath" +FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" +FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" +FILES_${PN}-doc = "${mandir}/man8" diff --git a/meta/recipes-extended/less/less_466.bb b/meta/recipes-extended/less/less_466.bb new file mode 100644 index 0000000000..c5b8a3f7b6 --- /dev/null +++ b/meta/recipes-extended/less/less_466.bb @@ -0,0 +1,39 @@ +SUMMARY = "Text file viewer similar to more" +DESCRIPTION = "Less is a program similar to more, i.e. a terminal \ +based program for viewing text files and the output from other \ +programs. Less offers many features beyond those that more does." +HOMEPAGE = "http://www.greenwoodsoftware.com/" +SECTION = "console/utils" + +# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less +# Including email author giving permissing to use BSD +# +# From: Mark Nudelman +# To: Elizabeth Flanagan + +Index: libaio-0.3.109/src/syscall-m68k.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-m68k.h +@@ -0,0 +1,78 @@ ++#define __NR_io_setup 241 ++#define __NR_io_destroy 242 ++#define __NR_io_getevents 243 ++#define __NR_io_submit 244 ++#define __NR_io_cancel 245 ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a) ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a,btype b) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a,btype b,ctype c) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname (atype a, btype b, ctype c, dtype d) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++register long __e __asm__ ("%d5") = (long)(e); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d), "d" (__e) \ ++ ); \ ++return (type) __res; \ ++} ++ +Index: libaio-0.3.109/src/syscall-sparc.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-sparc.h +@@ -0,0 +1,130 @@ ++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ ++ ++/* ++ * System calls under the Sparc. ++ * ++ * Don't be scared by the ugly clobbers, it is the only way I can ++ * think of right now to force the arguments into fixed registers ++ * before the trap into the system call with gcc 'asm' statements. ++ * ++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) ++ * ++ * SunOS compatibility based upon preliminary work which is: ++ * ++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) ++ */ ++ ++ ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 ++ ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++register long __o4 __asm__ ("o4") = (long)(arg5); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ +Index: libaio-0.3.109/src/syscall.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall.h ++++ libaio-0.3.109/src/syscall.h +@@ -24,6 +24,14 @@ + #include "syscall-alpha.h" + #elif defined(__arm__) + #include "syscall-arm.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__sparc__) ++#include "syscall-sparc.h" ++#elif defined(__hppa__) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #error "add syscall-arch.h" + #endif +Index: libaio-0.3.109/src/syscall-mips.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-mips.h +@@ -0,0 +1,223 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle ++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. ++ * ++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto ++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A ++ */ ++ ++#ifndef _MIPS_SIM_ABI32 ++#define _MIPS_SIM_ABI32 1 ++#define _MIPS_SIM_NABI32 2 ++#define _MIPS_SIM_ABI64 3 ++#endif ++ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++ ++/* ++ * Linux o32 style syscalls are in the range from 4000 to 4999. ++ */ ++#define __NR_Linux 4000 ++#define __NR_io_setup (__NR_Linux + 241) ++#define __NR_io_destroy (__NR_Linux + 242) ++#define __NR_io_getevents (__NR_Linux + 243) ++#define __NR_io_submit (__NR_Linux + 244) ++#define __NR_io_cancel (__NR_Linux + 245) ++ ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ ++ ++#if _MIPS_SIM == _MIPS_SIM_ABI64 ++ ++/* ++ * Linux 64-bit syscalls are in the range from 5000 to 5999. ++ */ ++#define __NR_Linux 5000 ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ ++ ++#if _MIPS_SIM == _MIPS_SIM_NABI32 ++ ++/* ++ * Linux N32 syscalls are in the range from 6000 to 6999. ++ */ ++#define __NR_Linux 6000 ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %3\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a, btype b) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %4\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a, btype b, ctype c) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname(atype a, btype b, ctype c, dtype d) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#if (_MIPS_SIM == _MIPS_SIM_ABI32) ++ ++/* ++ * Using those means your brain needs more than an oil change ;-) ++ */ ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname(atype a, btype b, ctype c, dtype d, etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "lw\t$2, %6\n\t" \ ++ "subu\t$29, 32\n\t" \ ++ "sw\t$2, 16($29)\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ "addiu\t$29, 32\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \ ++ "m" ((unsigned long)e) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ ++ ++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ register unsigned long __a4 asm("$8") = (unsigned long) e; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %6\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ ++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ ++ +Index: libaio-0.3.109/src/libaio.h +=================================================================== +--- libaio-0.3.109.orig/src/libaio.h ++++ libaio-0.3.109/src/libaio.h +@@ -83,6 +83,30 @@ typedef enum io_iocb_cmd { + #define PADDEDptr(x, y) x; unsigned y + #define PADDEDul(x, y) unsigned long x; unsigned y + # endif ++#elif defined(__m68k__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__sparc__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__hppa__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__mips__) ++# if defined (__MIPSEB__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++# elif defined(__MIPSEL__) /* little endian, 32 bits */ ++#define PADDED(x, y) x; unsigned y ++#define PADDEDptr(x, y) x; unsigned y ++#define PADDEDul(x, y) unsigned long x; unsigned y ++# else ++# error "neither mipseb nor mipsel?" ++# endif + #else + #error endian? + #endif +Index: libaio-0.3.109/src/syscall-parisc.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-parisc.h +@@ -0,0 +1,146 @@ ++/* ++ * Linux system call numbers. ++ * ++ * Cary Coutant says that we should just use another syscall gateway ++ * page to avoid clashing with the HPUX space, and I think he's right: ++ * it will would keep a branch out of our syscall entry path, at the ++ * very least. If we decide to change it later, we can ``just'' tweak ++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be ++ * 1024 or something. Oh, and recompile libc. =) ++ * ++ * 64-bit HPUX binaries get the syscall gateway address passed in a register ++ * from the kernel at startup, which seems a sane strategy. ++ */ ++ ++#define __NR_Linux 0 ++#define __NR_io_setup (__NR_Linux + 215) ++#define __NR_io_destroy (__NR_Linux + 216) ++#define __NR_io_getevents (__NR_Linux + 217) ++#define __NR_io_submit (__NR_Linux + 218) ++#define __NR_io_cancel (__NR_Linux + 219) ++ ++#define SYS_ify(syscall_name) __NR_##syscall_name ++ ++/* Assume all syscalls are done from PIC code just to be ++ * safe. The worst case scenario is that you lose a register ++ * and save/restore r19 across the syscall. */ ++#define PIC ++ ++/* Definition taken from glibc 2.3.3 ++ * sysdeps/unix/sysv/linux/hppa/sysdep.h ++ */ ++ ++#ifdef PIC ++/* WARNING: CANNOT BE USED IN A NOP! */ ++# define K_STW_ASM_PIC " copy %%r19, %%r4\n" ++# define K_LDW_ASM_PIC " copy %%r4, %%r19\n" ++# define K_USING_GR4 "%r4", ++#else ++# define K_STW_ASM_PIC " \n" ++# define K_LDW_ASM_PIC " \n" ++# define K_USING_GR4 ++#endif ++ ++/* GCC has to be warned that a syscall may clobber all the ABI ++ registers listed as "caller-saves", see page 8, Table 2 ++ in section 2.2.6 of the PA-RISC RUN-TIME architecture ++ document. However! r28 is the result and will conflict with ++ the clobber list so it is left out. Also the input arguments ++ registers r20 -> r26 will conflict with the list so they ++ are treated specially. Although r19 is clobbered by the syscall ++ we cannot say this because it would violate ABI, thus we say ++ r4 is clobbered and use that register to save/restore r19 ++ across the syscall. */ ++ ++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \ ++ "%r20", "%r29", "%r31" ++ ++#undef K_INLINE_SYSCALL ++#define K_INLINE_SYSCALL(name, nr, args...) ({ \ ++ long __sys_res; \ ++ { \ ++ register unsigned long __res __asm__("r28"); \ ++ K_LOAD_ARGS_##nr(args) \ ++ /* FIXME: HACK stw/ldw r19 around syscall */ \ ++ __asm__ volatile( \ ++ K_STW_ASM_PIC \ ++ " ble 0x100(%%sr2, %%r0)\n" \ ++ " ldi %1, %%r20\n" \ ++ K_LDW_ASM_PIC \ ++ : "=r" (__res) \ ++ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \ ++ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \ ++ ); \ ++ __sys_res = (long)__res; \ ++ } \ ++ __sys_res; \ ++}) ++ ++#define K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_1(r26) \ ++ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ ++ K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_2(r26,r25) \ ++ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ ++ K_LOAD_ARGS_1(r26) ++#define K_LOAD_ARGS_3(r26,r25,r24) \ ++ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ ++ K_LOAD_ARGS_2(r26,r25) ++#define K_LOAD_ARGS_4(r26,r25,r24,r23) \ ++ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ ++ K_LOAD_ARGS_3(r26,r25,r24) ++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \ ++ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ ++ K_LOAD_ARGS_4(r26,r25,r24,r23) ++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ ++ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ ++ K_LOAD_ARGS_5(r26,r25,r24,r23,r22) ++ ++/* Even with zero args we use r20 for the syscall number */ ++#define K_ASM_ARGS_0 ++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26) ++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25) ++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24) ++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23) ++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22) ++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21) ++ ++/* The registers not listed as inputs but clobbered */ ++#define K_CLOB_ARGS_6 ++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21" ++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22" ++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23" ++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24" ++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25" ++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26" ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 1, arg1); \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1, type2 arg2) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1, type2 arg2, type3 arg3) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ ++} ++ +Index: libaio-0.3.109/src/syscall-arm.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall-arm.h ++++ libaio-0.3.109/src/syscall-arm.h +@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3 + return (type) __res_r0; \ + } + ++/* ++ * linux/include/asm-arm/unistd.h ++ * ++ * Copyright (C) 2001-2005 Russell King ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, ++ * no matter what the change is. Thanks! ++ */ ++ ++#define __NR_OABI_SYSCALL_BASE 0x900000 ++ ++#if defined(__thumb__) || defined(__ARM_EABI__) ++#define __NR_SYSCALL_BASE 0 ++#else ++#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE ++#endif ++ ++#define __NR_io_setup (__NR_SYSCALL_BASE+243) ++#define __NR_io_destroy (__NR_SYSCALL_BASE+244) ++#define __NR_io_getevents (__NR_SYSCALL_BASE+245) ++#define __NR_io_submit (__NR_SYSCALL_BASE+246) ++#define __NR_io_cancel (__NR_SYSCALL_BASE+247) ++ ++#define __sys2(x) #x ++#define __sys1(x) __sys2(x) ++ ++#if defined(__thumb__) || defined(__ARM_EABI__) ++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; ++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs ++#define __syscall(name) "swi\t0" ++#else ++#define __SYS_REG(name) ++#define __SYS_REG_LIST(regs...) regs ++#define __syscall(name) "swi\t" __sys1(__NR_##name) "" ++#endif ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __r3 __asm__("r3") = (long)arg4; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __r3 __asm__("r3") = (long)arg4; \ ++ register long __r4 __asm__("r4") = (long)arg5; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ ++ "r" (__r3), "r" (__r4) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch new file mode 100644 index 0000000000..dad9601c49 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/destdir.patch @@ -0,0 +1,17 @@ +Upstream-Status: Pending + +from openembedded, added by Qing He + +Index: libaio-0.3.106/Makefile +=================================================================== +--- libaio-0.3.106.orig/Makefile 2004-02-26 07:25:10.000000000 -0800 ++++ libaio-0.3.106/Makefile 2006-10-14 09:19:07.000000000 -0700 +@@ -15,7 +15,7 @@ + @$(MAKE) -C src + + install: +- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) ++ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) + + + clean: diff --git a/meta/recipes-extended/libaio/libaio/libaio-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 @@ +Upstream-Status: Submitted + +Signed-off-by: Riku Voipio + +--- + harness/cases/16.t | 2 ++ + src/libaio.h | 10 ++++++++++ + 2 files changed, 12 insertions(+) + +--- a/src/libaio.h ++++ b/src/libaio.h +@@ -107,6 +107,16 @@ + # else + # error "neither mipseb nor mipsel?" + # endif ++#elif defined(__aarch64__) ++# if defined (__AARCH64EB__) /* big endian, 64 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x,y) x ++#define PADDEDul(x, y) unsigned long x ++# elif defined(__AARCH64EL__) /* little endian, 64 bits */ ++#define PADDED(x, y) x, y ++#define PADDEDptr(x, y) x ++#define PADDEDul(x, y) unsigned long x ++# endif + #else + #error endian? + #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 @@ +From 5e96c73d5dfbdea8d0be82b7f3fc8d6735e5dfa7 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 17 Jan 2010 17:07:48 -0500 +Subject: [PATCH] add a generic syscall() fallback + +Upstream-Status: Pending + +Signed-off-by: Mike Frysinger +Signed-off-by: Riku Voipio +--- + src/syscall-generic.h | 29 +++++++++++++++++++++++++++++ + src/syscall.h | 3 ++- + 2 files changed, 31 insertions(+), 1 deletions(-) + create mode 100644 src/syscall-generic.h + +diff --git a/src/syscall-generic.h b/src/syscall-generic.h +new file mode 100644 +index 0000000..24d7c7c +--- /dev/null ++++ b/src/syscall-generic.h +@@ -0,0 +1,29 @@ ++#include ++#include ++#include ++ ++#define _body_io_syscall(sname, args...) \ ++{ \ ++ int ret = syscall(__NR_##sname, ## args); \ ++ return ret < 0 ? -errno : ret; \ ++} ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++_body_io_syscall(sname, (long)arg1) ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2) ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ ++type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) +diff --git a/src/syscall.h b/src/syscall.h +index 78becfe..d954af0 100644 +--- a/src/syscall.h ++++ b/src/syscall.h +@@ -25,5 +25,6 @@ + #elif defined(__arm__) + #include "syscall-arm.h" + #else +-#error "add syscall-arch.h" ++#warning "using generic syscall method" ++#include "syscall-generic.h" + #endif +-- +1.7.3.1 + 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 @@ +Upstream status: Inappropriate [embedded specific] + +Signed-off-by: Phil Staub + +Index: libaio-0.3.109/src/syscall-mips.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall-mips.h ++++ libaio-0.3.109/src/syscall-mips.h +@@ -76,7 +76,7 @@ type fname(atype a) \ + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #define io_syscall2(type,fname,sname,atype,a,btype,b) \ +@@ -100,7 +100,7 @@ type fname(atype a, btype b) \ + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ +@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \ + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ +@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #if (_MIPS_SIM == _MIPS_SIM_ABI32) +@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ +@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp + \ + if (__a3 == 0) \ + return (type) __v0; \ +- return (type) -1; \ ++ return (type) (-(__v0)); \ + } + + #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 @@ +Upstream-Status: Pending + +Properly load arguments 5 an 6 for x86-64 syscall +Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64 +syscall so that it works with both x32 and x86-64. + +Received this patch from H.J. Lu + +Signed-Off-By: Nitin A Kamble +2011/12/02 + +--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700 ++++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800 +@@ -1,8 +1,18 @@ ++#ifndef __NR_io_setup + #define __NR_io_setup 206 ++#endif ++#ifndef __NR_io_destroy + #define __NR_io_destroy 207 ++#endif ++#ifndef __NR_io_getevents + #define __NR_io_getevents 208 ++#endif ++#ifndef __NR_io_submit + #define __NR_io_submit 209 ++#endif ++#ifndef __NR_io_cancel + #define __NR_io_cancel 210 ++#endif + + #define __syscall_clobber "r11","rcx","memory" + #define __syscall "syscall" +@@ -42,10 +52,11 @@ return __res; \ + type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ + { \ + long __res; \ +-__asm__ volatile ("movq %5,%%r10 ;" __syscall \ ++register long __a4 asm ("r10") = (long) arg4; \ ++__asm__ volatile (__syscall \ + : "=a" (__res) \ + : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ +- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ ++ "d" ((long)(arg3)),"r" (__a4)); \ + return __res; \ + } + +@@ -54,10 +65,11 @@ return __res; \ + type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ + { \ + long __res; \ +-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ ++register long __a4 asm ("r10") = (long) arg4; \ ++register long __a5 asm ("r8") = (long) arg5; \ ++__asm__ volatile ( __syscall \ + : "=a" (__res) \ + : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ +- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ +- __syscall_clobber,"r8","r10" ); \ ++ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ + return __res; \ + } diff --git a/meta/recipes-extended/libaio/libaio/toolchain.patch b/meta/recipes-extended/libaio/libaio/toolchain.patch new file mode 100644 index 0000000000..4d88ec167b --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/toolchain.patch @@ -0,0 +1,27 @@ +Upstream-Status: Inappropriate [embedded specific] + +8/27/2010 - created by Qing He + +diff --git a/src/Makefile b/src/Makefile +index 8d134cc..df8e5b6 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -2,7 +2,6 @@ prefix=/usr + includedir=$(prefix)/include + libdir=$(prefix)/lib + +-ARCH := $(shell uname -m | sed -e s/i.86/i386/) + CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) +@@ -44,8 +43,8 @@ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h + + libaio.a: $(libaio_objs) + rm -f libaio.a +- ar r libaio.a $^ +- ranlib libaio.a ++ $(AR) r libaio.a $^ ++ $(RANLIB) libaio.a + + $(libname): $(libaio_sobjs) libaio.map + $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.109.bb new file mode 100644 index 0000000000..978f5f5fb5 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb @@ -0,0 +1,31 @@ +SUMMARY = "Asynchronous I/O library" +DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface" +HOMEPAGE = "http://lse.sourceforge.net/io/aio.html" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" + +PR = "r2" + +SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \ + file://00_arches.patch \ + file://toolchain.patch \ + file://destdir.patch \ + file://libaio_fix_for_x32.patch \ + file://libaio-generic.patch \ + file://libaio-aarch64.patch \ + file://libaio_fix_for_mips_syscalls.patch \ +" + +SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756" +SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d" + +EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}" + +do_configure () { + sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile +} + +do_install () { + oe_runmake install DESTDIR=${D} +} 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 @@ +From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sat, 22 Feb 2014 14:35:59 +0800 +Subject: [PATCH] Fix CVE-2013-0211 + +This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4 + +Upstream-Status: Backport + +Signed-off-by: Baogen shang + +Update the patch because of uprev on 20140222 + +Signed-off-by: Robert Yang +--- + libarchive/archive_write.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c +index a3d1a33..a323588 100644 +--- a/libarchive/archive_write.c ++++ b/libarchive/archive_write.c +@@ -671,8 +671,12 @@ static ssize_t + _archive_write_data(struct archive *_a, const void *buff, size_t s) + { + struct archive_write *a = (struct archive_write *)_a; ++ const size_t max_write = INT_MAX; + archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, + ARCHIVE_STATE_DATA, "archive_write_data"); ++ /* In particular, this catches attempts to pass negative values. */ ++ if (s > max_write) ++ s = max_write; + archive_clear_error(&a->archive); + return ((a->format_write_data)(a, buff, s)); + } +-- +1.8.2.1 + diff --git a/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch new file mode 100644 index 0000000000..346af91351 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch @@ -0,0 +1,25 @@ +Use pkg-config for the libxml2 dependency, not the -config script. + +Upstream-Status: Pending + +RP 2014/5/22 + +Index: libarchive-3.1.2/configure.ac +=================================================================== +--- libarchive-3.1.2.orig/configure.ac 2013-02-09 17:23:03.000000000 +0000 ++++ libarchive-3.1.2/configure.ac 2014-05-13 15:26:45.446499108 +0000 +@@ -329,10 +329,10 @@ + AS_HELP_STRING([--without-expat], [Don't build support for xar through expat])) + + if test "x$with_xml2" != "xno"; then +- AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}]) +- if test "x$XML2_CONFIG" != "x"; then +- CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`" +- LIBS="${LIBS} `${XML2_CONFIG} --libs`" ++ PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,) ++ if test "x$PKG_XML2_CFLAGS" != "x"; then ++ CPPFLAGS="${CPPFLAGS} ${PKG_XML2_CFLAGS}" ++ LIBS="${LIBS} ${PKG_XML2_LIBS}" + AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library)) + else + AC_CHECK_LIB(xml2,xmlInitParser) 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..96e2d500ed --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb @@ -0,0 +1,51 @@ +SUMMARY = "Support for reading various archive formats" +DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats" +HOMEPAGE = "http://www.libarchive.org/" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841" + +DEPENDS = "e2fsprogs-native" + +PACKAGECONFIG ?= "libxml2 zlib bz2" + +PACKAGECONFIG_append_class-target = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \ +" + +PACKAGECONFIG_append_class-nativesdk = " largefile" + +PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," +PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," +PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2," +PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz," +PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," +PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2," +PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat," +PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo," +PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle," + +SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ + file://libarchive-CVE-2013-0211.patch \ + file://pkgconfig.patch \ + " + +SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a" +SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e" + +inherit autotools-brokensep lib_package pkgconfig + +CPPFLAGS += "-I${WORKDIR}/extra-includes" + +do_configure[cleandirs] += "${WORKDIR}/extra-includes" +do_configure_prepend() { + # We just need the headers for some type constants, so no need to + # build all of e2fsprogs for the target + cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/ +} + +BBCLASSEXTEND = "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 @@ +Upstream-Status: Inappropriate + +automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, +and the warnings are treated as errors because of the -Werror parameter. + +These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not +eliminated these deprecated macros yet. So disable the treatment of warnings +as errors until gettext is updated to remove the deprecated macros. + +Signed-Off-by: Nitin A Kamble +2012/07/10 + +Index: libidn-1.24/configure.ac +=================================================================== +--- libidn-1.24.orig/configure.ac ++++ libidn-1.24/configure.ac +@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_HEADERS(config.h) +-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) ++AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) + AM_SILENT_RULES([yes]) + + # 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 @@ +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Marko Lindqvist +diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am +--- libidn-1.26/doc/Makefile.am 2012-09-18 11:25:45.000000000 +0300 ++++ libidn-1.26/doc/Makefile.am 2013-02-08 07:41:24.591431462 +0200 +@@ -49,15 +49,9 @@ + + # Man pages. + +-dist_man_MANS = idn.1 $(gdoc_MANS) ++dist_man_MANS = $(gdoc_MANS) + MAINTAINERCLEANFILES = $(dist_man_MANS) + +-idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \ +- $(top_srcdir)/configure.ac +- $(HELP2MAN) \ +- --name="Internationalized Domain Names command line tool" \ +- --output=$@ $(top_builddir)/src/idn$(EXEEXT) +- + # GDOC + + 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 @@ +Upstream-Status: Pending + +This patch fixes following issue with automake 1.12 + +| automake: warnings are treated as errors +| /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 +| /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' + +Signed-Off-By: Nitin A Kamble +2012/05/03 + +Index: libidn-1.24/configure.ac +=================================================================== +--- libidn-1.24.orig/configure.ac ++++ libidn-1.24/configure.ac +@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17) + AC_SUBST(LT_REVISION, 7) + AC_SUBST(LT_AGE, 6) + ++# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it ++m4_pattern_allow([AM_PROG_AR]) ++AM_PROG_AR ++ + AC_PROG_CC + gl_EARLY + 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..ff8d345ccb --- /dev/null +++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb @@ -0,0 +1,32 @@ +SUMMARY = "Internationalized Domain Name support library" +DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." +HOMEPAGE = "http://www.gnu.org/software/libidn/" +SECTION = "libs" +LICENSE = "LGPLv2.1+ & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \ + file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4" +PR = "r1" + +inherit pkgconfig autotools gettext texinfo + +SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d" +SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3" + +do_configure_prepend() { + # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from + # autoconf CVS because atm the autoconf it uses is a bit old + # now with cross autotool, that macro is already there and this + # local definition causes circular dependency. Actually AC_GNU_SOURCE + # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local + # references to the latter here. + sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4 + rm -f ${S}/lib/gl/m4/extensions.m4 +} + +do_install_append() { + rm -rf ${D}${libdir}/Libidn.dll +} diff --git a/meta/recipes-extended/libidn/libidn_1.29.bb b/meta/recipes-extended/libidn/libidn_1.29.bb new file mode 100644 index 0000000000..04b534474d --- /dev/null +++ b/meta/recipes-extended/libidn/libidn_1.29.bb @@ -0,0 +1,34 @@ +SUMMARY = "Internationalized Domain Name support library" +DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." +HOMEPAGE = "http://www.gnu.org/software/libidn/" +SECTION = "libs" +LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b35f8839295dd730a55f1a19ec086217 \ + file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://lib/idna.h;endline=21;md5=61a0e126c0c5552290d9bfa57e407dd6 \ + file://src/idn.c;endline=20;md5=3f55c28bede16bd7b1244be73067d195" + +inherit pkgconfig autotools gettext texinfo + +SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ + file://libidn_fix_for_automake-1.12.patch \ + file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ + file://dont-depend-on-help2man.patch \ +" + +SRC_URI[md5sum] = "2b67bb507207af379f9461e1307dc84b" +SRC_URI[sha256sum] = "fb82747dbbf9b36f703ed27293317d818d7e851d4f5773dedf3efa4db32a7c7c" + +# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 +# so package command into a separate package +PACKAGES =+ "idn" +FILES_idn = "${bindir}/*" + +EXTRA_OECONF = "--disable-csharp" + +do_install_append() { + rm -rf ${D}${datadir}/emacs +} 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 @@ +Fix a possible overflow (reported by _FORTIFY_SOURCE=2) + +Ported from Gentoo + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: libtirpc-0.2.1/src/getrpcport.c +=================================================================== +--- libtirpc-0.2.1.orig/src/getrpcport.c ++++ libtirpc-0.2.1/src/getrpcport.c +@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto + + if ((hp = gethostbyname(host)) == NULL) + return (0); ++ if (hp->h_length != sizeof(addr.sin_addr.s_addr)) ++ return (0); + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_port = 0; +- if (hp->h_length > sizeof(addr)) +- hp->h_length = sizeof(addr); + memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); + /* Inconsistent interfaces need casts! :-( */ + return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, diff --git a/meta/recipes-extended/libtirpc/libtirpc/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 @@ +uclibc does not provide des functionality unlike eglibc so lets disable ssl support + +Upstream-Status: Inappropriate [uclibc specific] +Signed-off-by: Khem Raj + +Index: libtirpc-0.2.3/src/rpc_soc.c +=================================================================== +--- libtirpc-0.2.3.orig/src/rpc_soc.c 2013-03-10 16:00:51.355282153 -0700 ++++ libtirpc-0.2.3/src/rpc_soc.c 2013-03-10 16:00:51.703282148 -0700 +@@ -520,6 +520,7 @@ + (resultproc_t) rpc_wrap_bcast, "udp"); + } + ++#if 0 + /* + * Create the client des authentication object. Obsoleted by + * authdes_seccreate(). +@@ -551,6 +552,7 @@ + dummy = authdes_seccreate(servername, window, NULL, ckey); + return (dummy); + } ++#endif + + /* + * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() +Index: libtirpc-0.2.3/src/Makefile.am +=================================================================== +--- libtirpc-0.2.3.orig/src/Makefile.am 2013-03-10 16:00:51.355282153 -0700 ++++ libtirpc-0.2.3/src/Makefile.am 2013-03-10 16:00:51.703282148 -0700 +@@ -50,7 +50,7 @@ + rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ + svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c ++ auth_time.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb new file mode 100644 index 0000000000..3edf002497 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb @@ -0,0 +1,35 @@ +SUMMARY = "Transport-Independent RPC library" +DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux" +SECTION = "libs/network" +HOMEPAGE = "http://sourceforge.net/projects/libtirpc/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ + file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +DEPENDS += "xz-native" +PROVIDES = "virtual/librpc" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \ + ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \ + file://libtirpc-0.2.1-fortify.patch \ + " + +SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch" + +SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368" +SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db" +SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445" +SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--disable-gssapi" + +do_configure_prepend () { + cp -r ${S}/../tirpc ${S} +} + +do_install_append() { + chown root:root ${D}${sysconfdir}/netconfig +} diff --git a/meta/recipes-extended/libuser/libuser/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 @@ +Fix out of tree build errors and parallel make issues. The mkdir commands +can race each other. The srcdir variable is a complete path so a ../ prefix makes +no sense. + +Upstream-Status: Pending + +RP 2013/03/21 + +Index: libuser-0.58/docs/Makefile.am +=================================================================== +--- libuser-0.58.orig/docs/Makefile.am 2012-11-07 18:25:58.000000000 -0800 ++++ libuser-0.58/docs/Makefile.am 2013-03-22 23:32:06.843518069 -0700 +@@ -8,14 +8,14 @@ + + all: sgml/libuser.txt sgml/libuser.html + +-libuser.conf.5: $(srcdir)/libuser.conf.5.in Makefile ++libuser.conf.5: $(abs_srcdir)/libuser.conf.5.in Makefile + sed 's,@sysconfdir\@,$(sysconfdir),g' \ +- < $(srcdir)/libuser.conf.5.in > $@ ++ < $(abs_srcdir)/libuser.conf.5.in > $@ + +-sgml/libuser.txt: $(srcdir)/sgml/libuser.sgml +- [ -d sgml ] || mkdir sgml +- cd sgml; sgml2txt ../$(srcdir)/sgml/libuser.sgml ++sgml/libuser.txt: $(abs_srcdir)/sgml/libuser.sgml ++ [ -d sgml ] || mkdir sgml || true ++ cd sgml; sgml2txt $(abs_srcdir)/sgml/libuser.sgml + +-sgml/libuser.html: $(srcdir)/sgml/libuser.sgml +- [ -d sgml ] || mkdir sgml +- cd sgml; sgml2html ../$(srcdir)/sgml/libuser.sgml ++sgml/libuser.html: $(abs_srcdir)/sgml/libuser.sgml ++ [ -d sgml ] || mkdir sgml || true ++ 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..e6316ef488 --- /dev/null +++ b/meta/recipes-extended/libuser/libuser_0.60.bb @@ -0,0 +1,30 @@ +SUMMARY = "user and group account administration library" +DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \ +and group accounts" +HOMEPAGE = "https://fedorahosted.org/libuser/" +BUGTRACKER = "https://fedorahosted.org/libuser/newticket" + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \ + file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1" + +SECTION = "base" + +SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \ + file://fixsepbuild.patch" + +SRC_URI[md5sum] = "5c549724999ccca65ceaaecc4eb8cb98" +SRC_URI[sha256sum] = "b1f73408ebfee79eb01a47c5879a2cdef6a00b75ee24870de7df1b816ff483eb" + +DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python" + +inherit autotools gettext pythonnative python-dir pkgconfig + +EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}" + +PACKAGES += "${PN}-python " + +FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug" +FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" + 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..f5f1c377b6 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd @@ -0,0 +1 @@ +

It works!

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 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/lighttpd +NAME=lighttpd +DESC="Lighttpd Web Server" +OPTS="-f /etc/lighttpd.conf" + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start -x "$DAEMON" -- $OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop -x "$DAEMON" + sleep 1 + start-stop-daemon --start -x "$DAEMON" -- $OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta/recipes-extended/lighttpd/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 @@ +# lighttpd configuration file +# +# use it as a base for lighttpd 1.0.0 and above +# +# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ + +############ Options you really have to take care of #################### + +## modules to load +# at least mod_access and mod_accesslog should be loaded +# all other module should only be loaded if really neccesary +# - saves some time +# - saves memory +server.modules = ( +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", + "mod_access", +# "mod_cml", +# "mod_trigger_b4_dl", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_fastcgi", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_evhost", +# "mod_userdir", +# "mod_cgi", +# "mod_compress", +# "mod_ssi", +# "mod_usertrack", +# "mod_expire", +# "mod_secdownload", +# "mod_rrdtool", +# "mod_webdav", + "mod_accesslog" ) + +## a static document-root, for virtual-hosting take look at the +## server.virtual-* options +server.document-root = "/www/pages/" + +## where to send error-messages to +server.errorlog = "/www/logs/lighttpd.error.log" + +# files to check for if .../ is requested +index-file.names = ( "index.php", "index.html", + "index.htm", "default.htm" ) + +## set the event-handler (read the performance section in the manual) +# server.event-handler = "freebsd-kqueue" # needed on OS X + +# mimetype mapping +mimetype.assign = ( + ".pdf" => "application/pdf", + ".sig" => "application/pgp-signature", + ".spl" => "application/futuresplash", + ".class" => "application/octet-stream", + ".ps" => "application/postscript", + ".torrent" => "application/x-bittorrent", + ".dvi" => "application/x-dvi", + ".gz" => "application/x-gzip", + ".pac" => "application/x-ns-proxy-autoconfig", + ".swf" => "application/x-shockwave-flash", + ".tar.gz" => "application/x-tgz", + ".tgz" => "application/x-tgz", + ".tar" => "application/x-tar", + ".zip" => "application/zip", + ".mp3" => "audio/mpeg", + ".m3u" => "audio/x-mpegurl", + ".wma" => "audio/x-ms-wma", + ".wax" => "audio/x-ms-wax", + ".ogg" => "application/ogg", + ".wav" => "audio/x-wav", + ".gif" => "image/gif", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".xbm" => "image/x-xbitmap", + ".xpm" => "image/x-xpixmap", + ".xwd" => "image/x-xwindowdump", + ".css" => "text/css", + ".html" => "text/html", + ".htm" => "text/html", + ".js" => "text/javascript", + ".asc" => "text/plain", + ".c" => "text/plain", + ".cpp" => "text/plain", + ".log" => "text/plain", + ".conf" => "text/plain", + ".text" => "text/plain", + ".txt" => "text/plain", + ".dtd" => "text/xml", + ".xml" => "text/xml", + ".mpeg" => "video/mpeg", + ".mpg" => "video/mpeg", + ".mov" => "video/quicktime", + ".qt" => "video/quicktime", + ".avi" => "video/x-msvideo", + ".asf" => "video/x-ms-asf", + ".asx" => "video/x-ms-asf", + ".wmv" => "video/x-ms-wmv", + ".bz2" => "application/x-bzip", + ".tbz" => "application/x-bzip-compressed-tar", + ".tar.bz2" => "application/x-bzip-compressed-tar" + ) + +# Use the "Content-Type" extended attribute to obtain mime type if possible +#mimetype.use-xattr = "enable" + + +## send a different Server: header +## be nice and keep it at lighttpd +# server.tag = "lighttpd" + +#### accesslog module +accesslog.filename = "/www/logs/access.log" +debug.log-request-handling = "enable" + + + + +## deny access the file-extensions +# +# ~ is for backupfiles from vi, emacs, joe, ... +# .inc is often used for code includes which should in general not be part +# of the document-root +url.access-deny = ( "~", ".inc" ) + +$HTTP["url"] =~ "\.pdf$" { + server.range-requests = "disable" +} + +## +# which extensions should not be handle via static-file transfer +# +# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi +static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) + +######### Options that are good to be but not neccesary to be changed ####### + +## bind to port (default: 80) +#server.port = 81 + +## bind to localhost (default: all interfaces) +#server.bind = "grisu.home.kneschke.de" + +## error-handler for status 404 +#server.error-handler-404 = "/error-handler.html" +#server.error-handler-404 = "/error-handler.php" + +## to help the rc.scripts +#server.pid-file = "/var/run/lighttpd.pid" + + +###### virtual hosts +## +## If you want name-based virtual hosting add the next three settings and load +## mod_simple_vhost +## +## document-root = +## virtual-server-root + virtual-server-default-host + virtual-server-docroot +## or +## virtual-server-root + http-host + virtual-server-docroot +## +#simple-vhost.server-root = "/home/weigon/wwwroot/servers/" +#simple-vhost.default-host = "grisu.home.kneschke.de" +#simple-vhost.document-root = "/pages/" + + +## +## Format: .html +## -> ..../status-404.html for 'File not found' +#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-" + +## virtual directory listings +#dir-listing.activate = "enable" + +## enable debugging +#debug.log-request-header = "enable" +#debug.log-response-header = "enable" +#debug.log-request-handling = "enable" +#debug.log-file-not-found = "enable" + +### only root can use these options +# +# chroot() to directory (default: no chroot() ) +#server.chroot = "/" + +## change uid to (default: don't care) +#server.username = "wwwrun" + +## change uid to (default: don't care) +#server.groupname = "wwwrun" + +#### compress module +#compress.cache-dir = "/tmp/lighttpd/cache/compress/" +#compress.filetype = ("text/plain", "text/html") + +#### proxy module +## read proxy.txt for more info +#proxy.server = ( ".php" => +# ( "localhost" => +# ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) + +#### fastcgi module +## read fastcgi.txt for more info +## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini +#fastcgi.server = ( ".php" => +# ( "localhost" => +# ( +# "socket" => "/tmp/php-fastcgi.socket", +# "bin-path" => "/usr/local/bin/php" +# ) +# ) +# ) + +#### CGI module +#cgi.assign = ( ".pl" => "/usr/bin/perl", +# ".cgi" => "/usr/bin/perl" ) +# + +#### SSL engine +#ssl.engine = "enable" +#ssl.pemfile = "server.pem" + +#### status module +#status.status-url = "/server-status" +#status.config-url = "/server-config" + +#### auth module +## read authentication.txt for more info +#auth.backend = "plain" +#auth.backend.plain.userfile = "lighttpd.user" +#auth.backend.plain.groupfile = "lighttpd.group" + +#auth.backend.ldap.hostname = "localhost" +#auth.backend.ldap.base-dn = "dc=my-domain,dc=com" +#auth.backend.ldap.filter = "(uid=$)" + +#auth.require = ( "/server-status" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "user=jan" +# ), +# "/server-config" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "valid-user" +# ) +# ) + +#### url handling modules (rewrite, redirect, access) +#url.rewrite = ( "^/$" => "/server-status" ) +#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" ) + +#### both rewrite/redirect support back reference to regex conditional using %n +#$HTTP["host"] =~ "^www\.(.*)" { +# url.redirect = ( "^/(.*)" => "http://%1/$1" ) +#} + +# +# define a pattern for the host url finding +# %% => % sign +# %0 => domain name + tld +# %1 => tld +# %2 => domain name without tld +# %3 => subdomain 1 name +# %4 => subdomain 2 name +# +#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" + +#### expire module +#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes") + +#### ssi +#ssi.extension = ( ".shtml" ) + +#### rrdtool +#rrdtool.binary = "/usr/bin/rrdtool" +#rrdtool.db-name = "/var/www/lighttpd.rrd" + +#### setenv +#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) +#setenv.add-response-header = ( "X-Secret-Message" => "42" ) + +## for mod_trigger_b4_dl +# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db" +# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" ) +# trigger-before-download.trigger-url = "^/trigger/" +# trigger-before-download.download-url = "^/download/" +# trigger-before-download.deny-url = "http://127.0.0.1/index.html" +# trigger-before-download.trigger-timeout = 10 + +## for mod_cml +## don't forget to add index.cml to server.indexfiles +# cml.extension = ".cml" +# cml.memcache-hosts = ( "127.0.0.1:11211" ) + +#### variable usage: +## variable name without "." is auto prefixed by "var." and becomes "var.bar" +#bar = 1 +#var.mystring = "foo" + +## integer add +#bar += 1 +## string concat, with integer cast as string, result: "www.foo1.com" +#server.name = "www." + mystring + var.bar + ".com" +## array merge +#index-file.names = (foo + ".php") + index-file.names +#index-file.names += (foo + ".php") + +#### include +#include /etc/lighttpd/lighttpd-inc.conf +## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf" +#include "lighttpd-inc.conf" + +#### include_shell +#include_shell "echo var.a=1" +## the above is same as: +#var.a=1 + +# include other config file fragments from lighttpd.d subdir +include_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 @@ +[Unit] +Description=Lightning Fast Webserver With Light System Requirements +After=network.target + +[Service] +ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf +ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf +ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target + diff --git a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch new file mode 100644 index 0000000000..e395f928ce --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch @@ -0,0 +1,33 @@ +Use pkg-config for pcre dependency instead of -config script. + +Upstream-Status: Pending + +RP 2014/5/22 + + +Index: lighttpd-1.4.35/configure.ac +=================================================================== +--- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000 ++++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000 +@@ -309,16 +309,14 @@ + AC_MSG_RESULT([$WITH_PCRE]) + + if test "$WITH_PCRE" != "no"; then +- AC_PATH_PROG(PCRECONFIG, pcre-config) +- +- if test x"$PCRECONFIG" != x; then +- PCRE_LIB=`$PCRECONFIG --libs` +- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`" ++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [ ++ PCRE_LIB=${PCREPKG_LIBS} ++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" + AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) + AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) +- else ++ ], [ + AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre]) +- fi ++ ]) + fi + + AC_SUBST(PCRE_LIB) diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb new file mode 100644 index 0000000000..20d5c1caa0 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.35.bb @@ -0,0 +1,77 @@ +SUMMARY = "Lightweight high-performance web server" +HOMEPAGE = "http://www.lighttpd.net/" +BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579" + +PR = "r1" + +SECTION = "net" +DEPENDS = "zlib libpcre" +RDEPENDS_${PN} += " \ + lighttpd-module-access \ + lighttpd-module-accesslog \ + lighttpd-module-indexfile \ + lighttpd-module-dirlisting \ + lighttpd-module-staticfile \ +" + + +SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.bz2 \ + file://index.html.lighttpd \ + file://lighttpd.conf \ + file://lighttpd \ + file://lighttpd.service \ + file://pkgconfig.patch \ + " + +SRC_URI[md5sum] = "f7a88130ee9984b421ad8aa80629750a" +SRC_URI[sha256sum] = "4a71c1f6d8af41ed894b507720c4c17184dc320590013881d5170ca7f15c5bf7" + +EXTRA_OECONF = " \ + --without-bzip2 \ + --without-ldap \ + --without-lua \ + --without-memcache \ + --with-pcre \ + --without-webdav-props \ + --without-webdav-locks \ + --without-openssl \ + --disable-static \ +" + +inherit autotools pkgconfig update-rc.d gettext systemd + +INITSCRIPT_NAME = "lighttpd" +INITSCRIPT_PARAMS = "defaults 70" + +SYSTEMD_SERVICE_${PN} = "lighttpd.service" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav + install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@BASE_BINDIR@,${base_bindir},g' \ + ${D}${systemd_unitdir}/system/lighttpd.service + #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data + ln -sf ${localstatedir}/log ${D}/www/logs + ln -sf ${localstatedir}/tmp ${D}/www/var +} + +FILES_${PN} += "${sysconfdir} /www" + +CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf" + +PACKAGES_DYNAMIC += "^lighttpd-module-.*" + +python populate_packages_prepend () { + lighttpd_libdir = d.expand('${libdir}') + do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') +} diff --git a/meta/recipes-extended/logrotate/logrotate/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 @@ +Act as the "mv" command when rotate log + +Act as the "mv" command when rotate log, first rename, if failed, then +read and write. + +Upstream-Status: Submitted + +Signed-off-by: Robert Yang +--- + logrotate.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 56 insertions(+), 9 deletions(-) + +diff --git a/logrotate.c b/logrotate.c +index 174a26b..b18b629 100644 +--- a/logrotate.c ++++ b/logrotate.c +@@ -906,6 +906,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) + return 0; + } + ++/* Act as the "mv" command, if rename failed, then read the old file and ++ * write to new file. The function which invokes the mvFile will use ++ * the strerror(errorno) to handle the error message, so we don't have ++ * to print the error message here */ ++ ++int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl) ++{ ++ struct stat sbprev; ++ int fd_old, fd_new, n; ++ char buf[BUFSIZ]; ++ ++ /* Do the rename first */ ++ if (!rename(oldName, newName)) ++ return 0; ++ ++ /* If the errno is EXDEV, then read old file, write newfile and ++ * remove the oldfile */ ++ if (errno == EXDEV) { ++ /* Open the old file to read */ ++ if ((fd_old = open(oldName, O_RDONLY)) < 0) ++ return 1; ++ ++ /* Create the file to write, keep the same attribute as the old file */ ++ if (stat(oldName, &sbprev)) ++ return 1; ++ else { ++ if ((fd_new = createOutputFile(newName, ++ O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 ) ++ return 1; ++ } ++ ++ /* Read and write */ ++ while ((n = read(fd_old, buf, BUFSIZ)) > 0) ++ if (write(fd_new, buf, n) != n) ++ return 1; ++ ++ if ((close(fd_old) < 0) || ++ removeLogFile(oldName, log) || ++ (close(fd_new) < 0)) ++ return 1; ++ ++ return 0; ++ } ++ ++ return 1; ++} ++ + int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, + struct logNames *rotNames) + { +@@ -1268,15 +1315,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, + } + + message(MESS_DEBUG, +- "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", ++ "moving %s to %s (rotatecount %d, logstart %d, i %d), \n", + oldName, newName, rotateCount, logStart, i); + +- if (!debug && rename(oldName, newName)) { ++ if (!debug && mvFile(oldName, newName, log, prev_acl)) { + if (errno == ENOENT) { + message(MESS_DEBUG, "old log %s does not exist\n", + oldName); + } else { +- message(MESS_ERROR, "error renaming %s to %s: %s\n", ++ message(MESS_ERROR, "error moving %s to %s: %s\n", + oldName, newName, strerror(errno)); + hasErrors = 1; + } +@@ -1408,11 +1455,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, + } + } + #endif /* WITH_ACL */ +- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], ++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], + rotNames->finalName); + if (!debug && !hasErrors && +- rename(log->files[logNum], rotNames->finalName)) { +- message(MESS_ERROR, "failed to rename %s to %s: %s\n", ++ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { ++ message(MESS_ERROR, "failed to move %s to %s: %s\n", + log->files[logNum], rotNames->finalName, + strerror(errno)); + hasErrors = 1; +@@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force) + return hasErrors; + } + +-static int writeState(char *stateFilename) ++static int writeState(struct logInfo *log, char *stateFilename) + { + struct logState *p; + FILE *f; +@@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename) + fclose(f); + + if (error == 0) { +- if (rename(tmpFilename, stateFilename)) { ++ if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { + unlink(tmpFilename); + error = 1; + message(MESS_ERROR, "error renaming temp state file %s\n", +@@ -2223,7 +2270,7 @@ int main(int argc, const char **argv) + rc |= rotateLogSet(log, force); + + if (!debug) +- rc |= writeState(stateFile); ++ rc |= writeState(log, stateFile); + + return (rc != 0); + } +-- +1.7.10.4 + 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 @@ +Disable the check for different filesystems + +The logrotate supports rotate log across different filesystems now, so +disable the check for different filesystems. + +Upstream-Status: Submitted + +Signed-off-by: Robert Yang +--- + config.c | 8 -------- + 1 files changed, 0 insertions(+), 8 deletions(-) + +diff --git a/config.c b/config.c +index a85d1df..24575b3 100644 +--- a/config.c ++++ b/config.c +@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) + dirName, strerror(errno)); + goto error; + } +- +- if (sb.st_dev != sb2.st_dev) { +- message(MESS_ERROR, +- "%s:%d olddir %s and log file %s " +- "are on different devices\n", configFile, +- lineNum, newlog->oldDir, newlog->files[i]); +- goto error; +- } + } + } + +-- +1.7.4.1 + diff --git a/meta/recipes-extended/logrotate/logrotate/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 @@ +Upstream-Status: Backport + +logrotate: fix for CVE-2011-1548 + +If a logfile is a symlink, it may be read when being compressed, being +copied (copy, copytruncate) or mailed. Secure data (eg. password files) +may be exposed. + +Portback nofollow.patch from: +http://logrotate.sourcearchive.com/downloads/3.8.1-5/logrotate_3.8.1-5.debian.tar.gz + +Signed-off-by: Wenzong Fan + +--- +--- a/logrotate.c 2012-09-06 13:25:08.000000000 +0800 ++++ b/logrotate.c 2012-09-06 13:35:57.000000000 +0800 +@@ -390,7 +390,7 @@ + compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2); + sprintf(compressedName, "%s%s", name, log->compress_ext); + +- if ((inFile = open(name, O_RDWR)) < 0) { ++ if ((inFile = open(name, O_RDWR | O_NOFOLLOW)) < 0) { + message(MESS_ERROR, "unable to open %s for compression\n", name); + return 1; + } +@@ -470,7 +470,7 @@ + char *mailArgv[] = { mailCommand, "-s", subject, address, NULL }; + int rc = 0; + +- if ((mailInput = open(logFile, O_RDONLY)) < 0) { ++ if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) { + message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile, + strerror(errno)); + return 1; +@@ -561,7 +561,7 @@ + message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog); + + if (!debug) { +- if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) { ++ if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) { + message(MESS_ERROR, "error opening %s: %s\n", currLog, + strerror(errno)); + 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 @@ +Update the manual + +Update the manual for rotating on different filesystems. + +Upstream-Status: Submitted + +Signed-off-by: Robert Yang +--- + logrotate.8 | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/logrotate.8 b/logrotate.8 +index 8b34167..5f15432 100644 +--- a/logrotate.8 ++++ b/logrotate.8 +@@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). + .TP + \fBolddir \fIdirectory\fR + Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR +-must be on the same physical device as the log file being rotated, +-and is assumed to be relative to the directory holding the log file +-unless an absolute path name is specified. When this option is used all +-old versions of the log end up in \fIdirectory\fR. This option may be ++is assumed to be relative to the directory holding the log file unless ++an absolute path name is specified. When this option is used all old ++versions of the log end up in \fIdirectory\fR. This option may be + overridden by the \fBnoolddir\fR option. + + .TP +-- +1.7.4.1 + 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..faa8e0264f --- /dev/null +++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb @@ -0,0 +1,56 @@ +SUMMARY = "Rotates, compresses, removes and mails system log files" +SECTION = "console/utils" +HOMEPAGE = "https://fedorahosted.org/logrotate/" +LICENSE = "GPLv2" + +DEPENDS="coreutils popt" + +LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" + +SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \ + file://act-as-mv-when-rotate.patch \ + file://disable-check-different-filesystems.patch \ + file://update-the-manual.patch \ + " + +SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213" +SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64" + +PACKAGECONFIG ?= "\ + ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ + ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ +" + +# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our +# optimization variables, so use it rather than EXTRA_CFLAGS. +EXTRA_OEMAKE = "\ + LFS= \ + OS_NAME='${OS_NAME}' \ + \ + 'CC=${CC}' \ + 'RPM_OPT_FLAGS=${CFLAGS}' \ + 'EXTRA_LDFLAGS=${LDFLAGS}' \ + \ + ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ + ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \ +" + +# OS_NAME in the makefile defaults to `uname -s`. The behavior for +# freebsd/netbsd is questionable, so leave it as Linux, which only sets +# INSTALL=install and BASEDIR=/usr. +OS_NAME = "Linux" + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.depend +} + +do_install(){ + oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir} + mkdir -p ${D}${sysconfdir}/logrotate.d + mkdir -p ${D}${sysconfdir}/cron.daily + mkdir -p ${D}${localstatedir}/lib + install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf + install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate + touch ${D}${localstatedir}/lib/logrotate.status +} diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions new file mode 100755 index 0000000000..7c1dce24cf --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/init-functions @@ -0,0 +1,44 @@ +#!/bin/sh + +# LSB initscript functions, as defined in the LSB Spec 1.1.0 +# +# Lawrence Lim - Tue, 26 June 2007 +# Updated to the latest LSB 3.1 spec +# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt + +start_daemon () { + /etc/core-lsb/lsb_start_daemon "$@" +} + +killproc () { + /etc/core-lsb/lsb_killproc "$@" +} + +pidofproc () { + /etc/core-lsb/lsb_pidofproc "$@" +} + +log_success_msg () { + /etc/core-lsb/lsb_log_message success "$@" +} + +log_failure_msg () { + /etc/core-lsb/lsb_log_message failure "$@" +} + +log_warning_msg () { + /etc/core-lsb/lsb_log_message warning "$@" +} + +# int log_begin_message (char *message) +log_begin_msg () { + if [ -z "$1" ]; then + return 1 + fi + echo " * $@" +} + + +log_end_msg () { + /etc/core-lsb/lsb_log_message end "$@" +} diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc new file mode 100755 index 0000000000..866c1a9c63 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_killproc @@ -0,0 +1,6 @@ +#!/bin/sh + +. /etc/init.d/functions + +LSB=LSB-1.1 killproc $* +exit $? diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message new file mode 100755 index 0000000000..10343b0819 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_log_message @@ -0,0 +1,27 @@ +#!/bin/sh + +. /etc/init.d/functions + +ACTION=$1 +shift + +case "$ACTION" in + success) + echo -n $* + success "$*" + echo + ;; + failure) + echo -n $* + failure "$*" + echo + ;; + warning) + echo -n $* + warning "$*" + echo + ;; + *) + ;; +esac +exit 0 diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc new file mode 100755 index 0000000000..6d1fd0f249 --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc @@ -0,0 +1,6 @@ +#!/bin/sh + +. /etc/init.d/functions + +pidofproc $* +exit $? diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon new file mode 100755 index 0000000000..de62c2344d --- /dev/null +++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon @@ -0,0 +1,45 @@ +#!/bin/sh + +. /etc/init.d/functions + +nice= +force= +pidfile= +user= +check= +RETVAL= +while [ "$1" != "${1##[-+]}" ]; do + case $1 in + -f) + force="--force" + shift + ;; + -n) + nice=$2 + shift 2 + ;; + -p) + pidfile="--pidfile $2" + shift 2 + ;; + -u) + user="--user $2" + shift 2 + ;; + -c) + check="--check $2" + shift 2 + ;; + *) + echo "Unknown Option $1" + echo "Options are:" + echo "-f" + echo "-p {pidfile}" + echo "-n [+/-nicelevel]" + echo "-u {user}" + echo "-c {base}" + exit 1;; + esac +done +LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $* +exit $? diff --git a/meta/recipes-extended/lsb/lsb_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 @@ +SUMMARY = "LSB support for OpenEmbedded" +SECTION = "console/utils" +HOMEPAGE = "http://prdownloads.sourceforge.net/lsb" +LICENSE = "GPLv2+" +PR = "r2" + +# lsb_release needs getopt +RDEPENDS_${PN} += "util-linux" + +LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \ + file://init-functions \ + file://lsb_killproc \ + file://lsb_log_message \ + file://lsb_pidofproc \ + file://lsb_start_daemon \ + " + +SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4" +SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172" +S = "${WORKDIR}/lsb-release-1.4" + +do_install(){ + oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D} + + # this 2 dirs are needed by package lsb-dist-checker + mkdir -p ${D}${sysconfdir}/opt + mkdir -p ${D}${localstatedir}/opt + + mkdir -p ${D}${base_bindir} + mkdir -p ${D}/${baselib} + mkdir -p ${D}${sysconfdir}/lsb-release.d + printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release + + if [ "${TARGET_ARCH}" = "i586" ];then + printf "core-4.1-ia32" >> ${D}${sysconfdir}/lsb-release + else + printf "core-4.1-${TARGET_ARCH}" >> ${D}${sysconfdir}/lsb-release + fi + echo "\"" >> ${D}${sysconfdir}/lsb-release + echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release + echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release + if [ -n "${DISTRO_CODENAME}" ]; then + echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release + fi + echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release + + if [ "${TARGET_ARCH}" = "i586" ];then + mkdir -p ${D}${sysconfdir}/lsb-release.d + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch + touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32 + touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32 + elif [ "${TARGET_ARCH}" = "x86_64" ];then + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64 + touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64 + fi + if [ "${TARGET_ARCH}" = "powerpc" ];then + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32 + touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32 + elif [ "${TARGET_ARCH}" = "powerpc64" ];then + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch + touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64 + touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64 + fi +} + +do_install_append(){ + install -d ${D}${sysconfdir}/core-lsb + install -d ${D}/${baselib}/lsb + for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon + do + install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb + done + install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb + + # creat links for LSB test + install -d ${D}/usr/lib/lsb + ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd + ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd + install -d ${D}/${libdir} + ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail + + if [ "${TARGET_ARCH}" = "x86_64" ];then + cd ${D} + if [ "${baselib}" != "lib64" ]; then + ln -sf ${baselib} lib64 + fi + cd ${D}/${baselib} + ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2 + ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + fi + if [ "${TARGET_ARCH}" = "i586" ];then + cd ${D}/${baselib} + ln -sf ld-linux.so.2 ld-lsb.so.2 + ln -sf ld-linux.so.2 ld-lsb.so.3 + fi + + if [ "${TARGET_ARCH}" = "powerpc64" ];then + cd ${D} + if [ "${baselib}" != "lib64" ]; then + ln -sf ${baselib} lib64 + fi + cd ${D}/${baselib} + ln -sf ld64.so.1 ld-lsb-ppc64.so.2 + ln -sf ld64.so.1 ld-lsb-ppc64.so.3 + fi + if [ "${TARGET_ARCH}" = "powerpc" ];then + cd ${D}/${baselib} + ln -sf ld.so.1 ld-lsb-ppc32.so.2 + ln -sf ld.so.1 ld-lsb-ppc32.so.3 + fi +} +FILES_${PN} += "/lib64 \ + /usr/lib/lsb \ + ${base_libdir}/lsb/* \ + ${libdir}/sendmail \ + " 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 @@ +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Xiaofeng Yan +Signed-off-by: Saul Wold + +Index: initscripts-9.43/rc.d/init.d/functions +=================================================================== +--- initscripts-9.43.orig/rc.d/init.d/functions ++++ initscripts-9.43/rc.d/init.d/functions +@@ -13,6 +13,7 @@ umask 022 + PATH="/sbin:/usr/sbin:/bin:/usr/bin" + export PATH + ++ + if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \ + ( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then + case "$0" in +@@ -54,7 +55,7 @@ systemctl_redirect () { + [ -z "${COLUMNS:-}" ] && COLUMNS=80 + + if [ -z "${CONSOLETYPE:-}" ]; then +- if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then ++ if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then + CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)" + else + CONSOLETYPE="serial" diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb new file mode 100644 index 0000000000..6ab52e3f17 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbinitscripts_9.55.bb @@ -0,0 +1,30 @@ +SUMMARY = "SysV init scripts which are only used in an LSB image" +SECTION = "base" +LICENSE = "GPLv2" +DEPENDS = "popt glib-2.0" + +LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6" + +S="${WORKDIR}/initscripts-${PV}" +SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-9.55.tar.bz2/0672f648a9ee8607a2df65835c54f5e5/initscripts-9.55.tar.bz2 \ + file://functions.patch \ + " + +SRC_URI[md5sum] = "0672f648a9ee8607a2df65835c54f5e5" +SRC_URI[sha256sum] = "546d4403a4efa3c4fa6de06a195013d4e64738799c2c779e56d900e7b232a9fa" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "functions" +ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" + +# Since we are only taking the patched version of functions, no need to +# configure or compile anything so do not execute these +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install(){ + install -d ${D}${sysconfdir}/init.d/ + install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions +} 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..6dd1fe88cf --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh @@ -0,0 +1,526 @@ +#!/bin/sh + +# Copyright (C) 2012 Wind River Systems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +WORK_DIR="/opt/lsb-test" + +if [ `id -u` -ne 0 ] +then + cat << EOF + In order to install and run LSB testsuite, you need administrator privileges. + You are currently running this script as an unprivileged user. + +EOF + exit 1 +fi + +ARCH=`uname -m` +if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ] +then + echo "Error: Unsupported architecture" + exit 1 +fi + +which rpm +if [ $? -ne 0 ] +then + echo "No rpm command found" + exit 1 +fi + +RET=0 + +cd ${WORK_DIR} || exit 1 +# Step 1: Download the LSB Packages +echo "" +echo "Download LSB packages..." +echo "" + +if [ ! -e ./packages_list ] +then + echo "Error: Could not find packages list" >&2 + exit 1 +fi + +. ./packages_list + +PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb" + +BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary" +RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime" +RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime" +APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}" +APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests" +SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests" + +if [ ! -d ${PACKAGES_DIR} ] +then + mkdir -p ${PACKAGES_DIR} +fi + +if [ ! -d ${BASE_PACKAGES_DIR} ] +then + mkdir -p ${BASE_PACKAGES_DIR} +fi + +if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ] +then + mkdir -p ${RUNTIME_BASE_PACKAGES_DIR} +fi + +if [ ! -d ${RUNTIME_PACKAGES_DIR} ] +then + mkdir -p ${RUNTIME_PACKAGES_DIR} +fi + +if [ ! -d ${APP_PACKAGES_DIR} ] +then + mkdir -p ${APP_PACKAGES_DIR} +fi + +if [ ! -d ${APP_TESTFILES_DIR} ] +then + mkdir -p ${APP_TESTFILES_DIR} +fi + +# Official download server list. You can replace them with your own server. +SERVER_IPADDR="140.211.169.28" +SERVER_NAME="ftp.linuxfoundation.org" + +if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then + echo "${SERVER_IPADDR} ${SERVER_NAME} ${SERVER_NAME}" >> /etc/hosts +fi + +#ping -c 5 ${SERVER_NAME} +#if [ $? -ne 0 ] +#then +# echo "The server: ${SERVER_NAME} is unreachable" +# exit 1 +#fi + +SERVER1="\ + http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary" +SERVER2="\ + http://${SERVER_NAME}/pub/lsb/test_suites/archive/${LSB_REL}/" +SERVER3="\ + http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime" +SERVER4="\ + http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}" +SERVER5="\ + http://${SERVER_NAME}/pub/lsb/app-battery/tests" + +# We using "curl" as a download tool, "wget" is an alternative. +CURL=`which curl` +WGET=`which wget` +if [ ! -z ${CURL} ] +then + DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o" +elif [ ! -z ${WGET} ] +then + DOWNLOAD_CMD="${WGET} -c -t 5 -O" +else + echo "Can not find a download tool, please install curl or wget." + exit 1 +fi + +cd ${BASE_PACKAGES_DIR} +for pkg in ${BASE_PACKAGES_LIST}; do + if [ ! -f ${pkg} ] + then + #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1 + ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} + if [ $? -eq 0 ] + then + mv -f ${pkg}".#part" ${pkg} + echo "Download ${pkg} successfully." + else + echo "Download ${pkg} failed." + RET=1 + fi + fi +done + +cd ${RUNTIME_BASE_PACKAGES_DIR} +for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do + if [ ! -f ${pkg} ] + then + #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1 + ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} + if [ $? -eq 0 ] + then + mv -f ${pkg}".#part" ${pkg} + echo "Download ${pkg} successfully." + else + echo "Download ${pkg} failed." + RET=1 + fi + fi +done + +cd ${RUNTIME_PACKAGES_DIR} +for pkg in ${RUNTIME_PACKAGES_LIST}; do + if [ ! -f ${pkg} ] + then + #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1 + ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} + if [ $? -eq 0 ] + then + mv -f ${pkg}".#part" ${pkg} + echo "Download ${pkg} successfully." + else + echo "Download ${pkg} failed." + RET=1 + fi + fi +done + +cd ${APP_PACKAGES_DIR} +for pkg in ${APP_PACKAGES_LIST}; do + if [ ! -f ${pkg} ] + then + #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1 + ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} + if [ $? -eq 0 ] + then + mv -f ${pkg}".#part" ${pkg} + echo "Download ${pkg} successfully." + else + echo "Download ${pkg} failed." + RET=1 + fi + fi +done + +cd ${APP_TESTFILES_DIR} +for pkg in ${APP_TESTFILES_LIST}; do + if [ ! -f ${pkg} ] + then + #${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1 + ${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} + if [ $? -eq 0 ] + then + mv -f ${pkg}".#part" ${pkg} + echo "Download ${pkg} successfully." + else + echo "Download ${pkg} failed." + RET=1 + fi + fi +done + +if [ ${RET} -ne 0 ] +then + echo "Download some packages failed. Please download them again." + exit 1 +fi + +# Step 2: Install the LSB Packages +echo "" +echo "Install LSB packages..." +echo "" + +# Kill lighttpd +ps aux | grep "lighttpd" | grep -v -q "grep" +if [ $? -eq 0 ] +then + killall lighttpd >/dev/null 2>&1 +fi + +# Start avahi-daemon +ps aux | grep "avahi-daemon" | grep -v -q "grep" +if [ $? -ne 0 ] +then + /etc/init.d/avahi-daemon start >/dev/null 2>&1 +fi + +LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl" +LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl" + +PLATFORM_FILE="/etc/rpm/platform" + +RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i" +RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i" + +# If the lsb has been started, stop it first. +if [ -x ${LSB_STOP_CMD} ] +then + ${LSB_STOP_CMD} +fi + +if [ ! -d /etc/rpm ] +then + mkdir -p /etc/rpm +fi + +if [ ! -f ${PLATFORM_FILE} ] +then + touch ${PLATFORM_FILE} +fi + +if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then + if [ ${ARCH} = i686 ];then + echo "i486-suse" >> ${PLATFORM_FILE} + echo "i486-noarch" >> ${PLATFORM_FILE} + echo "i486-pc" >> ${PLATFORM_FILE} + echo "noarch-suse" >> ${PLATFORM_FILE} + elif [ ${ARCH} = x86_64 ]; then + echo "i486-suse" >> ${PLATFORM_FILE} + echo "i486-noarch" >> ${PLATFORM_FILE} + echo "i486-pc" >> ${PLATFORM_FILE} + echo "i486-.*-linux.*" >> ${PLATFORM_FILE} + echo "noarch-suse" >> ${PLATFORM_FILE} + echo "${ARCH}-suse" >> ${PLATFORM_FILE} + echo "${ARCH}-noarch" >> ${PLATFORM_FILE} + echo "${ARCH}-pc" >> ${PLATFORM_FILE} + else + echo "${ARCH}-suse" >> ${PLATFORM_FILE} + echo "${ARCH}-noarch" >> ${PLATFORM_FILE} + echo "${ARCH}-pc" >> ${PLATFORM_FILE} + echo "noarch-suse" >> ${PLATFORM_FILE} + fi +fi + +if [ -d ${BASE_PACKAGES_DIR} ] +then + cd ${BASE_PACKAGES_DIR} + for pkg in ${BASE_PACKAGES_LIST} + do + rpm --quiet -q ${pkg%\.*} + if [ $? -ne 0 ]; then + $RPM_INSTALL_CMD ${pkg} + fi + done +fi + +if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ] +then + cd ${RUNTIME_BASE_PACKAGES_DIR} + for pkg in ${RUNTIME_BASE_PACKAGES_LIST} + do + rpm --quiet -q ${pkg%\.*} + if [ $? -ne 0 ]; then + $RPM_INSTALL_CMD ${pkg} + fi + done +fi + +if [ -d ${RUNTIME_PACKAGES_DIR} ] +then + cd ${RUNTIME_PACKAGES_DIR} + for pkg in ${RUNTIME_PACKAGES_LIST} + do + rpm --quiet -q ${pkg%\.*} + if [ $? -ne 0 ]; then + $RPM_INSTALL_CMD ${pkg} + fi + done +fi + +if [ -d ${APP_PACKAGES_DIR} ] +then + cd ${APP_PACKAGES_DIR} + for pkg in ${APP_PACKAGES_LIST} + do + echo "${pkg}" | grep -q "apache\|xpdf" + if [ $? -eq 0 ] + then + rpm --quiet -q ${pkg%\.*} + if [ $? -ne 0 ]; then + $RPM_INSTALL_CMD_NOSCRIPTS ${pkg} + fi + else + rpm --quiet -q ${pkg%\.*} + if [ $? -ne 0 ]; then + $RPM_INSTALL_CMD ${pkg} + fi + fi + done +fi + +if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ] +then + mkdir -p ${SNAPSHOTS_TESTFILES_DIR} +fi + +if [ -d ${APP_TESTFILES_DIR} ] +then + cd ${APP_TESTFILES_DIR} + for pkg in ${APP_TESTFILES_LIST} + do + cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR} + done +fi + +cd ${WORK_DIR} + +# Step 3: Set environment +echo "" +echo "Set environment..." +echo "" + +check () +{ + if [ $? -eq 0 ] + then + echo "PASS" + else + echo "FAIL" + exit 1 + fi +} + +echo "" +echo "---------------------------------" +echo "Create the Dirnames on target" + +if [ ! -d /etc/rpm/sysinfo ] +then + mkdir -p /etc/rpm/sysinfo +fi + +cat > /etc/rpm/sysinfo/Dirnames << EOF +/etc/opt/lsb +/home/tet/LSB.tools +/opt/lsb-tet3-lite/lib/ksh +/opt/lsb-tet3-lite/lib/perl +/opt/lsb-tet3-lite/lib/posix_sh +/opt/lsb-tet3-lite/lib/tet3 +/opt/lsb-tet3-lite/lib/xpg3sh +/opt/lsb/appbat/lib/python2.4/site-packages/qm +/opt/lsb/appbat/lib/python2.4/site-packages/qm/external +/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate +/opt/lsb/appbat/lib/python2.4/site-packages/qm/test +/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes +/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web +/opt/lsb/test/doc +/opt/lsb/test/lib +/opt/lsb/test/qm/diagnostics +/opt/lsb/test/qm/doc +/opt/lsb/test/qm/doc/test/html +/opt/lsb/test/qm/doc/test/print +/opt/lsb/test/qm/dtml +/opt/lsb/test/qm/dtml/test +/opt/lsb/test/qm/messages/test +/opt/lsb/test/qm/tutorial/test/tdb +/opt/lsb/test/qm/tutorial/test/tdb/QMTest +/opt/lsb/test/qm/web +/opt/lsb/test/qm/web/images +/opt/lsb/test/qm/web/stylesheets +/opt/lsb/test/qm/xml +/opt/lsb/test/share +/usr/share/doc/lsb-runtime-test +/var/opt/lsb +/opt/lsb/test/desktop +/opt/lsb/test/desktop/fontconfig +/opt/lsb/test/desktop/freetype +/opt/lsb/test/desktop/gtkvts +/opt/lsb/test/desktop/libpng +/opt/lsb/test/desktop/qt3 +/opt/lsb/test/desktop/xft +/opt/lsb/test/desktop/xml +/opt/lsb/test/desktop/xrender + + +EOF + +if [ -f /etc/rpm/sysinfo/Dirnames ] +then + echo "Success to creat Dirnames file" +else + echo "Fail to creat Dirnames file" +fi + +[ -x /sbin/ldconfig ] && { +echo "" +echo "---------------------------------" +echo "Update cache" +/sbin/ldconfig +check; +} + +# Check loop device +if [ ! -b /dev/loop0 ] +then + insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko + if [ $? != 0 ];then + echo "Insmod loop.ko failed." + fi +fi + +# Resolve localhost +LOCALHOST=`hostname` +if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then + echo "127.0.0.1 $LOCALHOST" >> /etc/hosts +fi + +# Workaround to add part of locales for LSB test +localedef -i de_DE -f ISO-8859-1 de_DE +localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15 +localedef -i de_DE -f UTF-8 de_DE.UTF-8 +localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro +localedef -i en_HK -f ISO-8859-1 en_HK +localedef -i en_PH -f ISO-8859-1 en_PH +localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 +localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 +localedef -i en_US -f ISO-8859-1 en_US +localedef -i en_US -f UTF-8 en_US.UTF-8 +localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1 +localedef -i es_MX -f ISO-8859-1 es_MX +localedef -i fr_FR -f ISO-8859-1 fr_FR +localedef -i it_IT -f ISO-8859-1 it_IT +localedef -i ja_JP -f EUC-JP ja_JP.eucjp +localedef -i se_NO -f UTF-8 se_NO.UTF-8 +localedef -i ta_IN -f UTF-8 ta_IN +localedef -i es_ES -f ISO-8859-1 es_ES +localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro +localedef -i is_IS -f UTF-8 is_IS.UTF-8 +localedef -i zh_TW -f BIG5 zh_TW.BIG5 +localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 + +echo "" +echo "Installation done!" +echo "" + +# Step 4: Start LSB test +if [ -x ${LSB_START_CMD} ] +then + ${LSB_START_CMD} +fi + +echo "---------------------------------" +echo "Run all the certification version of LSB Tests" +echo "---------------------------------" + +LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl" +SESSION="${WORK_DIR}/session" +if [ ! -e ${SESSION} ] +then + echo "Error: Could not find session file." + echo "You must run LSB test from webbrower." + exit 1 +fi + +if [ -x ${LSB_DIST_CHECKER} ] +then + ${LSB_DIST_CHECKER} -v2 -f ${SESSION} + check +fi + +echo "" +echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/" +echo "" + diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list new file mode 100644 index 0000000000..fa61c87516 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/packages_list @@ -0,0 +1,51 @@ +LSB_RELEASE="released-4.1.0" +LSB_REL="4.1.0" +LSB_ARCH="lsbarch" + +BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm" + +RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-4.1.0.12-1.targetarch.rpm \ + lsb-tet3-lite-3.7-23.lsb4.targetarch.rpm \ + lsb-tet3-lite-devel-3.7-23.lsb4.targetarch.rpm \ + lsb-xvfb-1.2.0-21.targetarch.rpm \ + " + +RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \ + lsb-libchk-4.1.4-5.targetarch.rpm \ + lsb-qm-2.2-12.lsb4.targetarch.rpm \ + lsb-task-dist-testkit-4.1.9-1.noarch.rpm \ + lsb-test-core-4.1.15-1.targetarch.rpm \ + lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \ + lsb-test-desktop-4.1.9-1.targetarch.rpm \ + lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \ + lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \ + lsb-test-olver-core-4.1.4-1.targetarch.rpm \ + lsb-test-perl-4.1.8-1.noarch.rpm \ + lsb-test-printing-4.1.2-1.targetarch.rpm \ + lsb-test-python-4.1.5-1.targetarch.rpm \ + lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \ + lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \ + lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \ + lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \ + lsb-test-core-t2c-4.1.2-3.targetarch.rpm \ + lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \ + " + +APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \ + lsb-apache-2.2.14-8.lsb4.targetarch.rpm \ + lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \ + lsb-expect-5.43.0-13.lsb4.targetarch.rpm \ + lsb-groff-1.20.1-7.lsb4.targetarch.rpm \ + lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \ + lsb-xpdf-1.01-14.lsb4.targetarch.rpm \ + lsb-samba-3.4.3-9.lsb4.targetarch.rpm \ + lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \ + " + +APP_TESTFILES_LIST="expect-tests.tar \ + tcl-tests.tar \ + raptor-tests.tar \ + test1.pdf \ + test2.pdf \ + " + diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session new file mode 100644 index 0000000000..85ca2efe92 --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest/session @@ -0,0 +1,194 @@ +[GENERAL] +VERBOSE_LEVEL: 1 +ARCHITECTURE: targetarch +USE_INTERNET: 1 +STD_VERSION: LSB 4.1 +STD_PROFILE: no +[cmdchk] +RUN: 1 +VERSION: local|* + +[libchk] +RUN: 1 +VERSION: local|* + +[alsa-t2c] +RUN: 1 +VERSION: local|* + +[alsa-t2c|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results + +[core] +RUN: 1 +VERSION: local|* + +[core|local|*] +AUTOREPLY_PROVIDES_BASH: n +AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets +AUTOREPLY_PERSON: Automated +AUTOREPLY_KERNEL_NAME: vmlinuz +AUTOREPLY_INSTALL_LSBPAM_CONF: y +AUTOREPLY_PROVIDES_C_SHELL: n +AUTOREPLY_ORGANISATION: N/A +AUTOREPLY_SET_PASS_MIN_DAYS: y +AUTOREPLY_PROVIDES_SYSV_INIT: +AUTOREPLY_ISNTALL_DEVS: y +AUTOREPLY_SUPPORTS_FILE_CMD: y +AUTOREPLY_TEST_SYSTEM: Distribution Checker +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets +AUTOREPLY_SUPPORTS_NLS: n +AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n +AUTOREPLY_PATH_TO_RC.D: +AUTOREPLY_ALLOWS_MAKEDEV: n +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results + +[core-t2c] +RUN: 1 +VERSION: local|* + +[core-t2c|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results + +[cpp-t2c] +RUN: 1 +VERSION: local|* + +[cpp-t2c|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results + +[desktop] +RUN: 1 +VERSION: local|* + +[desktop|local|*] +AUTOREPLY_DESKTOP_ENVIRONMENT: [default] +AUTOREPLY_PERSON: Automated +AUTOREPLY_X_CLIENT_HOSTNAME: +AUTOREPLY_TEST_SYSTEM: Distribution Checker +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop +AUTOREPLY_X11_FONT_PATH: [default] +AUTOREPLY_SHOW_SUMMARY_REPORT: +AUTOREPLY_ORGANISATION: N/A +AUTOREPLY_XVFB_DISPLAY: [default] + +[desktop-t2c] +RUN: 1 +VERSION: local|* + +[desktop-t2c|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results + +[libstdcpp] +RUN: 1 +VERSION: local|* + +[libstdcpp|local|*] +AUTOREPLY_TEST_SYSTEM: Distribution Checker +AUTOREPLY_PERSON: Automated +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0 +AUTOREPLY_ORGANISATION: N/A +AUTOREPLY_GNU_TRIPLET: + +[olver] +RUN: 1 +VERSION: local|* + +[olver|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core +AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core + +[perl] +RUN: 1 +VERSION: local|* + +[perl|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results + +[printing] +RUN: 1 +VERSION: local|* + +[printing|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results + +[python] +RUN: 1 +VERSION: local|* + +[python|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results + +[qt3-azov] +RUN: 1 +VERSION: local|* + +[qt3-azov|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov +AUTOREPLY_X11_FONT_PATH: [default] +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results + +[qt4-azov] +RUN: 1 +VERSION: local|* + +[qt4-azov|local|*] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov +AUTOREPLY_X11_FONT_PATH: [default] +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results + +[xml2-azov] +RUN: 1 +VERSION: local|* + +[xts5] +RUN: 1 +VERSION: local|* + +[xts5|local|*] +AUTOREPLY_XT_FONTPATH_GOOD: [default] +AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5 +AUTOREPLY_XVFB_DISPLAY: [default] +AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results +AUTOREPLY_XT_FONTPATH: [default] +AUTOREPLY_X_CLIENT_HOSTNAME: + +[apache] +RUN: 1 +VERSION: local|* + +[expect] +RUN: 1 +VERSION: local|* + +[groff] +RUN: 1 +VERSION: local|* + +[raptor] +RUN: 1 +VERSION: local|* + +[rsync] +RUN: 1 +VERSION: local|* + +[samba] +RUN: 1 +VERSION: local|* + +[tcl] +RUN: 1 +VERSION: local|* + +[xpdf] +RUN: 1 +VERSION: local|* + diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb new file mode 100644 index 0000000000..f61251e2aa --- /dev/null +++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb @@ -0,0 +1,49 @@ +SUMMARY = "Automates Linux Standard Base (LSB) tests" +SECTION = "console/utils" +LICENSE = "GPLv2" +PR = "r3" + +LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0" + +SRC_URI = "file://LSB_Test.sh \ + file://packages_list \ + file://session \ + " +RDEPENDS_${PN} = "rpm" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/LSB_Test.sh ${D}${bindir} + install -d ${D}/opt/lsb-test + install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list + install -m 0644 ${S}/session ${D}/opt/lsb-test/session + if [ "${TARGET_ARCH}" = "i586" ];then + sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list + sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session + fi + if [ "${TARGET_ARCH}" = "x86_64" ];then + sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list + sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session + fi + if [ "${TARGET_ARCH}" = "powerpc" ];then + sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list + sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session + fi + + # For a ppc64 target. the default userspace is 32b. + # Therefore, only change the lsbarch and targetarch + # in the package_list when MLIB=lib64 is being used. + # Otherwise, by default, the ppc32 LSB packages + # will be downloaded by LSB_Test.sh + if [ "${TARGET_ARCH}" = "powerpc64" ];then + if [ "${PN}" != "${BPN}" ];then + sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list + sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session + fi + fi +} + +FILES_${PN} += "/opt/lsb-test/* \ + " 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..e7a1eb2129 --- /dev/null +++ b/meta/recipes-extended/lsof/lsof_4.87.bb @@ -0,0 +1,53 @@ +SUMMARY = "LiSt Open Files tool" +DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ +Its name stands for LiSt Open Files, and it does just that." +SECTION = "devel" +LICENSE = "BSD" + +SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2" + +SRC_URI[md5sum] = "80e2a76d0e05826db910ec88e631296c" +SRC_URI[sha256sum] = "dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c" + +LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar" +S = "${WORKDIR}/lsof_${PV}_src" + +LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" + +python do_unpack () { + bb.build.exec_func('base_do_unpack', d) + src_uri = d.getVar('SRC_URI') + d.setVar('SRC_URI', '${LOCALSRC}') + bb.build.exec_func('base_do_unpack', d) + d.setVar('SRC_URI', src_uri) +} + +export LSOF_OS = "${TARGET_OS}" +LSOF_OS_libc-uclibc = "linux" +LSOF_OS_libc-glibc = "linux" +export LSOF_INCLUDE = "${STAGING_INCDIR}" + +do_configure () { + export LSOF_AR="${AR} cr" + export LSOF_RANLIB="${RANLIB}" + if [ "x${GLIBCVERSION}" != "x" ];then + LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` + LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" + export LINUX_CLIB + fi + yes | ./Configure ${LSOF_OS} +} + +export I = "${STAGING_INCDIR}" +export L = "${STAGING_INCDIR}" +export EXTRA_OEMAKE = "" + +do_compile () { + oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' +} + +do_install () { + install -d ${D}${sbindir} ${D}${mandir}/man8 + install -m 4755 lsof ${D}${sbindir}/lsof + install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8 +} diff --git a/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch new file mode 100644 index 0000000000..8fb11af580 --- /dev/null +++ b/meta/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch @@ -0,0 +1,23 @@ +Fix test_proc_kill hanging + +Sometimes the signal is delivered to memcg_process before the framework took +into consideration its pid entered in the tasks. Fixed by delaying the signal +send command. + +Signed-off-by: George Nita +Upstream-Status: Not Submitted + +diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +index ffbe006..e81bf74 100755 +--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh ++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh +@@ -220,8 +220,8 @@ test_proc_kill() + + $TEST_PATH/memcg_process $2 -s $3 & + pid=$! +- sleep 1 + echo $pid > tasks ++ sleep 1 + + kill -s USR1 $pid 2> /dev/null + sleep 1 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 @@ +Add periodic output for long time test. + +Signed-off-by: Tudor Florea +Upstream-Status: Pending + +diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100 ++++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100 +@@ -37,7 +37,8 @@ + exit 0 + fi + +-RUN_TIME=$(( 60 * 60 )) ++ONE_MINUTE=60 ++RUN_TIME=60 + + cleanup() + { +@@ -81,7 +82,11 @@ + eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null + done + +- sleep $4 ++ for i in $(seq 0 $RUN_TIME-1) ++ do ++ eval echo "Started $i min ago. Still alive... " ++ sleep $ONE_MINUTE ++ done + + for i in $(seq 0 $(($1-1))) + do diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch new file mode 100644 index 0000000000..fa20b085f7 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch @@ -0,0 +1,48 @@ +From b601a8d1b39075a5339195fc0a4038f71ec3b49e Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" +Date: Wed, 27 Aug 2014 16:23:56 -0500 +Subject: [LTP][PATCH] Realtime tests: Fix bad priority inheritance conditionals + +testcases/realtime/lib/librttest.c and +testcases/realtime/stress/pi-tests/testpi-3.c +both referenced a non-existent autoconf configuration setting variable. +Replaced the invalid variable name with the variable actually created +by autoconf. + +Upstream-Status: Submitted + +Signed-off-by: Gary S. Robertson +--- + testcases/realtime/lib/librttest.c | 2 +- + testcases/realtime/stress/pi-tests/testpi-3.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c +index c175148..3679058 100644 +--- a/testcases/realtime/lib/librttest.c ++++ b/testcases/realtime/lib/librttest.c +@@ -586,7 +586,7 @@ void *busy_work_us(int us) + + void init_pi_mutex(pthread_mutex_t * m) + { +-#if HAVE_DECL_PTHREAD_PRIO_INHERIT ++#if HAS_PRIORITY_INHERIT + pthread_mutexattr_t attr; + int ret; + int protocol; +diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c +index 30f38f6..e483945 100644 +--- a/testcases/realtime/stress/pi-tests/testpi-3.c ++++ b/testcases/realtime/stress/pi-tests/testpi-3.c +@@ -365,7 +365,7 @@ int main(int argc, char *argv[]) + + printf("Start %s\n", argv[0]); + +-#if HAVE_DECL_PTHREAD_PRIO_INHERIT ++#if HAS_PRIORITY_INHERIT + if (!nopi) { + pthread_mutexattr_t mutexattr; + int protocol; +-- +1.7.9.5 + diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch new file mode 100644 index 0000000000..ccdd4d0bb3 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch @@ -0,0 +1,62 @@ +From 663a14423baea0e05ba79d90d2497dde5e4594bd Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" +Date: Thu, 11 Sep 2014 13:02:47 -0500 +Subject: [LTP][PATCH] Realtime tests: Fix robust mutex conditionals + +sbrk_mutex, testpi-5, and testpi-6 realtime tests in subdir +testcases/realtime/func/pi-tests used compile time config variables +which were not generated by autoconf in order to configure tests +for robust mutexes. Changed these conditionals to use the config +variables actually generated in the autoconf process. + +Upstream-Status: Submitted + +Signed-off-by: Gary S. Robertson +--- + testcases/realtime/func/pi-tests/sbrk_mutex.c | 2 +- + testcases/realtime/func/pi-tests/testpi-5.c | 2 +- + testcases/realtime/func/pi-tests/testpi-6.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c +index 684021f..5c325b4 100644 +--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c ++++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c +@@ -45,7 +45,7 @@ + #include + #include "librttest.h" + +-#if defined(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS) && defined(PTHREAD_MUTEX_ROBUST_NP) ++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS + + #define NUM_MUTEXES 5000 + #define NUM_THREADS 50 +diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c +index a1d93cc..70f02fd 100644 +--- a/testcases/realtime/func/pi-tests/testpi-5.c ++++ b/testcases/realtime/func/pi-tests/testpi-5.c +@@ -69,7 +69,7 @@ int do_test(int argc, char **argv) + pthread_mutexattr_t mutexattr; + int retc, protocol; + +-#if HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS ++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS + + if (pthread_mutexattr_init(&mutexattr) != 0) + printf("Failed to init mutexattr\n"); +diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c +index b3c3e4a..f715eee 100644 +--- a/testcases/realtime/func/pi-tests/testpi-6.c ++++ b/testcases/realtime/func/pi-tests/testpi-6.c +@@ -41,7 +41,7 @@ + #include + #include + +-#if defined(PTHREAD_MUTEX_ROBUST_NP) ++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS + pthread_mutex_t child_mutex; + + void *child_thread(void *arg) +-- +1.7.9.5 + 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 @@ +From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 7 Dec 2013 18:24:32 +0100 +Subject: [PATCH] Rename runtests_noltp.sh script so have unique name + +* they are installed in the same target path + /opt/ltp/testcases/bin/runtests_noltp.sh + and overwrite each other in non-deterministic way + when multiple processes are used in "make install" + + ./temp/log.do_install:install -m 00775 + "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh" + "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" + ./temp/log.do_install:install -m 00775 + "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh" + "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh" + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa +--- + .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++ + .../kernel/containers/sysvipc/runtests_noltp.sh | 31 ---------------- + .../kernel/containers/utsname/runtests_noltp.sh | 41 ---------------------- + .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++ + 4 files changed, 72 insertions(+), 72 deletions(-) + create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh + delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh + delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh + create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh + +diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh +new file mode 100644 +index 0000000..84f398f +--- /dev/null ++++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh +@@ -0,0 +1,31 @@ ++#!/bin/sh ++################################################################################ ++## ## ++## Copyright (c) International Business Machines Corp., 2007 ## ++## ## ++## This program is free software; you can redistribute it and#or modify ## ++## it under the terms of the GNU General Public License as published by ## ++## the Free Software Foundation; either version 2 of the License, or ## ++## (at your option) any later version. ## ++## ## ++## This program is distributed in the hope that it will be useful, but ## ++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## ++## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## ++## for more details. ## ++## ## ++## You should have received a copy of the GNU General Public License ## ++## along with this program; if not, write to the Free Software ## ++## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## ++## ## ++################################################################################ ++ ++exit_code=0 ++echo "sysvipc tests" ++for type in none clone unshare; do ++ echo "**sysvipc $type" ++ ./shmnstest_noltp $type ++ if [ $? -ne 0 ]; then ++ exit_code=$? ++ fi ++done ++exit $exit_code +diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh +deleted file mode 100644 +index 84f398f..0000000 +--- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh ++++ /dev/null +@@ -1,31 +0,0 @@ +-#!/bin/sh +-################################################################################ +-## ## +-## Copyright (c) International Business Machines Corp., 2007 ## +-## ## +-## This program is free software; you can redistribute it and#or modify ## +-## it under the terms of the GNU General Public License as published by ## +-## the Free Software Foundation; either version 2 of the License, or ## +-## (at your option) any later version. ## +-## ## +-## This program is distributed in the hope that it will be useful, but ## +-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## +-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## +-## for more details. ## +-## ## +-## You should have received a copy of the GNU General Public License ## +-## along with this program; if not, write to the Free Software ## +-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## +-## ## +-################################################################################ +- +-exit_code=0 +-echo "sysvipc tests" +-for type in none clone unshare; do +- echo "**sysvipc $type" +- ./shmnstest_noltp $type +- if [ $? -ne 0 ]; then +- exit_code=$? +- fi +-done +-exit $exit_code +diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh +deleted file mode 100755 +index 43cb7e2..0000000 +--- a/testcases/kernel/containers/utsname/runtests_noltp.sh ++++ /dev/null +@@ -1,41 +0,0 @@ +-#!/bin/sh +-################################################################################ +-## ## +-## Copyright (c) International Business Machines Corp., 2007 ## +-## ## +-## This program is free software; you can redistribute it and#or modify ## +-## it under the terms of the GNU General Public License as published by ## +-## the Free Software Foundation; either version 2 of the License, or ## +-## (at your option) any later version. ## +-## ## +-## This program is distributed in the hope that it will be useful, but ## +-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## +-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## +-## for more details. ## +-## ## +-## You should have received a copy of the GNU General Public License ## +-## along with this program; if not, write to the Free Software ## +-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## +-## ## +-################################################################################ +- +-oldhostname=`hostname` +-exit_code=0 +-echo "unshare tests" +-for i in `seq 1 5`; do +- echo "test $i (unshare)" +- ./utstest_noltp unshare $i +- if [ $? -ne 0 ]; then +- exit_code=$? +- fi +-done +-echo "clone tests" +-for i in `seq 1 5`; do +- echo "test $i (clone)" +- ./utstest_noltp clone $i +- if [ $? -ne 0 ]; then +- exit_code=$? +- fi +-done +-hostname "$oldhostname" +-exit $exit_code +diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh +new file mode 100755 +index 0000000..43cb7e2 +--- /dev/null ++++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh +@@ -0,0 +1,41 @@ ++#!/bin/sh ++################################################################################ ++## ## ++## Copyright (c) International Business Machines Corp., 2007 ## ++## ## ++## This program is free software; you can redistribute it and#or modify ## ++## it under the terms of the GNU General Public License as published by ## ++## the Free Software Foundation; either version 2 of the License, or ## ++## (at your option) any later version. ## ++## ## ++## This program is distributed in the hope that it will be useful, but ## ++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## ++## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## ++## for more details. ## ++## ## ++## You should have received a copy of the GNU General Public License ## ++## along with this program; if not, write to the Free Software ## ++## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## ++## ## ++################################################################################ ++ ++oldhostname=`hostname` ++exit_code=0 ++echo "unshare tests" ++for i in `seq 1 5`; do ++ echo "test $i (unshare)" ++ ./utstest_noltp unshare $i ++ if [ $? -ne 0 ]; then ++ exit_code=$? ++ fi ++done ++echo "clone tests" ++for i in `seq 1 5`; do ++ echo "test $i (clone)" ++ ./utstest_noltp clone $i ++ if [ $? -ne 0 ]; then ++ exit_code=$? ++ fi ++done ++hostname "$oldhostname" ++exit $exit_code +-- +1.8.4.3 + diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch new file mode 100644 index 0000000000..064f00ae3d --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch @@ -0,0 +1,39 @@ +[PATCH] add knob to control whether numa support should be checked + +Upstream-Status: Pending + +otherwise the random dependency will be generated + +Signed-off-by: Roy.Li +--- + configure.ac | 10 +- +diff --git a/configure.ac b/configure.ac +index 9f397e7..1357256 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -142,6 +142,12 @@ else + AC_SUBST([WITH_REALTIME_TESTSUITE],["no"]) + fi + ++AC_ARG_WITH([numa], ++ AC_HELP_STRING([--without-numa], ++ [without the numa support]), ++ [],[with_numa=yes], ++) ++ + AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) + + # END testsuites knobs +@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL + LTP_CHECK_SYSCALL_EVENTFD + LTP_CHECK_SYSCALL_KEYCTL + LTP_CHECK_SYSCALL_MODIFY_LDT ++if test "x$with_numa" = xyes; then + LTP_CHECK_SYSCALL_NUMA ++fi + LTP_CHECK_SYSCALL_QUOTACTL + LTP_CHECK_SYSCALL_SIGNALFD + LTP_CHECK_SYSCALL_UNSHARE +-- +1.9.1 + diff --git a/meta/recipes-extended/ltp/ltp/automake-foreign.patch b/meta/recipes-extended/ltp/ltp/automake-foreign.patch new file mode 100644 index 0000000000..c3dd891395 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/automake-foreign.patch @@ -0,0 +1,20 @@ +Use foreign strictness to avoid automake errors. + +Upstream-Status: Submitted (https://github.com/linux-test-project/ltp/issues/16) +Signed-off-by: Ross Burton + +diff --git a/configure.ac b/configure.ac +index 9f397e7..fc57957 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4 +4 @@ +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign]) +--- a/utils/ffsb-6.0-rc2/configure.in ++++ b/utils/ffsb-6.0-rc2/configure.in +@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script. +-AC_INIT(main.c) +-AM_INIT_AUTOMAKE(ffsb, 6.0-RC2) ++AC_INIT([ffsb], [6.0-RC2]) ++AC_CONFIG_SRCDIR([main.c]) ++AM_INIT_AUTOMAKE([foreign]) 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..20fd4c3691 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch @@ -0,0 +1,31 @@ +From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001 +From: Chong Lu +Date: Tue, 11 Mar 2014 14:47:22 +0800 +Subject: [PATCH] ltp: Don't link against libfl + +We have already defined yywrap function in scan.l file. After this, we no longer need to +link against libfl and so no longer get errors about undefined references to yylex. + +Upstream-Status: Pending + +Signed-off-by: Chong Lu +--- + pan/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pan/Makefile b/pan/Makefile +index 4cc6466..a4b575b 100644 +--- a/pan/Makefile ++++ b/pan/Makefile +@@ -31,7 +31,7 @@ CPPFLAGS += -Wno-error + + CPPFLAGS += -I$(abs_srcdir) + +-LDLIBS += -lm $(LEXLIB) ++LDLIBS += -lm + + LFLAGS += -l + +-- +1.7.9.5 + diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch new file mode 100644 index 0000000000..4836010bdf --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch @@ -0,0 +1,61 @@ +[PATCH] make setregid02 work + +Upstream-Status: Inappropriate [configuration] + +there is no "nobody" group in oe-core, the user "nobody" belongs to +"nogroup" group, so replace nobody with nogroup to make the test pass + +Signed-off-by: Roy.Li +--- + testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c +index 8058627..866bee4 100644 +--- a/testcases/kernel/syscalls/setregid/setregid02.c ++++ b/testcases/kernel/syscalls/setregid/setregid02.c +@@ -41,7 +41,7 @@ static gid_t neg_one = -1; + + static struct passwd *ltpuser; + +-static struct group nobody, root, bin; ++static struct group nogroup, root, bin; + + /* + * The following structure contains all test data. Each structure in the array +@@ -57,17 +57,17 @@ struct test_data_t { + char *test_msg; + } test_data[] = { + { +- &neg_one, &root.gr_gid, EPERM, &nobody, &nobody, ++ &neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup, + "After setregid(-1, root),"}, { +- &neg_one, &bin.gr_gid, EPERM, &nobody, &nobody, ++ &neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup, + "After setregid(-1, bin)"}, { +- &root.gr_gid, &neg_one, EPERM, &nobody, &nobody, ++ &root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, + "After setregid(root,-1),"}, { +- &bin.gr_gid, &neg_one, EPERM, &nobody, &nobody, ++ &bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup, + "After setregid(bin, -1),"}, { +- &root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody, ++ &root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup, + "After setregid(root, bin)"}, { +- &bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody, ++ &bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup, + "After setregid(bin, root),"} + }; + +@@ -165,7 +165,7 @@ static void setup(void) + } while (0) + + GET_GID(root); +- GET_GID(nobody); ++ GET_GID(nogroup); + GET_GID(bin); + + TEST_PAUSE; +-- +1.9.1 + diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb new file mode 100644 index 0000000000..0632f11ad8 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp_20140422.bb @@ -0,0 +1,93 @@ +SUMMARY = "Linux Test Project" +DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." +HOMEPAGE = "http://ltp.sourceforge.net" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ + file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \ + file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ + file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \ + file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \ + file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \ +" + +DEPENDS = "attr libaio libcap acl openssl zip-native" +SRCREV = "f4c3bfe1eab51eb72caeb0f3336d2790c9a8bd1b" + +SRC_URI = "git://github.com/linux-test-project/ltp.git \ + file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \ + file://periodic_output.patch \ + file://ltp-Do-not-link-against-libfl.patch \ + file://automake-foreign.patch \ + file://make-setregid02-work.patch \ + file://add-knob-for-numa.patch \ + file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \ + file://0001-Realtime-tests-Fix-robust-mutex-conditionals.patch \ + file://fix-test_proc_kill-hang.patch \ +" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +TARGET_CC_ARCH += "${LDFLAGS}" + +export prefix = "/opt/ltp" +export exec_prefix = "/opt/ltp" + +PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," +EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" +EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite " + +# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call. +# we explicitly force regeneration of that directory and pass configure options. +do_configure_append() { + (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS}) +} + +# The makefiles make excessive use of make -C and several include testcases.mk +# which triggers a build of the syscall header. To reproduce, build ltp, +# then delete the header, then "make -j XX" and watch regen.sh run multiple +# times. Its easier to generate this once here instead. +do_compile_prepend () { + ( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h ) +} + +do_install(){ + install -d ${D}/opt/ltp/ + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install + + # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual + cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases + + # We need to remove all scripts which depend on /usr/bin/expect, since expect is not supported in oe-core + # We will add expect for enhancement in future + find ${D} -type f -print | xargs grep "\!.*\/usr\/bin\/expect" | awk -F":" '{print $1}' | xargs rm -f +} + +RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk" + +FILES_${PN}-dbg += "\ + /opt/ltp/runtest/.debug \ + /opt/ltp/testcases/bin/.debug \ + /opt/ltp/testcases/bin/*/bin/.debug \ + /opt/ltp/testcases/bin/*/test/.debug \ + /opt/ltp/scenario_groups/.debug \ + /opt/ltp/testscripts/.debug \ + /opt/ltp/testscripts/open_posix_testsuite/.debug \ +" + +FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a" + +FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*" + +# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails +INHIBIT_PACKAGE_STRIP = "1" diff --git a/meta/recipes-extended/mailx/mailx-12.5/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 @@ +krb5 support is autodetected from sysroot making builds undeterministic +feel free to improve this to support explicitly enabling/disabling it + +Upstream-Status: Penging + +Signed-off-by: Martin Jansa + +--- a/makeconfig 2013-07-21 15:06:11.177792334 +0200 ++++ b/makeconfig 2013-07-21 15:07:20.028793994 +0200 +@@ -424,36 +424,6 @@ + } + ! + +-<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \ +- '#define USE_GSSAPI' '-lgss' || +- <$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \ +- '#define USE_GSSAPI' '-lgssapi_krb5' || +- link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \ +- '#define USE_GSSAPI +-#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \ +- link_check gssapi 'for GSSAPI in libgssapi' \ +- '#define USE_GSSAPI +-#define GSSAPI_REG_INCLUDE' '-lgssapi' <<\% +-#include +-#include +- +-int main(void) +-{ +- gss_import_name(0, 0, gss_nt_service_name, 0); +- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); +- return 0; +-} +-! +-#include +- +-int main(void) +-{ +- gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0); +- gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0); +- return 0; +-} +-% +- + cat >$tmp2.c <<\! + #include "config.h" + #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 @@ +SUMMARY = "mailx is the traditional command-line-mode mail user agent" + +DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \ +functionality of the POSIX mailx command with additional support \ +for MIME, IMAP, POP3, SMTP, and S/MIME." + +HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html" +SECTION = "console/network" +PR = "r2" +LICENSE = "BSD & MPL-1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd" + +DEPENDS = "openssl" + +SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}.orig.tar.gz;name=archive \ + ${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_${PV}-1.diff.gz;name=patch \ + file://explicitly.disable.krb5.support.patch \ + " + +SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2" +SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad" +SRC_URI[patch.md5sum] = "f466281336183be673bf136dd7096662" +SRC_URI[patch.sha256sum] = "aaf2a4bbf145e5ca9cdeb0843091ec8cc01df6c9568c997207a5e97b4dc5ba43" + +S = "${WORKDIR}/heirloom-mailx-${PV}" + +inherit autotools-brokensep + +CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT" +EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail" + +PARALLEL_MAKE = "" diff --git a/meta/recipes-extended/man-pages/man-pages_3.71.bb b/meta/recipes-extended/man-pages/man-pages_3.71.bb new file mode 100644 index 0000000000..225b2567cb --- /dev/null +++ b/meta/recipes-extended/man-pages/man-pages_3.71.bb @@ -0,0 +1,36 @@ +SUMMARY = "Linux man-pages" +DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs" +SECTION = "console/utils" +HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" +LICENSE = "GPLv2+" + +LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60" +SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz" + +SRC_URI[md5sum] = "a853ef29d835e8522c04f832919139f1" +SRC_URI[sha256sum] = "307c9ac65b98a3a3d377050f0dc62d40b7a5995e6e6e6049d63fd9cc4fc27059" + +RDEPENDS_${PN} = "man" + +do_configure () { + : +} + +do_compile() { + : +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + +# Only deliveres man-pages so FILES_${PN} gets everything +FILES_${PN}-doc = "" +FILES_${PN} = "${mandir}/*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "passwd.5 getspnam.3" +ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" +ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" 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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -u -r man-1.5g.old/configure man-1.5g/configure +--- man-1.5g.old/configure Wed Apr 7 04:16:05 1999 ++++ man-1.5g/configure Mon May 15 15:22:44 2000 +@@ -791,7 +791,7 @@ + read mode + if test "$mode" != ""; then man_mode=$mode; fi + fi +- man_install_flags="-m $man_mode -o $man_user -g $man_group" ++ man_install_flags="" + fi + + # What sections do we anticipate? diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- gencat/genlib.c 2006-08-02 20:11:44.000000000 +0200 ++++ gencat/genlib.c.oden 2008-12-21 19:18:50.000000000 +0100 +@@ -47,6 +47,7 @@ up-to-date. Many thanks. + 01/14/91 4 nazgul Off by one on number specified entries + */ + ++#undef _GNU_SOURCE + #include + #include + #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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5g/man/Makefile.in.mike Fri Apr 9 13:35:54 1999 ++++ man-1.5g/man/Makefile.in Fri Apr 9 13:36:45 1999 +@@ -1,8 +1,8 @@ + # only executed from a subdir + MAN1 = man whatis apropos +-MAN5 = man.conf ++MAN5 = man.config + MAN8 = makewhatis +-ALL = man.1 whatis.1 apropos.1 man.conf.5 ++ALL = man.1 whatis.1 apropos.1 man.config.5 + MAYBE8 = makewhatis + + .SUFFIXES: .man .1 .5 .8 diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5i2/src/makewhatis.sh.initial Tue Jul 3 15:38:39 2001 ++++ man-1.5i2/src/makewhatis.sh Tue Jul 3 15:39:39 2001 +@@ -81,8 +81,10 @@ + continue;; + -s) setsections=1 + continue;; +- -u) findarg="-newer /var/cache/man/whatis" +- update=1 ++ -u) if [ -e /var/cache/man/whatis ]; then ++ findarg="-newer /var/cache/man/whatis" ++ update=1 ++ fi + continue;; + -v) verbose=1 + continue;; diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- src/man.c 2008-12-21 19:17:31.000000000 +0100 ++++ src/man.c.oden 2008-12-21 19:17:38.000000000 +0100 +@@ -391,7 +391,7 @@ again: + beg++; + + end = beg; +- while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0') ++ while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf) + +--- man-1.5i2/src/man.c.overflow Mon Jun 25 00:01:45 2001 ++++ man-1.5i2/src/man.c Mon Jun 25 00:01:45 2001 +@@ -381,6 +381,9 @@ + strcat(name, "/"); + strcat(name, beg); + } ++ /* If this is too long, bad things have already happened. * ++ * we should quit IMMEDIATELY. */ ++ if(strlen(name)>sizeof(ultname)) _exit(1); + + goto again; + } diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5j/msgs/inst.sh.i18n Wed Apr 25 10:40:50 2001 ++++ man-1.5j/msgs/inst.sh Wed Apr 25 10:41:17 2001 +@@ -27,8 +27,7 @@ + for j in $M; do + if [ -f $j ]; then + i=`echo $j | sed -e 's/mess.//; s/.cat//'` +- dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` +- dest=${PREFIX}$dest ++ dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` + echo "mkdir -p `dirname $dest`" + mkdir -p `dirname $dest`; + echo "install -c -m 644 $j $dest" diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5j/src/man.conf.in.nocache Thu Nov 22 15:07:12 2001 ++++ man-1.5j/src/man.conf.in Thu Nov 22 15:07:12 2001 +@@ -81,6 +81,9 @@ + # + #NOCACHE + # ++# NOCACHE keeps man from creating cache pages ++NOCACHE ++# + # Useful paths - note that COL should not be defined when + # NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; + # not only is it superfluous, but it actually damages the output. diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5j/configure.utf8 Thu Nov 22 15:02:35 2001 ++++ man-1.5j/configure Thu Nov 22 15:03:15 2001 +@@ -408,9 +408,9 @@ + Fgawk=/bin/gawk + Fawk=/bin/gawk + Fmawk=missing +- troff="" +- nroff="" +- jnroff="" ++ troff=/usr/bin/troff ++ nroff=/usr/bin/nroff ++ jnroff=/usr/bin/nroff + eqn="" + neqn="" + jneqn="" +@@ -453,6 +453,8 @@ + done + done + Fgroff=/usr/bin/groff ++ Fnroff=/usr/bin/nroff ++ Fjnroff=/usr/bin/nroff + Fgeqn=/usr/bin/geqn + Fgtbl=/usr/bin/gtbl + Fcol=/usr/bin/col +@@ -485,25 +487,25 @@ + then + if test $Fnroff = "missing" + then +- nroff="nroff -Tlatin1 -mandoc" ++ nroff="nroff -Tutf8 -mandoc" + else +- nroff="$Fnroff -Tlatin1 -mandoc" ++ nroff="$Fnroff -Tutf8 -mandoc" + fi + troff="troff -mandoc" + echo "Warning: could not find groff" + else + if test $Fnroff = "missing" + then +- nroff="$Fgroff -Tlatin1 -mandoc" ++ nroff="$Fgroff -Tutf8 -mandoc" + else +- nroff="$Fnroff -Tlatin1 -mandoc" ++ nroff="$Fnroff -Tutf8 -mandoc" + fi + troff="$Fgroff -Tps -mandoc" +- jnroff="$Fgroff -Tnippon -mandocj" ++ jnroff="$Fjnroff -Tutf8 -mandocj" + fi + eqn="$Fgeqn -Tps" +- neqn="$Fgeqn -Tlatin1" +- jneqn="$Fgeqn -Tnippon" ++ neqn="$Fgeqn -Tutf8" ++ jneqn="$Fgeqn -Tutf8" + tbl="$Fgtbl" + col="$Fcol" + vgrind="$Fvgrind" diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- configure 2006-05-01 19:56:14.000000000 +0200 ++++ configure.oden 2008-12-21 19:16:50.000000000 +0100 +@@ -198,7 +198,7 @@ + confdir="${confprefix}/share/misc" + fi + fi +-conffilename="man.conf" ++conffilename="man.config" + + if test "$RANDOM" = "$RANDOM"; then + # Plain old Bourne shell. diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- ./src/apropos.sh.nonascii 2001-11-23 00:30:42.000000000 +0100 ++++ ./src/apropos.sh 2002-08-13 15:44:53.000000000 +0200 +@@ -18,9 +18,9 @@ + + # When man pages in your favorite locale look to grep like binary files + # (and you use GNU grep) you may want to add the 'a' option to *grepopt1. +-aproposgrepopt1='i' ++aproposgrepopt1='ia' + aproposgrepopt2='' +-whatisgrepopt1='iw' ++whatisgrepopt1='iwa' + whatisgrepopt2='^' + grepopt1=$%apropos_or_whatis%grepopt1 + grepopt2=$%apropos_or_whatis%grepopt2 diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5j/src/man.c.sofix Thu Nov 22 14:51:44 2001 ++++ man-1.5j/src/man.c Thu Nov 22 14:52:44 2001 +@@ -300,7 +300,7 @@ + + if (strlen(name0) >= sizeof(ultname)) + return name0; +- strcpy(ultname, name0); ++ strncpy(ultname, name0, BUFSIZE-32); + name = ultname; + + again: +@@ -332,7 +332,7 @@ + * .so files - we could glob for all possible extensions, + * for now: only try .gz + */ +- else if (fp == NULL && get_expander(".gz") && ++ if (fp == NULL && get_expander(".gz") && + strlen(name)+strlen(".gz") < BUFSIZE) { + strcat(name, ".gz"); + fp = fopen (name, "r"); diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- ./configure.ad 2003-12-11 19:17:10.000000000 +0100 ++++ ./configure 2003-12-11 19:17:27.000000000 +0100 +@@ -26,7 +26,7 @@ + # (Indeed, -r may cause the terminal to get into funny states. + # Very inconvenient. For viewing pages in strange locales, set LC_*.) + # +-DEFAULTLESSOPT="-is" ++DEFAULTLESSOPT="-isr" + # + # Note that not creating any cat directories (/var/cache/man or so) + # and not making man suid or sgid is recommended. diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- ./configure.less 2003-12-11 19:18:15.000000000 +0100 ++++ ./configure 2003-12-11 19:20:03.000000000 +0100 +@@ -401,18 +401,13 @@ + + if test "$ans" = "false" + then +- for i in more less cmp cat awk gawk mawk +- do +- eval F$i="missing" +- for j in $DEFPATH +- do +- if test -f $j/$i +- then +- eval F$i=$j/$i +- break +- fi +- done +- done ++ Fmore=/bin/more ++ Fless=/usr/bin/less ++ Fcmp=/usr/bin/cmp ++ Fcat=/bin/cat ++ Fgawk=/bin/gawk ++ Fawk=/bin/gawk ++ Fmawk=missing + troff="" + nroff="" + jnroff="" +@@ -457,6 +452,19 @@ + fi + done + done ++ Fgroff=/usr/bin/groff ++ Fgeqn=/usr/bin/geqn ++ Fgtbl=/usr/bin/gtbl ++ Fcol=/usr/bin/col ++ Fgrefer=/usr/bin/grefer ++ Fgpic=/usr/bin/gpic ++ Fmore=/bin/more ++ Fless=/usr/bin/less ++ Fcmp=/usr/bin/cmp ++ Fcat=/bin/cat ++ Fgawk=/bin/gawk ++ ++ + for i in eqn tbl refer pic + do + if test `eval echo \\$Fg$i` = "missing" diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5m2/configure.color 2006-09-16 18:27:37.000000000 +0200 ++++ man-1.5m2/configure 2006-09-16 18:28:44.000000000 +0200 +@@ -539,6 +539,8 @@ + troff="$troff -c" + nroff="$nroff -c" + jnroff="$jnroff -c" ++else ++ troff="$troff -c" + fi + + if [ x$default = x ]; then diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.5m2/src/util.c_sigpipe 2006-12-09 13:43:21.000000000 +0100 ++++ man-1.5m2/src/util.c 2006-12-09 13:53:13.000000000 +0100 +@@ -116,11 +116,14 @@ + static int + system1 (const char *command) { + void (*prev_handler)(int) = signal (SIGINT,catch_int); ++ signal (SIGPIPE,SIG_IGN); + int ret = system(command); + + /* child terminated with signal? */ + if (WIFSIGNALED(ret) && +- (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) ++ (WTERMSIG(ret) == SIGINT || ++ WTERMSIG(ret) == SIGPIPE || ++ WTERMSIG(ret) == SIGQUIT)) + exit(1); + + /* or we caught an interrupt? */ +@@ -128,6 +131,7 @@ + exit(1); + + signal(SIGINT,prev_handler); ++ signal(SIGPIPE,SIG_DFL); + return ret; + } + diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man/Makefile.in 2008-12-21 19:19:33.000000000 +0100 ++++ man/Makefile.in.oden 2008-12-21 19:19:39.000000000 +0100 +@@ -34,6 +34,15 @@ + for i in $(MAN8); \ + do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done + ++install-l10n: $(ALL) ++ mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8 ++ for i in $(MAN1); \ ++ do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done ++ for i in $(MAN5); \ ++ do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done ++ for i in $(MAN8); \ ++ do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done ++ + clean: + rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~ + +@@ -49,7 +58,7 @@ + @for i in @languages@; do if test -d $$i; then echo; \ + echo "==== Installing the `cat $$i.txt` man pages. ===="; \ + cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \ +- export SLANG; make -f ../Makefile install; cd ..; \ ++ export SLANG; make -f ../Makefile install-l10n; cd ..; \ + else echo "==== No $$i man pages found. ===="; fi; done + + cleansubdirs: diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh +--- man-1.6e.orig/src/apropos.sh 2007-05-18 13:49:31.000000000 -0300 ++++ man-1.6e/src/apropos.sh 2007-05-18 14:24:33.000000000 -0300 +@@ -60,16 +60,56 @@ + esac + done + ++# list of languages to look for ++LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '` ++DIR_LIST="" ++for d in /var/cache/man $manpath /usr/lib ++do ++ for l in $LANG_LIST ++ do ++ if [ -d $d/$l ] ++ then ++ # check that the path is not already in the list ++ if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null ++ then ++ DIR_LIST="$DIR_LIST $d/$l" ++ fi ++ fi ++ done ++ DIR_LIST="$DIR_LIST $d" ++ # check that the path is not already in the list ++ if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null ++ then ++ DIR_LIST="$DIR_LIST $d/$l" ++ fi ++done ++ + while [ "$1" != "" ] + do + found=0 +- for d in /var/cache/man $manpath /usr/lib ++ # in order not to display lines in more than one language for ++ # a same man page; we check that a given man page name ++ # hasn't already been displayed ++ BAZ="" ++ for d in $DIR_LIST + do + if [ -f $d/whatis ] + then +- if grep -"$grepopt1" "$grepopt2""$1" $d/whatis ++ if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis` + then +- found=1 ++ # the LC_ALL=C is needed in case the text is ++ # in a different encoding than the locale ++ BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u` ++ for i in $BAR ++ do ++ if ! echo "$BAZ" | grep "$i" > /dev/null ++ then ++ BAZ="$BAZ $i" ++ i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`" ++ echo -e "$FOO" | grep "$i" ++ found=1 ++ fi ++ done + # Some people are satisfied with a single occurrence + # But it is better to give all + # break +diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh +--- man-1.6e.orig/src/makewhatis.sh 2007-05-18 13:49:31.000000000 -0300 ++++ man-1.6e/src/makewhatis.sh 2007-05-18 13:50:07.000000000 -0300 +@@ -41,12 +41,32 @@ + + program=`basename $0` + ++# this allows to define language specific values fro NAME, DESCRIPTION ++# if not defined, using those default values ++if [ -z "$MAN_NAME" ] ++then ++ MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟÎΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\ ++NÉV|NOME|åå‰|ì´ë¦„|NAAM|NAZWA|NUME|ИМЯ|MENO|ÐÐЗВÐ|å称|å稱" ++fi ++if [ -z "$MAN_DESCRIPTION" ] ++then ++ MAN_DESCRIPTION="ОПИСÐÐИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\ ++ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÃRÃS|DESCRIZIONE|\ ++説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|æè¿°" ++fi ++# make them into awk regexp ++MAN_NAME="^(${MAN_NAME})"; ++MAN_DESCRIPTION="^(${MAN_DESCRIPTION})"; ++ + # In case both /usr/man and /usr/share/man exist, the former is local + # and should be first. + # It is a bug to add /var/cache/man to DEFCATPATH. + dm= + for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man + do ++ if [ -n "$LANG" -a -d "$d/$LANG" ]; then ++ if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi ++ fi + if [ -d $d ]; then + if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi + fi +@@ -55,6 +75,9 @@ + dc= + for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man + do ++ if [ -n "$LANG" -a -d "$d/$LANG" ]; then ++ if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi ++ fi + if [ -d $d ]; then + if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi + fi +@@ -194,7 +217,7 @@ + section=$i + curdir=$mandir/${pages}$i + export section verbose curdir +- find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK ' ++ find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" ' + + function readline() { + if (use_zcat || use_bzcat) { +@@ -261,13 +284,7 @@ + gsub(/.\b/, ""); + if (($1 ~ /^\.[Ss][Hh]/ && + ($2 ~ /[Nn][Aa][Mm][Ee]/ || +- $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ || +- $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ || +- $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ || +- $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ || +- $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ || +- $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ || +- $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) || ++ $2 ~ MAN_NAME )) || + (pages == "cat" && $1 ~ /^NAME/)) { + if (!insh) { + insh = 1; +@@ -278,6 +295,7 @@ + if ($1 ~ /^\.[Ss][HhYS]/ || + (pages == "cat" && + ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ || ++ $1 ~ MAN_DESCRIPTION || + $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ || + $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ || + $0 ~ /^[^ ]/))) { diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.6e.orig/src/man.conf.in 2005-08-20 20:26:06.000000000 -0300 ++++ man-1.6e/src/man.conf.in 2007-05-18 10:30:29.000000000 -0300 +@@ -36,11 +36,12 @@ + # + # Every automatically generated MANPATH includes these fields + # +-MANPATH /usr/man + MANPATH /usr/share/man ++MANPATH /usr/X11R6/man + MANPATH /usr/local/man + MANPATH /usr/local/share/man +-MANPATH /usr/X11R6/man ++MANPATH /usr/kerberos/man ++MANPATH /usr/man + # + # Uncomment if you want to include one of these by default + # +@@ -67,6 +68,9 @@ + MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man + MANPATH_MAP /usr/bin/X11 /usr/X11R6/man + MANPATH_MAP /usr/bin/mh /usr/share/man ++MANPATH_MAP /usr/kerberos/bin /usr/kerberos/man ++MANPATH_MAP /usr/kerberos/sbin /usr/kerberos/man ++ + # + # NOAUTOPATH keeps man from automatically adding directories that look like + # manual page directories to the path. diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- man-1.6e.orig/configure 2006-05-01 14:56:14.000000000 -0300 ++++ man-1.6e/configure 2007-05-18 14:35:43.000000000 -0300 +@@ -960,7 +960,7 @@ + + # What sections do we anticipate? + +-tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o" ++tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o" + + if [ x$default = x ]; then + echo "" diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +Index: man-1.6f/src/makewhatis.sh +=================================================================== +--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:42:34.000000000 -0800 ++++ man-1.6f/src/makewhatis.sh 2010-12-29 13:42:35.667428347 -0800 +@@ -124,7 +124,7 @@ + continue;; + -s) setsections=1 + continue;; +- -u) findarg="-ctime 0" ++ -u) findarg="-newer /var/cache/man/whatis" + update=1 + continue;; + -v) verbose=1 +@@ -165,14 +165,7 @@ + # first truncate all the whatis files that will be created new, + # then only update - we might visit the same directory twice + if [ x$update = x ]; then +- for pages in man cat +- do +- eval path="\$$pages"path +- for mandir in $path +- do +- cp /dev/null $mandir/whatis +- done +- done ++ cp /dev/null /var/cache/man/whatis + fi + + for pages in man cat diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh +--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300 ++++ man-1.6e/src/makewhatis.sh 2007-05-18 10:18:31.000000000 -0300 +@@ -45,7 +45,7 @@ + # and should be first. + # It is a bug to add /var/cache/man to DEFCATPATH. + dm= +-for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man ++for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man + do + if [ -d $d ]; then + if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi +@@ -53,7 +53,7 @@ + done + DEFMANPATH=$dm + dc= +-for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man ++for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man + do + if [ -d $d ]; then + if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi +@@ -76,12 +76,12 @@ + # We try here to be careful (and avoid preconstructed symlinks) + # in case makewhatis is run as root, by creating a subdirectory of /tmp. + +-TMPFILEDIR=/tmp/whatis.tmp.dir.$$ +-rm -rf $TMPFILEDIR +-if ! mkdir -m 0700 $TMPFILEDIR; then +- echo Could not create $TMPFILEDIR +- exit 1; ++TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX` ++if [ $? -ne 0 ]; then ++ echo "$0: Can't create temp file, exiting..." ++ exit 1 + fi ++chmod 0700 $TMPFILEDIR + TMPFILE=$TMPFILEDIR/w + + # make sure TMPFILEDIR is deleted if program is killed or terminates +diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c +--- man-1.6e.orig/src/man.c 2006-05-01 17:34:22.000000000 -0300 ++++ man-1.6e/src/man.c 2007-05-18 10:11:33.000000000 -0300 +@@ -1234,7 +1234,6 @@ + #endif + + +-#if 0 + { + /* There are no known cases of buffer overflow caused by + excessively long environment variables. In case you find one, +@@ -1257,7 +1256,6 @@ + MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET, + MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */ + } +-#endif + + + #ifndef __FreeBSD__ diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c +--- man-1.6e.orig/catopen/catopen.c 2005-08-20 20:26:06.000000000 -0300 ++++ man-1.6e/catopen/catopen.c 2007-05-18 11:31:05.000000000 -0300 +@@ -9,22 +9,63 @@ + extern char *index (const char *, int); /* not always in */ + extern char *my_malloc(int); /* in util.c */ + ++/* if the program has sgid/suid privileges then getenv doesn't return ++ * NLSPATH; so we set here a good default value. ++ */ + #ifndef DEFAULT_NLSPATH + # if __GLIBC__ >= 2 +-# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N" ++# define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N" + # else + # define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L" + # endif + #endif + +-static nl_catd my_catopenpath(char *name, char *path); ++static nl_catd my_catopenpath(char *name, char *path, char *lang); + + static /* this source included in gripes.c */ + nl_catd + my_catopen(char *name, int oflag) { +- nl_catd fd; ++ nl_catd fd = (nl_catd) -1; ++ ++ /* using first the my_catopenpath, which looks with LANGUAGE ++ * and only if it fails ressort to catopen, it gives better i18n ++ */ ++ { ++ char *nlspath, *lang, *s; + +- fd = catopen(name, oflag); ++ /* ++ * "If NLSPATH does not exist in the environment, or if a ++ * message catalog cannot be opened in any of the paths specified ++ * by NLSPATH, then an implementation defined default path is used" ++ */ ++ nlspath = getenv("NLSPATH"); ++ if (!nlspath) ++ nlspath = DEFAULT_NLSPATH; ++ ++ lang = getenv("LANGUAGE"); ++ if (!lang) ++ lang = getenv("LC_ALL"); ++ if (!lang) ++ lang = getenv("LC_MESSAGES"); ++ if (!lang) ++ lang = getenv("LANG"); ++ if (!lang) ++ lang = ""; ++ ++ while(*lang && (fd == (nl_catd) -1)) { ++ s = index(lang, ':'); ++ if (s) *s = 0; ++ fd = my_catopenpath(name, nlspath, lang); ++ if (s) lang=s+1; ++ else lang = ""; ++ } ++ if (fd == (nl_catd) -1) ++ fd = my_catopenpath(name, nlspath, "en"); ++ } ++ ++ /* still not found, use the system catopen */ ++ if (fd == (nl_catd) -1) ++ fd = catopen(name, oflag); + + if (fd == (nl_catd) -1 && oflag) { + oflag = 0; +@@ -32,8 +73,6 @@ + } + + if (fd == (nl_catd) -1) { +- char *nlspath; +- + /* The libc catopen fails - let us see if we can do better */ + /* The quotes below are from X/Open, XPG 1987, Vol. 3. */ + +@@ -58,17 +97,6 @@ + #endif + } + +- /* +- * "If NLSPATH does not exist in the environment, or if a +- * message catalog cannot be opened in any of the paths specified +- * by NLSPATH, then an implementation defined default path is used" +- */ +- +- nlspath = getenv("NLSPATH"); +- if (nlspath) +- fd = my_catopenpath(name, nlspath); +- if (fd == (nl_catd) -1) +- fd = my_catopenpath(name, DEFAULT_NLSPATH); + } + return fd; + } +@@ -90,15 +118,13 @@ + * + */ + static nl_catd +-my_catopenpath(char *name, char *nlspath) { +- int fd; ++my_catopenpath(char *name, char *nlspath, char *lang) { + nl_catd cfd = (nl_catd) -1; +- char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c; ++ char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c; + int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz; + + namesz = strlen(name); + +- lang = getenv("LANG"); + if (!lang) + lang = ""; + langsz = strlen(lang); +@@ -194,14 +220,9 @@ + path = s+1; + } else + path = 0; +- fd = open(file, O_RDONLY); +- if (fd != -1) { +- /* we found the right catalog - but we don't know the +- type of nl_catd, so close it again and ask libc */ +- close(fd); +- cfd = catopen(file, 0); +- break; +- } ++ cfd = catopen(file, 0); ++ if (cfd != (nl_catd) -1) ++ break; + } + + free(path0); +diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c +--- man-1.6e.orig/src/manpath.c 2006-08-03 18:18:33.000000000 -0300 ++++ man-1.6e/src/manpath.c 2007-05-18 11:02:48.000000000 -0300 +@@ -282,13 +282,14 @@ + /* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so: + the return value of setlocale is an opaque string. */ + /* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */ +- if((lang = getenv("LC_ALL")) != NULL) ++ /* LANGUAGE is GNU/Linux and overrules all */ ++ if((lang = getenv("LANGUAGE")) != NULL) + split2(dir, lang, add_to_mandirlist_x, perrs); +- if((lang = getenv("LC_MESSAGES")) != NULL) ++ else if((lang = getenv("LC_ALL")) != NULL) + split2(dir, lang, add_to_mandirlist_x, perrs); +- if((lang = getenv("LANG")) != NULL) ++ else if((lang = getenv("LC_MESSAGES")) != NULL) + split2(dir, lang, add_to_mandirlist_x, perrs); +- if((lang = getenv("LANGUAGE")) != NULL) ++ else if((lang = getenv("LANG")) != NULL) + split2(dir, lang, add_to_mandirlist_x, perrs); + add_to_mandirlist_x(dir, 0, perrs); + } diff --git a/meta/recipes-extended/man/man/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 @@ +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +Index: man-1.6f/src/makewhatis.sh +=================================================================== +--- man-1.6f.orig/src/makewhatis.sh 2010-12-29 13:51:45.000000000 -0800 ++++ man-1.6f/src/makewhatis.sh 2010-12-29 13:59:35.399799412 -0800 +@@ -164,10 +164,15 @@ + fi + catpath=`echo ${catpath} | tr : ' '` + ++#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'` ++WHATIS_DIR=$DESTDIR/var/cache/man/$LANG ++[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/ ++ + # first truncate all the whatis files that will be created new, + # then only update - we might visit the same directory twice + if [ x$update = x ]; then +- cp /dev/null /var/cache/man/whatis ++ mkdir -p $WHATIS_DIR/ ++ /bin/echo -n > $WHATIS_DIR/whatis + fi + + for pages in man cat +@@ -180,13 +185,7 @@ + echo "about to enter $mandir" > /dev/stderr + fi + +- # kludge for Slackware's /usr/man/preformat +- if [ $mandir = /usr/man/preformat ] +- then +- mandir1=/usr/man +- else +- mandir1=$mandir +- fi ++ mandir1=$WHATIS_DIR + + # if $mandir is on a readonly partition, and the whatis file + # is not a symlink, then let's skip trying to update it +@@ -207,11 +206,6 @@ + fi + fi + +- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then +- if [ x$verbose != x ]; then +- echo skipping $mandir - we did it already > /dev/stderr +- fi +- else + here=`pwd` + cd $mandir + for i in $sections diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz new file mode 100644 index 0000000000..c368045153 Binary files /dev/null and b/meta/recipes-extended/man/man/man.1.gz 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 Binary files /dev/null and b/meta/recipes-extended/man/man/man.7.gz 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..fc10be2758 --- /dev/null +++ b/meta/recipes-extended/man/man/man.conf @@ -0,0 +1,141 @@ +# +# Generated automatically from man.conf.in by the +# configure script. +# +# man.conf from man-1.5p +# +# For more information about this file, see the man pages man(1) +# and man.conf(5). +# +# This file is read by man to configure the default manpath (also used +# when MANPATH contains an empty substring), to find out where the cat +# pages corresponding to given man pages should be stored, +# and to map each PATH element to a manpath element. +# It may also record the pathname of the man binary. [This is unused.] +# The format is: +# +# MANBIN pathname +# MANPATH manpath_element [corresponding_catdir] +# MANPATH_MAP path_element manpath_element +# +# If no catdir is given, it is assumed to be equal to the mandir +# (so that this dir has both man1 etc. and cat1 etc. subdirs). +# This is the traditional Unix setup. +# Certain versions of the FSSTND recommend putting formatted versions +# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x. +# The keyword FSSTND will cause this behaviour. +# Certain versions of the FHS recommend putting formatted versions of +# /usr/.../share/man/[locale/]manx/page.x into +# /var/cache/man/.../[locale/]catx/page.x. +# The keyword FHS will cause this behaviour (and overrides FSSTND). +# Explicitly given catdirs override. +# +# FSSTND +FHS +# +# This file is also read by man in order to find how to call nroff, less, etc., +# and to determine the correspondence between extensions and decompressors. +# +# MANBIN /usr/local/bin/man +# +# Every automatically generated MANPATH includes these fields +# +MANPATH /usr/man +MANPATH /usr/share/man +MANPATH /usr/local/man +MANPATH /usr/local/share/man +MANPATH /usr/X11R6/man +# +# Uncomment if you want to include one of these by default +# +# MANPATH /opt/*/man +# MANPATH /usr/lib/*/man +# MANPATH /usr/share/*/man +# MANPATH /usr/kerberos/man +# +# Set up PATH to MANPATH mapping +# +# If people ask for "man foo" and have "/dir/bin/foo" in their PATH +# and the docs are found in "/dir/man", then no mapping is required. +# +# The below mappings are superfluous when the right hand side is +# in the mandatory manpath already, but will keep man from statting +# lots of other nearby files and directories. +# +MANPATH_MAP /bin /usr/share/man +MANPATH_MAP /sbin /usr/share/man +MANPATH_MAP /usr/bin /usr/share/man +MANPATH_MAP /usr/sbin /usr/share/man +MANPATH_MAP /usr/local/bin /usr/local/share/man +MANPATH_MAP /usr/local/sbin /usr/local/share/man +MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man +MANPATH_MAP /usr/bin/X11 /usr/X11R6/man +MANPATH_MAP /usr/bin/mh /usr/share/man +# +# NOAUTOPATH keeps man from automatically adding directories that look like +# manual page directories to the path. +# +#NOAUTOPATH +# +# NOCACHE keeps man from creating cache pages ("cat pages") +# (generally one enables/disable cat page creation by creating/deleting +# the directory they would live in - man never does mkdir) +# +#NOCACHE +# +# Useful paths - note that COL should not be defined when +# NROFF is defined as "groff -Tascii" or "groff -Tlatin1"; +# not only is it superfluous, but it actually damages the output. +# For use with utf-8, NROFF should be "nroff -mandoc" without -T option. +# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.) +# +# If you have a new troff (version 1.18.1?) and its colored output +# causes problems, add the -c option to TROFF, NROFF, JNROFF. +# +TROFF /usr/bin/groff -Tps -mandoc +NROFF /usr/bin/nroff -Tlatin1 -mandoc +JNROFF /usr/bin/groff -Tnippon -mandocj +EQN /usr/bin/eqn -Tps +NEQN /usr/bin/eqn -Tlatin1 +JNEQN /usr/bin/eqn -Tnippon +TBL /usr/bin/tbl +# COL /usr/bin/col +REFER /usr/bin/refer +PIC /usr/bin/pic +VGRIND +GRAP +PAGER /usr/bin/less -isR +CAT /bin/cat +# +# The command "man -a xyzzy" will show all man pages for xyzzy. +# When CMP is defined man will try to avoid showing the same +# text twice. (But compressed pages compare unequal.) +# +CMP /usr/bin/cmp -s +# +# Compress cat pages +# +COMPRESS /bin/bzip2 +COMPRESS_EXT .bz2 +# +# Default manual sections (and order) to search if -S is not specified +# and the MANSECT environment variable is not set. +# +MANSECT 1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o +# +# Default options to use when man is invoked without options +# This is mainly for the benefit of those that think -a should be the default +# Note that some systems have /usr/man/allman, causing pages to be shown twice. +# +#MANDEFOPTIONS -a +# +# Decompress with given decompressor when input file has given extension +# The command given must act as a filter. +# +.gz /bin/gunzip -c +.bz2 /usr/bin/bunzip2 -c +.xz /usr/bin/unxz -c +.z +.Z /bin/zcat +.F +.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 Binary files /dev/null and b/meta/recipes-extended/man/man/manpath.5.gz 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..03fffd6015 --- /dev/null +++ b/meta/recipes-extended/man/man_1.6g.bb @@ -0,0 +1,79 @@ +SUMMARY = "Online documentation tools" +DESCRIPTION = "A set of documentation tools: man, apropos and whatis" +SECTION = "console/utils" +HOMEPAGE = "http://primates.ximian.com/~flucifredi/man" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +PR = "r1" + +DEPENDS = "groff less" + +def compress_pkg(d): + if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): + compress = d.getVar("DOC_COMPRESS", True) + if compress == "gz": + return "gzip" + elif compress == "bz2": + return "bzip2" + elif compress == "xz": + return "xz" + return "" + +RDEPENDS_${PN} += "${@compress_pkg(d)}" + +SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \ + file://man-1.5k-confpath.patch;striplevel=0 \ + file://man-1.5h1-make.patch \ + file://man-1.5k-nonascii.patch \ + file://man-1.6e-security.patch \ + file://man-1.6e-mandirs.patch \ + file://man-1.5m2-bug11621.patch \ + file://man-1.5k-sofix.patch \ + file://man-1.5m2-buildroot.patch \ + file://man-1.6e-ro_usr.patch \ + file://man-1.5i2-newline.patch;striplevel=0 \ + file://man-1.5j-utf8.patch \ + file://man-1.5i2-overflow.patch \ + file://man-1.5j-nocache.patch \ + file://man-1.5i2-initial.patch \ + file://man-1.5h1-gencat.patch;striplevel=0 \ + file://man-1.5g-nonrootbuild.patch \ + file://man-1.5m2-tv_fhs.patch;striplevel=0 \ + file://man-1.5j-i18n.patch \ + file://man-1.6e-whatis2.patch \ + file://man-1.6e-use_i18n_vars_in_a_std_way.patch \ + file://man-1.5m2-no-color-for-printing.patch \ + file://man-1.5m2-sigpipe.patch \ + file://man-1.6e-i18n_whatis.patch \ + file://man-1.6e-new_sections.patch \ + file://man.1.gz;unpack=false \ + file://man.7.gz;unpack=false \ + file://man.conf \ + file://manpath.5.gz;unpack=false" + +SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660" +SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f" + +do_configure () { + ${S}/configure -default -confdir /etc +sgid +fhs +lang all +} + + +fakeroot do_install() { + oe_runmake install DESTDIR=${D} +} + +do_install_append(){ + mkdir -p ${D}${sysconfdir} + mkdir -p ${D}${datadir}/man/man5 + mkdir -p ${D}${datadir}/man/man7 + cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config + cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/ + cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/ + cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/ +} + + +RDEPENDS_${PN} = "less groff" +FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config" diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch new file mode 100644 index 0000000000..d532bde9a6 --- /dev/null +++ b/meta/recipes-extended/mc/mc/mc-CTRL.patch @@ -0,0 +1,31 @@ +Fix build with musl by ensuring CTRL is defined. + +musl does not define CTRL in , we could include +explicitly but it's easier just to ensure CTRL is defined. + +This patch is taken from Sabotage Linux, the license statement for patches and +build scripts in Sabotage Linux says: + + To the extent possible under law, Christian Neukirchen has waived + all copyright and related or neighboring rights to this work. + + http://creativecommons.org/publicdomain/zero/1.0/ + +Therefore this should be good to include in OpenEmbedded. + +Signed-off-by: Paul Barker + +Upstream-status: Pending + +diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c +--- mc-4.8.1.7.org/lib/tty/tty-ncurses.c ++++ mc-4.8.1.7/lib/tty/tty-ncurses.c +@@ -65,7 +65,7 @@ + + /*** file scope macro definitions ****************************************************************/ + +-#if defined(_AIX) && !defined(CTRL) ++#if !defined(CTRL) + #define CTRL(x) ((x) & 0x1f) + #endif + 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..b47eb02323 --- /dev/null +++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb @@ -0,0 +1,49 @@ +SUMMARY = "Midnight Commander is an ncurses based file manager" +HOMEPAGE = "http://www.midnight-commander.org/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" +SECTION = "console/utils" +DEPENDS = "ncurses glib-2.0" +RDEPENDS_${PN} = "ncurses-terminfo" + +PR = "r3" + +SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ + file://mc-CTRL.patch \ + " + +SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6" +SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab" + +inherit autotools gettext pkgconfig + +EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba" + +FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" + +do_install_append () { + sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* + sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* +} + +PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" + +SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" +FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ + ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ + ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ + ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ + ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ + ${libexecdir}/mc/extfs.d/uzip" +RDEPENDS_${BPN}-helpers-perl = "perl" + +SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" +FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" +RDEPENDS_${BPN}-helpers-python = "python" + +SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" +FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" + +SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" +FILES_${BPN}-fish = "${libexecdir}/mc/fish" + diff --git a/meta/recipes-extended/mc/mc_4.8.12.bb b/meta/recipes-extended/mc/mc_4.8.12.bb new file mode 100644 index 0000000000..bc462e3fc0 --- /dev/null +++ b/meta/recipes-extended/mc/mc_4.8.12.bb @@ -0,0 +1,53 @@ +SUMMARY = "Midnight Commander is an ncurses based file manager" +HOMEPAGE = "http://www.midnight-commander.org/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2" +SECTION = "console/utils" +DEPENDS = "ncurses glib-2.0" +RDEPENDS_${PN} = "ncurses-terminfo" + +SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ + file://mc-CTRL.patch \ + " + +SRC_URI[md5sum] = "a64c426364bfaee56b628f6c0738aade" +SRC_URI[sha256sum] = "1054fcc27a488771cbe5b85d7c10135fa1cd1b7682a19930d44b51a023e39396" + +inherit autotools gettext pkgconfig + +# +# Both Samba (smb) and sftp require package delivered from meta-openembedded +# +PACKAGECONFIG ??= "" +PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," +PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," + +EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" + +FILES_${PN}-dbg += "${libexecdir}/mc/.debug/" + +do_install_append () { + sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* + sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* +} + +PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" + +SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" +FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ + ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ + ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ + ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ + ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ + ${libexecdir}/mc/extfs.d/uzip" +RDEPENDS_${BPN}-helpers-perl = "perl" + +SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" +FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" +RDEPENDS_${BPN}-helpers-python = "python" + +SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" +FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" + +SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" +FILES_${BPN}-fish = "${libexecdir}/mc/fish" diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch new file mode 100644 index 0000000000..54bf1d79ab --- /dev/null +++ b/meta/recipes-extended/mdadm/files/gcc-4.9.patch @@ -0,0 +1,22 @@ +super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value] + snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, + ^ +cc1: all warnings being treated as errors +make: *** [super-intel.o] Error 1 + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Index: mdadm-3.3/super-intel.c +=================================================================== +--- mdadm-3.3.orig/super-intel.c 2014-05-02 15:08:21.154319651 -0700 ++++ mdadm-3.3/super-intel.c 2014-05-02 15:09:31.470985794 -0700 +@@ -5060,7 +5060,7 @@ + spare->cache_size = mpb->cache_size, + spare->pwr_cycle_count = __cpu_to_le32(1), + +- snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, ++ (void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH, + MPB_SIGNATURE MPB_VERSION_RAID0); + + for (d = super->disks; d; d = d->next) { 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 @@ +Upstream-Status: pending + +By hardcoding CC's definition in the Makefile, all the gcc parameters +set by tune settings are lost. Causing compile failure with x32 toolchain + +As the bitbake defined CC is good, there is no need to redfine CC in the +make file, hence making the CC definition in the Makefile conditional. + +Signed-Off-By: Nitin A Kamble 2011/12/07 + +Index: mdadm-3.3/Makefile +=================================================================== +--- mdadm-3.3.orig/Makefile 2013-09-03 07:47:47.000000000 +0300 ++++ mdadm-3.3/Makefile 2013-10-16 16:44:23.542295487 +0300 +@@ -41,7 +41,7 @@ + + KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32 + +-CC = $(CROSS_COMPILE)gcc ++CC ?= $(CROSS_COMPILE)gcc + CXFLAGS ?= -ggdb + CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter + ifdef WARN_UNUSED diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.1.bb b/meta/recipes-extended/mdadm/mdadm_3.3.1.bb new file mode 100644 index 0000000000..3c43e0d867 --- /dev/null +++ b/meta/recipes-extended/mdadm/mdadm_3.3.1.bb @@ -0,0 +1,46 @@ +SUMMARY = "Tool for managing software RAID under Linux" +HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/" + +# Some files are GPLv2+ while others are GPLv2. +LICENSE = "GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \ + file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161" + + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ + file://mdadm-3.2.2_fix_for_x32.patch \ + file://gcc-4.9.patch \ + " + +SRC_URI[md5sum] = "4227d48de62dfb217c92fa0c54171bbe" +SRC_URI[sha256sum] = "d8c74112cfd77bdc1dbc1291fe8d9243c76d91bfa276fcb95f2a75ca7717ab02" + +CFLAGS += "-fno-strict-aliasing" + +inherit autotools-brokensep + +# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header +do_configure_prepend () { + sed -i -e '/.*ansidecl.h.*/d' ${S}/sha1.h +} + +EXTRA_OEMAKE = "CHECK_RUN_DIR=0" +# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h +# prevents 64-bit userland from seeing this definition, instead defaulting +# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get +# int-ll64.h included +EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' +EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' +EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' + +do_compile() { + oe_runmake +} + +do_install() { + export STRIP="" + autotools_do_install +} + +FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules" diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb new file mode 100644 index 0000000000..f1936afd23 --- /dev/null +++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb @@ -0,0 +1,28 @@ +SUMMARY = "Compact getty terminal handler for virtual consoles only" +SECTION = "console/utils" +HOMEPAGE = "http://sourceforge.net/projects/mingetty/" +LICENSE = "GPLv2" +PR = "r3" + +LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e" +SRC_URI = "http://cdnetworks-kr-1.dl.sourceforge.net/project/mingetty/mingetty/${PV}/mingetty-${PV}.tar.gz" + +SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990" +SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17" + +# substitute our CFLAGS for "-O2 -Wall -W -pipe" +# +EXTRA_OEMAKE = "CC='${CC}' \ + CFLAGS='${CFLAGS} -D_GNU_SOURCE'" + +do_install(){ + install -d ${D}${mandir}/man8 ${D}/${base_sbindir} + oe_runmake install DESTDIR=${D} +} + +inherit update-alternatives + +ALTERNATIVE_${PN} = "getty" +ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" +ALTERNATIVE_TARGET[getty] = "${base_sbindir}/mingetty" +ALTERNATIVE_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 @@ +Subject: [PATCH] fix minicom -h/-v return value is not 0 + +Upstream-Status: Pending + +Signed-off-by: Lu Chong + +--- + src/minicom.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/minicom.c b/src/minicom.c +index e1a557b..730da7c 100644 +--- a/src/minicom.c ++++ b/src/minicom.c +@@ -1166,15 +1166,13 @@ int main(int argc, char **argv) + "modify it under the terms of the GNU General Public License\n" + "as published by the Free Software Foundation; either version\n" + "2 of the License, or (at your option) any later version.\n\n"); +- exit(1); +- break; ++ exit(0); + case 's': /* setup mode */ + dosetup = 1; + break; + case 'h': + helpthem(); +- exit(1); +- break; ++ exit(0); + case 'p': /* Pseudo terminal to use. */ + if (strncmp(optarg, "/dev/", 5) == 0) + optarg += 5; +-- +1.7.9.5 + 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 @@ +Upstream-Status: Pending + +Signed-off-by: Martin Jansa + +--- a/configure.in 2013-02-06 18:18:13.000000000 +0100 ++++ b/configure.in 2013-07-21 15:31:27.614828894 +0200 +@@ -40,7 +40,13 @@ + fi + + PKG_PROG_PKG_CONFIG +-if test -n "$PKG_CONFIG"; then ++ ++AC_ARG_ENABLE([lockdev], ++ AS_HELP_STRING([--enable-lockdev], ++ [Enable lockdev support (def: enabled)]), ++ [], [enable_lockdev="yes"]) ++ ++if test -n "$PKG_CONFIG" && test "x$enable_lockdev" = xyes; then + PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev]),[:]) + fi + 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..c002bc82d9 --- /dev/null +++ b/meta/recipes-extended/minicom/minicom_2.7.bb @@ -0,0 +1,25 @@ +SUMMARY = "Text-based modem control and terminal emulation program" +DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems" +SECTION = "console/network" +DEPENDS = "ncurses virtual/libiconv" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \ + file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81" + +SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \ + file://allow.to.disable.lockdev.patch \ + file://0001-fix-minicom-h-v-return-value-is-not-0.patch \ + " + +SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d" +SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev" + +inherit autotools gettext pkgconfig + +do_install() { + for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done +} + diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch new file mode 100644 index 0000000000..e06869e3ad --- /dev/null +++ b/meta/recipes-extended/mktemp/files/disable-strip.patch @@ -0,0 +1,15 @@ +Upstream-Status: Inappropriate [configuration] + +diff --git a/Makefile.in b/Makefile.in +index 37b3cc9..f1026f3 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -95,7 +95,7 @@ install-dirs: + $(DESTDIR)$(mandir)/man1 + + install-binaries: $(PROG) +- $(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG) ++ $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) + + install-man: + $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch new file mode 100644 index 0000000000..f3b6dcc34a --- /dev/null +++ b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch @@ -0,0 +1,24 @@ +This fixes the parallel make install failure + +Upstream-Status: Accepted +http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528 + +Signed-off-by: Saul Wold + +Index: mktemp-1.7/Makefile.in +=================================================================== +--- mktemp-1.7.orig/Makefile.in ++++ mktemp-1.7/Makefile.in +@@ -94,10 +94,10 @@ install-dirs: + $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \ + $(DESTDIR)$(mandir)/man1 + +-install-binaries: $(PROG) ++install-binaries: install-dirs $(PROG) + $(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG) + +-install-man: ++install-man: install-dirs + $(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \ + $(DESTDIR)$(mandir)/man1/mktemp.1 + diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb new file mode 100644 index 0000000000..b53fc11b1e --- /dev/null +++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb @@ -0,0 +1,30 @@ +SUMMARY = "Enables safe temporary file creation from shell scripts" +HOMEPAGE = "http://www.mktemp.org/" +BUGTRACKER = "http://www.mktemp.org/bugs" +SECTION = "console/utils" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4" + +PR = "r3" + +SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \ + file://disable-strip.patch \ + file://fix-parallel-make.patch \ + " + +SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172" +SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675" + +inherit autotools update-alternatives + +EXTRA_OECONF = "--with-libc" + +do_install_append () { + install -d ${D}${base_bindir} + mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp + rmdir ${D}${bindir} +} + +ALTERNATIVE_${PN} = "mktemp" +ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.32.bb b/meta/recipes-extended/msmtp/msmtp_1.4.32.bb new file mode 100644 index 0000000000..4b7024ba85 --- /dev/null +++ b/meta/recipes-extended/msmtp/msmtp_1.4.32.bb @@ -0,0 +1,25 @@ +SUMMARY = "msmtp is an SMTP client" +DESCRIPTION = "A sendmail replacement for use in MTAs like mutt" +HOMEPAGE = "http://msmtp.sourceforge.net/" +SECTION = "console/network" + +LICENSE = "GPLv3" +DEPENDS = "zlib gnutls" + +#COPYING or Licence +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.bz2 \ + " + +SRC_URI[md5sum] = "aa60e22211118f222470439cea60f795" +SRC_URI[sha256sum] = "2bf0c5c7e78f9905f48de235a75111a1a88238793043bbeae00360b22f1a5f88" + +inherit gettext autotools update-alternatives pkgconfig + +EXTRA_OECONF += "--without-gnome-keyring --without-libidn" + +ALTERNATIVE_${PN} = "sendmail" +ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp" +ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch new file mode 100644 index 0000000000..06f81420e9 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch @@ -0,0 +1,32 @@ +From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001 +From: Jiri Popelka +Date: Wed, 7 Dec 2011 19:14:09 +0100 +Subject: [PATCH] ifconfig interface:0 del will remove the aliased IP on IA64 + +Upstream-Status: Backport + +commit 81814dc2b14843009193efd307d814c26baa61f0 from +git://git.code.sf.net/p/net-tools/code + +--- + ifconfig.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ifconfig.c b/ifconfig.c +index bc405c6..dae8922 100644 +--- a/ifconfig.c ++++ b/ifconfig.c +@@ -890,7 +890,9 @@ int main(int argc, char **argv) + continue; + } + +- memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long)); ++ /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */ ++ ip = 0; ++ memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); + + if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) { + fprintf(stderr, _("Interface %s not initialized\n"), +-- +1.7.9.5 + 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 @@ +/* +* config.h Automatically generated configuration includefile +* +* NET-TOOLS A collection of programs that form the base set of the +* NET-3 Networking Distribution for the LINUX operating +* system. +* +* DO NOT EDIT DIRECTLY +* +*/ + +/* + * + * Internationalization + * + * The net-tools package has currently been translated to French, + * German and Brazilian Portugese. Other translations are, of + * course, welcome. Answer `n' here if you have no support for + * internationalization on your system. + * + */ +#define I18N 1 + +/* + * + * Protocol Families. + * + */ +#define HAVE_AFUNIX 1 +#define HAVE_AFINET 1 +#define HAVE_AFINET6 1 +#define HAVE_AFIPX 0 +#define HAVE_AFATALK 0 +#define HAVE_AFAX25 0 +#define HAVE_AFNETROM 1 +#define HAVE_AFROSE 0 +#define HAVE_AFX25 0 +#define HAVE_AFECONET 0 +#define HAVE_AFDECnet 0 +#define HAVE_AFASH 0 + +/* + * + * Device Hardware types. + * + */ +#define HAVE_HWETHER 1 +#define HAVE_HWARC 1 +#define HAVE_HWSLIP 1 +#define HAVE_HWPPP 1 +#define HAVE_HWTUNNEL 1 +#define HAVE_HWSTRIP 0 +#define HAVE_HWTR 0 +#define HAVE_HWAX25 0 +#define HAVE_HWROSE 0 +#define HAVE_HWNETROM 1 +#define HAVE_HWX25 0 +#define HAVE_HWFR 1 +#define HAVE_HWSIT 0 +#define HAVE_HWFDDI 0 +#define HAVE_HWHIPPI 0 +#define HAVE_HWASH 0 +#define HAVE_HWHDLCLAPB 0 +#define HAVE_HWIRDA 1 +#define HAVE_HWEC 0 +#define HAVE_HWIB 0 + +/* + * + * Other Features. + * + */ +#define HAVE_FW_MASQUERADE 1 +#define HAVE_IP_TOOLS 1 +#define HAVE_MII 1 diff --git a/meta/recipes-extended/net-tools/net-tools/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 @@ +I18N=1 +HAVE_AFUNIX=1 +HAVE_AFINET=1 +HAVE_AFINET6=1 +# HAVE_AFIPX=0 +# HAVE_AFATALK=0 +# HAVE_AFAX25=0 +HAVE_AFNETROM=1 +# HAVE_AFROSE=0 +# HAVE_AFX25=0 +# HAVE_AFECONET=0 +# HAVE_AFDECnet=0 +# HAVE_AFASH=0 +HAVE_HWETHER=1 +HAVE_HWARC=1 +HAVE_HWSLIP=1 +HAVE_HWPPP=1 +HAVE_HWTUNNEL=1 +HAVE_HWSTRIP=1 +HAVE_HWTR=1 +# HAVE_HWAX25=0 +# HAVE_HWROSE=0 +HAVE_HWNETROM=1 +# HAVE_HWX25=0 +HAVE_HWFR=1 +# HAVE_HWSIT=0 +# HAVE_HWFDDI=0 +# HAVE_HWHIPPI=0 +# HAVE_HWASH=0 +# HAVE_HWHDLCLAPB=0 +HAVE_HWIRDA=1 +# HAVE_HWEC=0 +# HAVE_HWIB=0 +HAVE_FW_MASQUERADE=1 +HAVE_IP_TOOLS=1 +HAVE_MII=1 diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb new file mode 100644 index 0000000000..0e4ee754a4 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb @@ -0,0 +1,89 @@ +SUMMARY = "Basic networking tools" +DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" +HOMEPAGE = "http://net-tools.berlios.de/" +BUGTRACKER = "http://bugs.debian.org/net-tools" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ + file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" + +SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \ + ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \ + file://net-tools-config.h \ + file://net-tools-config.make \ + file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \ + " + +S = "${WORKDIR}/net-tools-1.60" + +SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d" +SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5" + +SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51" +SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f" + +inherit gettext + +# The Makefile is lame, no parallel build +PARALLEL_MAKE = "" + +# Unlike other Debian packages, net-tools *.diff.gz contains another series of +# patches maintained by quilt. So manually apply them before applying other local +# patches. Also remove all temp files before leaving, because do_patch() will pop +# up all previously applied patches in the start +nettools_do_patch() { + cd ${S} + quilt pop -a || true + if [ -d ${S}/.pc-nettools ]; then + rm -rf ${S}/.pc + mv ${S}/.pc-nettools ${S}/.pc + QUILT_PATCHES=${S}/debian/patches quilt pop -a + rm -rf ${S}/.pc ${S}/debian + fi + patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff + QUILT_PATCHES=${S}/debian/patches quilt push -a + mv ${S}/.pc ${S}/.pc-nettools +} + +do_unpack[cleandirs] += "${S}" + +# We invoke base do_patch at end, to incorporate any local patch +python do_patch() { + bb.build.exec_func('nettools_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} + +do_configure() { + # net-tools has its own config mechanism requiring "make config" + # we pre-generate desired options and copy to source directory instead + cp ${WORKDIR}/net-tools-config.h ${S}/config.h + cp ${WORKDIR}/net-tools-config.make ${S}/config.make +} + +do_compile() { + # net-tools use COPTS/LOPTS to allow adding custom options + export COPTS="$CFLAGS" + export LOPTS="$LDFLAGS" + unset CFLAGS + unset LDFLAGS + + oe_runmake +} + +do_install() { + oe_runmake 'BASEDIR=${D}' install +} + +inherit update-alternatives + +base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" +base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" + +ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" +python __anonymous() { + for prog in d.getVar('base_sbindir_progs', True).split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) + for prog in d.getVar('base_bindir_progs', True).split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) +} +ALTERNATIVE_PRIORITY = "100" + 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..03007aa4f4 --- /dev/null +++ b/meta/recipes-extended/newt/files/cross_ar.patch @@ -0,0 +1,58 @@ +Fix cross link using autoconf detected AR + +If building on 32bit host and creating 64bit libraries, the target +package builds should not invoke the 32bit hosts's ar. Specifically +you will get an error message like: + +x86_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 +libnewt.a: could not read symbols: Archive has no index; run ranlib to add one +collect2: error: ld returned 1 exit status + +Signed-off-by: Jason Wessel + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + Makefile.in | 3 ++- + configure.ac | 4 ++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ + CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + GNU_LD = @GNU_LD@ ++AR = @AR@ + + VERSION = @VERSION@ + TAG = r$(subst .,-,$(VERSION)) +@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH) + $(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt $(LIBTCL) -lpopt $(LIBS) + + $(LIBNEWT): $(LIBOBJS) +- ar rv $@ $^ ++ $(AR) rv $@ $^ + + newt.o $(SHAREDDIR)/newt.o: newt.c Makefile + +diff --git a/configure.ac b/configure.ac +index 92e6da8..cd83d57 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,10 @@ AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_GREP + AC_SYS_LARGEFILE ++AN_MAKEVAR([AR], [AC_PROG_AR]) ++AN_PROGRAM([ar], [AC_PROG_AR]) ++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) ++AC_PROG_AR + + # Are we using GNU ld? + AC_MSG_CHECKING([for GNU ld]) +-- +1.8.1.2 + 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..b0a1e8c105 --- /dev/null +++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch @@ -0,0 +1,37 @@ +Upstream-Status: Pending + +Author: dexuan.cui@intel.com +Date: Fri Apr 15 16:17:39 CST 2011 + +The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should +ensure the directory ${SHAREDDIR} exists. + +We need to push the patch to upstream. + +Signed-off-by: Dexuan Cui +Signed-off-by: Hongxu Jia +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -128,12 +128,12 @@ $(SHAREDDIR): + + sharedlib: $(LIBNEWTSH) + +-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) ++$(LIBNEWTSH): $(SHAREDOBJS) + $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS) + ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT) + ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME) + +-$(SHAREDDIR)/%.o : %.c ++$(SHAREDDIR)/%.o : %.c $(SHAREDDIR) + $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< + + install: $(LIBNEWT) install-sh whiptail +-- +1.8.1.2 + 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 @@ + +Upstream-Status: Pending + +Index: git/Makefile.in +=================================================================== +--- git.orig/Makefile.in ++++ git/Makefile.in +@@ -5,7 +5,7 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ ++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + GNU_LD = @GNU_LD@ + + VERSION = @VERSION@ diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.17.bb b/meta/recipes-extended/newt/libnewt-python_0.52.17.bb new file mode 100644 index 0000000000..d591fbd3d2 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt-python_0.52.17.bb @@ -0,0 +1,27 @@ +require recipes-extended/newt/libnewt_${PV}.bb + +SUMMARY .= " - python" +DEPENDS = "libnewt python" +RDEPENDS_${PN} += "python-core" + +inherit pythonnative python-dir + +EXTRA_OECONF += "--with-python" +EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}" + + +do_compile () { + VERSION="$(sed -n 's/^VERSION = //p' Makefile)" + oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snack.so +} + +do_install () { + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/ + install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/ +} + +PACKAGES_remove = "whiptail" + +FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" diff --git a/meta/recipes-extended/newt/libnewt_0.52.17.bb b/meta/recipes-extended/newt/libnewt_0.52.17.bb new file mode 100644 index 0000000000..28d5cf1a34 --- /dev/null +++ b/meta/recipes-extended/newt/libnewt_0.52.17.bb @@ -0,0 +1,54 @@ +SUMMARY = "A library for text mode user interfaces" + +DESCRIPTION = "Newt is a programming library for color text mode, widget based user \ +interfaces. Newt can be used to add stacked windows, entry widgets, \ +checkboxes, radio buttons, labels, plain text fields, scrollbars, \ +etc., to text mode user interfaces. This package also contains the \ +shared library needed by programs built with newt, as well as a \ +/usr/bin/dialog replacement called whiptail. Newt is based on the \ +slang library." + +HOMEPAGE = "https://fedorahosted.org/newt/" +SECTION = "libs" + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +# slang needs to be >= 2.2 +DEPENDS = "slang popt" + +PR = "r2" + +SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \ + file://remove_slang_include.patch \ + file://fix_SHAREDDIR.patch \ + file://cross_ar.patch \ +" + +SRC_URI[md5sum] = "f36d4d908965a0c89fd6fd8b61a6118b" +SRC_URI[sha256sum] = "69837973ef2ee2fa644426f1c3e48d2b18785ebcd382ef7fd01eb2e67d2d632b" + +S = "${WORKDIR}/newt-${PV}" + +EXTRA_OECONF = "--without-tcl --without-python" + +inherit autotools-brokensep + +export STAGING_INCDIR +export STAGING_LIBDIR + +export BUILD_SYS +export HOST_SYS + +PACKAGES_prepend = "whiptail " + +do_configure_prepend() { + sh autogen.sh +} + +do_compile_prepend() { + # Make sure the recompile is OK + rm -f ${B}/.depend +} + +FILES_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..ad3f240c04 --- /dev/null +++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb @@ -0,0 +1,163 @@ +# +# Copyright (C) 2010 Intel Corporation +# + +SUMMARY = "Standard full-featured Linux system" +DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system" +PR = "r6" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-core-full-cmdline \ + packagegroup-core-full-cmdline-libs \ + packagegroup-core-full-cmdline-utils \ + packagegroup-core-full-cmdline-extended \ + packagegroup-core-full-cmdline-dev-utils \ + packagegroup-core-full-cmdline-multiuser \ + packagegroup-core-full-cmdline-initscripts \ + packagegroup-core-full-cmdline-sys-services \ + " + +python __anonymous () { + # For backwards compatibility after rename + namemap = {} + namemap["packagegroup-core-full-cmdline"] = "packagegroup-core-basic" + namemap["packagegroup-core-full-cmdline-libs"] = "packagegroup-core-basic-libs" + namemap["packagegroup-core-full-cmdline-utils"] = "packagegroup-core-basic-utils" + namemap["packagegroup-core-full-cmdline-extended"] = "packagegroup-core-basic-extended" + namemap["packagegroup-core-full-cmdline-dev-utils"] = "packagegroup-core-dev-utils" + namemap["packagegroup-core-full-cmdline-multiuser"] = "packagegroup-core-multiuser" + namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts" + namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services" + + packages = d.getVar("PACKAGES", True).split() + for pkg in packages: + if pkg.endswith('-dev'): + mapped = namemap.get(pkg[:-4], None) + if mapped: + mapped += '-dev' + elif pkg.endswith('-dbg'): + mapped = namemap.get(pkg[:-4], None) + if mapped: + mapped += '-dbg' + else: + mapped = namemap.get(pkg, None) + + if mapped: + oldtaskname = mapped.replace("packagegroup-core", "task-core") + mapstr = " %s %s" % (mapped, oldtaskname) + d.appendVar("RPROVIDES_%s" % pkg, mapstr) + d.appendVar("RREPLACES_%s" % pkg, mapstr) + d.appendVar("RCONFLICTS_%s" % pkg, mapstr) +} + + +RDEPENDS_packagegroup-core-full-cmdline = "\ + packagegroup-core-full-cmdline-libs \ + packagegroup-core-full-cmdline-utils \ + packagegroup-core-full-cmdline-extended \ + packagegroup-core-full-cmdline-dev-utils \ + packagegroup-core-full-cmdline-multiuser \ + packagegroup-core-full-cmdline-initscripts \ + packagegroup-core-full-cmdline-sys-services \ + " + +RDEPENDS_packagegroup-core-full-cmdline-libs = "\ + glib-2.0 \ + " + +RDEPENDS_packagegroup-core-full-cmdline-utils = "\ + bash \ + acl \ + attr \ + bc \ + coreutils \ + cpio \ + e2fsprogs \ + ed \ + file \ + findutils \ + gawk \ + gmp \ + grep \ + makedevs \ + mc \ + mc-fish \ + mc-helpers \ + mc-helpers-perl \ + mc-helpers-python \ + mktemp \ + ncurses \ + net-tools \ + pax \ + popt \ + procps \ + psmisc \ + sed \ + tar \ + time \ + util-linux \ + zlib \ + " + +RDEPENDS_packagegroup-core-full-cmdline-extended = "\ + iproute2 \ + iputils \ + iptables \ + module-init-tools \ + openssl \ + " + +RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\ + byacc \ + diffutils \ + m4 \ + make \ + patch \ + " + +VIRTUAL-RUNTIME_initscripts ?= "initscripts" +VIRTUAL-RUNTIME_init_manager ?= "sysvinit" +VIRTUAL-RUNTIME_login_manager ?= "busybox" +VIRTUAL-RUNTIME_syslog ?= "sysklogd" +RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\ + ${VIRTUAL-RUNTIME_initscripts} \ + ${VIRTUAL-RUNTIME_init_manager} \ + ethtool \ + ${VIRTUAL-RUNTIME_login_manager} \ + ${VIRTUAL-RUNTIME_syslog} \ + " + +RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\ + cracklib \ + gzip \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \ + shadow \ + sudo \ + " + +RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\ + at \ + bzip2 \ + cronie \ + dbus \ + dbus-glib \ + python-dbus \ + elfutils \ + gzip \ + less \ + libcap \ + libevent \ + lighttpd \ + logrotate \ + nfs-utils \ + pciutils \ + libpcre \ + rpcbind \ + sysfsutils \ + tcp-wrappers \ + tzdata \ + " + 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..e0f32e0a1d --- /dev/null +++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb @@ -0,0 +1,266 @@ +# +# Copyright (C) 2010 Intel Corporation +# + +SUMMARY = "Linux Standard Base (LSB)" +DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification" +PR = "r10" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-core-lsb \ + packagegroup-core-sys-extended \ + packagegroup-core-db \ + packagegroup-core-perl \ + packagegroup-core-python \ + packagegroup-core-tcl \ + packagegroup-core-lsb-misc \ + packagegroup-core-lsb-core \ + packagegroup-core-lsb-perl \ + packagegroup-core-lsb-python \ + packagegroup-core-lsb-desktop \ + packagegroup-core-lsb-runtime-add \ + " + + +RDEPENDS_packagegroup-core-lsb = "\ + packagegroup-core-sys-extended \ + packagegroup-core-db \ + packagegroup-core-perl \ + packagegroup-core-python \ + packagegroup-core-tcl \ + packagegroup-core-lsb-misc \ + packagegroup-core-lsb-core \ + packagegroup-core-lsb-perl \ + packagegroup-core-lsb-python \ + packagegroup-core-lsb-desktop \ + packagegroup-core-lsb-runtime-add \ + " + + +RDEPENDS_packagegroup-core-sys-extended = "\ + curl \ + dhcp-client \ + gamin \ + hdparm \ + libaio \ + lrzsz \ + lzo \ + mc \ + mc-fish \ + mc-helpers \ + mc-helpers-perl \ + mc-helpers-python \ + mdadm \ + minicom \ + neon \ + parted \ + ${PTH} \ + quota \ + screen \ + setserial \ + sysstat \ + udev-extraconf \ + unzip \ + watchdog \ + wget \ + which \ + xinetd \ + zip \ + " + +RDEPENDS_packagegroup-core-db = "\ + db \ + sqlite3 \ + " + +RDEPENDS_packagegroup-core-perl = "\ + gdbm \ + perl \ + zlib \ + " + + +RDEPENDS_packagegroup-core-python = "\ + expat \ + gdbm \ + gmp \ + ncurses \ + openssl \ + python \ + readline \ + zip \ + " + +RDEPENDS_packagegroup-core-tcl = "\ + tcl \ + " + +# Miscellaneous packages required by LSB (or LSB tests) +RDEPENDS_packagegroup-core-lsb-misc = "\ + chkconfig \ + gettext \ + gettext-runtime \ + groff \ + lsbinitscripts \ + lsbtest \ + lsof \ + strace \ + libusb1 \ + usbutils \ + rpm \ + " + +SUMMARY_packagegroup-core-lsb-core = "LSB Core" +DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \ + specified in the LSB Core specification" +RDEPENDS_packagegroup-core-lsb-core = "\ + at \ + bash \ + bc \ + binutils \ + binutils-symlinks \ + coreutils \ + cpio \ + cronie \ + cups \ + diffutils \ + ed \ + glibc-utils \ + elfutils \ + file \ + findutils \ + fontconfig-utils \ + foomatic-filters \ + gawk \ + ghostscript \ + grep \ + gzip \ + localedef \ + lsb \ + m4 \ + mailx \ + make \ + man \ + man-pages \ + mktemp \ + msmtp \ + patch \ + pax \ + procps \ + psmisc \ + sed \ + shadow \ + tar \ + time \ + util-linux \ + xdg-utils \ + \ + glibc \ + libgcc \ + libpam \ + libxml2 \ + ncurses \ + zlib \ + nspr \ + libpng12 \ + nss \ +" + +SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)" +DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \ + specified in the LSB Runtime languages specification (Perl parts)" +RDEPENDS_packagegroup-core-lsb-perl = "\ + perl \ + perl-modules \ + perl-misc \ + perl-pod \ + perl-dev \ + perl-doc \ +" + +SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)" +DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \ + specified in the LSB Runtime languages specification (Python parts)" +RDEPENDS_packagegroup-core-lsb-python = "\ + python \ + python-modules \ + python-misc \ +" + +def get_libqt3(d): + if 'linuxstdbase' in d.getVar('DISTROOVERRIDES') or "": + if 'qt3' in d.getVar('BBFILE_COLLECTIONS') or "": + return 'libqt-mt3' + + bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \ + 'libraries. Its intended use is for passing LSB tests as Qt3 is' \ + 'a requirement for LSB.') + return '' + +QT4PKGS = " \ + libqtcore4 \ + libqtgui4 \ + libqtsql4 \ + libqtsvg4 \ + libqtxml4 \ + libqtnetwork4 \ + qt4-plugin-sqldriver-sqlite \ + ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \ + " +QT4PKGS_mips64 = "" +QT4PKGS_mips64n32 = "" + +SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop" +DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \ + specified in the LSB Desktop specification" +RDEPENDS_packagegroup-core-lsb-desktop = "\ + libxt \ + libxxf86vm \ + libdrm \ + libglu \ + libxi \ + libxtst \ + libx11-locale \ + xorg-minimal-fonts \ + gdk-pixbuf-loader-ico \ + gdk-pixbuf-loader-bmp \ + gdk-pixbuf-loader-ani \ + gdk-pixbuf-xlib \ + liberation-fonts \ + gtk+ \ + atk \ + libasound \ + ${QT4PKGS} \ + ${@get_libqt3(d)} \ +" + +RDEPENDS_packagegroup-core-lsb-runtime-add = "\ + ldd \ + pam-plugin-wheel \ + e2fsprogs-mke2fs \ + mkfontdir \ + liburi-perl \ + libxml-parser-perl \ + libxml-perl \ + libxml-sax-perl \ + glibc-localedatas \ + glibc-gconvs \ + glibc-charmaps \ + glibc-binaries \ + glibc-localedata-posix \ + glibc-extra-nss \ + glibc-pcprofile \ + libclass-isa-perl \ + libenv-perl \ + libdumpvalue-perl \ + libfile-checktree-perl \ + libi18n-collate-perl \ + libpod-plainer-perl \ +" + +PTH = "pth" +PTH_libc-uclibc = "" + 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 @@ +Backport from linux-pam git repo. + +[YOCTO #4107] + +Upstream-Status: Backport + +Signed-off-by: Kang Kai + +From 8dc056c1c8bc7acb66c4decc49add2c3a24e6310 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Fri, 8 Feb 2013 15:04:26 +0100 +Subject: [PATCH] Add checks for crypt() returning NULL. + +modules/pam_pwhistory/opasswd.c (compare_password): Add check for crypt() NULL return. +modules/pam_unix/bigcrypt.c (bigcrypt): Likewise. +--- + modules/pam_pwhistory/opasswd.c | 2 +- + modules/pam_unix/bigcrypt.c | 9 +++++++++ + 2 files changed, 10 insertions(+), 1 deletions(-) + +diff --git a/modules/pam_pwhistory/opasswd.c b/modules/pam_pwhistory/opasswd.c +index 274fdb9..836d713 100644 +--- a/modules/pam_pwhistory/opasswd.c ++++ b/modules/pam_pwhistory/opasswd.c +@@ -108,7 +108,7 @@ compare_password(const char *newpass, const char *oldpass) + outval = crypt (newpass, oldpass); + #endif + +- return strcmp(outval, oldpass) == 0; ++ return outval != NULL && strcmp(outval, oldpass) == 0; + } + + /* Check, if the new password is already in the opasswd file. */ +diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c +index e10d1c5..e1d57a0 100644 +--- a/modules/pam_unix/bigcrypt.c ++++ b/modules/pam_unix/bigcrypt.c +@@ -109,6 +109,10 @@ char *bigcrypt(const char *key, const char *salt) + #else + tmp_ptr = crypt(plaintext_ptr, salt); /* libc crypt() */ + #endif ++ if (tmp_ptr == NULL) { ++ free(dec_c2_cryptbuf); ++ return NULL; ++ } + /* and place in the static area */ + strncpy(cipher_ptr, tmp_ptr, 13); + cipher_ptr += ESEGMENT_SIZE + SALT_SIZE; +@@ -130,6 +134,11 @@ char *bigcrypt(const char *key, const char *salt) + #else + tmp_ptr = crypt(plaintext_ptr, salt_ptr); + #endif ++ if (tmp_ptr == NULL) { ++ _pam_overwrite(dec_c2_cryptbuf); ++ free(dec_c2_cryptbuf); ++ return NULL; ++ } + + /* skip the salt for seg!=0 */ + strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE); +-- +1.7.5.4 + 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 @@ +Avoid the failure: + +| mkdir -p /etc/security/namespace.d +| mkdir: cannot create directory `/etc/security/namespace.d': Permission denied + +if /etc/security/namespace.d doesn't exist. The DESTDIR prefix is missing. + +RP 2012/8/19 + +Upstream-Status: Pending + +Index: Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am +=================================================================== +--- Linux-PAM-1.1.6.orig/modules/pam_namespace/Makefile.am 2012-08-15 11:08:43.000000000 +0000 ++++ Linux-PAM-1.1.6/modules/pam_namespace/Makefile.am 2012-08-19 12:25:32.311038943 +0000 +@@ -40,7 +40,7 @@ + secureconf_SCRIPTS = namespace.init + + install-data-local: +- mkdir -p $(namespaceddir) ++ mkdir -p $(DESTDIR)$(namespaceddir) + endif + + 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 @@ +Fix the build error when a separate build directory is used: + +Making 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 +/usr/bin/install: cannot stat `run-xtests.sh': No such file or directory +/usr/bin/install: cannot stat `tst-pam_dispatch1.pamd': No such file or directory +/usr/bin/install: cannot stat `tst-pam_dispatch2.pamd': No such file or directory + +Upstream-Status: Pending + +RP 2013/03/21 + +Index: Linux-PAM-1.1.6/xtests/Makefile.am +=================================================================== +--- Linux-PAM-1.1.6.orig/xtests/Makefile.am 2013-03-08 12:26:30.360266000 +0000 ++++ Linux-PAM-1.1.6/xtests/Makefile.am 2013-03-21 11:39:58.557166650 +0000 +@@ -59,7 +59,7 @@ + install_xtests: + $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests + for file in $(EXTRA_DIST) ; do \ +- $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ $(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ + done + for file in $(XTESTS); do \ + $(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 @@ +Upstream-Status: Backport + +Fix for CVE-2010-4708 + +Change default for user_readenv to 0 and document the +new default for user_readenv. + +This fix is got from: +http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env +/pam_env.c?r1=1.22&r2=1.23&view=patch +http://pam.cvs.sourceforge.net/viewvc/pam/Linux-PAM/modules/pam_env +/pam_env.8.xml?r1=1.7&r2=1.8&view=patch + +Signed-off-by: Wenzong Fan + +--- +--- a/modules/pam_env/pam_env.c 2012-09-05 13:57:47.000000000 +0800 ++++ b/modules/pam_env/pam_env.c 2012-09-05 13:58:05.000000000 +0800 +@@ -10,7 +10,7 @@ + #define DEFAULT_READ_ENVFILE 1 + + #define DEFAULT_USER_ENVFILE ".pam_environment" +-#define DEFAULT_USER_READ_ENVFILE 1 ++#define DEFAULT_USER_READ_ENVFILE 0 + + #include "config.h" + +--- a/modules/pam_env/pam_env.8.xml 2012-09-05 13:58:24.000000000 +0800 ++++ b/modules/pam_env/pam_env.8.xml 2012-09-05 13:59:36.000000000 +0800 +@@ -147,7 +147,10 @@ + + + Turns on or off the reading of the user specific environment +- file. 0 is off, 1 is on. By default this option is on. ++ file. 0 is off, 1 is on. By default this option is off as user ++ supplied environment variables in the PAM environment could affect ++ behavior of subsequent modules in the stack without the consent ++ of the system administrator. + + + diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch new file mode 100644 index 0000000000..680029ae0d --- /dev/null +++ b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch @@ -0,0 +1,226 @@ +From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001 +From: Wenzong Fan +Date: Fri, 12 Sep 2014 05:35:05 -0400 +Subject: [PATCH] libpam/xtests: remove bash dependency + +There's not bash specific syntax in the xtest scripts: + + # after below patches applied: + $ cd Linux-PAM-1.1.6/xtests + $ checkbashisms *.sh + No output + +Just remove the runtime dependency to bash. + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan +--- + xtests/run-xtests.sh | 2 +- + xtests/tst-pam_access1.sh | 2 +- + xtests/tst-pam_access2.sh | 2 +- + xtests/tst-pam_access3.sh | 2 +- + xtests/tst-pam_access4.sh | 2 +- + xtests/tst-pam_assemble_line1.sh | 2 +- + xtests/tst-pam_group1.sh | 2 +- + xtests/tst-pam_limits1.sh | 2 +- + xtests/tst-pam_pwhistory1.sh | 2 +- + xtests/tst-pam_substack1.sh | 2 +- + xtests/tst-pam_substack2.sh | 2 +- + xtests/tst-pam_substack3.sh | 2 +- + xtests/tst-pam_substack4.sh | 2 +- + xtests/tst-pam_substack5.sh | 2 +- + xtests/tst-pam_succeed_if1.sh | 2 +- + xtests/tst-pam_unix1.sh | 2 +- + xtests/tst-pam_unix2.sh | 2 +- + xtests/tst-pam_unix3.sh | 2 +- + xtests/tst-pam_unix4.sh | 2 +- + 19 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh +index 3a89057..1cf8684 100755 +--- a/xtests/run-xtests.sh ++++ b/xtests/run-xtests.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + SRCDIR=$1 + shift 1 +diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh +index 180d256..70521d2 100755 +--- a/xtests/tst-pam_access1.sh ++++ b/xtests/tst-pam_access1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/groupadd tstpamaccess + /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1 +diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh +index 0a30275..7e3e60f 100755 +--- a/xtests/tst-pam_access2.sh ++++ b/xtests/tst-pam_access2.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/groupadd tstpamaccess + /usr/sbin/useradd -p '!!' tstpamaccess2 +diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh +index 348e0c3..3630e2e 100755 +--- a/xtests/tst-pam_access3.sh ++++ b/xtests/tst-pam_access3.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd -p '!!' tstpamaccess3 + ./tst-pam_access3 +diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh +index 61e7b44..4538df4 100755 +--- a/xtests/tst-pam_access4.sh ++++ b/xtests/tst-pam_access4.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd -p '!!' tstpamaccess4 + ./tst-pam_access4 +diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh +index 248d47e..dc2a675 100755 +--- a/xtests/tst-pam_assemble_line1.sh ++++ b/xtests/tst-pam_assemble_line1.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authfail tst-pam_assemble_line1 +diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh +index b76377f..44faca9 100755 +--- a/xtests/tst-pam_group1.sh ++++ b/xtests/tst-pam_group1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/groupadd tstpamgrpg + /usr/sbin/useradd -p '!!' tstpamgrp +diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh +index 4faa822..32c021d 100755 +--- a/xtests/tst-pam_limits1.sh ++++ b/xtests/tst-pam_limits1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd -p '!!' tstpamlimits + ./tst-pam_limits1 +diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh +index ddb3b8b..0f212e2 100644 +--- a/xtests/tst-pam_pwhistory1.sh ++++ b/xtests/tst-pam_pwhistory1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd tstpampwhistory + ./tst-pam_pwhistory1 +diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh +index 5260175..f1b72a7 100755 +--- a/xtests/tst-pam_substack1.sh ++++ b/xtests/tst-pam_substack1.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authfail tst-pam_substack1 +diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh +index c02f597..3804fa7 100755 +--- a/xtests/tst-pam_substack2.sh ++++ b/xtests/tst-pam_substack2.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authsucceed tst-pam_substack2 +diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh +index 0e572aa..aa48e8e 100755 +--- a/xtests/tst-pam_substack3.sh ++++ b/xtests/tst-pam_substack3.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authsucceed tst-pam_substack3 +diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh +index a3ef08a..958a07a 100755 +--- a/xtests/tst-pam_substack4.sh ++++ b/xtests/tst-pam_substack4.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authsucceed tst-pam_substack4 +diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh +index e2714fd..7e0da74 100755 +--- a/xtests/tst-pam_substack5.sh ++++ b/xtests/tst-pam_substack5.sh +@@ -1,3 +1,3 @@ +-#!/bin/bash ++#!/bin/sh + + exec ./tst-pam_authfail tst-pam_substack5 +diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh +index a643b2e..58e57b4 100755 +--- a/xtests/tst-pam_succeed_if1.sh ++++ b/xtests/tst-pam_succeed_if1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd -p '!!' tstpamtest + /usr/sbin/useradd -p '!!' pamtest +diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh +index f75bd84..72deac0 100755 +--- a/xtests/tst-pam_unix1.sh ++++ b/xtests/tst-pam_unix1.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + /usr/sbin/useradd -p '!!' tstpamunix + ./tst-pam_unix1 +diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh +index 7093155..c04d6e6 100755 +--- a/xtests/tst-pam_unix2.sh ++++ b/xtests/tst-pam_unix2.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # pamunix0 = 0aXKZztA.d1KY + /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix +diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh +index ef4a07c..b52db2b 100755 +--- a/xtests/tst-pam_unix3.sh ++++ b/xtests/tst-pam_unix3.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU + /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix +diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh +index 787c2f9..e7976fd 100755 +--- a/xtests/tst-pam_unix4.sh ++++ b/xtests/tst-pam_unix4.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU + /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix +-- +1.7.9.5 + 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 @@ +This patch is used to create a new sub package libpam-xtests to do more checks. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai +--- Linux-PAM-1.1.4/xtests/Makefile.am.orig 2011-07-19 17:00:09.619980001 +0800 ++++ Linux-PAM-1.1.4/xtests/Makefile.am 2011-07-19 16:54:00.229979998 +0800 +@@ -7,7 +7,7 @@ + AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \ + -L$(top_builddir)/libpam_misc -lpam_misc + +-CLEANFILES = *~ $(XTESTS) ++CLEANFILES = *~ + + EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ + tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ +@@ -51,3 +51,18 @@ + + xtests: $(XTESTS) run-xtests.sh + "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} ++ ++all: $(XTESTS) ++ ++install: install_xtests ++ ++install_xtests: ++ $(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests ++ for file in $(EXTRA_DIST) ; do \ ++ $(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ done ++ for file in $(XTESTS); do \ ++ $(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \ ++ done ++ ++.PHONY: all install_xtests diff --git a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch new file mode 100644 index 0000000000..5e551ac48f --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch @@ -0,0 +1,97 @@ +innetgr may not be there so make sure that when innetgr is not present +then we inform about it and not use it. + +-Khem + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c +=================================================================== +--- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c ++++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c +@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p + } + /* If buffer starts with @, we are using netgroups */ + if (buffer[0] == '@') +- good &= innetgr (&buffer[1], NULL, user, NULL); ++#ifdef HAVE_INNETGR ++ good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); ++#endif + /* otherwise, if the buffer starts with %, it's a UNIX group */ + else if (buffer[0] == '%') + good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); +Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c +=================================================================== +--- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c ++++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c +@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const + } + /* If buffer starts with @, we are using netgroups */ + if (buffer[0] == '@') +- good &= innetgr (&buffer[1], NULL, user, NULL); ++#ifdef HAVE_INNETGR ++ good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); ++#endif + else +- good &= logic_field(pamh, user, buffer, count, is_same); ++ good &= logic_field(pamh, user, buffer, count, is_same); + D(("with user: %s", good ? "passes":"fails" )); + + /* here we get the time field */ +Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c +=================================================================== +--- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c ++++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c +@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh, + } + /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */ + static int +-evaluate_innetgr(const char *host, const char *user, const char *group) ++evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 1) + return PAM_SUCCESS; ++#else ++ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); ++#endif ++ + return PAM_AUTH_ERR; + } + /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ + static int +-evaluate_notinnetgr(const char *host, const char *user, const char *group) ++evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 0) + return PAM_SUCCESS; ++#else ++ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support"); ++#endif + return PAM_AUTH_ERR; + } + +@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug, + const void *rhost; + if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) + rhost = NULL; +- return evaluate_innetgr(rhost, user, right); ++ return evaluate_innetgr(pamh, rhost, user, right); + } + /* (Rhost, user) is not in this group. */ + if (strcasecmp(qual, "notinnetgr") == 0) { + const void *rhost; + if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS) + rhost = NULL; +- return evaluate_notinnetgr(rhost, user, right); ++ return evaluate_notinnetgr(pamh, rhost, user, right); + } + /* Fail closed. */ + return PAM_SERVICE_ERR; diff --git a/meta/recipes-extended/pam/libpam/pam-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 @@ +Description: extract the securetty logic for use with the "nullok_secure" option + introduced in the "055_pam_unix_nullok_secure" patch. + +Upstream-Status: Pending + +Signed-off-by: Ming Liu +=================================================================== +diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am +--- a/modules/pam_securetty/Makefile.am 2013-07-05 11:08:23.224483237 +0800 ++++ b/modules/pam_securetty/Makefile.am 2013-07-05 11:15:21.304486456 +0800 +@@ -24,6 +24,10 @@ endif + securelib_LTLIBRARIES = pam_securetty.la + pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam + ++pam_securetty_la_SOURCES = \ ++ pam_securetty.c \ ++ tty_secure.c ++ + if ENABLE_REGENERATE_MAN + noinst_DATA = README + README: pam_securetty.8.xml +diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c +--- a/modules/pam_securetty/pam_securetty.c 2013-07-05 11:07:50.064483568 +0800 ++++ b/modules/pam_securetty/pam_securetty.c 2013-07-05 11:12:23.994483344 +0800 +@@ -1,7 +1,5 @@ + /* pam_securetty module */ + +-#define SECURETTY_FILE "/etc/securetty" +-#define TTY_PREFIX "/dev/" + #define CMDLINE_FILE "/proc/cmdline" + #define CONSOLEACTIVE_FILE "/sys/class/tty/console/active" + +@@ -40,6 +38,9 @@ + #include + #include + ++extern int _pammodutil_tty_secure(const pam_handle_t *pamh, ++ const char *uttyname); ++ + #define PAM_DEBUG_ARG 0x0001 + #define PAM_NOCONSOLE_ARG 0x0002 + +@@ -73,11 +74,7 @@ securetty_perform_check (pam_handle_t *p + const char *username; + const char *uttyname; + const void *void_uttyname; +- char ttyfileline[256]; +- char ptname[256]; +- struct stat ttyfileinfo; + struct passwd *user_pwd; +- FILE *ttyfile; + + /* log a trail for debugging */ + if (ctrl & PAM_DEBUG_ARG) { +@@ -105,50 +102,7 @@ securetty_perform_check (pam_handle_t *p + return PAM_SERVICE_ERR; + } + +- /* The PAM_TTY item may be prefixed with "/dev/" - skip that */ +- if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) { +- uttyname += sizeof(TTY_PREFIX)-1; +- } +- +- if (stat(SECURETTY_FILE, &ttyfileinfo)) { +- pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", SECURETTY_FILE); +- return PAM_SUCCESS; /* for compatibility with old securetty handling, +- this needs to succeed. But we still log the +- error. */ +- } +- +- if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) { +- /* If the file is world writable or is not a +- normal file, return error */ +- pam_syslog(pamh, LOG_ERR, +- "%s is either world writable or not a normal file", +- SECURETTY_FILE); +- return PAM_AUTH_ERR; +- } +- +- ttyfile = fopen(SECURETTY_FILE,"r"); +- if (ttyfile == NULL) { /* Check that we opened it successfully */ +- pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE); +- return PAM_SERVICE_ERR; +- } +- +- if (isdigit(uttyname[0])) { +- snprintf(ptname, sizeof(ptname), "pts/%s", uttyname); +- } else { +- ptname[0] = '\0'; +- } +- +- retval = 1; +- +- while ((fgets(ttyfileline, sizeof(ttyfileline)-1, ttyfile) != NULL) +- && retval) { +- if (ttyfileline[strlen(ttyfileline) - 1] == '\n') +- ttyfileline[strlen(ttyfileline) - 1] = '\0'; +- +- retval = ( strcmp(ttyfileline, uttyname) +- && (!ptname[0] || strcmp(ptname, uttyname)) ); +- } +- fclose(ttyfile); ++ retval = _pammodutil_tty_secure(pamh, uttyname); + + if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) { + FILE *cmdlinefile; +diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c +--- a/modules/pam_securetty/tty_secure.c 1970-01-01 08:30:00.000000000 +0830 ++++ b/modules/pam_securetty/tty_secure.c 2013-07-05 11:14:21.534482900 +0800 +@@ -0,0 +1,90 @@ ++/* ++ * A function to determine if a particular line is in /etc/securetty ++ */ ++ ++ ++#define SECURETTY_FILE "/etc/securetty" ++#define TTY_PREFIX "/dev/" ++ ++/* This function taken out of pam_securetty by Sam Hartman ++ * */ ++/* ++ * by Elliot Lee , Red Hat Software. ++ * July 25, 1996. ++ * Slight modifications AGM. 1996/12/3 ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern int _pammodutil_tty_secure(const pam_handle_t *pamh, ++ const char *uttyname); ++ ++int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname) ++{ ++ int retval = PAM_AUTH_ERR; ++ char ttyfileline[256]; ++ char ptname[256]; ++ struct stat ttyfileinfo; ++ FILE *ttyfile; ++ /* The PAM_TTY item may be prefixed with "/dev/" - skip that */ ++ if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) ++ uttyname += sizeof(TTY_PREFIX)-1; ++ ++ if (stat(SECURETTY_FILE, &ttyfileinfo)) { ++ pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", ++ SECURETTY_FILE); ++ return PAM_SUCCESS; /* for compatibility with old securetty handling, ++ this needs to succeed. But we still log the ++ error. */ ++ } ++ ++ if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) { ++ /* If the file is world writable or is not a ++ normal file, return error */ ++ pam_syslog(pamh, LOG_ERR, ++ "%s is either world writable or not a normal file", ++ SECURETTY_FILE); ++ return PAM_AUTH_ERR; ++ } ++ ++ ttyfile = fopen(SECURETTY_FILE,"r"); ++ if(ttyfile == NULL) { /* Check that we opened it successfully */ ++ pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE); ++ return PAM_SERVICE_ERR; ++ } ++ ++ if (isdigit(uttyname[0])) { ++ snprintf(ptname, sizeof(ptname), "pts/%s", uttyname); ++ } else { ++ ptname[0] = '\0'; ++ } ++ ++ retval = 1; ++ ++ while ((fgets(ttyfileline,sizeof(ttyfileline)-1, ttyfile) != NULL) ++ && retval) { ++ if(ttyfileline[strlen(ttyfileline) - 1] == '\n') ++ ttyfileline[strlen(ttyfileline) - 1] = '\0'; ++ retval = ( strcmp(ttyfileline,uttyname) ++ && (!ptname[0] || strcmp(ptname, uttyname)) ); ++ } ++ fclose(ttyfile); ++ ++ if(retval) { ++ retval = PAM_AUTH_ERR; ++ } ++ ++ return retval; ++} 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 @@ +Debian patch to add a new 'nullok_secure' option to pam_unix, which +accepts users with null passwords only when the applicant is connected +from a tty listed in /etc/securetty. + +Authors: Sam Hartman , + Steve Langasek + +Upstream-Status: Pending + +Signed-off-by: Ming Liu +=================================================================== +diff -urpN a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am +--- a/modules/pam_unix/Makefile.am 2013-07-05 09:51:31.014483164 +0800 ++++ b/modules/pam_unix/Makefile.am 2013-07-05 10:26:12.884484000 +0800 +@@ -30,7 +30,8 @@ if HAVE_VERSIONING + pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map + endif + pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \ +- @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) ++ @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \ ++ ../pam_securetty/tty_secure.lo + + securelib_LTLIBRARIES = pam_unix.la + +diff -urpN a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8 +--- a/modules/pam_unix/pam_unix.8 2013-07-05 09:52:16.825108201 +0800 ++++ b/modules/pam_unix/pam_unix.8 2013-07-05 10:28:34.724483774 +0800 +@@ -220,7 +220,14 @@ A little more extreme than debug\&. + .RS 4 + The default action of this module is to not permit the user access to a service if their official password is blank\&. The + \fBnullok\fR +-argument overrides this default\&. ++argument overrides this default and allows any user with a blank password to access the service\&. ++.RE ++.PP ++\fBnullok_secure\fR ++.RS 4 ++The default action of this module is to not permit the user access to a service if their official password is blank\&. The ++\fBnullok_secure\fR ++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\&. + .RE + .PP + \fBtry_first_pass\fR +diff -urpN a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml +--- a/modules/pam_unix/pam_unix.8.xml 2013-07-05 09:52:38.775108523 +0800 ++++ b/modules/pam_unix/pam_unix.8.xml 2013-07-05 10:30:23.084483630 +0800 +@@ -135,7 +135,24 @@ + + The default action of this module is to not permit the + user access to a service if their official password is blank. +- The argument overrides this default. ++ The argument overrides this default ++ and allows any user with a blank password to access the ++ service. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ The default action of this module is to not permit the ++ user access to a service if their official password is blank. ++ The 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. + + + +diff -urpN a/modules/pam_unix/README b/modules/pam_unix/README +--- a/modules/pam_unix/README 2013-07-05 09:51:52.205107846 +0800 ++++ b/modules/pam_unix/README 2013-07-05 10:27:10.774484537 +0800 +@@ -57,7 +57,16 @@ nullok + + The default action of this module is to not permit the user access to a + service if their official password is blank. The nullok argument overrides +- this default. ++ this default and allows any user with a blank password to access the ++ service. ++ ++nullok_secure ++ ++ The default action of this module is to not permit the user access to a ++ service if their official password is blank. The nullok_secure 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. + + try_first_pass + +diff -urpN a/modules/pam_unix/support.c b/modules/pam_unix/support.c +--- a/modules/pam_unix/support.c 2013-07-05 09:50:49.134482523 +0800 ++++ b/modules/pam_unix/support.c 2013-07-05 09:56:26.924484267 +0800 +@@ -84,14 +84,22 @@ int _set_ctrl(pam_handle_t *pamh, int fl + /* now parse the arguments to this module */ + + for (; argc-- > 0; ++argv) { +- int j; ++ int j, sl; + + D(("pam_unix arg: %s", *argv)); + + for (j = 0; j < UNIX_CTRLS_; ++j) { +- if (unix_args[j].token +- && !strncmp(*argv, unix_args[j].token, strlen(unix_args[j].token))) { +- break; ++ if (unix_args[j].token) { ++ sl = strlen(unix_args[j].token); ++ if (unix_args[j].token[sl-1] == '=') { ++ /* exclude argument from comparison */ ++ if (!strncmp(*argv, unix_args[j].token, sl)) ++ break; ++ } else { ++ /* compare full strings */ ++ if (!strcmp(*argv, unix_args[j].token)) ++ break; ++ } + } + } + +@@ -461,6 +469,7 @@ static int _unix_run_helper_binary(pam_h + child = fork(); + if (child == 0) { + int i=0; ++ int nullok = off(UNIX__NONULL, ctrl); + struct rlimit rlim; + static char *envp[] = { NULL }; + char *args[] = { NULL, NULL, NULL, NULL }; +@@ -488,7 +497,18 @@ static int _unix_run_helper_binary(pam_h + /* exec binary helper */ + args[0] = strdup(CHKPWD_HELPER); + args[1] = x_strdup(user); +- if (off(UNIX__NONULL, ctrl)) { /* this means we've succeeded */ ++ ++ if (on(UNIX_NULLOK_SECURE, ctrl)) { ++ const void *uttyname; ++ retval = pam_get_item(pamh, PAM_TTY, &uttyname); ++ if (retval != PAM_SUCCESS || uttyname == NULL ++ || _pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS) ++ { ++ nullok = 0; ++ } ++ } ++ ++ if (nullok) { + args[2]=strdup("nullok"); + } else { + args[2]=strdup("nonull"); +@@ -567,6 +587,17 @@ _unix_blankpasswd (pam_handle_t *pamh, u + if (on(UNIX__NONULL, ctrl)) + return 0; /* will fail but don't let on yet */ + ++ if (on(UNIX_NULLOK_SECURE, ctrl)) { ++ int retval2; ++ const void *uttyname; ++ retval2 = pam_get_item(pamh, PAM_TTY, &uttyname); ++ if (retval2 != PAM_SUCCESS || uttyname == NULL) ++ return 0; ++ ++ if (_pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS) ++ return 0; ++ } ++ + /* UNIX passwords area */ + + retval = get_pwd_hash(pamh, name, &pwd, &salt); +@@ -653,7 +684,8 @@ int _unix_verify_password(pam_handle_t * + } + } + } else { +- retval = verify_pwd_hash(p, salt, off(UNIX__NONULL, ctrl)); ++ retval = verify_pwd_hash(p, salt, ++ _unix_blankpasswd(pamh, ctrl, name)); + } + + if (retval == PAM_SUCCESS) { +diff -urpN a/modules/pam_unix/support.h b/modules/pam_unix/support.h +--- a/modules/pam_unix/support.h 2013-07-05 09:51:10.385107934 +0800 ++++ b/modules/pam_unix/support.h 2013-07-05 10:23:54.815107842 +0800 +@@ -90,8 +90,9 @@ typedef struct { + password hash algorithms */ + #define UNIX_BLOWFISH_PASS 26 /* new password hashes will use blowfish */ + #define UNIX_MIN_PASS_LEN 27 /* min length for password */ ++#define UNIX_NULLOK_SECURE 28 /* NULL passwords allowed only on secure ttys */ + /* -------------- */ +-#define UNIX_CTRLS_ 28 /* number of ctrl arguments defined */ ++#define UNIX_CTRLS_ 29 /* number of ctrl arguments defined */ + + #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)) + +@@ -109,7 +110,7 @@ static const UNIX_Ctrls unix_args[UNIX_C + /* UNIX_NOT_SET_PASS */ {"not_set_pass", _ALL_ON_, 0100}, + /* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200}, + /* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400}, +-/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000}, ++/* UNIX__NONULL */ {NULL, _ALL_ON_^(0x10000000), 0x200}, + /* UNIX__QUIET */ {NULL, _ALL_ON_, 02000}, + /* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000}, + /* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000}, +@@ -127,7 +128,8 @@ static const UNIX_Ctrls unix_args[UNIX_C + /* UNIX_SHA512_PASS */ {"sha512", _ALL_ON_^(0260420000), 040000000}, + /* UNIX_ALGO_ROUNDS */ {"rounds=", _ALL_ON_, 0100000000}, + /* UNIX_BLOWFISH_PASS */ {"blowfish", _ALL_ON_^(0260420000), 0200000000}, +-/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000}, ++/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000}, ++/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(0x200), 0x10000000}, + }; + + #define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag) +@@ -163,6 +165,9 @@ extern int _unix_read_password(pam_handl + ,const char *data_name + ,const void **pass); + ++extern int _pammodutil_tty_secure(const pam_handle_t *pamh, ++ const char *uttyname); ++ + extern int _unix_run_verify_binary(pam_handle_t *pamh, + unsigned int ctrl, const char *user, int *daysleft); + #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 @@ +# +# /etc/pam.d/common-account - authorization settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authorization modules that define +# the central access policy for use on the system. The default is to +# only deny service to users whose accounts are expired in /etc/shadow. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. +# + +# here are the per-package modules (the "Primary" block) +account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so +# here's the fallback if no module succeeds +account requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +account required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-auth b/meta/recipes-extended/pam/libpam/pam.d/common-auth new file mode 100644 index 0000000000..460b69f198 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-auth @@ -0,0 +1,18 @@ +# +# /etc/pam.d/common-auth - authentication settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authentication modules that define +# the central authentication scheme for use on the system +# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the +# traditional Unix authentication mechanisms. + +# here are the per-package modules (the "Primary" block) +auth [success=1 default=ignore] pam_unix.so nullok_secure +# here's the fallback if no module succeeds +auth requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +auth required pam_permit.so +# and here are more per-package modules (the "Additional" block) diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-password b/meta/recipes-extended/pam/libpam/pam.d/common-password new file mode 100644 index 0000000000..3896057328 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-password @@ -0,0 +1,26 @@ +# +# /etc/pam.d/common-password - password-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define the services to be +# used to change user passwords. The default is pam_unix. + +# Explanation of pam_unix options: +# +# The "sha512" option enables salted SHA512 passwords. Without this option, +# the default is Unix crypt. Prior releases used the option "md5". +# +# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in +# login.defs. +# +# See the pam_unix manpage for other options. + +# here are the per-package modules (the "Primary" block) +password [success=1 default=ignore] pam_unix.so obscure sha512 +# here's the fallback if no module succeeds +password requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +password required pam_permit.so +# and here are more per-package modules (the "Additional" block) diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session b/meta/recipes-extended/pam/libpam/pam.d/common-session new file mode 100644 index 0000000000..a4a551f711 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-session @@ -0,0 +1,19 @@ +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive new file mode 100644 index 0000000000..b110bb2b49 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive @@ -0,0 +1,19 @@ +# +# /etc/pam.d/common-session-noninteractive - session-related modules +# common to all non-interactive services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of all non-interactive sessions. +# + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so diff --git a/meta/recipes-extended/pam/libpam/pam.d/other b/meta/recipes-extended/pam/libpam/pam.d/other new file mode 100644 index 0000000000..ec970ecbe0 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam.d/other @@ -0,0 +1,24 @@ +# +# /etc/pam.d/other - specify the PAM fallback behaviour +# +# Note that this file is used for any unspecified service; for example +#if /etc/pam.d/cron specifies no session modules but cron calls +#pam_open_session, the session module out of /etc/pam.d/other is +#used. + +# We use pam_warn.so to generate syslog notes that the 'other' +#fallback rules are being used (as a hint to suggest you should setup +#specific PAM rules for the service and aid to debugging). Then to be +#secure, deny access to all services by default. + +auth required pam_warn.so +auth required pam_deny.so + +account required pam_warn.so +account required pam_deny.so + +password required pam_warn.so +password required pam_deny.so + +session required pam_warn.so +session required pam_deny.so diff --git a/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch b/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch new file mode 100644 index 0000000000..06cca13abe --- /dev/null +++ b/meta/recipes-extended/pam/libpam/pam_timestamp-fix-potential-directory-traversal-issu.patch @@ -0,0 +1,63 @@ +From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Wed, 26 Mar 2014 22:17:23 +0000 +Subject: [PATCH] pam_timestamp: fix potential directory traversal issue + (ticket #27) + +commit 9dcead87e6d7f66d34e7a56d11a30daca367dffb upstream + +pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of +the timestamp pathname it creates, so extra care should be taken to +avoid potential directory traversal issues. + +* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat +"." and ".." tty values as invalid. +(get_ruser): Treat "." and ".." ruser values, as well as any ruser +value containing '/', as invalid. + +Fixes CVE-2014-2583. + +Reported-by: Sebastian Krahmer + +Upstream-Status: Backport + +Signed-off-by: Yue Tao +Signed-off-by: Wenzong Fan +--- + modules/pam_timestamp/pam_timestamp.c | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c +index 5193733..b3f08b1 100644 +--- a/modules/pam_timestamp/pam_timestamp.c ++++ b/modules/pam_timestamp/pam_timestamp.c +@@ -158,7 +158,7 @@ check_tty(const char *tty) + tty = strrchr(tty, '/') + 1; + } + /* Make sure the tty wasn't actually a directory (no basename). */ +- if (strlen(tty) == 0) { ++ if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) { + return NULL; + } + return tty; +@@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen) + if (pwd != NULL) { + ruser = pwd->pw_name; + } ++ } else { ++ /* ++ * This ruser is used by format_timestamp_name as a component ++ * of constructed timestamp pathname, so ".", "..", and '/' ++ * are disallowed to avoid potential path traversal issues. ++ */ ++ if (!strcmp(ruser, ".") || ++ !strcmp(ruser, "..") || ++ strchr(ruser, '/')) { ++ ruser = NULL; ++ } + } + if (ruser == NULL || strlen(ruser) >= ruserbuflen) { + *ruserbuf = '\0'; +-- +1.7.5.4 + 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 @@ +Backport from linux-pam git repo. + +[YOCTO #4107] + +Upstream-Status: Backport + +Signed-off-by: Kang Kai + +From bd07ad3adc626f842a4391d256541883426fd389 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Tue, 13 Nov 2012 09:19:05 +0100 +Subject: [PATCH] Reflect the enforce_for_root semantics change in + pam_pwhistory xtest. + +xtests/tst-pam_pwhistory1.pamd: Use enforce_for_root as the test is +running with real uid == 0. +--- + xtests/tst-pam_pwhistory1.pamd | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xtests/tst-pam_pwhistory1.pamd b/xtests/tst-pam_pwhistory1.pamd +index 68e1b94..d60db7c 100644 +--- a/xtests/tst-pam_pwhistory1.pamd ++++ b/xtests/tst-pam_pwhistory1.pamd +@@ -1,6 +1,6 @@ + #%PAM-1.0 + auth required pam_permit.so + account required pam_permit.so +-password required pam_pwhistory.so remember=10 retry=1 ++password required pam_pwhistory.so remember=10 retry=1 enforce_for_root + password required pam_unix.so use_authtok md5 + session required pam_permit.so +-- +1.7.11.7 + 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..3b6d5144f9 --- /dev/null +++ b/meta/recipes-extended/pam/libpam_1.1.6.bb @@ -0,0 +1,165 @@ +SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" +DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" +HOMEPAGE = "https://fedorahosted.org/linux-pam/" +BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" +SECTION = "base" +# PAM is dual licensed under GPL and BSD. +# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time +# libpam-runtime-1.0.1 is GPLv2+), by openembedded +LICENSE = "GPLv2+ | BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" + +SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ + file://99_pam \ + file://pam.d/common-account \ + file://pam.d/common-auth \ + file://pam.d/common-password \ + file://pam.d/common-session \ + file://pam.d/common-session-noninteractive \ + file://pam.d/other \ + file://libpam-xtests.patch \ + file://destdirfix.patch \ + file://fixsepbuild.patch \ + file://reflect-the-enforce_for_root-semantics-change-in-pam.patch \ + file://add-checks-for-crypt-returning-NULL.patch \ + file://libpam-fix-for-CVE-2010-4708.patch \ + file://pam-security-abstract-securetty-handling.patch \ + file://pam-unix-nullok-secure.patch \ + file://pam_timestamp-fix-potential-directory-traversal-issu.patch \ + file://libpam-xtests-remove-bash-dependency.patch \ + " +SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4" +SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2" + +SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" + +DEPENDS = "bison flex flex-native cracklib" + +EXTRA_OECONF = "--with-db-uniquename=_pam \ + --includedir=${includedir}/security \ + --libdir=${base_libdir} \ + --disable-nis \ + --disable-regenerate-docu \ + --disable-prelude" + +CFLAGS_append = " -fPIC " + +PR = "r5" + +S = "${WORKDIR}/Linux-PAM-${PV}" + +inherit autotools gettext pkgconfig + +PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," + +PACKAGES += "${PN}-runtime ${PN}-xtests" +FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" +FILES_${PN}-dbg += "${base_libdir}/security/.debug \ + ${base_libdir}/security/pam_filter/.debug \ + ${datadir}/Linux-PAM/xtests/.debug" + +FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" +FILES_${PN}-runtime = "${sysconfdir}" +FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" + +PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" + +def get_multilib_bit(d): + baselib = d.getVar('baselib', True) or '' + return baselib.replace('lib', '') + +libpam_suffix = "suffix${@get_multilib_bit(d)}" + +RPROVIDES_${PN} += "${PN}-${libpam_suffix}" +RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" + +RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ + " +RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ + coreutils" + +# FIXME: Native suffix breaks here, disable it for now +RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" +RRECOMMENDS_${PN}_class-native = "" + +python populate_packages_prepend () { + def pam_plugin_append_file(pn, dir, file): + nf = os.path.join(dir, file) + of = d.getVar('FILES_' + pn, True) + if of: + nf = of + " " + nf + d.setVar('FILES_' + pn, nf) + + def pam_plugin_hook(file, pkg, pattern, format, basename): + pn = d.getVar('PN', True) + libpam_suffix = d.getVar('libpam_suffix', True) + + rdeps = d.getVar('RDEPENDS_' + pkg, True) + if rdeps: + rdeps = rdeps + " " + pn + "-" + libpam_suffix + else: + rdeps = pn + "-" + libpam_suffix + d.setVar('RDEPENDS_' + pkg, rdeps) + + provides = d.getVar('RPROVIDES_' + pkg, True) + if provides: + provides = provides + " " + pkg + "-" + libpam_suffix + else: + provides = pkg + "-" + libpam_suffix + d.setVar('RPROVIDES_' + pkg, provides) + + mlprefix = d.getVar('MLPREFIX', True) or '' + dvar = bb.data.expand('${WORKDIR}/package', d, True) + pam_libdir = d.expand('${base_libdir}/security') + pam_sbindir = d.expand('${sbindir}') + pam_filterdir = d.expand('${base_libdir}/security/pam_filter') + pam_pkgname = mlprefix + 'pam-plugin%s' + + do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname, + 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') + pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') + pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') + pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally') + pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2') + pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') + pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') + pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') + do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') +} + +do_install() { + autotools_do_install + + # don't install /var/run when populating rootfs. Do it through volatile + rm -rf ${D}${localstatedir} + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles + + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + + # The lsb requires unix_chkpwd has setuid permission + chmod 4755 ${D}${sbindir}/unix_chkpwd + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session + fi +} + +python do_pam_sanity () { + if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d): + bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly") +} +addtask pam_sanity before do_configure + +BBCLASSEXTEND = "nativesdk native" 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 @@ +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no + +am__tty_colors = \ +$(am__tty_colors_dummy); \ +test "X$(AM_COLOR_TESTS)" != Xno \ +&& test "X$$TERM" != Xdumb \ +&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ +&& { \ + am__color_tests=yes; \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ +} + +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +am__rst_section = { sed 'p;s/./=/g;' && echo; } +am__sh_e_setup = case $$- in *e*) set +e;; esac + +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ +test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) + +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` + +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.sh.log=.log) +SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +SH_LOG_COMPILE = $(SH_LOG_COMPILER) + +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac + +MKDIR_P = /bin/mkdir -p +SHELL = /bin/bash +VERSION = 3.1 +PACKAGE_STRING = GNU parted 3.1 +PACKAGE_BUGREPORT = bug-parted@gnu.org +abs_srcdir = $(PWD) +abs_top_builddir = $(PWD)/.. +abs_top_srcdir = $(PWD)/.. +srcdir = . +top_srcdir = .. +subdir = tests +SH_LOG_COMPILER = $(SHELL) + +TESTS = \ + help-version.sh \ + t0000-basic.sh \ + t0001-tiny.sh \ + t0010-script-no-ctrl-chars.sh \ + t0100-print.sh \ + t0101-print-empty.sh \ + t0200-gpt.sh \ + t0201-gpt.sh \ + t0202-gpt-pmbr.sh \ + t0203-gpt-tiny-device-abort.sh \ + t0203-gpt-shortened-device-primary-valid.sh \ + t0205-gpt-list-clobbers-pmbr.sh \ + t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \ + t0207-IEC-binary-notation.sh \ + t0208-mkpart-end-in-IEC.sh \ + t0209-gpt-pmbr_boot.sh \ + t0210-gpt-resized-partition-entry-array.sh \ + t0211-gpt-rewrite-header.sh \ + t0212-gpt-many-partitions.sh \ + t0220-gpt-msftres.sh \ + t0250-gpt.sh \ + t0280-gpt-corrupt.sh \ + t0300-dos-on-gpt.sh \ + t0400-loop-clobber-infloop.sh \ + t0500-dup-clobber.sh \ + t0501-duplicate.sh \ + t1100-busy-label.sh \ + t1101-busy-partition.sh \ + t1700-probe-fs.sh \ + t2200-dos-label-recog.sh \ + t2201-pc98-label-recog.sh \ + t2300-dos-label-extended-bootcode.sh \ + t2310-dos-extended-2-sector-min-offset.sh \ + t2400-dos-hfs-partition-type.sh \ + t2500-probe-corrupt-hfs.sh \ + t3000-resize-fs.sh \ + t3200-type-change.sh \ + t3300-palo-prep.sh \ + t3310-flags.sh \ + t3400-whole-disk-FAT-partition.sh \ + t4000-sun-raid-type.sh \ + t4001-sun-vtoc.sh \ + t4100-msdos-partition-limits.sh \ + t4100-dvh-partition-limits.sh \ + t4100-msdos-starting-sector.sh \ + t4200-partprobe.sh \ + t4300-nilfs2-tiny.sh \ + t5000-tags.sh \ + t6000-dm.sh \ + t6001-psep.sh \ + t6100-mdraid-partitions.sh \ + t7000-scripting.sh \ + t8000-loop.sh \ + t8001-loop-blkpg.sh \ + t9010-big-sector.sh \ + t9020-alignment.sh \ + t9021-maxima.sh \ + t9022-one-unit-snap.sh \ + t9023-value-lt-one.sh \ + t9030-align-check.sh \ + t9040-many-partitions.sh \ + t9041-undetected-in-use-16th-partition.sh \ + t9042-dos-partition-limit.sh \ + t9050-partition-table-types.sh + +TESTS_ENVIRONMENT = \ + export \ + abs_top_builddir='$(abs_top_builddir)' \ + abs_top_srcdir='$(abs_top_srcdir)' \ + abs_srcdir='$(abs_srcdir)' \ + built_programs=parted \ + srcdir='$(srcdir)' \ + top_srcdir='$(top_srcdir)' \ + VERSION=$(VERSION) \ + ; 9>&2 + +.SUFFIXES: .log + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for i in $$bases; do \ + if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \ + >/dev/null; then continue; \ + fi; \ + glob_res=`sed -n -e "s/$$ws*$$//" \ + -e "s/^$$ws*:global-test-result:$$ws*//p" \ + $$i.trs`; \ + test -n "$$glob_res" || glob_res=RUN; \ + echo "$$glob_res: $$i" | $(am__rst_section); \ + if test ! -r $$i.log; then \ + echo "fatal: making $@: $$i.log is unreadable" >&2; \ + exit 1; \ + fi; \ + cat $$i.log; echo; \ + done; \ + } >$(TEST_SUITE_LOG).tmp; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @if test $@ != recheck; then \ + list='$(RECHECK_LOGS)'; \ + test -z "$$list" || rm -f $$list; \ + fi + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @ws='[ ]'; \ + log_list='' trs_list=''; $(am__set_TESTS_bases); \ + for i in $$bases; do \ + if test -z "$$log_list"; then \ + log_list="$$i.log"; \ + else \ + log_list="$$log_list $$i.log"; \ + fi; \ + if test -z "$$trs_list"; then \ + trs_list="$$i.trs"; \ + else \ + trs_list="$$trs_list $$i.trs"; \ + fi; \ + done; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list" + +.sh.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(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 @@ + +From: Gustavo Zacarias +Subject: bug#16929: [PATCH] ui: switch to new-style readline typedef +Date: Mon, 3 Mar 2014 10:40:08 -0300 + +The CPPFunction typedef (among others) have been deprecated in favour of +specific prototyped typedefs since readline 4.2 (circa 2001). +It's been working since because compatibility typedefs have been in +place until they where removed in the recent readline 6.3 release. +Switch to the new style to avoid build breakage. + +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Backport + +Signed-off-by: Saul Wold + +--- + parted/ui.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/parted/ui.c b/parted/ui.c +index 786deed..b33f6fc 100644 +--- a/parted/ui.c ++++ b/parted/ui.c +@@ -1470,7 +1470,7 @@ init_readline (void) + #ifdef HAVE_LIBREADLINE + if (!opt_script_mode) { + rl_initialize (); +- rl_attempted_completion_function = (CPPFunction*) complete_function; ++ rl_attempted_completion_function = (rl_completion_func_t *) complete_function; + readline_state.in_readline = 0; + } + #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 @@ +Upstream-Status: Submitted [bug-parted@gnu.org] + +| for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \ +| make $(basename ${po%.pt_BR.po}); \ +| done +| Makefile:904: *** Recursive variable `mandir' references itself (eventually). Stop. + +Signed-off-by: Andreas Oberritter + +--- parted-3.1/doc/po4a.mk.orig 2012-03-15 14:09:11.555831872 +0100 ++++ parted-3.1/doc/po4a.mk 2012-03-15 14:10:44.243830985 +0100 +@@ -23,7 +23,7 @@ + # threshold is 80%), it won't be distributed, and the build won't fail. + # + +-mandir = $(mandir)/$(lang) ++mandir := $(mandir)/$(lang) + + # Inform automake that we want to install some man pages in section 1, 5 + # and 8. diff --git a/meta/recipes-extended/parted/parted-3.1/fix-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 @@ +Upstream-Status: Pending + +Signed-off-by: Ming Liu +--- + dvh.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +Index: parted-3.1/libparted/labels/dvh.h +=================================================================== +--- parted-3.1.orig/libparted/labels/dvh.h 2013-02-25 10:46:13.204477586 +0800 ++++ parted-3.1/libparted/labels/dvh.h 2013-02-25 10:47:20.954477065 +0800 +@@ -112,8 +112,8 @@ struct device_parameters { + + struct volume_directory { + char vd_name[VDNAMESIZE]; /* name */ +- int vd_lbn; /* logical block number */ +- int vd_nbytes; /* file length in bytes */ ++ unsigned int vd_lbn; /* logical block number */ ++ unsigned int vd_nbytes; /* file length in bytes */ + }; + + /* +@@ -125,9 +125,9 @@ struct volume_directory { + * NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED + */ + struct partition_table { /* one per logical partition */ +- int pt_nblks; /* # of logical blks in partition */ +- int pt_firstlbn; /* first lbn of partition */ +- int pt_type; /* use of partition */ ++ unsigned int pt_nblks; /* # of logical blks in partition */ ++ unsigned int pt_firstlbn; /* first lbn of partition */ ++ int pt_type; /* use of partition */ + }; + + #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 @@ +Upstream-Status: Accepted [Expected to be included in parted versions > 3.1] +Upstream-URL: http://git.savannah.gnu.org/cgit/gnulib.git/patch/?id=cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 + +From cbc11ff0020eb9c04caea6b3e7dc4e4281dff1f9 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter +Date: Sun, 18 Mar 2012 17:39:14 +0000 +Subject: git-version-gen: don't let "prefix" envvar cause trouble + +* build-aux/git-version-gen (prefix): Initialize properly, +so as not to use a value specified via the environment. +Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810 +--- +diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen +index d5542a2..0fa9063 100755 +--- a/build-aux/git-version-gen ++++ b/build-aux/git-version-gen +@@ -1,6 +1,6 @@ + #!/bin/sh + # Print a version string. +-scriptversion=2012-01-06.07; # UTC ++scriptversion=2012-03-18.17; # UTC + + # Copyright (C) 2007-2012 Free Software Foundation, Inc. + # +@@ -92,6 +92,8 @@ Options: + + Running without arguments will suffice in most cases." + ++prefix=v ++ + while test $# -gt 0; do + case $1 in + --help) echo "$usage"; exit 0;; +@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then + fi + + tag_sed_script="${tag_sed_script:-s/x/x/}" +-prefix="${prefix:-v}" + + nl=' + ' +-- +cgit v0.9.0.2 diff --git a/meta/recipes-extended/parted/parted-3.1/no_check.patch b/meta/recipes-extended/parted/parted-3.1/no_check.patch new file mode 100644 index 0000000000..58d8db4426 --- /dev/null +++ b/meta/recipes-extended/parted/parted-3.1/no_check.patch @@ -0,0 +1,20 @@ +Upstream-Status: Inappropriate [configuration] + +If check is detected, it makes the builds non-determinstic so just force +it to be disabled. + +RP - 4/11/08 + +Index: parted-1.9.0/configure.ac +=================================================================== +--- parted-1.9.0.orig/configure.ac 2009-07-23 18:52:08.000000000 +0100 ++++ parted-1.9.0/configure.ac 2010-02-02 14:13:56.013905093 +0000 +@@ -477,7 +477,7 @@ + AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux]) + + dnl check for "check", unit testing library/header +-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no) ++have_check=no + if test "$have_check" != "yes"; then + AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building]) + fi diff --git a/meta/recipes-extended/parted/parted-3.1/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 @@ +#!/bin/sh + +make -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 @@ +Upstream-Status: Pending + +--- + libparted/arch/linux.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +Index: parted-1.9.0/libparted/arch/linux.c +=================================================================== +--- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100 ++++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000 +@@ -17,6 +17,8 @@ + + #define PROC_DEVICES_BUFSIZ 16384 + ++#include ++ + #include + #include + +@@ -1477,12 +1479,14 @@ + + #if SIZEOF_OFF_T < 8 + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + static _syscall5(int,_llseek, + unsigned int, fd, + unsigned long, offset_high, + unsigned long, offset_low, + loff_t*, result, + unsigned int, origin) ++#endif + + loff_t + llseek (unsigned int fd, loff_t offset, unsigned int whence) +@@ -1490,11 +1494,20 @@ + loff_t result; + int retval; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) + retval = _llseek(fd, + ((unsigned long long)offset) >> 32, + ((unsigned long long)offset) & 0xffffffff, + &result, + whence); ++#else ++ retval = syscall(__NR__llseek, fd, ++ ((unsigned long long)offset) >> 32, ++ ((unsigned long long)offset) & 0xffffffff, ++ &result, ++ whence); ++#endif ++ + return (retval==-1 ? (loff_t) retval : result); + } + diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.1.bb new file mode 100644 index 0000000000..3f36f9f79e --- /dev/null +++ b/meta/recipes-extended/parted/parted_3.1.bb @@ -0,0 +1,45 @@ +SUMMARY = "Disk partition editing/resizing utility" +HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c" +SECTION = "console/tools" +DEPENDS = "ncurses readline util-linux" +PR = "r1" + +SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ + file://no_check.patch \ + file://syscalls.patch \ + file://fix-git-version-gen.patch \ + file://fix-doc-mandir.patch \ + file://fix-dvh-overflows.patch \ + file://fix-deprecated-readline.patch \ + file://run-ptest \ + file://Makefile \ +" + +SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb" +SRC_URI[sha256sum] = "5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15" + +EXTRA_OECONF = "--disable-device-mapper" + +inherit autotools pkgconfig gettext texinfo ptest + +BBCLASSEXTEND = "native" + +do_compile_ptest() { + oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize +} + +do_install_ptest() { + t=${D}${PTEST_PATH} + mkdir $t/build-aux + cp ${S}/build-aux/test-driver $t/build-aux/ + cp -r ${S}/tests $t + cp ${WORKDIR}/Makefile $t/tests/ + for i in print-align print-max dup-clobber duplicate fs-resize; \ + do cp ${B}/tests/.libs/$i $t/tests/; \ + done + sed -e 's| ../parted||' -i $t/tests/*.sh +} + +RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python" 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 @@ +Upstream-Status: Pending + +This patch fixes this compiler error with gcc 4.6.0 + +Nitin A Kamble 2011/05/08 + +| fts.c: In function 'pax_fts_set': +| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter] +| cc1: all warnings being treated as errors +| +| make[2]: *** [fts.o] Error 1 + +Index: pax-3.4/lib/fts.c +=================================================================== +--- pax-3.4.orig/lib/fts.c ++++ pax-3.4/lib/fts.c +@@ -466,7 +466,7 @@ name: t = sp->fts_path + NAPPEND(p->fts + /* ARGSUSED */ + int + fts_set(sp, p, instr) +- FTS *sp; ++ FTS __attribute__((__unused__)) *sp; + FTSENT *p; + int instr; + { diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch new file mode 100644 index 0000000000..80878f38b2 --- /dev/null +++ b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch @@ -0,0 +1,185 @@ +Upstream-Status: Pending + +Author: H.J. Lu +Date: Tue Dec 6 10:34:53 2011 -0800 + + Fix pax-3.4 build for x32 + + off_t is 8byte for x32. We need to check both _FILE_OFFSET_BITS and + size of off_t to see if file offset is 64bit. This patch adds + AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8. + +Signed-Off-By: Nitin A Kamble 2011/12/06 + +Index: pax-3.4/configure.in +=================================================================== +--- pax-3.4.orig/configure.in ++++ pax-3.4/configure.in +@@ -33,4 +33,7 @@ dnl Checks for header files. + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + ++AC_CHECK_SIZEOF(off_t) ++AC_CHECK_SIZEOF(long) ++ + AC_OUTPUT([Makefile lib/Makefile src/Makefile]) +Index: pax-3.4/src/ar_io.c +=================================================================== +--- pax-3.4.orig/src/ar_io.c ++++ pax-3.4/src/ar_io.c +@@ -378,7 +378,8 @@ ar_close(void) + * could have written anything yet. + */ + if (frmt == NULL) { +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + (void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n", + #else + (void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n", +@@ -391,7 +392,8 @@ ar_close(void) + + if (strcmp(NM_CPIO, argv0) == 0) + (void)fprintf(listf, +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + "%qu blocks\n", + #else + "%lu blocks\n", +@@ -399,7 +401,8 @@ ar_close(void) + (rdcnt ? rdcnt : wrcnt) / 5120); + else if (strcmp(NM_TAR, argv0) != 0) + (void)fprintf(listf, +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n", + #else + "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n", +Index: pax-3.4/src/cpio.c +=================================================================== +--- pax-3.4.orig/src/cpio.c ++++ pax-3.4/src/cpio.c +@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn) + */ + if ((arcn->sb.st_size == 0) || + (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) { +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + paxwarn (1, "Cpio link name length is invalid: %qu", + arcn->sb.st_size); + #else +Index: pax-3.4/src/gen_subs.c +=================================================================== +--- pax-3.4.orig/src/gen_subs.c ++++ pax-3.4/src/gen_subs.c +@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * + * print device id's for devices, or sizes for other nodes + */ + if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK)) +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev), + (unsigned long) MINOR (sbp->st_rdev)); + #else +@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE * + #endif + else + { +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + (void) fprintf (fp, "%9qu ", sbp->st_size); + #else + (void) fprintf (fp, "%9lu ", sbp->st_size); +@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len, + return (0); + } + +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + /* + * asc_uqd() + * convert hex/octal character string into a u_quad_t. We do not have to +Index: pax-3.4/src/options.c +=================================================================== +--- pax-3.4.orig/src/options.c ++++ pax-3.4/src/options.c +@@ -1545,7 +1545,8 @@ str_offt (char *val) + char *expr; + off_t num, t; + +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + num = strtoq (val, &expr, 0); + if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val)) + #else +Index: pax-3.4/src/tar.c +=================================================================== +--- pax-3.4.orig/src/tar.c ++++ pax-3.4/src/tar.c +@@ -58,7 +58,8 @@ + static unsigned long tar_chksm (char *, int); + static char *name_split (char *, int); + static int ul_oct (u_long, char *, int, int); +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + static int uqd_oct (u_quad_t, char *, int, int); + #endif + +@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str, + return (0); + } + +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + /* + * uqd_oct() + * convert an u_quad_t to an octal string. one of many oddball field +@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf) + 0xfff); + arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT); + arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT); +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); + #else + arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); +@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn) + * data follows this file, so set the pad + */ + hd->linkflag = AREGTYPE; +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, + sizeof (hd->size), 1)) + #else +@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf) + */ + arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) & + 0xfff); +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT); + #else + arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT); +@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn) + else + hd->typeflag = REGTYPE; + arcn->pad = TAR_PAD (arcn->sb.st_size); +-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \ ++ || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) + if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size, + sizeof (hd->size), 3)) + { diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb new file mode 100644 index 0000000000..0c10688feb --- /dev/null +++ b/meta/recipes-extended/pax/pax_3.4.bb @@ -0,0 +1,22 @@ +SUMMARY = "Portable Archive eXchange" +DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool" +HOMEPAGE = "http://www.openbsd.org/cgi-bin/cvsweb/src/bin/pax/" +BUGTRACKER = "http://www.openbsd.org/query-pr.html" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \ + file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \ + file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \ + file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053" + +SECTION = "base" +PR = "r2" + +SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \ + file://fix_for_compile_with_gcc-4.6.0.patch \ + file://pax-3.4_fix_for_x32.patch" + +SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6" +SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b" + +inherit autotools diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb new file mode 100644 index 0000000000..ebe042238f --- /dev/null +++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb @@ -0,0 +1,17 @@ +SUMMARY = "Convert::ASN1 - Perl ASN.1 Encode/Decode library" +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" +LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8e8e0d3d23e096a63f" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz" + +SRC_URI[md5sum] = "68723e96be0b258a9e20480276e8a62c" +SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814d3d58a" + +S = "${WORKDIR}/Convert-ASN1-${PV}" + +inherit cpan + +EXTRA_PERLFLAGS = "-I ${STAGING_LIBDIR_NATIVE}/perl-native/perl/${@get_perl_version(d)}" + +BBCLASSEXTEND = "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 @@ +SUMMARY = "Perl modules useful for manipulating date and time information" +SECTION = "libs" +# You can redistribute it and/or modify it under the same terms as Perl itself. +LICENSE = "Artistic-1.0 | GPL-1.0+" +LIC_FILES_CHKSUM = "file://README;beginline=21;md5=576b7cb41e5e821501a01ed66f0f9d9e" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.gz" + +S = "${WORKDIR}/TimeDate-${PV}" + +inherit cpan + +BBCLASSEXTEND = "native" + +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local" + +SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c" +SRC_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 @@ +SUMMARY = "Perl module for supporting simple generic namespaces" +DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \ + It also helps maintain a prefix-to-namespace URI map, and provides a number of \ + basic checks. " + +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" +PR = "r3" + +LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz" +SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da" +SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea" + + +S = "${WORKDIR}/XML-NamespaceSupport-${PV}" + +inherit cpan + +BBCLASSEXTEND="native" + diff --git a/meta/recipes-extended/perl/libxml-sax-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 @@ +SUMMARY = "Base class SAX Drivers and Filters" +DESCRIPTION = "This module has a very simple task - to be a base class for \ +PerlSAX drivers and filters. It's default behaviour is to pass \ +the input directly to the output unchanged. It can be useful to \ +use this module as a base class so you don't have to, for example, \ +implement the characters() callback." + +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" +RDEPENDS_${PN} += "perl-module-extutils-makemaker" + +LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz" + +SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32" +SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e" + +S = "${WORKDIR}/XML-SAX-Base-${PV}" + +inherit cpan + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb new file mode 100644 index 0000000000..45d396639b --- /dev/null +++ b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb @@ -0,0 +1,27 @@ +SUMMARY = "Perl module for using and building Perl SAX2 XML processors" +DESCRIPTION = "XML::SAX consists of several framework classes for using and \ +building Perl SAX2 XML parsers, filters, and drivers. It is designed \ +around the need to be able to "plug in" different SAX parsers to an \ +application without requiring programmer intervention. Those of you \ +familiar with the DBI will be right at home. Some of the designs \ +come from the Java JAXP specification (SAX part), only without the \ +javaness." + +SECTION = "libs" +LICENSE = "Artistic-1.0 | GPL-1.0+" +DEPENDS += "libxml-namespacesupport-perl-native" +RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp" +PR = "r2" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3" + +SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz" + +SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24" +SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84" + +S = "${WORKDIR}/XML-SAX-${PV}" + +inherit cpan + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/pigz/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 @@ +SUMMARY = "A parallel implementation of gzip" +DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \ +fully functional replacement for gzip that exploits multiple processors and \ +multiple cores to the hilt when compressing data. pigz was written by Mark \ +Adler, and uses the zlib and pthread libraries." +HOMEPAGE = "http://zlib.net/pigz/" +SECTION = "console/utils" +LICENSE = "Zlib" + +SRC_URI = "http://zlib.net/pigz/pigz-${PV}.tar.gz" + +PROVIDES_class-native += "gzip-native" + +DEPENDS = "zlib" + +do_install () { + if [ "${CLASSOVERRIDE}" = "class-target" ] ; then + # Install files into /bin (FHS), which is typical place for gzip + install -d ${D}${base_bindir} + install ${B}/pigz ${D}${base_bindir}/gzip + install ${B}/unpigz ${D}${base_bindir}/gunzip + else + install -d ${D}${bindir} + install ${B}/pigz ${D}${bindir}/gzip + install ${B}/unpigz ${D}${bindir}/gunzip + fi +} + +ALTERNATIVE_${PN} = "gzip gunzip" +ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" +ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" +ALTERNATIVE_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 @@ +require pigz.inc +LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95" + +SRC_URI[md5sum] = "e803f8bc0770c7a5e96dccb1d2dd2aab" +SRC_URI[sha256sum] = "629b0ce5422a3978f31742bf8275d0be2f84987140d18f390f1e3b4e46e0af54" + +NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch b/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch new file mode 100644 index 0000000000..71dc3f07e4 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/0001-Fix-musl-build-failure.patch @@ -0,0 +1,29 @@ +From 6f2fd55ef7621fd7ab7897aee2c2651b6faf9e6a Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Wed, 20 Aug 2014 11:56:11 +0200 +Subject: [PATCH] Fix musl build failure + +Include for PATH_MAX. + +Signed-off-by: Paul Barker + +Upstream-status: Pending +--- + proc/readproc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/proc/readproc.c b/proc/readproc.c +index 4fad11d..c5b1869 100644 +--- a/proc/readproc.c ++++ b/proc/readproc.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + // sometimes it's easier to do this manually, w/o gcc helping + #ifdef PROF +-- +1.9.1 + 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 @@ +## 60_linux_init.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix Linux version detection which relied on elf loader side-effect. +## DP: This patch also depends on 40_gnu-kbsd-version, which modified +## DP: init_Linux_version(). + +@DPATCH@ + +Upstream-Status: inappropriate [upstream unmaintained] +--- + proc/sysinfo.c | 1 + + proc/version.c | 5 +++-- + proc/version.h | 1 + + 3 files changed, 5 insertions(+), 2 deletions(-) + +Index: procps-3.2.8/proc/sysinfo.c +=================================================================== +--- procps-3.2.8.orig/proc/sysinfo.c ++++ procps-3.2.8/proc/sysinfo.c +@@ -212,6 +212,7 @@ static int check_for_privs(void){ + static void init_libproc(void) __attribute__((constructor)); + static void init_libproc(void){ + have_privs = check_for_privs(); ++ init_Linux_version(); // make sure we have version before continuing... + // ought to count CPUs in /proc/stat instead of relying + // on glibc, which foolishly tries to parse /proc/cpuinfo + // +Index: procps-3.2.8/proc/version.c +=================================================================== +--- procps-3.2.8.orig/proc/version.c ++++ procps-3.2.8/proc/version.c +@@ -33,8 +33,7 @@ void display_version(void) { + + int linux_version_code; + +-static void init_Linux_version(void) __attribute__((constructor)); +-static void init_Linux_version(void) { ++void init_Linux_version(void) { + int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */ + FILE *fp; + char buf[256]; +Index: procps-3.2.8/proc/version.h +=================================================================== +--- procps-3.2.8.orig/proc/version.h ++++ procps-3.2.8/proc/version.h +@@ -14,6 +14,7 @@ + + EXTERN_C_BEGIN + ++extern void init_Linux_version(void); /* initialize linux version */ + extern void display_version(void); /* display suite version */ + extern const char procps_version[]; /* global buf for suite version */ + diff --git a/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch new file mode 100644 index 0000000000..1523c3dfb2 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/detect_bitness.patch @@ -0,0 +1,26 @@ +Do not try to detect 64bit/32bit system +we already feed that information via compiler +defaults + +Signed-off-by: Khem Raj +Upstream-Status: Inappropriate [OE specific] +Index: procps-3.2.8/Makefile +=================================================================== +--- procps-3.2.8.orig/Makefile 2014-05-03 01:00:01.707387583 -0700 ++++ procps-3.2.8/Makefile 2014-05-03 08:53:08.087175369 -0700 +@@ -118,15 +118,6 @@ + # until you go looking for a 64-bit curses library. + check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + +-# Be 64-bit if at all possible. In a cross-compiling situation, one may +-# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT +-# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST +-# produce separate executables for ppc and ppc64, s390 and s390x, +-# i386 and x86-64, mips and mips64, sparc and sparc64, and so on. +-# Failure to do so will cause data corruption. +-m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,)) +-ALL_CFLAGS += $(m64) +- + ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,) + ALL_CFLAGS += $(call check_gcc,-Wpadded,) + ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,) 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 @@ +Upstream-Status: Inappropriate [not author, no upstream] + +Imported from Debian. +Source: http://anonscm.debian.org/gitweb/?p=collab-maint/procps.git;a=blob;f=debian/patches/gnu-kbsd-version.patch;h=fe5489fc772a3355ff8c0dcf9b953bf0c05aa9f8;hb=b460cfd726b019f8d918b380f78af4c19c5f3e50 +Bugtracker: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632749 + +Stops procps utilities from printing a warning when used with +kernels having only two digit versions, e.g. 3.0. + +Author: +Description: Rework version parsing so its ok with other OSes +--- a/proc/version.c ++++ b/proc/version.c +@@ -35,15 +35,23 @@ + + static void init_Linux_version(void) __attribute__((constructor)); + static void init_Linux_version(void) { +- static struct utsname uts; +- int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */ ++ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 2 */ ++ FILE *fp; ++ char buf[256]; + +- if (uname(&uts) == -1) /* failure implies impending death */ +- exit(1); +- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3) ++ if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */ ++ exit(1); ++ if (fgets(buf, 256, fp) == NULL) { ++ fprintf(stderr, "Cannot read kernel version from /proc/version\n"); ++ fclose(fp); ++ exit(1); ++ } ++ fclose(fp); ++ if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2) + fprintf(stderr, /* *very* unlikely to happen by accident */ + "Non-standard uts for running kernel:\n" +- "release %s=%d.%d.%d gives version code %d\n", +- uts.release, x, y, z, LINUX_VERSION(x,y,z)); ++ "release %s=%d.%d.%d gives version code %d\n", ++ buf, ++ x, y, z, LINUX_VERSION(x,y,z)); + linux_version_code = LINUX_VERSION(x, y, z); + } diff --git a/meta/recipes-extended/procps/procps-3.2.8/install.patch b/meta/recipes-extended/procps/procps-3.2.8/install.patch new file mode 100644 index 0000000000..2a59a5ff68 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/install.patch @@ -0,0 +1,39 @@ +Upstream-Status: Inappropriate [configuration] + +diff -ruN procps-3.2.8-orig//Makefile procps-3.2.8/Makefile +--- procps-3.2.8-orig//Makefile 2011-08-23 22:06:46.471163999 +0800 ++++ procps-3.2.8/Makefile 2011-08-23 22:15:01.091163999 +0800 +@@ -29,9 +29,6 @@ + ln_sf := ln -sf + install := install -D --owner 0 --group 0 + +-# Lame x86-64 /lib64 and /usr/lib64 abomination: +-lib64 := lib$(shell [ -d /lib64 ] && echo 64) +- + usr/bin := $(DESTDIR)/usr/bin/ + bin := $(DESTDIR)/bin/ + sbin := $(DESTDIR)/sbin/ +@@ -39,8 +36,8 @@ + man1 := $(DESTDIR)/usr/share/man/man1/ + man5 := $(DESTDIR)/usr/share/man/man5/ + man8 := $(DESTDIR)/usr/share/man/man8/ +-lib := $(DESTDIR)/$(lib64)/ +-usr/lib := $(DESTDIR)/usr/$(lib64)/ ++lib := $(DESTDIR)/$(base_libdir)/ ++usr/lib := $(DESTDIR)/$(libdir)/ + usr/include := $(DESTDIR)/usr/include/ + + #SKIP := $(bin)kill $(man1)kill.1 +@@ -222,10 +219,10 @@ + ###### install + + $(BINFILES) : all +- $(install) --mode a=rx $(notdir $@) $@ ++ $(install) -m 555 $(notdir $@) $@ + + $(MANFILES) : all +- $(install) --mode a=r $(notdir $@) $@ ++ $(install) -m 444 $(notdir $@) $@ + + install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL)) + cd $(usr/bin) && $(ln_f) skill snice diff --git a/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch new file mode 100644 index 0000000000..2ca972482d --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/linux-limits.patch @@ -0,0 +1,15 @@ +Upstream-Status: Pending + +diff --git a/pwdx.c b/pwdx.c +index cb96a52..29ebce2 100644 +--- a/pwdx.c ++++ b/pwdx.c +@@ -13,7 +13,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + 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 @@ +Upstream-Status: Pending + +*** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005 +--- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005 +*************** +*** 96,102 **** + #################### install rules ########################### + + $(lib)$(SOFILE) : proc/$(SONAME) +! $(install) --mode a=rx $< $@ + + ifneq ($(SOLINK),$(SOFILE)) + .PHONY: $(lib)$(SOLINK) +--- 96,102 ---- + #################### install rules ########################### + + $(lib)$(SOFILE) : proc/$(SONAME) +! $(install) -m 555 $< $@ + + ifneq ($(SOLINK),$(SOFILE)) + .PHONY: $(lib)$(SOLINK) +*************** +*** 115,121 **** + $(ldconfig) + + $(usr/lib)$(ANAME) : proc/$(ANAME) +! $(install) --mode a=r $< $@ + + # Junk anyway... supposed to go in /usr/include/$(NAME) + #INSTALL += $(addprefix $(include),$(HDRFILES)) +--- 115,121 ---- + $(ldconfig) + + $(usr/lib)$(ANAME) : proc/$(ANAME) +! $(install) -m 444 $< $@ + + # Junk anyway... supposed to go in /usr/include/$(NAME) + #INSTALL += $(addprefix $(include),$(HDRFILES)) diff --git a/meta/recipes-extended/procps/procps-3.2.8/procps-3.2.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 @@ +Upstream-Status: Pending + +fix that top will quit after cpu offline + +top utiliy fails to read /proc/stat after cpu offline, because Cpu_tot +is still the original cpu numbers when calling cpus_refresh, in which +it is trying to read and sscanf Cpu_tot times /proc/stat. + +The patch is from procps-3.2.8-2.fc12.src.rpm + +Signed-off-by: Wenzong Fan + +--- +--- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200 ++++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200 +@@ -912,6 +912,7 @@ + static CPU_t *cpus_refresh (CPU_t *cpus) + { + static FILE *fp = NULL; ++ static int cpu_max; + int i; + int num; + // enough for a /proc/stat CPU line (not the intr line) +@@ -926,24 +927,29 @@ + can hold tics representing the /proc/stat cpu summary (the first + line read) -- that slot supports our View_CPUSUM toggle */ + cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t)); ++ cpu_max = Cpu_tot; + } ++ else if (cpu_max > Cpu_tot) ++ /* move saved CUPs summary to cpu_max possition */ ++ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t)); ++ + rewind(fp); + fflush(fp); + + // first value the last slot with the cpu summary line + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); +- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number +- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number ++ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number + num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", +- &cpus[Cpu_tot].u, +- &cpus[Cpu_tot].n, +- &cpus[Cpu_tot].s, +- &cpus[Cpu_tot].i, +- &cpus[Cpu_tot].w, +- &cpus[Cpu_tot].x, +- &cpus[Cpu_tot].y, +- &cpus[Cpu_tot].z ++ &cpus[cpu_max].u, ++ &cpus[cpu_max].n, ++ &cpus[cpu_max].s, ++ &cpus[cpu_max].i, ++ &cpus[cpu_max].w, ++ &cpus[cpu_max].x, ++ &cpus[cpu_max].y, ++ &cpus[cpu_max].z + ); + if (num < 4) + std_err("failed /proc/stat read"); +@@ -955,7 +961,7 @@ + } + + // now value each separate cpu's tics +- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) { ++ for (i = 0; ; i++) { + if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read"); + cpus[i].x = 0; // FIXME: can't tell by kernel version number + cpus[i].y = 0; // FIXME: can't tell by kernel version number +@@ -964,9 +970,35 @@ + &cpus[i].id, + &cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z + ); +- if (num < 4) +- std_err("failed /proc/stat read"); ++ if (num < 4) { ++ Cpu_tot = i; ++ break; ++ } ++ if (i == cpu_max - 1) { ++ // Bump cpu_max and extend cpus ++ cpu_max++; ++ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t)); ++ if (!cpus) std_err("realloc failed"); ++ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t)); ++ } ++ } ++ ++ if (cpu_max > Cpu_tot) ++ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t)); ++ ++ // and just in case we're 2.2.xx compiled without SMP support... ++ if (Cpu_tot == 1) { ++ cpus[0].id = cpus[1].id = 0; ++ cpus[0].u = cpus[1].u; ++ cpus[0].n = cpus[1].n; ++ cpus[0].s = cpus[1].s; ++ cpus[0].i = cpus[1].i; ++ cpus[0].w = cpus[1].w; ++ cpus[0].x = cpus[1].x; ++ cpus[0].y = cpus[1].y; ++ cpus[0].z = cpus[1].z; + } ++ + return cpus; + } + diff --git a/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 @@ +Upstream-Status: Backport + +Fix for stricter Makefile parser in Make 3.82 take from Gentoo bugzilla: +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-process/procps/files/procps-3.2.8%2Bgmake-3.82.patch?revision=1.1 + +Index: procps-3.2.8/Makefile +=================================================================== +--- procps-3.2.8.orig/Makefile ++++ procps-3.2.8/Makefile +@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES) + # want this rule first, use := on ALL, and ALL not filled in yet + all: do_all + +--include */module.mk ++-include proc/module.mk ++-include ps/module.mk + + do_all: $(ALL) + diff --git a/meta/recipes-extended/procps/procps-3.2.8/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 @@ +From e529ce0b53f6b73d8b760cd37b23e0397720cede Mon Sep 17 00:00:00 2001 +From: Daniel Novotny +Date: Mon, 16 Feb 2009 12:22:20 +0000 +Subject: add cgroup support + +Rebased for 3.2.8: Andrei Gherzan + +Upstream-Status: Pending + +The patch was imported from the meta-ivi repository +(git://git.yoctoproject.org/meta-ivi) as of commit id +74b9624fe94b2b90810717a13d481b0db9d2d95a + +Signed-off-by: Jukka Rissanen + +Index: procps-3.2.8/ps/output.c +=================================================================== +--- procps-3.2.8.orig/ps/output.c 2012-11-15 17:44:05.501337741 +0200 ++++ procps-3.2.8/ps/output.c 2012-11-15 17:48:31.585328231 +0200 +@@ -1099,6 +1099,39 @@ + return snprintf(outbuf, COLWID, "*"); + } + ++static int pr_cgroup(char *restrict const outbuf, const proc_t *restrict const pp){ ++ char filename[48]; ++ FILE *fd; ++ int counter = 0; ++ int c; ++ int is_cgroup = 0; ++ ++ outbuf[0]='\0'; ++ snprintf(filename, sizeof filename, "/proc/%d/cgroup", pp->tgid); ++ fd = fopen(filename, "r"); ++ if (likely(fd == NULL)) goto fail; ++ while (( (c = fgetc(fd)) != EOF) && (counter<665)) { ++ if (is_cgroup == 0) { ++ if (c == ':') { ++ is_cgroup = 1; ++ if (counter>0) ++ outbuf[counter++]=';'; ++ } ++ }else ++ if ((c == '\n') || (c == '\0')) ++ is_cgroup = 0; ++ else ++ outbuf[counter++]=c; ++ } ++ outbuf[counter]='\0'; ++ close(fd); ++ if (counter>0) ++ return counter; ++fail: ++ outbuf[0] = '-'; ++ outbuf[1] = '\0'; ++ return 1; ++} + + /****************** FLASK & seLinux security stuff **********************/ + // move the bulk of this to libproc sometime +@@ -1293,6 +1326,7 @@ + {"bsdtime", "TIME", pr_bsdtime, sr_nop, 6, 0, LNX, ET|RIGHT}, + {"c", "C", pr_c, sr_pcpu, 2, 0, SUN, ET|RIGHT}, + {"caught", "CAUGHT", pr_sigcatch, sr_nop, 9, 0, BSD, TO|SIGNAL}, /*sigcatch*/ ++{"cgroup", "CGROUP", pr_cgroup, sr_nop, 35, 0, LNX, PO|LEFT}, /* cgroups*/ + {"class", "CLS", pr_class, sr_sched, 3, 0, XXX, TO|LEFT}, + {"cls", "CLS", pr_class, sr_sched, 3, 0, HPU, TO|RIGHT}, /*says HPUX or RT*/ + {"cmaj_flt", "-", pr_nop, sr_cmaj_flt, 1, 0, LNX, AN|RIGHT}, +Index: procps-3.2.8/ps/ps.1 +=================================================================== +--- procps-3.2.8.orig/ps/ps.1 2012-11-15 17:44:50.845336117 +0200 ++++ procps-3.2.8/ps/ps.1 2012-11-15 17:49:09.621326859 +0200 +@@ -904,6 +904,10 @@ + displayed. (alias\ \fBsig_catch\fR,\ \fBsigcatch\fR). + T} + ++cgroup CGROUP T{ ++display control groups to which the process belonges. ++t} ++ + class CLS T{ + scheduling class of the process. (alias\ \fBpolicy\fR,\ \fBcls\fR). + 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 @@ +Upstream-Status: Pending + +*** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005 +--- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005 +*************** +*** 33,40 **** + + + $(bin)ps: ps/ps +! $(install) --mode a=rx $< $@ + + $(man1)ps.1 : ps/ps.1 +! $(install) --mode a=r $< $@ + -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz +--- 33,40 ---- + + + $(bin)ps: ps/ps +! $(install) -m 555 $< $@ + + $(man1)ps.1 : ps/ps.1 +! $(install) -m 444 $< $@ + -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz diff --git a/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf new file mode 100644 index 0000000000..34e7488bf7 --- /dev/null +++ b/meta/recipes-extended/procps/procps-3.2.8/sysctl.conf @@ -0,0 +1,64 @@ +# This configuration file is taken from Debian. +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See sysctl.conf (5) for information. +# + +#kernel.domainname = example.com + +# Uncomment the following to stop low-level messages on console +#kernel.printk = 4 4 1 7 + +##############################################################3 +# Functions previously found in netbase +# + +# Uncomment the next two lines to enable Spoof protection (reverse-path filter) +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +net.ipv4.conf.default.rp_filter=1 +net.ipv4.conf.all.rp_filter=1 + +# Uncomment the next line to enable TCP/IP SYN cookies +#net.ipv4.tcp_syncookies=1 + +# Uncomment the next line to enable packet forwarding for IPv4 +#net.ipv4.ip_forward=1 + +# Uncomment the next line to enable packet forwarding for IPv6 +#net.ipv6.conf.all.forwarding=1 + + +################################################################### +# Additional settings - these settings can improve the network +# security of the host and prevent against some network attacks +# including spoofing attacks and man in the middle attacks through +# redirection. Some network environments, however, require that these +# settings are disabled so review and enable them as needed. +# +# Ignore ICMP broadcasts +#net.ipv4.icmp_echo_ignore_broadcasts = 1 +# +# Ignore bogus ICMP errors +#net.ipv4.icmp_ignore_bogus_error_responses = 1 +# +# Do not accept ICMP redirects (prevent MITM attacks) +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv6.conf.all.accept_redirects = 0 +# _or_ +# Accept ICMP redirects only for gateways listed in our default +# gateway list (enabled by default) +# net.ipv4.conf.all.secure_redirects = 1 +# +# Do not send ICMP redirects (we are not a router) +#net.ipv4.conf.all.send_redirects = 0 +# +# Do not accept IP source route packets (we are not a router) +#net.ipv4.conf.all.accept_source_route = 0 +#net.ipv6.conf.all.accept_source_route = 0 +# +# Log Martian Packets +#net.ipv4.conf.all.log_martians = 1 +# + +#kernel.shmmax = 141762560 diff --git a/meta/recipes-extended/procps/procps.inc b/meta/recipes-extended/procps/procps.inc new file mode 100644 index 0000000000..da91da232d --- /dev/null +++ b/meta/recipes-extended/procps/procps.inc @@ -0,0 +1,31 @@ +SUMMARY = "System and process monitoring utilities" +DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ +the /proc filesystem. The package \ includes the programs ps, top, vmstat, w, kill, and skill." +HOMEPAGE = "http://procps.sf.net" +SECTION = "base" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM="file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://COPYING.LIB;md5=6e29c688d912da12b66b73e32b03d812 \ + file://ps/COPYING;md5=6e29c688d912da12b66b73e32b03d812 \ + file://proc/COPYING;md5=6e29c688d912da12b66b73e32b03d812" +DEPENDS = "ncurses" + +SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \ + file://install.patch" + +inherit autotools-brokensep update-alternatives + +do_install_append() { + mv ${D}${bindir}/watch ${D}${bindir}/watch.${BPN} +} + +FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so" +FILES_SOLIBSDEV = "" + +ALTERNATIVE_${PN} = "top uptime free pkill pmap kill sysctl ps pgrep pwdx watch" +ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" +ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" +ALTERNATIVE_LINK_NAME[watch] = "${base_bindir}/watch" +ALTERNATIVE_TARGET[watch] = "${bindir}/watch.${BPN}" +ALTERNATIVE_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..e20ff2826c --- /dev/null +++ b/meta/recipes-extended/procps/procps_3.2.8.bb @@ -0,0 +1,42 @@ +require procps.inc + +PR = "r12" + +SRC_URI += "file://procmodule.patch \ + file://psmodule.patch \ + file://linux-limits.patch \ + file://sysctl.conf \ + file://procps-3.2.8+gmake-3.82.patch \ + file://gnu-kbsd-version.patch \ + file://60_linux_version_init.patch \ + file://procps-3.2.7-top-remcpu.patch \ + file://procps-3.2.8-ps-cgroup.patch \ + file://detect_bitness.patch \ + file://0001-Fix-musl-build-failure.patch \ + " + +SRC_URI[md5sum] = "9532714b6846013ca9898984ba4cd7e0" +SRC_URI[sha256sum] = "11ed68d8a4433b91cd833deb714a3aa849c02aea738c42e6b4557982419c1535" + +EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}" \ + CPPFLAGS=-I${STAGING_INCDIR} \ + LDFLAGS="${LDFLAGS}" \ + CURSES=-lncurses \ + install="install -D" \ + ldconfig=echo' + +EXTRA_OEMAKE_append_p2041rdb = ' m64=-m32' +EXTRA_OEMAKE_append_p4080ds = ' m64=-m32' +EXTRA_OEMAKE_append_qemuppc = ' m64=-m32' + + +do_install_append () { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/sysctl.d + ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf + fi +} + +CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch new file mode 100644 index 0000000000..e57d60f6a3 --- /dev/null +++ b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch @@ -0,0 +1,46 @@ +From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001 +From: Brad Jorsch +Date: Fri, 28 Feb 2014 21:55:02 +1100 +Subject: [PATCH] Typo in fuser makes -M on all the time + +Brad found that fuser had the -M option on all the time. +A simple but significant typo caused this, thanks the the patch. + +Bug-Debian: http://bugs.debian.org/740275 + +Upstream-Status: Backport + +Signed-off-by: Craig Small +--- + ChangeLog | 4 ++++ + src/fuser.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index fd1cccf..e5f784c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Changes in 22.22 ++================ ++ * Fixed typo in fuser which has -M on Debian #740275 ++ + Changes in 22.21 + ================ + * Missing comma in fuser(1) added Debian #702391 +diff --git a/src/fuser.c b/src/fuser.c +index b485f65..389b302 100644 +--- a/src/fuser.c ++++ b/src/fuser.c +@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) + usage(_("No process specification given")); + + /* Check if -M flag was used and if so check mounts */ +- if (opts * OPT_ISMOUNTPOINT) { ++ if (opts & OPT_ISMOUNTPOINT) { + check_mountpoints(&mounts, &names_head, &names_tail); + } + +-- +1.8.4.2 + diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 0000000000..c0835e041e --- /dev/null +++ b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,29 @@ +From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Wed, 20 Aug 2014 10:31:37 +0000 +Subject: [PATCH] Include for PATH_MAX + +When building against musl libc, PATH_MAX is defined in . + +Signed-off-by: Paul Barker + +Upstream-status: Accepted (Should be in next release after 22.21) +--- + src/pstree.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pstree.c b/src/pstree.c +index 071e6c4..0d28260 100644 +--- a/src/pstree.c ++++ b/src/pstree.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #include "i18n.h" + #include "comm.h" +-- +2.0.4 + 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 @@ +SUMMARY = "Utilities for managing processes on your system" +DESCRIPTION = "The psmisc package contains utilities for managing processes on your \ +system: pstree, killall and fuser. The pstree command displays a tree \ +structure of all of the running processes on your system. The killall \ +command sends a specified signal (SIGTERM if nothing is specified) to \ +processes identified by name. The fuser command identifies the PIDs \ +of processes that are using specified files or filesystems." +SECTION = "base" +DEPENDS = "ncurses virtual/libintl" +LICENSE = "GPLv2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz" + +S = "${WORKDIR}/psmisc-${PV}" + +inherit autotools gettext + +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc" +PACKAGES += "psmisc-extras" + +FILES_${PN} = "" +RDEPENDS_${PN} = "fuser killall pstree" + +FILES_fuser = "${bindir}/fuser.${BPN}" +FILES_fuser-doc = "${mandir}/man1/fuser*" + +FILES_killall = "${bindir}/killall.${BPN}" +FILES_killall-doc = "${mandir}/man1/killall*" + +FILES_pstree = "${bindir}/pstree" +FILES_pstree-doc = "${mandir}/man1/pstree*" + +FILES_psmisc-extras = "${bindir}" +FILES_psmisc-extras-doc = "${mandir}" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "90" + +ALTERNATIVE_killall = "killall" + +ALTERNATIVE_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..66aba9ec57 --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb @@ -0,0 +1,10 @@ +require psmisc.inc +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf" +SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a" + +SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \ + file://0002-Include-limits.h-for-PATH_MAX.patch \ + " 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..5f47fbd183 --- /dev/null +++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch @@ -0,0 +1,75 @@ +Upstream-Status: Pending + +--- quota-tools.orig/configure.in ++++ quota-tools/configure.in +@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG) + AC_SUBST(NETLINKLIBS) + + AC_SEARCH_LIBS(gethostbyname, nsl) +-AC_MSG_CHECKING(for host_access in -lwrap) +-AC_CACHE_VAL(ac_cv_lib_wrap_main, +- saved_LIBS="$LIBS" +- LIBS="$LIBS -lwrap" +- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +- #include +- #include +- #include +- #include +- #include +- struct request_info request; +- int deny_severity, allow_severity;]],[[hosts_access(&request);]])], +- dnl We always restore LIBS as we add -lwrap in the next check +- [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], +- [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) +- ]) + +-if test ${ac_cv_lib_wrap_main} = yes; then +- AC_CHECK_HEADER(tcpd.h,, [ +- echo 'ERROR: could not find tcpd.h - missing TCP wrappers package' +- exit 1 +- ]) +- LIBS="$LIBS -lwrap" +- AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) +- COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" ++AC_ARG_WITH(tcpwrappers, ++ [ --with-tcpwrappers=[yes/no/try] Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]], ++ , ++ with_tcpwrappers="try") ++ ++if test "x$with_tcpwrappers" != xno; then ++ AC_MSG_CHECKING(for host_access in -lwrap) ++ AC_CACHE_VAL(ac_cv_lib_wrap_main, ++ saved_LIBS="$LIBS" ++ LIBS="$LIBS -lwrap" ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ #include ++ #include ++ #include ++ #include ++ struct request_info request; ++ int deny_severity, allow_severity;]],[[hosts_access(&request);]])], ++ dnl We always restore LIBS as we add -lwrap in the next try ++ [ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)], ++ [ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)]) ++ ]) ++ ++ if test "x$ac_cv_lib_wrap_main" = xyes; then ++ AC_CHECK_HEADER(tcpd.h,, [ ++ if test "x$with_tcpwrappers" != xtry; then ++ AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package]) ++ fi ++ ]) ++ ++ LIBS="$LIBS -lwrap" ++ AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad]) ++ COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS" ++ elif test "x$with_tcpwrappers" != xtry; then ++ AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package]) ++ fi + fi + ++ + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + 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 @@ +SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem" +SECTION = "base" +HOMEPAGE = "http://sourceforge.net/projects/linuxquota/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136" +LICENSE = "BSD & GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \ + file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \ + file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb" +PR = "r1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \ + file://config-tcpwrappers.patch" + +SRC_URI[md5sum] = "5c2c31e321d2e1322ce12d69ae5c66d6" +SRC_URI[sha256sum] = "a36300bbc126b79b745bf937245092808b4585aa3309ef3335d4ab9d873cd206" + +S = "${WORKDIR}/quota-tools" + +DEPENDS = "gettext-native e2fsprogs" + +inherit autotools-brokensep gettext pkgconfig + +EXTRA_OEMAKE += 'STRIP=""' + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers" + +do_install() { + oe_runmake prefix=${D}${prefix} install +} 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 @@ +From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001 +From: Steve Dickson +Date: Wed, 21 Aug 2013 14:40:22 -0400 +Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am + +Upstream-Status: backport + +Commit 8d7a0708 cause a regression where the rpcuser id was not +being set, which in turn cause rpcbind to immediately exit. +This patch removes the extra ',' that was in the AC_ARG_WITH +statement in the configure.ac file. + +Signed-off-by: Steve Dickson +Signed-off-by: Cristian Iorga +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 2b67720..1cf42d3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir], + AC_SUBST([statedir], [$with_statedir]) + + AC_ARG_WITH([rpcuser], +- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]), ++ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]) + ,, [with_rpcuser=root]) + AC_SUBST([rpcuser], [$with_rpcuser]) + +-- +1.8.3.2 + 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 @@ +Upstream-Status: Pending + +From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Tue, 2 Feb 2010 09:36:03 +0000 +Subject: [PATCH 1/2] uclibc-nss + +--- + src/rpcbind.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 525ffba..1fe1a60 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -67,7 +67,11 @@ + #include + #include + #include ++#if defined(__UCLIBC__) ++#define __nss_configure_lookup(x,y) ++#else + #include ++#endif + #include "config.h" + #include "rpcbind.h" + +-- +1.6.6.1 + 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 @@ +Upstream-Status: Pending + +From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Tue, 2 Feb 2010 09:47:57 +0000 +Subject: [PATCH 2/2] uclibc-rpcsvc-defines + +--- + src/security.c | 28 ++++++++++++++++++++++++++++ + 1 files changed, 28 insertions(+), 0 deletions(-) + +diff --git a/src/security.c b/src/security.c +index 0edeac6..e9fed55 100644 +--- a/src/security.c ++++ b/src/security.c +@@ -20,6 +20,32 @@ + /* + * XXX for special case checks in check_callit. + */ ++#if defined(__UCLIBC__) ++ ++#define MOUNTPROC_MNT 1 ++#define MOUNTPROC_UMNT 3 ++ ++#define NFS_PROGRAM 100003 ++#define YPPROG 100004 ++#define MOUNTPROG 100005 ++#define YPBINDPROG 100007 ++#define YPPASSWDPROG 100009 ++#define RQUOTAPROG 100011 ++ ++#define YPPROC_NULL 0 ++#define YPPROC_DOMAIN 1 ++#define YPPROC_DOMAIN_NONACK 2 ++#define YPPROC_MATCH 3 ++#define YPPROC_FIRST 4 ++#define YPPROC_NEXT 5 ++#define YPPROC_XFR 6 ++#define YPPROC_CLEAR 7 ++#define YPPROC_ALL 8 ++ ++#define YPBINDPROC_SETDOM 2 ++ ++#else ++ + #include + #include + #include +@@ -27,6 +53,8 @@ + #include + #include + ++#endif ++ + #include "rpcbind.h" + + #ifdef LIBWRAP +-- +1.6.6.1 + 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 @@ +#!/bin/sh +# +# start/stop rpcbind daemon. + +### BEGIN INIT INFO +# Provides: rpcbind +# Required-Start: $network +# Required-Stop: $network +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: RPC portmapper replacement +# Description: rpcbind is a server that converts RPC (Remote +# Procedure Call) program numbers into DARPA +# protocol port numbers. It must be running in +# order to make RPC calls. Services that use +# RPC include NFS and NIS. +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +test -f /sbin/rpcbind || exit 0 + +OPTIONS="" +if [ -f /etc/default/rpcbind ] +then + . /etc/default/rpcbind +elif [ -f /etc/rpcbind.conf ] +then + . /etc/rpcbind.conf +fi + +start () +{ + echo -n "Starting rpcbind daemon..." + if pidof /sbin/rpcbind >/dev/null; then + echo "already running." + exit 0 + fi + start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@" + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi +} + +stop () +{ + echo "Stopping rpcbind daemon..." + if ! pidof /sbin/rpcbind >/dev/null; then + echo "not running." + return 0 + fi + start-stop-daemon --stop --quiet --exec /sbin/rpcbind + if [ $? -eq 0 ]; then + echo "done." + else + echo "failed." + fi +} + +case "$1" in + start) + start $OPTIONS + ;; + stop) + stop + ;; + force-reload) + stop + start $OPTIONS + ;; + restart) + stop + start $OPTIONS + ;; + status) + status /sbin/rpcbind + ;; + *) + echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" + exit 1 + ;; +esac + +exit $? 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 @@ +# Optional arguments passed to rpcbind. +# +RPCBIND_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..b3ae2541a0 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service @@ -0,0 +1,12 @@ +[Unit] +Description=RPC Bind Service +Requires=rpcbind.socket + +[Service] +Type=forking +EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf +ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS +SuccessExitStatus=2 + +[Install] +Also=rpcbind.socket diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket new file mode 100644 index 0000000000..d63c1d9720 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket @@ -0,0 +1,8 @@ +[Unit] +Description=RPCbind Server Activation Socket + +[Socket] +ListenStream=/var/run/rpcbind.sock + +[Install] +WantedBy=sockets.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..b7324766f7 --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb @@ -0,0 +1,64 @@ +SUMMARY = "Universal Addresses to RPC Program Number Mapper" +DESCRIPTION = "The rpcbind utility is a server that converts RPC \ + program numbers into universal addresses." +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" +DEPENDS = "libtirpc quota" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ + file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ + file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \ + file://init.d \ + ${UCLIBCPATCHES} \ + file://rpcbind.conf \ + file://rpcbind.socket \ + file://rpcbind.service \ + " + +UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \ + file://0002-uclibc-rpcsvc-defines.patch \ + " +UCLIBCPATCHES ?= "" + +SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68" +SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e" + +inherit autotools update-rc.d systemd pkgconfig + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" + +INITSCRIPT_NAME = "rpcbind" +INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" + +inherit useradd + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ + --shell /bin/false --user-group rpc" + +EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" + +do_install_append () { + mv ${D}${bindir} ${D}${sbindir} + + install -d ${D}${sysconfdir}/init.d + sed -e 's,/etc/,${sysconfdir}/,g' \ + -e 's,/sbin/,${sbindir}/,g' \ + ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind + chmod 0755 ${D}${sysconfdir}/init.d/rpcbind + + install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir} + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/rpcbind.service +} 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +# The patch is borrowed from OE: +# http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=4ee790cc6974bdfe1c9b06c0567b1c56f56d6615 +# and was rebased to screen-4.0.3's configure.in +# by Dexuan Cui (dexuan.cui@intel.com). +# +# The description of the original patch is: +# +# Patch by Hannes Reich (hannes@skynet.ie) 22-Jul-2005 +# Resolves _some_ of the cross-compilation issues in screen's configure.in +# +diff --git a/configure.in b/configure.in +index 34c9372..d5ed48a 100644 +--- a/configure.in ++++ b/configure.in +@@ -37,6 +37,325 @@ pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVE + VERSION="$rev.$vers.$pat" + AC_NOTE(this is screen version $VERSION) + AC_SUBST(VERSION) ++ ++AH_TOP([ ++/* Copyright (c) 1993-2000 ++ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) ++ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) ++ * Copyright (c) 1987 Oliver Laumann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program (see the file COPYING); if not, write to the ++ * Free Software Foundation, Inc., ++ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ * ++ */ ++ ++ ++/********************************************************************** ++ * ++ * User Configuration Section ++ */ ++ ++/* ++ * Maximum of simultaneously allowed windows per screen session. ++ */ ++#ifndef MAXWIN ++# define MAXWIN 40 ++#endif ++ ++/* ++ * Define SOCKDIR to be the directory to contain the named sockets ++ * screen creates. This should be in a common subdirectory, such as ++ * /usr/local or /tmp. It makes things a little more secure if you ++ * choose a directory which is not writable by everyone or where the ++ * "sticky" bit is on, but this isn't required. ++ * If SOCKDIR is not defined screen will put the named sockets in ++ * the user's home directory. Notice that this can cause you problems ++ * if some user's HOME directories are AFS- or NFS-mounted. Especially ++ * AFS is unlikely to support named sockets. ++ * ++ * Screen will name the subdirectories "S-$USER" (e.g /tmp/S-davison). ++ */ ++#undef SOCKDIR ++ ++/* ++ * Define this if the SOCKDIR is not shared between hosts. ++ */ ++#define SOCKDIR_IS_LOCAL_TO_HOST ++ ++/* ++ * Screen sources two startup files. First a global file with a path ++ * specified here, second your local $HOME/.screenrc ++ * Don't define this, if you don't want it. ++ */ ++#ifndef ETCSCREENRC ++# define ETCSCREENRC "/usr/local/etc/screenrc" ++#endif ++ ++/* ++ * Screen can look for the environment variable $SYSSCREENRC and -if it ++ * exists- load the file specified in that variable as global screenrc. ++ * If you want to enable this feature, define ALLOW_SYSSCREENRC to one (1). ++ * Otherwise ETCSCREENRC is always loaded. ++ */ ++#define ALLOW_SYSSCREENRC 1 ++ ++/* ++ * Screen needs encoding files for the translation of utf8 ++ * into some encodings, e.g. JIS, BIG5. ++ * Only needed if FONT, ENCODINGS and UTF8 are defined. ++ */ ++#ifndef SCREENENCODINGS ++# define SCREENENCODINGS "/usr/local/lib/screen/encodings" ++#endif ++/* ++ * Define CHECKLOGIN to force Screen users to enter their Unix password ++ * in addition to the screen password. ++ * ++ * Define NOSYSLOG if yo do not have logging facilities. Currently ++ * syslog() will be used to trace ``su'' commands only. ++ */ ++#define CHECKLOGIN 1 ++#undef NOSYSLOG ++ ++ ++/* ++ * define PTYMODE if you do not like the default of 0622, which allows ++ * public write to your pty. ++ * define PTYGROUP to some numerical group-id if you do not want the ++ * tty to be in "your" group. ++ * Note, screen is unable to change mode or group of the pty if it ++ * is not installed with sufficient privilege. (e.g. set-uid-root) ++ * define PTYROFS if the /dev/pty devices are mounted on a read-only ++ * filesystem so screen should not even attempt to set mode or group ++ * even if running as root (e.g. on TiVo). ++ */ ++#undef PTYMODE ++#undef PTYGROUP ++#undef PTYROFS ++ ++/* ++ * If screen is NOT installed set-uid root, screen can provide tty ++ * security by exclusively locking the ptys. While this keeps other ++ * users from opening your ptys, it also keeps your own subprocesses ++ * from being able to open /dev/tty. Define LOCKPTY to add this ++ * exclusive locking. ++ */ ++#undef LOCKPTY ++ ++/* ++ * If you'd rather see the status line on the first line of your ++ * terminal rather than the last, define TOPSTAT. ++ */ ++#undef TOPSTAT ++ ++/* ++ * define DETACH can detach a session. An absolute 'must'. ++ */ ++#define DETACH ++ ++/* ++ * here come the erlangen extensions to screen: ++ * define LOCK if you want to use a lock program for a screenlock. ++ * define PASSWORD for secure reattach of your screen. ++ * define COPY_PASTE to use the famous hacker's treasure zoo. ++ * define POW_DETACH to have a detach_and_logout key (requires DETACH). ++ * define REMOTE_DETACH (-d option) to move screen between terminals. ++ * define AUTO_NUKE to enable Tim MacKenzies clear screen nuking ++ * define PSEUDOS to allow window input/output filtering ++ * define MULTI to allow multiple attaches. ++ * define MULTIUSER to allow other users attach to your session ++ * (if they are in the acl, of course) ++ * define MAPKEYS to include input keyboard translation. ++ * define FONT to support ISO2022/alternet charset support ++ * define COLOR to include ansi color support. This may expose ++ * a bug in x11r6-color-xterm. ++ * define DW_CHARS to include support for double-width character ++ * sets. ++ * define ENCODINGS to include support for encodings like euc or big5. ++ * Needs FONT to work. ++ * define UTF8 if you want support for UTF-8 encoding. ++ * Needs FONT and ENCODINGS to work. ++ * define COLORS16 if you want 16 colors. ++ * Needs COLOR to work. ++ * define BUILTIN_TELNET to add telnet support to screen. ++ * Syntax: screen //telnet host [port] ++ * define RXVT_OSC if you want support for rxvts special ++ * change fgcolor/bgcolor/bgpicture sequences ++ */ ++#undef SIMPLESCREEN ++#ifndef SIMPLESCREEN ++# define LOCK ++# define PASSWORD ++# define COPY_PASTE ++# define REMOTE_DETACH ++# define POW_DETACH ++# define AUTO_NUKE ++# define PSEUDOS ++# define MULTI ++# define MULTIUSER ++# define MAPKEYS ++# define COLOR ++# define FONT ++# define DW_CHARS ++# define ENCODINGS ++# define UTF8 ++# define COLORS16 ++# define ZMODEM ++# define BLANKER_PRG ++#endif /* SIMPLESCREEN */ ++ ++#undef BUILTIN_TELNET ++#undef RXVT_OSC ++#undef COLORS256 ++ ++ ++/* ++ * If you have a braille display you should define HAVE_BRAILLE. ++ * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi ++ * Rangin (bargi@dots.physics.orst.edu). ++ * WARNING: this is more or less unsupported code, it may be full of ++ * bugs leading to security holes, enable at your own risk! ++ */ ++#undef HAVE_BRAILLE ++ ++ ++/* ++ * As error messages are mostly meaningless to the user, we ++ * try to throw out phrases that are somewhat more familiar ++ * to ...well, at least familiar to us NetHack players. ++ */ ++#ifndef NONETHACK ++# define NETHACK ++#endif /* NONETHACK */ ++ ++/* ++ * If screen is installed with permissions to update /etc/utmp (such ++ * as if it is installed set-uid root), define UTMPOK. ++ */ ++#define UTMPOK ++ ++/* Set LOGINDEFAULT to one (1) ++ * if you want entries added to /etc/utmp by default, else set it to ++ * zero (0). ++ * LOGINDEFAULT will be one (1) whenever LOGOUTOK is undefined! ++ */ ++#define LOGINDEFAULT 1 ++ ++/* Set LOGOUTOK to one (1) ++ * if you want the user to be able to log her/his windows out. ++ * (Meaning: They are there, but not visible in /etc/utmp). ++ * Disabling this feature only makes sense if you have a secure /etc/utmp ++ * database. ++ * Negative examples: suns usually have a world writable utmp file, ++ * xterm will run perfectly without s-bit. ++ * ++ * If LOGOUTOK is undefined and UTMPOK is defined, all windows are ++ * initially and permanently logged in. ++ * ++ * Set CAREFULUTMP to one (1) if you want that users have at least one ++ * window per screen session logged in. ++ */ ++#define LOGOUTOK 1 ++#undef CAREFULUTMP ++ ++ ++/* ++ * If UTMPOK is defined and your system (incorrectly) counts logins by ++ * counting non-null entries in /etc/utmp (instead of counting non-null ++ * entries with no hostname that are not on a pseudo tty), define USRLIMIT ++ * to have screen put an upper-limit on the number of entries to write ++ * into /etc/utmp. This helps to keep you from exceeding a limited-user ++ * license. ++ */ ++#undef USRLIMIT ++ ++/* ++ * both must be defined if you want to favor tcsendbreak over ++ * other calls to generate a break condition on serial lines. ++ * (Do not bother, if you are not using plain tty windows.) ++ */ ++#define POSIX_HAS_A_GOOD_TCSENDBREAK ++#define SUNOS4_AND_WE_TRUST_TCSENDBREAK ++ ++/* ++ * to lower the interrupt load on the host machine, you may want to ++ * adjust the VMIN and VTIME settings used for plain tty windows. ++ * See the termio(4) manual page (Non-Canonical Mode Input Processing) ++ * for details. ++ * if undefined, VMIN=1, VTIME=0 is used as a default - this gives you ++ * best user responsiveness, but highest interrupt frequency. ++ * (Do not bother, if you are not using plain tty windows.) ++ */ ++#define TTYVMIN 100 ++#define TTYVTIME 2 ++ ++/* ++ * looks like the above values are ignored by setting FNDELAY. ++ * This is default for all pty/ttys, you may disable it for ++ * ttys here. After playing with it for a while, one may find out ++ * that this feature may cause screen to lock up. ++ */ ++#ifdef bsdi ++# define TTY_DISABLE_FNBLOCK /* select barfs without it ... */ ++#endif ++ ++ ++/* ++ * Some terminals, e.g. Wyse 120, use a bitfield to select attributes. ++ * This doesn't work with the standard so/ul/m? terminal entries, ++ * because they will cancel each other out. ++ * On TERMINFO machines, "sa" (sgr) may work. If you want screen ++ * to switch attributes only with sgr, define USE_SGR. ++ * This is *not* recomended, do this only if you must. ++ */ ++#undef USE_SGR ++ ++ ++/* ++ * Define USE_LOCALE if you want screen to use the locale names ++ * for the name of the month and day of the week. ++ */ ++#define USE_LOCALE ++ ++/* ++ * Define USE_PAM if your system supports PAM (Pluggable Authentication ++ * Modules) and you want screen to use it instead of calling crypt(). ++ * (You may also need to add -lpam to LIBS in the Makefile.) ++ */ ++#undef USE_PAM ++ ++/* ++ * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w ++ * if the terminal width is greater than 131 columns. No longer needed ++ * on modern systems which use $COLUMNS or the tty settings instead. ++ */ ++#undef CHECK_SCREEN_W ++ ++/********************************************************************** ++ * ++ * End of User Configuration Section ++ * ++ * Rest of this file is modified by 'configure' ++ * Change at your own risk! ++ * ++ */ ++]) ++# end of AH_TOP ++ ++AC_PREFIX_PROGRAM(screen) ++AC_PREFIX_PROGRAM(gzip) + AC_PREFIX_PROGRAM(screen) + AC_PREFIX_PROGRAM(gzip) + +@@ -46,6 +365,7 @@ AC_PROG_CPP + AC_PROG_GCC_TRADITIONAL + AC_ISC_POSIX + ++AC_MSG_CHECKING([for compiler sanity]) + AC_TRY_RUN(main(){exit(0);},,[ + if test $CC != cc ; then + AC_NOTE(Your $CC failed - restarting with CC=cc) +@@ -54,14 +374,9 @@ CC=cc + export CC + exec $0 $configure_args + fi +-]) ++],AC_MSG_WARN([skipping test due to crosscompilation])) + +-AC_TRY_RUN(main(){exit(0);},, +-exec 5>&2 +-eval $ac_link +-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) +-AC_NOTE($ac_compile) +-AC_MSG_ERROR(Can't run the compiler - sorry)) ++AC_MSG_CHECKING([if compiler sets exit status]) + + AC_TRY_RUN([ + main() +@@ -69,7 +384,8 @@ main() + int __something_strange_(); + __something_strange_(0); + } +-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) ++],AC_MSG_ERROR(Your compiler does not set the exit status - sorry),, ++AC_MSG_WARN(skipping test due to crosscompilation)) + + AC_PROG_AWK + +@@ -103,6 +419,7 @@ AC_ARG_ENABLE(socket-dir, + dnl + dnl **** special unix variants **** + dnl ++AH_TEMPLATE(ISC,[]) + if test -n "$ISC"; then + AC_DEFINE(ISC) LIBS="$LIBS -linet" + fi +@@ -114,11 +431,13 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again.... + dnl fi + dnl fi + ++AH_TEMPLATE([sysV68],[]) + if test -f /sysV68 ; then + AC_DEFINE(sysV68) + fi + + AC_CHECKING(for MIPS) ++AH_TEMPLATE([MIPS],[]) + if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then + oldlibs="$LIBS" + test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha. +@@ -132,6 +451,8 @@ AC_DEFINE(MIPS) + AC_CHECKING(wait3) + AC_TRY_LINK(,[wait3();], , + AC_CHECKING(wait2) ++AH_TEMPLATE([USE_WAIT2],[On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com]) ++dnl TODO(Hannes) shipped config.h.in wraps the define in #ifdef BSDWAIT + AC_TRY_LINK(,[wait2();], + dnl John Rouillard (rouilj@sni-usa.com): + dnl need -I/usr/include/bsd in RISCOS otherwise sockets are broken, no +@@ -154,9 +475,11 @@ if test -f /usr/lib/libpyr.a ; then + oldlibs="$LIBS" + LIBS="$LIBS -lpyr" + AC_CHECKING(Pyramid OSX) ++AH_TEMPLATE([OSX], [Pyramid OSX]) + AC_TRY_LINK(,[open_controlling_pty("")], AC_DEFINE(OSX), LIBS="$oldlibs") + fi + ++AH_TEMPLATE([POSIX],[Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).]) + dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi): + dnl BBN butterfly is not POSIX, but a MACH BSD system. + dnl Do not define POSIX and TERMIO. +@@ -183,6 +506,7 @@ main () { + fi + + AC_CHECKING(for System V) ++AH_TEMPLATE([SYSV], [Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)]) + AC_TRY_COMPILE( + [#include + #include +@@ -198,6 +522,11 @@ AC_EGREP_CPP(yes, + oldlibs="$LIBS" + LIBS="$LIBS -lelf" + AC_CHECKING(SVR4) ++AH_TEMPLATE([SVR4],[]) ++AH_TEMPLATE([BUGGYGETLOGIN], ++[If ttyslot() breaks getlogin() by returning indexes to utmp entries ++ of type DEAD_PROCESS, then our getlogin() replacement should be ++ selected by defining BUGGYGETLOGIN.]) + AC_TRY_LINK([#include + ],, + [AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +@@ -235,6 +564,9 @@ dnl **** Job control **** + dnl + + AC_CHECKING(BSD job jontrol) ++AH_TEMPLATE([BSDJOBS], ++[Define BSDJOBS if you have BSD-style job control (both process ++ groups and a tty that deals correctly with them)]) + AC_TRY_LINK( + [#include + #include +@@ -255,6 +587,10 @@ dnl + dnl **** setreuid(), seteuid() **** + dnl + AC_CHECKING(setreuid) ++AH_TEMPLATE([HAVE_SETREUID], ++[If your system has the calls setreuid() and setregid(), ++ define HAVE_SETREUID. Otherwise screen will use a forked process to ++ safely create output files without retaining any special privileges.]) + AC_TRY_LINK(,[ + #ifdef __hpux + setresuid(0, 0, 0); +@@ -269,6 +605,9 @@ dnl NeXT, AUX, ISC, and ultrix are still broken (no saved uid support) + dnl Solaris seteuid doesn't change the saved uid, bad for + dnl multiuser screen sessions + AC_CHECKING(seteuid) ++AH_TEMPLATE([HAVE_SETEUID], ++[If your system supports BSD4.4's seteuid() and setegid(), define ++ HAVE_SETEUID.]) + AC_TRY_LINK(,[ + #if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) + seteuid_is_broken(0); +@@ -292,7 +631,8 @@ dnl + dnl **** FIFO tests **** + dnl + +-AC_CHECKING(fifos) ++AC_CACHE_CHECK([usable fifos], ++ [screen_cv_sys_fifo_usable], + AC_TRY_RUN([ + #include + #include +@@ -357,12 +697,14 @@ main() + exit(1); + exit(0); + } +-], AC_NOTE(- your fifos are usable) fifo=1, +-AC_NOTE(- your fifos are not usable)) +-rm -f /tmp/conftest* +- +-if test -n "$fifo"; then +-AC_CHECKING(for broken fifo implementation) ++], screen_cv_sys_fifo_usable=yes, screen_cv_sys_fifo_usable=no)) ++ ++if test X"$screen_cv_sys_fifo_usable" = Xyes; then ++AH_TEMPLATE([BROKEN_PIPE], ++[Define this if your system exits select() immediatly if a pipe is ++ opened read-only and no writer has opened it.]) ++AC_CACHE_CHECK([broken fifo implementation], ++ [screen_cv_sys_fifo_broken_impl], + AC_TRY_RUN([ + #include + #include +@@ -407,9 +749,11 @@ main() + exit(1); + exit(0); + } +-], AC_NOTE(- your implementation is ok), +-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) +-rm -f /tmp/conftest* ++], screen_cv_sys_fifo_broken_impl=no, ++screen_cv_sys_fifo_broken_impl=yes)) ++if test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then ++ AC_DEFINE(BROKEN_PIPE) ++fi + fi + + dnl +@@ -418,7 +762,8 @@ dnl + dnl may need LIBS="$LIBS -lsocket" here + dnl + +-AC_CHECKING(sockets) ++AC_CACHE_CHECK([sockets are usable], ++ [screen_cv_sys_sockets_usable], + AC_TRY_RUN([ + #include + #include +@@ -469,12 +814,16 @@ main() + exit(1); + exit(0); + } +-], AC_NOTE(- your sockets are usable) sock=1, +-AC_NOTE(- your sockets are not usable)) +-rm -f /tmp/conftest* ++], screen_cv_sys_sockets_usable=yes, ++screen_cv_sys_sockets_usable=no)) + +-if test -n "$sock"; then ++if test X"$screen_cv_sys_sockets_usable" = Xyes; then + AC_CHECKING(socket implementation) ++AH_TEMPLATE([SOCK_NOT_IN_FS], ++[Define this if the unix-domain socket implementation doesn't ++ create a socket in the filesystem.]) ++AC_CACHE_CHECK([if sockets are not stored in the filesystem], ++ [screen_cv_sys_sockets_nofs], + AC_TRY_RUN([ + #include + #include +@@ -500,22 +849,25 @@ main() + close(s); + exit(0); + } +-],AC_NOTE(- you are normal), +-AC_NOTE(- unix domain sockets are not kept in the filesystem) +-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) +-rm -f /tmp/conftest* ++], screen_cv_sys_sockets_nofs=no, ++screen_cv_sys_sockets_nofs=yes)) ++ ++if test X"$screen_cv_sys_sockets_nofs" = Xyes; then ++ AC_DEFINE(SOCK_NOT_IN_FS) ++fi + fi + + + dnl + dnl **** choose sockets or fifos **** + dnl +-if test -n "$fifo"; then +- if test -n "$sock"; then +- if test -n "$nore"; then ++AH_TEMPLATE([NAMEDPIPE], [Define this if your system supports named pipes.]) ++if test X"$screen_cv_sys_fifo_usable" = Xyes; then ++ if test X"$screen_cv_sys_sockets_usable" = Xyes; then ++ if test X"$screen_cv_sys_sockets_nofs" = Xyes; then + AC_NOTE(- hmmm... better take the fifos) + AC_DEFINE(NAMEDPIPE) +- elif test -n "$fifobr"; then ++ elif test X"$screen_cv_sys_fifo_broken_impl" = Xyes; then + AC_NOTE(- as your fifos are broken lets use the sockets.) + else + AC_NOTE(- both sockets and fifos usable. let's take fifos.) +@@ -525,7 +877,7 @@ if test -n "$fifo"; then + AC_NOTE(- using named pipes, of course) + AC_DEFINE(NAMEDPIPE) + fi +-elif test -n "$sock"; then ++elif test X"$screen_cv_sys_sockets_usable" = Xyes; then + AC_NOTE(- using unix-domain sockets, of course) + else + AC_MSG_ERROR(you have neither usable sockets nor usable pipes -> no screen) +@@ -535,7 +887,11 @@ dnl + dnl **** check the select implementation **** + dnl + +-AC_CHECKING(select return value) ++AH_TEMPLATE([SELECT_BROKEN], ++[If the select return value doesn't treat a descriptor that is ++ usable for reading and writing as two hits, define SELECT_BROKEN.]) ++AC_CACHE_CHECK([for broken select return value], ++ [screen_cv_sys_select_broken_retval], + AC_TRY_RUN([ + #include + #include +@@ -634,17 +990,26 @@ main() + exit(1); + exit(0); + } +-],AC_NOTE(- select is ok), +-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) ++], screen_cv_sys_select_broken_retval=no, ++screen_cv_sys_select_broken_retval=yes)) ++if test X"$screen_cv_sys_select_broken_retval" = Xyes; then ++ AC_DEFINE(SELECT_BROKEN) ++fi + + dnl + dnl **** termcap or terminfo **** + dnl ++AH_TEMPLATE([TERMINFO], ++[Define TERMINFO if your machine emulates the termcap routines ++ with the terminfo database. ++ Thus the .screenrc file is parsed for ++ the command 'terminfo' and not 'termcap']) + AC_CHECKING(for tgetent) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + olibs="$LIBS" + LIBS="-lcurses $olibs" + AC_CHECKING(libcurses) ++AC_CHECK_LIB(ncursesw,tgetent) + AC_TRY_LINK(,[ + #ifdef __hpux + __sorry_hpux_libcurses_is_totally_broken_in_10_10(); +@@ -662,25 +1027,39 @@ LIBS="-lncurses $olibs" + AC_CHECKING(libncurses) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + AC_MSG_ERROR(!!! no tgetent - no screen)))))) +- +-AC_TRY_RUN([ ++AC_CACHE_CHECK([using terminfo database],[screen_cv_sys_terminfo_used], ++ AC_TRY_RUN([ + main() + { + exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); +-}], AC_NOTE(- you use the termcap database), +-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) ++} ++ ], screen_cv_sys_terminfo_used=no, ++ screen_cv_sys_terminfo_used=yes) ++) ++ ++if test X"$screen_cv_sys_terminfo_used" = Xyes; then ++ AC_DEFINE(TERMINFO) ++fi ++ + AC_CHECKING(ospeed) ++AH_TEMPLATE([NEED_OSPEED],[If your library does not define ospeed, define this.]) + AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) + + dnl + dnl **** PTY specific things **** + dnl ++AH_TEMPLATE([HAVE_DEV_PTC], ++[define HAVE_DEV_PTC if you have a /dev/ptc character special ++ device.]) + AC_CHECKING(for /dev/ptc) + if test -r /dev/ptc; then + AC_DEFINE(HAVE_DEV_PTC) + fi + + AC_CHECKING(for SVR4 ptys) ++AH_TEMPLATE([HAVE_SVR4_PTYS], ++[define HAVE_SVR4_PTYS if you have a /dev/ptmx character special ++ device and support the ptsname(), grantpt(), unlockpt() functions.]) + sysvr4ptys= + if test -c /dev/ptmx ; then + AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) +@@ -696,6 +1075,13 @@ AC_CHECK_FUNCS(openpty,, + fi + + AC_CHECKING(for ptyranges) ++AH_TEMPLATE([PTYRANGE0], ++[define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen ++ to unusual environments. E.g. For SunOs the defaults are "qpr" and ++ "0123456789abcdef". For SunOs 4.1.2 ++ #define PTYRANGE0 "pqrstuvwxyzPQRST" ++ is recommended by Dan Jacobson.]) ++AH_TEMPLATE([PTYRANGE1],[]) + if test -d /dev/ptym ; then + pdir='/dev/ptym' + else +@@ -812,6 +1198,9 @@ dnl + dnl **** utmp handling **** + dnl + AC_CHECKING(getutent) ++AH_TEMPLATE([GETUTENT], ++[If your system has getutent(), pututline(), etc. to write to the ++ utmp file, define GETUTENT.]) + AC_TRY_LINK([ + #include /* to get time_t on SCO */ + #include +@@ -845,6 +1234,7 @@ AC_TRY_LINK([ + [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs") + ) + AC_CHECKING(ut_host) ++AH_TEMPLATE([UTHOST],[Define UTHOST if the utmp file has a host field.]) + AC_TRY_COMPILE([ + #include + #include +@@ -855,8 +1245,9 @@ AC_TRY_COMPILE([ + #include + #endif + ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST)) ++AH_TEMPLATE([HAVE_UTEMPTER],[Define if you have the utempter utmp helper program]) + AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) +-if test "$have_utempter" = yes; then ++if test X"$have_utempter" = Xyes; then + AC_DEFINE(HAVE_UTEMPTER) + LIBS="$LIBS -lutempter" + fi +@@ -864,20 +1255,39 @@ fi + dnl + dnl **** loadav **** + dnl ++ ++AH_TEMPLATE([LOADAV], ++[If you want the "time" command to display the current load average ++ define LOADAV. Maybe you must install screen with the needed ++ privileges to read /dev/kmem. ++ Note that NLIST_ stuff is only checked, when getloadavg() is not available. ++]) ++AH_TEMPLATE([LOADAV_NUM]) ++AH_TEMPLATE([LOADAV_TYPE]) ++AH_TEMPLATE([LOADAV_SCALE]) ++AH_TEMPLATE([LOADAV_GETLOADAVG]) ++AH_TEMPLATE([LOADAV_UNIX]) ++AH_TEMPLATE([LOADAV_AVENRUN]) ++AH_TEMPLATE([LOADAV_USE_NLIST64]) ++ ++AH_TEMPLATE([NLIST_DECLARED]) ++AH_TEMPLATE([NLIST_STRUCT]) ++AH_TEMPLATE([NLIST_NAME_UNION]) ++ + AC_CHECKING(for libutil(s)) +-test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" +-test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" ++dnl I have no idea whether "login" is an appropriate symbol to check for here - Hannes ++AC_CHECK_LIB(utils,login) ++AC_CHECK_LIB(util,login) + + AC_CHECKING(getloadavg) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], + AC_DEFINE(LOADAV_GETLOADAVG) load=1, +-if test -f /usr/lib/libkvm.a ; then + olibs="$LIBS" +-LIBS="$LIBS -lkvm" ++AC_CHECK_LIB(kvm,kvm_open, + AC_CHECKING(getloadavg with -lkvm) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], + AC_DEFINE(LOADAV_GETLOADAVG) load=1, LIBS="$olibs") +-fi ++) + ) + + if test -z "$load" ; then +@@ -1019,6 +1429,12 @@ if test -n "$loadscale" ; then AC_DEFINE_UNQUOTED(LOADAV_SCALE,$loadscale) fi + dnl + dnl **** signal handling **** + dnl ++ ++AH_TEMPLATE([SIGVOID], ++[Define SIGVOID if your signal handlers return void. On older ++ systems, signal returns int, but on newer ones, it returns void.]) ++ ++ + if test -n "$posix" ; then + + dnl POSIX has reliable signals with void return type. +@@ -1036,6 +1452,7 @@ AC_TRY_COMPILE( + #endif + extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID)) + AC_CHECKING(sigset) ++AH_TEMPLATE([USESIGSET], [Define USESIGSET if you have sigset for BSD 4.1 reliable signals.]) + AC_TRY_LINK([ + #include + #include +@@ -1047,6 +1464,9 @@ sigset(0, (int (*)())0); + #endif + ], AC_DEFINE(USESIGSET)) + AC_CHECKING(signal implementation) ++AH_TEMPLATE([SYSVSIGS], ++[Define SYSVSIGS if signal handlers must be reinstalled after ++ they have been called.]) + AC_TRY_RUN([ + #include + #include +@@ -1089,13 +1509,14 @@ dnl **** libraries **** + dnl + + AC_CHECKING(for crypt and sec libraries) +-test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" ++dnl I have no idea whether "crypt" is an appropriate symbol to check for here - Hannes ++AC_CHECK_LIB(crypt_d,crypt) + oldlibs="$LIBS" +-LIBS="$LIBS -lcrypt" + AC_CHECKING(crypt) + AC_TRY_LINK(,,,LIBS="$oldlibs") +-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" +-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" ++AC_CHECK_LIB(crypt,crypt) ++AC_CHECK_LIB(sec,crypt) ++AC_CHECK_LIB(shadow,getspnam) + oldlibs="$LIBS" + LIBS="$LIBS -lsun" + AC_CHECKING(IRIX sun library) +@@ -1118,6 +1539,13 @@ dnl + dnl **** misc things **** + dnl + AC_CHECKING(wait union) ++AH_TEMPLATE([BSDWAIT], ++[Define BSDWAIT if your system defines a 'union wait' in ++ ++ Only allow BSDWAIT i.e. wait3 on nonposix systems, since ++ posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl ++ TODO(Hannes) shipped config.h.in does that with a #ifdef ++]) + AC_TRY_COMPILE([#include + #include + ],[ +@@ -1128,6 +1556,12 @@ AC_TRY_COMPILE([#include + #endif + ],AC_DEFINE(BSDWAIT)) + ++AH_TEMPLATE([TERMIO], ++[Define TERMIO if you have struct termio instead of struct sgttyb. ++ This is usually the case for SVID systems, where BSD uses sgttyb. ++ POSIX systems should define this anyway, even though they use ++ struct termios.]) ++ + if test -z "$butterfly"; then + AC_CHECKING(for termio or termios) + AC_TRY_CPP([#include ], AC_DEFINE(TERMIO), +@@ -1137,17 +1571,34 @@ fi + ) + fi + ++AH_TEMPLATE([CYTERMIO], [Define CYTERMIO if you have cyrillic termio modes.]) + dnl AC_CHECK_HEADER(shadow.h, AC_DEFINE(SHADOWPW)) + AC_CHECKING(getspnam) ++AH_TEMPLATE([SHADOWPW], ++[If the passwords are stored in a shadow file and you want the ++ builtin lock to work properly, define SHADOWPW.]) + AC_TRY_LINK([#include ], [getspnam("x");],AC_DEFINE(SHADOWPW)) + + AC_CHECKING(getttyent) ++AH_TEMPLATE([GETTTYENT], ++[If your system has the new format /etc/ttys (like 4.3 BSD) and the ++ getttyent(3) library functions, define GETTTYENT.]) + AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT)) + + AC_CHECKING(fdwalk) ++AH_TEMPLATE([HAVE_FDWALK], ++[Newer versions of Solaris include fdwalk, which can greatly improve ++ the startup time of screen; otherwise screen spends a lot of time ++ closing file descriptors.]) + AC_TRY_LINK([#include ], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK)) + +-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments) ++AH_TEMPLATE([USEBCOPY], ++[Define USEBCOPY if the bcopy/memcpy from your system's C library ++ supports the overlapping of source and destination blocks. When ++ undefined, screen uses its own (probably slower) version of bcopy().]) ++ ++AC_CACHE_CHECK([if bcopy handles overlap], ++ [screen_cv_sys_bcopy_overlap], + AC_TRY_RUN([ + main() { + char buf[10]; +@@ -1160,8 +1611,21 @@ main() { + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEBCOPY)) ++}], screen_cv_sys_bcopy_overlap=yes, ++screen_cv_sys_bcopy_overlap=no)) ++if test X"$screen_cv_sys_bcopy_overlap" = Xyes; then ++ AC_DEFINE(USEBCOPY) ++fi + ++AH_TEMPLATE([USEMEMMOVE], ++[SYSV machines may have a working memcpy() -- Oh, this is ++ quite unlikely. Tell me if you see one. ++ "But then, memmove() should work, if at all available" he thought... ++ Boing, never say "works everywhere" unless you checked SCO UNIX. ++ Their memove fails the test in the configure script. Sigh. (Juergen) ++]) ++AC_CACHE_CHECK([if memmove handles overlap], ++ [screen_cv_sys_memmove_overlap], + AC_TRY_RUN([ + #define bcopy(s,d,l) memmove(d,s,l) + main() { +@@ -1175,9 +1639,15 @@ main() { + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMMOVE)) +- ++}], screen_cv_sys_memmove_overlap=yes, ++screen_cv_sys_memmove_overlap=no)) ++if test X"$screen_cv_sys_memmove_overlap" = Xyes; then ++ AC_DEFINE(USEMEMMOVE) ++fi + ++AH_TEMPLATE([USEMEMCPY],[]) ++AC_CACHE_CHECK([if memcpy handles overlap], ++ [screen_cv_sys_memcpy_overlap], + AC_TRY_RUN([ + #define bcopy(s,d,l) memcpy(d,s,l) + main() { +@@ -1191,9 +1661,19 @@ main() { + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMCPY)) ++}], screen_cv_sys_memcpy_overlap=yes, ++screen_cv_sys_memcpy_overlap=no)) ++if test X"$screen_cv_sys_memcpy_overlap" = Xyes; then ++ AC_DEFINE(USEMEMCPY) ++fi + + AC_MSG_CHECKING(long file names) ++AH_TEMPLATE([NAME_MAX], ++[If you are on a SYS V machine that restricts filename length to 14 ++ characters, you may need to enforce that by setting NAME_MAX to 14]) ++dnl TODO(Hannes) shipped config.h.in has ++dnl #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ ++dnl ahead of this + (echo 1 > /tmp/conftest9012345) 2>/dev/null + (echo 2 > /tmp/conftest9012346) 2>/dev/null + val=`cat /tmp/conftest9012345 2>/dev/null` +@@ -1206,17 +1686,28 @@ fi + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) ++AH_TEMPLATE([USEVARARGS], ++[If your system has vsprintf() and requires the use of the macros in ++ "varargs.h" to use functions with variable arguments, ++ define USEVARARGS.]) + AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) + + AC_HEADER_DIRENT + + AC_MSG_CHECKING(for setenv) ++AH_TEMPLATE([USESETENV], [If your system has setenv() and unsetenv() define USESETENV]) + AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for putenv) ++AH_TEMPLATE([NEEDPUTENV], ++[If your system does not come with a setenv()/putenv()/getenv() ++ functions, you may bring in our own code by defining NEEDPUTENV.]) + AC_TRY_LINK(,[putenv((char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes) , AC_MSG_RESULT(no);AC_DEFINE(NEEDPUTENV) + )) + AC_MSG_CHECKING([for nl_langinfo(CODESET)]) ++AH_TEMPLATE([HAVE_NL_LANGINFO], ++[define HAVE_NL_LANGINFO if your system has the nl_langinfo() call ++ and defines CODESET.]) + AC_TRY_LINK([ + #include + ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) +@@ -1266,7 +1757,8 @@ fi + dnl Ptx bug workaround -- insert -lc after -ltermcap + test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" + +-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) ++AC_MSG_CHECKING(compiler sanity) ++AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.), AC_MSG_WARN(Skipping test due to crosscompilation)) + + ETCSCREENRC="\"/usr/local/etc/screenrc\"" + if test -n "$prefix"; then diff --git a/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch new file mode 100644 index 0000000000..e0caf5d83e --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/fix-parallel-make.patch @@ -0,0 +1,19 @@ +This fixes the parallel make install failure + +Upstream-Status: Pending + +Signed-off-by: Saul Wold + +Index: screen-4.0.3/Makefile.in +=================================================================== +--- screen-4.0.3.orig/Makefile.in ++++ screen-4.0.3/Makefile.in +@@ -70,7 +70,7 @@ screen: $(OFILES) + .c.o: + $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< + +-install_bin: .version screen ++install_bin: .version screen installdirs + -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ + then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch new file mode 100644 index 0000000000..538a8fa3b2 --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.2-CVE-2009-1215.patch @@ -0,0 +1,27 @@ +Upstream-Status: Backport + +This patch is a backport from screen_4.0.3-11+lenny1.diff +to fix CVE-2009-1215. + +Signed-off-by: Shenbo Huang +--- + fileio.c | 5 ----- + 1 file changed, 5 deletions(-) +--- a/fileio.c ++++ b/fileio.c +@@ -365,11 +365,6 @@ int dump; + char *mode = "w"; + #ifdef COPY_PASTE + int public = 0; +-# ifdef _MODE_T +- mode_t old_umask; +-# else +- int old_umask; +-# endif + # ifdef HAVE_LSTAT + struct stat stb, stb2; + int fd, exists = 0; diff --git a/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch new file mode 100644 index 0000000000..104fa82dd6 --- /dev/null +++ b/meta/recipes-extended/screen/screen-4.0.3/screen-4.0.3-CVE-2009-1214.patch @@ -0,0 +1,86 @@ +Upstream-Status: Backport + +The patch to fix CVE-2009-1214 +A security flaw was found in the screen utility in the way it used to create +one particular temporary file. An attacker could use this flaw to perform +a symlink attack. +Fix race condition creating temporary file + +Reference: +https://bugzilla.redhat.com/show_bug.cgi?id=492104 + +Signed-off-by: Chenyang Guo +--- + fileio.c | 48 ++++++++++++++++++++++++++++++++---------------- + 1 file changed, 32 insertions(+), 16 deletions(-) + +--- a/fileio.c ++++ b/fileio.c +@@ -414,6 +414,14 @@ int dump; + } + public = !strcmp(fn, DEFAULT_BUFFERFILE); + # ifdef HAVE_LSTAT ++ /* ++ * Note: In the time between lstat() and open()/remove() below are ++ * called, the file can be created/removed/modified. Therefore the ++ * information lstat() returns is taken into consideration, but not ++ * relied upon. In particular, the open()/remove() calls can fail, and ++ * the code must account for that. Symlink attack could be mounted if ++ * the code is changed carelessly. --rdancer 2009-01-11 ++ */ + exists = !lstat(fn, &stb); + if (public && exists && (S_ISLNK(stb.st_mode) || stb.st_nlink > 1)) + { +@@ -432,28 +440,36 @@ int dump; + #ifdef COPY_PASTE + if (dump == DUMP_EXCHANGE && public) + { ++ /* ++ * Setting umask to zero is a bad idea -- the user surely doesn't ++ * expect a publicly readable file in a publicly readable directory ++ * --rdancer 2009-01-11 ++ */ ++ /* + old_umask = umask(0); ++ */ + # ifdef HAVE_LSTAT + if (exists) +- { +- if ((fd = open(fn, O_WRONLY, 0666)) >= 0) +- { +- if (fstat(fd, &stb2) == 0 && stb.st_dev == stb2.st_dev && stb.st_ino == stb2.st_ino) +- ftruncate(fd, 0); +- else +- { +- close(fd); +- fd = -1; +- } +- } +- } +- else +- fd = open(fn, O_WRONLY|O_CREAT|O_EXCL, 0666); +- f = fd >= 0 ? fdopen(fd, mode) : 0; ++ if (remove(fn) == -1) ++ { ++ /* Error */ ++ debug2("WriteFile: File exists and remove(%s) failed: %s\n", ++ fn, strerror(errno)); ++ UserReturn(0); ++ } + # else +- f = fopen(fn, mode); ++ (void) remove(fn); + # endif ++ /* ++ * No r/w permissions for anybody but the user, as the file may be in ++ * a public directory -- if the user chooses, they can chmod the file ++ * afterwards. --rdancer 2008-01-11 ++ */ ++ fd = open(fn, O_WRONLY|O_CREAT|O_EXCL, 0600); ++ f = fd >= 0 ? fdopen(fd, mode) : 0; ++ /* + umask(old_umask); ++ */ + } + else + #endif /* COPY_PASTE */ 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 @@ +#%PAM-1.0 +auth include common-auth diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb new file mode 100644 index 0000000000..c5218ec1db --- /dev/null +++ b/meta/recipes-extended/screen/screen_4.0.3.bb @@ -0,0 +1,52 @@ +SUMMARY = "Multiplexing terminal manager" +DESCRIPTION = "Screen is a full-screen window manager \ +that multiplexes a physical terminal between several \ +processes, typically interactive shells." +HOMEPAGE = "http://www.gnu.org/software/screen/" +BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0774d66808b0f602e94448108f59448b \ + file://screen.h;endline=23;md5=9a7ae69a2aafed891bf7c38ddf9f6b7d" + +SECTION = "console/utils" +DEPENDS = "ncurses \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +RDEPENDS_${PN} = "base-files" + +PR = "r4" + +SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz;name=tarball \ + ${DEBIAN_MIRROR}/main/s/screen/screen_4.0.3-14.diff.gz;name=patch \ + file://configure.patch \ + file://fix-parallel-make.patch \ + file://screen-4.0.3-CVE-2009-1214.patch \ + file://screen-4.0.2-CVE-2009-1215.patch \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + +PAM_SRC_URI = "file://screen.pam" + +SRC_URI[tarball.md5sum] = "8506fd205028a96c741e4037de6e3c42" +SRC_URI[tarball.sha256sum] = "78f0d5b1496084a5902586304d4a73954b2bfe33ea13edceecf21615c39e6c77" + +SRC_URI[patch.md5sum] = "5960bdae6782ee9356b7e0e0a1fa7c19" +SRC_URI[patch.sha256sum] = "10acb274b2fb0bb7137a0d66e52fa0f18125bc5198c7a8d5af381b4b30636316" + +inherit autotools texinfo + +EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}" + +do_install_append () { + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then + install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen + fi +} + +pkg_postinst_${PN} () { + grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells +} + +pkg_postrm_${PN} () { + printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells +} 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 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_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 @@ +Upstream-Status: Pending + +Change the getline return type to match its declaration. + +Signed-off-by: Dongxiao Xu + +diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c +--- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800 ++++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800 +@@ -30,7 +30,7 @@ + necessary. Returns the number of characters read (not including the + null terminator), or -1 on error or EOF. */ + +-size_t ++ssize_t + getline (lineptr, n, stream) + char **lineptr; + size_t *n; diff --git a/meta/recipes-extended/sed/sed-4.1.2/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 @@ +Upstream-Status: Pending + +automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead. + +Avoid this build issue: +| make[1]: mkdir_p@: Command not found +| make[1]: *** [install-data-yes] Error 127 + +Signed-Off-By: Nitin A Kamble +2012/07/13 + +Index: sed-4.1.2/intl/Makefile.in +=================================================================== +--- sed-4.1.2.orig/intl/Makefile.in ++++ sed-4.1.2/intl/Makefile.in +@@ -40,7 +40,7 @@ subdir = intl + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + mkinstalldirs = $(mkdir_p) +-mkdir_p = @mkdir_p@ ++mkdir_p = @MKDIR_P@ + + l = @INTL_LIBTOOL_SUFFIX_PREFIX@ + +Index: sed-4.1.2/po/Makefile.in.in +=================================================================== +--- sed-4.1.2.orig/po/Makefile.in.in ++++ sed-4.1.2/po/Makefile.in.in +@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po + INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c + INSTALL_DATA = ${INSTALL} -m 644 + mkinstalldirs = $(mkdir_p) +-mkdir_p = @mkdir_p@ ++mkdir_p = @MKDIR_P@ + + CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86 + GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest new file mode 100644 index 0000000000..7c0f62770e --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.2.2/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make -C testsuite -k runtest-TESTS diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch new file mode 100644 index 0000000000..105e8b745b --- /dev/null +++ b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch @@ -0,0 +1,66 @@ +sed: add ptest + +ptest needs buildtest-TESTS and runtest-TESTS targets. +serial-tests is required to generate those targets. + +And fix following error after add serial-tests. + +[snip] +help2man: can't get `--help' info from ../sed/sed +make[2]: *** [sed.1] Error 2 +[snip] + +Upstream-Status: Inappropriate + +Signed-off-by: Chong Lu +--- + configure.ac | 2 +- + doc/Makefile.am | 2 +- + testsuite/Makefile.am | 6 ++++++ + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9d33ec9..4f0c532 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux) + AC_CONFIG_SRCDIR([sed/sed.c]) + AM_CONFIG_HEADER(config.h:config_h.in) + AC_PREREQ(2.60) +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([serial-tests]) + + SED_FEATURE_VERSION=4.2.2 + AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION", +diff --git a/doc/Makefile.am b/doc/Makefile.am +index af6975c..6fd8c9a 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed + fi + echo stamp > $(srcdir)/s-texi + +-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x ++_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x + $(HELP2MAN) --name "stream editor for filtering and transforming text" \ + -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED) + +diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am +index d80e72c..b05f01e 100644 +--- a/testsuite/Makefile.am ++++ b/testsuite/Makefile.am +@@ -99,5 +99,11 @@ EXTRA_DIST = \ + # automake makes `check' depend on $(TESTS). Declare + # dummy targets for $(TESTS) so that make does not complain. + ++install-ptest: ++ cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - ) ++ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done ++ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile ++ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done ++ + .PHONY: $(SEDTESTS) + $(SEDTESTS): +-- +1.7.9.5 + 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..fe242e16bd --- /dev/null +++ b/meta/recipes-extended/sed/sed_4.1.2.bb @@ -0,0 +1,34 @@ +SUMMARY = "Stream EDitor (text filtering utility)" +HOMEPAGE = "http://www.gnu.org/software/sed/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407" +SECTION = "console/utils" +PR = "r7" + +SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ + file://fix_return_type.patch \ + file://sed-4.1.2_fix_for_automake-1.12.patch \ + file://Makevars" + +SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0" +SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab" + +inherit autotools texinfo update-alternatives gettext + +do_configure_prepend () { + cp ${WORKDIR}/Makevars ${S}/po/ +} + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ +} + +ALTERNATIVE_${PN} = "sed" +ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "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..ea39dae435 --- /dev/null +++ b/meta/recipes-extended/sed/sed_4.2.2.bb @@ -0,0 +1,43 @@ +SUMMARY = "Stream EDitor (text filtering utility)" +HOMEPAGE = "http://www.gnu.org/software/sed/" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \ + file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f" +SECTION = "console/utils" + +SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ + file://sed-add-ptest.patch \ + file://run-ptest \ +" + +SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056" +SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" + +inherit autotools texinfo update-alternatives gettext ptest +RDEPENDS_${PN}-ptest += "make locale-base-ru-ru ${PN}" + +EXTRA_OECONF = "--disable-acl \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}" + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + mv ${D}${bindir}/sed ${D}${base_bindir}/sed + rmdir ${D}${bindir}/ +} + +ALTERNATIVE_${PN} = "sed" +ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" +ALTERNATIVE_PRIORITY = "100" + +TESTDIR = "testsuite" + +do_compile_ptest() { + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR} +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch new file mode 100644 index 0000000000..828b95a572 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch @@ -0,0 +1,46 @@ +From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt +Date: Thu, 11 Sep 2014 15:11:23 +0200 +Subject: [PATCH] Do not read login.defs before doing chroot() + +If "useradd --root ..." was used, the login.defs file would still +be read from /etc/login.defs instead of /etc/login.defs. This was +due to getdef_ulong() being called before process_root_flag(). + +Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html] + +Signed-off-by: Peter Kjellerstedt +--- + src/useradd.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/useradd.c b/src/useradd.c +index a8a1f76..e1ebf50 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -1993,9 +1993,11 @@ int main (int argc, char **argv) + #endif /* USE_PAM */ + #endif /* ACCT_TOOLS_SETUID */ + ++#ifdef ENABLE_SUBIDS + /* Needed for userns check */ +- uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); +- uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); ++ uid_t uid_min; ++ uid_t uid_max; ++#endif + + /* + * Get my name so that I can use it to report errors. +@@ -2026,6 +2028,8 @@ int main (int argc, char **argv) + is_shadow_grp = sgr_file_present (); + #endif + #ifdef ENABLE_SUBIDS ++ uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL); ++ uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL); + is_sub_uid = sub_uid_file_present () && !rflg && + (!user_id || (user_id <= uid_max && user_id >= uid_min)); + is_sub_gid = sub_gid_file_present () && !rflg && +-- +1.9.0 + diff --git a/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch new file mode 100644 index 0000000000..31337de362 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-su.c-fix-to-exec-command-correctly.patch @@ -0,0 +1,25 @@ +Upstream-Status: Pending + +Subject: su.c: fix to exec command correctly + +Signed-off-by: Chen Qi +--- + src/su.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/su.c b/src/su.c +index 3704217..bc4f2ac 100644 +--- a/src/su.c ++++ b/src/su.c +@@ -1156,7 +1156,7 @@ int main (int argc, char **argv) + * Use the shell and create an argv + * with the rest of the command line included. + */ +- argv[-1] = cp; ++ argv[-1] = shellstr; + execve_shell (shellstr, &argv[-1], environ); + err = errno; + (void) fprintf (stderr, +-- +1.7.9.5 + diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch new file mode 100644 index 0000000000..85dde8e1bb --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch @@ -0,0 +1,109 @@ +Upstream-Status: Inappropriate [OE specific] + +Subject: useradd.c: create parent directories when necessary + +Signed-off-by: Chen Qi +--- + src/useradd.c | 72 +++++++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 49 insertions(+), 23 deletions(-) + +diff --git a/src/useradd.c b/src/useradd.c +index 4bd969d..cb5dd6c 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -1893,6 +1893,35 @@ static void usr_update (void) + } + + /* ++ * mkdir_p - create directories, including parent directories when needed ++ * ++ * similar to `mkdir -p' ++ */ ++void mkdir_p(const char *path) { ++ int len = strlen(path); ++ char newdir[len + 1]; ++ mode_t mode = 0755; ++ int i = 0; ++ ++ if (path[i] == '\0') { ++ return; ++ } ++ ++ /* skip the leading '/' */ ++ i++; ++ ++ while(path[i] != '\0') { ++ if (path[i] == '/') { ++ strncpy(newdir, path, i); ++ newdir[i] = '\0'; ++ mkdir(newdir, mode); ++ } ++ i++; ++ } ++ mkdir(path, mode); ++} ++ ++/* + * create_home - create the user's home directory + * + * create_home() creates the user's home directory if it does not +@@ -1907,36 +1936,33 @@ static void create_home (void) + fail_exit (E_HOMEDIR); + } + #endif +- /* XXX - create missing parent directories. --marekm */ +- if (mkdir (user_home, 0) != 0) { +- fprintf (stderr, +- _("%s: cannot create directory %s\n"), +- Prog, user_home); +-#ifdef WITH_AUDIT +- audit_logger (AUDIT_ADD_USER, Prog, +- "adding home directory", +- user_name, (unsigned int) user_id, +- SHADOW_AUDIT_FAILURE); +-#endif +- fail_exit (E_HOMEDIR); +- } +- chown (user_home, user_id, user_gid); +- chmod (user_home, +- 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); +- home_added = true; ++ mkdir_p(user_home); ++ } ++ if (access (user_home, F_OK) != 0) { + #ifdef WITH_AUDIT + audit_logger (AUDIT_ADD_USER, Prog, + "adding home directory", + user_name, (unsigned int) user_id, +- SHADOW_AUDIT_SUCCESS); ++ SHADOW_AUDIT_FAILURE); + #endif +-#ifdef WITH_SELINUX +- /* Reset SELinux to create files with default contexts */ +- if (reset_selinux_file_context () != 0) { +- fail_exit (E_HOMEDIR); +- } ++ fail_exit (E_HOMEDIR); ++ } ++ chown (user_home, user_id, user_gid); ++ chmod (user_home, ++ 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); ++ home_added = true; ++#ifdef WITH_AUDIT ++ audit_logger (AUDIT_ADD_USER, Prog, ++ "adding home directory", ++ user_name, (unsigned int) user_id, ++ SHADOW_AUDIT_SUCCESS); + #endif ++#ifdef WITH_SELINUX ++ /* Reset SELinux to create files with default contexts */ ++ if (reset_selinux_file_context () != 0) { ++ fail_exit (E_HOMEDIR); + } ++#endif + } + + /* +-- +1.7.9.5 + 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..68da25f406 --- /dev/null +++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch @@ -0,0 +1,201 @@ +Upstream-Status: Inappropriate [OE specific] + +Allow for setting password in clear text. + +Signed-off-by: Chen Qi +--- + src/Makefile.am | 8 ++++---- + src/groupadd.c | 8 +++++++- + src/groupmod.c | 8 +++++++- + src/useradd.c | 9 +++++++-- + src/usermod.c | 8 +++++++- + 5 files changed, 32 insertions(+), 9 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 25e288d..856b087 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT) + chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) + chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) + gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) +-groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) ++groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) + groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) + groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) +-groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) ++groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) + grpck_LDADD = $(LDADD) $(LIBSELINUX) + grpconv_LDADD = $(LDADD) $(LIBSELINUX) + grpunconv_LDADD = $(LDADD) $(LIBSELINUX) +@@ -111,9 +111,9 @@ su_SOURCES = \ + suauth.c + su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) + sulogin_LDADD = $(LDADD) $(LIBCRYPT) +-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) ++useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) + userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) +-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) ++usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT) + vipw_LDADD = $(LDADD) $(LIBSELINUX) + + install-am: all-am +diff --git a/src/groupadd.c b/src/groupadd.c +index f716f57..4e28c26 100644 +--- a/src/groupadd.c ++++ b/src/groupadd.c +@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status) + (void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n" + " (non-unique) GID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout); + (void) fputs (_(" -r, --system create a system account\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); + (void) fputs ("\n", usageout); +@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv) + {"key", required_argument, NULL, 'K'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"system", no_argument, NULL, 'r'}, + {"root", required_argument, NULL, 'R'}, + {NULL, 0, NULL, '\0'} + }; + +- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:", ++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:", + long_options, NULL)) != -1) { + switch (c) { + case 'f': +@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv) + pflg = true; + group_passwd = optarg; + break; ++ case 'P': ++ pflg = true; ++ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ break; + case 'r': + rflg = true; + break; +diff --git a/src/groupmod.c b/src/groupmod.c +index d9d3807..68f49d1 100644 +--- a/src/groupmod.c ++++ b/src/groupmod.c +@@ -127,6 +127,7 @@ static void usage (int status) + (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" + " PASSWORD\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); + (void) fputs ("\n", usageout); + exit (status); +@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv) + {"new-name", required_argument, NULL, 'n'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"root", required_argument, NULL, 'R'}, + {NULL, 0, NULL, '\0'} + }; +- while ((c = getopt_long (argc, argv, "g:hn:op:R:", ++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:", + long_options, NULL)) != -1) { + switch (c) { + case 'g': +@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv) + group_passwd = optarg; + pflg = true; + break; ++ case 'P': ++ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ pflg = true; ++ break; + case 'R': /* no-op, handled in process_root_flag () */ + break; + default: +diff --git a/src/useradd.c b/src/useradd.c +index b3bd451..4416f90 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -773,6 +773,7 @@ static void usage (int status) + (void) fputs (_(" -o, --non-unique allow to create users with duplicate\n" + " (non-unique) UID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout); + (void) fputs (_(" -r, --system create a system account\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); + (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout); +@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv) + {"no-user-group", no_argument, NULL, 'N'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"system", no_argument, NULL, 'r'}, + {"root", required_argument, NULL, 'R'}, + {"shell", required_argument, NULL, 's'}, +@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv) + }; + while ((c = getopt_long (argc, argv, + #ifdef WITH_SELINUX +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:", + #else /* !WITH_SELINUX */ +- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U", ++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U", + #endif /* !WITH_SELINUX */ + long_options, NULL)) != -1) { + switch (c) { +@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv) + } + user_pass = optarg; + break; ++ case 'P': /* set clear text password */ ++ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ break; + case 'r': + rflg = true; + break; +diff --git a/src/usermod.c b/src/usermod.c +index e7d4351..b79f7a3 100644 +--- a/src/usermod.c ++++ b/src/usermod.c +@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status) + " new location (use only with -d)\n"), usageout); + (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout); + (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout); ++ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); + (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout); + (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout); +@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv) + {"move-home", no_argument, NULL, 'm'}, + {"non-unique", no_argument, NULL, 'o'}, + {"password", required_argument, NULL, 'p'}, ++ {"clear-password", required_argument, NULL, 'P'}, + {"root", required_argument, NULL, 'R'}, + {"shell", required_argument, NULL, 's'}, + {"uid", required_argument, NULL, 'u'}, +@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv) + {NULL, 0, NULL, '\0'} + }; + while ((c = getopt_long (argc, argv, +- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U" ++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U" + #ifdef ENABLE_SUBIDS + "v:w:V:W:" + #endif /* ENABLE_SUBIDS */ +@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv) + user_pass = optarg; + pflg = true; + break; ++ case 'P': ++ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL)); ++ pflg = true; ++ break; + case 'R': /* no-op, handled in process_root_flag () */ + break; + case 's': +-- +1.7.9.5 + diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch new file mode 100644 index 0000000000..60f2ed548a --- /dev/null +++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch @@ -0,0 +1,41 @@ +From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 23 Aug 2014 09:46:39 +0100 +Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF + +This built-in check is simpler than the previous method and, most +importantly, works when cross-compiling. + +Upstream-Status: Accepted +[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f] + +Signed-off-by: Serge Hallyn +--- + configure.in | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +diff --git a/configure.in b/configure.in +index 1a3f841..4a4d6d0 100644 +--- a/configure.in ++++ b/configure.in +@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then + dnl + dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc + dnl +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +-#include +-int main(void) { +- uid_t u; +- gid_t g; +- return (sizeof u < 4) || (sizeof g < 4); +-} +- ])], [id32bit="yes"], [id32bit="no"]) +- +- if test "x$id32bit" = "xyes"; then ++ AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"]) ++ AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"]) ++ ++ if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then + AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.]) + enable_subids="yes" + else diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch new file mode 100644 index 0000000000..4fa3d184ed --- /dev/null +++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch @@ -0,0 +1,46 @@ +Upstream-Status: Inappropriate [OE specific] + +commonio.c: fix unexpected open failure in chroot environment + +When using commands with '-R ' option in our pseudo environment, +we would usually get the 'Pemission Denied' error. This patch serves as +a workaround to this problem. + +Note that this patch doesn't change the logic in the code, it just expands +the codes. + +Signed-off-by: Chen Qi +--- + lib/commonio.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/lib/commonio.c b/lib/commonio.c +index cc536bf..51cafd9 100644 +--- a/lib/commonio.c ++++ b/lib/commonio.c +@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode) + db->cursor = NULL; + db->changed = false; + +- fd = open (db->filename, +- (db->readonly ? O_RDONLY : O_RDWR) +- | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); +- saved_errno = errno; ++ if (db->readonly) { ++ fd = open (db->filename, ++ (true ? O_RDONLY : O_RDWR) ++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); ++ saved_errno = errno; ++ } else { ++ fd = open (db->filename, ++ (false ? O_RDONLY : O_RDWR) ++ | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); ++ saved_errno = errno; ++ } ++ + db->fp = NULL; + if (fd >= 0) { + #ifdef WITH_TCB +-- +1.7.9.5 + 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 @@ +Disable use of syslog to prevent sysroot user and group additions from +writing entries to the host's syslog. This patch should only be used +with the shadow-native recipe. + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Scott Garman + +diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c +--- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800 ++++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700 +@@ -34,6 +34,9 @@ + + #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include + #include + #include +diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c +--- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800 ++++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700 +@@ -34,6 +34,9 @@ + + #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $" + ++/* Disable use of syslog since we're running this command against a sysroot */ ++#undef USE_SYSLOG ++ + #include + #include + #include diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch new file mode 100644 index 0000000000..02cb91aafd --- /dev/null +++ b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +Subject: fix installation failure with subids disabled + +Signed-off-by: Chen Qi +--- + src/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 25e288d..076f8ef 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ + noinst_PROGRAMS = id sulogin + + suidbins = su +-suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap ++suidubins = chage chfn chsh expiry gpasswd newgrp passwd ++if ENABLE_SUBIDS ++suidubins += newgidmap newuidmap ++endif + if ACCT_TOOLS_SETUID + suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod + endif +-- +1.7.9.5 + 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 @@ +# +# /etc/login.defs - Configuration control definitions for the shadow package. +# +# $Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $ +# + +# +# Delay in seconds before being allowed another attempt after a login failure +# Note: When PAM is used, some modules may enfore a minimal delay (e.g. +# pam_unix enforces a 2s delay) +# +FAIL_DELAY 3 + +# +# Enable logging and display of /var/log/faillog login failure info. +# +#FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable logging and display of /var/log/lastlog login time info. +# +#LASTLOG_ENAB yes + +# +# Enable checking and display of mailbox status upon login. +# +# Disable if the shell startup files already check for mail +# ("mailx -e" or equivalent). +# +##MAIL_CHECK_ENAB yes + +# +# Enable additional checks upon password changes. +# +#OBSCURE_CHECKS_ENAB yes + +# +# Enable checking of time restrictions specified in /etc/porttime. +# +#PORTTIME_CHECKS_ENAB yes + +# +# Enable setting of ulimit, umask, and niceness from passwd gecos field. +# +#QUOTAS_ENAB yes + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +CONSOLE /etc/securetty +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, ":" delimited list of "message of the day" files to +# be displayed upon login. +# +#MOTD_FILE /etc/motd +#MOTD_FILE /etc/motd:/usr/lib/news/news-motd + +# +# If defined, this file will be output before each login prompt. +# +#ISSUE_FILE /etc/issue + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format. +# last, when invoked as lastb, will read /var/log/btmp, so... +# +#FTMP_FILE /var/log/btmp + +# +# If defined, name of file whose presence which will inhibit non-root +# logins. The contents of this file should be a message indicating +# why logins are inhibited. +# +#NOLOGINS_FILE /etc/nologin + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# *REQUIRED* +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define both, #MAIL_DIR takes precedence. +# +#MAIL_DIR /var/spool/mail +MAIL_FILE .mail + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# If defined, either a TZ environment parameter spec or the +# fully-rooted pathname of a file containing such a spec. +# +#ENV_TZ TZ=CST6CDT +#ENV_TZ /etc/tzname + +# +# If defined, an HZ environment parameter spec. +# +# for Linux/x86 +#ENV_HZ HZ=100 +# For Linux/Alpha... +#ENV_HZ HZ=1024 + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin +ENV_PATH PATH=/bin:/usr/bin + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# ULIMIT Default "ulimit" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# The ULIMIT is used only if the system supports it. +# (now it works with setrlimit too; ulimit is in 512-byte units) +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +#ULIMIT 2097152 + +# Default initial "umask" value for non-PAM enabled systems. +# UMASK is also used by useradd and newusers to set the mode of new home +# directories. +# 022 is the default value, but 027, or even 077, could be considered +# better for privacy. There is no One True Answer here: each sysadmin +# must make up her mind. +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_MIN_LEN Minimum acceptable password length. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +#PASS_MIN_LEN 5 +PASS_WARN_AGE 7 + +# +# If "yes", the user must be listed as a member of the first gid 0 group +# in /etc/group (called "root" on most Linux systems) to be able to "su" +# to uid 0 accounts. If the group doesn't exist or is empty, no one +# will be able to "su" to uid 0. +# +#SU_WHEEL_ONLY no + +# +# If compiled with cracklib support, where are the dictionaries +# +#CRACKLIB_DICTPATH /var/cache/cracklib/cracklib_dict + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +SYS_UID_MIN 101 +SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +SYS_GID_MIN 101 +SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Maximum number of attempts to change password if rejected (too easy) +# +#PASS_CHANGE_TRIES 5 + +# +# Warn about weak passwords (but still allow them) if you are root. +# +#PASS_ALWAYS_WARN yes + +# +# Number of significant characters in the password for crypt(). +# Default is 8, don't change unless your crypt() is better. +# Ignored if MD5_CRYPT_ENAB set to "yes". +# +#PASS_MAX_LEN 8 + +# +# Require password before chfn/chsh can make any changes. +# +#CHFN_AUTH yes + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Password prompt (%s will be replaced by user name). +# +# XXX - it doesn't work correctly yet, for now leave it commented out +# to use the default which is just "Password: ". +#LOGIN_STRING "%s's Password: " + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# Only works if compiled with ENCRYPTMETHOD_SELECT defined: +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: If you use PAM, it is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If this file exists and is readable, login environment will be +# read from it. Every line should be in the form name=value. +# +#ENVIRON_FILE /etc/environment + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# This also enables userdel to remove user groups if no members exist. +# +USERGROUPS_ENAB yes + +# +# If set to a non-nul number, the shadow utilities will make sure that +# groups never have more than this number of users on one line. +# This permit to support split groups (groups split into multiple lines, +# with the same group ID, to avoid limitation of the line length in the +# group file). +# +# 0 is the default value and disables this feature. +# +#MAX_MEMBERS_PER_GROUP 0 + +# +# If useradd should create home directories for users by default (non +# system users only) +# This option is overridden with the -M or -m flags on the useradd command +# line. +# +CREATE_HOME yes + diff --git a/meta/recipes-extended/shadow/files/login_defs_pam.sed b/meta/recipes-extended/shadow/files/login_defs_pam.sed new file mode 100644 index 0000000000..0a1f3be4af --- /dev/null +++ b/meta/recipes-extended/shadow/files/login_defs_pam.sed @@ -0,0 +1,32 @@ +/^FAILLOG_ENAB/b comment +/^LASTLOG_ENAB/b comment +/^MAIL_CHECK_ENAB/b comment +/^OBSCURE_CHECKS_ENAB/b comment +/^PORTTIME_CHECKS_ENAB/b comment +/^QUOTAS_ENAB/b comment +/^MOTD_FILE/b comment +/^FTMP_FILE/b comment +/^NOLOGINS_FILE/b comment +/^ENV_HZ/b comment +/^ENV_TZ/b comment +/^PASS_MIN_LEN/b comment +/^SU_WHEEL_ONLY/b comment +/^CRACKLIB_DICTPATH/b comment +/^PASS_CHANGE_TRIES/b comment +/^PASS_ALWAYS_WARN/b comment +/^PASS_MAX_LEN/b comment +/^PASS_MIN_LEN/b comment +/^CHFN_AUTH/b comment +/^CHSH_AUTH/b comment +/^ISSUE_FILE/b comment +/^LOGIN_STRING/b comment +/^ULIMIT/b comment +/^ENVIRON_FILE/b comment + +b exit + +: comment + s:^:#: + +: exit + diff --git a/meta/recipes-extended/shadow/files/pam.d/chfn b/meta/recipes-extended/shadow/files/pam.d/chfn new file mode 100644 index 0000000000..baf7698bba --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chfn @@ -0,0 +1,14 @@ +# +# The PAM configuration file for the Shadow `chfn' service +# + +# This allows root to change user infomation without being +# prompted for a password +auth sufficient pam_rootok.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +auth include common-auth +account include common-account +session include common-session diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd new file mode 100644 index 0000000000..9e3efa68ba --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd @@ -0,0 +1,4 @@ +# The PAM configuration file for the Shadow 'chpasswd' service +# + +password include common-password diff --git a/meta/recipes-extended/shadow/files/pam.d/chsh b/meta/recipes-extended/shadow/files/pam.d/chsh new file mode 100644 index 0000000000..8fb169f64e --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/chsh @@ -0,0 +1,19 @@ +# +# The PAM configuration file for the Shadow `chsh' service +# + +# This will not allow a user to change their shell unless +# their current one is listed in /etc/shells. This keeps +# accounts with special shells from changing them. +auth required pam_shells.so + +# This allows root to change user shell without being +# prompted for a password +auth sufficient pam_rootok.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +auth include common-auth +account include common-account +session include common-session diff --git a/meta/recipes-extended/shadow/files/pam.d/login b/meta/recipes-extended/shadow/files/pam.d/login new file mode 100644 index 0000000000..b340058539 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/login @@ -0,0 +1,81 @@ +# +# The PAM configuration file for the Shadow `login' service +# + +# Enforce a minimal delay in case of failure (in microseconds). +# (Replaces the `FAIL_DELAY' setting from login.defs) +# Note that other modules may require another minimal delay. (for example, +# to disable any delay, you should add the nodelay option to pam_unix) +auth optional pam_faildelay.so delay=3000000 + +# Outputs an issue file prior to each login prompt (Replaces the +# ISSUE_FILE option from login.defs). Uncomment for use +# auth required pam_issue.so issue=/etc/issue + +# Disallows root logins except on tty's listed in /etc/securetty +# (Replaces the `CONSOLE' setting from login.defs) +# Note that it is included as a "requisite" module. No password prompts will +# be displayed if this module fails to avoid having the root password +# transmitted on unsecure ttys. +# You can change it to a "required" module if you think it permits to +# guess valid user names of your system (invalid user names are considered +# as possibly being root). +auth [success=ok ignore=ignore user_unknown=ignore default=die] pam_securetty.so + +# Disallows other than root logins when /etc/nologin exists +# (Replaces the `NOLOGINS_FILE' option from login.defs) +auth requisite pam_nologin.so + +# This module parses environment configuration file(s) +# and also allows you to use an extended config +# file /etc/security/pam_env.conf. +# +# parsing /etc/environment needs "readenv=1" +session required pam_env.so readenv=1 + +# Standard Un*x authentication. +auth include common-auth + +# This allows certain extra groups to be granted to a user +# based on things like time of day, tty, service, and user. +# Please edit /etc/security/group.conf to fit your needs +# (Replaces the `CONSOLE_GROUPS' option in login.defs) +auth optional pam_group.so + +# Uncomment and edit /etc/security/time.conf if you need to set +# time restrainst on logins. +# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs +# as well as /etc/porttime) +# account requisite pam_time.so + +# Uncomment and edit /etc/security/access.conf if you need to +# set access limits. +# (Replaces /etc/login.access file) +# account required pam_access.so + +# Sets up user limits according to /etc/security/limits.conf +# (Replaces the use of /etc/limits in old login) +session required pam_limits.so + +# Prints the last login info upon succesful login +# (Replaces the `LASTLOG_ENAB' option from login.defs) +session optional pam_lastlog.so + +# Prints the motd upon succesful login +# (Replaces the `MOTD_FILE' option in login.defs) +session optional pam_motd.so + +# Prints the status of the user's mailbox upon succesful login +# (Replaces the `MAIL_CHECK_ENAB' option from login.defs). +# +# This also defines the MAIL environment variable +# However, userdel also needs MAIL_DIR and MAIL_FILE variables +# in /etc/login.defs to make sure that removing a user +# also removes the user's mail spool file. +# See comments in /etc/login.defs +session optional pam_mail.so standard + +# Standard Un*x account and session +account include common-account +password include common-password +session include common-session diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers new file mode 100644 index 0000000000..4aa3dde48b --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/newusers @@ -0,0 +1,4 @@ +# The PAM configuration file for the Shadow 'newusers' service +# + +password include common-password diff --git a/meta/recipes-extended/shadow/files/pam.d/passwd b/meta/recipes-extended/shadow/files/pam.d/passwd new file mode 100644 index 0000000000..f534992435 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/passwd @@ -0,0 +1,5 @@ +# +# The PAM configuration file for the Shadow `passwd' service +# + +password include common-password diff --git a/meta/recipes-extended/shadow/files/pam.d/su b/meta/recipes-extended/shadow/files/pam.d/su new file mode 100644 index 0000000000..8d590a32e6 --- /dev/null +++ b/meta/recipes-extended/shadow/files/pam.d/su @@ -0,0 +1,57 @@ +# +# The PAM configuration file for the Shadow `su' service +# + +# This allows root to su without passwords (normal operation) +auth sufficient pam_rootok.so + +# Uncomment this to force users to be a member of group root +# before they can use `su'. You can also add "group=foo" +# to the end of this line if you want to use a group other +# than the default "root" (but this may have side effect of +# denying "root" user, unless she's a member of "foo" or explicitly +# permitted earlier by e.g. "sufficient pam_rootok.so"). +# (Replaces the `SU_WHEEL_ONLY' option from login.defs) +# auth required pam_wheel.so + +# Uncomment this if you want wheel members to be able to +# su without a password. +# auth sufficient pam_wheel.so trust + +# Uncomment this if you want members of a specific group to not +# be allowed to use su at all. +# auth required pam_wheel.so deny group=nosu + +# Uncomment and edit /etc/security/time.conf if you need to set +# time restrainst on su usage. +# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs +# as well as /etc/porttime) +# account requisite pam_time.so + +# This module parses environment configuration file(s) +# and also allows you to use an extended config +# file /etc/security/pam_env.conf. +# +# parsing /etc/environment needs "readenv=1" +session required pam_env.so readenv=1 + +# Defines the MAIL environment variable +# However, userdel also needs MAIL_DIR and MAIL_FILE variables +# in /etc/login.defs to make sure that removing a user +# also removes the user's mail spool file. +# See comments in /etc/login.defs +# +# "nopen" stands to avoid reporting new mail when su'ing to another user +session optional pam_mail.so nopen + +# Sets up user limits, please uncomment and read /etc/security/limits.conf +# to enable this functionality. +# (Replaces the use of /etc/limits in old login) +# session required pam_limits.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +auth include common-auth +account include common-account +session include common-session diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty new file mode 100644 index 0000000000..ecc246f799 --- /dev/null +++ b/meta/recipes-extended/shadow/files/securetty @@ -0,0 +1,234 @@ +# /etc/securetty: list of terminals on which root is allowed to login. +# See securetty(5) and login(1). +console + +# Standard serial ports +ttyS0 +ttyS1 +ttyS2 +ttyS3 + +# ARM AMBA SoCs +ttyAM0 +ttyAM1 +ttyAM2 +ttyAM3 +ttyAMA0 +ttyAMA1 +ttyAMA2 +ttyAMA3 + +# QCOM Socs +ttyHSL0 +ttyHSL1 +ttyHSL2 +ttyHSL3 +ttyMSM0 +ttyMSM1 +ttyMSM2 + +# Samsung ARM SoCs +ttySAC0 +ttySAC1 +ttySAC2 +ttySAC3 + +# STM SoCs +ttyAS0 +ttyAS1 +ttyAS2 +ttyAS3 + +# TI OMAP SoCs +ttyO0 +ttyO1 +ttyO2 +ttyO3 + +# USB dongles +ttyUSB0 +ttyUSB1 +ttyUSB2 + +# USB serial gadget +ttyGS0 + +# PowerMac +ttyPZ0 +ttyPZ1 +ttyPZ2 +ttyPZ3 + +# Embedded MPC platforms +ttyPSC0 +ttyPSC1 +ttyPSC2 +ttyPSC3 +ttyPSC4 +ttyPSC5 + +# PA-RISC mux ports +ttyB0 +ttyB1 + +# Standard hypervisor virtual console +hvc0 + +# Oldstyle Xen console +xvc0 + +# Standard consoles +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +tty7 +tty8 +tty9 +tty10 +tty11 +tty12 +tty13 +tty14 +tty15 +tty16 +tty17 +tty18 +tty19 +tty20 +tty21 +tty22 +tty23 +tty24 +tty25 +tty26 +tty27 +tty28 +tty29 +tty30 +tty31 +tty32 +tty33 +tty34 +tty35 +tty36 +tty37 +tty38 +tty39 +tty40 +tty41 +tty42 +tty43 +tty44 +tty45 +tty46 +tty47 +tty48 +tty49 +tty50 +tty51 +tty52 +tty53 +tty54 +tty55 +tty56 +tty57 +tty58 +tty59 +tty60 +tty61 +tty62 +tty63 + +# Local X displays (allows empty passwords with pam_unix's nullok_secure) +pts/0 +pts/1 +pts/2 +pts/3 + +# Embedded Freescale i.MX ports +ttymxc0 +ttymxc1 +ttymxc2 +ttymxc3 +ttymxc4 +ttymxc5 + +# Freescale lpuart ports +ttyLP0 +ttyLP1 +ttyLP2 +ttyLP3 +ttyLP4 +ttyLP5 + +# Standard serial ports, with devfs +tts/0 +tts/1 + +# Standard consoles, with devfs +vc/1 +vc/2 +vc/3 +vc/4 +vc/5 +vc/6 +vc/7 +vc/8 +vc/9 +vc/10 +vc/11 +vc/12 +vc/13 +vc/14 +vc/15 +vc/16 +vc/17 +vc/18 +vc/19 +vc/20 +vc/21 +vc/22 +vc/23 +vc/24 +vc/25 +vc/26 +vc/27 +vc/28 +vc/29 +vc/30 +vc/31 +vc/32 +vc/33 +vc/34 +vc/35 +vc/36 +vc/37 +vc/38 +vc/39 +vc/40 +vc/41 +vc/42 +vc/43 +vc/44 +vc/45 +vc/46 +vc/47 +vc/48 +vc/49 +vc/50 +vc/51 +vc/52 +vc/53 +vc/54 +vc/55 +vc/56 +vc/57 +vc/58 +vc/59 +vc/60 +vc/61 +vc/62 +vc/63 diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch new file mode 100644 index 0000000000..a7bb0a9290 --- /dev/null +++ b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch @@ -0,0 +1,27 @@ +# commit message copied from openembedded: +# commit 246c80637b135f3a113d319b163422f98174ee6c +# Author: Khem Raj +# Date: Wed Jun 9 13:37:03 2010 -0700 +# +# shadow-4.1.4.2: Add patches to support dots in login id. +# +# Signed-off-by: Khem Raj +# +# comment added by Kevin Tian , 2010-08-11 + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +Index: shadow-4.1.4.2/libmisc/chkname.c +=================================================================== +--- shadow-4.1.4.2.orig/libmisc/chkname.c 2009-04-28 12:14:04.000000000 -0700 ++++ shadow-4.1.4.2/libmisc/chkname.c 2010-06-03 17:43:20.638973857 -0700 +@@ -61,6 +61,7 @@ static bool is_valid_name (const char *n + ( ('0' <= *name) && ('9' >= *name) ) || + ('_' == *name) || + ('-' == *name) || ++ ('.' == *name) || + ( ('$' == *name) && ('\0' == *(name + 1)) ) + )) { + return false; diff --git a/meta/recipes-extended/shadow/files/shadow-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 @@ +The system-auth in the configure files is from Fedora which put all the 4 pam type rules +in one file. +In yocto it obey the way with Debian/Ubuntu, and the names are common-auth, common-account, +common-password and common-session. +So update them with oe way. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai + +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chage shadow-4.1.4.3/etc/pam.d/chage +--- shadow-4.1.4.3/etc/pam.d.orig/chage 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/chage 2011-07-20 19:03:08.964844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chgpasswd shadow-4.1.4.3/etc/pam.d/chgpasswd +--- shadow-4.1.4.3/etc/pam.d.orig/chgpasswd 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/chgpasswd 2011-07-20 19:03:26.544844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupadd shadow-4.1.4.3/etc/pam.d/groupadd +--- shadow-4.1.4.3/etc/pam.d.orig/groupadd 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/groupadd 2011-07-20 19:04:08.124844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupdel shadow-4.1.4.3/etc/pam.d/groupdel +--- shadow-4.1.4.3/etc/pam.d.orig/groupdel 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/groupdel 2011-07-20 19:04:26.114844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmems shadow-4.1.4.3/etc/pam.d/groupmems +--- shadow-4.1.4.3/etc/pam.d.orig/groupmems 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/groupmems 2011-07-20 19:04:35.074844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmod shadow-4.1.4.3/etc/pam.d/groupmod +--- shadow-4.1.4.3/etc/pam.d.orig/groupmod 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/groupmod 2011-07-20 19:04:44.864844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/useradd shadow-4.1.4.3/etc/pam.d/useradd +--- shadow-4.1.4.3/etc/pam.d.orig/useradd 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/useradd 2011-07-20 19:07:26.244844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/userdel shadow-4.1.4.3/etc/pam.d/userdel +--- shadow-4.1.4.3/etc/pam.d.orig/userdel 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/userdel 2011-07-20 19:07:35.734844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password +diff -Nur shadow-4.1.4.3/etc/pam.d.orig/usermod shadow-4.1.4.3/etc/pam.d/usermod +--- shadow-4.1.4.3/etc/pam.d.orig/usermod 2011-07-20 19:02:27.384844958 +0800 ++++ shadow-4.1.4.3/etc/pam.d/usermod 2011-07-20 19:07:42.024844958 +0800 +@@ -1,4 +1,4 @@ + #%PAM-1.0 + auth sufficient pam_rootok.so + account required pam_permit.so +-password include system-auth ++password include common-password diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch new file mode 100644 index 0000000000..37dc153fca --- /dev/null +++ b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch @@ -0,0 +1,33 @@ +Upstream-Status: Pending + +usermod: fix compilation failure with subids disabled + +Signed-off-by: Chen Qi +--- + src/usermod.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/usermod.c b/src/usermod.c +index e7d4351..685b50a 100644 +--- a/src/usermod.c ++++ b/src/usermod.c +@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv) + Prog, (unsigned long) user_newid); + exit (E_UID_IN_USE); + } +- ++#ifdef ENABLE_SUBIDS + if ( (vflg || Vflg) + && !is_sub_uid) { + fprintf (stderr, +@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv) + Prog, sub_gid_dbname (), "-w", "-W"); + exit (E_USAGE); + } ++#endif + } + + /* +-- +1.7.9.5 + diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb new file mode 100644 index 0000000000..0e0410043b --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb @@ -0,0 +1,36 @@ +SUMMARY = "Provider of the machine specific securetty file" +SECTION = "base utils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" + +PR = "r3" + +SRC_URI = "file://securetty" + +# Since SERIAL_CONSOLES is likely to be set from the machine configuration +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install () { + # Ensure we add a suitable securetty file to the package that has + # most common embedded TTYs defined. + install -d ${D}${sysconfdir} + install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty + if [ ! -z "${SERIAL_CONSOLES}" ]; then + # Our SERIAL_CONSOLES contains a baud rate and sometimes extra + # options as well. The following pearl :) takes that and converts + # it into newline-separated tty's and appends them into + # securetty. So if a machine has a weird looking console device + # node (e.g. ttyAMA0) that securetty does not know, it will get + # appended to securetty and root logins will be allowed on that + # console. + tmp="${SERIAL_CONSOLES}" + for entry in $tmp ; do + ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'` + if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then + echo $ttydev >> ${D}${sysconfdir}/securetty + fi + done + fi +} diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb new file mode 100644 index 0000000000..697569c47e --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb @@ -0,0 +1,34 @@ +SUMMARY = "Shadow utils requirements for useradd.bbclass" +HOMEPAGE = "http://pkg-shadow.alioth.debian.org" +BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" +SECTION = "base utils" +LICENSE = "BSD | Artistic-1.0" +LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" + +DEPENDS = "base-passwd" + +PR = "r3" + +# The sole purpose of this recipe is to provide the /etc/login.defs +# file for the target sysroot - needed so the shadow-native utilities +# can add custom users/groups for recipes that use inherit useradd. +SRC_URI = "file://login.defs_shadow-sysroot" + +SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" +SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}${sysconfdir} + install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs +} + +sysroot_stage_all() { + sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} +} + +# don't create any packages +# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot +# and this has another copy of /etc/login.defs already provided by shadow +PACKAGES = "" diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc new file mode 100644 index 0000000000..bb3a927c17 --- /dev/null +++ b/meta/recipes-extended/shadow/shadow.inc @@ -0,0 +1,176 @@ +SUMMARY = "Tools to change and administer password and group data" +HOMEPAGE = "http://pkg-shadow.alioth.debian.org" +BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" +SECTION = "base/utils" +LICENSE = "BSD | Artistic-1.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ + file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" + +DEPENDS = "shadow-native" +DEPENDS_class-native = "" +DEPENDS_class-nativesdk = "" + +SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ + file://shadow-4.1.3-dots-in-usernames.patch \ + file://usermod-fix-compilation-failure-with-subids-disabled.patch \ + file://fix-installation-failure-with-subids-disabled.patch \ + file://0001-su.c-fix-to-exec-command-correctly.patch \ + file://0001-Do-not-read-login.defs-before-doing-chroot.patch \ + file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ + " + +SRC_URI_append_class-target = " \ + file://login_defs_pam.sed \ + file://shadow-update-pam-conf.patch \ + " + +SRC_URI_append_class-native = " \ + file://disable-syslog.patch \ + file://allow-for-setting-password-in-clear-text.patch \ + file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ + file://0001-useradd.c-create-parent-directories-when-necessary.patch \ + " +SRC_URI_append_class-nativesdk = " \ + file://disable-syslog.patch \ + " + +SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" +SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41" + +# Additional Policy files for PAM +PAM_SRC_URI = "file://pam.d/chfn \ + file://pam.d/chpasswd \ + file://pam.d/chsh \ + file://pam.d/login \ + file://pam.d/newusers \ + file://pam.d/passwd \ + file://pam.d/su" + +inherit autotools gettext + +EXTRA_OECONF += "--without-audit \ + --without-libcrack \ + --without-selinux \ + --with-group-name-max-length=24 \ + --enable-subordinate-ids=yes \ + ${NSCDOPT}" + +NSCDOPT = "" +NSCDOPT_class-native = "--without-nscd" +NSCDOPT_class-nativesdk = "--without-nscd" +NSCDOPT_libc-uclibc = " --without-nscd" +NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}" + +PAM_PLUGINS = "libpam-runtime \ + pam-plugin-faildelay \ + pam-plugin-securetty \ + pam-plugin-nologin \ + pam-plugin-env \ + pam-plugin-group \ + pam-plugin-limits \ + pam-plugin-lastlog \ + pam-plugin-motd \ + pam-plugin-mail \ + pam-plugin-shells \ + pam-plugin-rootok" + +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG_class-nativesdk = "" +PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}" +PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr" +PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl" + +RDEPENDS_${PN} = "shadow-securetty \ + base-passwd" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" + +do_install() { + oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install + + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}${infodir}/dir" ]; then + rm -f ${D}${infodir}/dir + fi + + # Enable CREATE_HOME by default. + sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs + + # As we are on an embedded system, ensure the users mailbox is in + # ~/ not /var/spool/mail by default, as who knows where or how big + # /var is. The system MDA will set this later anyway. + sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs + sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs + + # Disable checking emails. + sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs + + # Use proper encryption for passwords + sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs + + # Now we don't have a mail system. Disable mail creation for now. + sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd + sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd + + # Use users group by default + sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd +} + +do_install_append() { + # Ensure that the image has as a /var/spool/mail dir so shadow can + # put mailboxes there if the user reconfigures shadow to its + # defaults (see sed below). + install -d ${D}${localstatedir}/spool/mail + + if [ -e ${WORKDIR}/pam.d ]; then + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + # Remove defaults that are not used when supporting PAM. + sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs + fi + + install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} + + # Move binaries to the locations we want + rm ${D}${sbindir}/vigr + ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr + if [ "${sbindir}" != "${base_sbindir}" ]; then + mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw + fi + if [ "${bindir}" != "${base_bindir}" ]; then + mv ${D}${bindir}/login ${D}${base_bindir}/login + mv ${D}${bindir}/su ${D}${base_bindir}/su + fi + + # Handle link properly after rename, otherwise missing files would + # lead rpm failed dependencies. + ln -sf newgrp.${BPN} ${D}${bindir}/sg +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "200" + +ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su" +ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd" +ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" +ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" +ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" +ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" + +ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3" +ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" +ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" + +pkg_postinst_${PN} () { + if [ "x$D" != "x" ]; then + rootarg="--root $D" + else + rootarg="" + fi + + pwconv $rootarg || exit 1 + grpconv $rootarg || exit 1 +} diff --git a/meta/recipes-extended/shadow/shadow_4.2.1.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb new file mode 100644 index 0000000000..5675cb8cc9 --- /dev/null +++ b/meta/recipes-extended/shadow/shadow_4.2.1.bb @@ -0,0 +1,10 @@ +require shadow.inc + +# Build falsely assumes that if --enable-libpam is set, we don't need to link against +# libcrypt. This breaks chsh. +BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', bb.utils.contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}" + +BBCLASSEXTEND = "native nativesdk" + + + 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 @@ +slang: change char type to signed char in macros + +C language has 3 distinct char types: + char + unsigned char + signed char +A char has the same range of values as signed char on X86, +but same as unsigned char on ARM which made Slang's typecast() +and array_sort() unable to work for char value on ARM, since +Slang is assuming "char" as "signed char". + +Now we change "char" as "signed char" explicitly in +util/mkslarith2.sl, and use it to regenerate src/slarith2.inc + +Upstream-Status: Submitted +Signed-off-by: Roy.Li +--- + src/slarith2.inc | 72 ++++++++++++++++++++++++------------------------- + src/util/mkslarith2.sl | 2 - + 2 files changed, 37 insertions(+), 37 deletions(-) + +--- a/src/util/mkslarith2.sl ++++ b/src/util/mkslarith2.sl +@@ -1,7 +1,7 @@ + #!/usr/bin/env slsh + + private variable CTypes = +- ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int", ++ ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", + "long", "unsigned long", "long long", "unsigned long long", + "float", "double", "long double"]; + private variable Is_Int_Type = +--- a/src/slarith2.inc ++++ b/src/slarith2.inc +@@ -1,43 +1,43 @@ + /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */ +-/* ------------ char ---------- */ +-DEFUN_1(copy_char_to_char,char,char) ++/* ------------ signed char ---------- */ ++DEFUN_1(copy_char_to_char,signed char,signed char) + #define char_to_char NULL + #define copy_char_to_uchar copy_char_to_char + #define char_to_uchar NULL +-DEFUN_1(copy_char_to_short,char,short) ++DEFUN_1(copy_char_to_short,signed char,short) + #define char_to_short NULL +-DEFUN_1(copy_char_to_ushort,char,unsigned short) ++DEFUN_1(copy_char_to_ushort,signed char,unsigned short) + #define char_to_ushort NULL +-DEFUN_1(copy_char_to_int,char,int) +-DEFUN_2(char_to_int,char,int,copy_char_to_int) +-DEFUN_1(copy_char_to_uint,char,unsigned int) +-DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint) +-DEFUN_1(copy_char_to_long,char,long) +-DEFUN_2(char_to_long,char,long,copy_char_to_long) +-DEFUN_1(copy_char_to_ulong,char,unsigned long) +-DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong) ++DEFUN_1(copy_char_to_int,signed char,int) ++DEFUN_2(char_to_int,signed char,int,copy_char_to_int) ++DEFUN_1(copy_char_to_uint,signed char,unsigned int) ++DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint) ++DEFUN_1(copy_char_to_long,signed char,long) ++DEFUN_2(char_to_long,signed char,long,copy_char_to_long) ++DEFUN_1(copy_char_to_ulong,signed char,unsigned long) ++DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong) + #if defined(HAVE_LONG_LONG) +-DEFUN_1(copy_char_to_llong,char,long long) +-DEFUN_2(char_to_llong,char,long long,copy_char_to_llong) ++DEFUN_1(copy_char_to_llong,signed char,long long) ++DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong) + #endif /* defined(HAVE_LONG_LONG) */ + #if defined(HAVE_LONG_LONG) +-DEFUN_1(copy_char_to_ullong,char,unsigned long long) +-DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong) ++DEFUN_1(copy_char_to_ullong,signed char,unsigned long long) ++DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong) + #endif /* defined(HAVE_LONG_LONG) */ + #if SLANG_HAS_FLOAT +-DEFUN_1(copy_char_to_float,char,float) +-DEFUN_2(char_to_float,char,float,copy_char_to_float) ++DEFUN_1(copy_char_to_float,signed char,float) ++DEFUN_2(char_to_float,signed char,float,copy_char_to_float) + #endif /* SLANG_HAS_FLOAT */ + #if SLANG_HAS_FLOAT +-DEFUN_1(copy_char_to_double,char,double) +-DEFUN_2(char_to_double,char,double,copy_char_to_double) ++DEFUN_1(copy_char_to_double,signed char,double) ++DEFUN_2(char_to_double,signed char,double,copy_char_to_double) + #endif /* SLANG_HAS_FLOAT */ + #if defined(HAVE_LONG_DOUBLE) +-DEFUN_1(copy_char_to_ldouble,char,long double) +-DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble) ++DEFUN_1(copy_char_to_ldouble,signed char,long double) ++DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble) + #endif /* defined(HAVE_LONG_DOUBLE) */ + #if SLANG_HAS_FLOAT +-TO_DOUBLE_FUN(char_to_one_double,char) ++TO_DOUBLE_FUN(char_to_one_double,signed char) + #endif + + /* ------------ unsigned char ---------- */ +@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign + #endif + + /* ------------ short ---------- */ +-DEFUN_1(copy_short_to_char,short,char) ++DEFUN_1(copy_short_to_char,short,signed char) + #define short_to_char NULL + DEFUN_1(copy_short_to_uchar,short,unsigned char) + #define short_to_uchar NULL +@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short) + #endif + + /* ------------ unsigned short ---------- */ +-DEFUN_1(copy_ushort_to_char,unsigned short,char) ++DEFUN_1(copy_ushort_to_char,unsigned short,signed char) + #define ushort_to_char NULL + DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char) + #define ushort_to_uchar NULL +@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig + #endif + + /* ------------ int ---------- */ +-DEFUN_1(copy_int_to_char,int,char) ++DEFUN_1(copy_int_to_char,int,signed char) + #define int_to_char NULL + DEFUN_1(copy_int_to_uchar,int,unsigned char) + #define int_to_uchar NULL +@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int) + #endif + + /* ------------ unsigned int ---------- */ +-DEFUN_1(copy_uint_to_char,unsigned int,char) ++DEFUN_1(copy_uint_to_char,unsigned int,signed char) + #define uint_to_char NULL + DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char) + #define uint_to_uchar NULL +@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne + #endif + + /* ------------ long ---------- */ +-DEFUN_1(copy_long_to_char,long,char) ++DEFUN_1(copy_long_to_char,long,signed char) + #define long_to_char NULL + DEFUN_1(copy_long_to_uchar,long,unsigned char) + #define long_to_uchar NULL +@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long) + #endif + + /* ------------ unsigned long ---------- */ +-DEFUN_1(copy_ulong_to_char,unsigned long,char) ++DEFUN_1(copy_ulong_to_char,unsigned long,signed char) + #define ulong_to_char NULL + DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char) + #define ulong_to_uchar NULL +@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign + + /* ------------ long long ---------- */ + #if defined(HAVE_LONG_LONG) +-DEFUN_1(copy_llong_to_char,long long,char) ++DEFUN_1(copy_llong_to_char,long long,signed char) + #define llong_to_char NULL + DEFUN_1(copy_llong_to_uchar,long long,unsigned char) + #define llong_to_uchar NULL +@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l + + /* ------------ unsigned long long ---------- */ + #if defined(HAVE_LONG_LONG) +-DEFUN_1(copy_ullong_to_char,unsigned long long,char) ++DEFUN_1(copy_ullong_to_char,unsigned long long,signed char) + #define ullong_to_char NULL + DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char) + #define ullong_to_uchar NULL +@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig + + /* ------------ float ---------- */ + #if SLANG_HAS_FLOAT +-DEFUN_1(copy_float_to_char,float,char) ++DEFUN_1(copy_float_to_char,float,signed char) + #define float_to_char NULL + DEFUN_1(copy_float_to_uchar,float,unsigned char) + #define float_to_uchar NULL +@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float) + + /* ------------ double ---------- */ + #if SLANG_HAS_FLOAT +-DEFUN_1(copy_double_to_char,double,char) ++DEFUN_1(copy_double_to_char,double,signed char) + #define double_to_char NULL + DEFUN_1(copy_double_to_uchar,double,unsigned char) + #define double_to_uchar NULL +@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl + + /* ------------ long double ---------- */ + #if defined(HAVE_LONG_DOUBLE) +-DEFUN_1(copy_ldouble_to_char,long double,char) ++DEFUN_1(copy_ldouble_to_char,long double,signed char) + #define ldouble_to_char NULL + DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char) + #define ldouble_to_uchar NULL +@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long + #if SLANG_HAS_FLOAT + static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] = + { +- {sizeof(char), char_to_one_double}, ++ {sizeof(signed char), char_to_one_double}, + {sizeof(unsigned char), uchar_to_one_double}, + {sizeof(short), short_to_one_double}, + {sizeof(unsigned short), ushort_to_one_double}, +@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl + + static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] = + { +- /* char */ ++ /* signed char */ + { + {(FVOID_STAR)copy_char_to_char, char_to_char}, + {(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 @@ +fix the pcre existence checking + +when check if there is pcre, the configure file always check +the host dir. now we make it work by adding correct prefix for +cross-compile environment. + +When enable pcre-module, we see a QA warning because rpaths +hardcoded into the build, rpaths are not needed, so lets turn +this off. + +Upstream-Status: Inappropriate +Signed-off-by: Roy.Li +--- + configure | 60 ++++++------------------------------------------------------ + 1 files changed, 6 insertions(+), 54 deletions(-) + +diff --git a/configure b/configure +index f1586c3..d22814f 100755 +--- a/configure ++++ b/configure +@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } + /usr/include/pcre,/usr/lib \ + /usr/pcre/include,/usr/pcre/lib \ + /usr/include,/usr/lib \ ++ /usr/include,/usr/lib64 \ + /opt/include/pcre,/opt/lib \ + /opt/pcre/include,/opt/pcre/lib \ + /opt/include,/opt/lib" +@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; } + xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` + xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` + found=0 +- if test -r $xincdir/$xincfile ++ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile + then + for E in $exts + do +- if test -r "$xlibdir/$xlibfile.$E" ++ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" + then +- jd_pcre_include_dir="$xincdir" +- jd_pcre_library_dir="$xlibdir" ++ jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" ++ jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" + jd_with_pcre_library="yes" + found=1 + break +@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; } + then + PCRE_LIB="" + else +- +-if test "X$jd_pcre_library_dir" != "X" +-then +- if test "X$RPATH" = "X" +- then +- +-case "$host_os" in +- *linux*|*solaris* ) +- if test "X$GCC" = Xyes +- then +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-Wl,-R," +- else +- RPATH="-Wl,-R" +- fi +- else +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-R " +- else +- RPATH="-R" +- fi +- fi +- ;; +- *osf*|*openbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-rpath," +- else +- RPATH="-rpath " +- fi +- ;; +- *netbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-R" +- fi +- ;; +-esac +- +- if test "X$RPATH" != "X" +- then +- RPATH="$RPATH$jd_pcre_library_dir" +- fi +- else +- RPATH="$RPATH:$jd_pcre_library_dir" +- fi +-fi +- ++ RPATH="" + fi + + PCRE_INC=-I$jd_pcre_include_dir +-- +1.7.4.1 + 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 @@ +Without this patch we see rpaths hardcoded into the build which results in QA +warnings. These rpaths are not needed so lets turn this off. + +Upstream-Status: Inappropriate +(but could be turned into a proper configure option) + +RP 2012/03/14 + +Index: slang-2.2.4/configure +=================================================================== +--- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000 ++++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000 +@@ -6081,56 +6081,7 @@ + ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS" + CFLAGS="$CFLAGS $IEEE_CFLAGS" + +- +-if test "X$libdir" != "X" +-then +- if test "X$RPATH" = "X" +- then +- +-case "$host_os" in +- *linux*|*solaris* ) +- if test "X$GCC" = Xyes +- then +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-Wl,-R," +- else +- RPATH="-Wl,-R" +- fi +- else +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-R " +- else +- RPATH="-R" +- fi +- fi +- ;; +- *osf*|*openbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-rpath," +- else +- RPATH="-rpath " +- fi +- ;; +- *netbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-R" +- fi +- ;; +-esac +- +- if test "X$RPATH" != "X" +- then +- RPATH="$RPATH$libdir" +- fi +- else +- RPATH="$RPATH:$libdir" +- fi +-fi +- ++RPATH="" + + # The cast to long int works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch new file mode 100644 index 0000000000..958fe983c5 --- /dev/null +++ b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch @@ -0,0 +1,116 @@ +From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001 +From: Zheng Junling +Date: Mon, 16 Jun 2014 12:51:25 +0000 +Subject: [PATCH] slang: fix the iconv existence checking + +When checking whether there is iconv, the configure file always check +the host env. + +Now we make it working properly by adding correct prefix for cross- +compiling environment. + +When enabling iconv-module, we see a QA warning because rpaths hardcoded +into the build. And rpaths are not needed, so let's turn this off. + +This patch is generated by referencing the existing "fix-check-pcre" +patch. + +Upstream-Status: Inappropriate + +Signed-off-by: Zheng Junling +--- + configure | 60 ++++++------------------------------------------------------ + 1 file changed, 6 insertions(+), 54 deletions(-) + +diff --git a/configure b/configure +index 7a96256..91632f3 100755 +--- a/configure ++++ b/configure +@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } + /usr/include/iconv,/usr/lib \ + /usr/iconv/include,/usr/iconv/lib \ + /usr/include,/usr/lib \ ++ /usr/include,/usr/lib64 \ + /opt/include/iconv,/opt/lib \ + /opt/iconv/include,/opt/iconv/lib \ + /opt/include,/opt/lib" +@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; } + xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'` + xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'` + found=0 +- if test -r $xincdir/$xincfile ++ if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile + then + for E in $exts + do +- if test -r "$xlibdir/$xlibfile.$E" ++ if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E" + then +- jd_iconv_include_dir="$xincdir" +- jd_iconv_library_dir="$xlibdir" ++ jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir" ++ jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir" + jd_with_iconv_library="yes" + found=1 + break +@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; } + then + ICONV_LIB="" + else +- +-if test "X$jd_iconv_library_dir" != "X" +-then +- if test "X$RPATH" = "X" +- then +- +-case "$host_os" in +- *linux*|*solaris* ) +- if test "X$GCC" = Xyes +- then +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-Wl,-R," +- else +- RPATH="-Wl,-R" +- fi +- else +- if test "X$ac_R_nospace" = "Xno" +- then +- RPATH="-R " +- else +- RPATH="-R" +- fi +- fi +- ;; +- *osf*|*openbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-rpath," +- else +- RPATH="-rpath " +- fi +- ;; +- *netbsd*) +- if test "X$GCC" = Xyes +- then +- RPATH="-Wl,-R" +- fi +- ;; +-esac +- +- if test "X$RPATH" != "X" +- then +- RPATH="$RPATH$jd_iconv_library_dir" +- fi +- else +- RPATH="$RPATH:$jd_iconv_library_dir" +- fi +-fi +- ++ RPATH="" + fi + + ICONV_INC=-I$jd_iconv_include_dir +-- +1.8.3.4 + 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 @@ +Upstream-Status: Backported + +From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001 +From: Manfred Hanke +Date: Thu, 20 Jun 2013 10:24:12 +0200 +Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8 + mode) fixed + +char *str points to SLuchar_Type utf8_buf[], which had too small scope + +src/test/strops.sl failed in the following environment: + - compiler: gcc (Debian 4.7.2-5) 4.7.2 + - CFLAGS: -g -O2 + - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13 + - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux +--- + src/slstrops.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/slstrops.c b/src/slstrops.c +index ce6acb0..cbbbb01 100644 +--- a/src/slstrops.c ++++ b/src/slstrops.c +@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ + #endif + unsigned char uch; + int use_long = 0, use_alt_format = 0; ++ SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; + + while (1) + { +@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/ + #endif + { + SLwchar_Type wc; +- SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1]; + + if (-1 == SLang_pop_wchar (&wc)) + return out; +-- +1.7.9.5 + 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..f3003c9f08 --- /dev/null +++ b/meta/recipes-extended/slang/slang_2.2.4.bb @@ -0,0 +1,49 @@ +SUMMARY = "The shared library for the S-Lang extension language" + +DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \ +S-Lang language was designed so that it can be easily embedded into \ +a program to provide the program with a powerful extension language. \ +The S-Lang library, provided in this package, provides the S-Lang \ +extension language. S-Lang's syntax resembles C, which makes it easy \ +to recode S-Lang procedures in C if you need to." + +HOMEPAGE = "http://www.jedsoft.org/slang/" +SECTION = "libs" +DEPENDS = "pcre" +PR = "r12" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02" + + +SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \ + file://rpathfix.patch \ + file://fix-check-pcre.patch \ + file://change-char-type-to-signed-char-in-macros.patch \ + file://sprintf-bug-concerning-8-bit-characters.patch \ + file://slang-fix-the-iconv-existence-checking.patch \ + " + +inherit autotools-brokensep + +SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487" +SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db" + +EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib" + +do_configure_prepend() { + # slang keeps configure.ac and rest of autoconf files in autoconf/ directory + # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac} + # to be present. Resulting files land in autoconf/autoconf/ so we need to move them. + cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* . + cd ${B} +} + +do_install() { + oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib' +} + +FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/" +FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug" + +PARALLEL_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 @@ +This patch fixies the wrong return code of stat -h. + +Upstream-Status: Pending +Signed-off-by: Zhangle Yang + +--- stat-3.3/stat.c.orig 2013-08-22 10:49:45.000000000 +0800 ++++ stat-3.3/stat.c 2013-08-22 10:50:31.000000000 +0800 +@@ -845,7 +845,7 @@ + fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n"); + fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n"); + fprintf(stderr, "\t\t%%d - Free file nodes in file system\n"); +- exit(1); ++ exit(0); + } + + 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..6754fb8cbd --- /dev/null +++ b/meta/recipes-extended/stat/stat_3.3.bb @@ -0,0 +1,28 @@ +SUMMARY = "Command line file status display utility" +DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides." +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \ + file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "ftp://metalab.unc.edu/pub/Linux/utils/file/stat-${PV}.tar.gz \ + file://fix-error-return.patch" + +SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3" +SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09" + +do_install() { + install -d ${D}${base_bindir} ${D}${mandir}/man1 + install -m 755 stat ${D}${base_bindir}/stat.stat + install -m 644 stat.1 ${D}${mandir}/man1 +} + +inherit update-alternatives + +ALTERNATIVE_${PN} = "stat" +ALTERNATIVE_PRIORITY[stat] = "200" +ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat" +ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat" + +BBCLASSEXTEND = "native" + 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 @@ +#%PAM-1.0 +auth include common-auth +account include common-account +password include common-password +session required pam_keyinit.so revoke +session required pam_limits.so diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc new file mode 100644 index 0000000000..1d7e541024 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo.inc @@ -0,0 +1,43 @@ +SUMMARY = "Provide limited super user privileges to specific users" +DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments." +HOMEPAGE = "http://www.sudo.ws" +BUGTRACKER = "http://www.sudo.ws/bugs/" +SECTION = "admin" +LICENSE = "ISC & BSD & Zlib" +LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=69e337d679950e304953813158595256 \ + file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=e2dbb155fc49beea947515300bab99e0 \ + file://compat/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \ + file://compat/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ + file://compat/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \ + file://compat/snprintf.c;beginline=6;endline=31;md5=c98b24f02967c095d7a70ae2e4d4d4ea \ + file://include/queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \ + file://compat/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a" + +inherit autotools + +PACKAGECONFIG ??= "" +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" + +CONFFILES_${PN} = "${sysconfdir}/sudoers" + +EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor" + +do_configure_prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +# mksigname/mksiglist are used on build host to generate source files +do_compile_prepend () { + 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 +} + +# Explicitly create ${localstatedir}/lib before do_install to ensure +# the directory is accessible by all users. Otherwise the mkinstalldirs +# script (from sudo) will recursively create ${localstatedir}/lib/sudo +# and then chmod each directory with 0700 permissions, which isn't what +# we want (i.e, users would not be able to access /var/lib). +do_install_prepend (){ + mkdir -p ${D}/${localstatedir}/lib +} diff --git a/meta/recipes-extended/sudo/sudo_1.8.10p3.bb b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb new file mode 100644 index 0000000000..4c53032c5d --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.8.10p3.bb @@ -0,0 +1,27 @@ +require sudo.inc + +SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + " + +PAM_SRC_URI = "file://sudo.pam" + +SRC_URI[md5sum] = "fcd8d0d9f9f0397d076ee901e242ed39" +SRC_URI[sha256sum] = "6eda135fa68163108f1c24de6975de5ddb09d75730bb62d6390bda7b04345400" + +DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" +RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" + +EXTRA_OECONF += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)}" + +do_install_append () { + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then + install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo + fi + + chmod 4111 ${D}${bindir}/sudo + chmod 0440 ${D}${sysconfdir}/sudoers + + # Explicitly remove the ${localstatedir}/run directory to avoid QA error + rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo +} 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 @@ +Upstream-Status: Inappropriate [configuration] + +Index: sysklogd-1.5/Makefile +=================================================================== +--- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200 ++++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200 +@@ -127,8 +127,8 @@ + rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd + + install_exec: syslogd klogd +- ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd +- ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd ++ ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd ++ ${INSTALL} -m 500 klogd ${BINDIR}/klogd + + install_man: + ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8 diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch new file mode 100644 index 0000000000..c1cc042c9c --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch @@ -0,0 +1,20 @@ +Upstream-Status: Inappropriate + +The compiler should not be generating vectorized instructions on this target. +This is a work around until I can determine why this is occuring on this +particular recipe + +Index: sysklogd-1.5/Makefile +=================================================================== +--- sysklogd-1.5.orig/Makefile ++++ sysklogd-1.5/Makefile +@@ -20,7 +20,8 @@ + CC= gcc + #SKFLAGS= -g -DSYSV -Wall + #LDFLAGS= -g +-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce ++SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \ ++ -fno-tree-vectorize + # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE + # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE + # $(shell getconf LFS_SKFLAGS) diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd new file mode 100755 index 0000000000..258f882803 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/sysklogd @@ -0,0 +1,151 @@ +#! /bin/sh +# /etc/init.d/sysklogd: start the system log daemon. + +### BEGIN INIT INFO +# Provides: sysklogd +# Required-Start: $remote_fs $time +# Required-Stop: $remote_fs $time +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: System logger +### END INIT INFO + +# Source function library. +. /etc/init.d/functions + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +pidfile_syslogd=/var/run/syslogd.pid +pidfile_klogd=/var/run/klogd.pid +binpath_syslogd=/sbin/syslogd +binpath_klogd=/sbin/klogd + +test -x $binpath || exit 0 + +test ! -r /etc/default/syslogd || . /etc/default/syslogd + +create_xconsole() +{ + # Only proceed if /dev/xconsole is used at all + if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf + then + return + fi + + if [ ! -e /dev/xconsole ]; then + mknod -m 640 /dev/xconsole p + else + chmod 0640 /dev/xconsole + fi + chown root:adm /dev/xconsole + test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole +} + +log_begin_msg () { + echo -n $1 +} + +log_end_msg () { + echo $1 +} + +log_success_msg () { + echo $1 +} + +running() +{ + # No pidfile, probably no daemon present + # + if [ ! -f $pidfile ] + then + return 1 + fi + + pid=`cat $pidfile_syslogd` + + # No pid, probably no daemon present + # + if [ -z "$pid" ] + then + return 1 + fi + + if [ ! -d /proc/$pid ] + then + return 1 + fi + + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1` + + # No syslogd? + # + if [ "$cmd" != "$binpath" ] + then + return 1 + fi + + return 0 +} + +case "$1" in + start) + log_begin_msg "Starting system log daemon..." + create_xconsole + start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD + log_end_msg $? + log_begin_msg "Starting kernel log daemon..." + start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping system log daemon..." + start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd + log_end_msg $? + log_begin_msg "Stopping kernel log daemon..." + start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd + log_end_msg $? + ;; + reload|force-reload) + log_begin_msg "Reloading system log daemon..." + start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd + log_end_msg $? + log_begin_msg "Reloading kernel log daemon..." + start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd + start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD + log_end_msg $? + ;; + restart) + log_begin_msg "Restarting system log daemon..." + start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd + start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD + log_end_msg $? + log_begin_msg "Reloading kernel log daemon..." + start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd + start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD + log_end_msg $? + ;; + reload-or-restart) + if running + then + $0 reload + else + $0 start + fi + ;; + status) + status syslogd + RETVAL=$? + status klogd + rval=$? + [ $RETVAL -eq 0 ] && exit $rval + exit $RETVAL + ;; + *) + log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}" + exit 1 +esac + +exit 0 diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf new file mode 100644 index 0000000000..0849de1268 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/syslog.conf @@ -0,0 +1,71 @@ +# /etc/syslog.conf Configuration file for syslogd. +# +# Ported from debian by Yu Ke +# + +# +# First some standard logfiles. Log by facility. +# + +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +#cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log + +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err + +# Logging for INN news system +# +news.crit /var/log/news.crit +news.err /var/log/news.err +news.notice -/var/log/news.notice + +# +# Some `catch-all' logfiles. +# +*.=debug;\ +auth,authpriv.none;\ +news.none;mail.none -/var/log/debug + +*.=info;*.=notice;*.=warn;\ +auth,authpriv.none;\ +cron,daemon.none;\ +mail,news.none -/var/log/messages + +# +# Emergencies are sent to everybody logged in. +# +*.emerg * + +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +#news.=crit;news.=err;news.=notice;\ +#*.=debug;*.=info;\ +#*.=notice;*.=warn /dev/tty8 + +# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, +# you must invoke `xconsole' with the `-file' option: +# +# $ xconsole -file /dev/xconsole [...] +# +# NOTE: adjust the list below, or you'll go crazy if you have a reasonably +# busy site.. +# +daemon.*;mail.*;\ +news.err;\ +*.=debug;*.=info;\ +*.=notice;*.=warn |/dev/xconsole + diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc new file mode 100644 index 0000000000..bcf8aa7a96 --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd.inc @@ -0,0 +1,58 @@ +SUMMARY = "System Log Daemons" +DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" +HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" +SECTION = "base" + +LICENSE = "GPLv2+ & BSD" +LICENSE_syslogd = "BSD" +LICENSE_klogd = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ + file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \ + file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ + " + +inherit update-rc.d update-alternatives + +SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ + file://no-strip-install.patch \ + file://sysklogd \ + file://syslog.conf \ + " + +SRC_URI_append_e500v2 = " file://no-vectorization.patch" + +INITSCRIPT_NAME = "syslog" +CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" + +CFLAGS_append = " -DSYSV" + +do_install () { + install -d ${D}${mandir}/man8 \ + ${D}${mandir}/man5 \ + ${D}${base_sbindir} + oe_runmake 'BINDIR=${D}${base_sbindir}' \ + 'MANDIR=${D}${mandir}' install + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog +} + +# sysklogd package has no internal systemd support, so we weigh busybox's +# sysklogd utility over it in case of systemd +ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" + +ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" + +ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" +ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" +ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" +ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" + +pkg_prerm_${PN} () { + if test "x$D" = "x"; then + if test "$1" = "upgrade" -o "$1" = "remove"; then + /etc/init.d/syslog stop + fi + fi +} diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb new file mode 100644 index 0000000000..5c9588945d --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb @@ -0,0 +1,5 @@ +require sysklogd.inc +PR = "r7" + +SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b" +SRC_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 @@ +SUMMARY = "System performance tools" +DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux." +HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" +LICENSE = "GPLv2+" +SECTION = "console/utils" + +SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.gz \ + file://99_sysstat \ + " + +inherit autotools-brokensep gettext + +EXTRA_OECONF += "--disable-sensors" +EXTRA_OEMAKE += 'LFLAGS=""' + +do_configure_prepend() { + export sa_lib_dir=${libdir}/sa +} + +do_install() { + autotools_do_install + + # don't install /var/log/sa when populating rootfs. Do it through volatile + + rm -rf ${D}/var + install -d ${D}/etc/default/volatiles + install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles +} + +pkg_postinst_${PN} () { + if [ -n "$D" ]; then + exit 0 + fi + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi +} + + +FILES_${PN} += "${libdir}/sa" +FILES_${PN}-dbg += "${libdir}/sa/.debug/" + +TARGET_CC_ARCH += "${LDFLAGS}" +LDFLAGS_append_libc-uclibc = " -lintl" diff --git a/meta/recipes-extended/sysstat/sysstat/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 @@ +require sysstat.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +SRC_URI[md5sum] = "039dcd235dfcfb3d4acc0a05730f9512" +SRC_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 @@ +Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] + +This patch avoids heap overflow reported by : +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 + +This is a clean patch for the GPLv2 tar recipe. + +Nitin A Kamble 2011/04/25 + +Index: tar-1.17/lib/rtapelib.c +=================================================================== +--- tar-1.17.orig/lib/rtapelib.c ++++ tar-1.17/lib/rtapelib.c +@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si + + sprintf (command_buffer, "R%lu\n", (unsigned long) length); + if (do_command (handle, command_buffer) == -1 +- || (status = get_status (handle)) == SAFE_READ_ERROR) ++ || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) + return SAFE_READ_ERROR; + + for (counter = 0; counter < status; counter += rlen, buffer += rlen) diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch new file mode 100644 index 0000000000..f8059a0a89 --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch @@ -0,0 +1,37 @@ +Upstream-Status: Inappropriate [licensing] + +# Fix errors when built with gcc 4.3 +# Patch taken from Debian bug #452096 + +diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h +--- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800 ++++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700 +@@ -198,7 +198,11 @@ + #endif + + #ifndef ARGP_FS_EI +-#define ARGP_FS_EI extern inline ++ #if defined __GNUC_STDC_INLINE__ ++ #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__)) ++ #else ++ #define ARGP_FS_EI extern inline ++ #endif + #endif + + ARGP_FS_EI size_t +diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h +--- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700 ++++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700 +@@ -580,7 +580,11 @@ + # endif + + # ifndef ARGP_EI +-# define ARGP_EI extern __inline__ ++# if defined __GNUC_STDC_INLINE__ ++# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__)) ++# else ++# define ARGP_EI extern __inline__ ++# endif + # endif + + ARGP_EI void diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch new file mode 100644 index 0000000000..30534c29ce --- /dev/null +++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch @@ -0,0 +1,30 @@ +Upstream-Status: Inappropriate [licensing] + +# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. +# This is needed to configure correctly with newer versions of autoconf. + +--- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700 ++++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700 +@@ -1,4 +1,4 @@ +-# serial 4 -*- Autoconf -*- ++# serial 5 -*- Autoconf -*- + # Enable extensions on systems that normally disable them. + + # Copyright (C) 2003, 2006 Free Software Foundation, Inc. +@@ -16,6 +16,7 @@ + # ------------------------ + # Enable extensions on systems that normally disable them, + # typically due to standards-conformance issues. ++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ + AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], + [ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +@@ -48,7 +49,7 @@ + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +-]) ++])]) + + # gl_USE_SYSTEM_EXTENSIONS + # ------------------------ diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.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 @@ +require tar_${PV}.bb + +inherit native + +BPN = "tar" +EXTRAINSTALL = "" diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc new file mode 100644 index 0000000000..51d49340a1 --- /dev/null +++ b/meta/recipes-extended/tar/tar.inc @@ -0,0 +1,45 @@ +SUMMARY = "GNU file archiving program" +DESCRIPTION = "GNU tar saves many files together into a single tape \ +or disk archive, and can restore individual files from the archive." +HOMEPAGE = "http://www.gnu.org/software/tar/" +SECTION = "base" + +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" + +inherit autotools gettext texinfo + +EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" + +EXTRAINSTALL = "do_install_extra" +EXTRAINSTALL_class-nativesdk = "" + +do_install () { + autotools_do_install + ${EXTRAINSTALL} +} + +do_install_extra () { + install -d ${D}${base_bindir} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar + rmdir ${D}${bindir}/ +} + +PACKAGES =+ "${PN}-rmt" + +PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl," + +FILES_${PN}-rmt = "${base_sbindir}/rmt*" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "tar" +ALTERNATIVE_${PN}-rmt = "rmt" +ALTERNATIVE_${PN}_class-nativesdk = "" +ALTERNATIVE_${PN}-rmt_class-nativesdk = "" + +ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar" +ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt" + +BBCLASSEXTEND = "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 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +Index: tar-1.27/gnu/stdio.in.h +=================================================================== +--- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300 ++++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300 +@@ -710,10 +710,12 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning; besides, C11 + removed it. */ ++#if defined gets + #undef gets + #if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif ++#endif + + + #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 @@ +require tar.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +PR = "r3" + +SRC_URI += "file://m4extensions.patch \ + file://gcc43build.patch \ + file://avoid_heap_overflow.patch \ + " + +SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290" +SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492" diff --git a/meta/recipes-extended/tar/tar_1.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 @@ +require tar.inc + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI += "file://remove-gets.patch \ + " + +SRC_URI[md5sum] = "490e074dd7e71f553df8357a7ef9bdcf" +SRC_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 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 1995-01-30 19:51:47.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.5 2004-04-09 16:59:45.000000000 +0200 +@@ -173,7 +173,7 @@ + Patterns like these can be used when the machine has different internet + addresses with different internet hostnames. Service providers can use + this facility to offer FTP, GOPHER or WWW archives with internet names +-that may even belong to different organizations. See also the `twist' ++that may even belong to different organizations. See also the `twist\' + option in the hosts_options(5) document. Some systems (Solaris, + FreeBSD) can have more than one internet address on one physical + interface; with other systems you may have to resort to SLIP or PPP +@@ -236,10 +236,10 @@ + Before accepting a client request, the wrappers can use the IDENT + service to find out that the client did not send the request at all. + When the client host provides IDENT service, a negative IDENT lookup +-result (the client matches `UNKNOWN@host') is strong evidence of a host ++result (the client matches `UNKNOWN@host\') is strong evidence of a host + spoofing attack. + .PP +-A positive IDENT lookup result (the client matches `KNOWN@host') is ++A positive IDENT lookup result (the client matches `KNOWN@host\') is + less trustworthy. It is possible for an intruder to spoof both the + client connection and the IDENT lookup, although doing so is much + harder than spoofing just a client connection. It may also be that +diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5 +--- tcp_wrappers_7.6.orig/hosts_options.5 1994-12-28 17:42:29.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_options.5 2004-04-09 16:59:49.000000000 +0200 +@@ -124,7 +124,7 @@ + value is taken. + .SH MISCELLANEOUS + .IP "banners /some/directory" +-Look for a file in `/some/directory' with the same name as the daemon ++Look for a file in `/some/directory\' with the same name as the daemon + process (for example in.telnetd for the telnet service), and copy its + contents to the client. Newline characters are replaced by + carriage-return newline, and % sequences are expanded (see +diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8 +--- tcp_wrappers_7.6.orig/tcpdmatch.8 1996-02-11 17:01:36.000000000 +0100 ++++ tcp_wrappers_7.6/tcpdmatch.8 2004-04-09 17:00:49.000000000 +0200 +@@ -26,7 +26,7 @@ + A daemon process name. Typically, the last component of a daemon + executable pathname. + .IP client +-A host name or network address, or one of the `unknown' or `paranoid' ++A host name or network address, or one of the `unknown\' or `paranoid\' + wildcard patterns. + .sp + When a client host name is specified, \fItcpdmatch\fR gives a +@@ -37,13 +37,13 @@ + .PP + Optional information specified with the \fIdaemon@server\fR form: + .IP server +-A host name or network address, or one of the `unknown' or `paranoid' +-wildcard patterns. The default server name is `unknown'. ++A host name or network address, or one of the `unknown\' or `paranoid\' ++wildcard patterns. The default server name is `unknown\'. + .PP + Optional information specified with the \fIuser@client\fR form: + .IP user + A client user identifier. Typically, a login name or a numeric userid. +-The default user name is `unknown'. ++The default user name is `unknown\'. + .SH OPTIONS + .IP -d + Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current +@@ -70,7 +70,7 @@ + .ti +5 + tcpdmatch in.telnetd paranoid + .PP +-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR ++On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR + may need some help to locate the inetd configuration file. + .SH FILES + .PP diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch new file mode 100644 index 0000000000..9a735bff6d --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch @@ -0,0 +1,250 @@ +Upstream-Status: Backport + +diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3 +--- tcp_wrappers_7.6.orig/hosts_access.3 2005-03-09 18:30:25.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.3 2005-03-09 18:27:03.000000000 +0100 +@@ -3,7 +3,7 @@ + hosts_access, hosts_ctl, request_init, request_set \- access control library + .SH SYNOPSIS + .nf +-#include "tcpd.h" ++#include + + extern int allow_severity; + extern int deny_severity; +diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2005-03-09 18:30:25.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.5 2005-03-09 18:30:18.000000000 +0100 +@@ -8,9 +8,9 @@ name, host name/address) patterns. Exam + impatient reader is encouraged to skip to the EXAMPLES section for a + quick introduction. + .PP +-An extended version of the access control language is described in the +-\fIhosts_options\fR(5) document. The extensions are turned on at +-program build time by building with -DPROCESS_OPTIONS. ++The extended version of the access control language is described in the ++\fIhosts_options\fR(5) document. \fBNote that this language supersedes ++the meaning of \fIshell_command\fB as documented below.\fR + .PP + In the following text, \fIdaemon\fR is the the process name of a + network daemon process, and \fIclient\fR is the name and/or address of +@@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain + /etc/hosts.deny: + .in +3 + .nf +-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\ +- /usr/ucb/mail -s %d-%h root) & ++in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\ ++ /usr/bin/mail -s %d-%h root) & + .fi + .PP + The safe_finger command comes with the tcpd wrapper and should be +@@ -383,6 +383,7 @@ that shouldn\'t. All problems are repor + .fi + .SH SEE ALSO + .nf ++hosts_options(5) extended syntax. + tcpd(8) tcp/ip daemon wrapper program. + tcpdchk(8), tcpdmatch(8), test programs. + .SH BUGS +diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5 +--- tcp_wrappers_7.6.orig/hosts_options.5 2005-03-09 18:30:24.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_options.5 2005-03-09 18:27:03.000000000 +0100 +@@ -2,10 +2,8 @@ + .SH NAME + hosts_options \- host access control language extensions + .SH DESCRIPTION +-This document describes optional extensions to the language described +-in the hosts_access(5) document. The extensions are enabled at program +-build time. For example, by editing the Makefile and turning on the +-PROCESS_OPTIONS compile-time option. ++This document describes extensions to the language described ++in the hosts_access(5) document. + .PP + The extensible language uses the following format: + .sp +@@ -58,12 +56,12 @@ Notice the leading dot on the domain nam + Execute, in a child process, the specified shell command, after + performing the % expansions described in the hosts_access(5) + manual page. The command is executed with stdin, stdout and stderr +-connected to the null device, so that it won\'t mess up the ++connected to the null device, so that it won't mess up the + conversation with the client host. Example: + .sp + .nf + .ti +3 +-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) & ++spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) & + .fi + .sp + executes, in a background child process, the shell command "safe_finger +diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c +--- tcp_wrappers_7.6.orig/inetcf.c 1997-02-12 02:13:24.000000000 +0100 ++++ tcp_wrappers_7.6/inetcf.c 2005-03-09 18:27:03.000000000 +0100 +@@ -26,13 +26,17 @@ extern void exit(); + * guesses. Shorter names follow longer ones. + */ + char *inet_files[] = { ++#if 0 + "/private/etc/inetd.conf", /* NEXT */ + "/etc/inet/inetd.conf", /* SYSV4 */ + "/usr/etc/inetd.conf", /* IRIX?? */ ++#endif + "/etc/inetd.conf", /* BSD */ ++#if 0 + "/etc/net/tlid.conf", /* SYSV4?? */ + "/etc/saf/tlid.conf", /* SYSV4?? */ + "/etc/tlid.conf", /* SYSV4?? */ ++#endif + 0, + }; + +diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8 +--- tcp_wrappers_7.6.orig/tcpd.8 1996-02-21 16:39:16.000000000 +0100 ++++ tcp_wrappers_7.6/tcpd.8 2005-03-09 18:27:03.000000000 +0100 +@@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s + TLI. Functionality may be limited when the protocol underneath TLI is + not an internet protocol. + .PP +-Operation is as follows: whenever a request for service arrives, the ++There are two possible modes of operation: execution of \fItcpd\fP ++before a service started by \fIinetd\fP, or linking a daemon with ++the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3) ++manual page. Operation when started by \fIinetd\fP ++is as follows: whenever a request for service arrives, the + \fIinetd\fP daemon is tricked into running the \fItcpd\fP program + instead of the desired server. \fItcpd\fP logs the request and does + some additional checks. When all is well, \fItcpd\fP runs the +@@ -88,11 +92,11 @@ configuration files. + .sp + .in +5 + # mkdir /other/place +-# mv /usr/etc/in.fingerd /other/place +-# cp tcpd /usr/etc/in.fingerd ++# mv /usr/sbin/in.fingerd /other/place ++# cp tcpd /usr/sbin/in.fingerd + .fi + .PP +-The example assumes that the network daemons live in /usr/etc. On some ++The example assumes that the network daemons live in /usr/sbin. On some + systems, network daemons live in /usr/sbin or in /usr/libexec, or have + no `in.\' prefix to their name. + .SH EXAMPLE 2 +@@ -101,35 +105,34 @@ are left in their original place. + .PP + In order to monitor access to the \fIfinger\fR service, perform the + following edits on the \fIinetd\fR configuration file (usually +-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR): ++\fI/etc/inetd.conf\fR): + .nf + .sp + .ti +5 +-finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd ++finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd + .sp + becomes: + .sp + .ti +5 +-finger stream tcp nowait nobody /some/where/tcpd in.fingerd ++finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd + .sp + .fi + .PP +-The example assumes that the network daemons live in /usr/etc. On some ++The example assumes that the network daemons live in /usr/sbin. On some + systems, network daemons live in /usr/sbin or in /usr/libexec, the + daemons have no `in.\' prefix to their name, or there is no userid + field in the inetd configuration file. + .PP + Similar changes will be needed for the other services that are to be + covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8) +-process to make the changes effective. AIX users may also have to +-execute the `inetimp\' command. ++process to make the changes effective. + .SH EXAMPLE 3 + In the case of daemons that do not live in a common directory ("secret" + or otherwise), edit the \fIinetd\fR configuration file so that it + specifies an absolute path name for the process name field. For example: + .nf + .sp +- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd ++ ntalk dgram udp wait root /usr/sbin/tcpd /usr/local/lib/ntalkd + .sp + .fi + .PP +@@ -164,6 +167,7 @@ The default locations of the host access + .SH SEE ALSO + .na + .nf ++hosts_access(3), functions provided by the libwrap library. + hosts_access(5), format of the tcpd access control tables. + syslog.conf(5), format of the syslogd control file. + inetd.conf(5), format of the inetd control file. +diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8 +--- tcp_wrappers_7.6.orig/tcpdchk.8 1995-01-08 17:00:31.000000000 +0100 ++++ tcp_wrappers_7.6/tcpdchk.8 2005-03-09 18:27:03.000000000 +0100 +@@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v] + potential and real problems it can find. The program examines the + \fItcpd\fR access control files (by default, these are + \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the +-entries in these files against entries in the \fIinetd\fR or \fItlid\fR +-network configuration files. ++entries in these files against entries in the \fIinetd\fR ++network configuration file. + .PP + \fItcpdchk\fR reports problems such as non-existent pathnames; services + that appear in \fItcpd\fR access control rules, but are not controlled +@@ -26,14 +26,13 @@ problem. + .SH OPTIONS + .IP -a + Report access control rules that permit access without an explicit +-ALLOW keyword. This applies only when the extended access control +-language is enabled (build with -DPROCESS_OPTIONS). ++ALLOW keyword. + .IP -d + Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current + directory instead of the default ones. + .IP "-i inet_conf" + Specify this option when \fItcpdchk\fR is unable to find your +-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when ++\fIinetd.conf\fR network configuration file, or when + you suspect that the program uses the wrong one. + .IP -v + Display the contents of each access control rule. Daemon lists, client +@@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do + hosts_access(5), format of the tcpd access control tables. + hosts_options(5), format of the language extensions. + inetd.conf(5), format of the inetd control file. +-tlid.conf(5), format of the tlid control file. + .SH AUTHORS + .na + .nf +diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8 +--- tcp_wrappers_7.6.orig/tcpdmatch.8 2005-03-09 18:30:24.000000000 +0100 ++++ tcp_wrappers_7.6/tcpdmatch.8 2005-03-09 18:27:03.000000000 +0100 +@@ -13,7 +13,7 @@ request for service. Examples are given + The program examines the \fItcpd\fR access control tables (default + \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its + conclusion. For maximal accuracy, it extracts additional information +-from your \fIinetd\fR or \fItlid\fR network configuration file. ++from your \fIinetd\fR network configuration file. + .PP + When \fItcpdmatch\fR finds a match in the access control tables, it + identifies the matched rule. In addition, it displays the optional +@@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d + directory instead of the default ones. + .IP "-i inet_conf" + Specify this option when \fItcpdmatch\fR is unable to find your +-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when ++\fIinetd.conf\fR network configuration file, or when + you suspect that the program uses the wrong one. + .SH EXAMPLES + To predict how \fItcpd\fR would handle a telnet request from the local +@@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker + hosts_access(5), format of the tcpd access control tables. + hosts_options(5), format of the language extensions. + inetd.conf(5), format of the inetd control file. +-tlid.conf(5), format of the tlid control file. + .SH AUTHORS + .na + .nf diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch new file mode 100644 index 0000000000..9e188027fc --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch @@ -0,0 +1,105 @@ +Upstream-Status: Backport + +See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847 + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 18:54:33.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 18:54:27.000000000 +0200 +@@ -89,6 +89,10 @@ + bitwise AND of the address and the `mask\'. For example, the net/mask + pattern `131.155.72.0/255.255.254.0\' matches every address in the + range `131.155.72.0\' through `131.155.73.255\'. ++.IP \(bu ++Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This ++method of matching cannot be used in conjunction with `net/mask\' matching, ++hostname matching beginning with `.\' or IP address matching ending with `.\'. + .SH WILDCARDS + The access control language supports explicit wildcards: + .IP ALL +diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c +--- tcp_wrappers_7.6.orig/hosts_access.c 1997-02-12 02:13:23.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 18:52:21.000000000 +0200 +@@ -289,6 +289,11 @@ + { + int n; + ++#ifndef DISABLE_WILDCARD_MATCHING ++ if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */ ++ return (match_pattern_ylo(string,tok)); ++ } else ++#endif + if (tok[0] == '.') { /* suffix */ + n = strlen(string) - strlen(tok); + return (n > 0 && STR_EQ(tok, string + n)); +@@ -329,3 +334,71 @@ + } + return ((addr & mask) == net); + } ++ ++#ifndef DISABLE_WILDCARD_MATCHING ++/* Note: this feature has been adapted in a pretty straightforward way ++ from Tatu Ylonen's last SSH version under free license by ++ Pekka Savola . ++ ++ Copyright (c) 1995 Tatu Ylonen , Espoo, Finland ++*/ ++ ++/* Returns true if the given string matches the pattern (which may contain ++ ? and * as wildcards), and zero if it does not match. */ ++ ++int match_pattern_ylo(const char *s, const char *pattern) ++{ ++ while (1) ++ { ++ /* If at end of pattern, accept if also at end of string. */ ++ if (!*pattern) ++ return !*s; ++ ++ /* Process '*'. */ ++ if (*pattern == '*') ++ { ++ /* Skip the asterisk. */ ++ pattern++; ++ ++ /* If at end of pattern, accept immediately. */ ++ if (!*pattern) ++ return 1; ++ ++ /* If next character in pattern is known, optimize. */ ++ if (*pattern != '?' && *pattern != '*') ++ { ++ /* Look instances of the next character in pattern, and try ++ to match starting from those. */ ++ for (; *s; s++) ++ if (*s == *pattern && ++ match_pattern_ylo(s + 1, pattern + 1)) ++ return 1; ++ /* Failed. */ ++ return 0; ++ } ++ ++ /* Move ahead one character at a time and try to match at each ++ position. */ ++ for (; *s; s++) ++ if (match_pattern_ylo(s, pattern)) ++ return 1; ++ /* Failed. */ ++ return 0; ++ } ++ ++ /* There must be at least one more character in the string. If we are ++ at the end, fail. */ ++ if (!*s) ++ return 0; ++ ++ /* Check if the next character of the string is acceptable. */ ++ if (*pattern != '?' && *pattern != *s) ++ return 0; ++ ++ /* Move to the next character, both in string and in pattern. */ ++ s++; ++ pattern++; ++ } ++ /*NOTREACHED*/ ++} ++#endif /* DISABLE_WILDCARD_MATCHING */ diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch new file mode 100644 index 0000000000..725f4b5957 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch @@ -0,0 +1,32 @@ +Upstream-Status: Backport + +* Mon Feb 5 2001 Preston Brown +- fix gethostbyname to work better with dot "." notation (#16949) + +--- tcp_wrappers_7.6/socket.c.fixgethostbyname Fri Mar 21 13:27:25 1997 ++++ tcp_wrappers_7.6/socket.c Mon Feb 5 14:09:40 2001 +@@ -52,7 +52,8 @@ + char *name; + { + char dot_name[MAXHOSTNAMELEN + 1]; +- ++ struct hostent *hp; ++ + /* + * Don't append dots to unqualified names. Such names are likely to come + * from local hosts files or from NIS. +@@ -61,8 +62,12 @@ + if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) { + return (gethostbyname(name)); + } else { +- sprintf(dot_name, "%s.", name); +- return (gethostbyname(dot_name)); ++ sprintf(dot_name, "%s.", name); ++ hp = gethostbyname(dot_name); ++ if (hp) ++ return hp; ++ else ++ return (gethostbyname(name)); + } + } + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch new file mode 100644 index 0000000000..96d47c39f4 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch @@ -0,0 +1,1255 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c +--- tcp_wrappers_7.6.orig/fix_options.c 1997-04-08 02:29:19.000000000 +0200 ++++ tcp_wrappers_7.6/fix_options.c 2004-04-10 19:07:43.000000000 +0200 +@@ -11,6 +11,9 @@ + + #include + #include ++#ifdef INET6 ++#include ++#endif + #include + #include + #include +@@ -41,6 +44,22 @@ + unsigned int opt; + int optlen; + struct in_addr dummy; ++#ifdef INET6 ++ struct sockaddr_storage ss; ++ int sslen; ++ ++ /* ++ * check if this is AF_INET socket ++ * XXX IPv6 support? ++ */ ++ sslen = sizeof(ss); ++ if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) { ++ syslog(LOG_ERR, "getpeername: %m"); ++ clean_exit(request); ++ } ++ if (ss.ss_family != AF_INET) ++ return; ++#endif + + if ((ip = getprotobyname("ip")) != 0) + ipproto = ip->p_proto; +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:22:58.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:07:43.000000000 +0200 +@@ -85,11 +85,18 @@ + for daemon process names or for client user names. + .IP \(bu + An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a +-`net/mask\' pair. A host address is matched if `net\' is equal to the ++`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the + bitwise AND of the address and the `mask\'. For example, the net/mask + pattern `131.155.72.0/255.255.254.0\' matches every address in the + range `131.155.72.0\' through `131.155.73.255\'. + .IP \(bu ++An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a ++`[net]/prefixlen\' pair. An IPv6 host address is matched if ++`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the ++address. For example, the [net]/prefixlen pattern ++`[3ffe:505:2:1::]/64\' matches every address in the range ++`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'. ++.IP \(bu + Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This + method of matching cannot be used in conjunction with `net/mask\' matching, + hostname matching beginning with `.\' or IP address matching ending with `.\'. +diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c +--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:22:58.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:07:43.000000000 +0200 +@@ -24,7 +24,13 @@ + /* System libraries. */ + + #include ++#ifdef INT32_T ++ typedef uint32_t u_int32_t; ++#endif + #include ++#ifdef INET6 ++#include ++#endif + #include + #include + #include +@@ -33,6 +39,9 @@ + #include + #include + #include ++#ifdef INET6 ++#include ++#endif + + extern char *fgets(); + extern int errno; +@@ -82,6 +91,10 @@ + static int host_match(); + static int string_match(); + static int masked_match(); ++#ifdef INET6 ++static int masked_match4(); ++static int masked_match6(); ++#endif + + /* Size of logical line buffer. */ + +@@ -289,6 +302,13 @@ + { + int n; + ++#ifdef INET6 ++ /* convert IPv4 mapped IPv6 address to IPv4 address */ ++ if (STRN_EQ(string, "::ffff:", 7) ++ && dot_quad_addr(string + 7) != INADDR_NONE) { ++ string += 7; ++ } ++#endif + #ifndef DISABLE_WILDCARD_MATCHING + if (strchr(tok, '*') || strchr(tok,'?')) { /* contains '*' or '?' */ + return (match_pattern_ylo(string,tok)); +@@ -304,20 +324,72 @@ + } else if (tok[(n = strlen(tok)) - 1] == '.') { /* prefix */ + return (STRN_EQ(tok, string, n)); + } else { /* exact match */ ++#ifdef INET6 ++ struct addrinfo hints, *res; ++ struct sockaddr_in6 pat, addr; ++ int len, ret; ++ char ch; ++ ++ len = strlen(tok); ++ if (*tok == '[' && tok[len - 1] == ']') { ++ ch = tok[len - 1]; ++ tok[len - 1] = '\0'; ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = AF_INET6; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ++ if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) { ++ memcpy(&pat, res->ai_addr, sizeof(pat)); ++ freeaddrinfo(res); ++ } ++ tok[len - 1] = ch; ++ if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0) ++ return NO; ++ memcpy(&addr, res->ai_addr, sizeof(addr)); ++ freeaddrinfo(res); ++#ifdef NI_WITHSCOPEID ++ if (pat.sin6_scope_id != 0 && ++ addr.sin6_scope_id != pat.sin6_scope_id) ++ return NO; ++#endif ++ return (!memcmp(&pat.sin6_addr, &addr.sin6_addr, ++ sizeof(struct in6_addr))); ++ return (ret); ++ } ++#endif + return (STR_EQ(tok, string)); + } + } + + /* masked_match - match address against netnumber/netmask */ + ++#ifdef INET6 + static int masked_match(net_tok, mask_tok, string) + char *net_tok; + char *mask_tok; + char *string; + { ++ return (masked_match4(net_tok, mask_tok, string) || ++ masked_match6(net_tok, mask_tok, string)); ++} ++ ++static int masked_match4(net_tok, mask_tok, string) ++#else ++static int masked_match(net_tok, mask_tok, string) ++#endif ++char *net_tok; ++char *mask_tok; ++char *string; ++{ ++#ifdef INET6 ++ u_int32_t net; ++ u_int32_t mask; ++ u_int32_t addr; ++#else + unsigned long net; + unsigned long mask; + unsigned long addr; ++#endif + + /* + * Disallow forms other than dotted quad: the treatment that inet_addr() +@@ -329,12 +401,78 @@ + return (NO); + if ((net = dot_quad_addr(net_tok)) == INADDR_NONE + || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) { ++#ifndef INET6 + tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok); ++#endif + return (NO); /* not tcpd_jump() */ + } + return ((addr & mask) == net); + } + ++#ifdef INET6 ++static int masked_match6(net_tok, mask_tok, string) ++char *net_tok; ++char *mask_tok; ++char *string; ++{ ++ struct addrinfo hints, *res; ++ struct sockaddr_in6 net, addr; ++ u_int32_t mask; ++ int len, mask_len, i = 0; ++ char ch; ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = AF_INET6; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ++ if (getaddrinfo(string, NULL, &hints, &res) != 0) ++ return NO; ++ memcpy(&addr, res->ai_addr, sizeof(addr)); ++ freeaddrinfo(res); ++ ++ if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) { ++ if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE ++ || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) ++ return (NO); ++ return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]); ++ } ++ ++ /* match IPv6 address against netnumber/prefixlen */ ++ len = strlen(net_tok); ++ if (*net_tok != '[' || net_tok[len - 1] != ']') ++ return NO; ++ ch = net_tok[len - 1]; ++ net_tok[len - 1] = '\0'; ++ if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) { ++ net_tok[len - 1] = ch; ++ return NO; ++ } ++ memcpy(&net, res->ai_addr, sizeof(net)); ++ freeaddrinfo(res); ++ net_tok[len - 1] = ch; ++ if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128) ++ return NO; ++ ++#ifdef NI_WITHSCOPEID ++ if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id) ++ return NO; ++#endif ++ while (mask_len > 0) { ++ if (mask_len < 32) { ++ mask = htonl(~(0xffffffff >> mask_len)); ++ if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask)) ++ return NO; ++ break; ++ } ++ if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i]) ++ return NO; ++ i += 4; ++ mask_len -= 32; ++ } ++ return YES; ++} ++#endif /* INET6 */ ++ + #ifndef DISABLE_WILDCARD_MATCHING + /* Note: this feature has been adapted in a pretty straightforward way + from Tatu Ylonen's last SSH version under free license by +diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile +--- tcp_wrappers_7.6.orig/Makefile 1997-03-21 19:27:21.000000000 +0100 ++++ tcp_wrappers_7.6/Makefile 2004-04-10 19:22:44.000000000 +0200 +@@ -21,7 +21,7 @@ + @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix" + @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" + @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4" +- @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" ++ @echo " sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" + @echo " uts215 uxp" + @echo + @echo "If none of these match your environment, edit the system" +@@ -131,20 +131,34 @@ + NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all + + # Freebsd and linux by default have no NIS. +-386bsd netbsd bsdos: ++386bsd bsdos: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ + EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all + + freebsd: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ ++ LIBS="-L/usr/local/v6/lib -linet6" \ + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ +- EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \ ++ VSYSLOG= all ++ ++netbsd: ++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ ++ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all + + linux: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ +- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ +- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all ++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ ++ NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \ ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all ++ ++gnu: ++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ ++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ ++ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \ ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all + + # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. + hpux hpux8 hpux9 hpux10: +@@ -196,6 +210,13 @@ + NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ + BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all + ++# SunOS 5.8 is another SYSV4 variant, but has IPv6 support ++solaris8: ++ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ ++ LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \ ++ NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \ ++ EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all ++ + # Generic SYSV40 + esix sysv4: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ +diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c +--- tcp_wrappers_7.6.orig/misc.c 1996-02-11 17:01:30.000000000 +0100 ++++ tcp_wrappers_7.6/misc.c 2004-04-10 19:07:43.000000000 +0200 +@@ -58,9 +58,31 @@ + { + char *cp; + ++#ifdef INET6 ++ int bracket = 0; ++ ++ for (cp = string; cp && *cp; cp++) { ++ switch (*cp) { ++ case '[': ++ bracket++; ++ break; ++ case ']': ++ bracket--; ++ break; ++ default: ++ if (bracket == 0 && *cp == delimiter) { ++ *cp++ = 0; ++ return cp; ++ } ++ break; ++ } ++ } ++ return (NULL); ++#else + if ((cp = strchr(string, delimiter)) != 0) + *cp++ = 0; + return (cp); ++#endif + } + + /* dot_quad_addr - convert dotted quad to internal form */ +diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c +--- tcp_wrappers_7.6.orig/refuse.c 1994-12-28 17:42:40.000000000 +0100 ++++ tcp_wrappers_7.6/refuse.c 2004-04-10 19:07:43.000000000 +0200 +@@ -25,7 +25,12 @@ + void refuse(request) + struct request_info *request; + { ++#ifdef INET6 ++ syslog(deny_severity, "refused connect from %s (%s)", ++ eval_client(request), eval_hostaddr(request->client)); ++#else + syslog(deny_severity, "refused connect from %s", eval_client(request)); ++#endif + clean_exit(request); + /* NOTREACHED */ + } +diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c +--- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100 ++++ tcp_wrappers_7.6/rfc931.c 2004-04-10 19:07:43.000000000 +0200 +@@ -68,20 +68,50 @@ + /* rfc931 - return remote user name, given socket structures */ + + void rfc931(rmt_sin, our_sin, dest) ++#ifdef INET6 ++struct sockaddr *rmt_sin; ++struct sockaddr *our_sin; ++#else + struct sockaddr_in *rmt_sin; + struct sockaddr_in *our_sin; ++#endif + char *dest; + { + unsigned rmt_port; + unsigned our_port; ++#ifdef INET6 ++ struct sockaddr_storage rmt_query_sin; ++ struct sockaddr_storage our_query_sin; ++ int alen; ++#else + struct sockaddr_in rmt_query_sin; + struct sockaddr_in our_query_sin; ++#endif + char user[256]; /* XXX */ + char buffer[512]; /* XXX */ + char *cp; + char *result = unknown; + FILE *fp; + ++#ifdef INET6 ++ /* address family must be the same */ ++ if (rmt_sin->sa_family != our_sin->sa_family) { ++ STRN_CPY(dest, result, STRING_LENGTH); ++ return; ++ } ++ switch (our_sin->sa_family) { ++ case AF_INET: ++ alen = sizeof(struct sockaddr_in); ++ break; ++ case AF_INET6: ++ alen = sizeof(struct sockaddr_in6); ++ break; ++ default: ++ STRN_CPY(dest, result, STRING_LENGTH); ++ return; ++ } ++#endif ++ + /* + * Use one unbuffered stdio stream for writing to and for reading from + * the RFC931 etc. server. This is done because of a bug in the SunOS +@@ -92,7 +122,11 @@ + * sockets. + */ + ++#ifdef INET6 ++ if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) { ++#else + if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) { ++#endif + setbuf(fp, (char *) 0); + + /* +@@ -112,6 +146,25 @@ + * addresses from the query socket. + */ + ++#ifdef INET6 ++ memcpy(&our_query_sin, our_sin, alen); ++ memcpy(&rmt_query_sin, rmt_sin, alen); ++ switch (our_sin->sa_family) { ++ case AF_INET: ++ ((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT); ++ ((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT); ++ break; ++ case AF_INET6: ++ ((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT); ++ ((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT); ++ break; ++ } ++ ++ if (bind(fileno(fp), (struct sockaddr *) & our_query_sin, ++ alen) >= 0 && ++ connect(fileno(fp), (struct sockaddr *) & rmt_query_sin, ++ alen) >= 0) { ++#else + our_query_sin = *our_sin; + our_query_sin.sin_port = htons(ANY_PORT); + rmt_query_sin = *rmt_sin; +@@ -121,6 +174,7 @@ + sizeof(our_query_sin)) >= 0 && + connect(fileno(fp), (struct sockaddr *) & rmt_query_sin, + sizeof(rmt_query_sin)) >= 0) { ++#endif + + /* + * Send query to server. Neglect the risk that a 13-byte +@@ -129,8 +183,13 @@ + */ + + fprintf(fp, "%u,%u\r\n", ++#ifdef INET6 ++ ntohs(((struct sockaddr_in *)rmt_sin)->sin_port), ++ ntohs(((struct sockaddr_in *)our_sin)->sin_port)); ++#else + ntohs(rmt_sin->sin_port), + ntohs(our_sin->sin_port)); ++#endif + fflush(fp); + + /* +@@ -144,8 +203,13 @@ + && ferror(fp) == 0 && feof(fp) == 0 + && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s", + &rmt_port, &our_port, user) == 3 ++#ifdef INET6 ++ && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port ++ && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) { ++#else + && ntohs(rmt_sin->sin_port) == rmt_port + && ntohs(our_sin->sin_port) == our_port) { ++#endif + + /* + * Strip trailing carriage return. It is part of the +diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c +--- tcp_wrappers_7.6.orig/scaffold.c 1997-03-21 19:27:24.000000000 +0100 ++++ tcp_wrappers_7.6/scaffold.c 2004-04-10 19:07:43.000000000 +0200 +@@ -25,7 +25,9 @@ + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif + ++#ifndef INET6 + extern char *malloc(); ++#endif + + /* Application-specific. */ + +@@ -39,6 +41,7 @@ + int deny_severity = LOG_WARNING; + int rfc931_timeout = RFC931_TIMEOUT; + ++#ifndef INET6 + /* dup_hostent - create hostent in one memory block */ + + static struct hostent *dup_hostent(hp) +@@ -73,9 +76,46 @@ + } + return (&hb->host); + } ++#endif + + /* find_inet_addr - find all addresses for this host, result to free() */ + ++#ifdef INET6 ++struct addrinfo *find_inet_addr(host) ++char *host; ++{ ++ struct addrinfo hints, *res; ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = PF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ++ if (getaddrinfo(host, NULL, &hints, &res) == 0) ++ return (res); ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = PF_UNSPEC; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME; ++ if (getaddrinfo(host, NULL, &hints, &res) != 0) { ++ tcpd_warn("%s: host not found", host); ++ return (0); ++ } ++ if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) { ++ tcpd_warn("%d: not an internet host", res->ai_family); ++ freeaddrinfo(res); ++ return (0); ++ } ++ if (!res->ai_canonname) { ++ tcpd_warn("%s: hostname alias", host); ++ tcpd_warn("(cannot obtain official name)", res->ai_canonname); ++ } else if (STR_NE(host, res->ai_canonname)) { ++ tcpd_warn("%s: hostname alias", host); ++ tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname); ++ } ++ return (res); ++} ++#else + struct hostent *find_inet_addr(host) + char *host; + { +@@ -118,6 +158,7 @@ + } + return (dup_hostent(hp)); + } ++#endif + + /* check_dns - give each address thorough workout, return address count */ + +@@ -125,8 +166,13 @@ + char *host; + { + struct request_info request; ++#ifdef INET6 ++ struct sockaddr_storage sin; ++ struct addrinfo *hp, *res; ++#else + struct sockaddr_in sin; + struct hostent *hp; ++#endif + int count; + char *addr; + +@@ -134,11 +180,18 @@ + return (0); + request_init(&request, RQ_CLIENT_SIN, &sin, 0); + sock_methods(&request); ++#ifndef INET6 + memset((char *) &sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; ++#endif + ++#ifdef INET6 ++ for (res = hp, count = 0; res; res = res->ai_next, count++) { ++ memcpy(&sin, res->ai_addr, res->ai_addrlen); ++#else + for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { + memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr)); ++#endif + + /* + * Force host name and address conversions. Use the request structure +@@ -151,7 +204,11 @@ + tcpd_warn("host address %s->name lookup failed", + eval_hostaddr(request.client)); + } ++#ifdef INET6 ++ freeaddrinfo(hp); ++#else + free((char *) hp); ++#endif + return (count); + } + +diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h +--- tcp_wrappers_7.6.orig/scaffold.h 1994-12-31 18:19:20.000000000 +0100 ++++ tcp_wrappers_7.6/scaffold.h 2004-04-10 19:07:43.000000000 +0200 +@@ -4,6 +4,10 @@ + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ + ++#ifdef INET6 ++extern struct addrinfo *find_inet_addr(); ++#else + extern struct hostent *find_inet_addr(); ++#endif + extern int check_dns(); + extern int check_path(); +diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c +--- tcp_wrappers_7.6.orig/socket.c 2004-04-10 19:22:58.000000000 +0200 ++++ tcp_wrappers_7.6/socket.c 2004-04-10 19:07:43.000000000 +0200 +@@ -24,13 +24,22 @@ + #include + #include + #include ++#ifdef INT32_T ++typedef uint32_t u_int32_t; ++#endif + #include + #include + #include + #include + #include + ++#ifdef INET6 ++#ifndef NI_WITHSCOPEID ++#define NI_WITHSCOPEID 0 ++#endif ++#else + extern char *inet_ntoa(); ++#endif + + /* Local stuff. */ + +@@ -79,8 +88,13 @@ + void sock_host(request) + struct request_info *request; + { ++#ifdef INET6 ++ static struct sockaddr_storage client; ++ static struct sockaddr_storage server; ++#else + static struct sockaddr_in client; + static struct sockaddr_in server; ++#endif + int len; + char buf[BUFSIZ]; + int fd = request->fd; +@@ -109,7 +123,11 @@ + memset(buf, 0 sizeof(buf)); + #endif + } ++#ifdef INET6 ++ request->client->sin = (struct sockaddr *)&client; ++#else + request->client->sin = &client; ++#endif + + /* + * Determine the server binding. This is used for client username +@@ -122,7 +140,11 @@ + tcpd_warn("getsockname: %m"); + return; + } ++#ifdef INET6 ++ request->server->sin = (struct sockaddr *)&server; ++#else + request->server->sin = &server; ++#endif + } + + /* sock_hostaddr - map endpoint address to printable form */ +@@ -130,10 +152,26 @@ + void sock_hostaddr(host) + struct host_info *host; + { ++#ifdef INET6 ++ struct sockaddr *sin = host->sin; ++ int salen; ++ ++ if (!sin) ++ return; ++#ifdef SIN6_LEN ++ salen = sin->sa_len; ++#else ++ salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in) ++ : sizeof(struct sockaddr_in6); ++#endif ++ getnameinfo(sin, salen, host->addr, sizeof(host->addr), ++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID); ++#else + struct sockaddr_in *sin = host->sin; + + if (sin != 0) + STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr)); ++#endif + } + + /* sock_hostname - map endpoint address to host name */ +@@ -141,6 +179,160 @@ + void sock_hostname(host) + struct host_info *host; + { ++#ifdef INET6 ++ struct sockaddr *sin = host->sin; ++ struct sockaddr_in sin4; ++ struct addrinfo hints, *res, *res0 = NULL; ++ int salen, alen, err = 1; ++ char *ap = NULL, *rap, hname[NI_MAXHOST]; ++ ++ if (sin != NULL) { ++ if (sin->sa_family == AF_INET6) { ++ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin; ++ ++ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { ++ memset(&sin4, 0, sizeof(sin4)); ++#ifdef SIN6_LEN ++ sin4.sin_len = sizeof(sin4); ++#endif ++ sin4.sin_family = AF_INET; ++ sin4.sin_port = sin6->sin6_port; ++ sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12]; ++ sin = (struct sockaddr *)&sin4; ++ } ++ } ++ switch (sin->sa_family) { ++ case AF_INET: ++ ap = (char *)&((struct sockaddr_in *)sin)->sin_addr; ++ alen = sizeof(struct in_addr); ++ salen = sizeof(struct sockaddr_in); ++ break; ++ case AF_INET6: ++ ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr; ++ alen = sizeof(struct in6_addr); ++ salen = sizeof(struct sockaddr_in6); ++ break; ++ default: ++ break; ++ } ++ if (ap) ++ err = getnameinfo(sin, salen, hname, sizeof(hname), ++ NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD); ++ } ++ if (!err) { ++ ++ STRN_CPY(host->name, hname, sizeof(host->name)); ++ ++ /* reject numeric addresses */ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = sin->sa_family; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST; ++ if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) { ++ freeaddrinfo(res0); ++ res0 = NULL; ++ tcpd_warn("host name/name mismatch: " ++ "reverse lookup results in non-FQDN %s", ++ host->name); ++ strcpy(host->name, paranoid); /* name is bad, clobber it */ ++ } ++ err = !err; ++ } ++ if (!err) { ++ /* we are now sure that this is non-numeric */ ++ ++ /* ++ * Verify that the address is a member of the address list returned ++ * by gethostbyname(hostname). ++ * ++ * Verify also that gethostbyaddr() and gethostbyname() return the same ++ * hostname, or rshd and rlogind may still end up being spoofed. ++ * ++ * On some sites, gethostbyname("localhost") returns "localhost.domain". ++ * This is a DNS artefact. We treat it as a special case. When we ++ * can't believe the address list from gethostbyname("localhost") ++ * we're in big trouble anyway. ++ */ ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = sin->sa_family; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_CANONNAME; ++ if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) { ++ ++ /* ++ * Unable to verify that the host name matches the address. This ++ * may be a transient problem or a botched name server setup. ++ */ ++ ++ tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed", ++ host->name, ++ (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6"); ++ ++ } else if ((res0->ai_canonname == NULL ++ || STR_NE(host->name, res0->ai_canonname)) ++ && STR_NE(host->name, "localhost")) { ++ ++ /* ++ * The gethostbyaddr() and gethostbyname() calls did not return ++ * the same hostname. This could be a nameserver configuration ++ * problem. It could also be that someone is trying to spoof us. ++ */ ++ ++ tcpd_warn("host name/name mismatch: %s != %.*s", ++ host->name, STRING_LENGTH, ++ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname); ++ ++ } else { ++ ++ /* ++ * The address should be a member of the address list returned by ++ * gethostbyname(). We should first verify that the h_addrtype ++ * field is AF_INET, but this program has already caused too much ++ * grief on systems with broken library code. ++ */ ++ ++ for (res = res0; res; res = res->ai_next) { ++ if (res->ai_family != sin->sa_family) ++ continue; ++ switch (res->ai_family) { ++ case AF_INET: ++ rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr; ++ break; ++ case AF_INET6: ++ /* need to check scope_id */ ++ if (((struct sockaddr_in6 *)sin)->sin6_scope_id != ++ ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) { ++ continue; ++ } ++ rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr; ++ break; ++ default: ++ continue; ++ } ++ if (memcmp(rap, ap, alen) == 0) { ++ freeaddrinfo(res0); ++ return; /* name is good, keep it */ ++ } ++ } ++ ++ /* ++ * The host name does not map to the initial address. Perhaps ++ * someone has messed up. Perhaps someone compromised a name ++ * server. ++ */ ++ ++ getnameinfo(sin, salen, hname, sizeof(hname), ++ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID); ++ tcpd_warn("host name/address mismatch: %s != %.*s", ++ hname, STRING_LENGTH, ++ (res0->ai_canonname == NULL) ? "" : res0->ai_canonname); ++ } ++ strcpy(host->name, paranoid); /* name is bad, clobber it */ ++ if (res0) ++ freeaddrinfo(res0); ++ } ++#else /* INET6 */ + struct sockaddr_in *sin = host->sin; + struct hostent *hp; + int i; +@@ -220,6 +412,7 @@ + } + strcpy(host->name, paranoid); /* name is bad, clobber it */ + } ++#endif /* INET6 */ + } + + /* sock_sink - absorb unreceived IP datagram */ +@@ -228,7 +421,11 @@ + int fd; + { + char buf[BUFSIZ]; ++#ifdef INET6 ++ struct sockaddr_storage sin; ++#else + struct sockaddr_in sin; ++#endif + int size = sizeof(sin); + + /* +diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c +--- tcp_wrappers_7.6.orig/tcpd.c 1996-02-11 17:01:33.000000000 +0100 ++++ tcp_wrappers_7.6/tcpd.c 2004-04-10 19:07:43.000000000 +0200 +@@ -120,7 +120,12 @@ + + /* Report request and invoke the real daemon program. */ + ++#ifdef INET6 ++ syslog(allow_severity, "connect from %s (%s)", ++ eval_client(&request), eval_hostaddr(request.client)); ++#else + syslog(allow_severity, "connect from %s", eval_client(&request)); ++#endif + closelog(); + (void) execv(path, argv); + syslog(LOG_ERR, "error: cannot execute %s: %m", path); +diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c +--- tcp_wrappers_7.6.orig/tcpdchk.c 1997-02-12 02:13:25.000000000 +0100 ++++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:07:43.000000000 +0200 +@@ -22,6 +22,9 @@ + + #include + #include ++#ifdef INET6 ++#include ++#endif + #include + #include + #include +@@ -397,6 +400,31 @@ + } + } + ++#ifdef INET6 ++static int is_inet6_addr(pat) ++ char *pat; ++{ ++ struct addrinfo hints, *res; ++ int len, ret; ++ char ch; ++ ++ if (*pat != '[') ++ return (0); ++ len = strlen(pat); ++ if ((ch = pat[len - 1]) != ']') ++ return (0); ++ pat[len - 1] = '\0'; ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = AF_INET6; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ++ if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0) ++ freeaddrinfo(res); ++ pat[len - 1] = ch; ++ return (ret == 0); ++} ++#endif ++ + /* check_host - criticize host pattern */ + + static int check_host(pat) +@@ -423,14 +451,27 @@ + #endif + #endif + } else if (mask = split_at(pat, '/')) { /* network/netmask */ ++#ifdef INET6 ++ int mask_len; ++ ++ if ((dot_quad_addr(pat) == INADDR_NONE ++ || dot_quad_addr(mask) == INADDR_NONE) ++ && (!is_inet6_addr(pat) ++ || ((mask_len = atoi(mask)) < 0 || mask_len > 128))) ++#else + if (dot_quad_addr(pat) == INADDR_NONE + || dot_quad_addr(mask) == INADDR_NONE) ++#endif + tcpd_warn("%s/%s: bad net/mask pattern", pat, mask); + } else if (STR_EQ(pat, "FAIL")) { /* obsolete */ + tcpd_warn("FAIL is no longer recognized"); + tcpd_warn("(use EXCEPT or DENY instead)"); + } else if (reserved_name(pat)) { /* other reserved */ + /* void */ ; ++#ifdef INET6 ++ } else if (is_inet6_addr(pat)) { /* IPv6 address */ ++ addr_count = 1; ++#endif + } else if (NOT_INADDR(pat)) { /* internet name */ + if (pat[strlen(pat) - 1] == '.') { + tcpd_warn("%s: domain or host name ends in dot", pat); +diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h +--- tcp_wrappers_7.6.orig/tcpd.h 1996-03-19 16:22:25.000000000 +0100 ++++ tcp_wrappers_7.6/tcpd.h 2004-04-10 19:07:43.000000000 +0200 +@@ -11,7 +11,11 @@ + struct host_info { + char name[STRING_LENGTH]; /* access via eval_hostname(host) */ + char addr[STRING_LENGTH]; /* access via eval_hostaddr(host) */ ++#ifdef INET6 ++ struct sockaddr *sin; /* socket address or 0 */ ++#else + struct sockaddr_in *sin; /* socket address or 0 */ ++#endif + struct t_unitdata *unit; /* TLI transport address or 0 */ + struct request_info *request; /* for shared information */ + }; +diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c +--- tcp_wrappers_7.6.orig/tcpdmatch.c 1996-02-11 17:01:36.000000000 +0100 ++++ tcp_wrappers_7.6/tcpdmatch.c 2004-04-10 19:07:43.000000000 +0200 +@@ -57,7 +57,11 @@ + int argc; + char **argv; + { ++#ifdef INET6 ++ struct addrinfo hints, *hp, *res; ++#else + struct hostent *hp; ++#endif + char *myname = argv[0]; + char *client; + char *server; +@@ -68,8 +72,13 @@ + int ch; + char *inetcf = 0; + int count; ++#ifdef INET6 ++ struct sockaddr_storage server_sin; ++ struct sockaddr_storage client_sin; ++#else + struct sockaddr_in server_sin; + struct sockaddr_in client_sin; ++#endif + struct stat st; + + /* +@@ -172,13 +181,20 @@ + if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) { + if ((hp = find_inet_addr(server)) == 0) + exit(1); ++#ifndef INET6 + memset((char *) &server_sin, 0, sizeof(server_sin)); + server_sin.sin_family = AF_INET; ++#endif + request_set(&request, RQ_SERVER_SIN, &server_sin, 0); + ++#ifdef INET6 ++ for (res = hp, count = 0; res; res = res->ai_next, count++) { ++ memcpy(&server_sin, res->ai_addr, res->ai_addrlen); ++#else + for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { + memcpy((char *) &server_sin.sin_addr, addr, + sizeof(server_sin.sin_addr)); ++#endif + + /* + * Force evaluation of server host name and address. Host name +@@ -194,7 +210,11 @@ + fprintf(stderr, "Please specify an address instead\n"); + exit(1); + } ++#ifdef INET6 ++ freeaddrinfo(hp); ++#else + free((char *) hp); ++#endif + } else { + request_set(&request, RQ_SERVER_NAME, server, 0); + } +@@ -208,6 +228,18 @@ + tcpdmatch(&request); + exit(0); + } ++#ifdef INET6 ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = AF_INET6; ++ hints.ai_socktype = SOCK_STREAM; ++ hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ++ if (getaddrinfo(client, NULL, &hints, &res) == 0) { ++ freeaddrinfo(res); ++ request_set(&request, RQ_CLIENT_ADDR, client, 0); ++ tcpdmatch(&request); ++ exit(0); ++ } ++#endif + + /* + * Perhaps they are testing special client hostname patterns that aren't +@@ -229,6 +261,34 @@ + */ + if ((hp = find_inet_addr(client)) == 0) + exit(1); ++#ifdef INET6 ++ request_set(&request, RQ_CLIENT_SIN, &client_sin, 0); ++ ++ for (res = hp, count = 0; res; res = res->ai_next, count++) { ++ memcpy(&client_sin, res->ai_addr, res->ai_addrlen); ++ ++ /* ++ * getnameinfo() doesn't do reverse lookup against link-local ++ * address. So, we pass through host name evaluation against ++ * such addresses. ++ */ ++ if (res->ai_family != AF_INET6 || ++ !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) { ++ /* ++ * Force evaluation of client host name and address. Host name ++ * conflicts will be reported while eval_hostname() does its job. ++ */ ++ request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0); ++ if (STR_EQ(eval_hostname(request.client), unknown)) ++ tcpd_warn("host address %s->name lookup failed", ++ eval_hostaddr(request.client)); ++ } ++ tcpdmatch(&request); ++ if (res->ai_next) ++ printf("\n"); ++ } ++ freeaddrinfo(hp); ++#else + memset((char *) &client_sin, 0, sizeof(client_sin)); + client_sin.sin_family = AF_INET; + request_set(&request, RQ_CLIENT_SIN, &client_sin, 0); +@@ -250,6 +310,7 @@ + printf("\n"); + } + free((char *) hp); ++#endif + exit(0); + } + +diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c +--- tcp_wrappers_7.6.orig/tli.c 1997-03-21 19:27:26.000000000 +0100 ++++ tcp_wrappers_7.6/tli.c 2004-04-10 19:07:43.000000000 +0200 +@@ -65,8 +65,13 @@ + void tli_host(request) + struct request_info *request; + { ++#ifdef INET6 ++ static struct sockaddr_storage client; ++ static struct sockaddr_storage server; ++#else + static struct sockaddr_in client; + static struct sockaddr_in server; ++#endif + + /* + * If we discover that we are using an IP transport, pretend we never +@@ -76,14 +81,29 @@ + + tli_endpoints(request); + if ((request->config = tli_transport(request->fd)) != 0 ++#ifdef INET6 ++ && (STR_EQ(request->config->nc_protofmly, "inet") || ++ STR_EQ(request->config->nc_protofmly, "inet6"))) { ++#else + && STR_EQ(request->config->nc_protofmly, "inet")) { ++#endif + if (request->client->unit != 0) { ++#ifdef INET6 ++ client = *(struct sockaddr_storage *) request->client->unit->addr.buf; ++ request->client->sin = (struct sockaddr *) &client; ++#else + client = *(struct sockaddr_in *) request->client->unit->addr.buf; + request->client->sin = &client; ++#endif + } + if (request->server->unit != 0) { ++#ifdef INET6 ++ server = *(struct sockaddr_storage *) request->server->unit->addr.buf; ++ request->server->sin = (struct sockaddr *) &server; ++#else + server = *(struct sockaddr_in *) request->server->unit->addr.buf; + request->server->sin = &server; ++#endif + } + tli_cleanup(request); + sock_methods(request); +@@ -187,7 +207,15 @@ + } + while (config = getnetconfig(handlep)) { + if (stat(config->nc_device, &from_config) == 0) { ++#ifdef NO_CLONE_DEVICE ++ /* ++ * If the network devices are not cloned (as is the case for ++ * Solaris 8 Beta), we must compare the major device numbers. ++ */ ++ if (major(from_config.st_rdev) == major(from_client.st_rdev)) ++#else + if (minor(from_config.st_rdev) == major(from_client.st_rdev)) ++#endif + break; + } + } +diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c +--- tcp_wrappers_7.6.orig/update.c 1994-12-28 17:42:56.000000000 +0100 ++++ tcp_wrappers_7.6/update.c 2004-04-10 19:07:43.000000000 +0200 +@@ -46,10 +46,18 @@ + request->fd = va_arg(ap, int); + continue; + case RQ_CLIENT_SIN: ++#ifdef INET6 ++ request->client->sin = va_arg(ap, struct sockaddr *); ++#else + request->client->sin = va_arg(ap, struct sockaddr_in *); ++#endif + continue; + case RQ_SERVER_SIN: ++#ifdef INET6 ++ request->server->sin = va_arg(ap, struct sockaddr *); ++#else + request->server->sin = va_arg(ap, struct sockaddr_in *); ++#endif + continue; + + /* +diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c +--- tcp_wrappers_7.6.orig/workarounds.c 1996-03-19 16:22:26.000000000 +0100 ++++ tcp_wrappers_7.6/workarounds.c 2004-04-10 19:07:43.000000000 +0200 +@@ -166,11 +166,22 @@ + int *len; + { + int ret; ++#ifdef INET6 ++ struct sockaddr *sin = sa; ++#else + struct sockaddr_in *sin = (struct sockaddr_in *) sa; ++#endif + + if ((ret = getpeername(sock, sa, len)) >= 0 ++#ifdef INET6 ++ && ((sin->su_si.si_family == AF_INET6 ++ && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr)) ++ || (sin->su_si.si_family == AF_INET ++ && sin->su_sin.sin_addr.s_addr == 0))) { ++#else + && sa->sa_family == AF_INET + && sin->sin_addr.s_addr == 0) { ++#endif + errno = ENOTCONN; + return (-1); + } else { diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch new file mode 100644 index 0000000000..226106f4ff --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch @@ -0,0 +1,153 @@ +Upstream-Status: Backport + +Path: news.porcupine.org!news.porcupine.org!not-for-mail +From: Wietse Venema +Newsgroups: comp.mail.sendmail,comp.security.unix +Subject: TCP Wrapper Blacklist Extension +Followup-To: poster +Date: 8 Sep 1997 18:53:13 -0400 +Organization: Wietse's hangout while on sabattical in the USA +Lines: 147 +Sender: wietse@spike.porcupine.org +Message-ID: <5v1vkp$h4f$1@spike.porcupine.org> +NNTP-Posting-Host: spike.porcupine.org +Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158 + +The patch below adds a new host pattern to the TCP Wrapper access +control language. Instead of a host name or address pattern, you +can specify an external /file/name with host name or address +patterns. The feature can be used recursively. + +The /file/name extension makes it easy to blacklist bad sites, for +example, to block unwanted electronic mail when libwrap is linked +into sendmail. Adding hosts to a simple text file is much easier +than having to edit a more complex hosts.allow/deny file. + +I developed this a year or so ago as a substitute for NIS netgroups. +At that time, I did not consider it of sufficient interest for +inclusion in the TCP Wrapper distribution. How times have changed. + +The patch is relative to TCP Wrappers version 7.6. The main archive +site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz + +Thanks to the Debian LINUX folks for expressing their interest in +this patch. + + Wietse + + +[diff updated by Md] + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-10 19:28:09.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.5 2004-04-10 19:28:01.000000000 +0200 +@@ -97,6 +97,13 @@ + `[3ffe:505:2:1::]/64\' matches every address in the range + `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'. + .IP \(bu ++A string that begins with a `/\' character is treated as a file ++name. A host name or address is matched if it matches any host name ++or address pattern listed in the named file. The file format is ++zero or more lines with zero or more host name or address patterns ++separated by whitespace. A file name pattern can be used anywhere ++a host name or address pattern can be used. ++.IP \(bu + Wildcards `*\' and `?\' can be used to match hostnames or IP addresses. This + method of matching cannot be used in conjunction with `net/mask\' matching, + hostname matching beginning with `.\' or IP address matching ending with `.\'. +diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c +--- tcp_wrappers_7.6.orig/hosts_access.c 2004-04-10 19:28:09.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.c 2004-04-10 19:27:05.000000000 +0200 +@@ -253,6 +253,26 @@ + } + } + ++/* hostfile_match - look up host patterns from file */ ++ ++static int hostfile_match(path, host) ++char *path; ++struct hosts_info *host; ++{ ++ char tok[BUFSIZ]; ++ int match = NO; ++ FILE *fp; ++ ++ if ((fp = fopen(path, "r")) != 0) { ++ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host))) ++ /* void */ ; ++ fclose(fp); ++ } else if (errno != ENOENT) { ++ tcpd_warn("open %s: %m", path); ++ } ++ return (match); ++} ++ + /* host_match - match host name and/or address against pattern */ + + static int host_match(tok, host) +@@ -280,6 +300,8 @@ + tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */ + return (NO); + #endif ++ } else if (tok[0] == '/') { /* /file hack */ ++ return (hostfile_match(tok, host)); + } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */ + char *name = eval_hostname(host); + return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name)); +diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c +--- tcp_wrappers_7.6.orig/tcpdchk.c 2004-04-10 19:28:09.000000000 +0200 ++++ tcp_wrappers_7.6/tcpdchk.c 2004-04-10 19:27:05.000000000 +0200 +@@ -353,6 +353,8 @@ + { + if (pat[0] == '@') { + tcpd_warn("%s: daemon name begins with \"@\"", pat); ++ } else if (pat[0] == '/') { ++ tcpd_warn("%s: daemon name begins with \"/\"", pat); + } else if (pat[0] == '.') { + tcpd_warn("%s: daemon name begins with dot", pat); + } else if (pat[strlen(pat) - 1] == '.') { +@@ -385,6 +387,8 @@ + { + if (pat[0] == '@') { /* @netgroup */ + tcpd_warn("%s: user name begins with \"@\"", pat); ++ } else if (pat[0] == '/') { ++ tcpd_warn("%s: user name begins with \"/\"", pat); + } else if (pat[0] == '.') { + tcpd_warn("%s: user name begins with dot", pat); + } else if (pat[strlen(pat) - 1] == '.') { +@@ -430,8 +434,13 @@ + static int check_host(pat) + char *pat; + { ++ char buf[BUFSIZ]; + char *mask; + int addr_count = 1; ++ FILE *fp; ++ struct tcpd_context saved_context; ++ char *cp; ++ char *wsp = " \t\r\n"; + + if (pat[0] == '@') { /* @netgroup */ + #ifdef NO_NETGRENT +@@ -450,6 +459,21 @@ + tcpd_warn("netgroup support disabled"); + #endif + #endif ++ } else if (pat[0] == '/') { /* /path/name */ ++ if ((fp = fopen(pat, "r")) != 0) { ++ saved_context = tcpd_context; ++ tcpd_context.file = pat; ++ tcpd_context.line = 0; ++ while (fgets(buf, sizeof(buf), fp)) { ++ tcpd_context.line++; ++ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp)) ++ check_host(cp); ++ } ++ tcpd_context = saved_context; ++ fclose(fp); ++ } else if (errno != ENOENT) { ++ tcpd_warn("open %s: %m", pat); ++ } + } else if (mask = split_at(pat, '/')) { /* network/netmask */ + #ifdef INET6 + int mask_len; diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch new file mode 100644 index 0000000000..260e8d3138 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch @@ -0,0 +1,47 @@ +Upstream-Status: Backport + +diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c +--- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002 ++++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002 +@@ -448,6 +448,15 @@ + int len, mask_len, i = 0; + char ch; + ++ /* ++ * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is ++ * different between KAME and Solaris8. While KAME returns ++ * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here. ++ */ ++ if (STRN_EQ(string, "::ffff:", 7) ++ && dot_quad_addr(string + 7) != INADDR_NONE) ++ return (masked_match4(net_tok, mask_tok, string + 7)); ++ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_STREAM; +@@ -457,13 +466,6 @@ + memcpy(&addr, res->ai_addr, sizeof(addr)); + freeaddrinfo(res); + +- if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) { +- if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE +- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) +- return (NO); +- return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]); +- } +- + /* match IPv6 address against netnumber/prefixlen */ + len = strlen(net_tok); + if (*net_tok != '[' || net_tok[len - 1] != ']') +diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c +--- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002 ++++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002 +@@ -228,7 +228,7 @@ + hints.ai_family = sin->sa_family; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST; +- if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) { ++ if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) { + freeaddrinfo(res0); + res0 = NULL; + tcpd_warn("host name/name mismatch: " diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch new file mode 100644 index 0000000000..e8289e44d9 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch @@ -0,0 +1,83 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile +--- tcp_wrappers_7.6.orig/Makefile 2003-08-21 01:43:39.000000000 +0200 ++++ tcp_wrappers_7.6/Makefile 2003-08-21 01:43:35.000000000 +0200 +@@ -45,7 +45,7 @@ + # + # SysV.4 Solaris 2.x OSF AIX + #REAL_DAEMON_DIR=/usr/sbin +-# ++REAL_DAEMON_DIR=/usr/sbin + # BSD 4.4 + #REAL_DAEMON_DIR=/usr/libexec + # +@@ -512,6 +519,7 @@ + # (examples: allow, deny, banners, twist and spawn). + # + #STYLE = -DPROCESS_OPTIONS # Enable language extensions. ++STYLE = -DPROCESS_OPTIONS + + ################################################################ + # Optional: Changing the default disposition of logfile records +@@ -535,6 +543,7 @@ + # The LOG_XXX names below are taken from the /usr/include/syslog.h file. + + FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use ++FACILITY= LOG_DAEMON + + # The syslog priority at which successful connections are logged. + +@@ -631,6 +640,7 @@ + # lookups altogether, see the next section. + + PARANOID= -DPARANOID ++PARANOID= + + ######################################## + # Optional: turning off hostname lookups +@@ -644,6 +654,7 @@ + # mode (see previous section) and comment out the following definition. + + HOSTNAME= -DALWAYS_HOSTNAME ++HOSTNAME= + + ############################################# + # Optional: Turning on host ADDRESS checking +@@ -670,6 +681,7 @@ + # Solaris 2.x, and Linux. See your system documentation for details. + # + # KILL_OPT= -DKILL_IP_OPTIONS ++KILL_OPT= -DKILL_IP_OPTIONS + + ## End configuration options + ############################ +@@ -677,9 +689,10 @@ + # Protection against weird shells or weird make programs. + + SHELL = /bin/sh +-.c.o:; $(CC) $(CFLAGS) -c $*.c ++.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c + +-CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ ++COPTS = -O2 -g ++CFLAGS = $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ + $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ + -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ + -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ +@@ -712,10 +725,11 @@ + + config-check: + @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } +- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ +- if cmp cflags /tmp/cflags.$$$$ ; \ +- then rm /tmp/cflags.$$$$ ; \ +- else mv /tmp/cflags.$$$$ cflags ; \ ++ @set +e; echo $(CFLAGS) >cflags.new ; \ ++ if cmp cflags cflags.new ; \ ++ then rm cflags.new ; \ ++ else mv cflags.new cflags ; \ + fi >/dev/null 2>/dev/null ++ @if [ ! -d shared ]; then mkdir shared; fi + + $(LIB): $(LIB_OBJ) diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch new file mode 100644 index 0000000000..bd1396bc79 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch @@ -0,0 +1,255 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile +--- tcp_wrappers_7.6.orig/Makefile 2004-05-02 15:37:59.000000000 +0200 ++++ tcp_wrappers_7.6/Makefile 2004-05-02 15:31:09.000000000 +0200 +@@ -150,15 +150,15 @@ + + linux: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ +- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ ++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ + NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \ +- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all + + gnu: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ +- LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \ ++ LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ + NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \ +- EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all ++ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all + + # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. + hpux hpux8 hpux9 hpux10: +@@ -713,7 +713,22 @@ + + LIB = libwrap.a + +-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk ++shared/%.o: %.c ++ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@ ++ ++SOMAJOR = 0 ++SOMINOR = 7.6 ++ ++SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR) ++SHLIBSOMAJ = shared/libwrap.so.$(SOMAJOR) ++SHLIBSO = shared/libwrap.so ++SHLIBFLAGS = -Lshared -lwrap ++ ++SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS) ++SHCFLAGS = -fPIC -shared -D_REENTRANT ++SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ)); ++ ++all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB) + + # Invalidate all object files when the compiler options (CFLAGS) have changed. + +@@ -731,27 +746,33 @@ + $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) + -$(RANLIB) $(LIB) + +-tcpd: tcpd.o $(LIB) +- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) ++$(SHLIB): $(SHLIB_OBJ) ++ rm -f $(SHLIB) ++ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) ++ ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ) ++ ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) ++ ++tcpd: tcpd.o $(SHLIB) ++ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) + + miscd: miscd.o $(LIB) + $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) + +-safe_finger: safe_finger.o $(LIB) +- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) ++safe_finger: safe_finger.o $(SHLIB) ++ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) + + TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o + +-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) +- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) ++tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) ++ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) + +-try-from: try-from.o fakelog.o $(LIB) +- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) ++try-from: try-from.o fakelog.o $(SHLIB) ++ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) + + TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o + +-tcpdchk: $(TCPDCHK_OBJ) $(LIB) +- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) ++tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) ++ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) + + shar: $(KIT) + @shar $(KIT) +@@ -767,7 +788,9 @@ + + clean: + rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ ++ libwrap*.so* \ + cflags ++ rm -rf shared/ + + tidy: clean + chmod -R a+r . +@@ -913,5 +936,6 @@ + update.o: mystdarg.h + update.o: tcpd.h + vfprintf.o: cflags ++weak_symbols.o: tcpd.h + workarounds.o: cflags + workarounds.o: tcpd.h +diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h +--- tcp_wrappers_7.6.orig/tcpd.h 2004-05-02 15:37:59.000000000 +0200 ++++ tcp_wrappers_7.6/tcpd.h 2004-05-02 15:37:49.000000000 +0200 +@@ -4,6 +4,15 @@ + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ + ++#ifndef _TCPWRAPPERS_TCPD_H ++#define _TCPWRAPPERS_TCPD_H ++ ++/* Need definitions of struct sockaddr_in and FILE. */ ++#include ++#include ++ ++__BEGIN_DECLS ++ + /* Structure to describe one communications endpoint. */ + + #define STRING_LENGTH 128 /* hosts, users, processes */ +@@ -29,10 +38,10 @@ + char pid[10]; /* access via eval_pid(request) */ + struct host_info client[1]; /* client endpoint info */ + struct host_info server[1]; /* server endpoint info */ +- void (*sink) (); /* datagram sink function or 0 */ +- void (*hostname) (); /* address to printable hostname */ +- void (*hostaddr) (); /* address to printable address */ +- void (*cleanup) (); /* cleanup function or 0 */ ++ void (*sink) (int); /* datagram sink function or 0 */ ++ void (*hostname) (struct host_info *); /* address to printable hostname */ ++ void (*hostaddr) (struct host_info *); /* address to printable address */ ++ void (*cleanup) (struct request_info *); /* cleanup function or 0 */ + struct netconfig *config; /* netdir handle */ + }; + +@@ -70,20 +79,27 @@ + #define fromhost sock_host /* no TLI support needed */ + #endif + +-extern int hosts_access(); /* access control */ +-extern void shell_cmd(); /* execute shell command */ +-extern char *percent_x(); /* do % expansion */ +-extern void rfc931(); /* client name from RFC 931 daemon */ +-extern void clean_exit(); /* clean up and exit */ +-extern void refuse(); /* clean up and exit */ +-extern char *xgets(); /* fgets() on steroids */ +-extern char *split_at(); /* strchr() and split */ +-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ ++extern int hosts_access(struct request_info *request); /* access control */ ++extern void shell_cmd(char *); /* execute shell command */ ++extern char *percent_x(char *, int, char *, struct request_info *); ++ /* do % expansion */ ++extern void rfc931(struct sockaddr *, struct sockaddr *, char *); ++ /* client name from RFC 931 daemon */ ++extern void clean_exit(struct request_info *); /* clean up and exit */ ++extern void refuse(struct request_info *); /* clean up and exit */ ++extern char *xgets(char *, int, FILE *); /* fgets() on steroids */ ++extern char *split_at(char *, int); /* strchr() and split */ ++extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */ + + /* Global variables. */ + ++#ifdef HAVE_WEAKSYMS ++extern int allow_severity __attribute__ ((weak)); /* for connection logging */ ++extern int deny_severity __attribute__ ((weak)); /* for connection logging */ ++#else + extern int allow_severity; /* for connection logging */ + extern int deny_severity; /* for connection logging */ ++#endif + extern char *hosts_allow_table; /* for verification mode redirection */ + extern char *hosts_deny_table; /* for verification mode redirection */ + extern int hosts_access_verbose; /* for verbose matching mode */ +@@ -98,6 +114,8 @@ + #ifdef __STDC__ + extern struct request_info *request_init(struct request_info *,...); + extern struct request_info *request_set(struct request_info *,...); ++extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, ++ char *client_user); + #else + extern struct request_info *request_init(); /* initialize request */ + extern struct request_info *request_set(); /* update request structure */ +@@ -121,20 +139,23 @@ + * host_info structures serve as caches for the lookup results. + */ + +-extern char *eval_user(); /* client user */ +-extern char *eval_hostname(); /* printable hostname */ +-extern char *eval_hostaddr(); /* printable host address */ +-extern char *eval_hostinfo(); /* host name or address */ +-extern char *eval_client(); /* whatever is available */ +-extern char *eval_server(); /* whatever is available */ ++extern char *eval_user(struct request_info *); /* client user */ ++extern char *eval_hostname(struct host_info *); /* printable hostname */ ++extern char *eval_hostaddr(struct host_info *); /* printable host address */ ++extern char *eval_hostinfo(struct host_info *); /* host name or address */ ++extern char *eval_client(struct request_info *);/* whatever is available */ ++extern char *eval_server(struct request_info *);/* whatever is available */ + #define eval_daemon(r) ((r)->daemon) /* daemon process name */ + #define eval_pid(r) ((r)->pid) /* process id */ + + /* Socket-specific methods, including DNS hostname lookups. */ + +-extern void sock_host(); /* look up endpoint addresses */ +-extern void sock_hostname(); /* translate address to hostname */ +-extern void sock_hostaddr(); /* address to printable address */ ++/* look up endpoint addresses */ ++extern void sock_host(struct request_info *); ++/* translate address to hostname */ ++extern void sock_hostname(struct host_info *); ++/* address to printable address */ ++extern void sock_hostaddr(struct host_info *); + #define sock_methods(r) \ + { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } + +@@ -182,7 +203,7 @@ + * behavior. + */ + +-extern void process_options(); /* execute options */ ++extern void process_options(char *, struct request_info *);/* execute options */ + extern int dry_run; /* verification flag */ + + /* Bug workarounds. */ +@@ -221,3 +242,7 @@ + #define strtok my_strtok + extern char *my_strtok(); + #endif ++ ++__END_DECLS ++ ++#endif +diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c +--- tcp_wrappers_7.6.orig/weak_symbols.c 1970-01-01 01:00:00.000000000 +0100 ++++ tcp_wrappers_7.6/weak_symbols.c 2004-05-02 15:31:09.000000000 +0200 +@@ -0,0 +1,11 @@ ++ /* ++ * @(#) weak_symbols.h 1.5 99/12/29 23:50 ++ * ++ * Author: Anthony Towns ++ */ ++ ++#ifdef HAVE_WEAKSYMS ++#include ++int deny_severity = LOG_WARNING; ++int allow_severity = SEVERITY; ++#endif diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch new file mode 100644 index 0000000000..eb5685c576 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch @@ -0,0 +1,68 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2003-08-21 03:15:36.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.5 2003-08-21 03:15:31.000000000 +0200 +@@ -90,6 +90,10 @@ + pattern `131.155.72.0/255.255.254.0\' matches every address in the + range `131.155.72.0\' through `131.155.73.255\'. + .IP \(bu ++An expression of the form `n.n.n.n/mm' is interpreted as a ++`net/masklength' pair, where `mm' is the number of consecutive `1' ++bits in the netmask applied to the `n.n.n.n' address. ++.IP \(bu + An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a + `[net]/prefixlen\' pair. An IPv6 host address is matched if + `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the +diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c +--- tcp_wrappers_7.6.orig/hosts_access.c 2003-08-21 03:15:36.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.c 2003-08-21 03:09:30.000000000 +0200 +@@ -417,7 +417,8 @@ + if ((addr = dot_quad_addr(string)) == INADDR_NONE) + return (NO); + if ((net = dot_quad_addr(net_tok)) == INADDR_NONE +- || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) { ++ || ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE ++ && (mask = cidr_mask_addr(mask_tok)) == 0)) { + #ifndef INET6 + tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok); + #endif +diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c +--- tcp_wrappers_7.6.orig/misc.c 2003-08-21 03:15:36.000000000 +0200 ++++ tcp_wrappers_7.6/misc.c 2003-08-21 03:09:30.000000000 +0200 +@@ -107,3 +107,17 @@ + } + return (runs == 4 ? inet_addr(str) : INADDR_NONE); + } ++ ++/* cidr_mask_addr - convert cidr netmask length to internal form */ ++ ++unsigned long cidr_mask_addr(str) ++char *str; ++{ ++ int maskbits; ++ ++ maskbits = atoi(str); ++ if (maskbits < 1 || maskbits > 32) ++ return (0); ++ return htonl(0xFFFFFFFF << (32 - maskbits)); ++} ++ +diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c +--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 03:15:36.000000000 +0200 ++++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 03:09:30.000000000 +0200 +@@ -497,12 +497,12 @@ + int mask_len; + + if ((dot_quad_addr(pat) == INADDR_NONE +- || dot_quad_addr(mask) == INADDR_NONE) ++ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0) + && (!is_inet6_addr(pat) + || ((mask_len = atoi(mask)) < 0 || mask_len > 128))) + #else + if (dot_quad_addr(pat) == INADDR_NONE +- || dot_quad_addr(mask) == INADDR_NONE) ++ || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0) + #endif + tcpd_warn("%s/%s: bad net/mask pattern", pat, mask); + } else if (STR_EQ(pat, "FAIL")) { /* obsolete */ diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch new file mode 100644 index 0000000000..3ca6874119 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch @@ -0,0 +1,14 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2004-04-25 12:17:59.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.5 2004-04-25 12:17:53.000000000 +0200 +@@ -89,6 +89,8 @@ + bitwise AND of the address and the `mask\'. For example, the net/mask + pattern `131.155.72.0/255.255.254.0\' matches every address in the + range `131.155.72.0\' through `131.155.73.255\'. ++`255.255.255.255\' is not a valid mask value, so a single host can be ++matched just by its IP. + .IP \(bu + An expression of the form `n.n.n.n/mm' is interpreted as a + `net/masklength' pair, where `mm' is the number of consecutive `1' diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch new file mode 100644 index 0000000000..3087377976 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch @@ -0,0 +1,73 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c +--- tcp_wrappers_7.6.orig/eval.c 1995-01-30 19:51:46.000000000 +0100 ++++ tcp_wrappers_7.6/eval.c 2004-11-04 13:59:01.000000000 +0100 +@@ -98,6 +98,28 @@ + } + } + ++/* eval_port - return string with the port */ ++char *eval_port(saddr) ++#ifdef INET6 ++struct sockaddr *saddr; ++#else ++struct sockaddr_in *saddr; ++#endif ++{ ++ static char port[16]; ++ if (saddr != 0) { ++ sprintf(port, "%u", ++#ifdef INET6 ++ ntohs(((struct sockaddr_in *)saddr)->sin_port)); ++#else ++ ntohs(saddr->sin_port)); ++#endif ++ } else { ++ strcpy(port, "0"); ++ } ++ return (port); ++} ++ + /* eval_client - return string with as much about the client as we know */ + + char *eval_client(request) +diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5 +--- tcp_wrappers_7.6.orig/hosts_access.5 2004-11-04 13:17:45.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.5 2004-11-04 13:55:32.000000000 +0100 +@@ -175,6 +175,8 @@ + unavailable. + .IP "%n (%N)" + The client (server) host name (or "unknown" or "paranoid"). ++.IP "%r (%R)" ++The clients (servers) port number (or "0"). + .IP %p + The daemon process id. + .IP %s +diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c +--- tcp_wrappers_7.6.orig/percent_x.c 1994-12-28 17:42:38.000000000 +0100 ++++ tcp_wrappers_7.6/percent_x.c 2004-11-04 13:19:29.000000000 +0100 +@@ -63,6 +63,8 @@ + ch == 'n' ? eval_hostname(request->client) : + ch == 'N' ? eval_hostname(request->server) : + ch == 'p' ? eval_pid(request) : ++ ch == 'r' ? eval_port(request->client->sin) : ++ ch == 'R' ? eval_port(request->server->sin) : + ch == 's' ? eval_server(request) : + ch == 'u' ? eval_user(request) : + ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), ""); +diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h +--- tcp_wrappers_7.6.orig/tcpd.h 2004-11-04 13:17:45.000000000 +0100 ++++ tcp_wrappers_7.6/tcpd.h 2004-11-04 13:19:13.000000000 +0100 +@@ -145,6 +145,11 @@ + extern char *eval_hostinfo(struct host_info *); /* host name or address */ + extern char *eval_client(struct request_info *);/* whatever is available */ + extern char *eval_server(struct request_info *);/* whatever is available */ ++#ifdef INET6 ++extern char *eval_port(struct sockaddr *); ++#else ++extern char *eval_port(struct sockaddr_in *); ++#endif + #define eval_daemon(r) ((r)->daemon) /* daemon process name */ + #define eval_pid(r) ((r)->pid) /* process id */ + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch new file mode 100644 index 0000000000..4cc554fc38 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch @@ -0,0 +1,21 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c +--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100 ++++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200 +@@ -29,11 +29,15 @@ + + while (*bp = *cp) + if (*cp == '%' && cp[1] == 'm') { ++#ifdef HAVE_STRERROR ++ strcpy(bp, strerror(errno)); ++#else + if (errno < sys_nerr && errno > 0) { + strcpy(bp, sys_errlist[errno]); + } else { + sprintf(bp, "Unknown error %d", errno); + } ++#endif + bp += strlen(bp); + cp += 2; + } else { diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch new file mode 100644 index 0000000000..3ba214d241 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch @@ -0,0 +1,45 @@ +Upstream-Status: Backport + +Index: tcp_wrappers_7.6.orig/Makefile +=================================================================== +--- tcp_wrappers_7.6.orig.orig/Makefile 2009-04-06 10:55:47.000000000 +0000 ++++ tcp_wrappers_7.6.orig/Makefile 2009-04-06 10:57:04.000000000 +0000 +@@ -748,31 +748,31 @@ + + $(SHLIB): $(SHLIB_OBJ) + rm -f $(SHLIB) +- $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) ++ $(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) + ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ) + ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) + + tcpd: tcpd.o $(SHLIB) +- $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) + + miscd: miscd.o $(LIB) +- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS) + + safe_finger: safe_finger.o $(SHLIB) +- $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) + + TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o + + tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) +- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) + + try-from: try-from.o fakelog.o $(SHLIB) +- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) + + TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o + + tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) +- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) + + shar: $(KIT) + @shar $(KIT) diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch new file mode 100644 index 0000000000..19bd7d3c0f --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch @@ -0,0 +1,23 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3 +--- tcp_wrappers_7.6.orig/hosts_access.3 2004-04-25 00:10:48.000000000 +0200 ++++ tcp_wrappers_7.6/hosts_access.3 2004-04-25 00:09:36.000000000 +0200 +@@ -14,6 +14,9 @@ + struct request_info *request_set(request, key, value, ..., 0) + struct request_info *request; + ++void fromhost(request) ++struct request_info *request; ++ + int hosts_access(request) + struct request_info *request; + +@@ -60,6 +63,7 @@ + is available, host names and client user names are looked up on demand, + using the request structure as a cache. hosts_access() returns zero if + access should be denied. ++fromhost() must be called before hosts_access(). + .PP + hosts_ctl() is a wrapper around the request_init() and hosts_access() + routines with a perhaps more convenient interface (though it does not diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/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 @@ +STRINGS name conflicts with variable for strings tools (e.g. i586-oe-linux-strings) + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa + +--- tcp_wrappers_7.6/Makefile.orig 2013-04-18 23:41:58.277981740 +0200 ++++ tcp_wrappers_7.6/Makefile 2013-04-18 23:42:42.513978966 +0200 +@@ -309,7 +309,7 @@ + pyramid: + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \ +- STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \ ++ STRINGS_FLAGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \ + NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all + + # Untested. +@@ -419,7 +419,7 @@ + # Uncomment the following if your C library does not provide the + # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp. + # +-#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy ++#STRINGS_FLAGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy + + ################################################################# + # System dependencies: selection of non-default object libraries. +@@ -690,7 +690,7 @@ + $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ + -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ + -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ +- $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ ++ $(UCHAR) $(TABLES) $(STRINGS_FLAGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ + $(VSYSLOG) $(HOSTNAME) + + 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 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c +--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200 ++++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200 +@@ -92,6 +92,8 @@ + char *cp; + char *result = unknown; + FILE *fp; ++ unsigned saved_timeout; ++ struct sigaction nact, oact; + + #ifdef INET6 + /* address family must be the same */ +@@ -134,7 +136,12 @@ + */ + + if (setjmp(timebuf) == 0) { +- signal(SIGALRM, timeout); ++ /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ ++ saved_timeout = alarm(0); ++ nact.sa_handler = timeout; ++ nact.sa_flags = 0; ++ (void) sigemptyset(&nact.sa_mask); ++ (void) sigaction(SIGALRM, &nact, &oact); + alarm(rfc931_timeout); + + /* +@@ -223,6 +230,10 @@ + } + alarm(0); + } ++ /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ ++ (void) sigaction(SIGALRM, &oact, NULL); ++ if (saved_timeout > 0) ++ alarm(saved_timeout); + fclose(fp); + } + STRN_CPY(dest, result, STRING_LENGTH); diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff new file mode 100644 index 0000000000..723f4f136a --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff @@ -0,0 +1,41 @@ +Upstream-Status: Backport + +diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c +--- tcp_wrappers_7.6.orig/scaffold.c 2005-03-09 18:22:04.000000000 +0100 ++++ tcp_wrappers_7.6/scaffold.c 2005-03-09 18:20:47.000000000 +0100 +@@ -237,10 +237,17 @@ struct request_info *request; + + /* ARGSUSED */ + +-void rfc931(request) +-struct request_info *request; ++void rfc931(rmt_sin, our_sin, dest) ++#ifdef INET6 ++struct sockaddr *rmt_sin; ++struct sockaddr *our_sin; ++#else ++struct sockaddr_in *rmt_sin; ++struct sockaddr_in *our_sin; ++#endif ++char *dest; + { +- strcpy(request->user, unknown); ++ strcpy(dest, unknown); + } + + /* check_path - examine accessibility */ +diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h +--- tcp_wrappers_7.6.orig/tcpd.h 2005-03-09 18:22:04.000000000 +0100 ++++ tcp_wrappers_7.6/tcpd.h 2005-03-09 18:21:23.000000000 +0100 +@@ -83,7 +83,11 @@ extern int hosts_access(struct request_i + extern void shell_cmd(char *); /* execute shell command */ + extern char *percent_x(char *, int, char *, struct request_info *); + /* do % expansion */ ++#ifdef INET6 + extern void rfc931(struct sockaddr *, struct sockaddr *, char *); ++#else ++extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *); ++#endif + /* client name from RFC 931 daemon */ + extern void clean_exit(struct request_info *); /* clean up and exit */ + extern void refuse(struct request_info *); /* clean up and exit */ diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 new file mode 100644 index 0000000000..875616b9ea --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 @@ -0,0 +1,34 @@ +.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual" +.SH NAME +safe_finger \- finger client wrapper that protects against nasty stuff +from finger servers +.SH SYNOPSIS +.B safe_finger [finger_options] +.SH DESCRIPTION +The +.B safe_finger +command protects against nasty stuff from finger servers. Use this +program for automatic reverse finger probes from the +.B tcp_wrapper +.B (tcpd) +, not the raw finger command. The +.B safe_finger +command makes sure that the finger client is not run with root +privileges. It also runs the finger client with a defined PATH +environment. +.B safe_finger +will also protect you from problems caused by the output of some +finger servers. The problem: some programs may react to stuff in +the first column. Other programs may get upset by thrash anywhere +on a line. File systems may fill up as the finger server keeps +sending data. Text editors may bomb out on extremely long lines. +The finger server may take forever because it is somehow wedged. +.B safe_finger +takes care of all this badness. +.SH SEE ALSO +.BR hosts_access (5), +.BR hosts_options (5), +.BR tcpd (8) +.SH AUTHOR +Wietse Venema, Eindhoven University of Technology, The Netherlands. + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch new file mode 100644 index 0000000000..fc2afeef15 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch @@ -0,0 +1,31 @@ +Upstream-Status: Backport + +--- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c ++++ tcp-wrappers-7.6-ipv6.1/safe_finger.c +@@ -26,21 +26,24 @@ + #include + #include + #include ++#include + + extern void exit(); + + /* Local stuff */ + +-char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin"; ++char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin"; + + #define TIME_LIMIT 60 /* Do not keep listinging forever */ + #define INPUT_LENGTH 100000 /* Do not keep listinging forever */ + #define LINE_LENGTH 128 /* Editors can choke on long lines */ + #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */ + #define UNPRIV_NAME "nobody" /* Preferred privilege level */ +-#define UNPRIV_UGID 32767 /* Default uid and gid */ ++#define UNPRIV_UGID 65534 /* Default uid and gid */ + + int finger_pid; ++int allow_severity = SEVERITY; ++int deny_severity = LOG_WARNING; + + void cleanup(sig) + int sig; diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch new file mode 100644 index 0000000000..9d7ea042b2 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch @@ -0,0 +1,36 @@ +Upstream-Status: Backport + +* Mon Feb 10 2003 Harald Hoyer 7.6-29 +- added security patch tcp_wrappers-7.6-sig.patch + +--- tcp_wrappers_7.6/hosts_access.c.sig 2003-02-10 16:18:31.000000000 +0100 ++++ tcp_wrappers_7.6/hosts_access.c 2003-02-10 16:50:38.000000000 +0100 +@@ -66,6 +66,7 @@ + + #define YES 1 + #define NO 0 ++#define ERR -1 + + /* + * These variables are globally visible so that they can be redirected in +@@ -129,9 +129,9 @@ + return (verdict == AC_PERMIT); + if (table_match(hosts_allow_table, request)) + return (YES); +- if (table_match(hosts_deny_table, request)) +- return (NO); +- return (YES); ++ if (table_match(hosts_deny_table, request) == NO) ++ return (YES); ++ return (NO); + } + + /* table_match - match table entries with (daemon, client) pair */ +@@ -175,6 +175,7 @@ + (void) fclose(fp); + } else if (errno != ENOENT) { + tcpd_warn("cannot open %s: %m", table); ++ match = ERR; + } + if (match) { + if (hosts_access_verbose > 1) diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch new file mode 100644 index 0000000000..76dd6340b2 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch @@ -0,0 +1,32 @@ +Upstream-Status: Backport + +diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c +--- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:42:25.000000000 +0200 ++++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:41:04.000000000 +0200 +@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1. + + int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */ + +-static jmp_buf timebuf; ++static sigjmp_buf timebuf; + + /* fsocket - open stdio stream on top of socket */ + +@@ -62,7 +62,7 @@ int protocol; + static void timeout(sig) + int sig; + { +- longjmp(timebuf, sig); ++ siglongjmp(timebuf, sig); + } + + /* rfc931 - return remote user name, given socket structures */ +@@ -135,7 +135,7 @@ char *dest; + * Set up a timer so we won't get stuck while waiting for the server. + */ + +- if (setjmp(timebuf) == 0) { ++ if (sigsetjmp(timebuf, 0) == 0) { + /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ + saved_timeout = alarm(0); + nact.sa_handler = timeout; diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/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 @@ +commit 88b6984ef0bf3b703c1c851092662b95e91db1ff +Author: farrah rashid +Date: Tue Feb 12 09:53:50 2013 -0500 + + tcp-wrappers Support for building with glibc + + Added support for socklen_t type to len argument passed to socket related + calls. This fixes a bug that causes tcp wrappers to fail when using sshd. + + Upstream-Status: Pending + + Signed-off-by: farrah rashid + +diff --git a/fix_options.c b/fix_options.c +index 7473adf..fe2b442 100644 +--- a/fix_options.c ++++ b/fix_options.c +@@ -38,7 +38,12 @@ struct request_info *request; + #ifdef IP_OPTIONS + unsigned char optbuf[BUFFER_SIZE / 3], *cp; + char lbuf[BUFFER_SIZE], *lp; +- int optsize = sizeof(optbuf), ipproto; ++#ifdef __GLIBC__ ++ socklen_t optsize = sizeof(optbuf); ++#else ++ int optsize = sizeof(optbuf); ++#endif ++ int ipproto; + struct protoent *ip; + int fd = request->fd; + unsigned int opt; +diff --git a/socket.c b/socket.c +index 4b2c575..a0d2987 100644 +--- a/socket.c ++++ b/socket.c +@@ -95,7 +95,11 @@ struct request_info *request; + static struct sockaddr_in client; + static struct sockaddr_in server; + #endif ++#ifdef __GLIBC__ ++ socklen_t len; ++#else + int len; ++#endif + char buf[BUFSIZ]; + int fd = request->fd; + +@@ -426,7 +430,11 @@ int fd; + #else + struct sockaddr_in sin; + #endif ++#ifdef __GLIBC__ ++ socklen_t size = sizeof(sin); ++#else + int size = sizeof(sin); ++#endif + + /* + * Eat up the not-yet received datagram. Some systems insist on a diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch new file mode 100644 index 0000000000..be29bdcfaa --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch @@ -0,0 +1,41 @@ +Upstream-Status: Backport + +diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c +--- tcp_wrappers_7.6.orig/tcpdchk.c 2003-08-21 02:50:37.000000000 +0200 ++++ tcp_wrappers_7.6/tcpdchk.c 2003-08-21 02:50:33.000000000 +0200 +@@ -53,6 +53,24 @@ + #include "inetcf.h" + #include "scaffold.h" + ++/* list of programs which are known to be linked with libwrap in debian */ ++static const char *const libwrap_programs[] = { ++ "portmap", "mountd", "statd", "ugidd", ++ "redir", "rlinetd", ++ "sshd", ++ "atftpd", ++ "diald", ++ "esound", ++ "gdm", "gnome-session", ++ "icecast", "icecast_admin", "icecast_client", "icecast_source", ++ "mysqld", ++ "ntop", ++ "pptpd", ++ "rquotad", ++ "sendmail", "smail", ++ NULL ++}; ++ + /* + * Stolen from hosts_access.c... + */ +@@ -147,8 +165,8 @@ + /* + * These are not run from inetd but may have built-in access control. + */ +- inet_set("portmap", WR_NOT); +- inet_set("rpcbind", WR_NOT); ++ for (c = 0; libwrap_programs[c]; c++) ++ inet_set(libwrap_programs[c], WR_YES); + + /* + * Check accessibility of access control files. diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 new file mode 100644 index 0000000000..9c8f30543e --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 @@ -0,0 +1,28 @@ +.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual" +.SH NAME +try-from \- test program for the tcp_wrapper +.SH SYNOPSIS +.B try-from +.SH DESCRIPTION +The +.B try-from +command can be called via a remote shell command to find out +if the hostname and address are properly recognized +by the +.B tcp_wrapper +library, if username lookup works, and (SysV only) if the TLI +on top of IP heuristics work. Diagnostics are reported through +.BR syslog (3) +and redirected to stderr. + +Example: + +rsh host /some/where/try-from + +.SH SEE ALSO +.BR hosts_access (5), +.BR hosts_options (5), +.BR tcpd (8) +.SH AUTHOR +Wietse Venema, Eindhoven University of Technology, The Netherlands. + diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb new file mode 100644 index 0000000000..4d6430634e --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -0,0 +1,128 @@ +SUMMARY = "Security tool that is a wrapper for TCP daemons" +DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ + services." +SECTION = "console/network" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" +PR ="r10" + + +PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" +FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" +FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" +FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" +FILES_libwrap-staticdev = "${libdir}/lib*.a" +FILES_${PN} = "${sbindir}" +FILES_${PN}-doc = "${mandir}/man8" + +SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ + file://00_man_quoting.diff \ + file://01_man_portability.patch \ + file://05_wildcard_matching.patch \ + file://06_fix_gethostbyname.patch \ + file://10_usagi-ipv6.patch \ + file://11_tcpd_blacklist.patch \ + file://11_usagi_fix.patch \ + file://12_makefile_config.patch \ + file://13_shlib_weaksym.patch \ + file://14_cidr_support.patch \ + file://15_match_clarify.patch \ + file://expand_remote_port.patch \ + file://have_strerror.patch \ + file://man_fromhost.patch \ + file://restore_sigalarm.patch \ + file://rfc931.diff \ + file://safe_finger.patch \ + file://sig_fix.patch \ + file://siglongjmp.patch \ + file://socklen_t.patch \ + file://tcpdchk_libwrapped.patch \ + file://ldflags.patch \ + file://rename_strings_variable.patch \ + \ + file://try-from.8 \ + file://safe_finger.8" + +SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" +SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d" + +S = "${WORKDIR}/tcp_wrappers_${PV}" + +PARALLEL_MAKE = "" +EXTRA_OEMAKE = "'CC=${CC}' \ + 'AR=${AR}' \ + 'RANLIB=${RANLIB}' \ + 'REAL_DAEMON_DIR=${sbindir}' \ + 'STYLE=-DPROCESS_OPTIONS' \ + 'FACILITY=LOG_DAEMON' \ + 'SEVERITY=LOG_INFO' \ + 'BUGS=' \ + 'VSYSLOG=' \ + 'RFC931_TIMEOUT=10' \ + 'ACCESS=-DHOSTS_ACCESS' \ + 'KILL_OPT=-DKILL_IP_OPTIONS' \ + 'UMASK=-DDAEMON_UMASK=022' \ + 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \ + 'LIBS=-lnsl' \ + 'ARFLAGS=rv' \ + 'AUX_OBJ=weak_symbols.o' \ + 'TLI=' \ + 'COPTS=' \ + 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" + +EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" +EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN" + +do_compile () { + oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ + all +} + +BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch" +MANS3 = "hosts_access" +MANS5 = "hosts_options" +MANS8 = "tcpd tcpdchk tcpdmatch" +do_install () { + oe_libinstall -a libwrap ${D}${libdir} + oe_libinstall -C shared -so libwrap ${D}${base_libdir} + + if [ "${libdir}" != "${base_libdir}" ] ; then + rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'` + libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename` + ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so + rm -f ${D}${base_libdir}/libwrap.so + fi + + install -d ${D}${sbindir} + for b in ${BINS}; do + install -m 0755 $b ${D}${sbindir}/ || exit 1 + done + + install -d ${D}${mandir}/man3 + for m in ${MANS3}; do + install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1 + done + + install -d ${D}${mandir}/man5 + for m in ${MANS5}; do + install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1 + done + + install -d ${D}${mandir}/man8 + for m in ${MANS8}; do + install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1 + done + + install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/ + install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/ + + install -d ${D}${includedir} + install -m 0644 tcpd.h ${D}${includedir}/ + + install -d ${D}${sysconfdir} + touch ${D}${sysconfdir}/hosts.allow + touch ${D}${sysconfdir}/hosts.deny +} + +FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" 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 @@ + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Saul Wold + +Index: texi2html-5.0/po_document/Makefile.in.in +=================================================================== +--- texi2html-5.0.orig/po_document/Makefile.in.in ++++ texi2html-5.0/po_document/Makefile.in.in +@@ -9,7 +9,7 @@ + # General Public License and is *not* in the public domain. + # + # Origin: gettext-0.17 +-GETTEXT_MACRO_VERSION = 0.17 ++GETTEXT_MACRO_VERSION = 0.18 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ +Index: texi2html-5.0/po_messages/Makefile.in.in +=================================================================== +--- texi2html-5.0.orig/po_messages/Makefile.in.in ++++ texi2html-5.0/po_messages/Makefile.in.in +@@ -9,7 +9,7 @@ + # General Public License and is *not* in the public domain. + # + # Origin: gettext-0.17 +-GETTEXT_MACRO_VERSION = 0.17 ++GETTEXT_MACRO_VERSION = 0.18 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ 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..aa5f1fddaf --- /dev/null +++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Perl script that converts Texinfo to HTML" +HOMEPAGE = "http://www.nongnu.org/texi2html/" +SECTION = "console/utils" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +PR = "r2" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \ + file://fix_gettext_version.patch" + +SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54" +SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa" + +inherit autotools gettext texinfo + +do_configure_prepend() { + # Make a directory for the old gettext setup + if [ ! -d ${S}/po ]; then + mkdir ${S}/po + fi +} + +do_configure_append() { + # Clean up the phony po directory + rm -rf ${S}/po +} + +do_install_append () { + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html +} + +FILES_${PN}-doc += "${datadir}/texinfo" diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb new file mode 100644 index 0000000000..b5420a3e5f --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Fake version of the texinfo utility suite" +SECTION = "console/utils" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb" +DEPENDS = "" +PV = "1.0" + +SRC_URI = "file://template.py file://COPYING" + +S = "${WORKDIR}" + +NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}" + +inherit native + +do_install_name() { + FILENAME="${D}${bindir}/$1" + # Using ln causes problems with rm_work + cp -T "${S}/template.py" "$FILENAME" + chmod +x $FILENAME +} + +do_install() { + mkdir -p "${D}${bindir}" + for i in makeinfo pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ + txixml2texi texi2any install-info ginstall-info \ + update-info-dir; do + do_install_name $i + done +} diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING new file mode 100644 index 0000000000..531cbe723d --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING @@ -0,0 +1,19 @@ +Copyright (c) 2014 Intel Corp. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py new file mode 100644 index 0000000000..8b7033eccc --- /dev/null +++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py @@ -0,0 +1,122 @@ +#! /usr/bin/env python2.7 + +# template.py (and other filenames) +# By Max Eliaser (max.eliaser@intel.com) + +# Copyright (c) 2014 Intel Corp. + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# This program acts like a dummy version of the texinfo utilities, creating +# the right output files but leaving them blank. It will parse out the name +# of the executable from argv[0] and emulate the corresponding program, so +# multiple copies of this script will exist under different names. + +import sys, os + +olong = "--output=" +Elong = "--macro-expand=" + + +this_binary = sys.argv[0].split ("/")[-1] + +# To be outputted if functionality that hasn't been stubbed yet is invoked. +stub_msg = """ +This stand-in version of %s is not yet fully capable of emulating the real +version from the GNU texinfo suite. If you see this message, file a bug report +with details on the recipe that failed. +""" % this_binary + +# Autotools setups query the version, so this is actually necessary. Some of +# them (lookin' at you, glibc) actually look for the substring "GNU texinfo," +# so we put that substring in there without actually telling a lie. +version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2 + +Super amazing version which is totally not fake in any way whatsoever. +Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT +license. +""" % this_binary + +simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \ + txixml2texi install-info ginstall-info \ + update-info-dir".split () + +# These utilities use a slightly different set of options and flags. +complex_binaries = "makeinfo texi2any".split () + +valid_binaries = simple_binaries + complex_binaries + +# For generating blank output files. +def touch_file (path): + f = open (path, "w") + f.close () + +assert this_binary in valid_binaries, \ + this_binary + " is not one of " + ', '.join (valid_binaries) + +if "--version" in sys.argv: + print version_str + sys.exit (0) + +# For debugging +log_interceptions = False +if log_interceptions: + f = open ("/tmp/intercepted_" + this_binary, "a") + f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n') + f.close () + +# Look through the options and flags, and if necessary, touch any output +# files. +arg_idx = 1 +while arg_idx < len (sys.argv): + arg = sys.argv [arg_idx] + + if arg == "--": + break + + # Something like -I . can result in a need for this (specifically the .) + elif len (arg) < 2: + pass + + # Check if -o or --output is specified. These can be used at most once. + elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o': + touch_file (sys.argv[arg_idx + 1]) + sys.exit (0) + elif arg.startswith (olong): + touch_file (arg.split ("=")[1]) + sys.exit (0) + + # Check for functionality that isn't implemented yet. + else: + assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \ + this_binary in simple_binaries, \ + "-E option not yet supported" + stub_msg + + assert not arg.startswith (Elong), \ + Elong[:-1] + " option not yet supported" + stub_msg + + arg_idx += 1 + +# The -o/--output option overrides the default. For makeinfo and texi2any, +# that default is to look for a @setfilename command in the input file. +# Otherwise, printing nothing to stdout and then exiting should suffice. +assert this_binary in simple_binaries, \ + "Don't know how to get default output file name from input file!" + \ + stub_msg + 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 @@ +We already DEPEND on the native texinfo being present before building so +there isn't any need to try and build the required native texinfo binaries +before cross-compiling. This simplifies the recipe somewhat! + +Upstream-Status: Inappropriate oe specific + +Signed-off-by: Joshua Lock + +Index: texinfo-4.13/configure.ac +=================================================================== +--- texinfo-4.13.orig/configure.ac ++++ texinfo-4.13/configure.ac +@@ -100,29 +100,7 @@ AC_CANONICAL_BUILD + # $native_tools is also added to SUBDIRS in the main Makefile.am, + # so that make compiles the native tools first. + # +-if test "$cross_compiling" = no; then +- native_tools= +-else +- native_tools=tools +- test -d "$native_tools" || mkdir "$native_tools" +- confdir=`(cd "$srcdir";pwd)` +- # Make sure the secondary configure won't fail with +- # "error: source directory already configured". +- rm -f config.status +- AC_MSG_NOTICE([[Doing configure of native tools (${build}).]]) +- cd "$native_tools" || exit 1 +- # Run secondary configure in alternate environment or +- # it gets the wrong CC etc. +- # env -i gives this build host configure a clean environment; +- # consequently, we have to re-initialize $PATH. +- env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \ +- PATH="$PATH" \ +- tools_only=1 \ +- ${confdir}/configure --build=${build} --host=${build} \ +- --disable-rpath --disable-nls +- cd .. || exit 1 +- AC_MSG_NOTICE([[Continuing with main configure (${host}).]]) +-fi ++native_tools= + AC_SUBST(native_tools) + AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]]) + diff --git a/meta/recipes-extended/texinfo/texinfo/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 @@ +Upstream-Status: InappropÅ•iate + +Signed-off-by: Marko Lindqvist +diff -Nurd texinfo-5.1/doc/Makefile.am texinfo-5.1/doc/Makefile.am +--- texinfo-5.1/doc/Makefile.am 2013-02-23 02:11:25.000000000 +0200 ++++ texinfo-5.1/doc/Makefile.am 2013-08-20 01:43:55.622376198 +0300 +@@ -40,7 +40,7 @@ + # Include our texinfo.tex, not Automake's. + EXTRA_DIST = epsf.tex texinfo.tex \ + fdl.texi \ +- $(man_MANS) $(TXI_XLATE) \ ++ $(TXI_XLATE) \ + $(refcard_files) + + if INSTALL_WARNINGS +diff -Nurd texinfo-5.1/man/Makefile.am texinfo-5.1/man/Makefile.am +--- texinfo-5.1/man/Makefile.am 2013-02-23 02:11:25.000000000 +0200 ++++ texinfo-5.1/man/Makefile.am 2013-08-20 01:53:40.542395884 +0300 +@@ -13,24 +13,24 @@ + # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + # These are generated using help2man. +-man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1 ++#man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1 + + # These require the build in info/, thus can't do if we failed to find a + # terminal library. + if HAVE_TERMLIBS +-man_MANS += info.1 infokey.1 ++#man_MANS += info.1 infokey.1 + endif + + # These are hand-written. +-man_MANS += info.5 texinfo.5 ++#man_MANS += info.5 texinfo.5 + + # This is generated by pod2man, but let's just run it by hand. +-man_MANS += pod2texi.1 ++#man_MANS += pod2texi.1 + + # These are just .so's to the common program. +-man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 ++#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1 + +-EXTRA_DIST = $(man_MANS) ginfo.h2m ++EXTRA_DIST = ginfo.h2m + + # Maintainers should be able to regenerate. + 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 @@ +From 0e70072ce655a0d053bb7433083ced5e6eac74d4 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Thu, 15 Aug 2013 23:49:47 -0700 +Subject: [PATCH] handle correctly @enumerate specification greater than 10 + +Upstream-Status: Backport + +Revision: 5270 + http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5270 +Author: pertusus +Date: 2013-07-29 20:02:23 +0000 (Mon, 29 Jul 2013) +Log Message: +----------- + * tp/Common.pm (enumerate_item_representation), Texinfo/Parser.pm: + handle correctly @enumerate specification greater than 10. Report + from Dmitry Shachnev. + +--- + tp/Texinfo/Common.pm | 2 +- + tp/Texinfo/Parser.pm | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm +index 8aee9f7..bdffeee 100644 +--- a/tp/Texinfo/Common.pm ++++ b/tp/Texinfo/Common.pm +@@ -1382,7 +1382,7 @@ sub enumerate_item_representation($$) + my $specification = shift; + my $number = shift; + +- if ($specification =~ /^[0-9]$/) { ++ if ($specification =~ /^[0-9]+$/) { + return $specification + $number -1; + } + +diff --git a/tp/Texinfo/Parser.pm b/tp/Texinfo/Parser.pm +index cf8fa72..8e845e9 100644 +--- a/tp/Texinfo/Parser.pm ++++ b/tp/Texinfo/Parser.pm +@@ -2973,7 +2973,7 @@ sub _end_line($$$) + $current->{'cmdname'}); + } + my $arg = $current->{'extra'}->{'block_command_line_contents'}->[0]->[0]; +- if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^[[:alnum:]]$/) { ++ if (!defined($arg->{'text'}) or $arg->{'text'} !~ /^(([[:digit:]]+)|([[:alpha:]]+))$/) { + $self->_command_error($current, $line_nr, + $self->__("bad argument to \@%s"), + $current->{'cmdname'}); +-- +1.7.1 + 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 @@ +install-info uses symbols from zlib so must link against it. + +Upstream-Status: Pending + +Signed-off-by: Joshua Lock + +Index: texinfo-5.1/install-info/Makefile.am +=================================================================== +--- texinfo-5.1.orig/install-info/Makefile.am ++++ texinfo-5.1/install-info/Makefile.am +@@ -34,4 +34,4 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/gnulib/lib \ + -I$(top_builddir)/gnulib/lib \ + -DLOCALEDIR=\"$(localedir)\" +-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) ++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 @@ +Upstream-Status: Pending + +Index: texinfo-5.1/install-info/Makefile.in +=================================================================== +--- texinfo-5.1.orig/install-info/Makefile.in ++++ texinfo-5.1/install-info/Makefile.in +@@ -171,7 +171,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" + PROGRAMS = $(bin_PROGRAMS) + am_ginstall_info_OBJECTS = install-info.$(OBJEXT) + ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS) +-ginstall_info_LDADD = $(LDADD) ++ginstall_info_LDADD = $(LDADD) -lz + am__DEPENDENCIES_1 = + ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \ + $(am__DEPENDENCIES_1) +Index: texinfo-5.1/install-info/install-info.c +=================================================================== +--- texinfo-5.1.orig/install-info/install-info.c ++++ texinfo-5.1/install-info/install-info.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #define TAB_WIDTH 8 + +@@ -670,7 +671,7 @@ The first time you invoke Info you start + + MAGIC number, not the filename. */ + +-FILE * ++void * + open_possibly_compressed_file (char *filename, + void (*create_callback) (char *), + char **opened_filename, char **compression_program, int *is_pipe) +@@ -678,7 +679,7 @@ open_possibly_compressed_file (char *fil + char *local_opened_filename, *local_compression_program; + int nread; + char data[13]; +- FILE *f; ++ gzFile *f; + + /* We let them pass NULL if they don't want this info, but it's easier + to always determine it. */ +@@ -686,48 +687,48 @@ open_possibly_compressed_file (char *fil + opened_filename = &local_opened_filename; + + *opened_filename = filename; +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + { + *opened_filename = concat (filename, ".gz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".xz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".bz2", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".lz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".lzma", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + #ifdef __MSDOS__ + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".igz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + if (!f) + { + free (*opened_filename); + *opened_filename = concat (filename, ".inz", ""); +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + } + #endif /* __MSDOS__ */ + if (!f) +@@ -739,7 +740,7 @@ open_possibly_compressed_file (char *fil + /* And try opening it again. */ + free (*opened_filename); + *opened_filename = filename; +- f = fopen (*opened_filename, FOPEN_RBIN); ++ f = gzopen (*opened_filename, FOPEN_RBIN); + if (!f) + pfatal_with_name (filename); + } +@@ -749,12 +750,12 @@ open_possibly_compressed_file (char *fil + + /* Read first few bytes of file rather than relying on the filename. + If the file is shorter than this it can't be usable anyway. */ +- nread = fread (data, sizeof (data), 1, f); +- if (nread != 1) ++ nread = gzread (f, data, sizeof (data)); ++ if (nread != sizeof (data)) + { + /* Empty files don't set errno, so we get something like + "install-info: No error for foo", which is confusing. */ +- if (nread == 0) ++ if (nread >= 0) + fatal (_("%s: empty file"), *opened_filename); + pfatal_with_name (*opened_filename); + } +@@ -821,20 +822,22 @@ open_possibly_compressed_file (char *fil + + if (*compression_program) + { /* It's compressed, so fclose the file and then open a pipe. */ ++ FILE *p; + char *command = concat (*compression_program," -cd <", *opened_filename); +- if (fclose (f) < 0) ++ if (gzclose (f) < 0) + pfatal_with_name (*opened_filename); +- f = popen (command, "r"); +- if (f) ++ p = popen (command, "r"); ++ if (p) + *is_pipe = 1; + else + pfatal_with_name (command); ++ return p; + } + else + { /* It's a plain file, seek back over the magic bytes. */ +- if (fseek (f, 0, 0) < 0) ++ if (gzseek (f, 0, SEEK_SET) < 0) + pfatal_with_name (*opened_filename); +-#if O_BINARY ++#if 0 && O_BINARY + /* Since this is a text file, and we opened it in binary mode, + switch back to text mode. */ + f = freopen (*opened_filename, "r", f); +@@ -859,7 +862,7 @@ readfile (char *filename, int *sizep, + char **compression_program) + { + char *real_name; +- FILE *f; ++ void *f; + int pipe_p; + int filled = 0; + int data_size = 8192; +@@ -873,7 +876,12 @@ readfile (char *filename, int *sizep, + + for (;;) + { +- int nread = fread (data + filled, 1, data_size - filled, f); ++ int nread; ++ ++ if (pipe_p) ++ nread = fread (data + filled, 1, data_size - filled, f); ++ else ++ nread = gzread (f, data + filled, data_size - filled); + if (nread < 0) + pfatal_with_name (real_name); + if (nread == 0) +@@ -895,7 +903,7 @@ readfile (char *filename, int *sizep, + if (pipe_p) + pclose (f); + else +- fclose (f); ++ gzclose (f); + + *sizep = filled; + return data; diff --git a/meta/recipes-extended/texinfo/texinfo/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 @@ +Upstream-Status: Pending + +diff -up texinfo-4.13/install-info/install-info.c.patch texinfo-4.13/install-info/install-info.c +--- texinfo-4.13/install-info/install-info.c.patch 2010-01-11 14:46:32.000000000 +0100 ++++ texinfo-4.13/install-info/install-info.c 2010-01-11 14:48:47.162152695 +0100 +@@ -772,7 +772,7 @@ open_possibly_compressed_file (char *fil + } + else + { /* It's a plain file, seek back over the magic bytes. */ +- if (gzseek (f, 0, SEEK_SET) < 0) ++ if (gzseek (f, 0, SEEK_SET) == -1) + pfatal_with_name (*opened_filename); + #if 0 && O_BINARY + /* Since this is a text file, and we opened it in binary mode, diff --git a/meta/recipes-extended/texinfo/texinfo/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 @@ +Upstream-Status: Inappropriate [cross build specific] + +Signed-off-by: Saul Wold + +Index: texinfo-5.1/info/Makefile.am +=================================================================== +--- texinfo-5.1.orig/info/Makefile.am ++++ texinfo-5.1/info/Makefile.am +@@ -76,7 +76,7 @@ cmd_sources = $(srcdir)/session.c $(srcd + # more than once. + funs.h: makedoc$(EXEEXT) $(cmd_sources) + rm -f $(generated_sources) +- $(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources) ++ makedoc $(cmd_sources) + + # The following hack is necessary to hint make before the automatic + # dependencies are built. 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..cf9dcfd5de --- /dev/null +++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb @@ -0,0 +1,77 @@ +SUMMARY = "Documentation system for on-line information and printed output" +DESCRIPTION = "Texinfo is a documentation system that can produce both \ +online information and printed output from a single source file. The \ +GNU Project uses the Texinfo file format for most of its documentation." +HOMEPAGE = "http://www.gnu.org/software/texinfo/" +SECTION = "console/utils" +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +PROVIDES_append_class-native = " texinfo-replacement-native" + +def compress_pkg(d): + if "compress_doc" in (d.getVar("INHERIT", True) or "").split(): + compress = d.getVar("DOC_COMPRESS", True) + if compress == "gz": + return "gzip" + elif compress == "bz2": + return "bzip2" + elif compress == "xz": + return "xz" + return "" + +RDEPENDS_info += "${@compress_pkg(d)}" + +DEPENDS = "zlib ncurses texinfo-replacement-native" +DEPENDS_class-native = "zlib-native ncurses-native" + +TARGET_PATCH = "file://use_host_makedoc.patch" +TARGET_PATCH_class-native = "" + +SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ + file://texinfo-4.12-zlib.patch \ + file://texinfo-4.13a-powerpc.patch \ + file://disable-native-tools.patch \ + file://link-zip.patch \ + file://dont-depend-on-help2man.patch \ + ${TARGET_PATCH} \ + " + +SRC_URI[md5sum] = "1b8f98b80a8e6c50422125e07522e8db" +SRC_URI[sha256sum] = "6b8ca30e9b6f093b54fe04439e5545e564c63698a806a48065c0bba16994cf74" + +S = "${WORKDIR}/${BP}" +tex_texinfo = "texmf/tex/texinfo" + +inherit gettext autotools + +do_compile_prepend() { + if [ -d tools ];then + oe_runmake -C tools/gnulib/lib + fi +} + +do_install_append() { + mkdir -p ${D}${datadir}/${tex_texinfo} + install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi +} + +do_install_append_class-native() { + install -m 755 info/makedoc ${D}${bindir} +} + +PACKAGES += "info info-doc" + +FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" +FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \ + ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ + ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" + +FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo" +RDEPENDS_${PN} = "perl" +FILES_${PN}-doc = "${infodir}/texinfo* \ + ${datadir}/${tex_texinfo} \ + ${mandir}/man1 ${mandir}/man5" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch new file mode 100644 index 0000000000..23ea0e3eb9 --- /dev/null +++ b/meta/recipes-extended/time/time-1.7/debian.patch @@ -0,0 +1,1301 @@ +Upstream-Status: Backport + +--- time-1.7.orig/configure.in ++++ time-1.7/configure.in +@@ -1,11 +1,8 @@ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(time.c) +-VERSION=1.7 +-AC_SUBST(VERSION) +-PACKAGE=time +-AC_SUBST(PACKAGE) ++AM_INIT_AUTOMAKE(time, 1.7) + +-AC_ARG_PROGRAM ++AM_MAINTAINER_MODE + + dnl Checks for programs. + AC_PROG_CC +@@ -15,7 +12,7 @@ + dnl Checks for header files. + AC_HEADER_STDC + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h) ++AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h) + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +--- time-1.7.orig/version.texi ++++ time-1.7/version.texi +@@ -1,3 +1,3 @@ +-@set UPDATED 12 June 1996 ++@set UPDATED 9 May 2002 + @set EDITION 1.7 + @set VERSION 1.7 +--- time-1.7.orig/time.c ++++ time-1.7/time.c +@@ -147,6 +147,10 @@ + NULL + }; + ++ ++/* If true, do not show the exit message */ ++static boolean quiet; ++ + /* If true, show an English description next to each statistic. */ + static boolean verbose; + +@@ -172,6 +176,7 @@ + {"help", no_argument, NULL, 'h'}, + {"output-file", required_argument, NULL, 'o'}, + {"portability", no_argument, NULL, 'p'}, ++ {"quiet", no_argument,NULL, 'q'}, + {"verbose", no_argument, NULL, 'v'}, + {"version", no_argument, NULL, 'V'}, + {NULL, no_argument, NULL, 0} +@@ -333,7 +338,8 @@ + else if (WIFSIGNALED (resp->waitstatus)) + fprintf (fp, "Command terminated by signal %d\n", + WTERMSIG (resp->waitstatus)); +- else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)) ++ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus) ++ && !quiet) + fprintf (fp, "Command exited with non-zero status %d\n", + WEXITSTATUS (resp->waitstatus)); + +@@ -523,6 +529,7 @@ + char *format; /* Format found in environment. */ + + /* Initialize the option flags. */ ++ quiet = false; + verbose = false; + outfile = NULL; + outfp = stderr; +@@ -536,7 +543,7 @@ + if (format) + output_format = format; + +- while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0)) ++ while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0)) + != EOF) + { + switch (optc) +@@ -555,6 +562,9 @@ + case 'p': + output_format = posix_format; + break; ++ case 'q': ++ quiet = true; ++ break; + case 'v': + verbose = true; + break; +@@ -642,9 +652,9 @@ + fflush (outfp); + + if (WIFSTOPPED (res.waitstatus)) +- exit (WSTOPSIG (res.waitstatus)); ++ exit (WSTOPSIG (res.waitstatus) + 128); + else if (WIFSIGNALED (res.waitstatus)) +- exit (WTERMSIG (res.waitstatus)); ++ exit (WTERMSIG (res.waitstatus) + 128); + else if (WIFEXITED (res.waitstatus)) + exit (WEXITSTATUS (res.waitstatus)); + } +@@ -657,7 +667,7 @@ + fprintf (stream, "\ + Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\ + [--portability] [--format=format] [--output=file] [--version]\n\ +- [--help] command [arg...]\n", ++ [--quiet] [--help] command [arg...]\n", + program_name); + exit (status); + } +--- time-1.7.orig/resuse.h ++++ time-1.7/resuse.h +@@ -36,19 +36,8 @@ + # include + #else + # define TV_MSEC tv_usec / 1000 +-# if HAVE_WAIT3 ++# if HAVE_SYS_RESOURCE_H + # include +-# else +-/* Process resource usage structure. */ +-struct rusage +-{ +- struct timeval ru_utime; /* User time used. */ +- struct timeval ru_stime; /* System time used. */ +- int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss, +- ru_minflt, ru_majflt, ru_nswap, ru_inblock, +- ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals, +- ru_nvcsw, ru_nivcsw; +-}; + # endif + #endif + +--- time-1.7.orig/time.texi ++++ time-1.7/time.texi +@@ -11,6 +11,12 @@ + @finalout + @end iftex + ++@dircategory Individual utilities ++@direntry ++* time: (time). Run programs and summarize ++ system resource usage. ++@end direntry ++ + @ifinfo + This file documents the the GNU @code{time} command for running programs + and summarizing the system resources they use. +@@ -185,6 +191,10 @@ + sys %S + @end example + ++@item -q ++@itemx --quiet ++Suppress non-zero error code from the executed program. ++ + @item -v + @itemx --verbose + @cindex format +--- time-1.7.orig/time.info ++++ time-1.7/time.info +@@ -1,5 +1,10 @@ +-This is Info file ./time.info, produced by Makeinfo-1.55 from the input +-file time.texi. ++This is time.info, produced by makeinfo version 4.1 from time.texi. ++ ++INFO-DIR-SECTION Individual utilities ++START-INFO-DIR-ENTRY ++* time: (time). Run programs and summarize ++ system resource usage. ++END-INFO-DIR-ENTRY + + This file documents the the GNU `time' command for running programs + and summarizing the system resources they use. +@@ -31,7 +36,7 @@ + + * Resource Measurement:: Measuring program resource use. + +- -- The Detailed Node Listing -- ++ --- The Detailed Node Listing --- + + Measuring Program Resource Use + +@@ -58,14 +63,14 @@ + The `time' command runs another program, then displays information + about the resources used by that program, collected by the system while + the program was running. You can select which information is reported +-and the format in which it is shown (*note Setting Format::.), or have ++and the format in which it is shown (*note Setting Format::), or have + `time' save the information in a file instead of displaying it on the +-screen (*note Redirecting::.). ++screen (*note Redirecting::). + + The resources that `time' can report on fall into the general + categories of time, memory, and I/O and IPC calls. Some systems do not + provide much information about program resource use; `time' reports +-unavailable information as zero values (*note Accuracy::.). ++unavailable information as zero values (*note Accuracy::). + + The format of the `time' command is: + +@@ -132,6 +137,10 @@ + user %U + sys %S + ++`-q' ++`--quiet' ++ Suppress non-zero error code from the executed program. ++ + `-v' + `--verbose' + Use the built-in verbose format, which displays each available +@@ -174,7 +183,7 @@ + The resource specifiers, which are a superset of those recognized by + the `tcsh' builtin `time' command, are listed below. Not all resources + are measured by all versions of Unix, so some of the values might be +-reported as zero (*note Accuracy::.). ++reported as zero (*note Accuracy::). + + * Menu: + +@@ -308,11 +317,11 @@ + `-o FILE' + `--output=FILE' + Write the resource use statistics to FILE. By default, this +- *overwrites* the file, destroying the file's previous contents. ++ _overwrites_ the file, destroying the file's previous contents. + + `-a' + `--append' +- *Append* the resource use information to the output file instead ++ _Append_ the resource use information to the output file instead + of overwriting it. This option is only useful with the `-o' or + `--output' option. + +@@ -437,7 +446,7 @@ + + `-a' + `--append' +- *Append* the resource use information to the output file instead ++ _Append_ the resource use information to the output file instead + of overwriting it. + + `-f FORMAT' +@@ -462,17 +471,17 @@ + +  + Tag Table: +-Node: Top934 +-Node: Resource Measurement1725 +-Node: Setting Format3678 +-Node: Format String4907 +-Node: Time Resources6214 +-Node: Memory Resources6844 +-Node: I/O Resources7549 +-Node: Command Info8747 +-Node: Redirecting8964 +-Node: Examples9754 +-Node: Accuracy12064 +-Node: Invoking time13586 ++Node: Top1115 ++Node: Resource Measurement1908 ++Node: Setting Format3858 ++Node: Format String5164 ++Node: Time Resources6470 ++Node: Memory Resources7100 ++Node: I/O Resources7805 ++Node: Command Info9003 ++Node: Redirecting9220 ++Node: Examples10010 ++Node: Accuracy12320 ++Node: Invoking time13842 +  + End Tag Table +--- time-1.7.orig/time.html ++++ time-1.7/time.html +@@ -0,0 +1,1021 @@ ++ ++ ++ ++ ++ ++Measuring Program Resource Use ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[Top][Contents][Index][ ? ]
++

Measuring Program Resource Use

++ ++

++ ++This file documents the the GNU time command for running programs ++and summarizing the system resources they use. ++This is edition 1.7, for version 1.7. ++

++

++ ++

++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
1. Measuring Program Resource Use  Measuring program resource use.
++
-- The Detailed Node Listing --- ++
++
Measuring Program Resource Use ++
++
1.1 Setting the Output Format  Selecting the information reported by time.
1.2 The Format String  The information time can report.
1.3 Redirecting Output  Writing the information to a file.
1.4 Examples  Examples of using time.
1.5 Accuracy  Limitations on the accuracy of time output.
1.6 Running the time Command  Summary of the options to the time command.
++
The Format String ++
++
1.2.1 Time Resources  
1.2.2 Memory Resources  
1.2.3 I/O Resources  
1.2.4 Command Info  
++

++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++ ++

1. Measuring Program Resource Use

++ ++

++ ++The time command runs another program, then displays information ++about the resources used by that program, collected by the system while ++the program was running. You can select which information is reported ++and the format in which it is shown (see section 1.1 Setting the Output Format), or have ++time save the information in a file instead of displaying it on the ++screen (see section 1.3 Redirecting Output). ++

++

++ ++The resources that time can report on fall into the general ++categories of time, memory, and I/O and IPC calls. Some systems do not ++provide much information about program resource use; time ++reports unavailable information as zero values (see section 1.5 Accuracy). ++

++

++ ++The format of the time command is: ++

++

++ ++
 
time [option...] command [arg...]
++

++ ++ ++time runs the program command, with any given arguments ++arg.... When command finishes, time displays ++information about resources used by command. ++

++

++ ++Here is an example of using time to measure the time and other ++resources used by running the program grep: ++

++

++ ++
 
eg$ time grep nobody /etc/aliases
++nobody:/dev/null
++etc-files:nobody
++misc-group:nobody
++0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
++46inputs+7outputs (43major+251minor)pagefaults 0swaps
++

++ ++Mail suggestions and bug reports for GNU time to ++bug-gnu-utils@prep.ai.mit.edu. Please include the version of ++time, which you can get by running `time --version', and the ++operating system and C compiler you used. ++

++

++ ++ ++ ++ ++ ++ ++ ++ ++
1.1 Setting the Output Format  Selecting the information reported by time.
1.2 The Format String  The information time can report.
1.3 Redirecting Output  Writing the information to a file.
1.4 Examples  Examples of using time.
1.5 Accuracy  Limitations on the accuracy of time output.
1.6 Running the time Command  Summary of the options to the time command.
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.1 Setting the Output Format

++ ++

++ ++time uses a format string to determine which information to ++display about the resources used by the command it runs. See section 1.2 The Format String, for the interpretation of the format string contents. ++

++

++ ++You can specify a format string with the command line options listed ++below. If no format is specified on the command line, but the ++TIME environment variable is set, its value is used as the format ++string. Otherwise, the default format built into time is used: ++

++

++ ++
 
%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
++%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
++

++ ++The command line options to set the format are: ++

++

++ ++

++
++
-f format ++
--format=format ++
Use format as the format string. ++

++ ++

++
-p ++
--portability ++
Use the following format string, for conformance with POSIX standard ++1003.2: ++

++ ++
 
real %e
++user %U
++sys %S
++

++ ++

++
-q ++
--quiet ++
Suppress non-zero error code from the executed program. ++

++ ++

++
-v ++
--verbose ++
++Use the built-in verbose format, which displays each available piece of ++information on the program's resource use on its own line, with an ++English description of its meaning. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.2 The Format String

++ ++

++ ++ ++ ++The format string controls the contents of the time output. ++It consists of resource specifiers and escapes, interspersed ++with plain text. ++

++

++ ++A backslash introduces an escape, which is translated ++into a single printing character upon output. The valid escapes are ++listed below. An invalid escape is output as a question mark followed ++by a backslash. ++

++

++ ++

++
++
\t ++
a tab character ++

++ ++

++
\n ++
a newline ++

++ ++

++
\\ ++
a literal backslash ++
++

++ ++time always prints a newline after printing the resource use ++information, so normally format strings do not end with a newline ++character (or `\n'). ++

++

++ ++A resource specifier consists of a percent sign followed by another ++character. An invalid resource specifier is output as a question mark ++followed by the invalid character. Use `%%' to output a literal ++percent sign. ++

++

++ ++The resource specifiers, which are a superset of those recognized by the ++tcsh builtin time command, are listed below. Not all ++resources are measured by all versions of Unix, so some of the values ++might be reported as zero (see section 1.5 Accuracy). ++

++

++ ++ ++ ++ ++ ++ ++
1.2.1 Time Resources  
1.2.2 Memory Resources  
1.2.3 I/O Resources  
1.2.4 Command Info  
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.2.1 Time Resources

++ ++

++ ++

++
++
E ++
Elapsed real (wall clock) time used by the process, in ++[hours:]minutes:seconds. ++

++ ++

++
e ++
Elapsed real (wall clock) time used by the process, in ++seconds. ++

++ ++

++
S ++
Total number of CPU-seconds used by the system on behalf of the process ++(in kernel mode), in seconds. ++

++ ++

++
U ++
Total number of CPU-seconds that the process used directly (in user ++mode), in seconds. ++

++ ++

++
P ++
Percentage of the CPU that this job got. This is just user + system ++times divied by the total running time. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.2.2 Memory Resources

++ ++

++ ++

++
++
M ++
Maximum resident set size of the process during its lifetime, in ++Kilobytes. ++

++ ++

++
t ++
Average resident set size of the process, in Kilobytes. ++

++ ++

++
K ++
Average total (data+stack+text) memory use of the process, in Kilobytes. ++

++ ++

++
D ++
Average size of the process's unshared data area, in Kilobytes. ++

++ ++

++
p ++
Average size of the process's unshared stack, in Kilobytes. ++

++ ++

++
X ++
Average size of the process's shared text, in Kilobytes. ++

++ ++

++
Z ++
System's page size, in bytes. This is a per-system constant, but ++varies between systems. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.2.3 I/O Resources

++ ++

++ ++

++
++
F ++
Number of major, or I/O-requiring, page faults that occurred while the ++process was running. These are faults where the page has actually ++migrated out of primary memory. ++

++ ++

++
R ++
Number of minor, or recoverable, page faults. These are pages that are ++not valid (so they fault) but which have not yet been claimed by other ++virtual pages. Thus the data in the page is still valid but the system ++tables must be updated. ++

++ ++

++
W ++
Number of times the process was swapped out of main memory. ++

++ ++

++
c ++
Number of times the process was context-switched involuntarily (because ++the time slice expired). ++

++ ++

++
w ++
Number of times that the program was context-switched voluntarily, for ++instance while waiting for an I/O operation to complete. ++

++ ++

++
I ++
Number of file system inputs by the process. ++

++ ++

++
O ++
Number of file system outputs by the process. ++

++ ++

++
r ++
Number of socket messages received by the process. ++

++ ++

++
s ++
Number of socket messages sent by the process. ++

++ ++

++
k ++
Number of signals delivered to the process. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.2.4 Command Info

++ ++

++ ++

++
++
C ++
Name and command line arguments of the command being timed. ++

++ ++

++
x ++
Exit status of the command. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.3 Redirecting Output

++ ++

++ ++By default, time writes the resource use statistics to the ++standard error stream. The options below make it write the statistics ++to a file instead. Doing this can be useful if the program you're ++running writes to the standard error or you're running time ++noninteractively or in the background. ++

++

++ ++

++
++
-o file ++
--output=file ++
Write the resource use statistics to file. By default, this ++overwrites the file, destroying the file's previous contents. ++

++ ++

++
-a ++
--append ++
Append the resource use information to the output file instead ++of overwriting it. This option is only useful with the `-o' or ++`--output' option. ++
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.4 Examples

++ ++

++ ++Run the command `wc /etc/hosts' and show the default information: ++

++

++ ++
 
eg$ time wc /etc/hosts
++      35     111    1134 /etc/hosts
++0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
++1inputs+1outputs (0major+0minor)pagefaults 0swaps
++

++ ++Run the command `ls -Fs' and show just the user, system, and ++wall-clock time: ++

++

++ ++
 
eg$ time -f "\t%E real,\t%U user,\t%S sys" ls -Fs
++total 16
++1 account/      1 db/           1 mail/         1 run/
++1 backups/      1 emacs/        1 msgs/         1 rwho/
++1 crash/        1 games/        1 preserve/     1 spool/
++1 cron/         1 log/          1 quotas/       1 tmp/
++        0:00.03 real,   0.00 user,      0.01 sys
++

++ ++Edit the file `.bashrc' and have time append the elapsed time ++and number of signals to the file `log', reading the format string ++from the environment variable TIME: ++

++

++ ++
 
eg$ export TIME="\t%E,\t%k" # If using bash or ksh
++eg$ setenv TIME "\t%E,\t%k" # If using csh or tcsh
++eg$ time -a -o log emacs .bashrc
++eg$ cat log
++        0:16.55,        726
++

++ ++Run the command `sleep 4' and show all of the information about it ++verbosely: ++

++

++ ++
 
eg$ time -v sleep 4
++        Command being timed: "sleep 4"
++        User time (seconds): 0.00
++        System time (seconds): 0.05
++        Percent of CPU this job got: 1%
++        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
++        Average shared text size (kbytes): 36
++        Average unshared data size (kbytes): 24
++        Average stack size (kbytes): 0
++        Average total size (kbytes): 60
++        Maximum resident set size (kbytes): 32
++        Average resident set size (kbytes): 24
++        Major (requiring I/O) page faults: 3
++        Minor (reclaiming a frame) page faults: 0
++        Voluntary context switches: 11
++        Involuntary context switches: 0
++        Swaps: 0
++        File system inputs: 3
++        File system outputs: 1
++        Socket messages sent: 0
++        Socket messages received: 0
++        Signals delivered: 1
++        Page size (bytes): 4096
++        Exit status: 0
++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.5 Accuracy

++ ++

++ ++The elapsed time is not collected atomically with the execution of the ++program; as a result, in bizarre circumstances (if the time ++command gets stopped or swapped out in between when the program being ++timed exits and when time calculates how long it took to run), it ++could be much larger than the actual execution time. ++

++

++ ++When the running time of a command is very nearly zero, some values ++(e.g., the percentage of CPU used) may be reported as either zero (which ++is wrong) or a question mark. ++

++

++ ++Most information shown by time is derived from the wait3 ++system call. The numbers are only as good as those returned by ++wait3. Many systems do not measure all of the resources that ++time can report on; those resources are reported as zero. The ++systems that measure most or all of the resources are based on 4.2 or ++4.3BSD. Later BSD releases use different memory management code that ++measures fewer resources. ++

++

++ ++On systems that do not have a wait3 call that returns status ++information, the times system call is used instead. It provides ++much less information than wait3, so on those systems time ++reports most of the resources as zero. ++

++

++ ++The `%I' and `%O' values are allegedly only "real" input ++and output and do not include those supplied by caching devices. The ++meaning of "real" I/O reported by `%I' and `%O' may be ++muddled for workstations, especially diskless ones. ++

++

++ ++ ++


++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
++

1.6 Running the time Command

++ ++

++ ++The format of the time command is: ++

++

++ ++
 
time [option...] command [arg...]
++

++ ++ ++time runs the program command, with any given arguments ++arg.... When command finishes, time displays ++information about resources used by command (on the standard error ++output, by default). If command exits with non-zero status or is ++terminated by a signal, time displays a warning message and the ++exit status or signal number. ++

++

++ ++Options to time must appear on the command line before ++command. Anything on the command line after command is ++passed as arguments to command. ++

++

++ ++

++
++
-o file ++
--output=file ++
Write the resource use statistics to file. ++

++ ++

++
-a ++
--append ++
Append the resource use information to the output file instead ++of overwriting it. ++

++ ++

++
-f format ++
--format=format ++
Use format as the format string. ++

++ ++

++
--help ++
Print a summary of the command line options to time and exit. ++

++ ++

++
-p ++
--portability ++
Use the POSIX format. ++

++ ++

++
-v ++
--verbose ++
++Use the built-in verbose format. ++

++ ++

++
-V ++
--version ++
++Print the version number of time and exit. ++
++

++ ++


++ ++ ++ ++ ++ ++ ++
[Top][Contents][Index][ ? ]
++

Table of Contents

++
++1. Measuring Program Resource Use ++
++
++1.1 Setting the Output Format ++
++1.2 The Format String ++
++
++1.2.1 Time Resources ++
++1.2.2 Memory Resources ++
++1.2.3 I/O Resources ++
++1.2.4 Command Info ++
++
++1.3 Redirecting Output ++
++1.4 Examples ++
++1.5 Accuracy ++
++1.6 Running the time Command ++
++
++
++
++ ++ ++ ++ ++ ++ ++
[Top][Contents][Index][ ? ]
++

Short Table of Contents

++
++1. Measuring Program Resource Use ++
++ ++
++
++ ++ ++ ++ ++ ++ ++
[Top][Contents][Index][ ? ]
++

About this document

++This document was generated ++by ++using texi2html ++

++The buttons in the navigation panels have the following meaning: ++

++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++
Button Name Go to From 1.2.3 go to
++ [ < ] ++Back ++ ++previous section in reading order ++ ++1.2.2 ++
++ [ > ] ++Forward ++ ++next section in reading order ++ ++1.2.4 ++
++ [ << ] ++FastBack ++ ++beginning of this chapter or previous chapter ++ ++1 ++
++ [ Up ] ++Up ++ ++up section ++ ++1.2 ++
++ [ >> ] ++FastForward ++ ++next chapter ++ ++2 ++
++ [Top] ++Top ++ ++cover (top) of document ++ ++   ++
++ [Contents] ++Contents ++ ++table of contents ++ ++   ++
++ [Index] ++Index ++ ++concept index ++ ++   ++
++ [ ? ] ++About ++ ++this page ++ ++   ++
++

++ where the Example assumes that the current position ++ is at Subsubsection One-Two-Three of a document of ++ the following structure:

++
    ++
  • 1. Section One ++
      ++
    • 1.1 Subsection One-One ++
        ++
      • ...
      • ++
      ++
    • 1.2 Subsection One-Two ++
        ++
      • 1.2.1 Subsubsection One-Two-One
      • ++
      • 1.2.2 Subsubsection One-Two-Two
      • ++
      • 1.2.3 Subsubsection One-Two-Three     ++ <== Current Position
      • ++
      • 1.2.4 Subsubsection One-Two-Four
      • ++
      ++
    • ++
    • 1.3 Subsection One-Three ++
        ++
      • ...
      • ++
      ++
    • ++
    • 1.4 Subsection One-Four
    • ++
    ++
  • ++
++ ++
++
++ ++This document was generated ++by root on September, 1 2003 ++using texi2html ++ ++ ++ ++ diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc new file mode 100644 index 0000000000..85862177b7 --- /dev/null +++ b/meta/recipes-extended/time/time.inc @@ -0,0 +1,12 @@ +SUMMARY = "Tool that measures CPU resources" +DESCRIPTION = "time measures many of the CPU resources, such as time and \ +memory, that other programs use." +HOMEPAGE = "http://www.gnu.org/software/time/" +SECTION = "utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + +inherit texinfo update-alternatives + +ALTERNATIVE_${PN} = "time" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb new file mode 100644 index 0000000000..92c5353d09 --- /dev/null +++ b/meta/recipes-extended/time/time_1.7.bb @@ -0,0 +1,11 @@ +require time.inc + +PR = "r2" + +SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ + file://debian.patch" + +SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3" +SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d" + +inherit autotools diff --git a/meta/recipes-extended/tzcode/tzcode-native.inc b/meta/recipes-extended/tzcode/tzcode-native.inc new file mode 100644 index 0000000000..4af1e20739 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native.inc @@ -0,0 +1,15 @@ +DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect" +LICENSE = "PD & BSD" + +LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6" + +S = "${WORKDIR}" + +inherit native + +do_install () { + install -d ${D}${bindir}/ + install -m 755 zic ${D}${bindir}/ + install -m 755 zdump ${D}${bindir}/ + install -m 755 tzselect ${D}${bindir}/ +} diff --git a/meta/recipes-extended/tzcode/tzcode-native_2014h.bb b/meta/recipes-extended/tzcode/tzcode-native_2014h.bb new file mode 100644 index 0000000000..87c5f23847 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native_2014h.bb @@ -0,0 +1,11 @@ +# note that we allow for us to use data later than our code version +# +SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ + ftp://ftp.iana.org/tz/releases/tzdata2014h.tar.gz;name=tzdata" + +SRC_URI[tzcode.md5sum] = "8e7741fc769ebdd94d95e5f2c3adbb60" +SRC_URI[tzcode.sha256sum] = "a4d9788a1bb0aa314eae4986ee991425b83ecc47da0e84f626735846be1dbf44" +SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272" +SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e" + +require tzcode-native.inc diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015b.bb b/meta/recipes-extended/tzcode/tzcode-native_2015b.bb new file mode 100644 index 0000000000..a4ec72d159 --- /dev/null +++ b/meta/recipes-extended/tzcode/tzcode-native_2015b.bb @@ -0,0 +1,10 @@ +# note that we allow for us to use data later than our code version +# +SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \ + ftp://ftp.iana.org/tz/releases/tzdata2015b.tar.gz;name=tzdata" + +SRC_URI[tzcode.md5sum] = "f073a7c9bca7f9fe408491f826e92968" +SRC_URI[tzcode.sha256sum] = "e668f1235b998c90e43ecc93c8535728c65bb01d6bb93d22467e04b5ffa35d76" +SRC_URI[tzdata.md5sum] = "75571bb17c7b6be88a9f8872e45bc726" +SRC_URI[tzdata.sha256sum] = "556ac1a5b3a371adc1ad4e77138f78ddd7f8ddd7bc2b52545924598c7dc8ad62" +require tzcode-native.inc diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc new file mode 100644 index 0000000000..37ae92647c --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata.inc @@ -0,0 +1,200 @@ +DESCRIPTION = "Timezone data" +HOMEPAGE = "http://www.iana.org/time-zones" +SECTION = "base" +LICENSE = "PD & BSD" +LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1" +DEPENDS = "tzcode-native" + +inherit allarch + +RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \ + timezone-arctic timezone-asia timezone-atlantic \ + timezone-australia timezone-europe timezone-indian \ + timezone-iso3166.tab timezone-pacific timezone-zone.tab" + +S = "${WORKDIR}" + +DEFAULT_TIMEZONE ?= "Universal" + +TZONES= "africa antarctica asia australasia europe northamerica southamerica \ + factory etcetera backward systemv \ + " +# pacificnew + +do_compile () { + for zone in ${TZONES}; do \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \ + -y ${S}/yearistype.sh ${S}/${zone} ; \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \ + -y ${S}/yearistype.sh ${S}/${zone} ; \ + ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \ + -y ${S}/yearistype.sh ${S}/${zone} ; \ + done +} + +do_install () { + install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo + cp -pPR ${S}/$exec_prefix ${D}/ + # libc is removing zoneinfo files from package + cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo + cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo + + # Install default timezone + if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then + install -d ${D}${sysconfdir} + echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone + ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime + else + bberror "DEFAULT_TIMEZONE is set to an invalid value." + exit 1 + fi + + chown -R root:root ${D} +} + +pkg_postinst_${PN} () { + etc_lt="$D${sysconfdir}/localtime" + src="$D${sysconfdir}/timezone" + + if [ -e ${src} ] ; then + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") + fi + + if [ -z ${tz} ] ; then + return 0 + fi + + if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then + echo "You have an invalid TIMEZONE setting in ${src}" + echo "Your ${etc_lt} has been reset to Universal; enjoy!" + tz="Universal" + echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}" + if [ -L ${etc_lt} ] ; then + rm -f "${etc_lt}" + fi + ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}" + fi +} + +# Packages primarily organized by directory with a major city +# in most time zones in the base package + +PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \ + tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \ + tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific" + +FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*" +RPROVIDES_tzdata-africa = "tzdata-africa" + +FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \ + ${datadir}/zoneinfo/US/* \ + ${datadir}/zoneinfo/Brazil/* \ + ${datadir}/zoneinfo/Canada/* \ + ${datadir}/zoneinfo/Mexico/* \ + ${datadir}/zoneinfo/Chile/*" +RPROVIDES_tzdata-americas = "tzdata-americas" + +FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*" +RPROVIDES_tzdata-antarctica = "tzdata-antarctica" + +FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*" +RPROVIDES_tzdata-arctic = "tzdata-arctic" + +FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \ + ${datadir}/zoneinfo/Indian/* \ + ${datadir}/zoneinfo/Mideast/*" +RPROVIDES_tzdata-asia = "tzdata-asia" + +FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*" +RPROVIDES_tzdata-atlantic = "tzdata-atlantic" + +FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*" +RPROVIDES_tzdata-australia = "tzdata-australia" + +FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*" +RPROVIDES_tzdata-europe = "tzdata-europe" + +FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*" +RPROVIDES_tzdata-pacific = "tzdata-pacific" + +FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*" +RPROVIDES_tzdata-posix = "tzdata-posix" + +FILES_tzdata-right += "${datadir}/zoneinfo/right/*" +RPROVIDES_tzdata-right = "tzdata-right" + + +FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \ + ${datadir}/zoneinfo/Egypt \ + ${datadir}/zoneinfo/Eire \ + ${datadir}/zoneinfo/Factory \ + ${datadir}/zoneinfo/GB-Eire \ + ${datadir}/zoneinfo/Hongkong \ + ${datadir}/zoneinfo/Iceland \ + ${datadir}/zoneinfo/Iran \ + ${datadir}/zoneinfo/Israel \ + ${datadir}/zoneinfo/Jamaica \ + ${datadir}/zoneinfo/Japan \ + ${datadir}/zoneinfo/Kwajalein \ + ${datadir}/zoneinfo/Libya \ + ${datadir}/zoneinfo/Navajo \ + ${datadir}/zoneinfo/Poland \ + ${datadir}/zoneinfo/Portugal \ + ${datadir}/zoneinfo/Singapore \ + ${datadir}/zoneinfo/Turkey" +RPROVIDES_tzdata-misc = "tzdata-misc" + + +FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \ + ${datadir}/zoneinfo/America/Anchorage \ + ${datadir}/zoneinfo/America/Los_Angeles \ + ${datadir}/zoneinfo/America/Denver \ + ${datadir}/zoneinfo/America/Chicago \ + ${datadir}/zoneinfo/America/New_York \ + ${datadir}/zoneinfo/America/Caracas \ + ${datadir}/zoneinfo/America/Sao_Paulo \ + ${datadir}/zoneinfo/Europe/London \ + ${datadir}/zoneinfo/Europe/Paris \ + ${datadir}/zoneinfo/Africa/Cairo \ + ${datadir}/zoneinfo/Europe/Moscow \ + ${datadir}/zoneinfo/Asia/Dubai \ + ${datadir}/zoneinfo/Asia/Karachi \ + ${datadir}/zoneinfo/Asia/Dhaka \ + ${datadir}/zoneinfo/Asia/Bankok \ + ${datadir}/zoneinfo/Asia/Hong_Kong \ + ${datadir}/zoneinfo/Asia/Tokyo \ + ${datadir}/zoneinfo/Australia/Darwin \ + ${datadir}/zoneinfo/Australia/Adelaide \ + ${datadir}/zoneinfo/Australia/Brisbane \ + ${datadir}/zoneinfo/Australia/Sydney \ + ${datadir}/zoneinfo/Pacific/Noumea \ + ${datadir}/zoneinfo/CET \ + ${datadir}/zoneinfo/CST6CDT \ + ${datadir}/zoneinfo/EET \ + ${datadir}/zoneinfo/EST \ + ${datadir}/zoneinfo/EST5EDT \ + ${datadir}/zoneinfo/GB \ + ${datadir}/zoneinfo/GMT \ + ${datadir}/zoneinfo/GMT+0 \ + ${datadir}/zoneinfo/GMT-0 \ + ${datadir}/zoneinfo/GMT0 \ + ${datadir}/zoneinfo/Greenwich \ + ${datadir}/zoneinfo/HST \ + ${datadir}/zoneinfo/MET \ + ${datadir}/zoneinfo/MST \ + ${datadir}/zoneinfo/MST7MDT \ + ${datadir}/zoneinfo/NZ \ + ${datadir}/zoneinfo/NZ-CHAT \ + ${datadir}/zoneinfo/PRC \ + ${datadir}/zoneinfo/PST8PDT \ + ${datadir}/zoneinfo/ROC \ + ${datadir}/zoneinfo/ROK \ + ${datadir}/zoneinfo/UCT \ + ${datadir}/zoneinfo/UTC \ + ${datadir}/zoneinfo/Universal \ + ${datadir}/zoneinfo/W-SU \ + ${datadir}/zoneinfo/WET \ + ${datadir}/zoneinfo/Zulu \ + ${datadir}/zoneinfo/zone.tab \ + ${datadir}/zoneinfo/iso3166.tab \ + ${datadir}/zoneinfo/Etc/*" diff --git a/meta/recipes-extended/tzdata/tzdata_2014h.bb b/meta/recipes-extended/tzdata/tzdata_2014h.bb new file mode 100644 index 0000000000..9334a6293b --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata_2014h.bb @@ -0,0 +1,6 @@ +SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata" + +SRC_URI[tzdata.md5sum] = "ed05111948beba8a0f30956baa46b272" +SRC_URI[tzdata.sha256sum] = "e78152f616fb07c1dea124215ffca57d0de66d8897e00896086542e3de30f69e" + +require tzdata.inc diff --git a/meta/recipes-extended/tzdata/tzdata_2015b.bb b/meta/recipes-extended/tzdata/tzdata_2015b.bb new file mode 100644 index 0000000000..df97d6d34e --- /dev/null +++ b/meta/recipes-extended/tzdata/tzdata_2015b.bb @@ -0,0 +1,6 @@ +SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata" + +SRC_URI[tzdata.md5sum] = "75571bb17c7b6be88a9f8872e45bc726" +SRC_URI[tzdata.sha256sum] = "556ac1a5b3a371adc1ad4e77138f78ddd7f8ddd7bc2b52545924598c7dc8ad62" + +require tzdata.inc diff --git a/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch new file mode 100644 index 0000000000..9ba3c1dc62 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch @@ -0,0 +1,402 @@ +From: Giovanni Scafora +Subject: unzip files encoded with non-latin, non-unicode file names +Last-Update: 2015-02-11 + +Upstream-Status: Backport + +Updated 2015-02-11 by Marc Deslauriers +to fix buffer overflow in charset_to_intern() + +Signed-off-by: Marc Deslauriers + +Index: unzip-6.0/unix/unix.c +=================================================================== +--- unzip-6.0.orig/unix/unix.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unix/unix.c 2015-02-11 09:18:04.902081319 -0500 +@@ -30,6 +30,9 @@ + #define UNZIP_INTERNAL + #include "unzip.h" + ++#include ++#include ++ + #ifdef SCO_XENIX + # define SYSNDIR + #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +@@ -1874,3 +1877,102 @@ + } + } + #endif /* QLZIP */ ++ ++ ++typedef struct { ++ char *local_charset; ++ char *archive_charset; ++} CHARSET_MAP; ++ ++/* A mapping of local <-> archive charsets used by default to convert filenames ++ * of DOS/Windows Zip archives. Currently very basic. */ ++static CHARSET_MAP dos_charset_map[] = { ++ { "ANSI_X3.4-1968", "CP850" }, ++ { "ISO-8859-1", "CP850" }, ++ { "CP1252", "CP850" }, ++ { "UTF-8", "CP866" }, ++ { "KOI8-R", "CP866" }, ++ { "KOI8-U", "CP866" }, ++ { "ISO-8859-5", "CP866" } ++}; ++ ++char OEM_CP[MAX_CP_NAME] = ""; ++char ISO_CP[MAX_CP_NAME] = ""; ++ ++/* Try to guess the default value of OEM_CP based on the current locale. ++ * ISO_CP is left alone for now. */ ++void init_conversion_charsets() ++{ ++ const char *local_charset; ++ int i; ++ ++ /* Make a guess only if OEM_CP not already set. */ ++ if(*OEM_CP == '\0') { ++ local_charset = nl_langinfo(CODESET); ++ for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++) ++ if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) { ++ strncpy(OEM_CP, dos_charset_map[i].archive_charset, ++ sizeof(OEM_CP)); ++ break; ++ } ++ } ++} ++ ++/* Convert a string from one encoding to the current locale using iconv(). ++ * Be as non-intrusive as possible. If error is encountered during covertion ++ * just leave the string intact. */ ++static void charset_to_intern(char *string, char *from_charset) ++{ ++ iconv_t cd; ++ char *s,*d, *buf; ++ size_t slen, dlen, buflen; ++ const char *local_charset; ++ ++ if(*from_charset == '\0') ++ return; ++ ++ buf = NULL; ++ local_charset = nl_langinfo(CODESET); ++ ++ if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1) ++ return; ++ ++ slen = strlen(string); ++ s = string; ++ ++ /* Make sure OUTBUFSIZ + 1 never ends up smaller than FILNAMSIZ ++ * as this function also gets called with G.outbuf in fileio.c ++ */ ++ buflen = FILNAMSIZ; ++ if (OUTBUFSIZ + 1 < FILNAMSIZ) ++ { ++ buflen = OUTBUFSIZ + 1; ++ } ++ ++ d = buf = malloc(buflen); ++ if(!d) ++ goto cleanup; ++ ++ bzero(buf,buflen); ++ dlen = buflen - 1; ++ ++ if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1) ++ goto cleanup; ++ strncpy(string, buf, buflen); ++ ++ cleanup: ++ free(buf); ++ iconv_close(cd); ++} ++ ++/* Convert a string from OEM_CP to the current locale charset. */ ++inline void oem_intern(char *string) ++{ ++ charset_to_intern(string, OEM_CP); ++} ++ ++/* Convert a string from ISO_CP to the current locale charset. */ ++inline void iso_intern(char *string) ++{ ++ charset_to_intern(string, ISO_CP); ++} +Index: unzip-6.0/unix/unxcfg.h +=================================================================== +--- unzip-6.0.orig/unix/unxcfg.h 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unix/unxcfg.h 2015-02-11 08:46:43.671324260 -0500 +@@ -228,4 +228,30 @@ + /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ + /* and notfirstcall are used by do_wild(). */ + ++ ++#define MAX_CP_NAME 25 ++ ++#ifdef SETLOCALE ++# undef SETLOCALE ++#endif ++#define SETLOCALE(category, locale) setlocale(category, locale) ++#include ++ ++#ifdef _ISO_INTERN ++# undef _ISO_INTERN ++#endif ++#define _ISO_INTERN(str1) iso_intern(str1) ++ ++#ifdef _OEM_INTERN ++# undef _OEM_INTERN ++#endif ++#ifndef IZ_OEM2ISO_ARRAY ++# define IZ_OEM2ISO_ARRAY ++#endif ++#define _OEM_INTERN(str1) oem_intern(str1) ++ ++void iso_intern(char *); ++void oem_intern(char *); ++void init_conversion_charsets(void); ++ + #endif /* !__unxcfg_h */ +Index: unzip-6.0/unzip.c +=================================================================== +--- unzip-6.0.orig/unzip.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unzip.c 2015-02-11 08:46:43.675324290 -0500 +@@ -327,11 +327,21 @@ + -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ + -v verbose, multi-page format\n"; + ++#ifndef UNIX + static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment -T print file times in sortable decimal format\ + \n -C be case-insensitive %s\ + -x exclude filenames that follow from listing\n"; ++#else /* UNIX */ ++static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ ++ -h print header line -t print totals for listed files or for all\n\ ++ -z print zipfile comment %c-T%c print file times in sortable decimal format\ ++\n %c-C%c be case-insensitive %s\ ++ -x exclude filenames that follow from listing\n\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; ++#endif /* !UNIX */ + #ifdef MORE + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +@@ -664,6 +674,17 @@ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ + lowercase\n %-42s -V retain VMS version numbers\n%s"; ++#elif (defined UNIX) ++static ZCONST char Far UnzipUsageLine4[] = "\ ++modifiers:\n\ ++ -n never overwrite existing files -q quiet mode (-qq => quieter)\n\ ++ -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ ++ -j junk paths (do not make directories) -aa treat ALL files as text\n\ ++ -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ ++ -C match filenames case-insensitively -L make (some) names \ ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n\n"; + #else /* !VMS */ + static ZCONST char Far UnzipUsageLine4[] = "\ + modifiers:\n\ +@@ -802,6 +823,10 @@ + #endif /* UNICODE_SUPPORT */ + + ++#ifdef UNIX ++ init_conversion_charsets(); ++#endif ++ + #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + +@@ -1335,6 +1360,11 @@ + argc = *pargc; + argv = *pargv; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif ++ + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +@@ -1516,6 +1546,35 @@ + } + break; + #endif /* MACOS */ ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; +@@ -1591,6 +1650,35 @@ + } else + ++uO.overwrite_all; + break; ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; +Index: unzip-6.0/unzpriv.h +=================================================================== +--- unzip-6.0.orig/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 +@@ -3008,7 +3008,7 @@ + !(((islochdr) || (isuxatt)) && \ + ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ + (hostnum) == FS_HPFS_ || \ +- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ ++ ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ +Index: unzip-6.0/zipinfo.c +=================================================================== +--- unzip-6.0.orig/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 +@@ -457,6 +457,10 @@ + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif + + #ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +@@ -501,6 +505,35 @@ + uO.lflag = 0; + } + break; ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; +@@ -521,6 +554,35 @@ + G.M_flag = TRUE; + break; + #endif ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; diff --git a/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch new file mode 100644 index 0000000000..e137f0dc76 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch @@ -0,0 +1,52 @@ +From: sms +Subject: Fix CVE-2014-8139: CRC32 verification heap-based overflow +Bug-Debian: http://bugs.debian.org/773722 + +The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz + +Upstream-Status: Backport + +Signed-off-by: Roy Li + +--- a/extract.c ++++ b/extract.c +@@ -298,6 +298,8 @@ + #ifndef SFX + static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ + EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; ++ static ZCONST char Far TooSmallEBlength[] = "bad extra-field entry:\n \ ++ EF block length (%u bytes) invalid (< %d)\n"; + static ZCONST char Far InvalidComprDataEAs[] = + " invalid compressed data for EAs\n"; + # if (defined(WIN32) && defined(NTSD_EAS)) +@@ -2023,7 +2025,8 @@ + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + +- if (ebLen > (ef_len - EB_HEADSIZE)) { ++ if (ebLen > (ef_len - EB_HEADSIZE)) ++ { + /* Discovered some extra field inconsistency! */ + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", +@@ -2158,11 +2161,19 @@ + } + break; + case EF_PKVMS: +- if (makelong(ef+EB_HEADSIZE) != ++ if (ebLen < 4) ++ { ++ Info(slide, 1, ++ ((char *)slide, LoadFarString(TooSmallEBlength), ++ ebLen, 4)); ++ } ++ else if (makelong(ef+EB_HEADSIZE) != + crc32(CRCVAL_INITIAL, ef+(EB_HEADSIZE+4), + (extent)(ebLen-4))) ++ { + Info(slide, 1, ((char *)slide, + LoadFarString(BadCRC_EAs))); ++ } + break; + case EF_PKW32: + case EF_PKUNIX: diff --git a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch new file mode 100644 index 0000000000..edc7d515b0 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch @@ -0,0 +1,33 @@ +From: sms +Subject: Fix CVE-2014-8140: out-of-bounds write issue in test_compr_eb() +Bug-Debian: http://bugs.debian.org/773722 + +The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz + +Upstream-Status: Backport + +Signed-off-by: Roy Li + +--- a/extract.c ++++ b/extract.c +@@ -2232,10 +2232,17 @@ + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ + ++ /* Return no/bad-data error status if any problem is found: ++ * 1. eb_size is too small to hold the uncompressed size ++ * (eb_ucsize). (Else extract eb_ucsize.) ++ * 2. eb_ucsize is zero (invalid). 2014-12-04 SMS. ++ * 3. eb_ucsize is positive, but eb_size is too small to hold ++ * the compressed data header. ++ */ + if ((eb_size < (EB_UCSIZE_P + 4)) || +- ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && +- eb_size <= (compr_offset + EB_CMPRHEADLEN))) +- return IZ_EF_TRUNC; /* no compressed data! */ ++ ((eb_ucsize = makelong( eb+ (EB_HEADSIZE+ EB_UCSIZE_P))) == 0L) || ++ ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) ++ return IZ_EF_TRUNC; /* no/bad compressed data! */ + + if ( + #ifdef INT_16BIT diff --git a/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch new file mode 100644 index 0000000000..d0c1db3925 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch @@ -0,0 +1,144 @@ +From: sms +Subject: Fix CVE-2014-8141: out-of-bounds read issues in getZip64Data() +Bug-Debian: http://bugs.debian.org/773722 + +The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz + +Upstream-Status: Backport + +Signed-off-by: Roy Li + + +--- a/fileio.c ++++ b/fileio.c +@@ -176,6 +176,8 @@ + #endif + static ZCONST char Far ExtraFieldTooLong[] = + "warning: extra field too long (%d). Ignoring...\n"; ++static ZCONST char Far ExtraFieldCorrupt[] = ++ "warning: extra field (type: 0x%04x) corrupt. Continuing...\n"; + + #ifdef WINDLL + static ZCONST char Far DiskFullQuery[] = +@@ -2295,7 +2297,12 @@ + if (readbuf(__G__ (char *)G.extra_field, length) == 0) + return PK_EOF; + /* Looks like here is where extra fields are read */ +- getZip64Data(__G__ G.extra_field, length); ++ if (getZip64Data(__G__ G.extra_field, length) != PK_COOL) ++ { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString( ExtraFieldCorrupt), EF_PKSZ64)); ++ error = PK_WARN; ++ } + #ifdef UNICODE_SUPPORT + G.unipath_filename = NULL; + if (G.UzO.U_flag < 2) { +--- a/process.c ++++ b/process.c +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. ++ Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2009-Jan-02 or later + (the contents of which are also included in unzip.h) for terms of use. +@@ -1901,48 +1901,82 @@ + and a 4-byte version of disk start number. + Sets both local header and central header fields. Not terribly clever, + but it means that this procedure is only called in one place. ++ ++ 2014-12-05 SMS. ++ Added checks to ensure that enough data are available before calling ++ makeint64() or makelong(). Replaced various sizeof() values with ++ simple ("4" or "8") constants. (The Zip64 structures do not depend ++ on our variable sizes.) Error handling is crude, but we should now ++ stay within the buffer. + ---------------------------------------------------------------------------*/ + ++#define Z64FLGS 0xffff ++#define Z64FLGL 0xffffffff ++ + if (ef_len == 0 || ef_buf == NULL) + return PK_COOL; + + Trace((stderr,"\ngetZip64Data: scanning extra field of length %u\n", + ef_len)); + +- while (ef_len >= EB_HEADSIZE) { ++ while (ef_len >= EB_HEADSIZE) ++ { + eb_id = makeword(EB_ID + ef_buf); + eb_len = makeword(EB_LEN + ef_buf); + +- if (eb_len > (ef_len - EB_HEADSIZE)) { +- /* discovered some extra field inconsistency! */ ++ if (eb_len > (ef_len - EB_HEADSIZE)) ++ { ++ /* Extra block length exceeds remaining extra field length. */ + Trace((stderr, + "getZip64Data: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } +- if (eb_id == EF_PKSZ64) { +- ++ if (eb_id == EF_PKSZ64) ++ { + int offset = EB_HEADSIZE; + +- if (G.crec.ucsize == 0xffffffff || G.lrec.ucsize == 0xffffffff){ +- G.lrec.ucsize = G.crec.ucsize = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.ucsize); ++ if ((G.crec.ucsize == Z64FLGL) || (G.lrec.ucsize == Z64FLGL)) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ ++ G.crec.ucsize = G.lrec.ucsize = makeint64(offset + ef_buf); ++ offset += 8; + } +- if (G.crec.csize == 0xffffffff || G.lrec.csize == 0xffffffff){ +- G.csize = G.lrec.csize = G.crec.csize = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.csize); ++ ++ if ((G.crec.csize == Z64FLGL) || (G.lrec.csize == Z64FLGL)) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ ++ G.csize = G.crec.csize = G.lrec.csize = makeint64(offset + ef_buf); ++ offset += 8; + } +- if (G.crec.relative_offset_local_header == 0xffffffff){ ++ ++ if (G.crec.relative_offset_local_header == Z64FLGL) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ + G.crec.relative_offset_local_header = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.relative_offset_local_header); ++ offset += 8; + } +- if (G.crec.disk_number_start == 0xffff){ ++ ++ if (G.crec.disk_number_start == Z64FLGS) ++ { ++ if (offset+ 4 > ef_len) ++ return PK_ERR; ++ + G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf); +- offset += sizeof(G.crec.disk_number_start); ++ offset += 4; + } ++#if 0 ++ break; /* Expect only one EF_PKSZ64 block. */ ++#endif /* 0 */ + } + +- /* Skip this extra field block */ ++ /* Skip this extra field block. */ + ef_buf += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } 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 @@ +Upstream-Status: Pending + +unix/Makefile: remove hard coded strip commands + +Remove the hard coded strip commands, both LF2 (used in linking) and +STRIP used alone. + +Signed-off-by: Mark Hatle + +diff -ur unzip60.orig/unix/configure unzip60/unix/configure +--- unzip60.orig/unix/configure 2009-04-16 14:25:12.000000000 -0500 ++++ unzip60/unix/configure 2011-06-21 11:23:36.822849960 -0500 +@@ -17,7 +17,7 @@ + IZ_BZIP2=${3} + CFLAGS="${CFLAGS} -I. -DUNIX" + LFLAGS1="" +-LFLAGS2="-s" ++LFLAGS2="" + LN="ln -s" + + CFLAGS_OPT='' +diff -ur unzip60.orig/unix/Makefile unzip60/unix/Makefile +--- unzip60.orig/unix/Makefile 2009-01-18 16:41:18.000000000 -0600 ++++ unzip60/unix/Makefile 2011-06-21 11:12:22.900003388 -0500 +@@ -52,7 +52,7 @@ + CF = $(CFLAGS) $(CF_NOOPT) + LFLAGS1 = + LF = -o unzip$E $(LFLAGS1) +-LF2 = -s ++LF2 = + + # UnZipSFX flags + SL = -o unzipsfx$E $(LFLAGS1) +@@ -70,7 +70,7 @@ + CHMOD = chmod + BINPERMS = 755 + MANPERMS = 644 +-STRIP = strip ++STRIP = + E = + O = .o + M = unix +@@ -776,7 +776,6 @@ + # + gcc: unix_make + $(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2="" +- $(STRIP) $(UNZIPS) + + # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000 + hk68: unix_make diff --git a/meta/recipes-extended/unzip/unzip/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 @@ +Pass LDFLAGS to the linker + +Upstream-Status: Pending + +Signed-off-by: Mikhail Durnev + +diff -Naur old/unix/configure new/unix/configure +--- old/unix/configure 2014-01-13 21:59:27.000000000 +1100 ++++ new/unix/configure 2014-01-14 16:36:02.000000000 +1100 +@@ -16,7 +16,7 @@ + CFLAGSR=${CFLAGS} + IZ_BZIP2=${3} + CFLAGS="${CFLAGS} -I. -DUNIX" +-LFLAGS1="" ++LFLAGS1=${LDFLAGS} + LFLAGS2="" + LN="ln -s" + diff --git a/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff new file mode 100644 index 0000000000..0a0bfbbb17 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff @@ -0,0 +1,45 @@ +From 190040ebfcf5395a6ccedede2cc9343d34f0a108 Mon Sep 17 00:00:00 2001 +From: mancha +Date: Wed, 11 Feb 2015 +Subject: Info-ZIP UnZip buffer overflow + +Upstream-Status: Backport + +By carefully crafting a corrupt ZIP archive with "extra fields" that +purport to have compressed blocks larger than the corresponding +uncompressed blocks in STORED no-compression mode, an attacker can +trigger a heap overflow that can result in application crash or +possibly have other unspecified impact. + +This patch ensures that when extra fields use STORED mode, the +"compressed" and uncompressed block sizes match. + +Signed-off-by: mancha +--- + extract.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/extract.c ++++ b/extract.c +@@ -2217,6 +2217,7 @@ static int test_compr_eb(__G__ eb, eb_si + ulg eb_ucsize; + uch *eb_ucptr; + int r; ++ ush method; + + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ +@@ -2226,6 +2227,13 @@ static int test_compr_eb(__G__ eb, eb_si + eb_size <= (compr_offset + EB_CMPRHEADLEN))) + return IZ_EF_TRUNC; /* no compressed data! */ + ++ method = makeword(eb + (EB_HEADSIZE + compr_offset)); ++ if ((method == STORED) && ++ (eb_size - compr_offset - EB_CMPRHEADLEN != eb_ucsize)) ++ return PK_ERR; /* compressed & uncompressed ++ * should match in STORED ++ * method */ ++ + if ( + #ifdef INT_16BIT + (((ulg)(extent)eb_ucsize) != eb_ucsize) || 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..e590f8186d --- /dev/null +++ b/meta/recipes-extended/unzip/unzip_6.0.bb @@ -0,0 +1,44 @@ +SUMMARY = "Utilities for extracting and viewing files in .zip archives" +HOMEPAGE = "http://www.info-zip.org" +SECTION = "console/utils" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29" +PE = "1" +PR = "r5" + +SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \ + file://avoid-strip.patch \ + file://define-ldflags.patch \ + file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \ + file://unzip-6.0_overflow3.diff \ + file://09-cve-2014-8139-crc-overflow.patch \ + file://10-cve-2014-8140-test-compr-eb.patch \ + file://11-cve-2014-8141-getzip64data.patch \ +" + +SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" +SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37" +S = "${WORKDIR}/unzip60" + +# Makefile uses CF_NOOPT instead of CFLAGS. We lifted the values from +# Makefile and add CFLAGS. Optimization will be overriden by unzip +# configure to be -O3. +# +EXTRA_OEMAKE += "STRIP=true LF2='' \ + 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'" + +export LD = "${CC}" +LD_class-native = "${CC}" + +do_compile() { + oe_runmake -f unix/Makefile generic +} + +do_install() { + oe_runmake -f unix/Makefile install prefix=${D}${prefix} + install -d ${D}${mandir} + mv ${D}${prefix}/man/* ${D}${mandir} + rmdir ${D}${prefix}/man/ +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/watchdog/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 @@ +Fix ping mode failure + +Upstream-Status: Pending + +When watchdog works on ping mode, the system will be rebooted since +watchdog can not receive the expected ECOREPLY on a setting interval. + +Ping mode uses a raw socket to send a ECO packet, then uses select() +to wait and recvfrom() to receive the ECOREPLY packet, if select() +shows the data is ready, and the data is not the expected ECOREPLY, +and waiting time is not overdue, it will continue use select() and +recvfrom(). + +Problem is that the raw socket can receive any icmp packets, if we do +not set filters, and there are many icmp packets on socket, this +program will not find its interested ECOREPLY packet in a special +interval, which makes the ping mode fail. + + +Other program is that watchdog sometime can not reach the call of +recvfrom to try to receive packets since tv_sec of struct timeval +of select parameter is 0. + +The timeout of select() is the result of ping interval minusing the +time of calling gettimeofday spending, when ping interval is 1 second, +and the call of gettimeofday() spends several useconds, the tv_sec of +struct timeval of select parameter must be 0, at that condition, we +should it is valid of tv_sec of struct timeval of select parameter be 0 + +Signed-off-by: Roy.Li +--- + src/net.c | 2 +- + src/watchdog.c | 5 ++++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +Index: watchdog-5.13/src/watchdog.c +=================================================================== +--- watchdog-5.13.orig/src/watchdog.c 2013-02-01 03:15:44.000000000 -0800 ++++ watchdog-5.13/src/watchdog.c 2013-03-11 22:27:48.741657881 -0700 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -567,6 +568,8 @@ + pid_t child_pid; + int oom_adjusted = 0; + struct stat s; ++ struct icmp_filter filt; ++ filt.data = ~(1<sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)); + /* this is necessary for broadcast pings to work */ + (void) setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold)); + 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 @@ +Fix out of tree build support: + +| installing /etc/watchdog.conf +| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5' +| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8' +| /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' +| /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' +| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory +| make[2]: *** [install-etc-local] Error 1 + +Upstream-Status: Pending + +RP 2013/03/21 + +Index: watchdog-5.13/Makefile.am +=================================================================== +--- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000 ++++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000 +@@ -16,7 +16,7 @@ + else \ + echo "installing $(CONFIG_FILENAME)"; \ + $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \ +- $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ ++ $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \ + fi + + 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 @@ +SUMMARY = "Software watchdog" +DESCRIPTION = "Watchdog is a daemon that checks if your system is still \ +working. If programs in user space are not longer executed \ +it will reboot the system." +HOMEPAGE = "http://watchdog.sourceforge.net/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194" + +LICENSE = "GPL-2.0+" +LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569" + +SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ + file://fixsepbuild.patch \ + file://fix-ping-failure.patch" +SRC_URI[md5sum] = "153455f008f1cf8f65f6ad9586a21ff1" +SRC_URI[sha256sum] = "141e0faf3ee4d8187a6ff4e00b18ef7b7a4ce432a2d4c8a6e6fdc62507fc6eb0" + +inherit autotools + +RRECOMMENDS_${PN} = "kernel-module-softdog" diff --git a/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch b/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch new file mode 100644 index 0000000000..bfcc36ea9e --- /dev/null +++ b/meta/recipes-extended/wget/wget-1.15/wget_cve-2014-4877.patch @@ -0,0 +1,78 @@ +From 18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7 Mon Sep 17 00:00:00 2001 +From: Darshit Shah +Date: Sun, 07 Sep 2014 19:11:17 +0000 +Subject: CVE-2014-4877: Arbitrary Symlink Access + +Wget was susceptible to a symlink attack which could create arbitrary +files, directories or symbolic links and set their permissions when +retrieving a directory recursively through FTP. This commit changes the +default settings in Wget such that Wget no longer creates local symbolic +links, but rather traverses them and retrieves the pointed-to file in +such a retrieval. + +The old behaviour can be attained by passing the --retr-symlinks=no +option to the Wget invokation command. +--- +diff --git a/doc/wget.texi b/doc/wget.texi +index aef1f80..d7a4c94 100644 +--- a/doc/wget.texi ++++ b/doc/wget.texi +@@ -1883,17 +1883,18 @@ Preserve remote file permissions instead of permissions set by umask. + + @cindex symbolic links, retrieving + @item --retr-symlinks +-Usually, when retrieving @sc{ftp} directories recursively and a symbolic +-link is encountered, the linked-to file is not downloaded. Instead, a +-matching symbolic link is created on the local filesystem. The +-pointed-to file will not be downloaded unless this recursive retrieval +-would have encountered it separately and downloaded it anyway. +- +-When @samp{--retr-symlinks} is specified, however, symbolic links are +-traversed and the pointed-to files are retrieved. At this time, this +-option does not cause Wget to traverse symlinks to directories and +-recurse through them, but in the future it should be enhanced to do +-this. ++By default, when retrieving @sc{ftp} directories recursively and a symbolic link ++is encountered, the symbolic link is traversed and the pointed-to files are ++retrieved. Currently, Wget does not traverse symbolic links to directories to ++download them recursively, though this feature may be added in the future. ++ ++When @samp{--retr-symlinks=no} is specified, the linked-to file is not ++downloaded. Instead, a matching symbolic link is created on the local ++filesystem. The pointed-to file will not be retrieved unless this recursive ++retrieval would have encountered it separately and downloaded it anyway. This ++option poses a security risk where a malicious FTP Server may cause Wget to ++write to files outside of the intended directories through a specially crafted ++@sc{.listing} file. + + Note that when retrieving a file (not a directory) because it was + specified on the command-line, rather than because it was recursed to, +diff --git a/src/init.c b/src/init.c +index 09557af..3bdaa48 100644 +--- a/src/init.c ++++ b/src/init.c +@@ -366,6 +366,22 @@ defaults (void) + + opt.dns_cache = true; + opt.ftp_pasv = true; ++ /* 2014-09-07 Darshit Shah ++ * opt.retr_symlinks is set to true by default. Creating symbolic links on the ++ * local filesystem pose a security threat by malicious FTP Servers that ++ * server a specially crafted .listing file akin to this: ++ * ++ * lrwxrwxrwx 1 root root 33 Dec 25 2012 JoCxl6d8rFU -> / ++ * drwxrwxr-x 15 1024 106 4096 Aug 28 02:02 JoCxl6d8rFU ++ * ++ * A .listing file in this fashion makes Wget susceptiple to a symlink attack ++ * wherein the attacker is able to create arbitrary files, directories and ++ * symbolic links on the target system and even set permissions. ++ * ++ * Hence, by default Wget attempts to retrieve the pointed-to files and does ++ * not create the symbolic links locally. ++ */ ++ opt.retr_symlinks = true; + + #ifdef HAVE_SSL + opt.check_cert = true; +-- +cgit v0.9.0.2 diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc new file mode 100644 index 0000000000..87310300e1 --- /dev/null +++ b/meta/recipes-extended/wget/wget.inc @@ -0,0 +1,23 @@ +SUMMARY = "Console URL download utility supporting HTTP, FTP, etc" +HOMEPAGE = "https://www.gnu.org/software/wget/" +SECTION = "console/network" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "gnutls zlib libpcre" +DEPENDS_class-nativesdk = "nativesdk-gnutls nativesdk-zlib nativesdk-libpcre" + +INC_PR = "r16" + +inherit autotools gettext texinfo update-alternatives + +EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \ + --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no" + +ALTERNATIVE_${PN} = "wget" +ALTERNATIVE_${PN}_class-nativesdk = "" +ALTERNATIVE_PRIORITY = "100" + +RRECOMMENDS_${PN} += "ca-certificates" + +BBCLASSEXTEND += "nativesdk" diff --git a/meta/recipes-extended/wget/wget/fix_makefile.patch b/meta/recipes-extended/wget/wget/fix_makefile.patch new file mode 100644 index 0000000000..8ad7c62cdf --- /dev/null +++ b/meta/recipes-extended/wget/wget/fix_makefile.patch @@ -0,0 +1,33 @@ + +Upstream-Status: Pending + +Signed-off-by: Saul Wold + +Index: wget-1.12/po/Makefile.in.in +=================================================================== +--- wget-1.12.orig/po/Makefile.in.in 2009-09-04 09:31:54.000000000 -0700 ++++ wget-1.12/po/Makefile.in.in 2011-10-19 20:32:53.714812160 -0700 +@@ -8,8 +8,8 @@ + # Please note that the actual code of GNU gettext is covered by the GNU + # General Public License and is *not* in the public domain. + # +-# Origin: gettext-0.17 +-GETTEXT_MACRO_VERSION = 0.17 ++# Origin: gettext-0.18 ++GETTEXT_MACRO_VERSION = 0.18 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ +Index: wget-1.12/configure.ac +=================================================================== +--- wget-1.12.orig/configure.ac 2009-09-22 09:39:49.000000000 -0700 ++++ wget-1.12/configure.ac 2011-10-19 20:32:53.714812160 -0700 +@@ -110,7 +110,7 @@ + dnl Gettext + dnl + AM_GNU_GETTEXT([external],[need-ngettext]) +-AM_GNU_GETTEXT_VERSION([0.17]) ++AM_GNU_GETTEXT_VERSION([0.18]) + + AC_PROG_RANLIB + diff --git a/meta/recipes-extended/wget/wget_1.15.bb b/meta/recipes-extended/wget/wget_1.15.bb new file mode 100644 index 0000000000..5375e4e504 --- /dev/null +++ b/meta/recipes-extended/wget/wget_1.15.bb @@ -0,0 +1,8 @@ +SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ + file://fix_makefile.patch \ + file://wget_cve-2014-4877.patch \ + " +SRC_URI[md5sum] = "506df41295afc6486662cc47470b4618" +SRC_URI[sha256sum] = "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd" + +require wget.inc diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch new file mode 100644 index 0000000000..8ab1d028eb --- /dev/null +++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch @@ -0,0 +1,27 @@ +Subject: [PATCH] automake foreign strictness + +Use foreign strictness to avoid automake errors. + +Upstream-Status: Inappropriate [upstream no longer active] + +Signed-off-by: Jackie Huang +--- + configure.ac | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b30b6f5..bd3222c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(which.c) +-AM_INIT_AUTOMAKE(which, 2.18) ++AC_INIT([which],[2.18]) ++AC_CONFIG_SRCDIR(which.c) ++AM_INIT_AUTOMAKE([foreign]) + AM_CONFIG_HEADER(config.h) + AM_MAINTAINER_MODE + +-- +1.7.1 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 @@ +Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific] + +# glibc also implements the function group_member. To avoid name conflict, +# here let us append a "_" to which's version. +# +# Signed-off-by Dexuan Cui , 2010-08-20 +# (this patch is licensed under GPLv2) + +--- which-2.18/bash.c ++++ which-2.18/bash.c +@@ -45,7 +45,12 @@ + * - changed all occurences of 'gid_t' into 'GID_T'. + * - exported functions needed in which.c + */ +-static int group_member (GID_T gid); ++ ++/* ++ * glibc also implements the function group_member. To avoid name conflict, ++ * here let us append a "_" to which's version. ++ */ ++static int _group_member (GID_T gid); + static char* extract_colon_unit (char const* string, int *p_index); + + /*=========================================================================== +@@ -200,8 +205,8 @@ + + /* From bash-2.05b / general.c / line 805 */ + /* Return non-zero if GID is one that we have in our groups list. */ +-int +-group_member (GID_T gid) ++static int ++_group_member (GID_T gid) + { + #if defined (HAVE_GETGROUPS) + register int i; +@@ -290,7 +295,7 @@ + return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; + + /* Otherwise, if we are in the owning group, the group permissions apply. */ +- if (group_member (finfo.st_gid)) ++ if (_group_member (finfo.st_gid)) + return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; + + /* Otherwise, if we are in the other group, the other permissions apply. */ +@@ -331,7 +336,7 @@ + /* Given a string containing units of information separated by colons, + return the next one pointed to by (P_INDEX), or NULL if there are no more. + Advance (P_INDEX) to the character after the colon. */ +-char* ++static char* + extract_colon_unit (char const* string, int* p_index) + { + int i, start, len; diff --git a/meta/recipes-extended/which/which-2.20/automake.patch b/meta/recipes-extended/which/which-2.20/automake.patch new file mode 100644 index 0000000000..92365dd854 --- /dev/null +++ b/meta/recipes-extended/which/which-2.20/automake.patch @@ -0,0 +1,10 @@ +diff --git a/configure.ac b/configure.ac +index d974461..a20dfa8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,2 +2,3 @@ dnl Process this file with autoconf to produce a configure script. +-AC_INIT(which.c) +-AM_INIT_AUTOMAKE(which, 2.20) ++AC_INIT([which],[2.20]) ++AC_CONFIG_SRCDIR(which.c) ++AM_INIT_AUTOMAKE([foreign]) 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 @@ +Remove the declaration of group_member since it has already been +declared in unistd.h + +Signed-off-by: Dongxiao Xu + +Upstream-Status: Inappropriate [embedded specific] + +diff -ruN which-2.20-orig/bash.c which-2.20/bash.c +--- which-2.20-orig/bash.c 2010-08-03 12:59:08.897088878 +0800 ++++ which-2.20/bash.c 2010-08-03 13:17:23.406097212 +0800 +@@ -46,7 +46,6 @@ + * - changed all occurences of 'gid_t' into 'GID_T'. + * - exported functions needed in which.c + */ +-static int group_member (GID_T gid); + static char* extract_colon_unit (char const* string, int* p_index); + + /*=========================================================================== diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb new file mode 100644 index 0000000000..eb6cc9967e --- /dev/null +++ b/meta/recipes-extended/which/which_2.18.bb @@ -0,0 +1,34 @@ +SUMMARY = "Displays the full path of shell commands" +DESCRIPTION = "Which is a utility that prints out the full path of the \ +executables that bash(1) would execute when the passed \ +program names would have been entered on the shell prompt. \ +It does this by using the exact same algorithm as bash." +SECTION = "libs" +HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +PR = "r2" + +SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \ + file://fix_name_conflict_group_member.patch \ + file://automake-foreign.patch \ +" + +SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9" +SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544" + +DEPENDS = "cwautomacros-native" + +inherit autotools texinfo update-alternatives + +do_configure_prepend() { + OLD="@ACLOCAL_CWFLAGS@" + NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4" + sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}` +} + +ALTERNATIVE_${PN} = "which" +ALTERNATIVE_PRIORITY = "100" + diff --git a/meta/recipes-extended/which/which_2.20.bb b/meta/recipes-extended/which/which_2.20.bb new file mode 100644 index 0000000000..74835543de --- /dev/null +++ b/meta/recipes-extended/which/which_2.20.bb @@ -0,0 +1,32 @@ +SUMMARY = "Displays the full path of shell commands" +DESCRIPTION = "Which is a utility that prints out the full path of the \ +executables that bash(1) would execute when the passed \ +program names would have been entered on the shell prompt. \ +It does this by using the exact same algorithm as bash." +SECTION = "libs" +HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2" +DEPENDS = "cwautomacros-native" + +inherit autotools texinfo update-alternatives + +PR = "r3" + +EXTRA_OECONF = "--disable-iberty" + +SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \ + file://automake.patch \ + file://remove-declaration.patch" + +SRC_URI[md5sum] = "95be0501a466e515422cde4af46b2744" +SRC_URI[sha256sum] = "d417b65c650d88ad26a208293c1c6e3eb60d4b6d847f01ff8f66aca63e2857f8" + +do_configure_prepend() { + sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am +} + +ALTERNATIVE_${PN} = "which" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch new file mode 100644 index 0000000000..6d5cc2f917 --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch @@ -0,0 +1,672 @@ +From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 29 Apr 2014 07:29:32 +0200 +Subject: [PATCH] Reinstate xdg-terminal + +Signed-off-by: Koen Kooi + +Upstream-status: Inappropriate [Revert] +--- + scripts/Makefile.in | 6 +- + scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 625 insertions(+), 3 deletions(-) + create mode 100755 scripts/xdg-terminal + +diff --git a/scripts/Makefile.in b/scripts/Makefile.in +index 2c7d2ac..bef10d1 100644 +--- a/scripts/Makefile.in ++++ b/scripts/Makefile.in +@@ -20,11 +20,11 @@ SCRIPTS = \ + xdg-open \ + xdg-email \ + xdg-screensaver \ +- xdg-settings ++ xdg-settings \ ++ xdg-terminal + # xdg-su + # xdg-copy \ + # xdg-file-dialog +-# xdg-terminal + + MANPAGES= $(SCRIPTS:%=man/%.1) + WEBPAGES= $(SCRIPTS:%=%.html) +@@ -42,7 +42,7 @@ release: scripts html man + rm -f xdg-*.in *~ HACKING generate-help-script.awk + rm -rf desc/ + rm -rf xsl/ +- rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal ++ rm -f xdg-file-dialog xdg-su xdg-copy + + distclean: clean + rm -f Makefile +diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal +new file mode 100755 +index 0000000..4bd9205 +--- /dev/null ++++ b/scripts/xdg-terminal +@@ -0,0 +1,622 @@ ++#!/bin/sh ++#--------------------------------------------- ++# xdg-terminal ++# ++# Utility script to open the registered terminal emulator ++# ++# Refer to the usage() function below for usage. ++# ++# Copyright 2009-2010, Fathi Boudra ++# Copyright 2009-2010, Rex Dieter ++# Copyright 2006, Kevin Krammer ++# ++# LICENSE: ++# ++# Permission is hereby granted, free of charge, to any person obtaining a ++# copy of this software and associated documentation files (the "Software"), ++# to deal in the Software without restriction, including without limitation ++# the rights to use, copy, modify, merge, publish, distribute, sublicense, ++# and/or sell copies of the Software, and to permit persons to whom the ++# Software is furnished to do so, subject to the following conditions: ++# ++# The above copyright notice and this permission notice shall be included ++# in all copies or substantial portions of the Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR ++# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++# OTHER DEALINGS IN THE SOFTWARE. ++# ++#--------------------------------------------- ++ ++manualpage() ++{ ++cat << _MANUALPAGE ++Name ++ ++ xdg-terminal - opens the user's preferred terminal emulator application ++ ++Synopsis ++ ++ xdg-terminal [command] ++ ++ xdg-terminal { --help | --manual | --version } ++ ++Description ++ ++ xdg-terminal opens the user's preferred terminal emulator application. If ++ a command is provided the command will be executed by the shell within the ++ newly opened terminal window. ++ ++ xdg-terminal is for use inside a desktop session only. It is not ++ recommended to use xdg-terminal as root. ++ ++Options ++ ++ --help ++ Show command synopsis. ++ ++ --manual ++ Show this manual page. ++ ++ --version ++ Show the xdg-utils version information. ++ ++Exit Codes ++ ++ An exit code of 0 indicates success while a non-zero exit code indicates ++ failure. The following failure codes can be returned: ++ ++ 1 ++ Error in command line syntax. ++ ++ 3 ++ A required tool could not be found. ++ ++ 4 ++ The action failed. ++ ++Examples ++ ++ xdg-terminal ++ ++ Opens the user's default terminal emulator, just starting an interactive ++ shell. ++ ++ xdg-terminal top ++ ++ Opens the user's default terminal emulator and lets it run the top ++ executable. ++_MANUALPAGE ++} ++ ++usage() ++{ ++cat << _USAGE ++ xdg-terminal - opens the user's preferred terminal emulator application ++ ++Synopsis ++ ++ xdg-terminal [command] ++ ++ xdg-terminal { --help | --manual | --version } ++ ++_USAGE ++} ++ ++#@xdg-utils-common@ ++ ++#---------------------------------------------------------------------------- ++# Common utility functions included in all XDG wrapper scripts ++#---------------------------------------------------------------------------- ++ ++DEBUG() ++{ ++ [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; ++ [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; ++ shift ++ echo "$@" >&2 ++} ++ ++# This handles backslashes but not quote marks. ++first_word() ++{ ++ read first rest ++ echo "$first" ++} ++ ++#------------------------------------------------------------- ++# map a binary to a .desktop file ++binary_to_desktop_file() ++{ ++ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" ++ binary="`which "$1"`" ++ binary="`readlink -f "$binary"`" ++ base="`basename "$binary"`" ++ IFS=: ++ for dir in $search; do ++ unset IFS ++ [ "$dir" ] || continue ++ [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue ++ for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do ++ [ -r "$file" ] || continue ++ # Check to make sure it's worth the processing. ++ grep -q "^Exec.*$base" "$file" || continue ++ # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). ++ grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue ++ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" ++ command="`which "$command"`" ++ if [ x"`readlink -f "$command"`" = x"$binary" ]; then ++ # Fix any double slashes that got added path composition ++ echo "$file" | sed -e 's,//*,/,g' ++ return ++ fi ++ done ++ done ++} ++ ++#------------------------------------------------------------- ++# map a .desktop file to a binary ++## FIXME: handle vendor dir case ++desktop_file_to_binary() ++{ ++ search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" ++ desktop="`basename "$1"`" ++ IFS=: ++ for dir in $search; do ++ unset IFS ++ [ "$dir" ] && [ -d "$dir/applications" ] || continue ++ file="$dir/applications/$desktop" ++ [ -r "$file" ] || continue ++ # Remove any arguments (%F, %f, %U, %u, etc.). ++ command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" ++ command="`which "$command"`" ++ readlink -f "$command" ++ return ++ done ++} ++ ++#------------------------------------------------------------- ++# Exit script on successfully completing the desired operation ++ ++exit_success() ++{ ++ if [ $# -gt 0 ]; then ++ echo "$@" ++ echo ++ fi ++ ++ exit 0 ++} ++ ++ ++#----------------------------------------- ++# Exit script on malformed arguments, not enough arguments ++# or missing required option. ++# prints usage information ++ ++exit_failure_syntax() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ echo "Try 'xdg-terminal --help' for more information." >&2 ++ else ++ usage ++ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." ++ fi ++ ++ exit 1 ++} ++ ++#------------------------------------------------------------- ++# Exit script on missing file specified on command line ++ ++exit_failure_file_missing() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ fi ++ ++ exit 2 ++} ++ ++#------------------------------------------------------------- ++# Exit script on failure to locate necessary tool applications ++ ++exit_failure_operation_impossible() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ fi ++ ++ exit 3 ++} ++ ++#------------------------------------------------------------- ++# Exit script on failure returned by a tool application ++ ++exit_failure_operation_failed() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ fi ++ ++ exit 4 ++} ++ ++#------------------------------------------------------------ ++# Exit script on insufficient permission to read a specified file ++ ++exit_failure_file_permission_read() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ fi ++ ++ exit 5 ++} ++ ++#------------------------------------------------------------ ++# Exit script on insufficient permission to write a specified file ++ ++exit_failure_file_permission_write() ++{ ++ if [ $# -gt 0 ]; then ++ echo "xdg-terminal: $@" >&2 ++ fi ++ ++ exit 6 ++} ++ ++check_input_file() ++{ ++ if [ ! -e "$1" ]; then ++ exit_failure_file_missing "file '$1' does not exist" ++ fi ++ if [ ! -r "$1" ]; then ++ exit_failure_file_permission_read "no permission to read file '$1'" ++ fi ++} ++ ++check_vendor_prefix() ++{ ++ file_label="$2" ++ [ -n "$file_label" ] || file_label="filename" ++ file=`basename "$1"` ++ case "$file" in ++ [[:alpha:]]*-*) ++ return ++ ;; ++ esac ++ ++ echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2 ++ echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 ++ echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 ++ echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2 ++ exit 1 ++} ++ ++check_output_file() ++{ ++ # if the file exists, check if it is writeable ++ # if it does not exists, check if we are allowed to write on the directory ++ if [ -e "$1" ]; then ++ if [ ! -w "$1" ]; then ++ exit_failure_file_permission_write "no permission to write to file '$1'" ++ fi ++ else ++ DIR=`dirname "$1"` ++ if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then ++ exit_failure_file_permission_write "no permission to create file '$1'" ++ fi ++ fi ++} ++ ++#---------------------------------------- ++# Checks for shared commands, e.g. --help ++ ++check_common_commands() ++{ ++ while [ $# -gt 0 ] ; do ++ parm="$1" ++ shift ++ ++ case "$parm" in ++ --help) ++ usage ++ echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info." ++ exit_success ++ ;; ++ ++ --manual) ++ manualpage ++ exit_success ++ ;; ++ ++ --version) ++ echo "xdg-terminal 1.1.0 rc1" ++ exit_success ++ ;; ++ esac ++ done ++} ++ ++check_common_commands "$@" ++ ++[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; ++if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then ++ # Be silent ++ xdg_redirect_output=" > /dev/null 2> /dev/null" ++else ++ # All output to stderr ++ xdg_redirect_output=" >&2" ++fi ++ ++#-------------------------------------- ++# Checks for known desktop environments ++# set variable DE to the desktop environments name, lowercase ++ ++detectDE() ++{ ++ # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 ++ unset GREP_OPTIONS ++ ++ if [ -n "${XDG_CURRENT_DESKTOP}" ]; then ++ case "${XDG_CURRENT_DESKTOP}" in ++ ENLIGHTENMENT) ++ DE=enlightenment; ++ ;; ++ GNOME) ++ DE=gnome; ++ ;; ++ KDE) ++ DE=kde; ++ ;; ++ LXDE) ++ DE=lxde; ++ ;; ++ MATE) ++ DE=mate; ++ ;; ++ XFCE) ++ DE=xfce ++ ;; ++ esac ++ fi ++ ++ if [ x"$DE" = x"" ]; then ++ # classic fallbacks ++ if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; ++ elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; ++ elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; ++ elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; ++ elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; ++ elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce ++ elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; ++ fi ++ fi ++ ++ if [ x"$DE" = x"" ]; then ++ # fallback to checking $DESKTOP_SESSION ++ case "$DESKTOP_SESSION" in ++ gnome) ++ DE=gnome; ++ ;; ++ LXDE|Lubuntu) ++ DE=lxde; ++ ;; ++ MATE) ++ DE=mate; ++ ;; ++ xfce|xfce4|'Xfce Session') ++ DE=xfce; ++ ;; ++ esac ++ fi ++ ++ if [ x"$DE" = x"" ]; then ++ # fallback to uname output for other platforms ++ case "$(uname 2>/dev/null)" in ++ Darwin) ++ DE=darwin; ++ ;; ++ esac ++ fi ++ ++ if [ x"$DE" = x"gnome" ]; then ++ # gnome-default-applications-properties is only available in GNOME 2.x ++ # but not in GNOME 3.x ++ which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" ++ fi ++} ++ ++#---------------------------------------------------------------------------- ++# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 ++# It also always returns 1 in KDE 3.4 and earlier ++# Simply return 0 in such case ++ ++kfmclient_fix_exit_code() ++{ ++ version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` ++ major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` ++ minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` ++ release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` ++ test "$major" -gt 3 && return $1 ++ test "$minor" -gt 5 && return $1 ++ test "$release" -gt 4 && return $1 ++ return 0 ++} ++ ++terminal_kde() ++{ ++ terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole` ++ ++ terminal_exec=`which $terminal 2>/dev/null` ++ ++ if [ -x "$terminal_exec" ]; then ++ if [ x"$1" = x"" ]; then ++ $terminal_exec ++ else ++ $terminal_exec -e "$1" ++ fi ++ ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++ else ++ exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable" ++ fi ++} ++ ++terminal_gnome() ++{ ++ term_exec_key="/desktop/gnome/applications/terminal/exec" ++ term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg" ++ ++ term_exec=`gconftool-2 --get ${term_exec_key}` ++ term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}` ++ ++ terminal_exec=`which $term_exec 2>/dev/null` ++ ++ if [ -x "$terminal_exec" ]; then ++ if [ x"$1" = x"" ]; then ++ $terminal_exec ++ else ++ if [ x"$term_exec_arg" = x"" ]; then ++ $terminal_exec "$1" ++ else ++ $terminal_exec "$term_exec_arg" "$1" ++ fi ++ fi ++ ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++ else ++ exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable" ++ fi ++} ++ ++terminal_xfce() ++{ ++ if [ x"$1" = x"" ]; then ++ exo-open --launch TerminalEmulator ++ else ++ exo-open --launch TerminalEmulator "$1" ++ fi ++ ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++} ++ ++terminal_generic() ++{ ++ # if $TERM is a known non-command, use hard-coded fallbacks ++ if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then ++ TERM=xterm ++ fi ++ ++ terminal_exec=`which $TERM 2>/dev/null` ++ ++ if [ -x "$terminal_exec" ]; then ++ if [ x"$1" = x"" ]; then ++ $terminal_exec ++ else ++ # screen and urxvt won't do their own parsing of quoted arguments ++ if [ x"$TERM" = x"screen" ]; then ++ # screen has an incompatible meaning for -e ++ sh -c "exec $terminal_exec $1" ++ elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then ++ #TODO: Use whatever mechanism dash supports to test for ++ # rxvt-* to match things like rxvt-unicode-256color ++ sh -c "exec $terminal_exec -e $1" ++ else ++ $terminal_exec -e "$1" ++ fi ++ fi ++ ++ if [ $? -eq 0 ]; then ++ exit_success ++ else ++ exit_failure_operation_failed ++ fi ++ else ++ exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable" ++ fi ++} ++ ++terminal_lxde() ++{ ++ if which lxterminal &>/dev/null; then ++ if [ x"$1" = x"" ]; then ++ lxterminal ++ else ++ lxterminal -e "$1" ++ fi ++ else ++ terminal_generic "$1" ++ fi ++} ++ ++#[ x"$1" != x"" ] || exit_failure_syntax ++ ++command= ++while [ $# -gt 0 ] ; do ++ parm="$1" ++ shift ++ ++ case "$parm" in ++ -*) ++ exit_failure_syntax "unexpected option '$parm'" ++ ;; ++ ++ *) ++ if [ -n "$command" ] ; then ++ exit_failure_syntax "unexpected argument '$parm'" ++ fi ++ command="$parm" ++ ;; ++ esac ++done ++ ++detectDE ++ ++if [ x"$DE" = x"" ]; then ++ DE=generic ++fi ++ ++case "$DE" in ++ kde) ++ terminal_kde "$command" ++ ;; ++ ++ gnome*) ++ terminal_gnome "$command" ++ ;; ++ ++ xfce) ++ terminal_xfce "$command" ++ ;; ++ ++ lxde) ++ terminal_lxde "$command" ++ ;; ++ ++ generic) ++ terminal_generic "$command" ++ ;; ++ ++ *) ++ exit_failure_operation_impossible "no terminal emulator available" ++ ;; ++esac +-- +1.9.0 + 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..2ac979b0b9 --- /dev/null +++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb @@ -0,0 +1,29 @@ +SUMMARY = "Basic desktop integration functions" + +DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \ +desktop integration functions for any Free Desktop, such as Linux. \ +They are intended to provide a set of defacto standards. \ +The following scripts are provided at this time: \ +xdg-desktop-icon \ +xdg-desktop-menu \ +xdg-email \ +xdg-icon-resource \ +xdg-mime \ +xdg-open \ +xdg-screensaver \ +xdg-terminal \ +" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014" + +SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \ + file://0001-Reinstate-xdg-terminal.patch \ + " + +SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6" +SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102" + +inherit autotools-brokensep + +RDEPENDS_${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 @@ +Upstream-Status: Pending [from other distro Debian] + +From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Wed, 28 Nov 2007 10:13:08 +0100 +Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists. + + This way, if a service is enabled in /etc/xinetd* _and_ in +/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes +precedence. + +Signed-off-by: Pierre Habouzit +--- + xinetd/inet.c | 22 +++++++++++++++++++--- + 1 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/xinetd/inet.c b/xinetd/inet.c +index 1cb2ba2..8caab45 100644 +--- a/xinetd/inet.c ++++ b/xinetd/inet.c +@@ -23,6 +23,8 @@ + #include "parsesup.h" + #include "nvlists.h" + ++static psi_h iter ; ++ + static int get_next_inet_entry( int fd, pset_h sconfs, + struct service_config *defaults); + +@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp ) + struct service_config *default_config = CNF_DEFAULTS( confp ); + + line_count = 0; ++ iter = psi_create (sconfs); + + for( ;; ) + { + if (get_next_inet_entry(fd, sconfs, default_config) == -2) + break; + } ++ ++ psi_destroy(iter); + } + + static int get_next_inet_entry( int fd, pset_h sconfs, +@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + char *p; + str_h strp; + char *line = next_line(fd); +- struct service_config *scp; ++ struct service_config *scp, *tmp; + unsigned u, i; + const char *func = "get_next_inet_entry"; + char *name = NULL, *rpcvers = NULL, *rpcproto = NULL; +@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + SC_SPECIFY( scp, A_SOCKET_TYPE ); + SC_SPECIFY( scp, A_WAIT ); + +- if( ! pset_add(sconfs, scp) ) ++ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){ ++ if (EQ(SC_ID(scp), SC_ID(tmp))) { ++ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp)); ++ sc_free(scp); ++ scp = NULL; ++ break; ++ } ++ } ++ ++ if( scp && ! pset_add(sconfs, scp) ) + { + out_of_memory( func ); + pset_destroy(args); +@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + } + + pset_destroy(args); +- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); ++ if (scp) { ++ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); ++ } + return 0; + } + +-- +1.5.3.6.2040.g15e6 + diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch new file mode 100644 index 0000000000..8e59cdcaae --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch @@ -0,0 +1,79 @@ +Upstream-Status: Pending [from other distro Debian] + +From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Mon, 26 Nov 2007 16:02:04 +0100 +Subject: [PATCH] Various fixes from the previous maintainer. + +--- + xinetd/child.c | 20 +++++++++++++++++--- + xinetd/service.c | 8 ++++---- + 2 files changed, 21 insertions(+), 7 deletions(-) + +diff --git a/xinetd/child.c b/xinetd/child.c +index 89ee54c..48e9615 100644 +--- a/xinetd/child.c ++++ b/xinetd/child.c +@@ -284,6 +284,7 @@ void child_process( struct server *serp ) + connection_s *cp = SERVER_CONNECTION( serp ) ; + struct service_config *scp = SVC_CONF( sp ) ; + const char *func = "child_process" ; ++ int fd, null_fd; + + signal_default_state(); + +@@ -296,9 +297,22 @@ void child_process( struct server *serp ) + signals_pending[0] = -1; + signals_pending[1] = -1; + +- Sclose(0); +- Sclose(1); +- Sclose(2); ++ if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 ) ++ { ++ msg( LOG_ERR, func, "open('/dev/null') failed: %m") ; ++ _exit( 1 ) ; ++ } ++ ++ for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ ) ++ { ++ if ( fd != null_fd && dup2( null_fd, fd ) == -1 ) ++ { ++ msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ; ++ _exit( 1 ) ; ++ } ++ } ++ if ( null_fd > MAX_PASS_FD ) ++ (void) Sclose( null_fd ) ; + + + #ifdef DEBUG_SERVER +diff --git a/xinetd/service.c b/xinetd/service.c +index 3d68d78..0132d6c 100644 +--- a/xinetd/service.c ++++ b/xinetd/service.c +@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp, + return FAILED; + + if ( last == NULL ) { +- last = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); +- SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last; ++ SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) ); ++ last = SAIN( SVC_LAST_DGRAM_ADDR(sp) ); + } + + (void) time( ¤t_time ) ; +@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp, + return FAILED; + + if( last == NULL ) { +- last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); +- SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last; ++ SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) ); ++ last = SAIN6(SVC_LAST_DGRAM_ADDR(sp)); + } + + (void) time( ¤t_time ) ; +-- +1.5.3.6.2040.g15e6 + 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 @@ +xinetd: CVE-2013-4342 + +xinetd does not enforce the user and group configuration directives +for TCPMUX services, which causes these services to be run as root +and makes it easier for remote attackers to gain privileges by +leveraging another vulnerability in a service. +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342 + +the patch come from: +https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff + +Signed-off-by: Li Wang +--- + xinetd/builtins.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xinetd/builtins.c b/xinetd/builtins.c +index 3b85579..34a5bac 100644 +--- a/xinetd/builtins.c ++++ b/xinetd/builtins.c +@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp ) + if( SC_IS_INTERNAL( scp ) ) { + SC_INTERNAL(scp, nserp); + } else { +- exec_server(nserp); ++ child_process(nserp); + } + } + +-- +1.7.9.5 + 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 @@ +Upstream-Status: Pending [from other distro Debian] + +From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001 +From: David Madore +Date: Mon, 24 Mar 2008 12:45:36 +0100 +Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode + +xinetd does not bind to IPv6 addresses (and does not seem to have an +option to do so) when used in -inetd_compat mode. As current inetd's +are IPv6-aware, this is a problem: this means xinetd cannot be used as +a drop-in inetd replacement. + +The attached patch is a suggestion: it adds a -inetd_ipv6 global +option that, if used, causes inetd-compatibility lines to have an +implicit "IPv6" option. Perhaps this is not the best solution, but +there should definitely be a way to get inetd.conf to be read in +IPv6-aware mode. +--- + xinetd/confparse.c | 1 + + xinetd/inet.c | 17 +++++++++++++++++ + xinetd/options.c | 3 +++ + xinetd/xinetd.man | 6 ++++++ + 4 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/xinetd/confparse.c b/xinetd/confparse.c +index db9f431..d7b0bcc 100644 +--- a/xinetd/confparse.c ++++ b/xinetd/confparse.c +@@ -40,6 +40,7 @@ + #include "inet.h" + #include "main.h" + ++extern int inetd_ipv6; + extern int inetd_compat; + + /* +diff --git a/xinetd/inet.c b/xinetd/inet.c +index 8caab45..2e617ae 100644 +--- a/xinetd/inet.c ++++ b/xinetd/inet.c +@@ -25,6 +25,8 @@ + + static psi_h iter ; + ++extern int inetd_ipv6; ++ + static int get_next_inet_entry( int fd, pset_h sconfs, + struct service_config *defaults); + +@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + } + SC_SERVER_ARGV(scp)[u] = p; + } ++ ++ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */ ++ if ( inetd_ipv6 ) ++ { ++ nvp = nv_find_value( service_flags, "IPv6" ); ++ if ( nvp == NULL ) ++ { ++ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ; ++ pset_destroy(args); ++ sc_free(scp); ++ return -1; ++ } ++ M_SET(SC_XFLAGS(scp), nvp->value); ++ } ++ + /* Set the reuse flag, as this is the default for inetd */ + nvp = nv_find_value( service_flags, "REUSE" ); + if ( nvp == NULL ) +diff --git a/xinetd/options.c b/xinetd/options.c +index b058b6a..dc2f3a0 100644 +--- a/xinetd/options.c ++++ b/xinetd/options.c +@@ -30,6 +30,7 @@ int logprocs_option ; + unsigned logprocs_option_arg ; + int stayalive_option=0; + char *program_name ; ++int inetd_ipv6 = 0 ; + int inetd_compat = 0 ; + int dont_fork = 0; + +@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] ) + fprintf(stderr, "\n"); + exit(0); + } ++ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 ) ++ inetd_ipv6 = 1; + else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 ) + inetd_compat = 1; + } +diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man +index c76c3c6..c9dd803 100644 +--- a/xinetd/xinetd.man ++++ b/xinetd/xinetd.man +@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the + standard xinetd config files. /etc/inetd.conf is read after the + standard xinetd config files. + .TP ++.BI \-inetd_ipv6 ++This option causes xinetd to bind to IPv6 (AF_INET6) addresses for ++inetd compatibility lines (see previous option). This only affects ++how /etc/inetd.conf is interpreted and thus only has any effect if ++the \-inetd_compat option is also used. ++.TP + .BI \-cc " interval" + This option instructs + .B xinetd +-- +1.5.5.rc0.127.gb4337 + diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf new file mode 100644 index 0000000000..9e6ea2577e --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.conf @@ -0,0 +1,11 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + + +} + +includedir /etc/xinetd.d diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.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 @@ +# Default settings for xinetd. This file is sourced by /bin/sh from +# /etc/init.d/xinetd + +# enable xinetd Inetd compat mode +INETD_COMPAT=Yes + +# Options to pass to xinetd +# +# -stayalive comes by default : it can be removed if xinetd is expected +# not to start when no service is configured +# +XINETD_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 @@ +#!/bin/sh +# +# /etc/init.d/xinetd -- script to start and stop xinetd. + +# Source function library. +. /etc/init.d/functions + +if test -f /etc/default/xinetd; then + . /etc/default/xinetd +fi + + +test -x /usr/sbin/xinetd || exit 0 + +checkportmap () { + if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then + if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then + echo + echo "WARNING: portmapper inactive - RPC services unavailable!" + echo " Commenting out or removing the RPC services from" + echo " the /etc/xinetd.conf file will remove this message." + echo + fi + fi +} + +case "$1" in + start) + checkportmap + echo -n "Starting internet superserver: xinetd" + start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS + echo "." + ;; + stop) + echo -n "Stopping internet superserver: xinetd" + start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd + echo "." + ;; + status) + status /usr/sbin/xinetd; + exit $? + ;; + reload) + echo -n "Reloading internet superserver configuration: xinetd" + start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd + echo "." + ;; + force-reload) + echo "$0 force-reload: Force Reload is deprecated" + echo -n "Forcefully reloading internet superserver configuration: xinetd" + start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd + echo "." + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb new file mode 100644 index 0000000000..1928949e94 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb @@ -0,0 +1,57 @@ +SUMMARY = "Socket-based service activation daemon" +HOMEPAGE = "http://www.xinetd.org" + +# xinetd is a BSD-like license +# Apple and Gentoo say BSD here. +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" + +DEPENDS = "" +PR = "r2" + +SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \ + file://xinetd.init \ + file://xinetd.conf \ + file://xinetd.default \ + file://Various-fixes-from-the-previous-maintainer.patch \ + file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ + file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ + file://xinetd-CVE-2013-4342.patch \ + " + +SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c" +SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "xinetd" +INITSCRIPT_PARAMS = "defaults" + +EXTRA_OECONF="--disable-nls" + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" + +do_configure() { + # Looks like configure.in is broken, so we are skipping + # rebuilding configure and are just using the shipped one + ( cd ${S}; gnu-configize --force ) + oe_runconf +} + +do_install() { + # Same here, the Makefile does some really stupid things, + # but since we only want two files why not override + # do_install from autotools and doing it ourselfs? + install -d "${D}${sbindir}" + install -d "${D}${sysconfdir}/init.d" + install -d "${D}${sysconfdir}/xinetd.d" + install -d "${D}${sysconfdir}/default" + install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}" + install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd" + install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" + install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" + install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" +} + +CONFFILES_${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..168e3837d8 --- /dev/null +++ b/meta/recipes-extended/xz/xz_5.1.3alpha.bb @@ -0,0 +1,42 @@ +SUMMARY = "Utilities for managing LZMA compressed files" +HOMEPAGE = "http://tukaani.org/xz/" +SECTION = "base" + +# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file +# which is GPLv3 is an m4 macro which isn't shipped in any of our packages, +# and the LGPL bits are under lib/, which appears to be used for libgnu, which +# appears to be used for DOS builds. So we're left with GPLv2+ and PD. +LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+ & PD" +LICENSE_${PN} = "GPLv2+" +LICENSE_${PN}-dev = "GPLv2+" +LICENSE_${PN}-staticdev = "GPLv2+" +LICENSE_${PN}-doc = "GPLv2+" +LICENSE_${PN}-dbg = "GPLv2+" +LICENSE_${PN}-locale = "GPLv2+" +LICENSE_liblzma = "PD" +LICENSE_liblzma-dev = "PD" +LICENSE_liblzma-staticdev = "PD" +LICENSE_liblzma-dbg = "PD" + +LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \ + file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ + file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 " + +SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz" +SRC_URI[md5sum] = "bbb2daa876c87fb2cf9fe4590af9694e" +SRC_URI[sha256sum] = "9f94506e301d5b6863921bba861a99ba00de384dafb4e5f409679a93e41613d4" + +inherit autotools gettext + +PACKAGES =+ "liblzma liblzma-dev liblzma-staticdev liblzma-dbg" + +FILES_liblzma = "${libdir}/liblzma*${SOLIBS}" +FILES_liblzma-dev = "${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir}/liblzma.la ${libdir}/pkgconfig/liblzma.pc" +FILES_liblzma-staticdev = "${libdir}/liblzma.a" +FILES_liblzma-dbg = "${libdir}/.debug/liblzma*" + +BBCLASSEXTEND = "native nativesdk" + +export CONFIG_SHELL="/bin/sh" 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 @@ +SUMMARY = "Compressor/archiver for creating and modifying .zip files" +HOMEPAGE = "http://www.info-zip.org" +SECTION = "console/utils" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d" + +SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz" + +EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \ + 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \ + 'BINFLAGS=0755' 'INSTALL_D=install -d'" + +do_compile() { + oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory + sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags + oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory +} + +do_install() { + oe_runmake -f unix/Makefile prefix=${D}${prefix} \ + BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \ + install +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb new file mode 100644 index 0000000000..1e961101bc --- /dev/null +++ b/meta/recipes-extended/zip/zip_3.0.bb @@ -0,0 +1,15 @@ +require zip.inc + +PR="r2" + +# zip-2.32 still uses directory name of zip-2.30 +S = "${WORKDIR}/zip30" + +SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37" +SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" + +# zip.inc sets CFLAGS, but what Makefile actually uses is +# CFLAGS_NOOPT. It will also force -O3 optimization, overriding +# whatever we set. +# +EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'" -- cgit v1.2.3-54-g00ecf